diff options
1554 files changed, 81678 insertions, 45640 deletions
@@ -69,6 +69,7 @@ b53a0576eec80614d7767ed72b40ed67aeff27c9 DRTVWR-38_2.5.2-release 4e9eec6a347f89b2b3f295beb72f1cf7837dff66 2.6.0-start 9283d6d1d7eb71dfe4c330e7c9144857e7356bde 2.6.0-beta1 9283d6d1d7eb71dfe4c330e7c9144857e7356bde DRTVWR-40_2.6.0-beta1 +461c8c65b5c799ddfe365422f9be9c0095d91e7d 2.6.0-beta1-tip 9e4641f4a7870c0f565a25a2971368d5a29516a1 2.6.0-beta2 9e4641f4a7870c0f565a25a2971368d5a29516a1 DRTVWR-41_2.6.0-beta2 c5bdef3aaa2744626aef3c217ce29e1900d357b3 2.6.1-beta1 @@ -280,7 +281,6 @@ ab2ffc547c8a8950ff187c4f6c95e5334fab597b 3.3.4-beta5 28e100d0379a2b0710c57647a28fc5239d3d7b99 3.3.4-release 005dfe5c4c377207d065fb27858d2eb0b53b143a DRTVWR-167 888768f162d2c0a8de1dcc5fb9a08bd8bd120a6b DRTVWR-175 -4ad8a3afe40e0200309e3ada68932c4295ac2795 DRTVWR-179 a8b3eca451a9eaab59987efb0ab1c4217e3f2dcc DRTVWR-182 1f27cdfdc54246484f8afbbe42ce48e954175cbd 3.4.0-beta1 9ee9387789701d597130f879d9011a4958753862 DRTVWR-189 @@ -304,4 +304,128 @@ b1dbb1a83f48f93f6f878cff9e52d2cb635e145c 3.4.0-beta2 af7b28e75bd5a629cd9e0dc46fb3f1757626f493 DRTVWR-212 015012c2b740ccdec8a8c3d6e5f898449ecfe0b8 DRTVWR-213 62b07aa81b1957897c3846292bb9412977b0af6c 3.3.4-beta6 -d02759655d6b36d60f4a927e4bfce82844a82ef5 3.4.0-release +ceed0b65a69f1eac20d523e0203320a32f9a3f3c DRTVWR-215 +733ceac77583874f3626ef7a15c105b83ef0f5bb 3.4.0-beta7 +97977c67245f52db20eb15f1918cc0f24778cabc 3.4.0-release +5adb2b8f96c3cac88ad7c7d996d707f1b29df336 3.4.1-beta1 +b3f74858a1c8720c82d0978f3877a3fc8ba459ec 3.4.1-beta1a +2b779f233ee6f38c89cb921650c773a96e63da92 DRTVWR-220 +0b9d95f4bfb6867cbf56eaec51633b0da2f1262d DRTVWR-221 +e6e553761829dc0270eaaa712b7cb0622535b076 3.4.1-beta3 +f00068a66a2e2f72acbe3f690b98b323e740b289 DRTVWR-222 +305950187c628a5d6743ee9ea711cc5b9177a18e 3.4.1-beta4 +dd23d4da3bcb2ffda58569e759feb7c119982973 DRTVWR-224 +0bd3744ff060452aa13ff4992eafb381df7b1012 3.4.1-beta5 +29075f8c1abed53dcf195a59f61744e27a91108f DRTVWR-226 +fba99f381b8d4ad1b7b42fa4993b29998d95be18 DRTVWR-179 +49ed253c80bed7410e238eeab35a9f14cb034364 3.4.1-beta6 +468ca3268229011a59df99229b24315844b33d34 DRTVWR-227 +524da902713e8b60322640b9825101add4a7c497 3.4.1-beta7 +173c2809f9873499c4b9d6bc044ec941c954d3fb DRTVWR-228 +1dc94555582f52718834081e7659e973ae4521f7 3.4.1-beta8 +52c164c8023a5e65f3dc1b0bbb7fa1dd0c631b6b DRTVWR-231 +464cf7a63a9a2f95bc4972dc022ca765e93de7d3 DRTVWR-233 +637fe8bbee5e24940448198c221d5ee0fa3247b4 3.4.1-beta9 +4e0d84e92132e9e95a1d52a1e49bad69c278ea05 3.4.1-beta10 +f7cbd60a3f57ff1101157eeb79ea21e8898bedae DRTVWR-235 +baf97f06ae17223614c5e31aa42e71d87cff07fe DRTVWR-236 +18498afcdb835d6fc4d36ed935347d3b65307bad 3.4.1-beta11 +b2f21e3442542283a80e7eaebae9f833e5a927b6 DRTVWR-237 +3f9be82de642d468c5fc272cb9d96b46b5498402 3.4.1-beta12 +e59ffd3fe0838ae6b09b242a6e9df71761b88f41 3.4.1-release +81f6b745ef27f5915fd07f988fdec9944f2bb73e DRTVWR-186 +cc953f00956be52cc64c30637bbeec310eea603f DRTVWR-181 +c04e68e1b0034fd0a20815ae24c77e5f8428e822 DRTVWR-188 +4b2c52aecb7a75de31dbb12d9f5b9a251d8707be DRTVWR-191 +78ca0bbf43a92e8914d4cfa87d69a6717ef7d4cf DRTVWR-194 +248f4acd92a706c79e842bc83d80baa7369c0c2e DRTVWR-203 +de3be913f68813a9bac7d1c671fef96d1159bcd6 DRTVWR-202 +34dbbe2b00afe90352d3acf8290eb10ab90d1c8b oz-build-test-tag +6ee71714935ffcd159db3d4f5800c1929aac54e1 DRTVWR-205 +7b22c612fc756e0ea63b10b163e81d107f85dbf8 DRTVWR-206 +b61afe175b829c149d369524a4e974dfda99facf DRTVWR-219 +32896d5e920ca9a29256ff3b747c2e99752aa5ae DRTVWR-217 +704bbae7b182a1f2811a47a054e680522966f54a 3.4.2-beta1 +288539fc0408ed4b69a99665de33bbbc2c3c08fe DRTVWR-216 +e664473c16df1d82ffaff382e7b3e023da202d52 3.4.2-beta2 +0891d7a773a31397dcad48be3fa66531d567a821 DRTVWR-242 +710785535362b3cb801b6a3dc4703be3373bd0cd 3.4.2-beta3 +e9a5886052433d5db9e504ffaca10890f9932979 DRTVWR-243 +73b84b9864dc650fe7c8fc9f52361450f0849004 3.4.2-beta4 +16310aabccf315870f7cc9bf966926c0ad6954fa 3.4.2-release +d799593b53ed733862e9a13871e318e886469377 DRTVWR-208 +e497dcde7a3653e384eb223a8a460030e89c294c DRTVWR-223 +93ab02d83f51e30a3cabad98aff89601befd9413 DRTVWR-240 +2aa72e3372a83dece4df9cf72fb1e7c34f90b5e3 DRTVWR-209 +f7bedce18ad52283e6072814db23318907261487 DRTVWR-238 +7b64c96fbcadf360bd2feaae19d330166b70877c DRTVWR-210 +5e4e4128b256525bafc07a62e35ae8527aaa9c9d DRTVWR-241 +f1d3b3fcab28ed9ea532bf50db0ba96f5c8cc8e9 DRTVWR-232 +4918b150e75df6b516fb6c2616d32043fa6b4cac DRTVWR-245 +94ab2b49458ab372a95d2d6949fdf574f413068d 3.4.3-beta1 +965b9a35e260c0f53be1a25f0db7abc8a67eaf47 DRTVWR-252 +bb10adc4f76cf0067fca7075146f00cdc0740e9d DRTVWR-251 +ab0aa2f6ba22b52fed30a2337197f589156edc75 DRTVWR-253 +48382ec79741671d19ce4cc3e8cd59e9a521e4a7 DRTVWR-254 +937ec902bb9a1cbceff17bd89e3923352b0a5fbc DRTVWR-256 +44e764a6ac9e672a4f3bce821a4b6a218590c374 DRTVWR-258 +c23d734065ed593b2413385aecd8366d8e0ee96b DRTVWR-257 +452ce96d4046dc05a3ecaecc203e2cc8ddd72e76 DRTVWR-259 +daca610d840625b5bebb966a57cb49581852c417 DRTVWR-265 +9afbdc4e24cc04feacfb2b7a10b78a64f780901a DRTVWR-266 +73280db02501f5ad041fc18b1eba68e73a81996c DRTVWR-267 +870e2d79e0063fda87187f17bbc2747766733194 3.4.3-beta3 +0a2ca6546b499239afeb66d17b2fadbcdbe36ab1 3.4.3-release +4c3460cb1fb7c6da9965e09c734d282a8e9c81f0 DRTVWR-229 +f4481df42f9a4a92bf475a80f0c51d1a4bbdfd59 DRTVWR-246 +39c5204b6e800983a41ccac8ad6dc993120197c6 DRTVWR-247 +7c7d57d393e8ae7b61623279de06eb4a62ccae6a DRTVWR-249 +f72b50ef168c159d6e79e97aa2bcafaf8577ab99 DRTVWR-230 +b418be80903520c492e1173f3afbc4021cad5d07 DRTVWR-255 +9aa1aa9f1fe13c194695a0b8f0af298296241dc2 DRTVWR-260 +84fbaf2d4141bd161731430e760949dc787ca206 DRTVWR-244 +083d2d36b5bb1c54fc3dd7caac0e7ac381a9cef0 3.4.4-beta1 +b634dec987c16e8c9c938e11e52591d9ead8fa9b DRTVWR-270 +cd39255bd23330fd30c04105f2811e941d8524fe 3.4.4-beta2 +2c4011bbc2b15b82198fd8b51f3a9fe765a08c4d DRTVWR-271 +2f8a3ef687bc55828abcb17ac1ad7cde70536d7e 3.4.4-beta3 +35cfd4cf5b895fa776592f2e630e330be7f0604e DRTVWR-273 +c374035d459af3c03dea2dd90880dfc25de64706 DRTVWR-275 +05d9f1dd7a954069af2a33abedb7713fa36a04cb 3.4.4-beta4 +e1bb1ae7d8b12faeb37933a737c199cc9b9f89cc 3.4.4-release +391a8c74cec7275c5d26c85ad108d4782a3e3dd9 DRTVWR-268 +a36f1f354b02aa6e448ca13685de167d0a0a3d03 DRTVWR-272 +37dba00ad820de3a808d4039396b162a9c275b3e DRTVWR-269 +7c6dfdc1b7a2ce0d8e3a8f3ce3058547ea065c0f DRTVWR-250 +b9ff9730daa53a541925300cbd02bb14575a5705 DRTVWR-277 +af6b711a97073431953b55ee808aaa09900c27e5 DRTVWR-276 +8302fefde6c8f4a64bfc7f04929f8bc85f5c6c7b DRTVWR-279 +c296133849d1f103c0e2abc41e6599daed00b67b DRTVWR-280 +40a2265058abc9fde4914c10185f916435818621 3.4.5-beta1 +5df4802bec93c8d0a509946d826bb4c50c5442ec DRTVWR-281 +7c1c33ba4cfd2d15ca51cc1ac440eca551331a4a DRTVWR-283 +6b9c7dbebef793230d64e1b452577c8b142d4143 3.4.5-beta2 +ccf991e02dc2f63fb646324230d54832683f4a9b DRTVWR-286 +2d849850558a5a0324b398d1c102d30bcbdfb88f DRTVWR-287 +e06898df8644fe567bee94f817d03abc1c380993 3.4.5-beta3 +a676b4d6c037b39fe5b8e42cf8839a9303936089 DRTVWR-289 +28fa8b944a0c1869636ab00cc400f5aa71f6fa3c DRTVWR-290 +7f09bbc28c297f14b67961be7b6575445fa160e8 DRTVWR-291 +b23419a2748483c98f3b84b630468a21c88feba5 DRTVWR-292 +1567de5700c273b583dac41b64275c223287306e 3.4.5-beta4 +1cce8447f8f574673e3f47d6fe584262e6964fe2 DRTVWR-296 +0a5d409161ef2a89b28c9a741051dd2dedc707d6 DRTVWR-297 +852b69ef0b5fe6b13b69cc2217282cc64de6afab 3.4.5-beta5 +a49c715243a36a8a380504d14cb7416b3039c956 3.4.5-release +37947e4f771f001b551581bf7cd0051c3153beed DRTVWR-282 +6482cceb91cda68b799f3e6cdc66d33bf123547a DRTVWR-284 +092a9effbedd1a0276fa5ced520992ce00f96fbf CHUI-PV-0 +279ef1dfc9b749a6cc499cf190fec0c090b6d682 DRTVWR-288 +9b19edaf1d8ddf435f60fbbb444dd25db8f63953 3.5.0-beta1 +c6b3561c7d7ad365eeba669db54eb57b5149ce75 3.5.0-beta2 +6d91ffd77bf2a20f18a2175eb7579da880ae12ac DRTVWR-302 +f6ca5bb75bca975ff0bc77e71e615f6478c4559c 3.5.0-beta3 +910b5fad950e343b58229f5a0aefa7729b9308b3 DRTVWR-303 +53cffdde0b3cc367ba9bb6abd5c83ae14df5e882 3.5.0-beta4 +4d5f6234dc59a0fb6ead5e02c7d343a0610e0488 DRTVWR-304 +dd058a6093c493120d67c8e02c812c0f7b2d3db0 3.5.0-beta5 diff --git a/BuildParams b/BuildParams index ebfc640023..e00fc384d4 100644 --- a/BuildParams +++ b/BuildParams @@ -3,6 +3,7 @@ # Please refer to: # https://wiki.secondlife.com/wiki/Automated_Build_System + # Global setting for now... Darwin.symbolfiles = "newview/Release/secondlife-symbols-darwin.tar.bz2" CYGWIN.symbolfiles = "newview/Release/secondlife-symbols-windows.tar.bz2" @@ -58,6 +59,7 @@ viewer-release.build_debug_release_separately = true viewer-release.build_viewer_update_version_manager = true viewer-release.codeticket_add_context = false + # ======================================== # mesh-development # ======================================== @@ -115,17 +117,6 @@ viewer-mesh.viewer_grid = aditi viewer-mesh.email = shining@lists.lindenlab.com # ======================================== -# viewer-adult-check -# ======================================== - -viewer-adult-check.viewer_channel = "Project Viewer - AdultCheck" -viewer-adult-check.login_channel = "Project Viewer - AdultCheck" -viewer-adult-check.viewer_grid = agni -viewer-adult-check.build_debug_release_separately = true -viewer-adult-check.build_CYGWIN_Debug = false -viewer-adult-check.build_viewer_update_version_manager = false - -# ======================================== # viewer-pathfinding # ======================================== @@ -136,6 +127,18 @@ viewer-pathfinding.build_debug_release_separately = true viewer-pathfinding.build_CYGWIN_Debug = false viewer-pathfinding.build_viewer_update_version_manager = false +# ======================================== +# viewer-chui +# +# ======================================== + +viewer-chui.viewer_channel = "Project Viewer - CHUI" +viewer-chui.login_channel = "Project Viewer - CHUI" +viewer-chui.viewer_grid = agni +viewer-chui.build_debug_release_separately = true +viewer-chui.build_CYGWIN_Debug = false +viewer-chui.build_viewer_update_version_manager = false + # ================================================================= # asset delivery 2010 projects # ================================================================= @@ -197,4 +200,5 @@ runway.build_debug_release_separately = true runway.build_CYGWIN_Debug = false runway.build_viewer_update_version_manager = false + # eof diff --git a/autobuild.xml b/autobuild.xml index b7a73f2c75..11c2da52dc 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -186,9 +186,9 @@ <key>archive</key> <map> <key>hash</key> - <string>d98078791ce345bf6168ce9ba53ca2d7</string> + <string>ac37d0038c91b0672fa31a02731f0eac</string> <key>url</key> - <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/222752/arch/Darwin/installer/boost-1.45.0-darwin-20110304.tar.bz2</string> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/268347/arch/Darwin/installer/boost-1.52.0-darwin-20121218.tar.bz2</string> </map> <key>name</key> <string>darwin</string> @@ -198,9 +198,9 @@ <key>archive</key> <map> <key>hash</key> - <string>a34e7fffdb94a6a4d8a2966b1f216da3</string> + <string>146ed8a8c2ef8ab3f0a6c4f214fc5c22</string> <key>url</key> - <string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.45.0-linux-20110310.tar.bz2</string> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/268347/arch/Linux/installer/boost-1.52.0-linux-20121218.tar.bz2</string> </map> <key>name</key> <string>linux</string> @@ -210,9 +210,9 @@ <key>archive</key> <map> <key>hash</key> - <string>98be22c8833aa2bca184b9fa09fbb82b</string> + <string>3ea60f17d986b7e8a3351298734bdca4</string> <key>url</key> - <string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.45.0-windows-20110124.tar.bz2</string> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/268347/arch/CYGWIN/installer/boost-1.52.0-windows-20121218.tar.bz2</string> </map> <key>name</key> <string>windows</string> @@ -918,9 +918,9 @@ <key>archive</key> <map> <key>hash</key> - <string>efaf5cb3e861d44518eb03f4c406f03c</string> + <string>e6feee3b452c2f70ce8558e30d6bc10a</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/falcon_3p-havok-source/rev/261536/arch/Darwin/installer/havok_source-2012.1-darwin-20120710.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/lindenlab_3p-havok-source/rev/268409/arch/Darwin/installer/havok_source-2012.1-darwin-20121219.tar.bz2</string> </map> <key>name</key> <string>darwin</string> @@ -930,9 +930,9 @@ <key>archive</key> <map> <key>hash</key> - <string>50037fff3fd3356a073cdae88348c9ab</string> + <string>0c0d2058ba48446e274d6595d1d8063e</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/falcon_3p-havok-source/rev/261536/arch/Linux/installer/havok_source-2012.1-linux-20120711.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/lindenlab_3p-havok-source/rev/268409/arch/Linux/installer/havok_source-2012.1-linux-20121219.tar.bz2</string> </map> <key>name</key> <string>linux</string> @@ -942,9 +942,9 @@ <key>archive</key> <map> <key>hash</key> - <string>cd6638f5a03469654615730c16889a60</string> + <string>88391b6e08d473506d406ca6f3e88cfb</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/falcon_3p-havok-source/rev/261536/arch/CYGWIN/installer/havok_source-2012.1-windows-20120710.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/lindenlab_3p-havok-source/rev/268409/arch/CYGWIN/installer/havok_source-2012.1-windows-20121219.tar.bz2</string> </map> <key>name</key> <string>windows</string> @@ -1062,9 +1062,9 @@ <key>archive</key> <map> <key>hash</key> - <string>d91e1f483209cd3eba04135c6a59e829</string> + <string>a5b2dff0d97b643227a58473e5c57906</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-kdu-private/rev/221672/arch/Darwin/installer/kdu-6.4.1-darwin-20110218.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-kdu-private/rev/256978/arch/Darwin/installer/kdu-7.0.0-darwin-20120515.tar.bz2</string> </map> <key>name</key> <string>darwin</string> @@ -1086,9 +1086,9 @@ <key>archive</key> <map> <key>hash</key> - <string>6cd9f36465ef73a3df34bf2b3bba2ced</string> + <string>6d80d35524e1c0c32d3385014d02d48c</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-kdu-private/rev/221672/arch/CYGWIN/installer/kdu-6.4.1-windows-20110218.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-kdu-private/rev/256978/arch/CYGWIN/installer/kdu-7.0.0-windows-20120515.tar.bz2</string> </map> <key>name</key> <string>windows</string> @@ -1463,6 +1463,30 @@ </map> </map> </map> + <key>nvapi</key> + <map> + <key>license</key> + <string>NVAPI</string> + <key>license_file</key> + <string>LICENSES/NVAPI_SDK_License_Agreement.pdf</string> + <key>name</key> + <string>nvapi</string> + <key>platforms</key> + <map> + <key>windows</key> + <map> + <key>archive</key> + <map> + <key>hash</key> + <string>baf519d36dffe4e4a59471450e391d01</string> + <key>url</key> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-nvapi/rev/267102/arch/CYGWIN/installer/nvapi-304-windows-20121116.tar.bz2</string> + </map> + <key>name</key> + <string>windows</string> + </map> + </map> + </map> <key>ogg-vorbis</key> <map> <key>license</key> @@ -1770,9 +1794,9 @@ <key>archive</key> <map> <key>hash</key> - <string>dde928cb24d22a267004a8c17669ba65</string> + <string>8aedfdcf670348c18a9991ae1b384a61</string> <key>url</key> - <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-google-perftools/rev/226426/arch/Linux/installer/google_perftools-1.7-linux-20110412.tar.bz2</string> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-google-perftools/rev/262672/arch/Linux/installer/gperftools-2.0-linux-20120727.tar.bz2</string> </map> <key>name</key> <string>linux</string> @@ -1782,9 +1806,9 @@ <key>archive</key> <map> <key>hash</key> - <string>8308f7bd68bb7083655753b7abe7225f</string> + <string>f62841804acb91e1309603a84f3f0ce8</string> <key>url</key> - <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-google-perftools/rev/226287/arch/CYGWIN/installer/google_perftools-1.7-windows-20110411.tar.bz2</string> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-google-perftools/rev/262672/arch/CYGWIN/installer/gperftools-2.0-windows-20120727.tar.bz2</string> </map> <key>name</key> <string>windows</string> @@ -2183,6 +2207,8 @@ <array> <string>-configuration Release</string> <string>-project SecondLife.xcodeproj</string> + <string>-DENABLE_SIGNING:BOOL=YES</string> + <string>-DSIGNING_IDENTITY:STRING="Developer ID Application: Linden Research, Inc."</string> </array> </map> <key>configure</key> @@ -2210,6 +2236,8 @@ <array> <string>-configuration Release</string> <string>-project SecondLife.xcodeproj</string> + <string>-DENABLE_SIGNING:BOOL=YES</string> + <string>-DSIGNING_IDENTITY:STRING="Developer ID Application: Linden Research, Inc."</string> </array> </map> <key>configure</key> @@ -2459,6 +2487,18 @@ </map> <key>configure</key> <map> + <key>arguments</key> + <array> + <string>..\indra</string> + <string>&&</string> + <string>..\indra\tools\vstool\VSTool.exe</string> + <string>--solution</string> + <string>SecondLife.sln</string> + <string>--config</string> + <string>Debug</string> + <string>--startup</string> + <string>secondlife-bin</string> + </array> <key>options</key> <array> <string>-G</string> @@ -2535,6 +2575,18 @@ </map> <key>configure</key> <map> + <key>arguments</key> + <array> + <string>..\indra</string> + <string>&&</string> + <string>..\indra\tools\vstool\VSTool.exe</string> + <string>--solution</string> + <string>SecondLife.sln</string> + <string>--config</string> + <string>RelWithDebInfo</string> + <string>--startup</string> + <string>secondlife-bin</string> + </array> <key>options</key> <array> <string>-G</string> @@ -2611,6 +2663,18 @@ </map> <key>configure</key> <map> + <key>arguments</key> + <array> + <string>..\indra</string> + <string>&&</string> + <string>..\indra\tools\vstool\VSTool.exe</string> + <string>--solution</string> + <string>SecondLife.sln</string> + <string>--config</string> + <string>Release</string> + <string>--startup</string> + <string>secondlife-bin</string> + </array> <key>options</key> <array> <string>-G</string> diff --git a/doc/contributions.txt b/doc/contributions.txt index 36911a9f39..770b04e805 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -174,6 +174,7 @@ Ansariel Hiller VWR-26150 STORM-1685 STORM-1713 + STORM-1899 Aralara Rajal Ardy Lay STORM-859 @@ -310,6 +311,7 @@ Cron Stardust VWR-10579 VWR-25120 STORM-1075 + STORM-1919 Cypren Christenson STORM-417 Dante Tucker @@ -320,6 +322,7 @@ Dale Glass VWR-1358 VWR-2041 Darien Caldwell + SH-3055 Dartagan Shepherd Debs Regent Decro Schmooz @@ -400,6 +403,7 @@ Gaberoonie Zanzibar Ganymedes Costagravas Geenz Spad STORM-1823 + STORM-1900 Gene Frostbite GeneJ Composer Geneko Nemeth @@ -494,6 +498,8 @@ Ima Mechanique STORM-959 STORM-1175 STORM-1708 + STORM-1855 + VWR-20553 Imnotgoing Sideways Inma Rau Innula Zenovka @@ -636,14 +642,19 @@ Jonathan Yap STORM-1809 STORM-1793 STORM-1810 + STORM-1877 + STORM-1892 + STORM-1894 STORM-1860 STORM-1852 STORM-1870 STORM-1872 STORM-1858 STORM-1862 + STORM-1918 Kadah Coba STORM-1060 + STORM-1843 Jondan Lundquist Josef Munster Josette Windlow @@ -654,6 +665,8 @@ Kage Pixel VWR-11 Kagehi Kohn Kaimen Takahe +Katharine Berry + STORM-1900 Keklily Longfall Ken Lavender Ken March @@ -685,6 +698,7 @@ Kunnis Basiat VWR-82 VWR-102 Lance Corrimal + STORM-1910 VWR-25269 Latif Khalifa VWR-5370 @@ -737,10 +751,14 @@ Marc Claridge Marc2 Sands Marianne McCann Marine Kelley + CHUIBUG-134 STORM-281 + STORM-1910 MartinRJ Fayray + STORM-1844 STORM-1845 STORM-1911 + STORM-1934 Matthew Anthony Matthew Dowd VWR-1344 @@ -884,6 +902,11 @@ Nicholaz Beresford VWR-2682 VWR-2684 Nick Rhodes +NickyD + MAINT-873 +Nicky Dasmijn + VWR-29228 + MAINT-873 Nicky Perian OPEN-1 STORM-1087 @@ -1025,6 +1048,7 @@ Satanello Miami Satomi Ahn STORM-501 STORM-229 + VWR-20553 VWR-24502 Scrim Pinion Scrippy Scofield @@ -1051,9 +1075,12 @@ Shawn Kaufmat SNOW-240 Sheet Spotter Shnurui Troughton +Shyotl Kuhr + MAINT-1138 Siana Gearz STORM-960 STORM-1088 + MAINT-1138 sicarius Thorne Sicarius Toxx SignpostMarv Martin @@ -1109,10 +1136,14 @@ Sudane Erato Synystyr Texan Takeda Terrawyng TankMaster Finesmith + OPEN-140 + OPEN-142 STORM-1100 - STORM-1602 STORM-1258 + STORM-1602 + STORM-1868 VWR-26622 + VWR-29224 Talamasca Tali Rosca Tayra Dagostino @@ -1229,6 +1260,10 @@ Watty Berkson Westley Schridde Westley Streeter Whimsy Winx +Whirly Fizzle + STORM-1895 + MAINT-873 + STORM-1930 Whoops Babii VWR-631 VWR-1640 @@ -1257,6 +1292,8 @@ Whoops Babii Winter Ventura Wilton Lundquist VWR-7682 +Wolf Loonie + STORM-1868 WolfPup Lowenhar OPEN-1 OPEN-37 diff --git a/etc/message.xml b/etc/message.xml index 7b133ab205..6d8160abb5 100644 --- a/etc/message.xml +++ b/etc/message.xml @@ -385,14 +385,6 @@ <key>trusted-sender</key> <boolean>true</boolean> </map> - - <key>ParcelMediaURLFilter</key> - <map> - <key>flavor</key> - <string>llsd</string> - <key>trusted-sender</key> - <boolean>false</boolean> - </map> <key>ParcelNavigateMedia</key> <map> diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 1cebb53a07..001bb4b935 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -43,6 +43,7 @@ add_subdirectory(cmake) add_subdirectory(${LIBS_OPEN_PREFIX}llaudio) add_subdirectory(${LIBS_OPEN_PREFIX}llcharacter) add_subdirectory(${LIBS_OPEN_PREFIX}llcommon) +add_subdirectory(${LIBS_OPEN_PREFIX}llcorehttp) add_subdirectory(${LIBS_OPEN_PREFIX}llimage) add_subdirectory(${LIBS_OPEN_PREFIX}llkdu) add_subdirectory(${LIBS_OPEN_PREFIX}llimagej2coj) @@ -81,8 +82,7 @@ if (VIEWER) if (LINUX) add_subdirectory(${VIEWER_PREFIX}linux_crash_logger) - add_subdirectory(${VIEWER_PREFIX}linux_updater) - add_dependencies(viewer linux-crash-logger-strip-target linux-updater) + add_dependencies(viewer linux-crash-logger-strip-target) elseif (DARWIN) add_subdirectory(${VIEWER_PREFIX}mac_crash_logger) add_subdirectory(${VIEWER_PREFIX}mac_updater) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 98eeed09b3..452fd5f356 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -51,6 +51,7 @@ if (WINDOWS) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0" CACHE STRING "C++ compiler release options" FORCE) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") set(CMAKE_CXX_STANDARD_LIBRARIES "") set(CMAKE_C_STANDARD_LIBRARIES "") @@ -69,6 +70,7 @@ if (WINDOWS) /Oy- /Zc:wchar_t- /arch:SSE2 + /fp:fast ) # Are we using the crummy Visual Studio KDU build workaround? @@ -198,13 +200,17 @@ if (DARWIN) add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE) set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}") - set(DARWIN_extra_cstar_flags "-mlong-branch") + set(DARWIN_extra_cstar_flags "-mlong-branch -g") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}") # NOTE: it's critical that the optimization flag is put in front. # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}") + if (XCODE_VERSION GREATER 4.2) + set(ENABLE_SIGNING TRUE) + set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.") + endif (XCODE_VERSION GREATER 4.2) endif (DARWIN) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 2135f0584c..1acb2bbbfd 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -12,12 +12,13 @@ if (STANDALONE) set(BOOST_SIGNALS_LIBRARY boost_signals-mt) set(BOOST_SYSTEM_LIBRARY boost_system-mt) set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt) + set(BOOST_THREAD_LIBRARY boost_thread-mt) else (STANDALONE) use_prebuilt_binary(boost) set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) + set(BOOST_VERSION "1.52") if (WINDOWS) - set(BOOST_VERSION 1_45) if(MSVC80) set(BOOST_PROGRAM_OPTIONS_LIBRARY optimized libboost_program_options-vc80-mt-${BOOST_VERSION} @@ -37,22 +38,55 @@ else (STANDALONE) else(MSVC80) # MSVC 10.0 config set(BOOST_PROGRAM_OPTIONS_LIBRARY - optimized libboost_program_options-vc100-mt-${BOOST_VERSION} - debug libboost_program_options-vc100-mt-gd-${BOOST_VERSION}) + optimized libboost_program_options-mt + debug libboost_program_options-mt-gd) set(BOOST_REGEX_LIBRARY - optimized libboost_regex-vc100-mt-${BOOST_VERSION} - debug libboost_regex-vc100-mt-gd-${BOOST_VERSION}) + optimized libboost_regex-mt + debug libboost_regex-mt-gd) set(BOOST_SYSTEM_LIBRARY - optimized libboost_system-vc100-mt-${BOOST_VERSION} - debug libboost_system-vc100-mt-gd-${BOOST_VERSION}) + optimized libboost_system-mt + debug libboost_system-mt-gd) set(BOOST_FILESYSTEM_LIBRARY - optimized libboost_filesystem-vc100-mt-${BOOST_VERSION} - debug libboost_filesystem-vc100-mt-gd-${BOOST_VERSION}) + optimized libboost_filesystem-mt + debug libboost_filesystem-mt-gd) + set(BOOST_THREAD_LIBRARY + optimized libboost_thread-mt + debug libboost_thread-mt-gd) endif (MSVC80) - elseif (DARWIN OR LINUX) - set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options) - set(BOOST_REGEX_LIBRARY boost_regex) - set(BOOST_SYSTEM_LIBRARY boost_system) - set(BOOST_FILESYSTEM_LIBRARY boost_filesystem) + elseif (LINUX) + set(BOOST_PROGRAM_OPTIONS_LIBRARY + optimized boost_program_options-mt + debug boost_program_options-mt-d) + set(BOOST_REGEX_LIBRARY + optimized boost_regex-mt + debug boost_regex-mt-d) + set(BOOST_SYSTEM_LIBRARY + optimized boost_system-mt + debug boost_system-mt-d) + set(BOOST_FILESYSTEM_LIBRARY + optimized boost_filesystem-mt + debug boost_filesystem-mt-d) + set(BOOST_THREAD_LIBRARY + optimized boost_thread-mt + debug boost_thread-mt-d) + elseif (DARWIN) + set(BOOST_PROGRAM_OPTIONS_LIBRARY + optimized boost_program_options-mt + debug boost_program_options-mt-d) + set(BOOST_PROGRAM_OPTIONS_LIBRARY + optimized boost_program_options-mt + debug boost_program_options-mt-d) + set(BOOST_REGEX_LIBRARY + optimized boost_regex-mt + debug boost_regex-mt-d) + set(BOOST_SYSTEM_LIBRARY + optimized boost_system-mt + debug boost_system-mt-d) + set(BOOST_FILESYSTEM_LIBRARY + optimized boost_filesystem-mt + debug boost_filesystem-mt-d) + set(BOOST_THREAD_LIBRARY + optimized boost_thread-mt + debug boost_thread-mt-d) endif (WINDOWS) endif (STANDALONE) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 224e0a8b51..c32e357da3 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -57,10 +57,10 @@ if(WINDOWS) libhunspell.dll ) - if(USE_GOOGLE_PERFTOOLS) + if(USE_TCMALLOC) set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll) set(release_files ${release_files} libtcmalloc_minimal.dll) - endif(USE_GOOGLE_PERFTOOLS) + endif(USE_TCMALLOC) if (FMOD) set(debug_files ${debug_files} fmod.dll) @@ -254,6 +254,12 @@ elseif(LINUX) libapr-1.so.0 libaprutil-1.so.0 libatk-1.0.so + libboost_program_options-mt.so.${BOOST_VERSION}.0 + libboost_regex-mt.so.${BOOST_VERSION}.0 + libboost_thread-mt.so.${BOOST_VERSION}.0 + libboost_filesystem-mt.so.${BOOST_VERSION}.0 + libboost_signals-mt.so.${BOOST_VERSION}.0 + libboost_system-mt.so.${BOOST_VERSION}.0 libbreakpad_client.so.0 libcollada14dom.so libcrypto.so.1.0.0 @@ -272,13 +278,16 @@ elseif(LINUX) libopenal.so libopenjpeg.so libssl.so - libtcmalloc_minimal.so libuuid.so.16 libuuid.so.16.0.22 libssl.so.1.0.0 libfontconfig.so.1.4.4 ) + if (USE_TCMALLOC) + set(release_files ${release_files} "libtcmalloc_minimal.so") + endif (USE_TCMALLOC) + if (FMOD) set(release_files ${release_files} "libfmod-3.75.so") endif (FMOD) diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index d9f91193be..73b3642ae6 100644 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -1,20 +1,34 @@ # -*- cmake -*- include(Prebuilt) +# If you want to enable or disable TCMALLOC in viewer builds, this is the place. +# set ON or OFF as desired. +set (USE_TCMALLOC OFF) + if (STANDALONE) include(FindGooglePerfTools) else (STANDALONE) if (WINDOWS) - use_prebuilt_binary(tcmalloc) - set(TCMALLOC_LIBRARIES - debug libtcmalloc_minimal-debug - optimized libtcmalloc_minimal) + if (USE_TCMALLOC) + use_prebuilt_binary(tcmalloc) + set(TCMALLOC_LIBRARIES + debug libtcmalloc_minimal-debug + optimized libtcmalloc_minimal) + set(TCMALLOC_LINK_FLAGS "/INCLUDE:__tcmalloc") + else (USE_TCMALLOC) + set(TCMALLOC_LIBRARIES) + set(TCMALLOC_LINK_FLAGS) + endif (USE_TCMALLOC) set(GOOGLE_PERFTOOLS_FOUND "YES") endif (WINDOWS) if (LINUX) - use_prebuilt_binary(tcmalloc) - set(TCMALLOC_LIBRARIES - tcmalloc) + if (USE_TCMALLOC) + use_prebuilt_binary(tcmalloc) + set(TCMALLOC_LIBRARIES + tcmalloc) + else (USE_TCMALLOC) + set(TCMALLOC_LIBRARIES) + endif (USE_TCMALLOC) set(PROFILER_LIBRARIES profiler) set(GOOGLE_PERFTOOLS_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) @@ -29,13 +43,19 @@ if (GOOGLE_PERFTOOLS_FOUND) endif (GOOGLE_PERFTOOLS_FOUND) if (WINDOWS) - set(USE_GOOGLE_PERFTOOLS ON) + set(USE_GOOGLE_PERFTOOLS ON) endif (WINDOWS) if (USE_GOOGLE_PERFTOOLS) - set(TCMALLOC_FLAG -ULL_USE_TCMALLOC=1) + if (USE_TCMALLOC) + set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1) + else (USE_TCMALLOC) + set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) + endif (USE_TCMALLOC) +endif (USE_GOOGLE_PERFTOOLS) + +if (USE_GOOGLE_PERFTOOLS) include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR}) set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES} ${PROFILER_LIBRARIES}) else (USE_GOOGLE_PERFTOOLS) - set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) endif (USE_GOOGLE_PERFTOOLS) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 03ce46781c..9bb3077797 100755 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -201,19 +201,22 @@ FUNCTION(LL_ADD_INTEGRATION_TEST endif(TEST_DEBUG) ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files}) SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}") - if (WINDOWS) - set_target_properties(INTEGRATION_TEST_${testname} - PROPERTIES - LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:__tcmalloc" - LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO" - LINK_FLAGS_RELEASE "" - ) - endif(WINDOWS) if(STANDALONE) SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}") endif(STANDALONE) + # The following was copied to llcorehttp/CMakeLists.txt's texture_load target. + # Any changes made here should be replicated there. + if (WINDOWS) + SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} + PROPERTIES + LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS" + LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO" + LINK_FLAGS_RELEASE "" + ) + endif (WINDOWS) + # Add link deps to the executable if(TEST_DEBUG) message(STATUS "TARGET_LINK_LIBRARIES(INTEGRATION_TEST_${testname} ${libraries})") diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index d4694ad37a..c254bf6f05 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -22,9 +22,9 @@ else (LINUX) set(LLCOMMON_LIBRARIES llcommon) endif (LINUX) -add_definitions(${TCMALLOC_FLAG}) +# add_definitions(${TCMALLOC_FLAG}) -set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.") +set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a static library.") if(LLCOMMON_LINK_SHARED) add_definitions(-DLL_COMMON_LINK_SHARED=1) endif(LLCOMMON_LINK_SHARED) diff --git a/indra/cmake/LLCoreHttp.cmake b/indra/cmake/LLCoreHttp.cmake new file mode 100644 index 0000000000..61e4b23d98 --- /dev/null +++ b/indra/cmake/LLCoreHttp.cmake @@ -0,0 +1,16 @@ +# -*- cmake -*- + +include(CARes) +include(CURL) +include(OpenSSL) +include(Boost) + +set(LLCOREHTTP_INCLUDE_DIRS + ${LIBS_OPEN_DIR}/llcorehttp + ${CARES_INCLUDE_DIRS} + ${CURL_INCLUDE_DIRS} + ${OPENSSL_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ) + +set(LLCOREHTTP_LIBRARIES llcorehttp) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index f15a2c2649..ab39cbb6be 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -15,10 +15,10 @@ if (WINDOWS) optimized llprimitive debug libcollada14dom22-d optimized libcollada14dom22 - debug libboost_filesystem-vc100-mt-gd-1_45 - optimized libboost_filesystem-vc100-mt-1_45 - debug libboost_system-vc100-mt-gd-1_45 - optimized libboost_system-vc100-mt-1_45 + debug libboost_filesystem-mt-gd + optimized libboost_filesystem-mt + debug libboost_system-mt-gd + optimized libboost_system-mt ) else (WINDOWS) set(LLPRIMITIVE_LIBRARIES diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake new file mode 100644 index 0000000000..105f442a30 --- /dev/null +++ b/indra/cmake/NVAPI.cmake @@ -0,0 +1,16 @@ +# -*- cmake -*- +include(Prebuilt) + +set(NVAPI ON CACHE BOOL "Use NVAPI.") + +if (NVAPI) + if (WINDOWS) + use_prebuilt_binary(nvapi) + set(NVAPI_LIBRARY nvapi) + else (WINDOWS) + set(NVAPI_LIBRARY "") + endif (WINDOWS) +else (NVAPI) + set(NVAPI_LIBRARY "") +endif (NVAPI) + diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 56ced20abf..a64ce2d4ba 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -99,10 +99,20 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(DARWIN 1) + execute_process( + COMMAND sh -c "xcodebuild -version | grep Xcode | cut -d ' ' -f2 | cut -d'.' -f1-2" + OUTPUT_VARIABLE XCODE_VERSION ) + # To support a different SDK update these Xcode settings: - set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5) + if (XCODE_VERSION GREATER 4.2) + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6) + else (XCODE_VERSION GREATER 4.2) + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5) + endif (XCODE_VERSION GREATER 4.2) + set(CMAKE_OSX_SYSROOT macosx10.6) set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42") + set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym) # NOTE: To attempt an i386/PPC Universal build, add this on the configure line: @@ -131,9 +141,14 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(GRID agni CACHE STRING "Target Grid") set(VIEWER ON CACHE BOOL "Build Second Life viewer.") -set(VIEWER_CHANNEL "LindenDeveloper" CACHE STRING "Viewer Channel Name") +set(VIEWER_CHANNEL "Second Life Developer" CACHE STRING "Viewer Channel Name") set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing") +if (XCODE_VERSION GREATER 4.2) + set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer") + set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.") +endif (XCODE_VERSION GREATER 4.2) + set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside") set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.") set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.") diff --git a/indra/edit-me-to-trigger-new-build.txt b/indra/edit-me-to-trigger-new-build.txt index e69de29bb2..0f6a8b8a1d 100644 --- a/indra/edit-me-to-trigger-new-build.txt +++ b/indra/edit-me-to-trigger-new-build.txt @@ -0,0 +1 @@ +Wed Nov 7 00:25:19 UTC 2012 diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 36c5b67826..034c816742 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -240,7 +240,7 @@ void store_input_file(std::list<std::string> &input_filenames, const std::string LLDirIterator iter(dir, name); while (iter.next(next_name)) { - std::string file_name = dir + gDirUtilp->getDirDelimiter() + next_name; + std::string file_name = gDirUtilp->add(dir, next_name); input_filenames.push_back(file_name); } } diff --git a/indra/integration_tests/llui_libtest/llui_libtest.cpp b/indra/integration_tests/llui_libtest/llui_libtest.cpp index 217e26c3ca..38aa1bbeb2 100644 --- a/indra/integration_tests/llui_libtest/llui_libtest.cpp +++ b/indra/integration_tests/llui_libtest/llui_libtest.cpp @@ -107,12 +107,6 @@ public: }; TestImageProvider gTestImageProvider; -static std::string get_xui_dir() -{ - std::string delim = gDirUtilp->getDirDelimiter(); - return gDirUtilp->getSkinBaseDir() + delim + "default" + delim + "xui" + delim; -} - void init_llui() { // Font lookup needs directory support @@ -122,13 +116,12 @@ void init_llui() const char* newview_path = "../../../newview"; #endif gDirUtilp->initAppDirs("SecondLife", newview_path); - gDirUtilp->setSkinFolder("default"); + gDirUtilp->setSkinFolder("default", "en"); // colors are no longer stored in a LLControlGroup file LLUIColorTable::instance().loadFromSettings(); - std::string config_filename = gDirUtilp->getExpandedFilename( - LL_PATH_APP_SETTINGS, "settings.xml"); + std::string config_filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings.xml"); gSavedSettings.loadFromFile(config_filename); // See LLAppViewer::init() @@ -143,9 +136,7 @@ void init_llui() const bool no_register_widgets = false; LLWidgetReg::initClass( no_register_widgets ); - - // Unclear if this is needed - LLUI::setupPaths(); + // Otherwise we get translation warnings when setting up floaters // (tooltips for buttons) std::set<std::string> default_args; @@ -157,7 +148,6 @@ void init_llui() // otherwise it crashes. LLFontGL::initClass(96.f, 1.f, 1.f, gDirUtilp->getAppRODataDir(), - LLUI::getXUIPaths(), false ); // don't create gl textures LLFloaterView::Params fvparams; @@ -169,6 +159,14 @@ void init_llui() gFloaterView = LLUICtrlFactory::create<LLFloaterView> (fvparams); } +/*==========================================================================*| +static std::string get_xui_dir() +{ + std::string delim = gDirUtilp->getDirDelimiter(); + return gDirUtilp->getSkinBaseDir() + delim + "default" + delim + "xui" + delim; +} + +// buildFromFile() no longer supports generate-output-LLXMLNode void export_test_floaters() { // Convert all test floaters to new XML format @@ -191,7 +189,7 @@ void export_test_floaters() floater->buildFromFile( filename, // FALSE, // don't open floater output_node); - std::string out_filename = xui_dir + filename; + std::string out_filename = gDirUtilp->add(xui_dir, filename); std::string::size_type extension_pos = out_filename.rfind(".xml"); out_filename.resize(extension_pos); out_filename += "_new.xml"; @@ -203,6 +201,7 @@ void export_test_floaters() fclose(floater_file); } } +|*==========================================================================*/ int main(int argc, char** argv) { @@ -211,7 +210,7 @@ int main(int argc, char** argv) init_llui(); - export_test_floaters(); +// export_test_floaters(); return 0; } diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index a4fb77357c..97cc31bba0 100644 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -167,7 +167,12 @@ ARGUMENTS=[ dict(name='version', description="""This specifies the version of Second Life that is being packaged up.""", - default=get_default_version) + default=get_default_version), + dict(name='signature', + description="""This specifies an identity to sign the viewer with, if any. + If no value is supplied, the default signature will be used, if any. Currently + only used on Mac OS X.""", + default=None) ] def usage(srctree=""): @@ -621,6 +626,23 @@ class LLManifest(object): d = src_re.sub(d_template, s.replace('\\', '/')) yield os.path.normpath(s), os.path.normpath(d) + def path2basename(self, path, file): + """ + It is a common idiom to write: + self.path(os.path.join(somedir, somefile), somefile) + + So instead you can write: + self.path2basename(somedir, somefile) + + Note that this is NOT the same as: + self.path(os.path.join(somedir, somefile)) + + which is the same as: + temppath = os.path.join(somedir, somefile) + self.path(temppath, temppath) + """ + return self.path(os.path.join(path, file), file) + def path(self, src, dst=None): sys.stdout.write("Processing %s => %s ... " % (src, dst)) sys.stdout.flush() @@ -666,6 +688,10 @@ class LLManifest(object): print "%d files" % count + # Let caller check whether we processed as many files as expected. In + # particular, let caller notice 0. + return count + def do(self, *actions): self.actions = actions self.construct() diff --git a/indra/linux_updater/CMakeLists.txt b/indra/linux_updater/CMakeLists.txt deleted file mode 100644 index 4377a6333c..0000000000 --- a/indra/linux_updater/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -# -*- cmake -*- - -project(linux_updater) - -include(00-Common) -include(CURL) -include(CARes) -include(OpenSSL) -include(UI) -include(LLCommon) -include(LLVFS) -include(LLXML) -include(LLUI) -include(Linking) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLVFS_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ${LLUI_INCLUDE_DIRS} - ${CURL_INCLUDE_DIRS} - ${CARES_INCLUDE_DIRS} - ${OPENSSL_INCLUDE_DIRS} - ${UI_INCLUDE_DIRS} - ) - -set(linux_updater_SOURCE_FILES linux_updater.cpp) - -set(linux_updater_HEADER_FILES CMakeLists.txt) - -set_source_files_properties(${linux_updater_HEADER_FILES} - PROPERTIES HEADER_FILES_ONLY TRUE) - -list(APPEND linux_updater_SOURCE_FILES ${linux_updater_HEADER_FILES}) - -add_executable(linux-updater ${linux_updater_SOURCE_FILES}) - -target_link_libraries(linux-updater - ${CURL_LIBRARIES} - ${CARES_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CRYPTO_LIBRARIES} - ${UI_LIBRARIES} - ${LLXML_LIBRARIES} - ${LLUI_LIBRARIES} - ${LLVFS_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ) - -add_custom_target(linux-updater-target ALL - DEPENDS linux-updater) diff --git a/indra/linux_updater/linux_updater.cpp b/indra/linux_updater/linux_updater.cpp deleted file mode 100644 index 277f0a5367..0000000000 --- a/indra/linux_updater/linux_updater.cpp +++ /dev/null @@ -1,926 +0,0 @@ -/** - * @file linux_updater.cpp - * @author Kyle Ambroff <ambroff@lindenlab.com>, Tofu Linden - * @brief Viewer update program for unix platforms that support GTK+ - * - * $LicenseInfo:firstyear=2008&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include <unistd.h> -#include <signal.h> -#include <errno.h> - -#include "linden_common.h" -#include "llerrorcontrol.h" -#include "llfile.h" -#include "lldir.h" -#include "lldiriterator.h" - -/*==========================================================================*| -// IQA-490: Use of LLTrans -- by this program at least -- appears to be buggy. -// With it, the 3.3.2 beta 1 linux-updater.bin crashes; without it seems stable. -#include "llxmlnode.h" -#include "lltrans.h" -|*==========================================================================*/ - -static class LLTrans -{ -public: - LLTrans(); - static std::string getString(const std::string& key); - -private: - std::string _getString(const std::string& key) const; - - typedef std::map<std::string, std::string> MessageMap; - MessageMap mMessages; -} sLLTransInstance; - -#include <curl/curl.h> -#include <map> -#include <boost/foreach.hpp> - -extern "C" { -#include <gtk/gtk.h> -} - -const guint UPDATE_PROGRESS_TIMEOUT = 100; -const guint UPDATE_PROGRESS_TEXT_TIMEOUT = 1000; -const guint ROTATE_IMAGE_TIMEOUT = 8000; - -typedef struct _updater_app_state { - std::string app_name; - std::string url; - std::string file; - std::string image_dir; - std::string dest_dir; - std::string strings_dirs; - std::string strings_file; - - LLDirIterator *image_dir_iter; - - GtkWidget *window; - GtkWidget *progress_bar; - GtkWidget *image; - - double progress_value; - bool activity_mode; - - guint image_rotation_timeout_id; - guint progress_update_timeout_id; - guint update_progress_text_timeout_id; - - bool failure; -} UpdaterAppState; - -// List of entries from strings.xml to always replace -static std::set<std::string> default_trans_args; -void init_default_trans_args() -{ - default_trans_args.insert("SECOND_LIFE"); // World - default_trans_args.insert("APP_NAME"); - default_trans_args.insert("SECOND_LIFE_GRID"); - default_trans_args.insert("SUPPORT_SITE"); -} - -bool translate_init(std::string comma_delim_path_list, - std::string base_xml_name) -{ - return true; -/*==========================================================================*| - init_default_trans_args(); - - // extract paths string vector from comma-delimited flat string - std::vector<std::string> paths; - LLStringUtil::getTokens(comma_delim_path_list, paths, ","); // split over ',' - - for(std::vector<std::string>::iterator it = paths.begin(), end_it = paths.end(); - it != end_it; - ++it) - { - (*it) = gDirUtilp->findSkinnedFilename(*it, base_xml_name); - } - - // suck the translation xml files into memory - LLXMLNodePtr root; - bool success = LLXMLNode::getLayeredXMLNode(root, paths); - if (!success) - { - // couldn't load string table XML - return false; - } - else - { - // get those strings out of the XML - LLTrans::parseStrings(root, default_trans_args); - return true; - } -|*==========================================================================*/ -} - - -void updater_app_ui_init(void); -void updater_app_quit(UpdaterAppState *app_state); -void parse_args_and_init(int argc, char **argv, UpdaterAppState *app_state); -std::string next_image_filename(std::string& image_path, LLDirIterator& iter); -void display_error(GtkWidget *parent, std::string title, std::string message); -BOOL install_package(std::string package_file, std::string destination); -BOOL spawn_viewer(UpdaterAppState *app_state); - -extern "C" { - void on_window_closed(GtkWidget *sender, GdkEvent *event, gpointer state); - gpointer worker_thread_cb(gpointer *data); - int download_progress_cb(gpointer data, double t, double d, double utotal, double ulnow); - gboolean rotate_image_cb(gpointer data); - gboolean progress_update_timeout(gpointer data); - gboolean update_progress_text_timeout(gpointer data); -} - -void updater_app_ui_init(UpdaterAppState *app_state) -{ - GtkWidget *vbox; - GtkWidget *summary_label; - GtkWidget *description_label; - GtkWidget *frame; - - llassert(app_state != NULL); - - // set up window and main container - std::string window_title = LLTrans::getString("UpdaterWindowTitle"); - app_state->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_window_set_title(GTK_WINDOW(app_state->window), - window_title.c_str()); - gtk_window_set_resizable(GTK_WINDOW(app_state->window), FALSE); - gtk_window_set_position(GTK_WINDOW(app_state->window), - GTK_WIN_POS_CENTER_ALWAYS); - - gtk_container_set_border_width(GTK_CONTAINER(app_state->window), 12); - g_signal_connect(G_OBJECT(app_state->window), "delete-event", - G_CALLBACK(on_window_closed), app_state); - - vbox = gtk_vbox_new(FALSE, 6); - gtk_container_add(GTK_CONTAINER(app_state->window), vbox); - - // set top label - std::ostringstream label_ostr; - label_ostr << "<big><b>" - << LLTrans::getString("UpdaterNowUpdating") - << "</b></big>"; - - summary_label = gtk_label_new(NULL); - gtk_label_set_use_markup(GTK_LABEL(summary_label), TRUE); - gtk_label_set_markup(GTK_LABEL(summary_label), - label_ostr.str().c_str()); - gtk_misc_set_alignment(GTK_MISC(summary_label), 0, 0.5); - gtk_box_pack_start(GTK_BOX(vbox), summary_label, FALSE, FALSE, 0); - - // create the description label - description_label = gtk_label_new(LLTrans::getString("UpdaterUpdatingDescriptive").c_str()); - gtk_label_set_line_wrap(GTK_LABEL(description_label), TRUE); - gtk_misc_set_alignment(GTK_MISC(description_label), 0, 0.5); - gtk_box_pack_start(GTK_BOX(vbox), description_label, FALSE, FALSE, 0); - - // If an image path has been set, load the background images - if (!app_state->image_dir.empty()) { - frame = gtk_frame_new(NULL); - gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); - gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); - - // load the first image - app_state->image = gtk_image_new_from_file - (next_image_filename(app_state->image_dir, *app_state->image_dir_iter).c_str()); - gtk_widget_set_size_request(app_state->image, 340, 310); - gtk_container_add(GTK_CONTAINER(frame), app_state->image); - - // rotate the images every 5 seconds - app_state->image_rotation_timeout_id = g_timeout_add - (ROTATE_IMAGE_TIMEOUT, rotate_image_cb, app_state); - } - - // set up progress bar, and update it roughly every 1/10 of a second - app_state->progress_bar = gtk_progress_bar_new(); - gtk_progress_bar_set_text(GTK_PROGRESS_BAR(app_state->progress_bar), - LLTrans::getString("UpdaterProgressBarTextWithEllipses").c_str()); - gtk_box_pack_start(GTK_BOX(vbox), - app_state->progress_bar, FALSE, TRUE, 0); - app_state->progress_update_timeout_id = g_timeout_add - (UPDATE_PROGRESS_TIMEOUT, progress_update_timeout, app_state); - app_state->update_progress_text_timeout_id = g_timeout_add - (UPDATE_PROGRESS_TEXT_TIMEOUT, update_progress_text_timeout, app_state); - - gtk_widget_show_all(app_state->window); -} - -gboolean rotate_image_cb(gpointer data) -{ - UpdaterAppState *app_state; - std::string filename; - - llassert(data != NULL); - app_state = (UpdaterAppState *) data; - - filename = next_image_filename(app_state->image_dir, *app_state->image_dir_iter); - - gdk_threads_enter(); - gtk_image_set_from_file(GTK_IMAGE(app_state->image), filename.c_str()); - gdk_threads_leave(); - - return TRUE; -} - -std::string next_image_filename(std::string& image_path, LLDirIterator& iter) -{ - std::string image_filename; - iter.next(image_filename); - return image_path + "/" + image_filename; -} - -void on_window_closed(GtkWidget *sender, GdkEvent* event, gpointer data) -{ - UpdaterAppState *app_state; - - llassert(data != NULL); - app_state = (UpdaterAppState *) data; - - updater_app_quit(app_state); -} - -void updater_app_quit(UpdaterAppState *app_state) -{ - if (app_state != NULL) - { - g_source_remove(app_state->progress_update_timeout_id); - - if (!app_state->image_dir.empty()) - { - g_source_remove(app_state->image_rotation_timeout_id); - } - } - - gtk_main_quit(); -} - -void display_error(GtkWidget *parent, std::string title, std::string message) -{ - GtkWidget *dialog; - - dialog = gtk_message_dialog_new(GTK_WINDOW(parent), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_OK, - "%s", message.c_str()); - gtk_window_set_title(GTK_WINDOW(dialog), title.c_str()); - gtk_dialog_run(GTK_DIALOG(dialog)); - gtk_widget_destroy(dialog); -} - -gpointer worker_thread_cb(gpointer data) -{ - UpdaterAppState *app_state; - CURL *curl; - CURLcode result; - FILE *package_file; - GError *error = NULL; - int fd; - - //g_return_val_if_fail (data != NULL, NULL); - app_state = (UpdaterAppState *) data; - - try { - - if(!app_state->url.empty()) - { - char* tmp_local_filename = NULL; - // create temporary file to store the package. - fd = g_file_open_tmp - ("secondlife-update-XXXXXX", &tmp_local_filename, &error); - if (error != NULL) - { - llerrs << "Unable to create temporary file: " - << error->message - << llendl; - - g_error_free(error); - throw 0; - } - - if(tmp_local_filename != NULL) - { - app_state->file = tmp_local_filename; - g_free(tmp_local_filename); - } - - package_file = fdopen(fd, "wb"); - if (package_file == NULL) - { - llerrs << "Failed to create temporary file: " - << app_state->file.c_str() - << llendl; - - gdk_threads_enter(); - display_error(app_state->window, - LLTrans::getString("UpdaterFailDownloadTitle"), - LLTrans::getString("UpdaterFailUpdateDescriptive")); - gdk_threads_leave(); - throw 0; - } - - // initialize curl and start downloading the package - llinfos << "Downloading package: " << app_state->url << llendl; - - curl = curl_easy_init(); - if (curl == NULL) - { - llerrs << "Failed to initialize libcurl" << llendl; - - gdk_threads_enter(); - display_error(app_state->window, - LLTrans::getString("UpdaterFailDownloadTitle"), - LLTrans::getString("UpdaterFailUpdateDescriptive")); - gdk_threads_leave(); - throw 0; - } - - curl_easy_setopt(curl, CURLOPT_URL, app_state->url.c_str()); - curl_easy_setopt(curl, CURLOPT_NOSIGNAL, TRUE); - curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, TRUE); - curl_easy_setopt(curl, CURLOPT_WRITEDATA, package_file); - curl_easy_setopt(curl, CURLOPT_NOPROGRESS, FALSE); - curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, - &download_progress_cb); - curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, app_state); - - result = curl_easy_perform(curl); - fclose(package_file); - curl_easy_cleanup(curl); - - if (result) - { - llerrs << "Failed to download update: " - << app_state->url - << llendl; - - gdk_threads_enter(); - display_error(app_state->window, - LLTrans::getString("UpdaterFailDownloadTitle"), - LLTrans::getString("UpdaterFailUpdateDescriptive")); - gdk_threads_leave(); - - throw 0; - } - } - - // now pulse the progres bar back and forth while the package is - // being unpacked - gdk_threads_enter(); - std::string installing_msg = LLTrans::getString("UpdaterNowInstalling"); - gtk_progress_bar_set_text( - GTK_PROGRESS_BAR(app_state->progress_bar), - installing_msg.c_str()); - app_state->activity_mode = TRUE; - gdk_threads_leave(); - - // *TODO: if the destination is not writable, terminate this - // thread and show file chooser? - if (!install_package(app_state->file.c_str(), app_state->dest_dir)) - { - llwarns << "Failed to install package to destination: " - << app_state->dest_dir - << llendl; - - gdk_threads_enter(); - display_error(app_state->window, - LLTrans::getString("UpdaterFailInstallTitle"), - LLTrans::getString("UpdaterFailUpdateDescriptive")); - //"Failed to update " + app_state->app_name, - gdk_threads_leave(); - throw 0; - } - - // try to spawn the new viewer - if (!spawn_viewer(app_state)) - { - llwarns << "Viewer was not installed properly in : " - << app_state->dest_dir - << llendl; - - gdk_threads_enter(); - display_error(app_state->window, - LLTrans::getString("UpdaterFailStartTitle"), - LLTrans::getString("UpdaterFailUpdateDescriptive")); - gdk_threads_leave(); - throw 0; - } - } - catch (...) - { - app_state->failure = TRUE; - } - - gdk_threads_enter(); - updater_app_quit(app_state); - gdk_threads_leave(); - - return NULL; -} - - -gboolean less_anal_gspawnsync(gchar **argv, - gchar **stderr_output, - gint *child_exit_status, - GError **spawn_error) -{ - // store current SIGCHLD handler if there is one, replace with default - // handler to make glib happy - struct sigaction sigchld_backup; - struct sigaction sigchld_appease_glib; - sigchld_appease_glib.sa_handler = SIG_DFL; - sigemptyset(&sigchld_appease_glib.sa_mask); - sigchld_appease_glib.sa_flags = 0; - sigaction(SIGCHLD, &sigchld_appease_glib, &sigchld_backup); - - gboolean rtn = g_spawn_sync(NULL, - argv, - NULL, - (GSpawnFlags) (G_SPAWN_STDOUT_TO_DEV_NULL), - NULL, - NULL, - NULL, - stderr_output, - child_exit_status, - spawn_error); - - // restore SIGCHLD handler - sigaction(SIGCHLD, &sigchld_backup, NULL); - - return rtn; -} - - -// perform a rename, or perform a (prompted) root rename if that fails -int -rename_with_sudo_fallback(const std::string& filename, const std::string& newname) -{ - int rtncode = ::rename(filename.c_str(), newname.c_str()); - lldebugs << "rename result is: " << rtncode << " / " << errno << llendl; - if (rtncode && (EACCES == errno || EPERM == errno || EXDEV == errno)) - { - llinfos << "Permission problem in rename, or moving between different mount points. Retrying as a mv under a sudo." << llendl; - // failed due to permissions, try again as a gksudo or kdesu mv wrapper hack - char *sudo_cmd = NULL; - sudo_cmd = g_find_program_in_path("gksudo"); - if (!sudo_cmd) - { - sudo_cmd = g_find_program_in_path("kdesu"); - } - if (sudo_cmd) - { - char *mv_cmd = NULL; - mv_cmd = g_find_program_in_path("mv"); - if (mv_cmd) - { - char *src_string_copy = g_strdup(filename.c_str()); - char *dst_string_copy = g_strdup(newname.c_str()); - char* argv[] = - { - sudo_cmd, - mv_cmd, - src_string_copy, - dst_string_copy, - NULL - }; - - gchar *stderr_output = NULL; - gint child_exit_status = 0; - GError *spawn_error = NULL; - if (!less_anal_gspawnsync(argv, &stderr_output, - &child_exit_status, &spawn_error)) - { - llwarns << "Failed to spawn child process: " - << spawn_error->message - << llendl; - } - else if (child_exit_status) - { - llwarns << "mv command failed: " - << (stderr_output ? stderr_output : "(no reason given)") - << llendl; - } - else - { - // everything looks good, clear the error code - rtncode = 0; - } - - g_free(src_string_copy); - g_free(dst_string_copy); - if (spawn_error) g_error_free(spawn_error); - } - } - } - return rtncode; -} - -gboolean install_package(std::string package_file, std::string destination) -{ - char *tar_cmd = NULL; - std::ostringstream command; - - // Find the absolute path to the 'tar' command. - tar_cmd = g_find_program_in_path("tar"); - if (!tar_cmd) - { - llerrs << "`tar' was not found in $PATH" << llendl; - return FALSE; - } - llinfos << "Found tar command: " << tar_cmd << llendl; - - // Unpack the tarball in a temporary place first, then move it to - // its final destination - std::string tmp_dest_dir = gDirUtilp->getTempFilename(); - if (LLFile::mkdir(tmp_dest_dir, 0744)) - { - llerrs << "Failed to create directory: " - << destination - << llendl; - - return FALSE; - } - - char *package_file_string_copy = g_strdup(package_file.c_str()); - char *tmp_dest_dir_string_copy = g_strdup(tmp_dest_dir.c_str()); - gchar *argv[8] = { - tar_cmd, - const_cast<gchar*>("--strip"), const_cast<gchar*>("1"), - const_cast<gchar*>("-xjf"), - package_file_string_copy, - const_cast<gchar*>("-C"), tmp_dest_dir_string_copy, - NULL, - }; - - llinfos << "Untarring package: " << package_file << llendl; - - // store current SIGCHLD handler if there is one, replace with default - // handler to make glib happy - struct sigaction sigchld_backup; - struct sigaction sigchld_appease_glib; - sigchld_appease_glib.sa_handler = SIG_DFL; - sigemptyset(&sigchld_appease_glib.sa_mask); - sigchld_appease_glib.sa_flags = 0; - sigaction(SIGCHLD, &sigchld_appease_glib, &sigchld_backup); - - gchar *stderr_output = NULL; - gint child_exit_status = 0; - GError *untar_error = NULL; - if (!less_anal_gspawnsync(argv, &stderr_output, - &child_exit_status, &untar_error)) - { - llwarns << "Failed to spawn child process: " - << untar_error->message - << llendl; - return FALSE; - } - - if (child_exit_status) - { - llwarns << "Untar command failed: " - << (stderr_output ? stderr_output : "(no reason given)") - << llendl; - return FALSE; - } - - g_free(tar_cmd); - g_free(package_file_string_copy); - g_free(tmp_dest_dir_string_copy); - g_free(stderr_output); - if (untar_error) g_error_free(untar_error); - - // move the existing package out of the way if it exists - if (gDirUtilp->fileExists(destination)) - { - std::string backup_dir = destination + ".backup"; - int oldcounter = 1; - while (gDirUtilp->fileExists(backup_dir)) - { - // find a foo.backup.N folder name that isn't taken yet - backup_dir = destination + ".backup." + llformat("%d", oldcounter); - ++oldcounter; - } - - if (rename_with_sudo_fallback(destination, backup_dir)) - { - llwarns << "Failed to move directory: '" - << destination << "' -> '" << backup_dir - << llendl; - return FALSE; - } - } - - // The package has been unpacked in a staging directory, now we just - // need to move it to its destination. - if (rename_with_sudo_fallback(tmp_dest_dir, destination)) - { - llwarns << "Failed to move installation to the destination: " - << destination - << llendl; - return FALSE; - } - - // \0/ Success! - return TRUE; -} - -gboolean progress_update_timeout(gpointer data) -{ - UpdaterAppState *app_state; - - llassert(data != NULL); - - app_state = (UpdaterAppState *) data; - - gdk_threads_enter(); - if (app_state->activity_mode) - { - gtk_progress_bar_pulse - (GTK_PROGRESS_BAR(app_state->progress_bar)); - } - else - { - gtk_progress_set_value(GTK_PROGRESS(app_state->progress_bar), - app_state->progress_value); - } - gdk_threads_leave(); - - return TRUE; -} - -gboolean update_progress_text_timeout(gpointer data) -{ - UpdaterAppState *app_state; - - llassert(data != NULL); - app_state = (UpdaterAppState *) data; - - if (app_state->activity_mode == TRUE) - { - // We no longer need this timeout, it will be removed. - return FALSE; - } - - if (!app_state->progress_value) - { - return TRUE; - } - - std::string progress_text = llformat((LLTrans::getString("UpdaterProgressBarText")+" (%.0f%%)").c_str(), app_state->progress_value); - - gdk_threads_enter(); - gtk_progress_bar_set_text(GTK_PROGRESS_BAR(app_state->progress_bar), - progress_text.c_str()); - gdk_threads_leave(); - - return TRUE; -} - -int download_progress_cb(gpointer data, - double t, - double d, - double utotal, - double ulnow) -{ - UpdaterAppState *app_state; - - llassert(data != NULL); - app_state = (UpdaterAppState *) data; - - if (t <= 0.0) - { - app_state->progress_value = 0; - } - else - { - app_state->progress_value = d * 100.0 / t; - } - return 0; -} - -BOOL spawn_viewer(UpdaterAppState *app_state) -{ - llassert(app_state != NULL); - - std::string cmd = app_state->dest_dir + "/secondlife"; - GError *error = NULL; - - // We want to spawn the Viewer on the same display as the updater app - gboolean success = gdk_spawn_command_line_on_screen - (gtk_widget_get_screen(app_state->window), cmd.c_str(), &error); - - if (!success) - { - llwarns << "Failed to launch viewer: " << error->message - << llendl; - } - - if (error) g_error_free(error); - - return success; -} - -void show_usage_and_exit() -{ - std::cout << "Usage: linux-updater <--url URL | --file FILE> --name NAME --dest PATH --stringsdir PATH1,PATH2 --stringsfile FILE" - << "[--image-dir PATH]" - << std::endl; - exit(1); -} - -void parse_args_and_init(int argc, char **argv, UpdaterAppState *app_state) -{ - int i; - - for (i = 1; i < argc; i++) - { - if ((!strcmp(argv[i], "--url")) && (++i < argc)) - { - app_state->url = argv[i]; - } - else if ((!strcmp(argv[i], "--file")) && (++i < argc)) - { - app_state->file = argv[i]; - } - else if ((!strcmp(argv[i], "--name")) && (++i < argc)) - { - app_state->app_name = argv[i]; - } - else if ((!strcmp(argv[i], "--image-dir")) && (++i < argc)) - { - app_state->image_dir = argv[i]; - app_state->image_dir_iter = new LLDirIterator(argv[i], "*.jpg"); - } - else if ((!strcmp(argv[i], "--dest")) && (++i < argc)) - { - app_state->dest_dir = argv[i]; - } - else if ((!strcmp(argv[i], "--stringsdir")) && (++i < argc)) - { - app_state->strings_dirs = argv[i]; - } - else if ((!strcmp(argv[i], "--stringsfile")) && (++i < argc)) - { - app_state->strings_file = argv[i]; - } - else - { - // show usage, an invalid option was given. - show_usage_and_exit(); - } - } - - if (app_state->app_name.empty() - || (app_state->url.empty() && app_state->file.empty()) - || app_state->dest_dir.empty()) - { - show_usage_and_exit(); - } - - app_state->progress_value = 0.0; - app_state->activity_mode = FALSE; - app_state->failure = FALSE; - - translate_init(app_state->strings_dirs, app_state->strings_file); -} - -int main(int argc, char **argv) -{ - UpdaterAppState* app_state = new UpdaterAppState; - GThread *worker_thread; - - parse_args_and_init(argc, argv, app_state); - - // Initialize logger, and rename old log file - gDirUtilp->initAppDirs("SecondLife"); - LLError::initForApplication - (gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "")); - std::string old_log_file = gDirUtilp->getExpandedFilename - (LL_PATH_LOGS, "updater.log.old"); - std::string log_file = - gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "updater.log"); - LLFile::rename(log_file, old_log_file); - LLError::logToFile(log_file); - - // initialize gthreads and gtk+ - if (!g_thread_supported()) - { - g_thread_init(NULL); - gdk_threads_init(); - } - - gtk_init(&argc, &argv); - - // create UI - updater_app_ui_init(app_state); - - //llinfos << "SAMPLE TRANSLATION IS: " << LLTrans::getString("LoginInProgress") << llendl; - - // create download thread - worker_thread = g_thread_create - (GThreadFunc(worker_thread_cb), app_state, FALSE, NULL); - - gdk_threads_enter(); - gtk_main(); - gdk_threads_leave(); - - // Delete the file only if created from url download. - if(!app_state->url.empty() && !app_state->file.empty()) - { - if (gDirUtilp->fileExists(app_state->file)) - { - LLFile::remove(app_state->file); - } - } - - bool success = !app_state->failure; - delete app_state->image_dir_iter; - delete app_state; - return success ? 0 : 1; -} - -/***************************************************************************** -* Dummy LLTrans implementation (IQA-490) -*****************************************************************************/ -static LLTrans sStaticStrings; - -// lookup -std::string LLTrans::_getString(const std::string& key) const -{ - MessageMap::const_iterator found = mMessages.find(key); - if (found != mMessages.end()) - { - return found->second; - } - LL_WARNS("linux_updater") << "No message for key '" << key - << "' -- add to LLTrans::LLTrans() in linux_updater.cpp" - << LL_ENDL; - return key; -} - -// static lookup -std::string LLTrans::getString(const std::string& key) -{ - return sLLTransInstance._getString(key); -} - -// initialization -LLTrans::LLTrans() -{ - typedef std::pair<const char*, const char*> Pair; - static const Pair data[] = - { - Pair("UpdaterFailDownloadTitle", - "Failed to download update"), - Pair("UpdaterFailInstallTitle", - "Failed to install update"), - Pair("UpdaterFailStartTitle", - "Failed to start viewer"), - Pair("UpdaterFailUpdateDescriptive", - "An error occurred while updating Second Life. " - "Please download the latest version from www.secondlife.com."), - Pair("UpdaterNowInstalling", - "Installing Second Life..."), - Pair("UpdaterNowUpdating", - "Now updating Second Life..."), - Pair("UpdaterProgressBarText", - "Downloading update"), - Pair("UpdaterProgressBarTextWithEllipses", - "Downloading update..."), - Pair("UpdaterUpdatingDescriptive", - "Your Second Life Viewer is being updated to the latest release. " - "This may take some time, so please be patient."), - Pair("UpdaterWindowTitle", - "Second Life Update") - }; - - BOOST_FOREACH(Pair pair, data) - { - mMessages[pair.first] = pair.second; - } -} diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index 72c0091d17..06e752cf34 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -839,6 +839,10 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i asp->play(audio_uuid); } +void LLAudioEngine::triggerSound(SoundData& soundData) +{ + triggerSound(soundData.audio_uuid, soundData.owner_id, soundData.gain, soundData.type, soundData.pos_global); +} void LLAudioEngine::setListenerPos(LLVector3 aVec) { @@ -1792,5 +1796,3 @@ bool LLAudioData::load() mBufferp->mAudioDatap = this; return true; } - - diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h index df1e4dc305..99b96c3c38 100644 --- a/indra/llaudio/llaudioengine.h +++ b/indra/llaudio/llaudioengine.h @@ -66,6 +66,7 @@ class LLAudioChannel; class LLAudioChannelOpenAL; class LLAudioBuffer; class LLStreamingAudioInterface; +struct SoundData; // @@ -144,6 +145,8 @@ public: void triggerSound(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, const S32 type = LLAudioEngine::AUDIO_TYPE_NONE, const LLVector3d &pos_global = LLVector3d::zero); + void triggerSound(SoundData& soundData); + bool preloadSound(const LLUUID &id); void addAudioSource(LLAudioSource *asp); @@ -456,6 +459,27 @@ protected: LLFrameTimer mLastUseTimer; }; +struct SoundData +{ + LLUUID audio_uuid; + LLUUID owner_id; + F32 gain; + S32 type; + LLVector3d pos_global; + + SoundData(const LLUUID &audio_uuid, + const LLUUID& owner_id, + const F32 gain, + const S32 type = LLAudioEngine::AUDIO_TYPE_NONE, + const LLVector3d &pos_global = LLVector3d::zero) + { + this->audio_uuid = audio_uuid; + this->owner_id = owner_id; + this->gain = gain; + this->type = type; + this->pos_global = pos_global; + } +}; extern LLAudioEngine* gAudiop; diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index 155226cf17..c16cae1bbc 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -46,7 +46,7 @@ LLUUID const ANIM_AGENT_BLOW_KISS ("db84829b-462c-ee83-1e27-9bbee66b LLUUID const ANIM_AGENT_BORED ("b906c4ba-703b-1940-32a3-0c7f7d791510"); LLUUID const ANIM_AGENT_BOW ("82e99230-c906-1403-4d9c-3889dd98daba"); LLUUID const ANIM_AGENT_BRUSH ("349a3801-54f9-bf2c-3bd0-1ac89772af01"); -LLUUID const ANIM_AGENT_BUSY ("efcf670c-2d18-8128-973a-034ebc806b67"); +LLUUID const ANIM_AGENT_DO_NOT_DISTURB ("efcf670c-2d18-8128-973a-034ebc806b67"); LLUUID const ANIM_AGENT_CLAP ("9b0c1c4e-8ac7-7969-1494-28c874c4f668"); LLUUID const ANIM_AGENT_COURTBOW ("9ba1c942-08be-e43a-fb29-16ad440efc50"); LLUUID const ANIM_AGENT_CROUCH ("201f3fdf-cb1f-dbec-201f-7333e328ae7c"); @@ -211,7 +211,7 @@ LLAnimationLibrary::LLAnimationLibrary() : mAnimMap[ANIM_AGENT_BORED]= mAnimStringTable.addString("express_bored"); mAnimMap[ANIM_AGENT_BOW]= mAnimStringTable.addString("bow"); mAnimMap[ANIM_AGENT_BRUSH]= mAnimStringTable.addString("brush"); - mAnimMap[ANIM_AGENT_BUSY]= mAnimStringTable.addString("busy"); + mAnimMap[ANIM_AGENT_DO_NOT_DISTURB]= mAnimStringTable.addString("busy"); mAnimMap[ANIM_AGENT_CLAP]= mAnimStringTable.addString("clap"); mAnimMap[ANIM_AGENT_COURTBOW]= mAnimStringTable.addString("courtbow"); mAnimMap[ANIM_AGENT_CROUCH]= mAnimStringTable.addString("crouch"); diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h index aa6579ac8e..84185c3f92 100644 --- a/indra/llcharacter/llanimationstates.h +++ b/indra/llcharacter/llanimationstates.h @@ -56,7 +56,7 @@ extern const LLUUID ANIM_AGENT_BLOW_KISS; extern const LLUUID ANIM_AGENT_BORED; extern const LLUUID ANIM_AGENT_BOW; extern const LLUUID ANIM_AGENT_BRUSH; -extern const LLUUID ANIM_AGENT_BUSY; +extern const LLUUID ANIM_AGENT_DO_NOT_DISTURB; extern const LLUUID ANIM_AGENT_CLAP; extern const LLUUID ANIM_AGENT_COURTBOW; extern const LLUUID ANIM_AGENT_CROUCH; diff --git a/indra/llcharacter/llbvhconsts.h b/indra/llcharacter/llbvhconsts.h index d363a6e595..b06c279b8f 100644 --- a/indra/llcharacter/llbvhconsts.h +++ b/indra/llcharacter/llbvhconsts.h @@ -27,7 +27,7 @@ #ifndef LL_LLBVHCONSTS_H #define LL_LLBVHCONSTS_H -const F32 MAX_ANIM_DURATION = 30.f; +const F32 MAX_ANIM_DURATION = 60.f; typedef enum e_constraint_type { diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index c9fb8534f1..0a6a8f9fa6 100644 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -189,6 +189,7 @@ void LLCharacter::requestStopMotion( LLMotion* motion) //----------------------------------------------------------------------------- static LLFastTimer::DeclareTimer FTM_UPDATE_ANIMATION("Update Animation"); static LLFastTimer::DeclareTimer FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim"); +static LLFastTimer::DeclareTimer FTM_UPDATE_MOTIONS("Update Motions"); void LLCharacter::updateMotions(e_update_t update_type) { @@ -206,7 +207,10 @@ void LLCharacter::updateMotions(e_update_t update_type) mMotionController.unpauseAllMotions(); } bool force_update = (update_type == FORCE_UPDATE); - mMotionController.updateMotions(force_update); + { + LLFastTimer t(FTM_UPDATE_MOTIONS); + mMotionController.updateMotions(force_update); + } } } diff --git a/indra/llcharacter/lleditingmotion.cpp b/indra/llcharacter/lleditingmotion.cpp index 66b3c2bd25..0d0b85ba60 100644 --- a/indra/llcharacter/lleditingmotion.cpp +++ b/indra/llcharacter/lleditingmotion.cpp @@ -214,8 +214,10 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) target = target * target_dist; if (!target.isFinite()) { - llerrs << "Non finite target in editing motion with target distance of " << target_dist << + // Don't error out here, set a fail-safe target vector + llwarns << "Non finite target in editing motion with target distance of " << target_dist << " and focus point " << focus_pt << llendl; + target.setVec(1.f, 1.f, 1.f); } mTarget.setPosition( target + mParentJoint.getPosition()); diff --git a/indra/llcharacter/llhandmotion.cpp b/indra/llcharacter/llhandmotion.cpp index 63937d8255..696dba0d95 100644 --- a/indra/llcharacter/llhandmotion.cpp +++ b/indra/llcharacter/llhandmotion.cpp @@ -132,18 +132,68 @@ BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask) { if (mNewPose != HAND_POSE_RELAXED && mNewPose != mCurrentPose) { - mCharacter->setVisualParamWeight(gHandPoseNames[mNewPose], 0.f); + // Only set param weight for poses other than + // default (HAND_POSE_SPREAD); HAND_POSE_SPREAD + // is not an animatable morph! + if (mNewPose != HAND_POSE_SPREAD) + { + mCharacter->setVisualParamWeight(gHandPoseNames[mNewPose], 0.f); + } + + // Reset morph weight for current pose back to its + // full extend or it might be stuck somewhere in the middle if a + // pose is requested and the old pose is requested again shortly + // after while still blending to the other pose! + if (mCurrentPose != HAND_POSE_SPREAD) + { + mCharacter->setVisualParamWeight(gHandPoseNames[mCurrentPose], 1.f); + } + + // Update visual params now if we won't blend + if (mCurrentPose == HAND_POSE_RELAXED) + { + mCharacter->updateVisualParams(); + } } mNewPose = HAND_POSE_RELAXED; } else { - // this is a new morph we didn't know about before - if (*requestedHandPose != mNewPose && mNewPose != mCurrentPose && mNewPose != HAND_POSE_SPREAD) + // Sometimes we seem to get garbage here, with poses that are out of bounds. + // So check for a valid pose first. + if (*requestedHandPose >= 0 && *requestedHandPose < NUM_HAND_POSES) + { + // This is a new morph we didn't know about before: + // Reset morph weight for both current and new pose + // back their starting values while still blending. + if (*requestedHandPose != mNewPose && mNewPose != mCurrentPose) + { + if (mNewPose != HAND_POSE_SPREAD) + { + mCharacter->setVisualParamWeight(gHandPoseNames[mNewPose], 0.f); + } + + // Reset morph weight for current pose back to its full extend + // or it might be stuck somewhere in the middle if a pose is + // requested and the old pose is requested again shortly after + // while still blending to the other pose! + if (mCurrentPose != HAND_POSE_SPREAD) + { + mCharacter->setVisualParamWeight(gHandPoseNames[mCurrentPose], 1.f); + } + + // Update visual params now if we won't blend + if (mCurrentPose == *requestedHandPose) + { + mCharacter->updateVisualParams(); + } + } + mNewPose = *requestedHandPose; + } + else { - mCharacter->setVisualParamWeight(gHandPoseNames[mNewPose], 0.f); + llwarns << "Requested hand pose out of range. Ignoring requested pose." << llendl; } - mNewPose = *requestedHandPose; } mCharacter->removeAnimationData("Hand Pose"); diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index bb892f4a7f..e9fb91ad73 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -29,8 +29,6 @@ //----------------------------------------------------------------------------- #include "linden_common.h" -#include "llmemtype.h" - #include "llmotioncontroller.h" #include "llkeyframemotion.h" #include "llmath.h" @@ -44,6 +42,7 @@ const U32 MAX_MOTION_INSTANCES = 32; //----------------------------------------------------------------------------- // Constants and statics //----------------------------------------------------------------------------- +F32 LLMotionController::sCurrentTimeFactor = 1.f; LLMotionRegistry LLMotionController::sRegistry; //----------------------------------------------------------------------------- @@ -127,7 +126,7 @@ LLMotion *LLMotionRegistry::createMotion( const LLUUID &id ) // Class Constructor //----------------------------------------------------------------------------- LLMotionController::LLMotionController() - : mTimeFactor(1.f), + : mTimeFactor(sCurrentTimeFactor), mCharacter(NULL), mAnimTime(0.f), mPrevTimerElapsed(0.f), @@ -335,7 +334,6 @@ void LLMotionController::removeMotionInstance(LLMotion* motionp) //----------------------------------------------------------------------------- LLMotion* LLMotionController::createMotion( const LLUUID &id ) { - LLMemType mt(LLMemType::MTYPE_ANIMATION); // do we have an instance of this motion for this character? LLMotion *motion = findMotion(id); @@ -542,6 +540,8 @@ void LLMotionController::updateIdleActiveMotions() //----------------------------------------------------------------------------- // updateMotionsByType() //----------------------------------------------------------------------------- +static LLFastTimer::DeclareTimer FTM_MOTION_ON_UPDATE("Motion onUpdate"); + void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type) { BOOL update_result = TRUE; @@ -699,7 +699,10 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty } // perform motion update - update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); + { + LLFastTimer t(FTM_MOTION_ON_UPDATE); + update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); + } } //********************** @@ -810,7 +813,7 @@ void LLMotionController::updateMotions(bool force_update) // Always cap the number of loaded motions purgeExcessMotions(); - + // Update timing info for this time step. if (!mPaused) { @@ -832,6 +835,7 @@ void LLMotionController::updateMotions(bool force_update) } updateLoadingMotions(); + return; } @@ -850,7 +854,7 @@ void LLMotionController::updateMotions(bool force_update) } updateLoadingMotions(); - + resetJointSignatures(); if (mPaused && !force_update) @@ -861,11 +865,12 @@ void LLMotionController::updateMotions(bool force_update) { // update additive motions updateAdditiveMotions(); + resetJointSignatures(); - + // update all regular motions updateRegularMotions(); - + if (use_quantum) { mPoseBlender.blendAndCache(TRUE); diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index b996f708d2..52eaf557b1 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -168,6 +168,9 @@ public: const LLFrameTimer& getFrameTimer() { return mTimer; } + static F32 getCurrentTimeFactor() { return sCurrentTimeFactor; }; + static void setCurrentTimeFactor(F32 factor) { sCurrentTimeFactor = factor; }; + protected: // internal operations act on motion instances directly // as there can be duplicate motions per id during blending overlap @@ -187,7 +190,8 @@ protected: void deactivateStoppedMotions(); protected: - F32 mTimeFactor; + F32 mTimeFactor; // 1.f for normal speed + static F32 sCurrentTimeFactor; // Value to use for initialization static LLMotionRegistry sRegistry; LLPoseBlender mPoseBlender; diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h index 694e27f371..281fb14781 100644 --- a/indra/llcharacter/llvisualparam.h +++ b/indra/llcharacter/llvisualparam.h @@ -89,6 +89,7 @@ protected: // An interface class for a generalized parametric modification of the avatar mesh // Contains data that is specific to each Avatar //----------------------------------------------------------------------------- +LL_ALIGN_PREFIX(16) class LLVisualParam { public: @@ -160,6 +161,6 @@ protected: S32 mID; // id for storing weight/morphtarget compares compactly LLVisualParamInfo *mInfo; -}; +} LL_ALIGN_POSTFIX(16); #endif // LL_LLVisualParam_H diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index dd7b8c6eb8..5cce8ff2c4 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -53,7 +53,7 @@ set(llcommon_SOURCE_FILES lleventfilter.cpp llevents.cpp lleventtimer.cpp - llfasttimer_class.cpp + llfasttimer.cpp llfile.cpp llfindlocale.cpp llfixedbuffer.cpp @@ -71,7 +71,6 @@ set(llcommon_SOURCE_FILES llmd5.cpp llmemory.cpp llmemorystream.cpp - llmemtype.cpp llmetrics.cpp llmetricperformancetester.cpp llmortician.cpp @@ -116,6 +115,7 @@ set(llcommon_HEADER_FILES bitpack.h ctype_workaround.h doublelinkedlist.h + fix_macros.h imageids.h indra_constants.h linden_common.h @@ -167,13 +167,13 @@ set(llcommon_HEADER_FILES lleventemitter.h llextendedstatus.h llfasttimer.h - llfasttimer_class.h llfile.h llfindlocale.h llfixedbuffer.h llfoldertype.h llformat.h llframetimer.h + llhandle.h llhash.h llheartbeat.h llhttpstatuscodes.h @@ -195,7 +195,6 @@ set(llcommon_HEADER_FILES llmd5.h llmemory.h llmemorystream.h - llmemtype.h llmetrics.h llmetricperformancetester.h llmortician.h diff --git a/indra/llcommon/fix_macros.h b/indra/llcommon/fix_macros.h new file mode 100644 index 0000000000..ef959decff --- /dev/null +++ b/indra/llcommon/fix_macros.h @@ -0,0 +1,25 @@ +/** + * @file fix_macros.h + * @author Nat Goodspeed + * @date 2012-11-16 + * @brief The Mac system headers seem to #define macros with obnoxiously + * generic names, preventing any library from using those names. We've + * had to fix these in so many places that it's worth making a header + * file to handle it. + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Copyright (c) 2012, Linden Research, Inc. + * $/LicenseInfo$ + */ + +// DON'T use an #include guard: every time we encounter this header, #undef +// these macros all over again. + +// who injects MACROS with such generic names?! Grr. +#ifdef equivalent +#undef equivalent +#endif + +#ifdef check +#undef check +#endif diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h index 0745696ef3..0da83720bd 100644 --- a/indra/llcommon/indra_constants.h +++ b/indra/llcommon/indra_constants.h @@ -62,6 +62,7 @@ enum LAND_STAT_FLAGS STAT_FILTER_BY_PARCEL = 0x00000001, STAT_FILTER_BY_OWNER = 0x00000002, STAT_FILTER_BY_OBJECT = 0x00000004, + STAT_FILTER_BY_PARCEL_NAME = 0x00000008, STAT_REQUEST_LAST_ENTRY = 0x80000000, }; diff --git a/indra/llcommon/llallocator.cpp b/indra/llcommon/llallocator.cpp index 6f6abefc67..34fc28d8cc 100644 --- a/indra/llcommon/llallocator.cpp +++ b/indra/llcommon/llallocator.cpp @@ -27,7 +27,7 @@ #include "linden_common.h" #include "llallocator.h" -#if LL_USE_TCMALLOC +#if (LL_USE_TCMALLOC && LL_USE_HEAP_PROFILER) #include "google/heap-profiler.h" #include "google/commandlineflags_public.h" @@ -35,28 +35,6 @@ DECLARE_bool(heap_profile_use_stack_trace); //DECLARE_double(tcmalloc_release_rate); -// static -void LLAllocator::pushMemType(S32 type) -{ - if(isProfiling()) - { - PushMemType(type); - } -} - -// static -S32 LLAllocator::popMemType() -{ - if (isProfiling()) - { - return PopMemType(); - } - else - { - return -1; - } -} - void LLAllocator::setProfilingEnabled(bool should_enable) { // NULL disables dumping to disk @@ -94,17 +72,6 @@ std::string LLAllocator::getRawProfile() // stub implementations for when tcmalloc is disabled // -// static -void LLAllocator::pushMemType(S32 type) -{ -} - -// static -S32 LLAllocator::popMemType() -{ - return -1; -} - void LLAllocator::setProfilingEnabled(bool should_enable) { } diff --git a/indra/llcommon/llallocator.h b/indra/llcommon/llallocator.h index a91dd57d14..d26ad73c5b 100644 --- a/indra/llcommon/llallocator.h +++ b/indra/llcommon/llallocator.h @@ -29,16 +29,10 @@ #include <string> -#include "llmemtype.h" #include "llallocator_heap_profile.h" class LL_COMMON_API LLAllocator { friend class LLMemoryView; - friend class LLMemType; - -private: - static void pushMemType(S32 type); - static S32 popMemType(); public: void setProfilingEnabled(bool should_enable); diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index ed192a9975..ca258900c7 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -289,6 +289,7 @@ void LLApp::setupErrorHandling() // occasionally checks to see if the app is in an error state, and sees if it needs to be run. #if LL_WINDOWS +#if LL_SEND_CRASH_REPORTS // This sets a callback to handle w32 signals to the console window. // The viewer shouldn't be affected, sicne its a windowed app. SetConsoleCtrlHandler( (PHANDLER_ROUTINE) ConsoleCtrlHandler, TRUE); @@ -300,7 +301,7 @@ void LLApp::setupErrorHandling() mExceptionHandler = new google_breakpad::ExceptionHandler( L"C:\\Temp\\", 0, windows_post_minidump_callback, 0, google_breakpad::ExceptionHandler::HANDLER_ALL); } - +#endif #else // // Start up signal handling. diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h index af33ce666f..034546c3f3 100644 --- a/indra/llcommon/llapr.h +++ b/indra/llcommon/llapr.h @@ -168,7 +168,7 @@ public: void operator -=(Type x) { apr_atomic_sub32(&mData, apr_uint32_t(x)); } void operator +=(Type x) { apr_atomic_add32(&mData, apr_uint32_t(x)); } Type operator ++(int) { return apr_atomic_inc32(&mData); } // Type++ - Type operator --(int) { return apr_atomic_dec32(&mData); } // Type-- + Type operator --(int) { return apr_atomic_dec32(&mData); } // approximately --Type (0 if final is 0, non-zero otherwise) private: apr_uint32_t mData; diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp index 5e566d6c7c..5ae2df3994 100644 --- a/indra/llcommon/llassettype.cpp +++ b/indra/llcommon/llassettype.cpp @@ -95,6 +95,7 @@ LLAssetDictionary::LLAssetDictionary() addEntry(LLAssetType::AT_LINK_FOLDER, new AssetEntry("FOLDER_LINK", "link_f", "sym folder link", false, false, true)); addEntry(LLAssetType::AT_MESH, new AssetEntry("MESH", "mesh", "mesh", false, false, false)); addEntry(LLAssetType::AT_WIDGET, new AssetEntry("WIDGET", "widget", "widget", false, false, false)); + addEntry(LLAssetType::AT_PERSON, new AssetEntry("PERSON", "person", "person", false, false, false)); addEntry(LLAssetType::AT_NONE, new AssetEntry("NONE", "-1", NULL, FALSE, FALSE, FALSE)); }; diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h index d538accbf7..69b01731e5 100644 --- a/indra/llcommon/llassettype.h +++ b/indra/llcommon/llassettype.h @@ -112,6 +112,9 @@ public: AT_WIDGET = 40, // UI Widget: this is *not* an inventory asset type, only a viewer side asset (e.g. button, other ui items...) + AT_PERSON = 45, + // A user uuid which is not an inventory asset type, used in viewer only for adding a person to a chat via drag and drop. + AT_MESH = 49, // Mesh data in our proprietary SLM format diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp index 3206843bf4..95ecce509b 100644 --- a/indra/llcommon/llavatarname.cpp +++ b/indra/llcommon/llavatarname.cpp @@ -30,6 +30,7 @@ #include "llavatarname.h" #include "lldate.h" +#include "llframetimer.h" #include "llsd.h" // Store these in pre-built std::strings to avoid memory allocations in @@ -42,6 +43,14 @@ static const std::string IS_DISPLAY_NAME_DEFAULT("is_display_name_default"); static const std::string DISPLAY_NAME_EXPIRES("display_name_expires"); static const std::string DISPLAY_NAME_NEXT_UPDATE("display_name_next_update"); +bool LLAvatarName::sUseDisplayNames = true; + +// Minimum time-to-live (in seconds) for a name entry. +// Avatar name should always guarantee to expire reasonably soon by default +// so if the failure to get a valid expiration time was due to something temporary +// we will eventually request and get the right data. +const F64 MIN_ENTRY_LIFETIME = 60.0; + LLAvatarName::LLAvatarName() : mUsername(), mDisplayName(), @@ -61,6 +70,17 @@ bool LLAvatarName::operator<(const LLAvatarName& rhs) const return mUsername < rhs.mUsername; } +//static +void LLAvatarName::setUseDisplayNames(bool use) +{ + sUseDisplayNames = use; +} +//static +bool LLAvatarName::useDisplayNames() +{ + return sUseDisplayNames; +} + LLSD LLAvatarName::asLLSD() const { LLSD sd; @@ -85,36 +105,120 @@ void LLAvatarName::fromLLSD(const LLSD& sd) mExpires = expires.secondsSinceEpoch(); LLDate next_update = sd[DISPLAY_NAME_NEXT_UPDATE]; mNextUpdate = next_update.secondsSinceEpoch(); + + // Some avatars don't have explicit display names set. Force a legible display name here. + if (mDisplayName.empty()) + { + mDisplayName = mUsername; + } +} + +// Transform a string (typically provided by the legacy service) into a decent +// avatar name instance. +void LLAvatarName::fromString(const std::string& full_name) +{ + mDisplayName = full_name; + std::string::size_type index = full_name.find(' '); + if (index != std::string::npos) + { + // The name is in 2 parts (first last) + mLegacyFirstName = full_name.substr(0, index); + mLegacyLastName = full_name.substr(index+1); + if (mLegacyLastName != "Resident") + { + mUsername = mLegacyFirstName + "." + mLegacyLastName; + mDisplayName = full_name; + LLStringUtil::toLower(mUsername); + } + else + { + // Very old names do have a dummy "Resident" last name + // that we choose to hide from users. + mUsername = mLegacyFirstName; + mDisplayName = mLegacyFirstName; + } + } + else + { + mLegacyFirstName = full_name; + mLegacyLastName = ""; + mUsername = full_name; + mDisplayName = full_name; + } + mIsDisplayNameDefault = true; + mIsTemporaryName = true; + setExpires(MIN_ENTRY_LIFETIME); +} + +void LLAvatarName::setExpires(F64 expires) +{ + mExpires = LLFrameTimer::getTotalSeconds() + expires; } std::string LLAvatarName::getCompleteName() const { std::string name; - if (mUsername.empty() || mIsDisplayNameDefault) - // If the display name feature is off - // OR this particular display name is defaulted (i.e. based on user name), - // then display only the easier to read instance of the person's name. + if (sUseDisplayNames) { - name = mDisplayName; + if (mUsername.empty() || mIsDisplayNameDefault) + { + // If this particular display name is defaulted (i.e. based on user name), + // then display only the easier to read instance of the person's name. + name = mDisplayName; + } + else + { + name = mDisplayName + " (" + mUsername + ")"; + } } else { - name = mDisplayName + " (" + mUsername + ")"; + name = getUserName(); } return name; } -std::string LLAvatarName::getLegacyName() const +std::string LLAvatarName::getDisplayName() const { - if (mLegacyFirstName.empty() && mLegacyLastName.empty()) // display names disabled? + if (sUseDisplayNames) { return mDisplayName; } + else + { + return getUserName(); + } +} +std::string LLAvatarName::getUserName() const +{ std::string name; - name.reserve( mLegacyFirstName.size() + 1 + mLegacyLastName.size() ); - name = mLegacyFirstName; - name += " "; - name += mLegacyLastName; + if (mLegacyLastName.empty() || (mLegacyLastName == "Resident")) + { + if (mLegacyFirstName.empty()) + { + // If we cannot create a user name from the legacy strings, use the display name + name = mDisplayName; + } + else + { + // The last name might be empty if it defaulted to "Resident" + name = mLegacyFirstName; + } + } + else + { + name = mLegacyFirstName + " " + mLegacyLastName; + } return name; } + +void LLAvatarName::dump() const +{ + LL_DEBUGS("AvNameCache") << "LLAvatarName: " + << "user '" << mUsername << "' " + << "display '" << mDisplayName << "' " + << "expires in " << mExpires - LLFrameTimer::getTotalSeconds() << " seconds" + << LL_ENDL; +} + diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index ba258d6d52..4827353018 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -39,23 +39,62 @@ public: bool operator<(const LLAvatarName& rhs) const; + // Conversion to and from LLSD (cache file or server response) LLSD asLLSD() const; - void fromLLSD(const LLSD& sd); + // Used only in legacy mode when the display name capability is not provided server side + // or to otherwise create a temporary valid item. + void fromString(const std::string& full_name); + + // Set the name object to become invalid in "expires" seconds from now + void setExpires(F64 expires); + + // Set and get the display name flag set by the user in preferences. + static void setUseDisplayNames(bool use); + static bool useDisplayNames(); + + // A name object is valid if not temporary and not yet expired (default is expiration not checked) + bool isValidName(F64 max_unrefreshed = 0.0f) const { return !mIsTemporaryName && (mExpires >= max_unrefreshed); } + + // Return true if the name is made up from legacy or temporary data + bool isDisplayNameDefault() const { return mIsDisplayNameDefault; } + // For normal names, returns "James Linden (james.linden)" // When display names are disabled returns just "James Linden" std::string getCompleteName() const; + + // "José Sanchez" or "James Linden", UTF-8 encoded Unicode + // Takes the display name preference into account. This is truly the name that should + // be used for all UI where an avatar name has to be used unless we truly want something else (rare) + std::string getDisplayName() const; + + // Returns "James Linden" or "bobsmith123 Resident" + // Used where we explicitely prefer or need a non UTF-8 legacy (ASCII) name + // Also used for backwards compatibility with systems like voice and muting + std::string getUserName() const; + + // Returns "james.linden" or the legacy name for very old names + std::string getAccountName() const { return mUsername; } - // Returns "James Linden" or "bobsmith123 Resident" for backwards - // compatibility with systems like voice and muting - // *TODO: Eliminate this in favor of username only - std::string getLegacyName() const; - + // Debug print of the object + void dump() const; + + // Names can change, so need to keep track of when name was + // last checked. + // Unix time-from-epoch seconds for efficiency + F64 mExpires; + + // You can only change your name every N hours, so record + // when the next update is allowed + // Unix time-from-epoch seconds + F64 mNextUpdate; + +private: // "bobsmith123" or "james.linden", US-ASCII only std::string mUsername; - // "Jose' Sanchez" or "James Linden", UTF-8 encoded Unicode + // "José Sanchez" or "James Linden", UTF-8 encoded Unicode // Contains data whether or not user has explicitly set // a display name; may duplicate their username. std::string mDisplayName; @@ -81,15 +120,9 @@ public: // shown in UI, but are not serialized. bool mIsTemporaryName; - // Names can change, so need to keep track of when name was - // last checked. - // Unix time-from-epoch seconds for efficiency - F64 mExpires; - - // You can only change your name every N hours, so record - // when the next update is allowed - // Unix time-from-epoch seconds - F64 mNextUpdate; + // Global flag indicating if display name should be used or not + // This will affect the output of the high level "get" methods + static bool sUseDisplayNames; }; #endif diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer.cpp index 463f558c2c..6970c29092 100644 --- a/indra/llcommon/llfasttimer_class.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -1,5 +1,5 @@ /** - * @file llfasttimer_class.cpp + * @file llfasttimer.cpp * @brief Implementation of the fast timer. * * $LicenseInfo:firstyear=2004&license=viewerlgpl$ @@ -64,19 +64,12 @@ BOOL LLFastTimer::sMetricLog = FALSE; LLMutex* LLFastTimer::sLogLock = NULL; std::queue<LLSD> LLFastTimer::sLogQueue; -#define USE_RDTSC 0 - #if LL_LINUX || LL_SOLARIS U64 LLFastTimer::sClockResolution = 1000000000; // Nanosecond resolution #else U64 LLFastTimer::sClockResolution = 1000000; // Microsecond resolution #endif -std::vector<LLFastTimer::FrameState>* LLFastTimer::sTimerInfos = NULL; -U64 LLFastTimer::sTimerCycles = 0; -U32 LLFastTimer::sTimerCalls = 0; - - // FIXME: move these declarations to the relevant modules // helper functions @@ -109,52 +102,35 @@ static timer_tree_dfs_iterator_t end_timer_tree() return timer_tree_dfs_iterator_t(); } - - // factory class that creates NamedTimers via static DeclareTimer objects class NamedTimerFactory : public LLSingleton<NamedTimerFactory> { public: NamedTimerFactory() - : mActiveTimerRoot(NULL), - mTimerRoot(NULL), - mAppTimer(NULL), - mRootFrameState(NULL) + : mTimerRoot(NULL) {} /*virtual */ void initSingleton() { mTimerRoot = new LLFastTimer::NamedTimer("root"); - - mActiveTimerRoot = new LLFastTimer::NamedTimer("Frame"); - mActiveTimerRoot->setCollapsed(false); - - mRootFrameState = new LLFastTimer::FrameState(mActiveTimerRoot); - mRootFrameState->mParent = &mTimerRoot->getFrameState(); - mActiveTimerRoot->setParent(mTimerRoot); - - mAppTimer = new LLFastTimer(mRootFrameState); + mRootFrameState.setNamedTimer(mTimerRoot); + mTimerRoot->setFrameState(&mRootFrameState); + mTimerRoot->mParent = mTimerRoot; + mTimerRoot->setCollapsed(false); + mRootFrameState.mParent = &mRootFrameState; } ~NamedTimerFactory() { std::for_each(mTimers.begin(), mTimers.end(), DeletePairedPointer()); - delete mAppTimer; - delete mActiveTimerRoot; delete mTimerRoot; - delete mRootFrameState; } - LLFastTimer::NamedTimer& createNamedTimer(const std::string& name) + LLFastTimer::NamedTimer& createNamedTimer(const std::string& name, LLFastTimer::FrameState* state) { - timer_map_t::iterator found_it = mTimers.find(name); - if (found_it != mTimers.end()) - { - return *found_it->second; - } - LLFastTimer::NamedTimer* timer = new LLFastTimer::NamedTimer(name); + timer->setFrameState(state); timer->setParent(mTimerRoot); mTimers.insert(std::make_pair(name, timer)); @@ -171,12 +147,9 @@ public: return NULL; } - LLFastTimer::NamedTimer* getActiveRootTimer() { return mActiveTimerRoot; } LLFastTimer::NamedTimer* getRootTimer() { return mTimerRoot; } - const LLFastTimer* getAppTimer() { return mAppTimer; } - LLFastTimer::FrameState& getRootFrameState() { return *mRootFrameState; } - typedef std::map<std::string, LLFastTimer::NamedTimer*> timer_map_t; + typedef std::multimap<std::string, LLFastTimer::NamedTimer*> timer_map_t; timer_map_t::iterator beginTimers() { return mTimers.begin(); } timer_map_t::iterator endTimers() { return mTimers.end(); } S32 timerCount() { return mTimers.size(); } @@ -184,55 +157,19 @@ public: private: timer_map_t mTimers; - LLFastTimer::NamedTimer* mActiveTimerRoot; LLFastTimer::NamedTimer* mTimerRoot; - LLFastTimer* mAppTimer; - LLFastTimer::FrameState* mRootFrameState; + LLFastTimer::FrameState mRootFrameState; }; -void update_cached_pointers_if_changed() -{ - // detect when elements have moved and update cached pointers - static LLFastTimer::FrameState* sFirstTimerAddress = NULL; - if (&*(LLFastTimer::getFrameStateList().begin()) != sFirstTimerAddress) - { - LLFastTimer::DeclareTimer::updateCachedPointers(); - } - sFirstTimerAddress = &*(LLFastTimer::getFrameStateList().begin()); -} - LLFastTimer::DeclareTimer::DeclareTimer(const std::string& name, bool open ) -: mTimer(NamedTimerFactory::instance().createNamedTimer(name)) +: mTimer(NamedTimerFactory::instance().createNamedTimer(name, &mFrameState)) { mTimer.setCollapsed(!open); - mFrameState = &mTimer.getFrameState(); - update_cached_pointers_if_changed(); } LLFastTimer::DeclareTimer::DeclareTimer(const std::string& name) -: mTimer(NamedTimerFactory::instance().createNamedTimer(name)) -{ - mFrameState = &mTimer.getFrameState(); - update_cached_pointers_if_changed(); -} - -// static -void LLFastTimer::DeclareTimer::updateCachedPointers() +: mTimer(NamedTimerFactory::instance().createNamedTimer(name, &mFrameState)) { - // propagate frame state pointers to timer declarations - for (instance_iter it = beginInstances(); it != endInstances(); ++it) - { - // update cached pointer - it->mFrameState = &it->mTimer.getFrameState(); - } - - // also update frame states of timers on stack - LLFastTimer* cur_timerp = LLFastTimer::sCurTimerData.mCurTimer; - while(cur_timerp->mLastTimerData.mCurTimer != cur_timerp) - { - cur_timerp->mFrameState = &cur_timerp->mFrameState->mTimer->getFrameState(); - cur_timerp = cur_timerp->mLastTimerData.mCurTimer; - } } //static @@ -244,7 +181,7 @@ U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer #else // windows or x86-mac or x86-linux or x86-solaris U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer { -#if USE_RDTSC || !LL_WINDOWS +#if LL_FASTTIMER_USE_RDTSC || !LL_WINDOWS //getCPUFrequency returns MHz and sCPUClockFrequency wants to be in Hz static U64 sCPUClockFrequency = U64(LLProcessorInfo().getCPUFrequency()*1000000.0); @@ -265,14 +202,13 @@ U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer } #endif -LLFastTimer::FrameState::FrameState(LLFastTimer::NamedTimer* timerp) +LLFastTimer::FrameState::FrameState() : mActiveCount(0), mCalls(0), mSelfTimeCounter(0), mParent(NULL), mLastCaller(NULL), - mMoveUpTree(false), - mTimer(timerp) + mMoveUpTree(false) {} @@ -283,12 +219,9 @@ LLFastTimer::NamedTimer::NamedTimer(const std::string& name) mTotalTimeCounter(0), mCountAverage(0), mCallAverage(0), - mNeedsSorting(false) + mNeedsSorting(false), + mFrameState(NULL) { - info_list_t& frame_state_list = getFrameStateList(); - mFrameStateIndex = frame_state_list.size(); - getFrameStateList().push_back(FrameState(this)); - mCountHistory = new U32[HISTORY_NUM]; memset(mCountHistory, 0, sizeof(U32) * HISTORY_NUM); mCallHistory = new U32[HISTORY_NUM]; @@ -355,6 +288,7 @@ S32 LLFastTimer::NamedTimer::getDepth() while(timerp) { depth++; + if (timerp->getParent() == timerp) break; timerp = timerp->mParent; } return depth; @@ -369,15 +303,6 @@ void LLFastTimer::NamedTimer::processTimes() accumulateTimings(); } -// sort timer info structs by depth first traversal order -struct SortTimersDFS -{ - bool operator()(const LLFastTimer::FrameState& i1, const LLFastTimer::FrameState& i2) - { - return i1.mTimer->getFrameStateIndex() < i2.mTimer->getFrameStateIndex(); - } -}; - // sort child timers by name struct SortTimerByName { @@ -425,8 +350,8 @@ void LLFastTimer::NamedTimer::buildHierarchy() { // since ancestors have already been visited, reparenting won't affect tree traversal //step up tree, bringing our descendants with us - //llinfos << "Moving " << timerp->getName() << " from child of " << timerp->getParent()->getName() << - // " to child of " << timerp->getParent()->getParent()->getName() << llendl; + LL_DEBUGS("FastTimers") << "Moving " << timerp->getName() << " from child of " << timerp->getParent()->getName() << + " to child of " << timerp->getParent()->getParent()->getName() << LL_ENDL; timerp->setParent(timerp->getParent()->getParent()); timerp->getFrameState().mMoveUpTree = false; @@ -458,7 +383,7 @@ void LLFastTimer::NamedTimer::accumulateTimings() LLFastTimer* cur_timer = sCurTimerData.mCurTimer; // root defined by parent pointing to self CurTimerData* cur_data = &sCurTimerData; - while(cur_timer->mLastTimerData.mCurTimer != cur_timer) + while(cur_timer && cur_timer->mLastTimerData.mCurTimer != cur_timer) { U32 cumulative_time_delta = cur_time - cur_timer->mStartTime; U32 self_time_delta = cumulative_time_delta - cur_data->mChildTime; @@ -473,7 +398,7 @@ void LLFastTimer::NamedTimer::accumulateTimings() } // traverse tree in DFS post order, or bottom up - for(timer_tree_bottom_up_iterator_t it = begin_timer_tree_bottom_up(*NamedTimerFactory::instance().getActiveRootTimer()); + for(timer_tree_bottom_up_iterator_t it = begin_timer_tree_bottom_up(*NamedTimerFactory::instance().getRootTimer()); it != end_timer_tree_bottom_up(); ++it) { @@ -507,12 +432,12 @@ void LLFastTimer::NamedTimer::resetFrame() static S32 call_count = 0; if (call_count % 100 == 0) { - llinfos << "countsPerSecond (32 bit): " << countsPerSecond() << llendl; - llinfos << "get_clock_count (64 bit): " << get_clock_count() << llendl; - llinfos << "LLProcessorInfo().getCPUFrequency() " << LLProcessorInfo().getCPUFrequency() << llendl; - llinfos << "getCPUClockCount32() " << getCPUClockCount32() << llendl; - llinfos << "getCPUClockCount64() " << getCPUClockCount64() << llendl; - llinfos << "elapsed sec " << ((F64)getCPUClockCount64())/((F64)LLProcessorInfo().getCPUFrequency()*1000000.0) << llendl; + LL_DEBUGS("FastTimers") << "countsPerSecond (32 bit): " << countsPerSecond() << LL_ENDL; + LL_DEBUGS("FastTimers") << "get_clock_count (64 bit): " << get_clock_count() << llendl; + LL_DEBUGS("FastTimers") << "LLProcessorInfo().getCPUFrequency() " << LLProcessorInfo().getCPUFrequency() << LL_ENDL; + LL_DEBUGS("FastTimers") << "getCPUClockCount32() " << getCPUClockCount32() << LL_ENDL; + LL_DEBUGS("FastTimers") << "getCPUClockCount64() " << getCPUClockCount64() << LL_ENDL; + LL_DEBUGS("FastTimers") << "elapsed sec " << ((F64)getCPUClockCount64())/((F64)LLProcessorInfo().getCPUFrequency()*1000000.0) << LL_ENDL; } call_count++; @@ -544,48 +469,22 @@ void LLFastTimer::NamedTimer::resetFrame() } } - - // tag timers by position in depth first traversal of tree - S32 index = 0; - for(timer_tree_dfs_iterator_t it = begin_timer_tree(*NamedTimerFactory::instance().getRootTimer()); - it != end_timer_tree(); - ++it) - { - NamedTimer* timerp = (*it); - - timerp->mFrameStateIndex = index; - index++; - - llassert_always(timerp->mFrameStateIndex < (S32)getFrameStateList().size()); - } - - // sort timers by DFS traversal order to improve cache coherency - std::sort(getFrameStateList().begin(), getFrameStateList().end(), SortTimersDFS()); - - // update pointers into framestatelist now that we've sorted it - DeclareTimer::updateCachedPointers(); - // reset for next frame + for (instance_iter it = beginInstances(); it != endInstances(); ++it) { - for (instance_iter it = beginInstances(); it != endInstances(); ++it) - { - NamedTimer& timer = *it; + NamedTimer& timer = *it; - FrameState& info = timer.getFrameState(); - info.mSelfTimeCounter = 0; - info.mCalls = 0; - info.mLastCaller = NULL; - info.mMoveUpTree = false; - // update parent pointer in timer state struct - if (timer.mParent) - { - info.mParent = &timer.mParent->getFrameState(); - } + FrameState& info = timer.getFrameState(); + info.mSelfTimeCounter = 0; + info.mCalls = 0; + info.mLastCaller = NULL; + info.mMoveUpTree = false; + // update parent pointer in timer state struct + if (timer.mParent) + { + info.mParent = &timer.mParent->getFrameState(); } } - - //sTimerCycles = 0; - //sTimerCalls = 0; } //static @@ -600,7 +499,7 @@ void LLFastTimer::NamedTimer::reset() // root defined by parent pointing to self CurTimerData* cur_data = &sCurTimerData; LLFastTimer* cur_timer = cur_data->mCurTimer; - while(cur_timer->mLastTimerData.mCurTimer != cur_timer) + while(cur_timer && cur_timer->mLastTimerData.mCurTimer != cur_timer) { cur_timer->mStartTime = cur_time; cur_data->mChildTime = 0; @@ -630,17 +529,6 @@ void LLFastTimer::NamedTimer::reset() sCurFrameIndex = 0; } -//static -LLFastTimer::info_list_t& LLFastTimer::getFrameStateList() -{ - if (!sTimerInfos) - { - sTimerInfos = new info_list_t(); - } - return *sTimerInfos; -} - - U32 LLFastTimer::NamedTimer::getHistoricalCount(S32 history_index) const { S32 history_idx = (getLastFrameIndex() + history_index) % LLFastTimer::NamedTimer::HISTORY_NUM; @@ -655,18 +543,7 @@ U32 LLFastTimer::NamedTimer::getHistoricalCalls(S32 history_index ) const LLFastTimer::FrameState& LLFastTimer::NamedTimer::getFrameState() const { - llassert_always(mFrameStateIndex >= 0); - if (this == NamedTimerFactory::instance().getActiveRootTimer()) - { - return NamedTimerFactory::instance().getRootFrameState(); - } - return getFrameStateList()[mFrameStateIndex]; -} - -// static -LLFastTimer::NamedTimer& LLFastTimer::NamedTimer::getRootNamedTimer() -{ - return *NamedTimerFactory::instance().getActiveRootTimer(); + return *mFrameState; } std::vector<LLFastTimer::NamedTimer*>::const_iterator LLFastTimer::NamedTimer::beginChildren() @@ -777,145 +654,3 @@ LLFastTimer::LLFastTimer(LLFastTimer::FrameState* state) } -////////////////////////////////////////////////////////////////////////////// -// -// Important note: These implementations must be FAST! -// - - -#if LL_WINDOWS -// -// Windows implementation of CPU clock -// - -// -// NOTE: put back in when we aren't using platform sdk anymore -// -// because MS has different signatures for these functions in winnt.h -// need to rename them to avoid conflicts -//#define _interlockedbittestandset _renamed_interlockedbittestandset -//#define _interlockedbittestandreset _renamed_interlockedbittestandreset -//#include <intrin.h> -//#undef _interlockedbittestandset -//#undef _interlockedbittestandreset - -//inline U32 LLFastTimer::getCPUClockCount32() -//{ -// U64 time_stamp = __rdtsc(); -// return (U32)(time_stamp >> 8); -//} -// -//// return full timer value, *not* shifted by 8 bits -//inline U64 LLFastTimer::getCPUClockCount64() -//{ -// return __rdtsc(); -//} - -// shift off lower 8 bits for lower resolution but longer term timing -// on 1Ghz machine, a 32-bit word will hold ~1000 seconds of timing -#if USE_RDTSC -U32 LLFastTimer::getCPUClockCount32() -{ - U32 ret_val; - __asm - { - _emit 0x0f - _emit 0x31 - shr eax,8 - shl edx,24 - or eax, edx - mov dword ptr [ret_val], eax - } - return ret_val; -} - -// return full timer value, *not* shifted by 8 bits -U64 LLFastTimer::getCPUClockCount64() -{ - U64 ret_val; - __asm - { - _emit 0x0f - _emit 0x31 - mov eax,eax - mov edx,edx - mov dword ptr [ret_val+4], edx - mov dword ptr [ret_val], eax - } - return ret_val; -} - -std::string LLFastTimer::sClockType = "rdtsc"; - -#else -//LL_COMMON_API U64 get_clock_count(); // in lltimer.cpp -// These use QueryPerformanceCounter, which is arguably fine and also works on AMD architectures. -U32 LLFastTimer::getCPUClockCount32() -{ - return (U32)(get_clock_count()>>8); -} - -U64 LLFastTimer::getCPUClockCount64() -{ - return get_clock_count(); -} - -std::string LLFastTimer::sClockType = "QueryPerformanceCounter"; -#endif - -#endif - - -#if (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) -// -// Linux and Solaris implementation of CPU clock - non-x86. -// This is accurate but SLOW! Only use out of desperation. -// -// Try to use the MONOTONIC clock if available, this is a constant time counter -// with nanosecond resolution (but not necessarily accuracy) and attempts are -// made to synchronize this value between cores at kernel start. It should not -// be affected by CPU frequency. If not available use the REALTIME clock, but -// this may be affected by NTP adjustments or other user activity affecting -// the system time. -U64 LLFastTimer::getCPUClockCount64() -{ - struct timespec tp; - -#ifdef CLOCK_MONOTONIC // MONOTONIC supported at build-time? - if (-1 == clock_gettime(CLOCK_MONOTONIC,&tp)) // if MONOTONIC isn't supported at runtime then ouch, try REALTIME -#endif - clock_gettime(CLOCK_REALTIME,&tp); - - return (tp.tv_sec*LLFastTimer::sClockResolution)+tp.tv_nsec; -} - -U32 LLFastTimer::getCPUClockCount32() -{ - return (U32)(LLFastTimer::getCPUClockCount64() >> 8); -} - -std::string LLFastTimer::sClockType = "clock_gettime"; - -#endif // (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) - - -#if (LL_LINUX || LL_SOLARIS || LL_DARWIN) && (defined(__i386__) || defined(__amd64__)) -// -// Mac+Linux+Solaris FAST x86 implementation of CPU clock -U32 LLFastTimer::getCPUClockCount32() -{ - U64 x; - __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); - return (U32)(x >> 8); -} - -U64 LLFastTimer::getCPUClockCount64() -{ - U64 x; - __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); - return x; -} - -std::string LLFastTimer::sClockType = "rdtsc"; -#endif - diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 2b25f2fabb..e42e549df5 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -1,6 +1,6 @@ /** * @file llfasttimer.h - * @brief Inline implementations of fast timers. + * @brief Declaration of a fast timer. * * $LicenseInfo:firstyear=2004&license=viewerlgpl$ * Second Life Viewer Source Code @@ -27,9 +27,363 @@ #ifndef LL_FASTTIMER_H #define LL_FASTTIMER_H -// Implementation of getCPUClockCount32() and getCPUClockCount64 are now in llfastertimer_class.cpp. +#include "llinstancetracker.h" -// pull in the actual class definition -#include "llfasttimer_class.h" +#define FAST_TIMER_ON 1 +#define DEBUG_FAST_TIMER_THREADS 1 + +class LLMutex; + +#include <queue> +#include "llsd.h" + +#define LL_FASTTIMER_USE_RDTSC 1 + + +LL_COMMON_API void assert_main_thread(); + +class LL_COMMON_API LLFastTimer +{ +public: + class NamedTimer; + + struct LL_COMMON_API FrameState + { + FrameState(); + void setNamedTimer(NamedTimer* timerp) { mTimer = timerp; } + + U32 mSelfTimeCounter; + U32 mCalls; + FrameState* mParent; // info for caller timer + FrameState* mLastCaller; // used to bootstrap tree construction + NamedTimer* mTimer; + U16 mActiveCount; // number of timers with this ID active on stack + bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame + }; + + // stores a "named" timer instance to be reused via multiple LLFastTimer stack instances + class LL_COMMON_API NamedTimer + : public LLInstanceTracker<NamedTimer> + { + friend class DeclareTimer; + public: + ~NamedTimer(); + + enum { HISTORY_NUM = 300 }; + + const std::string& getName() const { return mName; } + NamedTimer* getParent() const { return mParent; } + void setParent(NamedTimer* parent); + S32 getDepth(); + std::string getToolTip(S32 history_index = -1); + + typedef std::vector<NamedTimer*>::const_iterator child_const_iter; + child_const_iter beginChildren(); + child_const_iter endChildren(); + std::vector<NamedTimer*>& getChildren(); + + void setCollapsed(bool collapsed) { mCollapsed = collapsed; } + bool getCollapsed() const { return mCollapsed; } + + U32 getCountAverage() const { return mCountAverage; } + U32 getCallAverage() const { return mCallAverage; } + + U32 getHistoricalCount(S32 history_index = 0) const; + U32 getHistoricalCalls(S32 history_index = 0) const; + + void setFrameState(FrameState* state) { mFrameState = state; state->setNamedTimer(this); } + FrameState& getFrameState() const; + + private: + friend class LLFastTimer; + friend class NamedTimerFactory; + + // + // methods + // + NamedTimer(const std::string& name); + // recursive call to gather total time from children + static void accumulateTimings(); + + // updates cumulative times and hierarchy, + // can be called multiple times in a frame, at any point + static void processTimes(); + + static void buildHierarchy(); + static void resetFrame(); + static void reset(); + + // + // members + // + FrameState* mFrameState; + + std::string mName; + + U32 mTotalTimeCounter; + + U32 mCountAverage; + U32 mCallAverage; + + U32* mCountHistory; + U32* mCallHistory; + + // tree structure + NamedTimer* mParent; // NamedTimer of caller(parent) + std::vector<NamedTimer*> mChildren; + bool mCollapsed; // don't show children + bool mNeedsSorting; // sort children whenever child added + }; + + // used to statically declare a new named timer + class LL_COMMON_API DeclareTimer + : public LLInstanceTracker<DeclareTimer> + { + friend class LLFastTimer; + public: + DeclareTimer(const std::string& name, bool open); + DeclareTimer(const std::string& name); + + NamedTimer& getNamedTimer() { return mTimer; } + + private: + FrameState mFrameState; + NamedTimer& mTimer; + }; + +public: + LLFastTimer(LLFastTimer::FrameState* state); + + LL_FORCE_INLINE LLFastTimer(LLFastTimer::DeclareTimer& timer) + : mFrameState(&timer.mFrameState) + { +#if FAST_TIMER_ON + LLFastTimer::FrameState* frame_state = mFrameState; + mStartTime = getCPUClockCount32(); + + frame_state->mActiveCount++; + frame_state->mCalls++; + // keep current parent as long as it is active when we are + frame_state->mMoveUpTree |= (frame_state->mParent->mActiveCount == 0); + + LLFastTimer::CurTimerData* cur_timer_data = &LLFastTimer::sCurTimerData; + mLastTimerData = *cur_timer_data; + cur_timer_data->mCurTimer = this; + cur_timer_data->mFrameState = frame_state; + cur_timer_data->mChildTime = 0; +#endif +#if DEBUG_FAST_TIMER_THREADS +#if !LL_RELEASE + assert_main_thread(); +#endif +#endif + } + + LL_FORCE_INLINE ~LLFastTimer() + { +#if FAST_TIMER_ON + LLFastTimer::FrameState* frame_state = mFrameState; + U32 total_time = getCPUClockCount32() - mStartTime; + + frame_state->mSelfTimeCounter += total_time - LLFastTimer::sCurTimerData.mChildTime; + frame_state->mActiveCount--; + + // store last caller to bootstrap tree creation + // do this in the destructor in case of recursion to get topmost caller + frame_state->mLastCaller = mLastTimerData.mFrameState; + + // we are only tracking self time, so subtract our total time delta from parents + mLastTimerData.mChildTime += total_time; + + LLFastTimer::sCurTimerData = mLastTimerData; +#endif + } + +public: + static LLMutex* sLogLock; + static std::queue<LLSD> sLogQueue; + static BOOL sLog; + static BOOL sMetricLog; + static std::string sLogName; + static bool sPauseHistory; + static bool sResetHistory; + + // call this once a frame to reset timers + static void nextFrame(); + + // dumps current cumulative frame stats to log + // call nextFrame() to reset timers + static void dumpCurTimes(); + + // call this to reset timer hierarchy, averages, etc. + static void reset(); + + static U64 countsPerSecond(); + static S32 getLastFrameIndex() { return sLastFrameIndex; } + static S32 getCurFrameIndex() { return sCurFrameIndex; } + + static void writeLog(std::ostream& os); + static const NamedTimer* getTimerByName(const std::string& name); + + struct CurTimerData + { + LLFastTimer* mCurTimer; + FrameState* mFrameState; + U32 mChildTime; + }; + static CurTimerData sCurTimerData; + +private: + + + ////////////////////////////////////////////////////////////////////////////// + // + // Important note: These implementations must be FAST! + // + + +#if LL_WINDOWS + // + // Windows implementation of CPU clock + // + + // + // NOTE: put back in when we aren't using platform sdk anymore + // + // because MS has different signatures for these functions in winnt.h + // need to rename them to avoid conflicts + //#define _interlockedbittestandset _renamed_interlockedbittestandset + //#define _interlockedbittestandreset _renamed_interlockedbittestandreset + //#include <intrin.h> + //#undef _interlockedbittestandset + //#undef _interlockedbittestandreset + + //inline U32 LLFastTimer::getCPUClockCount32() + //{ + // U64 time_stamp = __rdtsc(); + // return (U32)(time_stamp >> 8); + //} + // + //// return full timer value, *not* shifted by 8 bits + //inline U64 LLFastTimer::getCPUClockCount64() + //{ + // return __rdtsc(); + //} + + // shift off lower 8 bits for lower resolution but longer term timing + // on 1Ghz machine, a 32-bit word will hold ~1000 seconds of timing +#if LL_FASTTIMER_USE_RDTSC + static U32 getCPUClockCount32() + { + U32 ret_val; + __asm + { + _emit 0x0f + _emit 0x31 + shr eax,8 + shl edx,24 + or eax, edx + mov dword ptr [ret_val], eax + } + return ret_val; + } + + // return full timer value, *not* shifted by 8 bits + static U64 getCPUClockCount64() + { + U64 ret_val; + __asm + { + _emit 0x0f + _emit 0x31 + mov eax,eax + mov edx,edx + mov dword ptr [ret_val+4], edx + mov dword ptr [ret_val], eax + } + return ret_val; + } + +#else + //LL_COMMON_API U64 get_clock_count(); // in lltimer.cpp + // These use QueryPerformanceCounter, which is arguably fine and also works on AMD architectures. + static U32 getCPUClockCount32() + { + return (U32)(get_clock_count()>>8); + } + + static U64 getCPUClockCount64() + { + return get_clock_count(); + } + +#endif + +#endif + + +#if (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) + // + // Linux and Solaris implementation of CPU clock - non-x86. + // This is accurate but SLOW! Only use out of desperation. + // + // Try to use the MONOTONIC clock if available, this is a constant time counter + // with nanosecond resolution (but not necessarily accuracy) and attempts are + // made to synchronize this value between cores at kernel start. It should not + // be affected by CPU frequency. If not available use the REALTIME clock, but + // this may be affected by NTP adjustments or other user activity affecting + // the system time. + static U64 getCPUClockCount64() + { + struct timespec tp; + +#ifdef CLOCK_MONOTONIC // MONOTONIC supported at build-time? + if (-1 == clock_gettime(CLOCK_MONOTONIC,&tp)) // if MONOTONIC isn't supported at runtime then ouch, try REALTIME +#endif + clock_gettime(CLOCK_REALTIME,&tp); + + return (tp.tv_sec*sClockResolution)+tp.tv_nsec; + } + + static U32 getCPUClockCount32() + { + return (U32)(getCPUClockCount64() >> 8); + } + +#endif // (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) + + +#if (LL_LINUX || LL_SOLARIS || LL_DARWIN) && (defined(__i386__) || defined(__amd64__)) + // + // Mac+Linux+Solaris FAST x86 implementation of CPU clock + static U32 getCPUClockCount32() + { + U64 x; + __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); + return (U32)(x >> 8); + } + + static U64 getCPUClockCount64() + { + U64 x; + __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); + return x; + } + +#endif + + static U64 sClockResolution; + + static S32 sCurFrameIndex; + static S32 sLastFrameIndex; + static U64 sLastFrameTime; + + U32 mStartTime; + LLFastTimer::FrameState* mFrameState; + LLFastTimer::CurTimerData mLastTimerData; + +}; + +typedef class LLFastTimer LLFastTimer; #endif // LL_LLFASTTIMER_H diff --git a/indra/llcommon/llfasttimer_class.h b/indra/llcommon/llfasttimer_class.h deleted file mode 100644 index f481e968a6..0000000000 --- a/indra/llcommon/llfasttimer_class.h +++ /dev/null @@ -1,276 +0,0 @@ -/** - * @file llfasttimer_class.h - * @brief Declaration of a fast timer. - * - * $LicenseInfo:firstyear=2004&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_FASTTIMER_CLASS_H -#define LL_FASTTIMER_CLASS_H - -#include "llinstancetracker.h" - -#define FAST_TIMER_ON 1 -#define TIME_FAST_TIMERS 0 -#define DEBUG_FAST_TIMER_THREADS 1 - -class LLMutex; - -#include <queue> -#include "llsd.h" - -LL_COMMON_API void assert_main_thread(); - -class LL_COMMON_API LLFastTimer -{ -public: - class NamedTimer; - - struct LL_COMMON_API FrameState - { - FrameState(NamedTimer* timerp); - - U32 mSelfTimeCounter; - U32 mCalls; - FrameState* mParent; // info for caller timer - FrameState* mLastCaller; // used to bootstrap tree construction - NamedTimer* mTimer; - U16 mActiveCount; // number of timers with this ID active on stack - bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame - }; - - // stores a "named" timer instance to be reused via multiple LLFastTimer stack instances - class LL_COMMON_API NamedTimer - : public LLInstanceTracker<NamedTimer> - { - friend class DeclareTimer; - public: - ~NamedTimer(); - - enum { HISTORY_NUM = 300 }; - - const std::string& getName() const { return mName; } - NamedTimer* getParent() const { return mParent; } - void setParent(NamedTimer* parent); - S32 getDepth(); - std::string getToolTip(S32 history_index = -1); - - typedef std::vector<NamedTimer*>::const_iterator child_const_iter; - child_const_iter beginChildren(); - child_const_iter endChildren(); - std::vector<NamedTimer*>& getChildren(); - - void setCollapsed(bool collapsed) { mCollapsed = collapsed; } - bool getCollapsed() const { return mCollapsed; } - - U32 getCountAverage() const { return mCountAverage; } - U32 getCallAverage() const { return mCallAverage; } - - U32 getHistoricalCount(S32 history_index = 0) const; - U32 getHistoricalCalls(S32 history_index = 0) const; - - static NamedTimer& getRootNamedTimer(); - - S32 getFrameStateIndex() const { return mFrameStateIndex; } - - FrameState& getFrameState() const; - - private: - friend class LLFastTimer; - friend class NamedTimerFactory; - - // - // methods - // - NamedTimer(const std::string& name); - // recursive call to gather total time from children - static void accumulateTimings(); - - // updates cumulative times and hierarchy, - // can be called multiple times in a frame, at any point - static void processTimes(); - - static void buildHierarchy(); - static void resetFrame(); - static void reset(); - - // - // members - // - S32 mFrameStateIndex; - - std::string mName; - - U32 mTotalTimeCounter; - - U32 mCountAverage; - U32 mCallAverage; - - U32* mCountHistory; - U32* mCallHistory; - - // tree structure - NamedTimer* mParent; // NamedTimer of caller(parent) - std::vector<NamedTimer*> mChildren; - bool mCollapsed; // don't show children - bool mNeedsSorting; // sort children whenever child added - }; - - // used to statically declare a new named timer - class LL_COMMON_API DeclareTimer - : public LLInstanceTracker<DeclareTimer> - { - friend class LLFastTimer; - public: - DeclareTimer(const std::string& name, bool open); - DeclareTimer(const std::string& name); - - static void updateCachedPointers(); - - private: - NamedTimer& mTimer; - FrameState* mFrameState; - }; - -public: - LLFastTimer(LLFastTimer::FrameState* state); - - LL_FORCE_INLINE LLFastTimer(LLFastTimer::DeclareTimer& timer) - : mFrameState(timer.mFrameState) - { -#if TIME_FAST_TIMERS - U64 timer_start = getCPUClockCount64(); -#endif -#if FAST_TIMER_ON - LLFastTimer::FrameState* frame_state = mFrameState; - mStartTime = getCPUClockCount32(); - - frame_state->mActiveCount++; - frame_state->mCalls++; - // keep current parent as long as it is active when we are - frame_state->mMoveUpTree |= (frame_state->mParent->mActiveCount == 0); - - LLFastTimer::CurTimerData* cur_timer_data = &LLFastTimer::sCurTimerData; - mLastTimerData = *cur_timer_data; - cur_timer_data->mCurTimer = this; - cur_timer_data->mFrameState = frame_state; - cur_timer_data->mChildTime = 0; -#endif -#if TIME_FAST_TIMERS - U64 timer_end = getCPUClockCount64(); - sTimerCycles += timer_end - timer_start; -#endif -#if DEBUG_FAST_TIMER_THREADS -#if !LL_RELEASE - assert_main_thread(); -#endif -#endif - } - - LL_FORCE_INLINE ~LLFastTimer() - { -#if TIME_FAST_TIMERS - U64 timer_start = getCPUClockCount64(); -#endif -#if FAST_TIMER_ON - LLFastTimer::FrameState* frame_state = mFrameState; - U32 total_time = getCPUClockCount32() - mStartTime; - - frame_state->mSelfTimeCounter += total_time - LLFastTimer::sCurTimerData.mChildTime; - frame_state->mActiveCount--; - - // store last caller to bootstrap tree creation - // do this in the destructor in case of recursion to get topmost caller - frame_state->mLastCaller = mLastTimerData.mFrameState; - - // we are only tracking self time, so subtract our total time delta from parents - mLastTimerData.mChildTime += total_time; - - LLFastTimer::sCurTimerData = mLastTimerData; -#endif -#if TIME_FAST_TIMERS - U64 timer_end = getCPUClockCount64(); - sTimerCycles += timer_end - timer_start; - sTimerCalls++; -#endif - } - -public: - static LLMutex* sLogLock; - static std::queue<LLSD> sLogQueue; - static BOOL sLog; - static BOOL sMetricLog; - static std::string sLogName; - static bool sPauseHistory; - static bool sResetHistory; - static U64 sTimerCycles; - static U32 sTimerCalls; - - typedef std::vector<FrameState> info_list_t; - static info_list_t& getFrameStateList(); - - - // call this once a frame to reset timers - static void nextFrame(); - - // dumps current cumulative frame stats to log - // call nextFrame() to reset timers - static void dumpCurTimes(); - - // call this to reset timer hierarchy, averages, etc. - static void reset(); - - static U64 countsPerSecond(); - static S32 getLastFrameIndex() { return sLastFrameIndex; } - static S32 getCurFrameIndex() { return sCurFrameIndex; } - - static void writeLog(std::ostream& os); - static const NamedTimer* getTimerByName(const std::string& name); - - struct CurTimerData - { - LLFastTimer* mCurTimer; - FrameState* mFrameState; - U32 mChildTime; - }; - static CurTimerData sCurTimerData; - static std::string sClockType; - -private: - static U32 getCPUClockCount32(); - static U64 getCPUClockCount64(); - static U64 sClockResolution; - - static S32 sCurFrameIndex; - static S32 sLastFrameIndex; - static U64 sLastFrameTime; - static info_list_t* sTimerInfos; - - U32 mStartTime; - LLFastTimer::FrameState* mFrameState; - LLFastTimer::CurTimerData mLastTimerData; - -}; - -typedef class LLFastTimer LLFastTimer; - -#endif // LL_LLFASTTIMER_CLASS_H diff --git a/indra/llcommon/llfoldertype.h b/indra/llcommon/llfoldertype.h index a0c847914f..a0c847914f 100644..100755 --- a/indra/llcommon/llfoldertype.h +++ b/indra/llcommon/llfoldertype.h diff --git a/indra/llui/llhandle.h b/indra/llcommon/llhandle.h index 37c657dd92..401e4d759a 100644 --- a/indra/llui/llhandle.h +++ b/indra/llcommon/llhandle.h @@ -31,6 +31,10 @@ #include <boost/type_traits/is_convertible.hpp> #include <boost/utility/enable_if.hpp> +/** + * Helper object for LLHandle. Don't instantiate these directly, used + * exclusively by LLHandle. + */ class LLTombStone : public LLRefCount { public: @@ -42,15 +46,37 @@ private: mutable void* mTarget; }; -// LLHandles are used to refer to objects whose lifetime you do not control or influence. -// Calling get() on a handle will return a pointer to the referenced object or NULL, -// if the object no longer exists. Note that during the lifetime of the returned pointer, -// you are assuming that the object will not be deleted by any action you perform, -// or any other thread, as normal when using pointers, so avoid using that pointer outside of -// the local code block. -// -// https://wiki.lindenlab.com/mediawiki/index.php?title=LLHandle&oldid=79669 - +/** + * LLHandles are used to refer to objects whose lifetime you do not control or influence. + * Calling get() on a handle will return a pointer to the referenced object or NULL, + * if the object no longer exists. Note that during the lifetime of the returned pointer, + * you are assuming that the object will not be deleted by any action you perform, + * or any other thread, as normal when using pointers, so avoid using that pointer outside of + * the local code block. + * + * https://wiki.lindenlab.com/mediawiki/index.php?title=LLHandle&oldid=79669 + * + * The implementation is like some "weak pointer" implementations. When we + * can't control the lifespan of the referenced object of interest, we can + * still instantiate a proxy object whose lifespan we DO control, and store in + * the proxy object a dumb pointer to the actual target. Then we just have to + * ensure that on destruction of the target object, the proxy's dumb pointer + * is set NULL. + * + * LLTombStone is our proxy object. LLHandle contains an LLPointer to the + * LLTombStone, so every copy of an LLHandle increments the LLTombStone's ref + * count as usual. + * + * One copy of the LLHandle, specifically the LLRootHandle, must be stored in + * the referenced object. Destroying the LLRootHandle is what NULLs the + * proxy's target pointer. + * + * Minor optimization: we want LLHandle's mTombStone to always be a valid + * LLPointer, saving some conditionals in dereferencing. That's the + * getDefaultTombStone() mechanism. The default LLTombStone object's target + * pointer is always NULL, so it's semantically identical to allowing + * mTombStone to be invalid. + */ template <typename T> class LLHandle { @@ -108,6 +134,14 @@ private: } }; +/** + * LLRootHandle isa LLHandle which must be stored in the referenced object. + * You can either store it directly and explicitly bind(this), or derive from + * LLHandleProvider (q.v.) which automates that for you. The essential point + * is that destroying the LLRootHandle (as a consequence of destroying the + * referenced object) calls unbind(), setting the LLTombStone's target pointer + * NULL. + */ template <typename T> class LLRootHandle : public LLHandle<T> { @@ -144,8 +178,10 @@ private: LLRootHandle(const LLRootHandle& other) {}; }; -// Use this as a mixin for simple classes that need handles and when you don't -// want handles at multiple points of the inheritance hierarchy +/** + * Use this as a mixin for simple classes that need handles and when you don't + * want handles at multiple points of the inheritance hierarchy + */ template <typename T> class LLHandleProvider { @@ -158,13 +194,6 @@ public: return mHandle; } -protected: - typedef LLHandle<T> handle_type_t; - LLHandleProvider() - { - // provided here to enforce T deriving from LLHandleProvider<T> - } - template <typename U> LLHandle<U> getDerivedHandle(typename boost::enable_if< typename boost::is_convertible<U*, T*> >::type* dummy = 0) const { @@ -173,6 +202,12 @@ protected: return downcast_handle; } +protected: + typedef LLHandle<T> handle_type_t; + LLHandleProvider() + { + // provided here to enforce T deriving from LLHandleProvider<T> + } private: mutable LLRootHandle<T> mHandle; diff --git a/indra/llcommon/llinitparam.cpp b/indra/llcommon/llinitparam.cpp index db72aa19b9..89c831d296 100644 --- a/indra/llcommon/llinitparam.cpp +++ b/indra/llcommon/llinitparam.cpp @@ -40,7 +40,9 @@ namespace LLInitParam { const U8* my_addr = reinterpret_cast<const U8*>(this); const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block); - mEnclosingBlockOffset = 0x7FFFffff & (U32)(my_addr - block_addr); + U32 enclosing_block_offset = 0x7FFFffff & (U32)(my_addr - block_addr); + mEnclosingBlockOffsetLow = enclosing_block_offset & 0x0000ffff; + mEnclosingBlockOffsetHigh = (enclosing_block_offset & 0x007f0000) >> 16; } // @@ -112,6 +114,35 @@ namespace LLInitParam std::copy(src_block_data.mAllParams.begin(), src_block_data.mAllParams.end(), std::back_inserter(mAllParams)); } + void BlockDescriptor::addParam(const ParamDescriptorPtr in_param, const char* char_name) + { + // create a copy of the param descriptor in mAllParams + // so other data structures can store a pointer to it + mAllParams.push_back(in_param); + ParamDescriptorPtr param(mAllParams.back()); + + std::string name(char_name); + if ((size_t)param->mParamHandle > mMaxParamOffset) + { + llerrs << "Attempted to register param with block defined for parent class, make sure to derive from LLInitParam::Block<YOUR_CLASS, PARAM_BLOCK_BASE_CLASS>" << llendl; + } + + if (name.empty()) + { + mUnnamedParams.push_back(param); + } + else + { + // don't use insert, since we want to overwrite existing entries + mNamedParams[name] = param; + } + + if (param->mValidationFunc) + { + mValidationList.push_back(std::make_pair(param->mParamHandle, param->mValidationFunc)); + } + } + BlockDescriptor::BlockDescriptor() : mMaxParamOffset(0), mInitializationState(UNINITIALIZED), @@ -150,7 +181,8 @@ namespace LLInitParam bool BaseBlock::submitValue(Parser::name_stack_t& name_stack, Parser& p, bool silent) { - if (!deserializeBlock(p, std::make_pair(name_stack.begin(), name_stack.end()), true)) + Parser::name_stack_range_t range = std::make_pair(name_stack.begin(), name_stack.end()); + if (!deserializeBlock(p, range, true)) { if (!silent) { @@ -196,12 +228,7 @@ namespace LLInitParam if (serialize_func) { const Param* diff_param = diff_block ? diff_block->getParamFromHandle(param_handle) : NULL; - // each param descriptor remembers its serial number - // so we can inspect the same param under different names - // and see that it has the same number - name_stack.push_back(std::make_pair("", true)); serialize_func(*param, parser, name_stack, diff_param); - name_stack.pop_back(); } } @@ -295,7 +322,7 @@ namespace LLInitParam return true; } - bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool ignored) + bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t& name_stack_range, bool ignored) { BlockDescriptor& block_data = mostDerivedBlockDescriptor(); bool names_left = name_stack_range.first != name_stack_range.second; @@ -308,15 +335,12 @@ namespace LLInitParam { const std::string& top_name = name_stack_range.first->first; - ParamDescriptor::deserialize_func_t deserialize_func = NULL; - Param* paramp = NULL; - BlockDescriptor::param_map_t::iterator found_it = block_data.mNamedParams.find(top_name); if (found_it != block_data.mNamedParams.end()) { // find pointer to member parameter from offset table - paramp = getParamFromHandle(found_it->second->mParamHandle); - deserialize_func = found_it->second->mDeserializeFunc; + Param* paramp = getParamFromHandle(found_it->second->mParamHandle); + ParamDescriptor::deserialize_func_t deserialize_func = found_it->second->mDeserializeFunc; Parser::name_stack_range_t new_name_stack(name_stack_range.first, name_stack_range.second); ++new_name_stack.first; @@ -358,36 +382,6 @@ namespace LLInitParam return false; } - //static - void BaseBlock::addParam(BlockDescriptor& block_data, const ParamDescriptorPtr in_param, const char* char_name) - { - // create a copy of the param descriptor in mAllParams - // so other data structures can store a pointer to it - block_data.mAllParams.push_back(in_param); - ParamDescriptorPtr param(block_data.mAllParams.back()); - - std::string name(char_name); - if ((size_t)param->mParamHandle > block_data.mMaxParamOffset) - { - llerrs << "Attempted to register param with block defined for parent class, make sure to derive from LLInitParam::Block<YOUR_CLASS, PARAM_BLOCK_BASE_CLASS>" << llendl; - } - - if (name.empty()) - { - block_data.mUnnamedParams.push_back(param); - } - else - { - // don't use insert, since we want to overwrite existing entries - block_data.mNamedParams[name] = param; - } - - if (param->mValidationFunc) - { - block_data.mValidationList.push_back(std::make_pair(param->mParamHandle, param->mValidationFunc)); - } - } - void BaseBlock::addSynonym(Param& param, const std::string& synonym) { BlockDescriptor& block_data = mostDerivedBlockDescriptor(); @@ -460,7 +454,7 @@ namespace LLInitParam if (merge_func) { Param* paramp = getParamFromHandle((*it)->mParamHandle); - llassert(paramp->mEnclosingBlockOffset == (*it)->mParamHandle); + llassert(paramp->getEnclosingBlockOffset() == (*it)->mParamHandle); some_param_changed |= merge_func(*paramp, *other_paramp, overwrite); } } diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h index 99983a19cb..ae836645b9 100644 --- a/indra/llcommon/llinitparam.h +++ b/indra/llcommon/llinitparam.h @@ -31,11 +31,77 @@ #include <vector> #include <boost/function.hpp> #include <boost/type_traits/is_convertible.hpp> +#include <boost/type_traits/is_enum.hpp> #include <boost/unordered_map.hpp> #include <boost/shared_ptr.hpp> #include "llerror.h" -#include "lltypeinfolookup.h" +#include "llstl.h" + +namespace LLTypeTags +{ + template <typename INNER_TYPE, int _SORT_ORDER> + struct TypeTagBase + { + typedef void is_tag_t; + typedef INNER_TYPE inner_t; + static const int SORT_ORDER=_SORT_ORDER; + }; + + template <int VAL1, int VAL2> + struct GreaterThan + { + static const bool value = VAL1 > VAL2; + }; + + template<typename ITEM, typename REST, bool NEEDS_SWAP = GreaterThan<ITEM::SORT_ORDER, REST::SORT_ORDER>::value > + struct Swap + { + typedef typename ITEM::template Cons<REST>::value_t value_t; + }; + + template<typename ITEM, typename REST> + struct Swap<ITEM, REST, true> + { + typedef typename REST::template Cons<Swap<ITEM, typename REST::inner_t>::value_t>::value_t value_t; + }; + + template<typename T, typename SORTABLE = void> + struct IsSortable + { + static const bool value = false; + }; + + template<typename T> + struct IsSortable<T, typename T::is_tag_t> + { + static const bool value = true; + }; + + template<typename ITEM, typename REST, bool IS_REST_SORTABLE = IsSortable<REST>::value> + struct InsertInto + { + typedef typename ITEM::template Cons<REST>::value_t value_t; + }; + + template<typename ITEM, typename REST> + struct InsertInto <ITEM, REST, true> + { + typedef typename Swap<ITEM, REST>::value_t value_t; + }; + + template<typename T, bool SORTABLE = IsSortable<T>::value> + struct Sorted + { + typedef T value_t; + }; + + template<typename T> + struct Sorted <T, true> + { + typedef typename InsertInto<T, typename Sorted<typename T::inner_t>::value_t>::value_t value_t; + }; +} namespace LLInitParam { @@ -44,6 +110,8 @@ namespace LLInitParam template<typename T> const T& defaultValue() { static T value; return value; } + // wraps comparison operator between any 2 values of the same type + // specialize to handle cases where equality isn't defined well, or at all template <typename T, bool IS_BOOST_FUNCTION = boost::is_convertible<T, boost::function_base>::value > struct ParamCompare { @@ -78,24 +146,123 @@ namespace LLInitParam // helper functions and classes typedef ptrdiff_t param_handle_t; + struct IS_A_BLOCK {}; + struct NOT_BLOCK {}; + + // these templates allow us to distinguish between template parameters + // that derive from BaseBlock and those that don't + template<typename T, typename BLOCK_IDENTIFIER = void> + struct IsBlock + { + typedef NOT_BLOCK value_t; + }; + + template<typename T> + struct IsBlock<T, typename T::baseblock_base_class_t> + { + typedef IS_A_BLOCK value_t; + }; + + // ParamValue class directly manages the wrapped value + // by holding on to a copy (scalar params) + // or deriving from it (blocks) + // has specializations for custom value behavior + // and "tag" values like Lazy and Atomic + template<typename T, typename VALUE_IS_BLOCK = typename IsBlock<T>::value_t> + class ParamValue + { + typedef ParamValue<T, VALUE_IS_BLOCK> self_t; + + public: + typedef T default_value_t; + typedef T value_t; + + ParamValue(): mValue() {} + ParamValue(const default_value_t& other) : mValue(other) {} + + void setValue(const value_t& val) + { + mValue = val; + } + + const value_t& getValue() const + { + return mValue; + } + + T& getValue() + { + return mValue; + } + + protected: + T mValue; + }; + + template<typename T> + class ParamValue<T, IS_A_BLOCK> + : public T + { + typedef ParamValue<T, IS_A_BLOCK> self_t; + public: + typedef T default_value_t; + typedef T value_t; + + ParamValue() + : T(), + mValidated(false) + {} + + ParamValue(const default_value_t& other) + : T(other), + mValidated(false) + {} + + void setValue(const value_t& val) + { + *this = val; + } + + const value_t& getValue() const + { + return *this; + } + + T& getValue() + { + return *this; + } + + protected: + mutable bool mValidated; // lazy validation flag + }; + // empty default implementation of key cache // leverages empty base class optimization template <typename T> class TypeValues + : public ParamValue<typename LLTypeTags::Sorted<T>::value_t> { private: struct Inaccessable{}; public: typedef std::map<std::string, T> value_name_map_t; typedef Inaccessable name_t; + typedef TypeValues<T> type_value_t; + typedef ParamValue<typename LLTypeTags::Sorted<T>::value_t> param_value_t; + typedef typename param_value_t::value_t value_t; + + TypeValues(const typename param_value_t::value_t& val) + : param_value_t(val) + {} void setValueName(const std::string& key) {} std::string getValueName() const { return ""; } - std::string calcValueName(const T& value) const { return ""; } + std::string calcValueName(const value_t& value) const { return ""; } void clearValueName() const {} - static bool getValueFromName(const std::string& name, T& value) + static bool getValueFromName(const std::string& name, value_t& value) { return false; } @@ -110,15 +277,39 @@ namespace LLInitParam return NULL; } + void assignNamedValue(const Inaccessable& name) + {} + + operator const value_t&() const + { + return param_value_t::getValue(); + } + + const value_t& operator()() const + { + return param_value_t::getValue(); + } + static value_name_map_t* getValueNames() {return NULL;} }; - template <typename T, typename DERIVED_TYPE = TypeValues<T> > + // helper class to implement name value lookups + // and caching of last used name + template <typename T, typename DERIVED_TYPE = TypeValues<T>, bool IS_SPECIALIZED = true > class TypeValuesHelper + : public ParamValue<typename LLTypeTags::Sorted<T>::value_t> { + typedef TypeValuesHelper<T, DERIVED_TYPE, IS_SPECIALIZED> self_t; public: typedef typename std::map<std::string, T> value_name_map_t; typedef std::string name_t; + typedef self_t type_value_t; + typedef ParamValue<typename LLTypeTags::Sorted<T>::value_t> param_value_t; + typedef typename param_value_t::value_t value_t; + + TypeValuesHelper(const typename param_value_t::value_t& val) + : param_value_t(val) + {} //TODO: cache key by index to save on param block size void setValueName(const std::string& value_name) @@ -131,7 +322,7 @@ namespace LLInitParam return mValueName; } - std::string calcValueName(const T& value) const + std::string calcValueName(const value_t& value) const { value_name_map_t* map = getValueNames(); for (typename value_name_map_t::iterator it = map->begin(), end_it = map->end(); @@ -152,7 +343,7 @@ namespace LLInitParam mValueName.clear(); } - static bool getValueFromName(const std::string& name, T& value) + static bool getValueFromName(const std::string& name, value_t& value) { value_name_map_t* map = getValueNames(); typename value_name_map_t::iterator found_it = map->find(name); @@ -194,32 +385,94 @@ namespace LLInitParam return &sValues; } - static void declare(const std::string& name, const T& value) + static void declare(const std::string& name, const value_t& value) { (*getValueNames())[name] = value; } + void operator ()(const std::string& name) + { + *this = name; + } + + void assignNamedValue(const std::string& name) + { + if (getValueFromName(name, param_value_t::getValue())) + { + setValueName(name); + } + } + + operator const value_t&() const + { + return param_value_t::getValue(); + } + + const value_t& operator()() const + { + return param_value_t::getValue(); + } + protected: - static void getName(const std::string& name, const T& value) + static void getName(const std::string& name, const value_t& value) {} mutable std::string mValueName; }; - class LL_COMMON_API Parser + // string types can support custom named values, but need + // to disambiguate in code between a string that is a named value + // and a string that is a name + template <typename DERIVED_TYPE> + class TypeValuesHelper<std::string, DERIVED_TYPE, true> + : public TypeValuesHelper<std::string, DERIVED_TYPE, false> { - LOG_CLASS(Parser); - public: - - struct CompareTypeID + typedef TypeValuesHelper<std::string, DERIVED_TYPE, true> self_t; + typedef TypeValuesHelper<std::string, DERIVED_TYPE, false> base_t; + typedef std::string value_t; + typedef std::string name_t; + typedef self_t type_value_t; + + TypeValuesHelper(const std::string& val) + : TypeValuesHelper(val) + {} + + void operator ()(const std::string& name) + { + *this = name; + } + + self_t& operator =(const std::string& name) { - bool operator()(const std::type_info* lhs, const std::type_info* rhs) const + if (base_t::getValueFromName(name, ParamValue<std::string>::getValue())) { - return lhs->before(*rhs); + base_t::setValueName(name); } - }; + else + { + ParamValue<std::string>::setValue(name); + } + return *this; + } + + operator const value_t&() const + { + return ParamValue<std::string>::getValue(); + } + + const value_t& operator()() const + { + return ParamValue<std::string>::getValue(); + } + + }; + // parser base class with mechanisms for registering readers/writers/inspectors of different types + class LL_COMMON_API Parser + { + LOG_CLASS(Parser); + public: typedef std::vector<std::pair<std::string, bool> > name_stack_t; typedef std::pair<name_stack_t::iterator, name_stack_t::iterator> name_stack_range_t; typedef std::vector<std::string> possible_values_t; @@ -228,9 +481,11 @@ namespace LLInitParam typedef bool (*parser_write_func_t)(Parser& parser, const void*, name_stack_t&); typedef boost::function<void (name_stack_t&, S32, S32, const possible_values_t*)> parser_inspect_func_t; - typedef LLTypeInfoLookup<parser_read_func_t> parser_read_func_map_t; - typedef LLTypeInfoLookup<parser_write_func_t> parser_write_func_map_t; - typedef LLTypeInfoLookup<parser_inspect_func_t> parser_inspect_func_map_t; + typedef std::map<const std::type_info*, parser_read_func_t> parser_read_func_map_t; + typedef std::map<const std::type_info*, parser_write_func_t> parser_write_func_map_t; + typedef std::map<const std::type_info*, parser_inspect_func_t> parser_inspect_func_map_t; + + public: Parser(parser_read_func_map_t& read_map, parser_write_func_map_t& write_map, parser_inspect_func_map_t& inspect_map) : mParseSilently(false), @@ -238,27 +493,50 @@ namespace LLInitParam mParserWriteFuncs(&write_map), mParserInspectFuncs(&inspect_map) {} + virtual ~Parser(); - template <typename T> bool readValue(T& param) - { - parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T)); - if (found_it != mParserReadFuncs->end()) - { - return found_it->second(*this, (void*)¶m); - } - return false; - } + template <typename T> bool readValue(T& param, typename boost::disable_if<boost::is_enum<T> >::type* dummy = 0) + { + parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T)); + if (found_it != mParserReadFuncs->end()) + { + return found_it->second(*this, (void*)¶m); + } + + return false; + } + + template <typename T> bool readValue(T& param, typename boost::enable_if<boost::is_enum<T> >::type* dummy = 0) + { + parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T)); + if (found_it != mParserReadFuncs->end()) + { + return found_it->second(*this, (void*)¶m); + } + else + { + found_it = mParserReadFuncs->find(&typeid(S32)); + if (found_it != mParserReadFuncs->end()) + { + S32 int_value; + bool parsed = found_it->second(*this, (void*)&int_value); + param = (T)int_value; + return parsed; + } + } + return false; + } template <typename T> bool writeValue(const T& param, name_stack_t& name_stack) - { - parser_write_func_map_t::iterator found_it = mParserWriteFuncs->find(&typeid(T)); - if (found_it != mParserWriteFuncs->end()) - { - return found_it->second(*this, (const void*)¶m, name_stack); - } - return false; - } + { + parser_write_func_map_t::iterator found_it = mParserWriteFuncs->find(&typeid(T)); + if (found_it != mParserWriteFuncs->end()) + { + return found_it->second(*this, (const void*)¶m, name_stack); + } + return false; + } // dispatch inspection to registered inspection functions, for each parameter in a param block template <typename T> bool inspectValue(name_stack_t& name_stack, S32 min_count, S32 max_count, const possible_values_t* possible_values) @@ -310,7 +588,7 @@ namespace LLInitParam }; typedef bool(*merge_func_t)(Param&, const Param&, bool); - typedef bool(*deserialize_func_t)(Param&, Parser&, const Parser::name_stack_range_t&, bool); + typedef bool(*deserialize_func_t)(Param&, Parser&, Parser::name_stack_range_t&, bool); typedef void(*serialize_func_t)(const Param&, Parser&, Parser::name_stack_t&, const Param* diff_param); typedef void(*inspect_func_t)(const Param&, Parser&, Parser::name_stack_t&, S32 min_count, S32 max_count); typedef bool(*validation_func_t)(const Param*); @@ -355,6 +633,7 @@ namespace LLInitParam } EInitializationState; void aggregateBlockData(BlockDescriptor& src_block_data); + void addParam(ParamDescriptorPtr param, const char* name); typedef boost::unordered_map<const std::string, ParamDescriptorPtr> param_map_t; typedef std::vector<ParamDescriptorPtr> param_list_t; @@ -370,48 +649,58 @@ namespace LLInitParam class BaseBlock* mCurrentBlockPtr; // pointer to block currently being constructed }; - class LL_COMMON_API BaseBlock - { - public: //TODO: implement in terms of owned_ptr template<typename T> - class Lazy + class LazyValue { public: - Lazy() + LazyValue() : mPtr(NULL) {} - ~Lazy() + ~LazyValue() { delete mPtr; } - Lazy(const Lazy& other) + LazyValue(const T& value) { - if (other.mPtr) + mPtr = new T(value); + } + + LazyValue(const LazyValue& other) + : mPtr(NULL) { - mPtr = new T(*other.mPtr); + *this = other; } - else + + LazyValue& operator = (const LazyValue& other) { + if (!other.mPtr) + { + delete mPtr; mPtr = NULL; } - } - - Lazy<T>& operator = (const Lazy<T>& other) + else { - if (other.mPtr) + if (!mPtr) { mPtr = new T(*other.mPtr); } else { - mPtr = NULL; + *mPtr = *(other.mPtr); + } } return *this; } + bool operator==(const LazyValue& other) const + { + if (empty() || other.empty()) return false; + return *mPtr == *other.mPtr; + } + bool empty() const { return mPtr == NULL; @@ -419,18 +708,29 @@ namespace LLInitParam void set(const T& other) { - delete mPtr; + if (!mPtr) + { mPtr = new T(other); } + else + { + *mPtr = other; + } + } const T& get() const { - return ensureInstance(); + return *ensureInstance(); } T& get() { - return ensureInstance(); + return *ensureInstance(); + } + + operator const T&() const + { + return get(); } private: @@ -445,13 +745,50 @@ namespace LLInitParam } private: - // if you get a compilation error with this, that means you are using a forward declared struct for T - // unfortunately, the type traits we rely on don't work with forward declared typed - //static const int dummy = sizeof(T); mutable T* mPtr; }; + // root class of all parameter blocks + + class LL_COMMON_API BaseBlock + { + public: + // lift block tags into baseblock namespace so derived classes do not need to qualify them + typedef LLInitParam::IS_A_BLOCK IS_A_BLOCK; + typedef LLInitParam::NOT_BLOCK NOT_A_BLOCK; + + template<typename T> + struct Sequential : public LLTypeTags::TypeTagBase<T, 2> + { + template <typename S> struct Cons { typedef Sequential<ParamValue<S> > value_t; }; + template <typename S> struct Cons<Sequential<S> > { typedef Sequential<S> value_t; }; + }; + + template<typename T> + struct Atomic : public LLTypeTags::TypeTagBase<T, 1> + { + template <typename S> struct Cons { typedef Atomic<ParamValue<S> > value_t; }; + template <typename S> struct Cons<Atomic<S> > { typedef Atomic<S> value_t; }; + }; + + template<typename T, typename BLOCK_T = typename IsBlock<T>::value_t > + struct Lazy : public LLTypeTags::TypeTagBase<T, 0> + { + template <typename S> struct Cons + { + typedef Lazy<ParamValue<S, BLOCK_T>, BLOCK_T> value_t; + }; + template <typename S> struct Cons<Lazy<S, IS_A_BLOCK> > + { + typedef Lazy<S, IS_A_BLOCK> value_t; + }; + template <typename S> struct Cons<Lazy<S, NOT_A_BLOCK> > + { + typedef Lazy<S, BLOCK_T> value_t; + }; + }; + // "Multiple" constraint types, put here in root class to avoid ambiguity during use struct AnyAmount { @@ -517,12 +854,12 @@ namespace LLInitParam // Blocks can override this to do custom tracking of changes virtual void paramChanged(const Param& changed_param, bool user_provided) {} - bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name); + bool deserializeBlock(Parser& p, Parser::name_stack_range_t& name_stack_range, bool new_name); void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block = NULL) const; bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const; - virtual const BlockDescriptor& mostDerivedBlockDescriptor() const { return selfBlockDescriptor(); } - virtual BlockDescriptor& mostDerivedBlockDescriptor() { return selfBlockDescriptor(); } + virtual const BlockDescriptor& mostDerivedBlockDescriptor() const { return getBlockDescriptor(); } + virtual BlockDescriptor& mostDerivedBlockDescriptor() { return getBlockDescriptor(); } // take all provided params from other and apply to self bool overwriteFrom(const BaseBlock& other) @@ -536,10 +873,17 @@ namespace LLInitParam return false; } - static void addParam(BlockDescriptor& block_data, ParamDescriptorPtr param, const char* name); - ParamDescriptorPtr findParamDescriptor(const Param& param); + // take all provided params from other and apply to self + bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite); + + static BlockDescriptor& getBlockDescriptor() + { + static BlockDescriptor sBlockDescriptor; + return sBlockDescriptor; + } + protected: void init(BlockDescriptor& descriptor, BlockDescriptor& base_descriptor, size_t block_size); @@ -548,25 +892,11 @@ namespace LLInitParam { return mergeBlock(block_data, source, overwrite); } - // take all provided params from other and apply to self - bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite); - - static BlockDescriptor& selfBlockDescriptor() - { - static BlockDescriptor sBlockDescriptor; - return sBlockDescriptor; - } private: const std::string& getParamName(const BlockDescriptor& block_data, const Param* paramp) const; }; - template<typename T> - struct ParamCompare<BaseBlock::Lazy<T>, false > - { - static bool equals(const BaseBlock::Lazy<T>& a, const BaseBlock::Lazy<T>& b) { return !a.empty() || !b.empty(); } - }; - class LL_COMMON_API Param { public: @@ -595,284 +925,90 @@ namespace LLInitParam // get address of enclosing BLOCK class using stored offset to enclosing BaseBlock class return *const_cast<BaseBlock*> (reinterpret_cast<const BaseBlock*> - (my_addr - (ptrdiff_t)(S32)mEnclosingBlockOffset)); - } - - private: - friend class BaseBlock; - - U32 mEnclosingBlockOffset:31; - U32 mIsProvided:1; - - }; - - // these templates allow us to distinguish between template parameters - // that derive from BaseBlock and those that don't - template<typename T, typename Void = void> - struct IsBlock - { - static const bool value = false; - struct EmptyBase {}; - typedef EmptyBase base_class_t; - }; - - template<typename T> - struct IsBlock<T, typename T::baseblock_base_class_t> - { - static const bool value = true; - typedef BaseBlock base_class_t; - }; - - template<typename T> - struct IsBlock<BaseBlock::Lazy<T>, typename T::baseblock_base_class_t > - { - static const bool value = true; - typedef BaseBlock base_class_t; - }; - - template<typename T, typename NAME_VALUE_LOOKUP, bool VALUE_IS_BLOCK = IsBlock<T>::value> - class ParamValue : public NAME_VALUE_LOOKUP - { - public: - typedef const T& value_assignment_t; - typedef T value_t; - typedef ParamValue<T, NAME_VALUE_LOOKUP, VALUE_IS_BLOCK> self_t; - - ParamValue(): mValue() {} - ParamValue(value_assignment_t other) : mValue(other) {} - - void setValue(value_assignment_t val) - { - mValue = val; - } - - value_assignment_t getValue() const - { - return mValue; - } - - T& getValue() - { - return mValue; - } - - operator value_assignment_t() const - { - return mValue; - } - - value_assignment_t operator()() const - { - return mValue; - } - - void operator ()(const typename NAME_VALUE_LOOKUP::name_t& name) - { - *this = name; - } - - self_t& operator =(const typename NAME_VALUE_LOOKUP::name_t& name) - { - if (NAME_VALUE_LOOKUP::getValueFromName(name, mValue)) - { - setValueName(name); - } - - return *this; + (my_addr - (ptrdiff_t)getEnclosingBlockOffset())); } - protected: - T mValue; - }; - - template<typename T, typename NAME_VALUE_LOOKUP> - class ParamValue<T, NAME_VALUE_LOOKUP, true> - : public T, - public NAME_VALUE_LOOKUP + U32 getEnclosingBlockOffset() const { - public: - typedef const T& value_assignment_t; - typedef T value_t; - typedef ParamValue<T, NAME_VALUE_LOOKUP, true> self_t; - - ParamValue() - : T(), - mValidated(false) - {} - - ParamValue(value_assignment_t other) - : T(other), - mValidated(false) - {} - - void setValue(value_assignment_t val) - { - *this = val; - } - - value_assignment_t getValue() const - { - return *this; - } - - T& getValue() - { - return *this; - } - - operator value_assignment_t() const - { - return *this; - } - - value_assignment_t operator()() const - { - return *this; - } - - void operator ()(const typename NAME_VALUE_LOOKUP::name_t& name) - { - *this = name; + return ((U32)mEnclosingBlockOffsetHigh << 16) | (U32)mEnclosingBlockOffsetLow; } - self_t& operator =(const typename NAME_VALUE_LOOKUP::name_t& name) - { - if (NAME_VALUE_LOOKUP::getValueFromName(name, *this)) - { - setValueName(name); - } - - return *this; - } - - protected: - mutable bool mValidated; // lazy validation flag - }; - - template<typename NAME_VALUE_LOOKUP> - class ParamValue<std::string, NAME_VALUE_LOOKUP, false> - : public NAME_VALUE_LOOKUP - { - public: - typedef const std::string& value_assignment_t; - typedef std::string value_t; - typedef ParamValue<std::string, NAME_VALUE_LOOKUP, false> self_t; - - ParamValue(): mValue() {} - ParamValue(value_assignment_t other) : mValue(other) {} - - void setValue(value_assignment_t val) - { - if (NAME_VALUE_LOOKUP::getValueFromName(val, mValue)) - { - NAME_VALUE_LOOKUP::setValueName(val); - } - else - { - mValue = val; - } - } - - value_assignment_t getValue() const - { - return mValue; - } - - std::string& getValue() - { - return mValue; - } - - operator value_assignment_t() const - { - return mValue; - } + private: + friend class BaseBlock; - value_assignment_t operator()() const - { - return mValue; - } + //24 bits for member offset field and 1 bit for provided flag + U16 mEnclosingBlockOffsetLow; + U8 mEnclosingBlockOffsetHigh:7; + U8 mIsProvided:1; - protected: - std::string mValue; }; - template<typename T, typename NAME_VALUE_LOOKUP = TypeValues<T> > struct ParamIterator { - typedef typename std::vector<ParamValue<T, NAME_VALUE_LOOKUP> >::const_iterator const_iterator; - typedef typename std::vector<ParamValue<T, NAME_VALUE_LOOKUP> >::iterator iterator; + typedef typename std::vector<typename NAME_VALUE_LOOKUP::type_value_t >::const_iterator const_iterator; + typedef typename std::vector<typename NAME_VALUE_LOOKUP::type_value_t >::iterator iterator; }; - // specialize for custom parsing/decomposition of specific classes - // e.g. TypedParam<LLRect> has left, top, right, bottom, etc... + // wrapper for parameter with a known type + // specialized to handle 4 cases: + // simple "scalar" value + // parameter that is itself a block + // multiple scalar values, stored in a vector + // multiple blocks, stored in a vector template<typename T, typename NAME_VALUE_LOOKUP = TypeValues<T>, bool HAS_MULTIPLE_VALUES = false, - bool VALUE_IS_BLOCK = IsBlock<ParamValue<T, NAME_VALUE_LOOKUP> >::value> + typename VALUE_IS_BLOCK = typename IsBlock<ParamValue<typename LLTypeTags::Sorted<T>::value_t> >::value_t> class TypedParam : public Param, - public ParamValue<T, NAME_VALUE_LOOKUP> + public NAME_VALUE_LOOKUP::type_value_t { + protected: + typedef TypedParam<T, NAME_VALUE_LOOKUP, HAS_MULTIPLE_VALUES, VALUE_IS_BLOCK> self_t; + typedef ParamValue<typename LLTypeTags::Sorted<T>::value_t> param_value_t; + typedef typename param_value_t::default_value_t default_value_t; + typedef typename NAME_VALUE_LOOKUP::type_value_t named_value_t; public: - typedef TypedParam<T, NAME_VALUE_LOOKUP, HAS_MULTIPLE_VALUES, VALUE_IS_BLOCK> self_t; - typedef ParamValue<T, NAME_VALUE_LOOKUP> param_value_t; - typedef typename param_value_t::value_assignment_t value_assignment_t; - typedef NAME_VALUE_LOOKUP name_value_lookup_t; + typedef typename param_value_t::value_t value_t; - using param_value_t::operator(); + using named_value_t::operator(); - TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count) - : Param(block_descriptor.mCurrentBlockPtr) + TypedParam(BlockDescriptor& block_descriptor, const char* name, const default_value_t& value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count) + : Param(block_descriptor.mCurrentBlockPtr), + named_value_t(value) { if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING)) { - ParamDescriptorPtr param_descriptor = ParamDescriptorPtr(new ParamDescriptor( - block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), - &mergeWith, - &deserializeParam, - &serializeParam, - validate_func, - &inspectParam, - min_count, max_count)); - BaseBlock::addParam(block_descriptor, param_descriptor, name); + init(block_descriptor, validate_func, min_count, max_count, name); } - - setValue(value); } bool isProvided() const { return Param::anyProvided(); } - static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name) + static bool deserializeParam(Param& param, Parser& parser, Parser::name_stack_range_t& name_stack_range, bool new_name) { self_t& typed_param = static_cast<self_t&>(param); // no further names in stack, attempt to parse value now if (name_stack_range.first == name_stack_range.second) - { - if (parser.readValue(typed_param.getValue())) + { + std::string name; + + // try to parse a known named value + if(named_value_t::valueNamesExist() + && parser.readValue(name) + && named_value_t::getValueFromName(name, typed_param.getValue())) { - typed_param.clearValueName(); + typed_param.setValueName(name); typed_param.setProvided(); return true; } - - // try to parse a known named value - if(name_value_lookup_t::valueNamesExist()) + // try to read value directly + else if (parser.readValue(typed_param.getValue())) { - // try to parse a known named value - std::string name; - if (parser.readValue(name)) - { - // try to parse a per type named value - if (name_value_lookup_t::getValueFromName(name, typed_param.getValue())) - { - typed_param.setValueName(name); - typed_param.setProvided(); - return true; - } - - } + typed_param.clearValueName(); + typed_param.setProvided(); + return true; } } return false; @@ -905,7 +1041,9 @@ namespace LLInitParam if (!parser.writeValue(typed_param.getValue(), name_stack)) { std::string calculated_key = typed_param.calcValueName(typed_param.getValue()); - if (!diff_param || !ParamCompare<std::string>::equals(static_cast<const self_t*>(diff_param)->getValueName(), calculated_key)) + if (calculated_key.size() + && (!diff_param + || !ParamCompare<std::string>::equals(static_cast<const self_t*>(diff_param)->getValueName(), calculated_key))) { parser.writeValue(calculated_key, name_stack); } @@ -918,22 +1056,23 @@ namespace LLInitParam // tell parser about our actual type parser.inspectValue<T>(name_stack, min_count, max_count, NULL); // then tell it about string-based alternatives ("red", "blue", etc. for LLColor4) - if (name_value_lookup_t::getPossibleValues()) + if (named_value_t::getPossibleValues()) { - parser.inspectValue<std::string>(name_stack, min_count, max_count, name_value_lookup_t::getPossibleValues()); + parser.inspectValue<std::string>(name_stack, min_count, max_count, named_value_t::getPossibleValues()); } } - void set(value_assignment_t val, bool flag_as_provided = true) + void set(const value_t& val, bool flag_as_provided = true) { - param_value_t::clearValueName(); + named_value_t::clearValueName(); setValue(val); setProvided(flag_as_provided); } - self_t& operator =(const typename NAME_VALUE_LOOKUP::name_t& name) + self_t& operator =(const typename named_value_t::name_t& name) { - return static_cast<self_t&>(param_value_t::operator =(name)); + named_value_t::assignNamedValue(name); + return *this; } protected: @@ -958,67 +1097,72 @@ namespace LLInitParam } return false; } + private: + void init( BlockDescriptor &block_descriptor, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count, const char* name ) + { + ParamDescriptorPtr param_descriptor = ParamDescriptorPtr(new ParamDescriptor( + block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), + &mergeWith, + &deserializeParam, + &serializeParam, + validate_func, + &inspectParam, + min_count, max_count)); + block_descriptor.addParam(param_descriptor, name); + } }; // parameter that is a block template <typename T, typename NAME_VALUE_LOOKUP> - class TypedParam<T, NAME_VALUE_LOOKUP, false, true> + class TypedParam<T, NAME_VALUE_LOOKUP, false, IS_A_BLOCK> : public Param, - public ParamValue<T, NAME_VALUE_LOOKUP> + public NAME_VALUE_LOOKUP::type_value_t { + protected: + typedef ParamValue<typename LLTypeTags::Sorted<T>::value_t> param_value_t; + typedef typename param_value_t::default_value_t default_value_t; + typedef TypedParam<T, NAME_VALUE_LOOKUP, false, IS_A_BLOCK> self_t; + typedef typename NAME_VALUE_LOOKUP::type_value_t named_value_t; public: - typedef ParamValue<T, NAME_VALUE_LOOKUP> param_value_t; - typedef typename param_value_t::value_assignment_t value_assignment_t; - typedef TypedParam<T, NAME_VALUE_LOOKUP, false, true> self_t; - typedef NAME_VALUE_LOOKUP name_value_lookup_t; + using named_value_t::operator(); + typedef typename param_value_t::value_t value_t; - using param_value_t::operator(); - - TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count) + TypedParam(BlockDescriptor& block_descriptor, const char* name, const default_value_t& value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count) : Param(block_descriptor.mCurrentBlockPtr), - param_value_t(value) + named_value_t(value) { if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING)) { - ParamDescriptorPtr param_descriptor = ParamDescriptorPtr(new ParamDescriptor( - block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), - &mergeWith, - &deserializeParam, - &serializeParam, - validate_func, - &inspectParam, - min_count, max_count)); - BaseBlock::addParam(block_descriptor, param_descriptor, name); + init(block_descriptor, validate_func, min_count, max_count, name); } } - static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name) + static bool deserializeParam(Param& param, Parser& parser, Parser::name_stack_range_t& name_stack_range, bool new_name) { self_t& typed_param = static_cast<self_t&>(param); - // attempt to parse block... + + if (name_stack_range.first == name_stack_range.second) + { // try to parse a known named value + std::string name; + + if(named_value_t::valueNamesExist() + && parser.readValue(name) + && named_value_t::getValueFromName(name, typed_param.getValue())) + { + typed_param.setValueName(name); + typed_param.setProvided(); + return true; + } + } + if(typed_param.deserializeBlock(parser, name_stack_range, new_name)) - { + { // attempt to parse block... typed_param.clearValueName(); typed_param.setProvided(); return true; } - if(name_value_lookup_t::valueNamesExist()) - { - // try to parse a known named value - std::string name; - if (parser.readValue(name)) - { - // try to parse a per type named value - if (name_value_lookup_t::getValueFromName(name, typed_param.getValue())) - { - typed_param.setValueName(name); - typed_param.setProvided(); - return true; - } - } - } return false; } @@ -1035,9 +1179,9 @@ namespace LLInitParam std::string key = typed_param.getValueName(); if (!key.empty()) { - if (!parser.writeValue(key, name_stack)) + if (!diff_param || !ParamCompare<std::string>::equals(static_cast<const self_t*>(diff_param)->getValueName(), key)) { - return; + parser.writeValue(key, name_stack); } } else @@ -1048,8 +1192,16 @@ namespace LLInitParam static void inspectParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, S32 min_count, S32 max_count) { - // I am a param that is also a block, so just recurse into my contents const self_t& typed_param = static_cast<const self_t&>(param); + + // tell parser about our actual type + parser.inspectValue<value_t>(name_stack, min_count, max_count, NULL); + // then tell it about string-based alternatives ("red", "blue", etc. for LLColor4) + if (named_value_t::getPossibleValues()) + { + parser.inspectValue<std::string>(name_stack, min_count, max_count, named_value_t::getPossibleValues()); + } + typed_param.inspectBlock(parser, name_stack, min_count, max_count); } @@ -1067,32 +1219,34 @@ namespace LLInitParam } // assign block contents to this param-that-is-a-block - void set(value_assignment_t val, bool flag_as_provided = true) + void set(const value_t& val, bool flag_as_provided = true) { setValue(val); - param_value_t::clearValueName(); + named_value_t::clearValueName(); // force revalidation of block // next call to isProvided() will update provision status based on validity param_value_t::mValidated = false; setProvided(flag_as_provided); } - self_t& operator =(const typename NAME_VALUE_LOOKUP::name_t& name) + self_t& operator =(const typename named_value_t::name_t& name) { - return static_cast<self_t&>(param_value_t::operator =(name)); + named_value_t::assignNamedValue(name); + return *this; } // propagate changed status up to enclosing block /*virtual*/ void paramChanged(const Param& changed_param, bool user_provided) { param_value_t::paramChanged(changed_param, user_provided); + if (user_provided) { // a child param has been explicitly changed // so *some* aspect of this block is now provided param_value_t::mValidated = false; setProvided(); - param_value_t::clearValueName(); + named_value_t::clearValueName(); } else { @@ -1116,7 +1270,7 @@ namespace LLInitParam if (src_typed_param.anyProvided()) { - if (dst_typed_param.mergeBlockParam(src_typed_param.isProvided(), dst_typed_param.isProvided(), param_value_t::selfBlockDescriptor(), src_typed_param, overwrite)) + if (dst_typed_param.mergeBlockParam(src_typed_param.isProvided(), dst_typed_param.isProvided(), param_value_t::getBlockDescriptor(), src_typed_param, overwrite)) { dst_typed_param.clearValueName(); dst_typed_param.setProvided(true); @@ -1125,73 +1279,81 @@ namespace LLInitParam } return false; } + + private: + void init( BlockDescriptor &block_descriptor, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count, const char* name ) + { + ParamDescriptorPtr param_descriptor = ParamDescriptorPtr(new ParamDescriptor( + block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), + &mergeWith, + &deserializeParam, + &serializeParam, + validate_func, + &inspectParam, + min_count, max_count)); + block_descriptor.addParam(param_descriptor, name); + } }; - // container of non-block parameters + // list of non-block parameters template <typename VALUE_TYPE, typename NAME_VALUE_LOOKUP> - class TypedParam<VALUE_TYPE, NAME_VALUE_LOOKUP, true, false> + class TypedParam<VALUE_TYPE, NAME_VALUE_LOOKUP, true, NOT_BLOCK> : public Param { + protected: + typedef TypedParam<VALUE_TYPE, NAME_VALUE_LOOKUP, true, NOT_BLOCK> self_t; + typedef ParamValue<typename LLTypeTags::Sorted<VALUE_TYPE>::value_t> param_value_t; + typedef typename std::vector<typename NAME_VALUE_LOOKUP::type_value_t> container_t; + typedef container_t default_value_t; + typedef typename NAME_VALUE_LOOKUP::type_value_t named_value_t; + public: - typedef TypedParam<VALUE_TYPE, NAME_VALUE_LOOKUP, true, false> self_t; - typedef ParamValue<VALUE_TYPE, NAME_VALUE_LOOKUP> param_value_t; - typedef typename std::vector<param_value_t> container_t; - typedef const container_t& value_assignment_t; - typedef typename param_value_t::value_t value_t; - typedef NAME_VALUE_LOOKUP name_value_lookup_t; - TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count) + TypedParam(BlockDescriptor& block_descriptor, const char* name, const default_value_t& value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count) : Param(block_descriptor.mCurrentBlockPtr) { std::copy(value.begin(), value.end(), std::back_inserter(mValues)); if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING)) { - ParamDescriptorPtr param_descriptor = ParamDescriptorPtr(new ParamDescriptor( - block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), - &mergeWith, - &deserializeParam, - &serializeParam, - validate_func, - &inspectParam, - min_count, max_count)); - BaseBlock::addParam(block_descriptor, param_descriptor, name); + init(block_descriptor, validate_func, min_count, max_count, name); + } } bool isProvided() const { return Param::anyProvided(); } - static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name) + static bool deserializeParam(Param& param, Parser& parser, Parser::name_stack_range_t& name_stack_range, bool new_name) { + Parser::name_stack_range_t new_name_stack_range(name_stack_range); self_t& typed_param = static_cast<self_t&>(param); value_t value; + + // pop first element if empty string + if (new_name_stack_range.first != new_name_stack_range.second && new_name_stack_range.first->first.empty()) + { + ++new_name_stack_range.first; + } + // no further names in stack, attempt to parse value now if (name_stack_range.first == name_stack_range.second) - { - // attempt to read value directly - if (parser.readValue(value)) + { + std::string name; + + // try to parse a known named value + if(named_value_t::valueNamesExist() + && parser.readValue(name) + && named_value_t::getValueFromName(name, value)) { typed_param.add(value); + typed_param.mValues.back().setValueName(name); return true; } - - // try to parse a known named value - if(name_value_lookup_t::valueNamesExist()) + else if (parser.readValue(value)) // attempt to read value directly { - // try to parse a known named value - std::string name; - if (parser.readValue(name)) - { - // try to parse a per type named value - if (name_value_lookup_t::getValueFromName(name, value)) - { - typed_param.add(value); - typed_param.mValues.back().setValueName(name); - return true; - } - - } + typed_param.add(value); + return true; } } return false; @@ -1200,14 +1362,14 @@ namespace LLInitParam static void serializeParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, const Param* diff_param) { const self_t& typed_param = static_cast<const self_t&>(param); - if (!typed_param.isProvided() || name_stack.empty()) return; + if (!typed_param.isProvided()) return; for (const_iterator it = typed_param.mValues.begin(), end_it = typed_param.mValues.end(); it != end_it; ++it) { std::string key = it->getValueName(); - name_stack.back().second = true; + name_stack.push_back(std::make_pair(std::string(), true)); if(key.empty()) // not parsed via name values, write out value directly @@ -1229,19 +1391,21 @@ namespace LLInitParam break; } } + + name_stack.pop_back(); } } static void inspectParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, S32 min_count, S32 max_count) { parser.inspectValue<VALUE_TYPE>(name_stack, min_count, max_count, NULL); - if (name_value_lookup_t::getPossibleValues()) + if (named_value_t::getPossibleValues()) { - parser.inspectValue<std::string>(name_stack, min_count, max_count, name_value_lookup_t::getPossibleValues()); + parser.inspectValue<std::string>(name_stack, min_count, max_count, named_value_t::getPossibleValues()); } } - void set(value_assignment_t val, bool flag_as_provided = true) + void set(const container_t& val, bool flag_as_provided = true) { mValues = val; setProvided(flag_as_provided); @@ -1249,26 +1413,24 @@ namespace LLInitParam param_value_t& add() { - mValues.push_back(param_value_t(value_t())); + mValues.push_back(value_t()); Param::setProvided(); return mValues.back(); } self_t& add(const value_t& item) { - param_value_t param_value; - param_value.setValue(item); - mValues.push_back(param_value); + mValues.push_back(item); setProvided(); return *this; } - self_t& add(const typename name_value_lookup_t::name_t& name) + self_t& add(const typename named_value_t::name_t& name) { value_t value; // try to parse a per type named value - if (name_value_lookup_t::getValueFromName(name, value)) + if (named_value_t::getValueFromName(name, value)) { add(value); mValues.back().setValueName(name); @@ -1278,9 +1440,9 @@ namespace LLInitParam } // implicit conversion - operator value_assignment_t() const { return mValues; } + operator const container_t&() const { return mValues; } // explicit conversion - value_assignment_t operator()() const { return mValues; } + const container_t& operator()() const { return mValues; } typedef typename container_t::iterator iterator; typedef typename container_t::const_iterator const_iterator; @@ -1321,78 +1483,98 @@ namespace LLInitParam } container_t mValues; + + private: + void init( BlockDescriptor &block_descriptor, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count, const char* name ) + { + ParamDescriptorPtr param_descriptor = ParamDescriptorPtr(new ParamDescriptor( + block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), + &mergeWith, + &deserializeParam, + &serializeParam, + validate_func, + &inspectParam, + min_count, max_count)); + block_descriptor.addParam(param_descriptor, name); + } }; - // container of block parameters + // list of block parameters template <typename VALUE_TYPE, typename NAME_VALUE_LOOKUP> - class TypedParam<VALUE_TYPE, NAME_VALUE_LOOKUP, true, true> + class TypedParam<VALUE_TYPE, NAME_VALUE_LOOKUP, true, IS_A_BLOCK> : public Param { + protected: + typedef TypedParam<VALUE_TYPE, NAME_VALUE_LOOKUP, true, IS_A_BLOCK> self_t; + typedef ParamValue<typename LLTypeTags::Sorted<VALUE_TYPE>::value_t> param_value_t; + typedef typename std::vector<typename NAME_VALUE_LOOKUP::type_value_t> container_t; + typedef typename NAME_VALUE_LOOKUP::type_value_t named_value_t; + typedef container_t default_value_t; + typedef typename container_t::iterator iterator; + typedef typename container_t::const_iterator const_iterator; public: - typedef TypedParam<VALUE_TYPE, NAME_VALUE_LOOKUP, true, true> self_t; - typedef ParamValue<VALUE_TYPE, NAME_VALUE_LOOKUP> param_value_t; - typedef typename std::vector<param_value_t> container_t; - typedef const container_t& value_assignment_t; typedef typename param_value_t::value_t value_t; - typedef NAME_VALUE_LOOKUP name_value_lookup_t; - TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count) + TypedParam(BlockDescriptor& block_descriptor, const char* name, const default_value_t& value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count) : Param(block_descriptor.mCurrentBlockPtr) { std::copy(value.begin(), value.end(), back_inserter(mValues)); if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING)) { - ParamDescriptorPtr param_descriptor = ParamDescriptorPtr(new ParamDescriptor( - block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), - &mergeWith, - &deserializeParam, - &serializeParam, - validate_func, - &inspectParam, - min_count, max_count)); - BaseBlock::addParam(block_descriptor, param_descriptor, name); + init(block_descriptor, validate_func, min_count, max_count, name); } } bool isProvided() const { return Param::anyProvided(); } - static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name) + static bool deserializeParam(Param& param, Parser& parser, Parser::name_stack_range_t& name_stack_range, bool new_name) { + Parser::name_stack_range_t new_name_stack_range(name_stack_range); self_t& typed_param = static_cast<self_t&>(param); bool new_value = false; + bool new_array_value = false; + + // pop first element if empty string + if (new_name_stack_range.first != new_name_stack_range.second && new_name_stack_range.first->first.empty()) + { + new_array_value = new_name_stack_range.first->second; + ++new_name_stack_range.first; + } - if (new_name || typed_param.mValues.empty()) + if (new_name || new_array_value || typed_param.mValues.empty()) { new_value = true; typed_param.mValues.push_back(value_t()); } - param_value_t& value = typed_param.mValues.back(); + if (name_stack_range.first == name_stack_range.second) + { // try to parse a known named value + std::string name; + + if(named_value_t::valueNamesExist() + && parser.readValue(name) + && named_value_t::getValueFromName(name, value.getValue())) + { + typed_param.mValues.back().setValueName(name); + typed_param.setProvided(); + return true; + } + } + // attempt to parse block... - if(value.deserializeBlock(parser, name_stack_range, new_name)) + if(value.deserializeBlock(parser, new_name_stack_range, new_name)) { typed_param.setProvided(); - return true; - } - else if(name_value_lookup_t::valueNamesExist()) - { - // try to parse a known named value - std::string name; - if (parser.readValue(name)) + if (new_array_value) { - // try to parse a per type named value - if (name_value_lookup_t::getValueFromName(name, value.getValue())) - { - typed_param.mValues.back().setValueName(name); - typed_param.setProvided(); - return true; - } - + name_stack_range.first->second = false; } + return true; } + if (new_value) { // failed to parse new value, pop it off typed_param.mValues.pop_back(); @@ -1404,13 +1586,13 @@ namespace LLInitParam static void serializeParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, const Param* diff_param) { const self_t& typed_param = static_cast<const self_t&>(param); - if (!typed_param.isProvided() || name_stack.empty()) return; + if (!typed_param.isProvided()) return; for (const_iterator it = typed_param.mValues.begin(), end_it = typed_param.mValues.end(); it != end_it; ++it) { - name_stack.back().second = true; + name_stack.push_back(std::make_pair(std::string(), true)); std::string key = it->getValueName(); if (!key.empty()) @@ -1423,16 +1605,27 @@ namespace LLInitParam { it->serializeBlock(parser, name_stack, NULL); } + + name_stack.pop_back(); } } static void inspectParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, S32 min_count, S32 max_count) { - // I am a vector of blocks, so describe my contents recursively - param_value_t(value_t()).inspectBlock(parser, name_stack, min_count, max_count); + const param_value_t& value_param = param_value_t(value_t()); + + // tell parser about our actual type + parser.inspectValue<value_t>(name_stack, min_count, max_count, NULL); + // then tell it about string-based alternatives ("red", "blue", etc. for LLColor4) + if (named_value_t::getPossibleValues()) + { + parser.inspectValue<std::string>(name_stack, min_count, max_count, named_value_t::getPossibleValues()); + } + + value_param.inspectBlock(parser, name_stack, min_count, max_count); } - void set(value_assignment_t val, bool flag_as_provided = true) + void set(const container_t& val, bool flag_as_provided = true) { mValues = val; setProvided(flag_as_provided); @@ -1452,12 +1645,12 @@ namespace LLInitParam return *this; } - self_t& add(const typename name_value_lookup_t::name_t& name) + self_t& add(const typename named_value_t::name_t& name) { value_t value; // try to parse a per type named value - if (name_value_lookup_t::getValueFromName(name, value)) + if (named_value_t::getValueFromName(name, value)) { add(value); mValues.back().setValueName(name); @@ -1466,12 +1659,10 @@ namespace LLInitParam } // implicit conversion - operator value_assignment_t() const { return mValues; } + operator const container_t&() const { return mValues; } // explicit conversion - value_assignment_t operator()() const { return mValues; } + const container_t& operator()() const { return mValues; } - typedef typename container_t::iterator iterator; - typedef typename container_t::const_iterator const_iterator; iterator begin() { return mValues.begin(); } iterator end() { return mValues.end(); } const_iterator begin() const { return mValues.begin(); } @@ -1518,6 +1709,20 @@ namespace LLInitParam } container_t mValues; + + private: + void init( BlockDescriptor &block_descriptor, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count, const char* name ) + { + ParamDescriptorPtr param_descriptor = ParamDescriptorPtr(new ParamDescriptor( + block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), + &mergeWith, + &deserializeParam, + &serializeParam, + validate_func, + &inspectParam, + min_count, max_count)); + block_descriptor.addParam(param_descriptor, name); + } }; template <typename DERIVED_BLOCK, typename BASE_BLOCK = BaseBlock> @@ -1532,13 +1737,13 @@ namespace LLInitParam // take all provided params from other and apply to self bool overwriteFrom(const self_t& other) { - return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(selfBlockDescriptor(), other, true); + return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(getBlockDescriptor(), other, true); } // take all provided params that are not already provided, and apply to self bool fillFrom(const self_t& other) { - return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(selfBlockDescriptor(), other, false); + return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(getBlockDescriptor(), other, false); } bool mergeBlockParam(bool source_provided, bool dest_provided, BlockDescriptor& block_data, const self_t& source, bool overwrite) @@ -1556,7 +1761,7 @@ namespace LLInitParam bool mergeBlock(BlockDescriptor& block_data, const self_t& other, bool overwrite) { mCurChoice = other.mCurChoice; - return base_block_t::mergeBlock(selfBlockDescriptor(), other, overwrite); + return base_block_t::mergeBlock(getBlockDescriptor(), other, overwrite); } // clear out old choice when param has changed @@ -1577,38 +1782,38 @@ namespace LLInitParam base_block_t::paramChanged(changed_param, user_provided); } - virtual const BlockDescriptor& mostDerivedBlockDescriptor() const { return selfBlockDescriptor(); } - virtual BlockDescriptor& mostDerivedBlockDescriptor() { return selfBlockDescriptor(); } + virtual const BlockDescriptor& mostDerivedBlockDescriptor() const { return getBlockDescriptor(); } + virtual BlockDescriptor& mostDerivedBlockDescriptor() { return getBlockDescriptor(); } protected: ChoiceBlock() : mCurChoice(0) { - BaseBlock::init(selfBlockDescriptor(), base_block_t::selfBlockDescriptor(), sizeof(DERIVED_BLOCK)); + BaseBlock::init(getBlockDescriptor(), base_block_t::getBlockDescriptor(), sizeof(DERIVED_BLOCK)); } // Alternatives are mutually exclusive wrt other Alternatives in the same block. // One alternative in a block will always have isChosen() == true. // At most one alternative in a block will have isProvided() == true. - template <typename T, typename NAME_VALUE_LOOKUP = TypeValues<T> > + template <typename T, typename NAME_VALUE_LOOKUP = typename TypeValues<T>::type_value_t > class Alternative : public TypedParam<T, NAME_VALUE_LOOKUP, false> { + typedef TypedParam<T, NAME_VALUE_LOOKUP, false> super_t; + typedef typename super_t::value_t value_t; + typedef typename super_t::default_value_t default_value_t; + public: friend class ChoiceBlock<DERIVED_BLOCK>; - typedef Alternative<T, NAME_VALUE_LOOKUP> self_t; - typedef TypedParam<T, NAME_VALUE_LOOKUP, false, IsBlock<ParamValue<T, NAME_VALUE_LOOKUP> >::value> super_t; - typedef typename super_t::value_assignment_t value_assignment_t; - using super_t::operator =; - explicit Alternative(const char* name = "", value_assignment_t val = defaultValue<T>()) - : super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, NULL, 0, 1), + explicit Alternative(const char* name = "", const default_value_t& val = defaultValue<default_value_t>()) + : super_t(DERIVED_BLOCK::getBlockDescriptor(), name, val, NULL, 0, 1), mOriginalValue(val) { // assign initial choice to first declared option - DERIVED_BLOCK* blockp = ((DERIVED_BLOCK*)DERIVED_BLOCK::selfBlockDescriptor().mCurrentBlockPtr); - if (LL_UNLIKELY(DERIVED_BLOCK::selfBlockDescriptor().mInitializationState == BlockDescriptor::INITIALIZING)) + DERIVED_BLOCK* blockp = ((DERIVED_BLOCK*)DERIVED_BLOCK::getBlockDescriptor().mCurrentBlockPtr); + if (LL_UNLIKELY(DERIVED_BLOCK::getBlockDescriptor().mInitializationState == BlockDescriptor::INITIALIZING)) { if(blockp->mCurChoice == 0) { @@ -1622,27 +1827,27 @@ namespace LLInitParam static_cast<enclosing_block_t&>(Param::enclosingBlock()).paramChanged(*this, true); } - void chooseAs(value_assignment_t val) + void chooseAs(const value_t& val) { super_t::set(val); } - void operator =(value_assignment_t val) + void operator =(const value_t& val) { super_t::set(val); } - void operator()(typename super_t::value_assignment_t val) + void operator()(const value_t& val) { super_t::set(val); } - operator value_assignment_t() const + operator const value_t&() const { return (*this)(); } - value_assignment_t operator()() const + const value_t& operator()() const { if (static_cast<enclosing_block_t&>(Param::enclosingBlock()).getCurrentChoice() == this) { @@ -1657,11 +1862,11 @@ namespace LLInitParam } private: - T mOriginalValue; + default_value_t mOriginalValue; }; - protected: - static BlockDescriptor& selfBlockDescriptor() + public: + static BlockDescriptor& getBlockDescriptor() { static BlockDescriptor sBlockDescriptor; return sBlockDescriptor; @@ -1681,6 +1886,8 @@ namespace LLInitParam : public BASE_BLOCK { typedef Block<DERIVED_BLOCK, BASE_BLOCK> self_t; + + protected: typedef Block<DERIVED_BLOCK, BASE_BLOCK> block_t; public: @@ -1689,80 +1896,82 @@ namespace LLInitParam // take all provided params from other and apply to self bool overwriteFrom(const self_t& other) { - return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(selfBlockDescriptor(), other, true); + return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(getBlockDescriptor(), other, true); } // take all provided params that are not already provided, and apply to self bool fillFrom(const self_t& other) { - return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(selfBlockDescriptor(), other, false); + return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(getBlockDescriptor(), other, false); } - virtual const BlockDescriptor& mostDerivedBlockDescriptor() const { return selfBlockDescriptor(); } - virtual BlockDescriptor& mostDerivedBlockDescriptor() { return selfBlockDescriptor(); } + virtual const BlockDescriptor& mostDerivedBlockDescriptor() const { return getBlockDescriptor(); } + virtual BlockDescriptor& mostDerivedBlockDescriptor() { return getBlockDescriptor(); } protected: Block() { //#pragma message("Parsing LLInitParam::Block") - BaseBlock::init(selfBlockDescriptor(), BASE_BLOCK::selfBlockDescriptor(), sizeof(DERIVED_BLOCK)); + BaseBlock::init(getBlockDescriptor(), BASE_BLOCK::getBlockDescriptor(), sizeof(DERIVED_BLOCK)); } // // Nested classes for declaring parameters // - template <typename T, typename NAME_VALUE_LOOKUP = TypeValues<T> > + template <typename T, typename NAME_VALUE_LOOKUP = typename TypeValues<T>::type_value_t > class Optional : public TypedParam<T, NAME_VALUE_LOOKUP, false> { - public: - typedef TypedParam<T, NAME_VALUE_LOOKUP, false, IsBlock<ParamValue<T, NAME_VALUE_LOOKUP> >::value> super_t; - typedef typename super_t::value_assignment_t value_assignment_t; + typedef TypedParam<T, NAME_VALUE_LOOKUP, false> super_t; + typedef typename super_t::value_t value_t; + typedef typename super_t::default_value_t default_value_t; + public: using super_t::operator(); using super_t::operator =; - explicit Optional(const char* name = "", value_assignment_t val = defaultValue<T>()) - : super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, NULL, 0, 1) + explicit Optional(const char* name = "", const default_value_t& val = defaultValue<default_value_t>()) + : super_t(DERIVED_BLOCK::getBlockDescriptor(), name, val, NULL, 0, 1) { //#pragma message("Parsing LLInitParam::Block::Optional") } - Optional& operator =(value_assignment_t val) + Optional& operator =(const value_t& val) { set(val); return *this; } - DERIVED_BLOCK& operator()(value_assignment_t val) + DERIVED_BLOCK& operator()(const value_t& val) { super_t::set(val); return static_cast<DERIVED_BLOCK&>(Param::enclosingBlock()); } }; - template <typename T, typename NAME_VALUE_LOOKUP = TypeValues<T> > + template <typename T, typename NAME_VALUE_LOOKUP = typename TypeValues<T>::type_value_t > class Mandatory : public TypedParam<T, NAME_VALUE_LOOKUP, false> { - public: - typedef TypedParam<T, NAME_VALUE_LOOKUP, false, IsBlock<ParamValue<T, NAME_VALUE_LOOKUP> >::value> super_t; + typedef TypedParam<T, NAME_VALUE_LOOKUP, false> super_t; typedef Mandatory<T, NAME_VALUE_LOOKUP> self_t; - typedef typename super_t::value_assignment_t value_assignment_t; + typedef typename super_t::value_t value_t; + typedef typename super_t::default_value_t default_value_t; + public: using super_t::operator(); using super_t::operator =; // mandatory parameters require a name to be parseable - explicit Mandatory(const char* name = "", value_assignment_t val = defaultValue<T>()) - : super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, &validate, 1, 1) + explicit Mandatory(const char* name = "", const default_value_t& val = defaultValue<default_value_t>()) + : super_t(DERIVED_BLOCK::getBlockDescriptor(), name, val, &validate, 1, 1) {} - Mandatory& operator =(value_assignment_t val) + Mandatory& operator =(const value_t& val) { set(val); return *this; } - DERIVED_BLOCK& operator()(typename super_t::value_assignment_t val) + DERIVED_BLOCK& operator()(const value_t& val) { super_t::set(val); return static_cast<DERIVED_BLOCK&>(Param::enclosingBlock()); @@ -1776,28 +1985,29 @@ namespace LLInitParam }; - template <typename T, typename RANGE = BaseBlock::AnyAmount, typename NAME_VALUE_LOOKUP = TypeValues<T> > + template <typename T, typename RANGE = BaseBlock::AnyAmount, typename NAME_VALUE_LOOKUP = typename TypeValues<T>::type_value_t > class Multiple : public TypedParam<T, NAME_VALUE_LOOKUP, true> { - public: - typedef TypedParam<T, NAME_VALUE_LOOKUP, true, IsBlock<ParamValue<T, NAME_VALUE_LOOKUP> >::value> super_t; + typedef TypedParam<T, NAME_VALUE_LOOKUP, true> super_t; typedef Multiple<T, RANGE, NAME_VALUE_LOOKUP> self_t; typedef typename super_t::container_t container_t; - typedef typename super_t::value_assignment_t value_assignment_t; + typedef typename super_t::value_t value_t; + + public: typedef typename super_t::iterator iterator; typedef typename super_t::const_iterator const_iterator; explicit Multiple(const char* name = "") - : super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, container_t(), &validate, RANGE::minCount, RANGE::maxCount) + : super_t(DERIVED_BLOCK::getBlockDescriptor(), name, container_t(), &validate, RANGE::minCount, RANGE::maxCount) {} - Multiple& operator =(value_assignment_t val) + Multiple& operator =(const container_t& val) { set(val); return *this; } - DERIVED_BLOCK& operator()(typename super_t::value_assignment_t val) + DERIVED_BLOCK& operator()(const container_t& val) { super_t::set(val); return static_cast<DERIVED_BLOCK&>(Param::enclosingBlock()); @@ -1810,13 +2020,15 @@ namespace LLInitParam } }; - class Deprecated : public Param + // can appear in data files, but will ignored during parsing + // cannot read or write in code + class Ignored : public Param { public: - explicit Deprecated(const char* name) - : Param(DERIVED_BLOCK::selfBlockDescriptor().mCurrentBlockPtr) + explicit Ignored(const char* name) + : Param(DERIVED_BLOCK::getBlockDescriptor().mCurrentBlockPtr) { - BlockDescriptor& block_descriptor = DERIVED_BLOCK::selfBlockDescriptor(); + BlockDescriptor& block_descriptor = DERIVED_BLOCK::getBlockDescriptor(); if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING)) { ParamDescriptorPtr param_descriptor = ParamDescriptorPtr(new ParamDescriptor( @@ -1827,11 +2039,11 @@ namespace LLInitParam NULL, NULL, 0, S32_MAX)); - BaseBlock::addParam(block_descriptor, param_descriptor, name); + block_descriptor.addParam(param_descriptor, name); } } - static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name) + static bool deserializeParam(Param& param, Parser& parser, Parser::name_stack_range_t& name_stack_range, bool new_name) { if (name_stack_range.first == name_stack_range.second) { @@ -1844,19 +2056,46 @@ namespace LLInitParam } }; - // different semantics for documentation purposes, but functionally identical - typedef Deprecated Ignored; + // can appear in data files, or be written to in code, but data will be ignored + // cannot be read in code + class Deprecated : public Ignored + { + public: + explicit Deprecated(const char* name) : Ignored(name) {} - protected: - static BlockDescriptor& selfBlockDescriptor() + // dummy writer interfaces + template<typename T> + Deprecated& operator =(const T& val) + { + // do nothing + return *this; + } + + template<typename T> + DERIVED_BLOCK& operator()(const T& val) + { + // do nothing + return static_cast<DERIVED_BLOCK&>(Param::enclosingBlock()); + } + + template<typename T> + void set(const T& val, bool flag_as_provided = true) + { + // do nothing + } + }; + + public: + static BlockDescriptor& getBlockDescriptor() { static BlockDescriptor sBlockDescriptor; return sBlockDescriptor; } - template <typename T, typename NAME_VALUE_LOOKUP, bool multiple, bool is_block> + protected: + template <typename T, typename NAME_VALUE_LOOKUP, bool multiple, typename is_block> void changeDefault(TypedParam<T, NAME_VALUE_LOOKUP, multiple, is_block>& param, - typename TypedParam<T, NAME_VALUE_LOOKUP, multiple, is_block>::value_assignment_t value) + const typename TypedParam<T, NAME_VALUE_LOOKUP, multiple, is_block>::value_t& value) { if (!param.isProvided()) { @@ -1866,204 +2105,420 @@ namespace LLInitParam }; - template <typename DERIVED_BLOCK, typename BASE_BLOCK = BaseBlock> - class BatchBlock - : public Block<DERIVED_BLOCK, BASE_BLOCK> + template<typename T, typename BLOCK_T> + struct IsBlock<ParamValue<BaseBlock::Lazy<T, BaseBlock::IS_A_BLOCK>, BLOCK_T >, void> + { + typedef IS_A_BLOCK value_t; + }; + + template<typename T, typename BLOCK_T> + struct IsBlock<ParamValue<BaseBlock::Lazy<T, BaseBlock::NOT_A_BLOCK>, BLOCK_T >, void> + { + typedef NOT_BLOCK value_t; + }; + + template<typename T, typename BLOCK_IDENTIFIER> + struct IsBlock<ParamValue<BaseBlock::Atomic<T>, typename IsBlock<BaseBlock::Atomic<T> >::value_t >, BLOCK_IDENTIFIER> + { + typedef typename IsBlock<T>::value_t value_t; + }; + + template<typename T, typename BLOCK_IDENTIFIER> + struct IsBlock<ParamValue<BaseBlock::Sequential<T>, typename IsBlock<BaseBlock::Sequential<T> >::value_t >, BLOCK_IDENTIFIER> + { + typedef typename IsBlock<T>::value_t value_t; + }; + + + template<typename T> + struct InnerMostType + { + typedef T value_t; + }; + + template<typename T> + struct InnerMostType<ParamValue<T, NOT_BLOCK> > + { + typedef typename InnerMostType<T>::value_t value_t; + }; + + template<typename T> + struct InnerMostType<ParamValue<T, IS_A_BLOCK> > + { + typedef typename InnerMostType<T>::value_t value_t; + }; + + template<typename T, typename BLOCK_T> + class ParamValue <BaseBlock::Atomic<T>, BLOCK_T> { + typedef ParamValue <BaseBlock::Atomic<T>, BLOCK_T> self_t; + public: - typedef BatchBlock<DERIVED_BLOCK, BASE_BLOCK> self_t; - typedef Block<DERIVED_BLOCK, BASE_BLOCK> super_t; + typedef typename InnerMostType<T>::value_t value_t; + typedef T default_value_t; + + ParamValue() + : mValue(), + mValidated(false) + {} - BatchBlock() + ParamValue(const default_value_t& value) + : mValue(value), + mValidated(false) {} - bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name) + void setValue(const value_t& val) + { + mValue.setValue(val); + } + + const value_t& getValue() const + { + return mValue.getValue(); + } + + value_t& getValue() + { + return mValue.getValue(); + } + + bool deserializeBlock(Parser& p, Parser::name_stack_range_t& name_stack_range, bool new_name) { if (new_name) { - // reset block - *static_cast<DERIVED_BLOCK*>(this) = defaultBatchValue(); + resetToDefault(); } - return super_t::deserializeBlock(p, name_stack_range, new_name); + return mValue.deserializeBlock(p, name_stack_range, new_name); } - bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) + void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const self_t* diff_block = NULL) const { - if (overwrite) + const BaseBlock* base_block = diff_block + ? &(diff_block->mValue) + : NULL; + mValue.serializeBlock(p, name_stack, base_block); + } + + bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const { - *static_cast<DERIVED_BLOCK*>(this) = defaultBatchValue(); - // merge individual parameters into destination - return super_t::mergeBlock(super_t::selfBlockDescriptor(), other, overwrite); + return mValue.inspectBlock(p, name_stack, min_count, max_count); } - return false; + + bool mergeBlockParam(bool source_provided, bool dst_provided, BlockDescriptor& block_data, const self_t& source, bool overwrite) + { + if ((overwrite && source_provided) // new values coming in on top or... + || (!overwrite && !dst_provided)) // values being pushed under with nothing already there + { + // clear away what is there and take the new stuff as a whole + resetToDefault(); + return mValue.mergeBlock(block_data, source.getValue(), overwrite); } - protected: - static const DERIVED_BLOCK& defaultBatchValue() + + + return mValue.mergeBlock(block_data, source.getValue(), overwrite); + } + + bool validateBlock(bool emit_errors = true) const + { + return mValue.validateBlock(emit_errors); + } + + static BlockDescriptor& getBlockDescriptor() { - static DERIVED_BLOCK default_value; - return default_value; + return value_t::getBlockDescriptor(); } + + + mutable bool mValidated; // lazy validation flag + + private: + void resetToDefault() + { + static T default_value; + mValue = default_value; + } + + T mValue; }; - // FIXME: this specialization is not currently used, as it only matches against the BatchBlock base class - // and not the derived class with the actual params - template<typename DERIVED_BLOCK, - typename BASE_BLOCK, - typename NAME_VALUE_LOOKUP> - class ParamValue <BatchBlock<DERIVED_BLOCK, BASE_BLOCK>, - NAME_VALUE_LOOKUP, - true> - : public NAME_VALUE_LOOKUP, - protected BatchBlock<DERIVED_BLOCK, BASE_BLOCK> + template<typename T> + class ParamValue <BaseBlock::Sequential<T>, IS_A_BLOCK> { + typedef ParamValue <BaseBlock::Sequential<T>, IS_A_BLOCK> self_t; + public: - typedef BatchBlock<DERIVED_BLOCK, BASE_BLOCK> block_t; - typedef const BatchBlock<DERIVED_BLOCK, BASE_BLOCK>& value_assignment_t; - typedef block_t value_t; + typedef typename InnerMostType<T>::value_t value_t; + typedef T default_value_t; ParamValue() - : block_t(), + : mValue(), mValidated(false) - {} + { + mCurParam = getBlockDescriptor().mAllParams.begin(); + } - ParamValue(value_assignment_t other) - : block_t(other), + ParamValue(const default_value_t& value) + : mValue(value), mValidated(false) { + mCurParam = getBlockDescriptor().mAllParams.begin(); } - void setValue(value_assignment_t val) + void setValue(const value_t& val) { - *this = val; + mValue.setValue(val); } - value_assignment_t getValue() const + const value_t& getValue() const { - return *this; + return mValue.getValue(); } - BatchBlock<DERIVED_BLOCK, BASE_BLOCK>& getValue() + value_t& getValue() { - return *this; + return mValue.getValue(); } - operator value_assignment_t() const + bool deserializeBlock(Parser& p, Parser::name_stack_range_t& name_stack_range, bool new_name) { - return *this; + if (new_name) + { + mCurParam = getBlockDescriptor().mAllParams.begin(); } + if (name_stack_range.first == name_stack_range.second + && mCurParam != getBlockDescriptor().mAllParams.end()) + { + // deserialize to mCurParam + ParamDescriptor& pd = *(*mCurParam); + ParamDescriptor::deserialize_func_t deserialize_func = pd.mDeserializeFunc; + Param* paramp = mValue.getParamFromHandle(pd.mParamHandle); - value_assignment_t operator()() const + if (deserialize_func + && paramp + && deserialize_func(*paramp, p, name_stack_range, new_name)) { - return *this; + ++mCurParam; + return true; + } + else + { + return false; + } + } + else + { + return mValue.deserializeBlock(p, name_stack_range, new_name); + } } - protected: + void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const self_t* diff_block = NULL) const + { + const BaseBlock* base_block = diff_block + ? &(diff_block->mValue) + : NULL; + mValue.serializeBlock(p, name_stack, base_block); + } + + bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const + { + return mValue.inspectBlock(p, name_stack, min_count, max_count); + } + + bool mergeBlockParam(bool source_provided, bool dst_provided, BlockDescriptor& block_data, const self_t& source, bool overwrite) + { + return mValue.mergeBlock(block_data, source.getValue(), overwrite); + } + + bool validateBlock(bool emit_errors = true) const + { + return mValue.validateBlock(emit_errors); + } + + static BlockDescriptor& getBlockDescriptor() + { + return value_t::getBlockDescriptor(); + } + + mutable bool mValidated; // lazy validation flag + + private: + + BlockDescriptor::all_params_list_t::iterator mCurParam; + T mValue; + }; + + template<typename T> + class ParamValue <BaseBlock::Sequential<T>, NOT_BLOCK> + : public T + { + typedef ParamValue <BaseBlock::Sequential<T>, NOT_BLOCK> self_t; + + public: + typedef typename InnerMostType<T>::value_t value_t; + typedef T default_value_t; + + ParamValue() + : T(), + mValidated(false) + {} + + ParamValue(const default_value_t& value) + : T(value.getValue()), + mValidated(false) + {} + mutable bool mValidated; // lazy validation flag }; - template<typename T, bool IS_BLOCK> - class ParamValue <BaseBlock::Lazy<T>, - TypeValues<T>, - IS_BLOCK> - : public IsBlock<T>::base_class_t + template<typename T, typename BLOCK_T> + class ParamValue <BaseBlock::Lazy<T, IS_A_BLOCK>, BLOCK_T> { + typedef ParamValue <BaseBlock::Lazy<T, IS_A_BLOCK>, BLOCK_T> self_t; + public: - typedef ParamValue <BaseBlock::Lazy<T>, TypeValues<T>, false> self_t; - typedef const T& value_assignment_t; - typedef T value_t; + typedef typename InnerMostType<T>::value_t value_t; + typedef LazyValue<T> default_value_t; ParamValue() : mValue(), mValidated(false) {} - ParamValue(value_assignment_t other) + ParamValue(const default_value_t& other) : mValue(other), mValidated(false) {} - void setValue(value_assignment_t val) + ParamValue(const T& value) + : mValue(value), + mValidated(false) + {} + + void setValue(const value_t& val) { mValue.set(val); } - value_assignment_t getValue() const + const value_t& getValue() const { - return mValue.get(); + return mValue.get().getValue(); } - T& getValue() + value_t& getValue() { - return mValue.get(); + return mValue.get().getValue(); } - operator value_assignment_t() const + bool deserializeBlock(Parser& p, Parser::name_stack_range_t& name_stack_range, bool new_name) { - return mValue.get(); + return mValue.get().deserializeBlock(p, name_stack_range, new_name); } - value_assignment_t operator()() const + void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const self_t* diff_block = NULL) const { - return mValue.get(); + if (mValue.empty()) return; + + const BaseBlock* base_block = (diff_block && !diff_block->mValue.empty()) + ? &(diff_block->mValue.get().getValue()) + : NULL; + mValue.get().serializeBlock(p, name_stack, base_block); } - bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name) + bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const { - return mValue.get().deserializeBlock(p, name_stack_range, new_name); + return mValue.get().inspectBlock(p, name_stack, min_count, max_count); } - void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block = NULL) const + bool mergeBlockParam(bool source_provided, bool dst_provided, BlockDescriptor& block_data, const self_t& source, bool overwrite) { - if (mValue.empty()) return; + return source.mValue.empty() || mValue.get().mergeBlock(block_data, source.getValue(), overwrite); + } - mValue.get().serializeBlock(p, name_stack, diff_block); + bool validateBlock(bool emit_errors = true) const + { + return mValue.empty() || mValue.get().validateBlock(emit_errors); } - bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const + static BlockDescriptor& getBlockDescriptor() { - if (mValue.empty()) return false; + return value_t::getBlockDescriptor(); + } - return mValue.get().inspectBlock(p, name_stack, min_count, max_count); + mutable bool mValidated; // lazy validation flag + + private: + LazyValue<T> mValue; + }; + + template<typename T, typename BLOCK_T> + class ParamValue <BaseBlock::Lazy<T, NOT_BLOCK>, BLOCK_T> + { + typedef ParamValue <BaseBlock::Lazy<T, NOT_BLOCK>, BLOCK_T> self_t; + + public: + typedef typename InnerMostType<T>::value_t value_t; + typedef LazyValue<T> default_value_t; + + ParamValue() + : mValue(), + mValidated(false) + {} + + ParamValue(const default_value_t& other) + : mValue(other), + mValidated(false) + {} + + ParamValue(const T& value) + : mValue(value), + mValidated(false) + {} + + void setValue(const value_t& val) + { + mValue.set(val); + } + + const value_t& getValue() const + { + return mValue.get().getValue(); + } + + value_t& getValue() + { + return mValue.get().getValue(); } - protected: mutable bool mValidated; // lazy validation flag private: - BaseBlock::Lazy<T> mValue; + LazyValue<T> mValue; }; template <> - class ParamValue <LLSD, - TypeValues<LLSD>, - false> - : public TypeValues<LLSD>, - public BaseBlock + class ParamValue <LLSD, NOT_BLOCK> + : public BaseBlock { public: - typedef ParamValue<LLSD, TypeValues<LLSD>, false> self_t; - typedef const LLSD& value_assignment_t; + typedef LLSD value_t; + typedef LLSD default_value_t; ParamValue() : mValidated(false) {} - ParamValue(value_assignment_t other) + ParamValue(const default_value_t& other) : mValue(other), mValidated(false) {} - void setValue(value_assignment_t val) { mValue = val; } + void setValue(const value_t& val) { mValue = val; } - value_assignment_t getValue() const { return mValue; } + const value_t& getValue() const { return mValue; } LLSD& getValue() { return mValue; } - operator value_assignment_t() const { return mValue; } - value_assignment_t operator()() const { return mValue; } - - // block param interface - LL_COMMON_API bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name); + LL_COMMON_API bool deserializeBlock(Parser& p, Parser::name_stack_range_t& name_stack_range, bool new_name); LL_COMMON_API void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block = NULL) const; bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const { @@ -2082,8 +2537,7 @@ namespace LLInitParam template<typename T> class CustomParamValue - : public Block<ParamValue<T, TypeValues<T> > >, - public TypeValues<T> + : public Block<ParamValue<T> > { public: typedef enum e_value_age @@ -2093,20 +2547,21 @@ namespace LLInitParam BLOCK_AUTHORITATIVE // mValue is derived from the block parameters, which are authoritative } EValueAge; - typedef ParamValue<T, TypeValues<T> > derived_t; + typedef ParamValue<T> derived_t; typedef CustomParamValue<T> self_t; typedef Block<derived_t> block_t; - typedef const T& value_assignment_t; + typedef T default_value_t; typedef T value_t; + typedef void baseblock_base_class_t; - CustomParamValue(const T& value = T()) + CustomParamValue(const default_value_t& value = T()) : mValue(value), mValueAge(VALUE_AUTHORITATIVE), mValidated(false) {} - bool deserializeBlock(Parser& parser, Parser::name_stack_range_t name_stack_range, bool new_name) + bool deserializeBlock(Parser& parser, Parser::name_stack_range_t& name_stack_range, bool new_name) { derived_t& typed_param = static_cast<derived_t&>(*this); // try to parse direct value T @@ -2117,8 +2572,6 @@ namespace LLInitParam typed_param.mValueAge = VALUE_AUTHORITATIVE; typed_param.updateBlockFromValue(false); - typed_param.clearValueName(); - return true; } } @@ -2132,18 +2585,8 @@ namespace LLInitParam const derived_t& typed_param = static_cast<const derived_t&>(*this); const derived_t* diff_param = static_cast<const derived_t*>(diff_block); - std::string key = typed_param.getValueName(); - - // first try to write out name of name/value pair - if (!key.empty()) - { - if (!diff_param || !ParamCompare<std::string>::equals(diff_param->getValueName(), key)) - { - parser.writeValue(key, name_stack); - } - } // then try to serialize value directly - else if (!diff_param || !ParamCompare<T>::equals(typed_param.getValue(), diff_param->getValue())) + if (!diff_param || !ParamCompare<T>::equals(typed_param.getValue(), diff_param->getValue())) { if (!parser.writeValue(typed_param.getValue(), name_stack)) @@ -2173,19 +2616,6 @@ namespace LLInitParam } } - bool inspectBlock(Parser& parser, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const - { - // first, inspect with actual type... - parser.inspectValue<T>(name_stack, min_count, max_count, NULL); - if (TypeValues<T>::getPossibleValues()) - { - //...then inspect with possible string values... - parser.inspectValue<std::string>(name_stack, min_count, max_count, TypeValues<T>::getPossibleValues()); - } - // then recursively inspect contents... - return block_t::inspectBlock(parser, name_stack, min_count, max_count); - } - bool validateBlock(bool emit_errors = true) const { if (mValueAge == VALUE_NEEDS_UPDATE) @@ -2193,7 +2623,6 @@ namespace LLInitParam if (block_t::validateBlock(emit_errors)) { // clear stale keyword associated with old value - TypeValues<T>::clearValueName(); mValueAge = BLOCK_AUTHORITATIVE; static_cast<derived_t*>(const_cast<self_t*>(this))->updateValueFromBlock(); return true; @@ -2223,17 +2652,15 @@ namespace LLInitParam } } - void setValue(value_assignment_t val) + void setValue(const value_t& val) { - derived_t& typed_param = static_cast<derived_t&>(*this); // set param version number to be up to date, so we ignore block contents mValueAge = VALUE_AUTHORITATIVE; mValue = val; - typed_param.clearValueName(); static_cast<derived_t*>(this)->updateBlockFromValue(false); } - value_assignment_t getValue() const + const value_t& getValue() const { validateBlock(true); return mValue; @@ -2245,20 +2672,10 @@ namespace LLInitParam return mValue; } - operator value_assignment_t() const - { - return getValue(); - } - - value_assignment_t operator()() const - { - return getValue(); - } - protected: // use this from within updateValueFromBlock() to set the value without making it authoritative - void updateValue(value_assignment_t value) + void updateValue(const value_t& value) { mValue = value; } diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index 403df08990..1eab270e3c 100644 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -43,7 +43,7 @@ * semantics: one instance per process, rather than one instance per module as * sometimes happens with data simply declared static. */ -class LL_COMMON_API LLInstanceTrackerBase : public boost::noncopyable +class LL_COMMON_API LLInstanceTrackerBase { protected: /// Get a process-unique void* pointer slot for the specified type_info @@ -210,6 +210,9 @@ protected: virtual const KEY& getKey() const { return mInstanceKey; } private: + LLInstanceTracker( const LLInstanceTracker& ); + const LLInstanceTracker& operator=( const LLInstanceTracker& ); + void add_(KEY key) { mInstanceKey = key; diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index 3b9758f996..70ad10ad55 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -61,6 +61,18 @@ BOOL LLMemory::sEnableMemoryFailurePrevention = FALSE; LLPrivateMemoryPoolManager::mem_allocation_info_t LLPrivateMemoryPoolManager::sMemAllocationTracker; #endif +void ll_assert_aligned_func(uintptr_t ptr,U32 alignment) +{ +#ifdef SHOW_ASSERT + // Redundant, place to set breakpoints. + if (ptr%alignment!=0) + { + llwarns << "alignment check failed" << llendl; + } + llassert(ptr%alignment==0); +#endif +} + //static void LLMemory::initClass() { @@ -240,21 +252,6 @@ U32 LLMemory::getAllocatedMemKB() return sAllocatedMemInKB ; } -void* ll_allocate (size_t size) -{ - if (size == 0) - { - llwarns << "Null allocation" << llendl; - } - void *p = malloc(size); - if (p == NULL) - { - LLMemory::freeReserve(); - llerrs << "Out of memory Error" << llendl; - } - return p; -} - //---------------------------------------------------------------------------- #if defined(LL_WINDOWS) @@ -1353,7 +1350,7 @@ char* LLPrivateMemoryPool::allocate(U32 size) //if the asked size larger than MAX_BLOCK_SIZE, fetch from heap directly, the pool does not manage it if(size >= CHUNK_SIZE) { - return (char*)malloc(size) ; + return (char*)ll_aligned_malloc_16(size) ; } char* p = NULL ; @@ -1410,7 +1407,7 @@ char* LLPrivateMemoryPool::allocate(U32 size) to_log = false ; } - return (char*)malloc(size) ; + return (char*)ll_aligned_malloc_16(size) ; } return p ; @@ -1429,7 +1426,7 @@ void LLPrivateMemoryPool::freeMem(void* addr) if(!chunk) { - free(addr) ; //release from heap + ll_aligned_free_16(addr) ; //release from heap } else { @@ -1553,7 +1550,7 @@ LLPrivateMemoryPool::LLMemoryChunk* LLPrivateMemoryPool::addChunk(S32 chunk_inde mReservedPoolSize += preferred_size + overhead ; - char* buffer = (char*)malloc(preferred_size + overhead) ; + char* buffer = (char*)ll_aligned_malloc_16(preferred_size + overhead) ; if(!buffer) { return NULL ; @@ -1621,7 +1618,7 @@ void LLPrivateMemoryPool::removeChunk(LLMemoryChunk* chunk) mReservedPoolSize -= chunk->getBufferSize() ; //release memory - free(chunk->getBuffer()) ; + ll_aligned_free_16(chunk->getBuffer()) ; } U16 LLPrivateMemoryPool::findHashKey(const char* addr) @@ -1965,7 +1962,7 @@ char* LLPrivateMemoryPoolManager::allocate(LLPrivateMemoryPool* poolp, U32 size, if(!poolp) { - p = (char*)malloc(size) ; + p = (char*)ll_aligned_malloc_16(size) ; } else { @@ -1994,7 +1991,7 @@ char* LLPrivateMemoryPoolManager::allocate(LLPrivateMemoryPool* poolp, U32 size) } else { - return (char*)malloc(size) ; + return (char*)ll_aligned_malloc_16(size) ; } } #endif @@ -2019,7 +2016,7 @@ void LLPrivateMemoryPoolManager::freeMem(LLPrivateMemoryPool* poolp, void* addr { if(!sPrivatePoolEnabled) { - free(addr) ; //private pool is disabled. + ll_aligned_free_16(addr) ; //private pool is disabled. } else if(!sInstance) //the private memory manager is destroyed, try the dangling list { diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index bbbdaa6497..e725bdd9fa 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -26,8 +26,16 @@ #ifndef LLMEMORY_H #define LLMEMORY_H -#include "llmemtype.h" -#if LL_DEBUG +#include "linden_common.h" + +class LLMutex ; + +#if LL_WINDOWS && LL_DEBUG +#define LL_CHECK_MEMORY llassert(_CrtCheckMemory()); +#else +#define LL_CHECK_MEMORY +#endif + inline void* ll_aligned_malloc( size_t size, int align ) { void* mem = malloc( size + (align - 1) + sizeof(void*) ); @@ -43,10 +51,11 @@ inline void ll_aligned_free( void* ptr ) free( ((void**)ptr)[-1] ); } +#if !LL_USE_TCMALLOC inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed with ll_aligned_free_16(). { #if defined(LL_WINDOWS) - return _mm_malloc(size, 16); + return _aligned_malloc(size, 16); #elif defined(LL_DARWIN) return malloc(size); // default osx malloc is 16 byte aligned. #else @@ -61,7 +70,7 @@ inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed wi inline void ll_aligned_free_16(void *p) { #if defined(LL_WINDOWS) - _mm_free(p); + _aligned_free(p); #elif defined(LL_DARWIN) return free(p); #else @@ -69,10 +78,39 @@ inline void ll_aligned_free_16(void *p) #endif } +inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // returned hunk MUST be freed with ll_aligned_free_16(). +{ +#if defined(LL_WINDOWS) + return _aligned_realloc(ptr, size, 16); +#elif defined(LL_DARWIN) + return realloc(ptr,size); // default osx malloc is 16 byte aligned. +#else + //FIXME: memcpy is SLOW + void* ret = ll_aligned_malloc_16(size); + if (ptr) + { + if (ret) + { + // Only copy the size of the smallest memory block to avoid memory corruption. + memcpy(ret, ptr, llmin(old_size, size)); + } + ll_aligned_free_16(ptr); + } + return ret; +#endif +} + +#else // USE_TCMALLOC +// ll_aligned_foo_16 are not needed with tcmalloc +#define ll_aligned_malloc_16 malloc +#define ll_aligned_realloc_16(a,b,c) realloc(a,b) +#define ll_aligned_free_16 free +#endif // USE_TCMALLOC + inline void* ll_aligned_malloc_32(size_t size) // returned hunk MUST be freed with ll_aligned_free_32(). { #if defined(LL_WINDOWS) - return _mm_malloc(size, 32); + return _aligned_malloc(size, 32); #elif defined(LL_DARWIN) return ll_aligned_malloc( size, 32 ); #else @@ -87,22 +125,13 @@ inline void* ll_aligned_malloc_32(size_t size) // returned hunk MUST be freed wi inline void ll_aligned_free_32(void *p) { #if defined(LL_WINDOWS) - _mm_free(p); + _aligned_free(p); #elif defined(LL_DARWIN) ll_aligned_free( p ); #else free(p); // posix_memalign() is compatible with heap deallocator #endif } -#else // LL_DEBUG -// ll_aligned_foo are noops now that we use tcmalloc everywhere (tcmalloc aligns automatically at appropriate intervals) -#define ll_aligned_malloc( size, align ) malloc(size) -#define ll_aligned_free( ptr ) free(ptr) -#define ll_aligned_malloc_16 malloc -#define ll_aligned_free_16 free -#define ll_aligned_malloc_32 malloc -#define ll_aligned_free_32 free -#endif // LL_DEBUG #ifndef __DEBUG_PRIVATE_MEM__ #define __DEBUG_PRIVATE_MEM__ 0 @@ -512,4 +541,13 @@ void LLPrivateMemoryPoolTester::operator delete[](void* addr) // LLSingleton moved to llsingleton.h +LL_COMMON_API void ll_assert_aligned_func(uintptr_t ptr,U32 alignment); + +#ifdef SHOW_ASSERT +#define ll_assert_aligned(ptr,alignment) ll_assert_aligned_func(reinterpret_cast<uintptr_t>(ptr),((U32)alignment)) +#else +#define ll_assert_aligned(ptr,alignment) +#endif + + #endif diff --git a/indra/llcommon/llmemtype.cpp b/indra/llcommon/llmemtype.cpp deleted file mode 100644 index 6290a7158f..0000000000 --- a/indra/llcommon/llmemtype.cpp +++ /dev/null @@ -1,232 +0,0 @@ -/** - * @file llmemtype.cpp - * @brief Simple memory allocation/deallocation tracking stuff here - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llmemtype.h" -#include "llallocator.h" - -std::vector<char const *> LLMemType::DeclareMemType::mNameList; - -LLMemType::DeclareMemType LLMemType::MTYPE_INIT("Init"); -LLMemType::DeclareMemType LLMemType::MTYPE_STARTUP("Startup"); -LLMemType::DeclareMemType LLMemType::MTYPE_MAIN("Main"); -LLMemType::DeclareMemType LLMemType::MTYPE_FRAME("Frame"); - -LLMemType::DeclareMemType LLMemType::MTYPE_GATHER_INPUT("GatherInput"); -LLMemType::DeclareMemType LLMemType::MTYPE_JOY_KEY("JoyKey"); - -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE("Idle"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_PUMP("IdlePump"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_NETWORK("IdleNetwork"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_REGIONS("IdleUpdateRegions"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION("IdleUpdateViewerRegion"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_SURFACE("IdleUpdateSurface"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_PARCEL_OVERLAY("IdleUpdateParcelOverlay"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_AUDIO("IdleAudio"); - -LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING("CacheProcessPending"); -LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS("CacheProcessPendingAsks"); -LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES("CacheProcessPendingReplies"); - -LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_CHECK_ALL("MessageCheckAll"); -LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_PROCESS_ACKS("MessageProcessAcks"); - -LLMemType::DeclareMemType LLMemType::MTYPE_RENDER("Render"); -LLMemType::DeclareMemType LLMemType::MTYPE_SLEEP("Sleep"); - -LLMemType::DeclareMemType LLMemType::MTYPE_NETWORK("Network"); -LLMemType::DeclareMemType LLMemType::MTYPE_PHYSICS("Physics"); -LLMemType::DeclareMemType LLMemType::MTYPE_INTERESTLIST("InterestList"); - -LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEBASE("ImageBase"); -LLMemType::DeclareMemType LLMemType::MTYPE_IMAGERAW("ImageRaw"); -LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEFORMATTED("ImageFormatted"); - -LLMemType::DeclareMemType LLMemType::MTYPE_APPFMTIMAGE("AppFmtImage"); -LLMemType::DeclareMemType LLMemType::MTYPE_APPRAWIMAGE("AppRawImage"); -LLMemType::DeclareMemType LLMemType::MTYPE_APPAUXRAWIMAGE("AppAuxRawImage"); - -LLMemType::DeclareMemType LLMemType::MTYPE_DRAWABLE("Drawable"); - -LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT("Object"); -LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE("ObjectProcessUpdate"); -LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE_CORE("ObjectProcessUpdateCore"); - -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY("Display"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE("DisplayUpdate"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA("DisplayUpdateCam"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_GEOM("DisplayUpdateGeom"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SWAP("DisplaySwap"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_HUD("DisplayUpdateHud"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_GEN_REFLECTION("DisplayGenRefl"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE("DisplayImageUpdate"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_STATE_SORT("DisplayStateSort"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SKY("DisplaySky"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_GEOM("DisplayRenderGeom"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_FLUSH("DisplayRenderFlush"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_UI("DisplayRenderUI"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS("DisplayRenderAttach"); - -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DATA("VertexData"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CONSTRUCTOR("VertexConstr"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTRUCTOR("VertexDestr"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_VERTICES("VertexCreateVerts"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_INDICES("VertexCreateIndices"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_BUFFER("VertexDestroyBuff"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_INDICES("VertexDestroyIndices"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_VERTS("VertexUpdateVerts"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_INDICES("VertexUpdateIndices"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER("VertexAllocateBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_RESIZE_BUFFER("VertexResizeBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER("VertexMapBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES("VertexMapBufferVerts"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES("VertexMapBufferIndices"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UNMAP_BUFFER("VertexUnmapBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_STRIDE("VertexSetStride"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_BUFFER("VertexSetBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER("VertexSetupVertBuff"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CLEANUP_CLASS("VertexCleanupClass"); - -LLMemType::DeclareMemType LLMemType::MTYPE_SPACE_PARTITION("SpacePartition"); - -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE("Pipeline"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_INIT("PipelineInit"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS("PipelineCreateBuffs"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RESTORE_GL("PipelineRestroGL"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS("PipelineUnloadShaders"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL("PipelineLightingDetail"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE("PipelineGetPoolType"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_POOL("PipelineAddPool"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE("PipelineAllocDrawable"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_OBJECT("PipelineAddObj"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS("PipelineCreateObjs"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_MOVE("PipelineUpdateMove"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_GEOM("PipelineUpdateGeom"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_VISIBLE("PipelineMarkVisible"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_MOVED("PipelineMarkMoved"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_SHIFT("PipelineMarkShift"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS("PipelineShiftObjs"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_TEXTURED("PipelineMarkTextured"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_REBUILD("PipelineMarkRebuild"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_CULL("PipelineUpdateCull"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_STATE_SORT("PipelineStateSort"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_POST_SORT("PipelinePostSort"); - -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS("PipelineHudEls"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HL("PipelineRenderHL"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM("PipelineRenderGeom"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED("PipelineRenderGeomDef"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF("PipelineRenderGeomPostDef"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW("PipelineRenderGeomShadow"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_SELECT("PipelineRenderSelect"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_REBUILD_POOLS("PipelineRebuildPools"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP("PipelineQuickLookup"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS("PipelineRenderObjs"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR("PipelineGenImpostors"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_BLOOM("PipelineRenderBloom"); - -LLMemType::DeclareMemType LLMemType::MTYPE_UPKEEP_POOLS("UpkeepPools"); - -LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR("Avatar"); -LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR_MESH("AvatarMesh"); -LLMemType::DeclareMemType LLMemType::MTYPE_PARTICLES("Particles"); -LLMemType::DeclareMemType LLMemType::MTYPE_REGIONS("Regions"); - -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY("Inventory"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DRAW("InventoryDraw"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_BUILD_NEW_VIEWS("InventoryBuildNewViews"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DO_FOLDER("InventoryDoFolder"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_POST_BUILD("InventoryPostBuild"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_FROM_XML("InventoryFromXML"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_CREATE_NEW_ITEM("InventoryCreateNewItem"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_INIT("InventoryViewInit"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_SHOW("InventoryViewShow"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE("InventoryViewToggle"); - -LLMemType::DeclareMemType LLMemType::MTYPE_ANIMATION("Animation"); -LLMemType::DeclareMemType LLMemType::MTYPE_VOLUME("Volume"); -LLMemType::DeclareMemType LLMemType::MTYPE_PRIMITIVE("Primitive"); - -LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT("Script"); -LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_RUN("ScriptRun"); -LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_BYTECODE("ScriptByteCode"); - -LLMemType::DeclareMemType LLMemType::MTYPE_IO_PUMP("IoPump"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_TCP("IoTCP"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_BUFFER("IoBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_HTTP_SERVER("IoHttpServer"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_SERVER("IoSDServer"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_CLIENT("IoSDClient"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_URL_REQUEST("IOUrlRequest"); - -LLMemType::DeclareMemType LLMemType::MTYPE_DIRECTX_INIT("DirectXInit"); - -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP1("Temp1"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP2("Temp2"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP3("Temp3"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP4("Temp4"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP5("Temp5"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP6("Temp6"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP7("Temp7"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP8("Temp8"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP9("Temp9"); - -LLMemType::DeclareMemType LLMemType::MTYPE_OTHER("Other"); - - -LLMemType::DeclareMemType::DeclareMemType(char const * st) -{ - mID = (S32)mNameList.size(); - mName = st; - - mNameList.push_back(mName); -} - -LLMemType::DeclareMemType::~DeclareMemType() -{ -} - -LLMemType::LLMemType(LLMemType::DeclareMemType& dt) -{ - mTypeIndex = dt.mID; - LLAllocator::pushMemType(dt.mID); -} - -LLMemType::~LLMemType() -{ - LLAllocator::popMemType(); -} - -char const * LLMemType::getNameFromID(S32 id) -{ - if (id < 0 || id >= (S32)DeclareMemType::mNameList.size()) - { - return "INVALID"; - } - - return DeclareMemType::mNameList[id]; -} - -//-------------------------------------------------------------------------------------------------- diff --git a/indra/llcommon/llmemtype.h b/indra/llcommon/llmemtype.h deleted file mode 100644 index 4945dbaf60..0000000000 --- a/indra/llcommon/llmemtype.h +++ /dev/null @@ -1,242 +0,0 @@ -/** - * @file llmemtype.h - * @brief Runtime memory usage debugging utilities. - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_MEMTYPE_H -#define LL_MEMTYPE_H - -//---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- - -//---------------------------------------------------------------------------- - -#include "linden_common.h" -//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -// WARNING: Never commit with MEM_TRACK_MEM == 1 -//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -#define MEM_TRACK_MEM (0 && LL_WINDOWS) - -#include <vector> - -#define MEM_TYPE_NEW(T) - -class LL_COMMON_API LLMemType -{ -public: - - // class we'll initialize all instances of as - // static members of MemType. Then use - // to construct any new mem type. - class LL_COMMON_API DeclareMemType - { - public: - DeclareMemType(char const * st); - ~DeclareMemType(); - - S32 mID; - char const * mName; - - // array so we can map an index ID to Name - static std::vector<char const *> mNameList; - }; - - LLMemType(DeclareMemType& dt); - ~LLMemType(); - - static char const * getNameFromID(S32 id); - - static DeclareMemType MTYPE_INIT; - static DeclareMemType MTYPE_STARTUP; - static DeclareMemType MTYPE_MAIN; - static DeclareMemType MTYPE_FRAME; - - static DeclareMemType MTYPE_GATHER_INPUT; - static DeclareMemType MTYPE_JOY_KEY; - - static DeclareMemType MTYPE_IDLE; - static DeclareMemType MTYPE_IDLE_PUMP; - static DeclareMemType MTYPE_IDLE_NETWORK; - static DeclareMemType MTYPE_IDLE_UPDATE_REGIONS; - static DeclareMemType MTYPE_IDLE_UPDATE_VIEWER_REGION; - static DeclareMemType MTYPE_IDLE_UPDATE_SURFACE; - static DeclareMemType MTYPE_IDLE_UPDATE_PARCEL_OVERLAY; - static DeclareMemType MTYPE_IDLE_AUDIO; - - static DeclareMemType MTYPE_CACHE_PROCESS_PENDING; - static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_ASKS; - static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_REPLIES; - - static DeclareMemType MTYPE_MESSAGE_CHECK_ALL; - static DeclareMemType MTYPE_MESSAGE_PROCESS_ACKS; - - static DeclareMemType MTYPE_RENDER; - static DeclareMemType MTYPE_SLEEP; - - static DeclareMemType MTYPE_NETWORK; - static DeclareMemType MTYPE_PHYSICS; - static DeclareMemType MTYPE_INTERESTLIST; - - static DeclareMemType MTYPE_IMAGEBASE; - static DeclareMemType MTYPE_IMAGERAW; - static DeclareMemType MTYPE_IMAGEFORMATTED; - - static DeclareMemType MTYPE_APPFMTIMAGE; - static DeclareMemType MTYPE_APPRAWIMAGE; - static DeclareMemType MTYPE_APPAUXRAWIMAGE; - - static DeclareMemType MTYPE_DRAWABLE; - - static DeclareMemType MTYPE_OBJECT; - static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE; - static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE_CORE; - - static DeclareMemType MTYPE_DISPLAY; - static DeclareMemType MTYPE_DISPLAY_UPDATE; - static DeclareMemType MTYPE_DISPLAY_UPDATE_CAMERA; - static DeclareMemType MTYPE_DISPLAY_UPDATE_GEOM; - static DeclareMemType MTYPE_DISPLAY_SWAP; - static DeclareMemType MTYPE_DISPLAY_UPDATE_HUD; - static DeclareMemType MTYPE_DISPLAY_GEN_REFLECTION; - static DeclareMemType MTYPE_DISPLAY_IMAGE_UPDATE; - static DeclareMemType MTYPE_DISPLAY_STATE_SORT; - static DeclareMemType MTYPE_DISPLAY_SKY; - static DeclareMemType MTYPE_DISPLAY_RENDER_GEOM; - static DeclareMemType MTYPE_DISPLAY_RENDER_FLUSH; - static DeclareMemType MTYPE_DISPLAY_RENDER_UI; - static DeclareMemType MTYPE_DISPLAY_RENDER_ATTACHMENTS; - - static DeclareMemType MTYPE_VERTEX_DATA; - static DeclareMemType MTYPE_VERTEX_CONSTRUCTOR; - static DeclareMemType MTYPE_VERTEX_DESTRUCTOR; - static DeclareMemType MTYPE_VERTEX_CREATE_VERTICES; - static DeclareMemType MTYPE_VERTEX_CREATE_INDICES; - static DeclareMemType MTYPE_VERTEX_DESTROY_BUFFER; - static DeclareMemType MTYPE_VERTEX_DESTROY_INDICES; - static DeclareMemType MTYPE_VERTEX_UPDATE_VERTS; - static DeclareMemType MTYPE_VERTEX_UPDATE_INDICES; - static DeclareMemType MTYPE_VERTEX_ALLOCATE_BUFFER; - static DeclareMemType MTYPE_VERTEX_RESIZE_BUFFER; - static DeclareMemType MTYPE_VERTEX_MAP_BUFFER; - static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_VERTICES; - static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_INDICES; - static DeclareMemType MTYPE_VERTEX_UNMAP_BUFFER; - static DeclareMemType MTYPE_VERTEX_SET_STRIDE; - static DeclareMemType MTYPE_VERTEX_SET_BUFFER; - static DeclareMemType MTYPE_VERTEX_SETUP_VERTEX_BUFFER; - static DeclareMemType MTYPE_VERTEX_CLEANUP_CLASS; - - static DeclareMemType MTYPE_SPACE_PARTITION; - - static DeclareMemType MTYPE_PIPELINE; - static DeclareMemType MTYPE_PIPELINE_INIT; - static DeclareMemType MTYPE_PIPELINE_CREATE_BUFFERS; - static DeclareMemType MTYPE_PIPELINE_RESTORE_GL; - static DeclareMemType MTYPE_PIPELINE_UNLOAD_SHADERS; - static DeclareMemType MTYPE_PIPELINE_LIGHTING_DETAIL; - static DeclareMemType MTYPE_PIPELINE_GET_POOL_TYPE; - static DeclareMemType MTYPE_PIPELINE_ADD_POOL; - static DeclareMemType MTYPE_PIPELINE_ALLOCATE_DRAWABLE; - static DeclareMemType MTYPE_PIPELINE_ADD_OBJECT; - static DeclareMemType MTYPE_PIPELINE_CREATE_OBJECTS; - static DeclareMemType MTYPE_PIPELINE_UPDATE_MOVE; - static DeclareMemType MTYPE_PIPELINE_UPDATE_GEOM; - static DeclareMemType MTYPE_PIPELINE_MARK_VISIBLE; - static DeclareMemType MTYPE_PIPELINE_MARK_MOVED; - static DeclareMemType MTYPE_PIPELINE_MARK_SHIFT; - static DeclareMemType MTYPE_PIPELINE_SHIFT_OBJECTS; - static DeclareMemType MTYPE_PIPELINE_MARK_TEXTURED; - static DeclareMemType MTYPE_PIPELINE_MARK_REBUILD; - static DeclareMemType MTYPE_PIPELINE_UPDATE_CULL; - static DeclareMemType MTYPE_PIPELINE_STATE_SORT; - static DeclareMemType MTYPE_PIPELINE_POST_SORT; - - static DeclareMemType MTYPE_PIPELINE_RENDER_HUD_ELS; - static DeclareMemType MTYPE_PIPELINE_RENDER_HL; - static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM; - static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED; - static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_POST_DEF; - static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_SHADOW; - static DeclareMemType MTYPE_PIPELINE_RENDER_SELECT; - static DeclareMemType MTYPE_PIPELINE_REBUILD_POOLS; - static DeclareMemType MTYPE_PIPELINE_QUICK_LOOKUP; - static DeclareMemType MTYPE_PIPELINE_RENDER_OBJECTS; - static DeclareMemType MTYPE_PIPELINE_GENERATE_IMPOSTOR; - static DeclareMemType MTYPE_PIPELINE_RENDER_BLOOM; - - static DeclareMemType MTYPE_UPKEEP_POOLS; - - static DeclareMemType MTYPE_AVATAR; - static DeclareMemType MTYPE_AVATAR_MESH; - static DeclareMemType MTYPE_PARTICLES; - static DeclareMemType MTYPE_REGIONS; - - static DeclareMemType MTYPE_INVENTORY; - static DeclareMemType MTYPE_INVENTORY_DRAW; - static DeclareMemType MTYPE_INVENTORY_BUILD_NEW_VIEWS; - static DeclareMemType MTYPE_INVENTORY_DO_FOLDER; - static DeclareMemType MTYPE_INVENTORY_POST_BUILD; - static DeclareMemType MTYPE_INVENTORY_FROM_XML; - static DeclareMemType MTYPE_INVENTORY_CREATE_NEW_ITEM; - static DeclareMemType MTYPE_INVENTORY_VIEW_INIT; - static DeclareMemType MTYPE_INVENTORY_VIEW_SHOW; - static DeclareMemType MTYPE_INVENTORY_VIEW_TOGGLE; - - static DeclareMemType MTYPE_ANIMATION; - static DeclareMemType MTYPE_VOLUME; - static DeclareMemType MTYPE_PRIMITIVE; - - static DeclareMemType MTYPE_SCRIPT; - static DeclareMemType MTYPE_SCRIPT_RUN; - static DeclareMemType MTYPE_SCRIPT_BYTECODE; - - static DeclareMemType MTYPE_IO_PUMP; - static DeclareMemType MTYPE_IO_TCP; - static DeclareMemType MTYPE_IO_BUFFER; - static DeclareMemType MTYPE_IO_HTTP_SERVER; - static DeclareMemType MTYPE_IO_SD_SERVER; - static DeclareMemType MTYPE_IO_SD_CLIENT; - static DeclareMemType MTYPE_IO_URL_REQUEST; - - static DeclareMemType MTYPE_DIRECTX_INIT; - - static DeclareMemType MTYPE_TEMP1; - static DeclareMemType MTYPE_TEMP2; - static DeclareMemType MTYPE_TEMP3; - static DeclareMemType MTYPE_TEMP4; - static DeclareMemType MTYPE_TEMP5; - static DeclareMemType MTYPE_TEMP6; - static DeclareMemType MTYPE_TEMP7; - static DeclareMemType MTYPE_TEMP8; - static DeclareMemType MTYPE_TEMP9; - - static DeclareMemType MTYPE_OTHER; // Special; used by display code - - S32 mTypeIndex; -}; - -//---------------------------------------------------------------------------- - -#endif - diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp index 1738c16dea..abf47a0f57 100644 --- a/indra/llcommon/llqueuedthread.cpp +++ b/indra/llcommon/llqueuedthread.cpp @@ -134,8 +134,8 @@ S32 LLQueuedThread::updateQueue(F32 max_time_ms) pending = getPending(); if(pending > 0) { - unpause(); - } + unpause(); + } } else { diff --git a/indra/llcommon/llrefcount.h b/indra/llcommon/llrefcount.h index 8eb5d53f3f..32ae15435a 100644 --- a/indra/llcommon/llrefcount.h +++ b/indra/llcommon/llrefcount.h @@ -27,6 +27,7 @@ #define LLREFCOUNT_H #include <boost/noncopyable.hpp> +#include <boost/intrusive_ptr.hpp> #define LL_REF_COUNT_DEBUG 0 #if LL_REF_COUNT_DEBUG @@ -86,4 +87,22 @@ private: #endif }; +/** + * intrusive pointer support + * this allows you to use boost::intrusive_ptr with any LLRefCount-derived type + */ +namespace boost +{ + inline void intrusive_ptr_add_ref(LLRefCount* p) + { + p->ref(); + } + + inline void intrusive_ptr_release(LLRefCount* p) + { + p->unref(); + } +}; + + #endif diff --git a/indra/llcommon/llregistry.h b/indra/llcommon/llregistry.h index 36d7f7a44c..bb0d60247e 100644 --- a/indra/llcommon/llregistry.h +++ b/indra/llcommon/llregistry.h @@ -31,30 +31,16 @@ #include <boost/type_traits.hpp> #include "llsingleton.h" -#include "lltypeinfolookup.h" +#include "llstl.h" template <typename T> -class LLRegistryDefaultComparator +struct LLRegistryDefaultComparator { - bool operator()(const T& lhs, const T& rhs) { return lhs < rhs; } -}; - -template <typename KEY, typename VALUE> -struct LLRegistryMapSelector -{ - typedef std::map<KEY, VALUE> type; -}; - -template <typename VALUE> -struct LLRegistryMapSelector<std::type_info*, VALUE> -{ - typedef LLTypeInfoLookup<VALUE> type; -}; - -template <typename VALUE> -struct LLRegistryMapSelector<const std::type_info*, VALUE> -{ - typedef LLTypeInfoLookup<VALUE> type; + bool operator()(const T& lhs, const T& rhs) const + { + using std::less; + return less<T>()(lhs, rhs); + } }; template <typename KEY, typename VALUE, typename COMPARATOR = LLRegistryDefaultComparator<KEY> > @@ -72,7 +58,7 @@ public: { friend class LLRegistry<KEY, VALUE, COMPARATOR>; public: - typedef typename LLRegistryMapSelector<KEY, VALUE>::type registry_map_t; + typedef std::map<KEY, VALUE, COMPARATOR> registry_map_t; bool add(ref_const_key_t key, ref_const_value_t value) { @@ -321,6 +307,10 @@ public: virtual ~StaticRegistrar() {} StaticRegistrar(ref_const_key_t key, ref_const_value_t value) { + if (singleton_t::instance().exists(key)) + { + llerrs << "Duplicate registry entry under key \"" << key << "\"" << llendl; + } singleton_t::instance().mStaticScope->add(key, value); } }; diff --git a/indra/llcommon/llsdparam.cpp b/indra/llcommon/llsdparam.cpp index 0e29873bb0..9f4460a988 100644 --- a/indra/llcommon/llsdparam.cpp +++ b/indra/llcommon/llsdparam.cpp @@ -223,10 +223,14 @@ LLSD& LLParamSDParserUtilities::getSDWriteNode(LLSD& input, LLInitParam::Parser: { bool new_traversal = it->second; - LLSD* child_sd = it->first.empty() ? sd_to_write : &(*sd_to_write)[it->first]; - - if (child_sd->isArray()) + LLSD* child_sd; + if (it->first.empty()) { + child_sd = sd_to_write; + if (child_sd->isUndefined()) + { + *child_sd = LLSD::emptyArray(); + } if (new_traversal) { // write to new element at end @@ -240,22 +244,7 @@ LLSD& LLParamSDParserUtilities::getSDWriteNode(LLSD& input, LLInitParam::Parser: } else { - if (new_traversal - && child_sd->isDefined() - && !child_sd->isArray()) - { - // copy child contents into first element of an array - LLSD new_array = LLSD::emptyArray(); - new_array.append(*child_sd); - // assign array to slot that previously held the single value - *child_sd = new_array; - // return next element in that array - sd_to_write = &((*child_sd)[1]); - } - else - { - sd_to_write = child_sd; - } + sd_to_write = &(*sd_to_write)[it->first]; } it->second = false; } @@ -283,8 +272,9 @@ void LLParamSDParserUtilities::readSDValues(read_sd_cb_t cb, const LLSD& sd, LLI it != sd.endArray(); ++it) { - stack.back().second = true; + stack.push_back(make_pair(std::string(), true)); readSDValues(cb, *it, stack); + stack.pop_back(); } } else if (sd.isUndefined()) @@ -313,8 +303,14 @@ namespace LLInitParam { // LLSD specialization // block param interface - bool ParamValue<LLSD, TypeValues<LLSD>, false>::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, bool new_name) + bool ParamValue<LLSD, NOT_BLOCK>::deserializeBlock(Parser& p, Parser::name_stack_range_t& name_stack, bool new_name) { + if (name_stack.first == name_stack.second + && p.readValue<LLSD>(mValue)) + { + return true; + } + LLSD& sd = LLParamSDParserUtilities::getSDWriteNode(mValue, name_stack); LLSD::String string; @@ -328,15 +324,18 @@ namespace LLInitParam } //static - void ParamValue<LLSD, TypeValues<LLSD>, false>::serializeElement(Parser& p, const LLSD& sd, Parser::name_stack_t& name_stack) + void ParamValue<LLSD, NOT_BLOCK>::serializeElement(Parser& p, const LLSD& sd, Parser::name_stack_t& name_stack) { p.writeValue<LLSD::String>(sd.asString(), name_stack); } - void ParamValue<LLSD, TypeValues<LLSD>, false>::serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block) const + void ParamValue<LLSD, NOT_BLOCK>::serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block) const { - // read from LLSD value and serialize out to parser (which could be LLSD, XUI, etc) - Parser::name_stack_t stack; - LLParamSDParserUtilities::readSDValues(boost::bind(&serializeElement, boost::ref(p), _1, _2), mValue, stack); + // attempt to write LLSD out directly + if (!p.writeValue<LLSD>(mValue, name_stack)) + { + // otherwise read from LLSD value and serialize out to parser (which could be LLSD, XUI, etc) + LLParamSDParserUtilities::readSDValues(boost::bind(&serializeElement, boost::ref(p), _1, _2), mValue, name_stack); + } } } diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index 7f4f670ed0..6b549e4b6f 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -1451,9 +1451,12 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option } case LLSD::TypeUUID: + { ostr.put('u'); - ostr.write((const char*)(&(data.asUUID().mData)), UUID_BYTES); + LLSD::UUID value = data.asUUID(); + ostr.write((const char*)(&value.mData), UUID_BYTES); break; + } case LLSD::TypeString: ostr.put('s'); diff --git a/indra/llcommon/llstat.cpp b/indra/llcommon/llstat.cpp index b82d52797e..3678c8e1c1 100644 --- a/indra/llcommon/llstat.cpp +++ b/indra/llcommon/llstat.cpp @@ -37,736 +37,30 @@ // statics -S32 LLPerfBlock::sStatsFlags = LLPerfBlock::LLSTATS_NO_OPTIONAL_STATS; // Control what is being recorded -LLPerfBlock::stat_map_t LLPerfBlock::sStatMap; // Map full path string to LLStatTime objects, tracks all active objects -std::string LLPerfBlock::sCurrentStatPath = ""; // Something like "/total_time/physics/physics step" - -//------------------------------------------------------------------------ -// Live config file to trigger stats logging -static const char STATS_CONFIG_FILE_NAME[] = "/dev/shm/simperf/simperf_proc_config.llsd"; -static const F32 STATS_CONFIG_REFRESH_RATE = 5.0; // seconds - -class LLStatsConfigFile : public LLLiveFile -{ -public: - LLStatsConfigFile() - : LLLiveFile(filename(), STATS_CONFIG_REFRESH_RATE), - mChanged(false), mStatsp(NULL) { } - - static std::string filename(); - -protected: - /* virtual */ bool loadFile(); - -public: - void init(LLPerfStats* statsp); - static LLStatsConfigFile& instance(); - // return the singleton stats config file - - bool mChanged; - -protected: - LLPerfStats* mStatsp; -}; - -std::string LLStatsConfigFile::filename() -{ - return STATS_CONFIG_FILE_NAME; -} - -void LLStatsConfigFile::init(LLPerfStats* statsp) -{ - mStatsp = statsp; -} - -LLStatsConfigFile& LLStatsConfigFile::instance() -{ - static LLStatsConfigFile the_file; - return the_file; -} - - -/* virtual */ -// Load and parse the stats configuration file -bool LLStatsConfigFile::loadFile() -{ - if (!mStatsp) - { - llwarns << "Tries to load performance configure file without initializing LPerfStats" << llendl; - return false; - } - mChanged = true; - - LLSD stats_config; - { - llifstream file(filename().c_str()); - if (file.is_open()) - { - LLSDSerialize::fromXML(stats_config, file); - if (stats_config.isUndefined()) - { - llinfos << "Performance statistics configuration file ill-formed, not recording statistics" << llendl; - mStatsp->setReportPerformanceDuration( 0.f ); - return false; - } - } - else - { // File went away, turn off stats if it was on - if ( mStatsp->frameStatsIsRunning() ) - { - llinfos << "Performance statistics configuration file deleted, not recording statistics" << llendl; - mStatsp->setReportPerformanceDuration( 0.f ); - } - return true; - } - } - - F32 duration = 0.f; - F32 interval = 0.f; - S32 flags = LLPerfBlock::LLSTATS_BASIC_STATS; - - const char * w = "duration"; - if (stats_config.has(w)) - { - duration = (F32)stats_config[w].asReal(); - } - w = "interval"; - if (stats_config.has(w)) - { - interval = (F32)stats_config[w].asReal(); - } - w = "flags"; - if (stats_config.has(w)) - { - flags = (S32)stats_config[w].asInteger(); - if (flags == LLPerfBlock::LLSTATS_NO_OPTIONAL_STATS && - duration > 0) - { // No flags passed in, but have a duration, so reset to basic stats - flags = LLPerfBlock::LLSTATS_BASIC_STATS; - } - } - - mStatsp->setReportPerformanceDuration( duration, flags ); - mStatsp->setReportPerformanceInterval( interval ); - - if ( duration > 0 ) - { - if ( interval == 0.f ) - { - llinfos << "Recording performance stats every frame for " << duration << " sec" << llendl; - } - else - { - llinfos << "Recording performance stats every " << interval << " seconds for " << duration << " seconds" << llendl; - } - } - else - { - llinfos << "Performance stats recording turned off" << llendl; - } - return true; -} - - -//------------------------------------------------------------------------ - -LLPerfStats::LLPerfStats(const std::string& process_name, S32 process_pid) : - mFrameStatsFileFailure(FALSE), - mSkipFirstFrameStats(FALSE), - mProcessName(process_name), - mProcessPID(process_pid), - mReportPerformanceStatInterval(1.f), - mReportPerformanceStatEnd(0.0) -{ } - -LLPerfStats::~LLPerfStats() -{ - LLPerfBlock::clearDynamicStats(); - mFrameStatsFile.close(); -} - -void LLPerfStats::init() -{ - // Initialize the stats config file instance. - (void) LLStatsConfigFile::instance().init(this); - (void) LLStatsConfigFile::instance().checkAndReload(); -} - -// Open file for statistics -void LLPerfStats::openPerfStatsFile() -{ - if ( !mFrameStatsFile - && !mFrameStatsFileFailure ) - { - std::string stats_file = llformat("/dev/shm/simperf/%s_proc.%d.llsd", mProcessName.c_str(), mProcessPID); - mFrameStatsFile.close(); - mFrameStatsFile.clear(); - mFrameStatsFile.open(stats_file, llofstream::out); - if ( mFrameStatsFile.fail() ) - { - llinfos << "Error opening statistics log file " << stats_file << llendl; - mFrameStatsFileFailure = TRUE; - } - else - { - LLSD process_info = LLSD::emptyMap(); - process_info["name"] = mProcessName; - process_info["pid"] = (LLSD::Integer) mProcessPID; - process_info["stat_rate"] = (LLSD::Integer) mReportPerformanceStatInterval; - // Add process-specific info. - addProcessHeaderInfo(process_info); - - mFrameStatsFile << LLSDNotationStreamer(process_info) << std::endl; - } - } -} - -// Dump out performance metrics over some time interval -void LLPerfStats::dumpIntervalPerformanceStats() -{ - // Ensure output file is OK - openPerfStatsFile(); - - if ( mFrameStatsFile ) - { - LLSD stats = LLSD::emptyMap(); - - LLStatAccum::TimeScale scale; - if ( getReportPerformanceInterval() == 0.f ) - { - scale = LLStatAccum::SCALE_PER_FRAME; - } - else if ( getReportPerformanceInterval() < 0.5f ) - { - scale = LLStatAccum::SCALE_100MS; - } - else - { - scale = LLStatAccum::SCALE_SECOND; - } - - // Write LLSD into log - stats["utc_time"] = (LLSD::String) LLError::utcTime(); - stats["timestamp"] = U64_to_str((totalTime() / 1000) + (gUTCOffset * 1000)); // milliseconds since epoch - stats["frame_number"] = (LLSD::Integer) LLFrameTimer::getFrameCount(); - - // Add process-specific frame info. - addProcessFrameInfo(stats, scale); - LLPerfBlock::addStatsToLLSDandReset( stats, scale ); - - mFrameStatsFile << LLSDNotationStreamer(stats) << std::endl; - } -} - -// Set length of performance stat recording. -// If turning stats on, caller must provide flags -void LLPerfStats::setReportPerformanceDuration( F32 seconds, S32 flags /* = LLSTATS_NO_OPTIONAL_STATS */ ) -{ - if ( seconds <= 0.f ) - { - mReportPerformanceStatEnd = 0.0; - LLPerfBlock::setStatsFlags(LLPerfBlock::LLSTATS_NO_OPTIONAL_STATS); // Make sure all recording is off - mFrameStatsFile.close(); - LLPerfBlock::clearDynamicStats(); - } - else - { - mReportPerformanceStatEnd = LLFrameTimer::getElapsedSeconds() + ((F64) seconds); - // Clear failure flag to try and create the log file once - mFrameStatsFileFailure = FALSE; - mSkipFirstFrameStats = TRUE; // Skip the first report (at the end of this frame) - LLPerfBlock::setStatsFlags(flags); - } -} - -void LLPerfStats::updatePerFrameStats() -{ - (void) LLStatsConfigFile::instance().checkAndReload(); - static LLFrameTimer performance_stats_timer; - if ( frameStatsIsRunning() ) - { - if ( mReportPerformanceStatInterval == 0 ) - { // Record info every frame - if ( mSkipFirstFrameStats ) - { // Skip the first time - was started this frame - mSkipFirstFrameStats = FALSE; - } - else - { - dumpIntervalPerformanceStats(); - } - } - else - { - performance_stats_timer.setTimerExpirySec( getReportPerformanceInterval() ); - if (performance_stats_timer.checkExpirationAndReset( mReportPerformanceStatInterval )) - { - dumpIntervalPerformanceStats(); - } - } - - if ( LLFrameTimer::getElapsedSeconds() > mReportPerformanceStatEnd ) - { // Reached end of time, clear it to stop reporting - setReportPerformanceDuration(0.f); // Don't set mReportPerformanceStatEnd directly - llinfos << "Recording performance stats completed" << llendl; - } - } -} - - //------------------------------------------------------------------------ - -U64 LLStatAccum::sScaleTimes[NUM_SCALES] = -{ - USEC_PER_SEC / 10, // 100 millisec - USEC_PER_SEC * 1, // seconds - USEC_PER_SEC * 60, // minutes -#if ENABLE_LONG_TIME_STATS - // enable these when more time scales are desired - USEC_PER_SEC * 60*60, // hours - USEC_PER_SEC * 24*60*60, // days - USEC_PER_SEC * 7*24*60*60, // weeks -#endif -}; - - - -LLStatAccum::LLStatAccum(bool useFrameTimer) - : mUseFrameTimer(useFrameTimer), - mRunning(FALSE), - mLastTime(0), - mLastSampleValue(0.0), - mLastSampleValid(FALSE) -{ -} - -LLStatAccum::~LLStatAccum() -{ -} - - - -void LLStatAccum::reset(U64 when) -{ - mRunning = TRUE; - mLastTime = when; - - for (int i = 0; i < NUM_SCALES; ++i) - { - mBuckets[i].accum = 0.0; - mBuckets[i].endTime = when + sScaleTimes[i]; - mBuckets[i].lastValid = false; - } -} - -void LLStatAccum::sum(F64 value) -{ - sum(value, getCurrentUsecs()); -} - -void LLStatAccum::sum(F64 value, U64 when) -{ - if (!mRunning) - { - reset(when); - return; - } - if (when < mLastTime) - { - // This happens a LOT on some dual core systems. - lldebugs << "LLStatAccum::sum clock has gone backwards from " - << mLastTime << " to " << when << ", resetting" << llendl; - - reset(when); - return; - } - - // how long is this value for - U64 timeSpan = when - mLastTime; - - for (int i = 0; i < NUM_SCALES; ++i) - { - Bucket& bucket = mBuckets[i]; - - if (when < bucket.endTime) - { - bucket.accum += value; - } - else - { - U64 timeScale = sScaleTimes[i]; - - U64 timeLeft = when - bucket.endTime; - // how much time is left after filling this bucket - - if (timeLeft < timeScale) - { - F64 valueLeft = value * timeLeft / timeSpan; - - bucket.lastValid = true; - bucket.lastAccum = bucket.accum + (value - valueLeft); - bucket.accum = valueLeft; - bucket.endTime += timeScale; - } - else - { - U64 timeTail = timeLeft % timeScale; - - bucket.lastValid = true; - bucket.lastAccum = value * timeScale / timeSpan; - bucket.accum = value * timeTail / timeSpan; - bucket.endTime += (timeLeft - timeTail) + timeScale; - } - } - } - - mLastTime = when; -} - - -F32 LLStatAccum::meanValue(TimeScale scale) const -{ - if (!mRunning) - { - return 0.0; - } - if ( scale == SCALE_PER_FRAME ) - { // Per-frame not supported here - scale = SCALE_100MS; - } - - if (scale < 0 || scale >= NUM_SCALES) - { - llwarns << "llStatAccum::meanValue called for unsupported scale: " - << scale << llendl; - return 0.0; - } - - const Bucket& bucket = mBuckets[scale]; - - F64 value = bucket.accum; - U64 timeLeft = bucket.endTime - mLastTime; - U64 scaleTime = sScaleTimes[scale]; - - if (bucket.lastValid) - { - value += bucket.lastAccum * timeLeft / scaleTime; - } - else if (timeLeft < scaleTime) - { - value *= scaleTime / (scaleTime - timeLeft); - } - else - { - value = 0.0; - } - - return (F32)(value / scaleTime); -} - - -U64 LLStatAccum::getCurrentUsecs() const -{ - if (mUseFrameTimer) - { - return LLFrameTimer::getTotalTime(); - } - else - { - return totalTime(); - } -} - - -// ------------------------------------------------------------------------ - -LLStatRate::LLStatRate(bool use_frame_timer) - : LLStatAccum(use_frame_timer) -{ -} - -void LLStatRate::count(U32 value) -{ - sum((F64)value * sScaleTimes[SCALE_SECOND]); -} - - -void LLStatRate::mark() - { - // Effectively the same as count(1), but sets mLastSampleValue - U64 when = getCurrentUsecs(); - - if ( mRunning - && (when > mLastTime) ) - { // Set mLastSampleValue to the time from the last mark() - F64 duration = ((F64)(when - mLastTime)) / sScaleTimes[SCALE_SECOND]; - if ( duration > 0.0 ) - { - mLastSampleValue = 1.0 / duration; - } - else - { - mLastSampleValue = 0.0; - } - } - - sum( (F64) sScaleTimes[SCALE_SECOND], when); - } - - -// ------------------------------------------------------------------------ - - -LLStatMeasure::LLStatMeasure(bool use_frame_timer) - : LLStatAccum(use_frame_timer) -{ -} - -void LLStatMeasure::sample(F64 value) -{ - U64 when = getCurrentUsecs(); - - if (mLastSampleValid) - { - F64 avgValue = (value + mLastSampleValue) / 2.0; - F64 interval = (F64)(when - mLastTime); - - sum(avgValue * interval, when); - } - else - { - reset(when); - } - - mLastSampleValid = TRUE; - mLastSampleValue = value; -} - - -// ------------------------------------------------------------------------ - -LLStatTime::LLStatTime(const std::string & key) - : LLStatAccum(false), - mFrameNumber(LLFrameTimer::getFrameCount()), - mTotalTimeInFrame(0), - mKey(key) -#if LL_DEBUG - , mRunning(FALSE) -#endif -{ -} - -void LLStatTime::start() -{ - // Reset frame accumluation if the frame number has changed - U32 frame_number = LLFrameTimer::getFrameCount(); - if ( frame_number != mFrameNumber ) - { - mFrameNumber = frame_number; - mTotalTimeInFrame = 0; - } - - sum(0.0); - -#if LL_DEBUG - // Shouldn't be running already - llassert( !mRunning ); - mRunning = TRUE; -#endif -} - -void LLStatTime::stop() -{ - U64 end_time = getCurrentUsecs(); - U64 duration = end_time - mLastTime; - sum(F64(duration), end_time); - //llinfos << "mTotalTimeInFrame incremented from " << mTotalTimeInFrame << " to " << (mTotalTimeInFrame + duration) << llendl; - mTotalTimeInFrame += duration; - -#if LL_DEBUG - mRunning = FALSE; -#endif -} - -/* virtual */ F32 LLStatTime::meanValue(TimeScale scale) const -{ - if ( LLStatAccum::SCALE_PER_FRAME == scale ) - { - return (F32)mTotalTimeInFrame; - } - else - { - return LLStatAccum::meanValue(scale); - } -} - - -// ------------------------------------------------------------------------ - - -// Use this constructor for pre-defined LLStatTime objects -LLPerfBlock::LLPerfBlock(LLStatTime* stat ) : mPredefinedStat(stat), mDynamicStat(NULL) -{ - if (mPredefinedStat) - { - // If dynamic stats are turned on, this will create a separate entry in the stat map. - initDynamicStat(mPredefinedStat->mKey); - - // Start predefined stats. These stats are not part of the stat map. - mPredefinedStat->start(); - } -} - -// Use this constructor for normal, optional LLPerfBlock time slices -LLPerfBlock::LLPerfBlock( const char* key ) : mPredefinedStat(NULL), mDynamicStat(NULL) -{ - if ((sStatsFlags & LLSTATS_BASIC_STATS) == 0) - { // These are off unless the base set is enabled - return; - } - - initDynamicStat(key); -} - - -// Use this constructor for dynamically created LLPerfBlock time slices -// that are only enabled by specific control flags -LLPerfBlock::LLPerfBlock( const char* key1, const char* key2, S32 flags ) : mPredefinedStat(NULL), mDynamicStat(NULL) -{ - if ((sStatsFlags & flags) == 0) - { - return; - } - - if (NULL == key2 || strlen(key2) == 0) - { - initDynamicStat(key1); - } - else - { - std::ostringstream key; - key << key1 << "_" << key2; - initDynamicStat(key.str()); - } -} - -// Set up the result data map if dynamic stats are enabled -void LLPerfBlock::initDynamicStat(const std::string& key) -{ - // Early exit if dynamic stats aren't enabled. - if (sStatsFlags == LLSTATS_NO_OPTIONAL_STATS) - return; - - mLastPath = sCurrentStatPath; // Save and restore current path - sCurrentStatPath += "/" + key; // Add key to current path - - // See if the LLStatTime object already exists - stat_map_t::iterator iter = sStatMap.find(sCurrentStatPath); - if ( iter == sStatMap.end() ) - { - // StatEntry object doesn't exist, so create it - mDynamicStat = new StatEntry( key ); - sStatMap[ sCurrentStatPath ] = mDynamicStat; // Set the entry for this path - } - else - { - // Found this path in the map, use the object there - mDynamicStat = (*iter).second; // Get StatEntry for the current path - } - - if (mDynamicStat) - { - mDynamicStat->mStat.start(); - mDynamicStat->mCount++; - } - else - { - llwarns << "Initialized NULL dynamic stat at '" << sCurrentStatPath << "'" << llendl; - sCurrentStatPath = mLastPath; - } -} - - -// Destructor does the time accounting -LLPerfBlock::~LLPerfBlock() -{ - if (mPredefinedStat) mPredefinedStat->stop(); - if (mDynamicStat) - { - mDynamicStat->mStat.stop(); - sCurrentStatPath = mLastPath; // Restore the path in case sStatsEnabled changed during this block - } -} - - -// Clear the map of any dynamic stats. Static routine -void LLPerfBlock::clearDynamicStats() -{ - std::for_each(sStatMap.begin(), sStatMap.end(), DeletePairedPointer()); - sStatMap.clear(); -} - -// static - Extract the stat info into LLSD -void LLPerfBlock::addStatsToLLSDandReset( LLSD & stats, - LLStatAccum::TimeScale scale ) -{ - // If we aren't in per-frame scale, we need to go from second to microsecond. - U32 scale_adjustment = 1; - if (LLStatAccum::SCALE_PER_FRAME != scale) - { - scale_adjustment = USEC_PER_SEC; - } - stat_map_t::iterator iter = sStatMap.begin(); - for ( ; iter != sStatMap.end(); ++iter ) - { // Put the entry into LLSD "/full/path/to/stat/" = microsecond total time - const std::string & stats_full_path = (*iter).first; - - StatEntry * stat = (*iter).second; - if (stat) - { - if (stat->mCount > 0) - { - stats[stats_full_path] = LLSD::emptyMap(); - stats[stats_full_path]["us"] = (LLSD::Integer) (scale_adjustment * stat->mStat.meanValue(scale)); - if (stat->mCount > 1) - { - stats[stats_full_path]["count"] = (LLSD::Integer) stat->mCount; - } - stat->mCount = 0; - } - } - else - { // Shouldn't have a NULL pointer in the map. - llwarns << "Unexpected NULL dynamic stat at '" << stats_full_path << "'" << llendl; - } - } -} - - -// ------------------------------------------------------------------------ - LLTimer LLStat::sTimer; LLFrameTimer LLStat::sFrameTimer; -void LLStat::init() +void LLStat::reset() { - llassert(mNumBins > 0); mNumValues = 0; mLastValue = 0.f; - mLastTime = 0.f; - mCurBin = (mNumBins-1); + delete[] mBins; + mBins = new ValueEntry[mNumBins]; + mCurBin = mNumBins-1; mNextBin = 0; - mBins = new F32[mNumBins]; - mBeginTime = new F64[mNumBins]; - mTime = new F64[mNumBins]; - mDT = new F32[mNumBins]; - for (U32 i = 0; i < mNumBins; i++) - { - mBins[i] = 0.f; - mBeginTime[i] = 0.0; - mTime[i] = 0.0; - mDT[i] = 0.f; - } +} + +LLStat::LLStat(std::string name, S32 num_bins, BOOL use_frame_timer) +: mUseFrameTimer(use_frame_timer), + mNumBins(num_bins), + mName(name), + mBins(NULL) +{ + llassert(mNumBins > 0); + mLastTime = 0.f; + + reset(); if (!mName.empty()) { @@ -783,27 +77,10 @@ LLStat::stat_map_t& LLStat::getStatList() return stat_list; } -LLStat::LLStat(const U32 num_bins, const BOOL use_frame_timer) - : mUseFrameTimer(use_frame_timer), - mNumBins(num_bins) -{ - init(); -} - -LLStat::LLStat(std::string name, U32 num_bins, BOOL use_frame_timer) - : mUseFrameTimer(use_frame_timer), - mNumBins(num_bins), - mName(name) -{ - init(); -} LLStat::~LLStat() { delete[] mBins; - delete[] mBeginTime; - delete[] mTime; - delete[] mDT; if (!mName.empty()) { @@ -815,76 +92,15 @@ LLStat::~LLStat() } } -void LLStat::reset() -{ - U32 i; - - mNumValues = 0; - mLastValue = 0.f; - mCurBin = (mNumBins-1); - delete[] mBins; - delete[] mBeginTime; - delete[] mTime; - delete[] mDT; - mBins = new F32[mNumBins]; - mBeginTime = new F64[mNumBins]; - mTime = new F64[mNumBins]; - mDT = new F32[mNumBins]; - for (i = 0; i < mNumBins; i++) - { - mBins[i] = 0.f; - mBeginTime[i] = 0.0; - mTime[i] = 0.0; - mDT[i] = 0.f; - } -} - -void LLStat::setBeginTime(const F64 time) -{ - mBeginTime[mNextBin] = time; -} - -void LLStat::addValueTime(const F64 time, const F32 value) -{ - if (mNumValues < mNumBins) - { - mNumValues++; - } - - // Increment the bin counters. - mCurBin++; - if ((U32)mCurBin == mNumBins) - { - mCurBin = 0; - } - mNextBin++; - if ((U32)mNextBin == mNumBins) - { - mNextBin = 0; - } - - mBins[mCurBin] = value; - mTime[mCurBin] = time; - mDT[mCurBin] = (F32)(mTime[mCurBin] - mBeginTime[mCurBin]); - //this value is used to prime the min/max calls - mLastTime = mTime[mCurBin]; - mLastValue = value; - - // Set the begin time for the next stat segment. - mBeginTime[mNextBin] = mTime[mCurBin]; - mTime[mNextBin] = mTime[mCurBin]; - mDT[mNextBin] = 0.f; -} - void LLStat::start() { if (mUseFrameTimer) { - mBeginTime[mNextBin] = sFrameTimer.getElapsedSeconds(); + mBins[mNextBin].mBeginTime = sFrameTimer.getElapsedSeconds(); } else { - mBeginTime[mNextBin] = sTimer.getElapsedTimeF64(); + mBins[mNextBin].mBeginTime = sTimer.getElapsedTimeF64(); } } @@ -897,41 +113,41 @@ void LLStat::addValue(const F32 value) // Increment the bin counters. mCurBin++; - if ((U32)mCurBin == mNumBins) + if (mCurBin >= mNumBins) { mCurBin = 0; } mNextBin++; - if ((U32)mNextBin == mNumBins) + if (mNextBin >= mNumBins) { mNextBin = 0; } - mBins[mCurBin] = value; + mBins[mCurBin].mValue = value; if (mUseFrameTimer) { - mTime[mCurBin] = sFrameTimer.getElapsedSeconds(); + mBins[mCurBin].mTime = sFrameTimer.getElapsedSeconds(); } else { - mTime[mCurBin] = sTimer.getElapsedTimeF64(); + mBins[mCurBin].mTime = sTimer.getElapsedTimeF64(); } - mDT[mCurBin] = (F32)(mTime[mCurBin] - mBeginTime[mCurBin]); + mBins[mCurBin].mDT = (F32)(mBins[mCurBin].mTime - mBins[mCurBin].mBeginTime); //this value is used to prime the min/max calls - mLastTime = mTime[mCurBin]; + mLastTime = mBins[mCurBin].mTime; mLastValue = value; // Set the begin time for the next stat segment. - mBeginTime[mNextBin] = mTime[mCurBin]; - mTime[mNextBin] = mTime[mCurBin]; - mDT[mNextBin] = 0.f; + mBins[mNextBin].mBeginTime = mBins[mCurBin].mTime; + mBins[mNextBin].mTime = mBins[mCurBin].mTime; + mBins[mNextBin].mDT = 0.f; } F32 LLStat::getMax() const { - U32 i; + S32 i; F32 current_max = mLastValue; if (mNumBins == 0) { @@ -942,13 +158,13 @@ F32 LLStat::getMax() const for (i = 0; (i < mNumBins) && (i < mNumValues); i++) { // Skip the bin we're currently filling. - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - if (mBins[i] > current_max) + if (mBins[i].mValue > current_max) { - current_max = mBins[i]; + current_max = mBins[i].mValue; } } } @@ -957,17 +173,17 @@ F32 LLStat::getMax() const F32 LLStat::getMean() const { - U32 i; + S32 i; F32 current_mean = 0.f; - U32 samples = 0; + S32 samples = 0; for (i = 0; (i < mNumBins) && (i < mNumValues); i++) { // Skip the bin we're currently filling. - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - current_mean += mBins[i]; + current_mean += mBins[i].mValue; samples++; } @@ -985,7 +201,7 @@ F32 LLStat::getMean() const F32 LLStat::getMin() const { - U32 i; + S32 i; F32 current_min = mLastValue; if (mNumBins == 0) @@ -997,53 +213,19 @@ F32 LLStat::getMin() const for (i = 0; (i < mNumBins) && (i < mNumValues); i++) { // Skip the bin we're currently filling. - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - if (mBins[i] < current_min) + if (mBins[i].mValue < current_min) { - current_min = mBins[i]; + current_min = mBins[i].mValue; } } } return current_min; } -F32 LLStat::getSum() const -{ - U32 i; - F32 sum = 0.f; - for (i = 0; (i < mNumBins) && (i < mNumValues); i++) - { - // Skip the bin we're currently filling. - if (i == (U32)mNextBin) - { - continue; - } - sum += mBins[i]; - } - - return sum; -} - -F32 LLStat::getSumDuration() const -{ - U32 i; - F32 sum = 0.f; - for (i = 0; (i < mNumBins) && (i < mNumValues); i++) - { - // Skip the bin we're currently filling. - if (i == (U32)mNextBin) - { - continue; - } - sum += mDT[i]; - } - - return sum; -} - F32 LLStat::getPrev(S32 age) const { S32 bin; @@ -1059,7 +241,7 @@ F32 LLStat::getPrev(S32 age) const // Bogus for bin we're currently working on. return 0.f; } - return mBins[bin]; + return mBins[bin].mValue; } F32 LLStat::getPrevPerSec(S32 age) const @@ -1077,107 +259,34 @@ F32 LLStat::getPrevPerSec(S32 age) const // Bogus for bin we're currently working on. return 0.f; } - return mBins[bin] / mDT[bin]; -} - -F64 LLStat::getPrevBeginTime(S32 age) const -{ - S32 bin; - bin = mCurBin - age; - - while (bin < 0) - { - bin += mNumBins; - } - - if (bin == mNextBin) - { - // Bogus for bin we're currently working on. - return 0.f; - } - - return mBeginTime[bin]; -} - -F64 LLStat::getPrevTime(S32 age) const -{ - S32 bin; - bin = mCurBin - age; - - while (bin < 0) - { - bin += mNumBins; - } - - if (bin == mNextBin) - { - // Bogus for bin we're currently working on. - return 0.f; - } - - return mTime[bin]; -} - -F32 LLStat::getBin(S32 bin) const -{ - return mBins[bin]; -} - -F32 LLStat::getBinPerSec(S32 bin) const -{ - return mBins[bin] / mDT[bin]; -} - -F64 LLStat::getBinBeginTime(S32 bin) const -{ - return mBeginTime[bin]; -} - -F64 LLStat::getBinTime(S32 bin) const -{ - return mTime[bin]; + return mBins[bin].mValue / mBins[bin].mDT; } F32 LLStat::getCurrent() const { - return mBins[mCurBin]; + return mBins[mCurBin].mValue; } F32 LLStat::getCurrentPerSec() const { - return mBins[mCurBin] / mDT[mCurBin]; -} - -F64 LLStat::getCurrentBeginTime() const -{ - return mBeginTime[mCurBin]; -} - -F64 LLStat::getCurrentTime() const -{ - return mTime[mCurBin]; -} - -F32 LLStat::getCurrentDuration() const -{ - return mDT[mCurBin]; + return mBins[mCurBin].mValue / mBins[mCurBin].mDT; } F32 LLStat::getMeanPerSec() const { - U32 i; + S32 i; F32 value = 0.f; F32 dt = 0.f; for (i = 0; (i < mNumBins) && (i < mNumValues); i++) { // Skip the bin we're currently filling. - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - value += mBins[i]; - dt += mDT[i]; + value += mBins[i].mValue; + dt += mBins[i].mDT; } if (dt > 0.f) @@ -1193,14 +302,14 @@ F32 LLStat::getMeanPerSec() const F32 LLStat::getMeanDuration() const { F32 dur = 0.0f; - U32 count = 0; - for (U32 i=0; (i < mNumBins) && (i < mNumValues); i++) + S32 count = 0; + for (S32 i=0; (i < mNumBins) && (i < mNumValues); i++) { - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - dur += mDT[i]; + dur += mBins[i].mDT; count++; } @@ -1217,46 +326,45 @@ F32 LLStat::getMeanDuration() const F32 LLStat::getMaxPerSec() const { - U32 i; F32 value; if (mNextBin != 0) { - value = mBins[0]/mDT[0]; + value = mBins[0].mValue/mBins[0].mDT; } else if (mNumValues > 0) { - value = mBins[1]/mDT[1]; + value = mBins[1].mValue/mBins[1].mDT; } else { value = 0.f; } - for (i = 0; (i < mNumBins) && (i < mNumValues); i++) + for (S32 i = 0; (i < mNumBins) && (i < mNumValues); i++) { // Skip the bin we're currently filling. - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - value = llmax(value, mBins[i]/mDT[i]); + value = llmax(value, mBins[i].mValue/mBins[i].mDT); } return value; } F32 LLStat::getMinPerSec() const { - U32 i; + S32 i; F32 value; if (mNextBin != 0) { - value = mBins[0]/mDT[0]; + value = mBins[0].mValue/mBins[0].mDT; } else if (mNumValues > 0) { - value = mBins[1]/mDT[1]; + value = mBins[1].mValue/mBins[0].mDT; } else { @@ -1266,25 +374,15 @@ F32 LLStat::getMinPerSec() const for (i = 0; (i < mNumBins) && (i < mNumValues); i++) { // Skip the bin we're currently filling. - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - value = llmin(value, mBins[i]/mDT[i]); + value = llmin(value, mBins[i].mValue/mBins[i].mDT); } return value; } -F32 LLStat::getMinDuration() const -{ - F32 dur = 0.0f; - for (U32 i=0; (i < mNumBins) && (i < mNumValues); i++) - { - dur = llmin(dur, mDT[i]); - } - return dur; -} - U32 LLStat::getNumValues() const { return mNumValues; @@ -1295,11 +393,6 @@ S32 LLStat::getNumBins() const return mNumBins; } -S32 LLStat::getCurBin() const -{ - return mCurBin; -} - S32 LLStat::getNextBin() const { return mNextBin; diff --git a/indra/llcommon/llstat.h b/indra/llcommon/llstat.h index 1a8404cc07..38377a010b 100644 --- a/indra/llcommon/llstat.h +++ b/indra/llcommon/llstat.h @@ -27,294 +27,46 @@ #ifndef LL_LLSTAT_H #define LL_LLSTAT_H -#include <deque> #include <map> #include "lltimer.h" #include "llframetimer.h" -#include "llfile.h" class LLSD; -// Set this if longer stats are needed -#define ENABLE_LONG_TIME_STATS 0 - -// -// Accumulates statistics for an arbitrary length of time. -// Does this by maintaining a chain of accumulators, each one -// accumulation the results of the parent. Can scale to arbitrary -// amounts of time with very low memory cost. -// - -class LL_COMMON_API LLStatAccum -{ -protected: - LLStatAccum(bool use_frame_timer); - virtual ~LLStatAccum(); - -public: - enum TimeScale { - SCALE_100MS, - SCALE_SECOND, - SCALE_MINUTE, -#if ENABLE_LONG_TIME_STATS - SCALE_HOUR, - SCALE_DAY, - SCALE_WEEK, -#endif - NUM_SCALES, // Use to size storage arrays - SCALE_PER_FRAME // For latest frame information - should be after NUM_SCALES since this doesn't go into the time buckets - }; - - static U64 sScaleTimes[NUM_SCALES]; - - virtual F32 meanValue(TimeScale scale) const; - // see the subclasses for the specific meaning of value - - F32 meanValueOverLast100ms() const { return meanValue(SCALE_100MS); } - F32 meanValueOverLastSecond() const { return meanValue(SCALE_SECOND); } - F32 meanValueOverLastMinute() const { return meanValue(SCALE_MINUTE); } - - void reset(U64 when); - - void sum(F64 value); - void sum(F64 value, U64 when); - - U64 getCurrentUsecs() const; - // Get current microseconds based on timer type - - BOOL mUseFrameTimer; - BOOL mRunning; - - U64 mLastTime; - - struct Bucket - { - Bucket() : - accum(0.0), - endTime(0), - lastValid(false), - lastAccum(0.0) - {} - - F64 accum; - U64 endTime; - - bool lastValid; - F64 lastAccum; - }; - - Bucket mBuckets[NUM_SCALES]; - - BOOL mLastSampleValid; - F64 mLastSampleValue; -}; - -class LL_COMMON_API LLStatMeasure : public LLStatAccum - // gathers statistics about things that are measured - // ex.: tempature, time dilation -{ -public: - LLStatMeasure(bool use_frame_timer = true); - - void sample(F64); - void sample(S32 v) { sample((F64)v); } - void sample(U32 v) { sample((F64)v); } - void sample(S64 v) { sample((F64)v); } - void sample(U64 v) { sample((F64)v); } -}; - - -class LL_COMMON_API LLStatRate : public LLStatAccum - // gathers statistics about things that can be counted over time - // ex.: LSL instructions executed, messages sent, simulator frames completed - // renders it in terms of rate of thing per second -{ -public: - LLStatRate(bool use_frame_timer = true); - - void count(U32); - // used to note that n items have occured - - void mark(); - // used for counting the rate thorugh a point in the code -}; - - -class LL_COMMON_API LLStatTime : public LLStatAccum - // gathers statistics about time spent in a block of code - // measure average duration per second in the block -{ -public: - LLStatTime( const std::string & key = "undefined" ); - - U32 mFrameNumber; // Current frame number - U64 mTotalTimeInFrame; // Total time (microseconds) accumulated during the last frame - - void setKey( const std::string & key ) { mKey = key; }; - - virtual F32 meanValue(TimeScale scale) const; - -private: - void start(); // Start and stop measuring time block - void stop(); - - std::string mKey; // Tag representing this time block - -#if LL_DEBUG - BOOL mRunning; // TRUE if start() has been called -#endif - - friend class LLPerfBlock; -}; - -// ---------------------------------------------------------------------------- - - -// Use this class on the stack to record statistics about an area of code -class LL_COMMON_API LLPerfBlock -{ -public: - struct StatEntry - { - StatEntry(const std::string& key) : mStat(LLStatTime(key)), mCount(0) {} - LLStatTime mStat; - U32 mCount; - }; - typedef std::map<std::string, StatEntry*> stat_map_t; - - // Use this constructor for pre-defined LLStatTime objects - LLPerfBlock(LLStatTime* stat); - - // Use this constructor for normal, optional LLPerfBlock time slices - LLPerfBlock( const char* key ); - - // Use this constructor for dynamically created LLPerfBlock time slices - // that are only enabled by specific control flags - LLPerfBlock( const char* key1, const char* key2, S32 flags = LLSTATS_BASIC_STATS ); - - ~LLPerfBlock(); - - enum - { // Stats bitfield flags - LLSTATS_NO_OPTIONAL_STATS = 0x00, // No optional stats gathering, just pre-defined LLStatTime objects - LLSTATS_BASIC_STATS = 0x01, // Gather basic optional runtime stats - LLSTATS_SCRIPT_FUNCTIONS = 0x02, // Include LSL function calls - }; - static void setStatsFlags( S32 flags ) { sStatsFlags = flags; }; - static S32 getStatsFlags() { return sStatsFlags; }; - - static void clearDynamicStats(); // Reset maps to clear out dynamic objects - static void addStatsToLLSDandReset( LLSD & stats, // Get current information and clear time bin - LLStatAccum::TimeScale scale ); - -private: - // Initialize dynamically created LLStatTime objects - void initDynamicStat(const std::string& key); - - std::string mLastPath; // Save sCurrentStatPath when this is called - LLStatTime * mPredefinedStat; // LLStatTime object to get data - StatEntry * mDynamicStat; // StatEntryobject to get data - - static S32 sStatsFlags; // Control what is being recorded - static stat_map_t sStatMap; // Map full path string to LLStatTime objects - static std::string sCurrentStatPath; // Something like "frame/physics/physics step" -}; - -// ---------------------------------------------------------------------------- - -class LL_COMMON_API LLPerfStats -{ -public: - LLPerfStats(const std::string& process_name = "unknown", S32 process_pid = 0); - virtual ~LLPerfStats(); - - virtual void init(); // Reset and start all stat timers - virtual void updatePerFrameStats(); - // Override these function to add process-specific information to the performance log header and per-frame logging. - virtual void addProcessHeaderInfo(LLSD& info) { /* not implemented */ } - virtual void addProcessFrameInfo(LLSD& info, LLStatAccum::TimeScale scale) { /* not implemented */ } - - // High-resolution frame stats - BOOL frameStatsIsRunning() { return (mReportPerformanceStatEnd > 0.); }; - F32 getReportPerformanceInterval() const { return mReportPerformanceStatInterval; }; - void setReportPerformanceInterval( F32 interval ) { mReportPerformanceStatInterval = interval; }; - void setReportPerformanceDuration( F32 seconds, S32 flags = LLPerfBlock::LLSTATS_NO_OPTIONAL_STATS ); - void setProcessName(const std::string& process_name) { mProcessName = process_name; } - void setProcessPID(S32 process_pid) { mProcessPID = process_pid; } - -protected: - void openPerfStatsFile(); // Open file for high resolution metrics logging - void dumpIntervalPerformanceStats(); - - llofstream mFrameStatsFile; // File for per-frame stats - BOOL mFrameStatsFileFailure; // Flag to prevent repeat opening attempts - BOOL mSkipFirstFrameStats; // Flag to skip one (partial) frame report - std::string mProcessName; - S32 mProcessPID; - -private: - F32 mReportPerformanceStatInterval; // Seconds between performance stats - F64 mReportPerformanceStatEnd; // End time (seconds) for performance stats -}; - // ---------------------------------------------------------------------------- class LL_COMMON_API LLStat { private: typedef std::multimap<std::string, LLStat*> stat_map_t; - void init(); static stat_map_t& getStatList(); public: - LLStat(U32 num_bins = 32, BOOL use_frame_timer = FALSE); - LLStat(std::string name, U32 num_bins = 32, BOOL use_frame_timer = FALSE); + LLStat(std::string name = std::string(), S32 num_bins = 32, BOOL use_frame_timer = FALSE); ~LLStat(); - void reset(); - void start(); // Start the timer for the current "frame", otherwise uses the time tracked from // the last addValue + void reset(); void addValue(const F32 value = 1.f); // Adds the current value being tracked, and tracks the DT. void addValue(const S32 value) { addValue((F32)value); } void addValue(const U32 value) { addValue((F32)value); } - void setBeginTime(const F64 time); - void addValueTime(const F64 time, const F32 value = 1.f); - - S32 getCurBin() const; S32 getNextBin() const; - F32 getCurrent() const; - F32 getCurrentPerSec() const; - F64 getCurrentBeginTime() const; - F64 getCurrentTime() const; - F32 getCurrentDuration() const; - F32 getPrev(S32 age) const; // Age is how many "addValues" previously - zero is current F32 getPrevPerSec(S32 age) const; // Age is how many "addValues" previously - zero is current - F64 getPrevBeginTime(S32 age) const; - F64 getPrevTime(S32 age) const; - - F32 getBin(S32 bin) const; - F32 getBinPerSec(S32 bin) const; - F64 getBinBeginTime(S32 bin) const; - F64 getBinTime(S32 bin) const; - - F32 getMax() const; - F32 getMaxPerSec() const; + F32 getCurrent() const; + F32 getCurrentPerSec() const; + F32 getMin() const; + F32 getMinPerSec() const; F32 getMean() const; F32 getMeanPerSec() const; F32 getMeanDuration() const; - - F32 getMin() const; - F32 getMinPerSec() const; - F32 getMinDuration() const; - - F32 getSum() const; - F32 getSumDuration() const; + F32 getMax() const; + F32 getMaxPerSec() const; U32 getNumValues() const; S32 getNumBins() const; @@ -326,10 +78,21 @@ private: U32 mNumBins; F32 mLastValue; F64 mLastTime; - F32 *mBins; - F64 *mBeginTime; - F64 *mTime; - F32 *mDT; + + struct ValueEntry + { + ValueEntry() + : mValue(0.f), + mBeginTime(0.0), + mTime(0.0), + mDT(0.f) + {} + F32 mValue; + F64 mBeginTime; + F64 mTime; + F32 mDT; + }; + ValueEntry* mBins; S32 mCurBin; S32 mNextBin; diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h index 8ad12c9a03..d3941e1bc9 100644 --- a/indra/llcommon/llstl.h +++ b/indra/llcommon/llstl.h @@ -33,6 +33,7 @@ #include <vector> #include <set> #include <deque> +#include <typeinfo> // Use to compare the first element only of a pair // e.g. typedef std::set<std::pair<int, Data*>, compare_pair<int, Data*> > some_pair_set_t; @@ -470,4 +471,54 @@ llbind2nd(const _Operation& __oper, const _Tp& __x) return llbinder2nd<_Operation>(__oper, _Arg2_type(__x)); } +/** + * Compare std::type_info* pointers a la std::less. We break this out as a + * separate function for use in two different std::less specializations. + */ +inline +bool before(const std::type_info* lhs, const std::type_info* rhs) +{ +#if LL_LINUX && defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)) + // If we're building on Linux with gcc, and it's either gcc 3.x or + // 4.{0,1,2,3}, then we have to use a workaround. Note that we use gcc on + // Mac too, and some people build with gcc on Windows (cygwin or mingw). + // On Linux, different load modules may produce different type_info* + // pointers for the same type. Have to compare name strings to get good + // results. + return strcmp(lhs->name(), rhs->name()) < 0; +#else // not Linux, or gcc 4.4+ + // Just use before(), as we normally would + return lhs->before(*rhs); +#endif +} + +/** + * Specialize std::less<std::type_info*> to use std::type_info::before(). + * See MAINT-1175. It is NEVER a good idea to directly compare std::type_info* + * because, on Linux, you might get different std::type_info* pointers for the + * same type (from different load modules)! + */ +namespace std +{ + template <> + struct less<const std::type_info*>: + public std::binary_function<const std::type_info*, const std::type_info*, bool> + { + bool operator()(const std::type_info* lhs, const std::type_info* rhs) const + { + return before(lhs, rhs); + } + }; + + template <> + struct less<std::type_info*>: + public std::binary_function<std::type_info*, std::type_info*, bool> + { + bool operator()(std::type_info* lhs, std::type_info* rhs) const + { + return before(lhs, rhs); + } + }; +} // std + #endif // LL_LLSTL_H diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index fa0eb9f72c..0c32679744 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -47,7 +47,8 @@ std::string ll_safe_string(const char* in) std::string ll_safe_string(const char* in, S32 maxlen) { - if(in) return std::string(in, maxlen); + if(in && maxlen > 0 ) return std::string(in, maxlen); + return std::string(); } diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 6073bcd0a6..c96f2191f3 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -944,13 +944,15 @@ LLSD LLMemoryInfo::loadStatsMap() state.dwLength = sizeof(state); GlobalMemoryStatusEx(&state); - stats.add("Percent Memory use", state.dwMemoryLoad); - stats.add("Total Physical KB", state.ullTotalPhys/1024); - stats.add("Avail Physical KB", state.ullAvailPhys/1024); - stats.add("Total page KB", state.ullTotalPageFile/1024); - stats.add("Avail page KB", state.ullAvailPageFile/1024); - stats.add("Total Virtual KB", state.ullTotalVirtual/1024); - stats.add("Avail Virtual KB", state.ullAvailVirtual/1024); + DWORDLONG div = 1024; + + stats.add("Percent Memory use", state.dwMemoryLoad/div); + stats.add("Total Physical KB", state.ullTotalPhys/div); + stats.add("Avail Physical KB", state.ullAvailPhys/div); + stats.add("Total page KB", state.ullTotalPageFile/div); + stats.add("Avail page KB", state.ullAvailPageFile/div); + stats.add("Total Virtual KB", state.ullTotalVirtual/div); + stats.add("Avail Virtual KB", state.ullAvailVirtual/div); PERFORMANCE_INFORMATION perf; perf.cb = sizeof(perf); @@ -982,15 +984,15 @@ LLSD LLMemoryInfo::loadStatsMap() GetProcessMemoryInfo(GetCurrentProcess(), PPROCESS_MEMORY_COUNTERS(&pmem), sizeof(pmem)); stats.add("Page Fault Count", pmem.PageFaultCount); - stats.add("PeakWorkingSetSize KB", pmem.PeakWorkingSetSize/1024); - stats.add("WorkingSetSize KB", pmem.WorkingSetSize/1024); - stats.add("QutaPeakPagedPoolUsage KB", pmem.QuotaPeakPagedPoolUsage/1024); - stats.add("QuotaPagedPoolUsage KB", pmem.QuotaPagedPoolUsage/1024); - stats.add("QuotaPeakNonPagedPoolUsage KB", pmem.QuotaPeakNonPagedPoolUsage/1024); - stats.add("QuotaNonPagedPoolUsage KB", pmem.QuotaNonPagedPoolUsage/1024); - stats.add("PagefileUsage KB", pmem.PagefileUsage/1024); - stats.add("PeakPagefileUsage KB", pmem.PeakPagefileUsage/1024); - stats.add("PrivateUsage KB", pmem.PrivateUsage/1024); + stats.add("PeakWorkingSetSize KB", pmem.PeakWorkingSetSize/div); + stats.add("WorkingSetSize KB", pmem.WorkingSetSize/div); + stats.add("QutaPeakPagedPoolUsage KB", pmem.QuotaPeakPagedPoolUsage/div); + stats.add("QuotaPagedPoolUsage KB", pmem.QuotaPagedPoolUsage/div); + stats.add("QuotaPeakNonPagedPoolUsage KB", pmem.QuotaPeakNonPagedPoolUsage/div); + stats.add("QuotaNonPagedPoolUsage KB", pmem.QuotaNonPagedPoolUsage/div); + stats.add("PagefileUsage KB", pmem.PagefileUsage/div); + stats.add("PeakPagefileUsage KB", pmem.PeakPagefileUsage/div); + stats.add("PrivateUsage KB", pmem.PrivateUsage/div); #elif LL_DARWIN diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index a6ad6b125c..1d56a52c32 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -71,6 +71,13 @@ LL_COMMON_API void assert_main_thread() } } +void LLThread::registerThreadID() +{ +#if !LL_DARWIN + sThreadID = ++sIDIter; +#endif +} + // // Handed to the APR thread creation function // @@ -114,7 +121,7 @@ LLThread::LLThread(const std::string& name, apr_pool_t *poolp) : apr_pool_create(&mAPRPoolp, NULL); // Create a subpool for this thread } mRunCondition = new LLCondition(mAPRPoolp); - + mDataLock = new LLMutex(mAPRPoolp); mLocalAPRFilePoolp = NULL ; } @@ -173,7 +180,10 @@ void LLThread::shutdown() } delete mRunCondition; - mRunCondition = 0; + mRunCondition = NULL; + + delete mDataLock; + mDataLock = NULL; if (mIsLocalPool && mAPRPoolp) { @@ -242,28 +252,30 @@ bool LLThread::runCondition(void) // Stop thread execution if requested until unpaused. void LLThread::checkPause() { - mRunCondition->lock(); + mDataLock->lock(); // This is in a while loop because the pthread API allows for spurious wakeups. while(shouldSleep()) { + mDataLock->unlock(); mRunCondition->wait(); // unlocks mRunCondition + mDataLock->lock(); // mRunCondition is locked when the thread wakes up } - mRunCondition->unlock(); + mDataLock->unlock(); } //============================================================================ void LLThread::setQuitting() { - mRunCondition->lock(); + mDataLock->lock(); if (mStatus == RUNNING) { mStatus = QUITTING; } - mRunCondition->unlock(); + mDataLock->unlock(); wake(); } @@ -285,12 +297,12 @@ void LLThread::yield() void LLThread::wake() { - mRunCondition->lock(); + mDataLock->lock(); if(!shouldSleep()) { mRunCondition->signal(); } - mRunCondition->unlock(); + mDataLock->unlock(); } void LLThread::wakeLocked() @@ -481,6 +493,19 @@ LLThreadSafeRefCount::LLThreadSafeRefCount() : { } +LLThreadSafeRefCount::LLThreadSafeRefCount(const LLThreadSafeRefCount& src) +{ + if (sMutex) + { + sMutex->lock(); + } + mRef = 0; + if (sMutex) + { + sMutex->unlock(); + } +} + LLThreadSafeRefCount::~LLThreadSafeRefCount() { if (mRef != 0) @@ -489,6 +514,7 @@ LLThreadSafeRefCount::~LLThreadSafeRefCount() } } + //============================================================================ LLResponder::~LLResponder() diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index b52e70ab2e..0fb89c5613 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -30,6 +30,7 @@ #include "llapp.h" #include "llapr.h" #include "apr_thread_cond.h" +#include "boost/intrusive_ptr.hpp" class LLThread; class LLMutex; @@ -88,6 +89,11 @@ public: U32 getID() const { return mID; } + // Called by threads *not* created via LLThread to register some + // internal state used by LLMutex. You must call this once early + // in the running thread to prevent collisions with the main thread. + static void registerThreadID(); + private: BOOL mPaused; @@ -97,6 +103,7 @@ private: protected: std::string mName; LLCondition* mRunCondition; + LLMutex* mDataLock; apr_thread_t *mAPRThreadp; apr_pool_t *mAPRPoolp; @@ -122,15 +129,15 @@ protected: inline void unlockData(); // This is the predicate that decides whether the thread should sleep. - // It should only be called with mRunCondition locked, since the virtual runCondition() function may need to access + // It should only be called with mDataLock locked, since the virtual runCondition() function may need to access // data structures that are thread-unsafe. bool shouldSleep(void) { return (mStatus == RUNNING) && (isPaused() || (!runCondition())); } // To avoid spurious signals (and the associated context switches) when the condition may or may not have changed, you can do the following: - // mRunCondition->lock(); + // mDataLock->lock(); // if(!shouldSleep()) // mRunCondition->signal(); - // mRunCondition->unlock(); + // mDataLock->unlock(); }; //============================================================================ @@ -205,12 +212,12 @@ private: void LLThread::lockData() { - mRunCondition->lock(); + mDataLock->lock(); } void LLThread::unlockData() { - mRunCondition->unlock(); + mDataLock->unlock(); } @@ -227,15 +234,27 @@ public: private: static LLMutex* sMutex; -private: - LLThreadSafeRefCount(const LLThreadSafeRefCount&); // not implemented - LLThreadSafeRefCount&operator=(const LLThreadSafeRefCount&); // not implemented - protected: virtual ~LLThreadSafeRefCount(); // use unref() public: LLThreadSafeRefCount(); + LLThreadSafeRefCount(const LLThreadSafeRefCount&); + LLThreadSafeRefCount& operator=(const LLThreadSafeRefCount& ref) + { + if (sMutex) + { + sMutex->lock(); + } + mRef = 0; + if (sMutex) + { + sMutex->unlock(); + } + return *this; + } + + void ref() { @@ -266,6 +285,22 @@ private: S32 mRef; }; +/** + * intrusive pointer support for LLThreadSafeRefCount + * this allows you to use boost::intrusive_ptr with any LLThreadSafeRefCount-derived type + */ +namespace boost +{ + inline void intrusive_ptr_add_ref(LLThreadSafeRefCount* p) + { + p->ref(); + } + + inline void intrusive_ptr_release(LLThreadSafeRefCount* p) + { + p->unref(); + } +}; //============================================================================ // Simple responder for self destructing callbacks diff --git a/indra/llcommon/lltypeinfolookup.h b/indra/llcommon/lltypeinfolookup.h index 7510cc12ed..0b6862444e 100644 --- a/indra/llcommon/lltypeinfolookup.h +++ b/indra/llcommon/lltypeinfolookup.h @@ -12,10 +12,50 @@ #if ! defined(LL_LLTYPEINFOLOOKUP_H) #define LL_LLTYPEINFOLOOKUP_H -#include "llsortedvector.h" +#include <boost/unordered_map.hpp> +#include <boost/functional/hash.hpp> +#include <boost/optional.hpp> +#include <functional> // std::binary_function #include <typeinfo> /** + * The following helper classes are based on the Boost.Unordered documentation: + * http://www.boost.org/doc/libs/1_45_0/doc/html/unordered/hash_equality.html + */ + +/** + * Compute hash for a string passed as const char* + */ +struct const_char_star_hash: public std::unary_function<const char*, std::size_t> +{ + std::size_t operator()(const char* str) const + { + std::size_t seed = 0; + for ( ; *str; ++str) + { + boost::hash_combine(seed, *str); + } + return seed; + } +}; + +/** + * Compute equality for strings passed as const char* + * + * I (nat) suspect that this is where the default behavior breaks for the + * const char* values returned from std::type_info::name(). If you compare the + * two const char* pointer values, as a naive, unspecialized implementation + * will surely do, they'll compare unequal. + */ +struct const_char_star_equal: public std::binary_function<const char*, const char*, bool> +{ + bool operator()(const char* lhs, const char* rhs) const + { + return strcmp(lhs, rhs) == 0; + } +}; + +/** * LLTypeInfoLookup is specifically designed for use cases for which you might * consider std::map<std::type_info*, VALUE>. We have several such data * structures in the viewer. The trouble with them is that at least on Linux, @@ -23,88 +63,55 @@ * different load modules will produce different std::type_info*. * LLTypeInfoLookup contains a workaround to address this issue. * - * Specifically, when we don't find the passed std::type_info*, - * LLTypeInfoLookup performs a linear search over registered entries to - * compare name() strings. Presuming that this succeeds, we cache the new - * (previously unrecognized) std::type_info* to speed future lookups. - * - * This worst-case fallback search (linear search with string comparison) - * should only happen the first time we look up a given type from a particular - * load module other than the one from which we initially registered types. - * (However, a lookup which wouldn't succeed anyway will always have - * worst-case performance.) This class is probably best used with less than a - * few dozen different types. + * The API deliberately diverges from std::map in several respects: + * * It avoids iterators, not only begin()/end() but also as return values + * from insert() and find(). This bypasses transform_iterator overhead. + * * Since we literally use compile-time types as keys, the essential insert() + * and find() methods accept the key type as a @em template parameter, + * accepting and returning value_type as a normal runtime value. This is to + * permit future optimization (e.g. compile-time type hashing) without + * changing the API. */ template <typename VALUE> class LLTypeInfoLookup { + // Use this for our underlying implementation: lookup by + // std::type_info::name() string. This is one of the rare cases in which I + // dare use const char* directly, rather than std::string, because I'm + // sure that every value returned by std::type_info::name() is static. + // HOWEVER, specify our own hash + equality functors: naively comparing + // distinct const char* values won't work. + typedef boost::unordered_map<const char*, VALUE, + const_char_star_hash, const_char_star_equal> impl_map_type; + public: - typedef LLTypeInfoLookup<VALUE> self; - typedef LLSortedVector<const std::type_info*, VALUE> vector_type; - typedef typename vector_type::key_type key_type; - typedef typename vector_type::mapped_type mapped_type; - typedef typename vector_type::value_type value_type; - typedef typename vector_type::iterator iterator; - typedef typename vector_type::const_iterator const_iterator; + typedef VALUE value_type; LLTypeInfoLookup() {} - iterator begin() { return mVector.begin(); } - iterator end() { return mVector.end(); } - const_iterator begin() const { return mVector.begin(); } - const_iterator end() const { return mVector.end(); } - bool empty() const { return mVector.empty(); } - std::size_t size() const { return mVector.size(); } - - std::pair<iterator, bool> insert(const std::type_info* key, const VALUE& value) - { - return insert(value_type(key, value)); - } - - std::pair<iterator, bool> insert(const value_type& pair) - { - return mVector.insert(pair); - } + bool empty() const { return mMap.empty(); } + std::size_t size() const { return mMap.size(); } - // const find() forwards to non-const find(): this can alter mVector! - const_iterator find(const std::type_info* key) const + template <typename KEY> + bool insert(const value_type& value) { - return const_cast<self*>(this)->find(key); + // Obtain and store the std::type_info::name() string as the key. + // Return just the bool from std::map::insert()'s return pair. + return mMap.insert(typename impl_map_type::value_type(typeid(KEY).name(), value)).second; } - // non-const find() caches previously-unknown type_info* to speed future - // lookups. - iterator find(const std::type_info* key) + template <typename KEY> + boost::optional<value_type> find() const { - iterator found = mVector.find(key); - if (found != mVector.end()) - { - // If LLSortedVector::find() found, great, we're done. - return found; - } - // Here we didn't find the passed type_info*. On Linux, though, even - // for the same type, typeid(sametype) produces a different type_info* - // when used in different load modules. So the fact that we didn't - // find the type_info* we seek doesn't mean this type isn't - // registered. Scan for matching name() string. - for (typename vector_type::iterator ti(mVector.begin()), tend(mVector.end()); - ti != tend; ++ti) - { - if (std::string(ti->first->name()) == key->name()) - { - // This unrecognized 'key' is for the same type as ti->first. - // To speed future lookups, insert a new entry that lets us - // look up ti->second using this same 'key'. - return insert(key, ti->second).first; - } - } - // We simply have never seen a type with this type_info* from any load - // module. - return mVector.end(); + // Use the std::type_info::name() string as the key. + typename impl_map_type::const_iterator found = mMap.find(typeid(KEY).name()); + if (found == mMap.end()) + return boost::optional<value_type>(); + return found->second; } private: - vector_type mVector; + impl_map_type mMap; }; #endif /* ! defined(LL_LLTYPEINFOLOOKUP_H) */ diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp index b39ea0c6f2..21456a599b 100644 --- a/indra/llcommon/lluri.cpp +++ b/indra/llcommon/lluri.cpp @@ -37,6 +37,8 @@ // system includes #include <boost/tokenizer.hpp> +#include <boost/algorithm/string/find_iterator.hpp> +#include <boost/algorithm/string/finder.hpp> void encode_character(std::ostream& ostr, std::string::value_type val) { @@ -317,7 +319,7 @@ LLURI LLURI::buildHTTP(const std::string& prefix, const LLSD& path) { LLURI result; - + // TODO: deal with '/' '?' '#' in host_port if (prefix.find("://") != prefix.npos) { @@ -342,15 +344,41 @@ LLURI LLURI::buildHTTP(const std::string& prefix, result.mEscapedPath += "/" + escapePathComponent(it->asString()); } } - else if(path.isString()) + else if (path.isString()) { - result.mEscapedPath += "/" + escapePathComponent(path.asString()); + std::string pathstr(path); + // Trailing slash is significant in HTTP land. If caller specified, + // make a point of preserving. + std::string last_slash; + std::string::size_type len(pathstr.length()); + if (len && pathstr[len-1] == '/') + { + last_slash = "/"; + } + + // Escape every individual path component, recombining with slashes. + for (boost::split_iterator<std::string::const_iterator> + ti(pathstr, boost::first_finder("/")), tend; + ti != tend; ++ti) + { + // Eliminate a leading slash or duplicate slashes anywhere. (Extra + // slashes show up here as empty components.) This test also + // eliminates a trailing slash, hence last_slash above. + if (! ti->empty()) + { + result.mEscapedPath + += "/" + escapePathComponent(std::string(ti->begin(), ti->end())); + } + } + + // Reinstate trailing slash, if any. + result.mEscapedPath += last_slash; } else if(path.isUndefined()) { // do nothing } - else + else { llwarns << "Valid path arguments to buildHTTP are array, string, or undef, you passed type" << path.type() << llendl; diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp index db8c9c85ab..0aaa50d231 100644 --- a/indra/llcommon/lluuid.cpp +++ b/indra/llcommon/lluuid.cpp @@ -44,10 +44,16 @@ #include "llmd5.h" #include "llstring.h" #include "lltimer.h" +#include "llthread.h" const LLUUID LLUUID::null; const LLTransactionID LLTransactionID::tnull; +// static +LLMutex * LLUUID::mMutex = NULL; + + + /* NOT DONE YET!!! @@ -734,6 +740,7 @@ void LLUUID::getCurrentTime(uuid_time_t *timestamp) getSystemTime(&time_last); uuids_this_tick = uuids_per_tick; init = TRUE; + mMutex = new LLMutex(NULL); } uuid_time_t time_now = {0,0}; @@ -785,6 +792,7 @@ void LLUUID::generate() #endif if (!has_init) { + has_init = 1; if (getNodeID(node_id) <= 0) { get_random_bytes(node_id, 6); @@ -806,18 +814,24 @@ void LLUUID::generate() #else clock_seq = (U16)ll_rand(65536); #endif - has_init = 1; } // get current time getCurrentTime(×tamp); + U16 our_clock_seq = clock_seq; - // if clock went backward change clockseq - if (cmpTime(×tamp, &time_last) == -1) { + // if clock hasn't changed or went backward, change clockseq + if (cmpTime(×tamp, &time_last) != 1) + { + LLMutexLock lock(mMutex); clock_seq = (clock_seq + 1) & 0x3FFF; - if (clock_seq == 0) clock_seq++; + if (clock_seq == 0) + clock_seq++; + our_clock_seq = clock_seq; // Ensure we're using a different clock_seq value from previous time } + time_last = timestamp; + memcpy(mData+10, node_id, 6); /* Flawfinder: ignore */ U32 tmp; tmp = timestamp.low; @@ -839,7 +853,8 @@ void LLUUID::generate() tmp >>= 8; mData[6] = (unsigned char) tmp; - tmp = clock_seq; + tmp = our_clock_seq; + mData[9] = (unsigned char) tmp; tmp >>= 8; mData[8] = (unsigned char) tmp; @@ -849,8 +864,6 @@ void LLUUID::generate() md5_uuid.update(mData,16); md5_uuid.finalize(); md5_uuid.raw_digest(mData); - - time_last = timestamp; } void LLUUID::generate(const std::string& hash_string) @@ -864,8 +877,14 @@ U32 LLUUID::getRandomSeed() static unsigned char seed[16]; /* Flawfinder: ignore */ getNodeID(&seed[0]); - seed[6]='\0'; - seed[7]='\0'; + + // Incorporate the pid into the seed to prevent + // processes that start on the same host at the same + // time from generating the same seed. + pid_t pid = LLApp::getPid(); + + seed[6]=(unsigned char)(pid >> 8); + seed[7]=(unsigned char)(pid); getSystemTime((uuid_time_t *)(&seed[8])); LLMD5 md5_seed; diff --git a/indra/llcommon/lluuid.h b/indra/llcommon/lluuid.h index 0b9e7d0cd0..7889828c85 100644 --- a/indra/llcommon/lluuid.h +++ b/indra/llcommon/lluuid.h @@ -31,6 +31,8 @@ #include "stdtypes.h" #include "llpreprocessor.h" +class LLMutex; + const S32 UUID_BYTES = 16; const S32 UUID_WORDS = 4; const S32 UUID_STR_LENGTH = 37; // actually wrong, should be 36 and use size below @@ -118,6 +120,7 @@ public: static BOOL validate(const std::string& in_string); // Validate that the UUID string is legal. static const LLUUID null; + static LLMutex * mMutex; static U32 getRandomSeed(); static S32 getNodeID(unsigned char * node_id); diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 2038681905..0b0c74b3d3 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -28,8 +28,8 @@ #define LL_LLVERSIONVIEWER_H const S32 LL_VERSION_MAJOR = 3; -const S32 LL_VERSION_MINOR = 4; -const S32 LL_VERSION_PATCH = 0; +const S32 LL_VERSION_MINOR = 5; +const S32 LL_VERSION_PATCH = 1; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; diff --git a/indra/llcommon/stdenums.h b/indra/llcommon/stdenums.h index 40b3364b36..efcbe76795 100644 --- a/indra/llcommon/stdenums.h +++ b/indra/llcommon/stdenums.h @@ -51,7 +51,8 @@ enum EDragAndDropType DAD_LINK = 14, DAD_MESH = 15, DAD_WIDGET = 16, - DAD_COUNT = 17, // number of types in this enum + DAD_PERSON = 17, + DAD_COUNT = 18, // number of types in this enum }; // Reasons for drags to be denied. diff --git a/indra/llcommon/tests/bitpack_test.cpp b/indra/llcommon/tests/bitpack_test.cpp index 05289881d0..4c3bc674af 100644 --- a/indra/llcommon/tests/bitpack_test.cpp +++ b/indra/llcommon/tests/bitpack_test.cpp @@ -95,6 +95,7 @@ namespace tut ensure("bitPack: individual unpack: 5", unpackbuffer[0] == (U8) str[5]); unpack_bufsize = bitunpack.bitUnpack(unpackbuffer, 8*4); // Life ensure_memory_matches("bitPack: 4 bytes unpack:", unpackbuffer, 4, str+6, 4); + ensure("keep compiler quiet", unpack_bufsize == unpack_bufsize); } // U32 packing diff --git a/indra/llcommon/tests/lluri_test.cpp b/indra/llcommon/tests/lluri_test.cpp index f6d4221256..4c64f15ca7 100644 --- a/indra/llcommon/tests/lluri_test.cpp +++ b/indra/llcommon/tests/lluri_test.cpp @@ -58,12 +58,12 @@ namespace tut ensure_equals("escape/unescape escaped", uri_esc_2, uri_esc_1); } }; - + typedef test_group<URITestData> URITestGroup; typedef URITestGroup::object URITestObject; URITestGroup uriTestGroup("LLURI"); - + template<> template<> void URITestObject::test<1>() { @@ -89,14 +89,14 @@ namespace tut template<> template<> void URITestObject::test<2>() { - // empty string + set_test_name("empty string"); checkParts(LLURI(""), "", "", "", ""); } - + template<> template<> void URITestObject::test<3>() { - // no scheme + set_test_name("no scheme"); checkParts(LLURI("foo"), "", "foo", "", ""); checkParts(LLURI("foo%3A"), "", "foo:", "", ""); } @@ -104,7 +104,7 @@ namespace tut template<> template<> void URITestObject::test<4>() { - // scheme w/o paths + set_test_name("scheme w/o paths"); checkParts(LLURI("mailto:zero@ll.com"), "mailto", "zero@ll.com", "", ""); checkParts(LLURI("silly://abc/def?foo"), @@ -114,16 +114,16 @@ namespace tut template<> template<> void URITestObject::test<5>() { - // authority section + set_test_name("authority section"); checkParts(LLURI("http:///"), "http", "///", "", "/"); - + checkParts(LLURI("http://abc"), "http", "//abc", "abc", ""); - + checkParts(LLURI("http://a%2Fb/cd"), "http", "//a/b/cd", "a/b", "/cd"); - + checkParts(LLURI("http://host?"), "http", "//host?", "host", ""); } @@ -131,13 +131,13 @@ namespace tut template<> template<> void URITestObject::test<6>() { - // path section + set_test_name("path section"); checkParts(LLURI("http://host/a/b/"), "http", "//host/a/b/", "host", "/a/b/"); - + checkParts(LLURI("http://host/a%3Fb/"), "http", "//host/a?b/", "host", "/a?b/"); - + checkParts(LLURI("http://host/a:b/"), "http", "//host/a:b/", "host", "/a:b/"); } @@ -145,16 +145,16 @@ namespace tut template<> template<> void URITestObject::test<7>() { - // query string + set_test_name("query string"); checkParts(LLURI("http://host/?"), "http", "//host/?", "host", "/", ""); - + checkParts(LLURI("http://host/?x"), "http", "//host/?x", "host", "/", "x"); - + checkParts(LLURI("http://host/??"), "http", "//host/??", "host", "/", "?"); - + checkParts(LLURI("http://host/?%3F"), "http", "//host/??", "host", "/", "?"); } @@ -167,19 +167,44 @@ namespace tut path.append("123"); checkParts(LLURI::buildHTTP("host", path), "http", "//host/x/123", "host", "/x/123"); - + LLSD query; query["123"] = "12"; query["abcd"] = "abc"; checkParts(LLURI::buildHTTP("host", path, query), "http", "//host/x/123?123=12&abcd=abc", "host", "/x/123", "123=12&abcd=abc"); + + ensure_equals(LLURI::buildHTTP("host", "").asString(), + "http://host"); + ensure_equals(LLURI::buildHTTP("host", "/").asString(), + "http://host/"); + ensure_equals(LLURI::buildHTTP("host", "//").asString(), + "http://host/"); + ensure_equals(LLURI::buildHTTP("host", "dir name").asString(), + "http://host/dir%20name"); + ensure_equals(LLURI::buildHTTP("host", "dir name/").asString(), + "http://host/dir%20name/"); + ensure_equals(LLURI::buildHTTP("host", "/dir name").asString(), + "http://host/dir%20name"); + ensure_equals(LLURI::buildHTTP("host", "/dir name/").asString(), + "http://host/dir%20name/"); + ensure_equals(LLURI::buildHTTP("host", "dir name/subdir name").asString(), + "http://host/dir%20name/subdir%20name"); + ensure_equals(LLURI::buildHTTP("host", "dir name/subdir name/").asString(), + "http://host/dir%20name/subdir%20name/"); + ensure_equals(LLURI::buildHTTP("host", "/dir name/subdir name").asString(), + "http://host/dir%20name/subdir%20name"); + ensure_equals(LLURI::buildHTTP("host", "/dir name/subdir name/").asString(), + "http://host/dir%20name/subdir%20name/"); + ensure_equals(LLURI::buildHTTP("host", "//dir name//subdir name//").asString(), + "http://host/dir%20name/subdir%20name/"); } template<> template<> void URITestObject::test<9>() { - // test unescaped path components + set_test_name("test unescaped path components"); LLSD path; path.append("x@*//*$&^"); path.append("123"); @@ -190,7 +215,7 @@ namespace tut template<> template<> void URITestObject::test<10>() { - // test unescaped query components + set_test_name("test unescaped query components"); LLSD path; path.append("x"); path.append("123"); @@ -205,7 +230,7 @@ namespace tut template<> template<> void URITestObject::test<11>() { - // test unescaped host components + set_test_name("test unescaped host components"); LLSD path; path.append("x"); path.append("123"); @@ -216,16 +241,16 @@ namespace tut "http", "//hi123*33--}{:portstuffs/x/123?123=12&abcd=abc", "hi123*33--}{:portstuffs", "/x/123", "123=12&abcd=abc"); } - + template<> template<> void URITestObject::test<12>() { - // test funky host_port values that are actually prefixes - + set_test_name("test funky host_port values that are actually prefixes"); + checkParts(LLURI::buildHTTP("http://example.com:8080", LLSD()), "http", "//example.com:8080", "example.com:8080", ""); - + checkParts(LLURI::buildHTTP("http://example.com:8080/", LLSD()), "http", "//example.com:8080/", "example.com:8080", "/"); @@ -242,7 +267,7 @@ namespace tut "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" "0123456789" "-._~"; - // test escape + set_test_name("test escape"); ensure_equals("escaping", LLURI::escape("abcdefg", "abcdef"), "abcdef%67"); ensure_equals("escaping", LLURI::escape("|/&\\+-_!@", ""), "%7C%2F%26%5C%2B%2D%5F%21%40"); ensure_equals("escaping as query variable", @@ -259,13 +284,12 @@ namespace tut cedilla.push_back( (char)0xA7 ); ensure_equals("escape UTF8", LLURI::escape( cedilla, unreserved), "%C3%A7"); } - + template<> template<> void URITestObject::test<14>() { - // make sure escape and unescape of empty strings return empty - // strings. + set_test_name("make sure escape and unescape of empty strings return empty strings."); std::string uri_esc(LLURI::escape("")); ensure("escape string empty", uri_esc.empty()); std::string uri_raw(LLURI::unescape("")); @@ -275,7 +299,7 @@ namespace tut template<> template<> void URITestObject::test<15>() { - // do some round-trip tests + set_test_name("do some round-trip tests"); escapeRoundTrip("http://secondlife.com"); escapeRoundTrip("http://secondlife.com/url with spaces"); escapeRoundTrip("http://bad[domain]name.com/"); @@ -286,7 +310,7 @@ namespace tut template<> template<> void URITestObject::test<16>() { - // Test the default escaping + set_test_name("Test the default escaping"); // yes -- this mangles the url. This is expected behavior std::string simple("http://secondlife.com"); ensure_equals( @@ -302,7 +326,7 @@ namespace tut template<> template<> void URITestObject::test<17>() { - // do some round-trip tests with very long strings. + set_test_name("do some round-trip tests with very long strings."); escapeRoundTrip("Welcome to Second Life.We hope you'll have a richly rewarding experience, filled with creativity, self expression and fun.The goals of the Community Standards are simple: treat each other with respect and without harassment, adhere to local standards as indicated by simulator ratings, and refrain from any hate activity which slurs a real-world individual or real-world community. Behavioral Guidelines - The Big Six"); escapeRoundTrip( "'asset_data':b(12100){'task_id':ucc706f2d-0b68-68f8-11a4-f1043ff35ca0}\n{\n\tname\tObject|\n\tpermissions 0\n\t{\n\t\tbase_mask\t7fffffff\n\t\towner_mask\t7fffffff\n\t\tgroup_mask\t00000000\n\t\teveryone_mask\t00000000\n\t\tnext_owner_mask\t7fffffff\n\t\tcreator_id\t13fd9595-a47b-4d64-a5fb-6da645f038e0\n\t\towner_id\t3c115e51-04f4-523c-9fa6-98aff1034730\n\t\tlast_owner_id\t3c115e51-04f4-523c-9fa6-98aff1034730\n\t\tgroup_id\t00000000-0000-0000-0000-000000000000\n\t}\n\tlocal_id\t217444921\n\ttotal_crc\t323\n\ttype\t2\n\ttask_valid\t2\n\ttravel_access\t13\n\tdisplayopts\t2\n\tdisplaytype\tv\n\tpos\t-0.368634403\t0.00781063363\t-0.569040775\n\toldpos\t150.117996\t25.8658009\t8.19664001\n\trotation\t-0.06293071806430816650390625\t-0.6995697021484375\t-0.7002241611480712890625\t0.1277817934751510620117188\n\tchildpos\t-0.00499999989\t-0.0359999985\t0.307999998\n\tchildrot\t-0.515492737293243408203125\t-0.46601200103759765625\t0.529055416584014892578125\t0.4870323240756988525390625\n\tscale" @@ -322,7 +346,7 @@ namespace tut "D STRING RW SV 20f36c3a-b44b-9bc7-87f3-018bfdfc8cda\n\tscratchpad\t0\n\t{\n\t\n\t}\n\tsale_info\t0\n\t{\n\t\tsale_type\tnot\n\t\tsale_price\t10\n\t}\n\torig_asset_id\t8747acbc-d391-1e59-69f1-41d06830e6c0\n\torig_item_id\t20f36c3a-b44b-9bc7-87f3-018bfdfc8cda\n\tfrom_task_id\t3c115e51-04f4-523c-9fa6-98aff1034730\n\tcorrect_family_id\t00000000-0000-0000-0000-000000000000\n\thas_rezzed\t0\n\tpre_link_base_mask\t7fffffff\n\tlinked \tlinked\n\tdefault_pay_price\t-2\t1\t5\t10\t20\n}\n"); } - + template<> template<> void URITestObject::test<18>() { @@ -335,7 +359,7 @@ namespace tut ensure_equals("pathmap", u.pathArray()[1].asString(), "login"); ensure_equals("query", u.query(), "first_name=Testert4&last_name=Tester&web_login_key=test"); ensure_equals("query map element", u.queryMap()["last_name"].asString(), "Tester"); - + u = LLURI("secondlife://Da Boom/128/128/128"); // if secondlife is the scheme, LLURI should parse /128/128/128 as path, with Da Boom as authority ensure_equals("scheme", u.scheme(), "secondlife"); @@ -350,7 +374,7 @@ namespace tut template<> template<> void URITestObject::test<19>() { - // Parse about: schemes + set_test_name("Parse about: schemes"); LLURI u("about:blank?redirect-http-hack=secondlife%3A%2F%2F%2Fapp%2Flogin%3Ffirst_name%3DCallum%26last_name%3DLinden%26location%3Dspecify%26grid%3Dvaak%26region%3D%2FMorris%2F128%2F128%26web_login_key%3Defaa4795-c2aa-4c58-8966-763c27931e78"); ensure_equals("scheme", u.scheme(), "about"); ensure_equals("authority", u.authority(), ""); diff --git a/indra/llcommon/tests/reflection_test.cpp b/indra/llcommon/tests/reflection_test.cpp index 59491cd1fe..8980ebb1f1 100644 --- a/indra/llcommon/tests/reflection_test.cpp +++ b/indra/llcommon/tests/reflection_test.cpp @@ -207,7 +207,7 @@ namespace tut const LLReflective* reflective = property->get(aggregated_data); // Wrong reflective type, should throw exception. // useless op to get rid of compiler warning. - reflective = NULL; + reflective = reflective; } catch(...) { diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt new file mode 100644 index 0000000000..9adfd0ed62 --- /dev/null +++ b/indra/llcorehttp/CMakeLists.txt @@ -0,0 +1,186 @@ +# -*- cmake -*- + +project(llcorehttp) + +include(00-Common) +include(GoogleMock) +include(CURL) +include(CARes) +include(OpenSSL) +include(ZLIB) +include(LLCoreHttp) +include(LLAddBuildTest) +include(LLMessage) +include(LLCommon) +include(Tut) + +include_directories (${CMAKE_CURRENT_SOURCE_DIR}) + +include_directories( + ${LLMESSAGE_INCLUDE_DIRS} + ${LLCOMMON_INCLUDE_DIRS} + ${LLCOREHTTP_INCLUDE_DIRS} + ) + +set(llcorehttp_SOURCE_FILES + bufferarray.cpp + bufferstream.cpp + httpcommon.cpp + httpheaders.cpp + httpoptions.cpp + httprequest.cpp + httpresponse.cpp + _httplibcurl.cpp + _httpopcancel.cpp + _httpoperation.cpp + _httpoprequest.cpp + _httpopsetget.cpp + _httpopsetpriority.cpp + _httppolicy.cpp + _httppolicyclass.cpp + _httppolicyglobal.cpp + _httpreplyqueue.cpp + _httprequestqueue.cpp + _httpservice.cpp + _refcounted.cpp + ) + +set(llcorehttp_HEADER_FILES + CMakeLists.txt + + bufferarray.h + bufferstream.h + httpcommon.h + httphandler.h + httpheaders.h + httpoptions.h + httprequest.h + httpresponse.h + _httpinternal.h + _httplibcurl.h + _httpopcancel.h + _httpoperation.h + _httpoprequest.h + _httpopsetget.h + _httpopsetpriority.h + _httppolicy.h + _httppolicyclass.h + _httppolicyglobal.h + _httpreadyqueue.h + _httpreplyqueue.h + _httprequestqueue.h + _httpservice.h + _mutex.h + _refcounted.h + _thread.h + ) + +set_source_files_properties(${llcorehttp_HEADER_FILES} + PROPERTIES HEADER_FILE_ONLY TRUE) +if (DARWIN OR LINUX) + # Boost headers define unused members in condition_variable so... + set_source_files_properties(${llcorehttp_SOURCE_FILES} + PROPERTIES COMPILE_FLAGS -Wno-unused-variable) +endif (DARWIN OR LINUX) + +list(APPEND llcorehttp_SOURCE_FILES ${llcorehttp_HEADER_FILES}) + +add_library (llcorehttp ${llcorehttp_SOURCE_FILES}) +target_link_libraries( + llcorehttp + ${CURL_LIBRARIES} + ${CARES_LIBRARIES} + ${OPENSSL_LIBRARIES} + ${CRYPTO_LIBRARIES} + ${BOOST_THREAD_LIBRARY} + ) + +# tests +if (LL_TESTS) + SET(llcorehttp_TEST_SOURCE_FILES + tests/test_allocator.cpp + ) + + set(llcorehttp_TEST_HEADER_FILS + tests/test_httpstatus.hpp + tests/test_refcounted.hpp + tests/test_httpoperation.hpp + tests/test_httprequest.hpp + tests/test_httprequestqueue.hpp + tests/test_httpheaders.hpp + tests/test_bufferarray.hpp + tests/test_bufferstream.hpp + ) + + set_source_files_properties(${llcorehttp_TEST_HEADER_FILES} + PROPERTIES HEADER_FILE_ONLY TRUE) + + list(APPEND llcorehttp_TEST_SOURCE_FILES ${llcorehttp_TEST_HEADER_FILES}) + + # LL_ADD_PROJECT_UNIT_TESTS(llcorehttp "${llcorehttp_TEST_SOURCE_FILES}") + + # set(TEST_DEBUG on) + set(test_libs + ${LLCOREHTTP_LIBRARIES} + ${WINDOWS_LIBRARIES} + ${LLMESSAGE_LIBRARIES} + ${LLCOMMON_LIBRARIES} + ${GOOGLEMOCK_LIBRARIES} + ${CURL_LIBRARIES} + ${CARES_LIBRARIES} + ${OPENSSL_LIBRARIES} + ${CRYPTO_LIBRARIES} + ${BOOST_SYSTEM_LIBRARY} + ${BOOST_THREAD_LIBRARY} + ) + + LL_ADD_INTEGRATION_TEST(llcorehttp + "${llcorehttp_TEST_SOURCE_FILES}" + "${test_libs}" + ${PYTHON_EXECUTABLE} + "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llcorehttp_peer.py" + ) + + # + # Example Programs + # + SET(llcorehttp_EXAMPLE_SOURCE_FILES + examples/http_texture_load.cpp + ) + + set(example_libs + ${LLCOREHTTP_LIBRARIES} + ${WINDOWS_LIBRARIES} + ${LLMESSAGE_LIBRARIES} + ${LLCOMMON_LIBRARIES} + ${GOOGLEMOCK_LIBRARIES} + ${CURL_LIBRARIES} + ${CARES_LIBRARIES} + ${OPENSSL_LIBRARIES} + ${CRYPTO_LIBRARIES} + ${BOOST_SYSTEM_LIBRARY} + ${BOOST_THREAD_LIBRARY} + ) + + add_executable(http_texture_load + ${llcorehttp_EXAMPLE_SOURCE_FILES} + ) + set_target_properties(http_texture_load + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}" + ) + + if (WINDOWS) + # The following come from LLAddBuildTest.cmake's INTEGRATION_TEST_xxxx target. + set_target_properties(http_texture_load + PROPERTIES + LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}" + LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO" + LINK_FLAGS_RELEASE "" + ) + endif (WINDOWS) + + target_link_libraries(http_texture_load ${example_libs}) + +endif (LL_TESTS) + diff --git a/indra/llcorehttp/_httpinternal.h b/indra/llcorehttp/_httpinternal.h new file mode 100644 index 0000000000..14f744a9f1 --- /dev/null +++ b/indra/llcorehttp/_httpinternal.h @@ -0,0 +1,154 @@ +/** + * @file _httpinternal.h + * @brief Implementation constants and magic numbers + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_INTERNAL_H_ +#define _LLCORE_HTTP_INTERNAL_H_ + + +// If you find this included in a public interface header, +// something wrong is probably happening. + + +// -------------------------------------------------------------------- +// General library to-do list +// +// - Implement policy classes. Structure is mostly there just didn't +// need it for the first consumer. +// - Consider Removing 'priority' from the request interface. Its use +// in an always active class can lead to starvation of low-priority +// requests. Requires coodination of priority values across all +// components that share a class. Changing priority across threads +// is slightly expensive (relative to gain) and hasn't been completely +// implemented. And the major user of priority, texture fetches, +// may not really need it. +// - Set/get for global policy and policy classes is clumsy. Rework +// it heading in a direction that allows for more dynamic behavior. +// - Move HttpOpRequest::prepareRequest() to HttpLibcurl for the +// pedantic. +// - Update downloader and other long-duration services are going to +// need a progress notification. Initial idea is to introduce a +// 'repeating request' which can piggyback on another request and +// persist until canceled or carrier completes. Current queue +// structures allow an HttpOperation object to be enqueued +// repeatedly, so... +// - Investigate making c-ares' re-implementation of a resolver library +// more resilient or more intelligent on Mac. Part of the DNS failure +// lies in here. The mechanism also looks a little less dynamic +// than needed in an environments where networking is changing. +// - Global optimizations: 'borrowing' connections from other classes, +// HTTP pipelining. +// - Dynamic/control system stuff: detect problems and self-adjust. +// This won't help in the face of the router problems we've looked +// at, however. Detect starvation due to UDP activity and provide +// feedback to it. +// +// Integration to-do list +// - LLTextureFetch still needs a major refactor. The use of +// LLQueuedThread makes it hard to inspect workers and do the +// resource waiting we're now doing. Rebuild along simpler lines +// some of which are suggested in new commentary at the top of +// the main source file. +// - Expand areas of usage eventually leading to the removal of LLCurl. +// Rough order of expansion: +// . Mesh fetch +// . Avatar names +// . Group membership lists +// . Caps access in general +// . 'The rest' +// - Adapt texture cache, image decode and other image consumers to +// the BufferArray model to reduce data copying. Alternatively, +// adapt this library to something else. +// +// -------------------------------------------------------------------- + + +// If '1', internal ready queues will not order ready +// requests by priority, instead it's first-come-first-served. +// Reprioritization requests have the side-effect of then +// putting the modified request at the back of the ready queue. + +#define LLCORE_HTTP_READY_QUEUE_IGNORES_PRIORITY 1 + + +namespace LLCore +{ + +// Maxium number of policy classes that can be defined. +// *TODO: Currently limited to the default class, extend. +const int HTTP_POLICY_CLASS_LIMIT = 1; + +// Debug/informational tracing. Used both +// as a global option and in per-request traces. +const int HTTP_TRACE_OFF = 0; +const int HTTP_TRACE_LOW = 1; +const int HTTP_TRACE_CURL_HEADERS = 2; +const int HTTP_TRACE_CURL_BODIES = 3; + +const int HTTP_TRACE_MIN = HTTP_TRACE_OFF; +const int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES; + +// Request retry limits +// +// At a minimum, retries need to extend past any throttling +// window we're expecting from central services. In the case +// of Linden services running through the caps routers, there's +// a five-second or so window for throttling with some spillover. +// We want to span a few windows to allow transport to slow +// after onset of the throttles and then recover without a final +// failure. Other systems may need other constants. +const int HTTP_RETRY_COUNT_DEFAULT = 8; +const int HTTP_RETRY_COUNT_MIN = 0; +const int HTTP_RETRY_COUNT_MAX = 100; + +const int HTTP_REDIRECTS_DEFAULT = 10; + +// Timeout value used for both connect and protocol exchange. +// Retries and time-on-queue are not included and aren't +// accounted for. +const long HTTP_REQUEST_TIMEOUT_DEFAULT = 30L; +const long HTTP_REQUEST_TIMEOUT_MIN = 0L; +const long HTTP_REQUEST_TIMEOUT_MAX = 3600L; + +// Limits on connection counts +const int HTTP_CONNECTION_LIMIT_DEFAULT = 8; +const int HTTP_CONNECTION_LIMIT_MIN = 1; +const int HTTP_CONNECTION_LIMIT_MAX = 256; + +// Tuning parameters + +// Time worker thread sleeps after a pass through the +// request, ready and active queues. +const int HTTP_SERVICE_LOOP_SLEEP_NORMAL_MS = 2; + +// Block allocation size (a tuning parameter) is found +// in bufferarray.h. + +// Compatibility controls +const bool HTTP_ENABLE_LINKSYS_WRT54G_V5_DNS_FIX = true; + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_INTERNAL_H_ diff --git a/indra/llcorehttp/_httplibcurl.cpp b/indra/llcorehttp/_httplibcurl.cpp new file mode 100644 index 0000000000..6fe0bfc7d1 --- /dev/null +++ b/indra/llcorehttp/_httplibcurl.cpp @@ -0,0 +1,373 @@ +/** + * @file _httplibcurl.cpp + * @brief Internal definitions of the Http libcurl thread + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "_httplibcurl.h" + +#include "httpheaders.h" +#include "bufferarray.h" +#include "_httpoprequest.h" +#include "_httppolicy.h" + +#include "llhttpstatuscodes.h" + + +namespace LLCore +{ + + +HttpLibcurl::HttpLibcurl(HttpService * service) + : mService(service), + mPolicyCount(0), + mMultiHandles(NULL) +{} + + +HttpLibcurl::~HttpLibcurl() +{ + shutdown(); + + mService = NULL; +} + + +void HttpLibcurl::shutdown() +{ + while (! mActiveOps.empty()) + { + HttpOpRequest * op(* mActiveOps.begin()); + mActiveOps.erase(mActiveOps.begin()); + + cancelRequest(op); + op->release(); + } + + if (mMultiHandles) + { + for (int policy_class(0); policy_class < mPolicyCount; ++policy_class) + { + if (mMultiHandles[policy_class]) + { + curl_multi_cleanup(mMultiHandles[policy_class]); + mMultiHandles[policy_class] = 0; + } + } + + delete [] mMultiHandles; + mMultiHandles = NULL; + } + + mPolicyCount = 0; +} + + +void HttpLibcurl::start(int policy_count) +{ + llassert_always(policy_count <= HTTP_POLICY_CLASS_LIMIT); + llassert_always(! mMultiHandles); // One-time call only + + mPolicyCount = policy_count; + mMultiHandles = new CURLM * [mPolicyCount]; + for (int policy_class(0); policy_class < mPolicyCount; ++policy_class) + { + mMultiHandles[policy_class] = curl_multi_init(); + } +} + + +// Give libcurl some cycles, invoke it's callbacks, process +// completed requests finalizing or issuing retries as needed. +// +// If active list goes empty *and* we didn't queue any +// requests for retry, we return a request for a hard +// sleep otherwise ask for a normal polling interval. +HttpService::ELoopSpeed HttpLibcurl::processTransport() +{ + HttpService::ELoopSpeed ret(HttpService::REQUEST_SLEEP); + + // Give libcurl some cycles to do I/O & callbacks + for (int policy_class(0); policy_class < mPolicyCount; ++policy_class) + { + if (! mMultiHandles[policy_class]) + continue; + + int running(0); + CURLMcode status(CURLM_CALL_MULTI_PERFORM); + do + { + running = 0; + status = curl_multi_perform(mMultiHandles[policy_class], &running); + } + while (0 != running && CURLM_CALL_MULTI_PERFORM == status); + + // Run completion on anything done + CURLMsg * msg(NULL); + int msgs_in_queue(0); + while ((msg = curl_multi_info_read(mMultiHandles[policy_class], &msgs_in_queue))) + { + if (CURLMSG_DONE == msg->msg) + { + CURL * handle(msg->easy_handle); + CURLcode result(msg->data.result); + + if (completeRequest(mMultiHandles[policy_class], handle, result)) + { + // Request is still active, don't get too sleepy + ret = HttpService::NORMAL; + } + handle = NULL; // No longer valid on return + } + else if (CURLMSG_NONE == msg->msg) + { + // Ignore this... it shouldn't mean anything. + ; + } + else + { + LL_WARNS_ONCE("CoreHttp") << "Unexpected message from libcurl. Msg code: " + << msg->msg + << LL_ENDL; + } + msgs_in_queue = 0; + } + } + + if (! mActiveOps.empty()) + { + ret = HttpService::NORMAL; + } + return ret; +} + + +// Caller has provided us with a ref count on op. +void HttpLibcurl::addOp(HttpOpRequest * op) +{ + llassert_always(op->mReqPolicy < mPolicyCount); + llassert_always(mMultiHandles[op->mReqPolicy] != NULL); + + // Create standard handle + if (! op->prepareRequest(mService)) + { + // Couldn't issue request, fail with notification + // *TODO: Need failure path + return; + } + + // Make the request live + curl_multi_add_handle(mMultiHandles[op->mReqPolicy], op->mCurlHandle); + op->mCurlActive = true; + + if (op->mTracing > HTTP_TRACE_OFF) + { + HttpPolicy & policy(mService->getPolicy()); + + LL_INFOS("CoreHttp") << "TRACE, ToActiveQueue, Handle: " + << static_cast<HttpHandle>(op) + << ", Actives: " << mActiveOps.size() + << ", Readies: " << policy.getReadyCount(op->mReqPolicy) + << LL_ENDL; + } + + // On success, make operation active + mActiveOps.insert(op); +} + + +// Implements the transport part of any cancel operation. +// See if the handle is an active operation and if so, +// use the more complicated transport-based cancelation +// method to kill the request. +bool HttpLibcurl::cancel(HttpHandle handle) +{ + HttpOpRequest * op(static_cast<HttpOpRequest *>(handle)); + active_set_t::iterator it(mActiveOps.find(op)); + if (mActiveOps.end() == it) + { + return false; + } + + // Cancel request + cancelRequest(op); + + // Drop references + mActiveOps.erase(it); + op->release(); + + return true; +} + + +// *NOTE: cancelRequest logic parallels completeRequest logic. +// Keep them synchronized as necessary. Caller is expected to +// remove the op from the active list and release the op *after* +// calling this method. It must be called first to deliver the +// op to the reply queue with refcount intact. +void HttpLibcurl::cancelRequest(HttpOpRequest * op) +{ + // Deactivate request + op->mCurlActive = false; + + // Detach from multi and recycle handle + curl_multi_remove_handle(mMultiHandles[op->mReqPolicy], op->mCurlHandle); + curl_easy_cleanup(op->mCurlHandle); + op->mCurlHandle = NULL; + + // Tracing + if (op->mTracing > HTTP_TRACE_OFF) + { + LL_INFOS("CoreHttp") << "TRACE, RequestCanceled, Handle: " + << static_cast<HttpHandle>(op) + << ", Status: " << op->mStatus.toHex() + << LL_ENDL; + } + + // Cancel op and deliver for notification + op->cancel(); +} + + +// *NOTE: cancelRequest logic parallels completeRequest logic. +// Keep them synchronized as necessary. +bool HttpLibcurl::completeRequest(CURLM * multi_handle, CURL * handle, CURLcode status) +{ + HttpOpRequest * op(NULL); + curl_easy_getinfo(handle, CURLINFO_PRIVATE, &op); + + if (handle != op->mCurlHandle || ! op->mCurlActive) + { + LL_WARNS("CoreHttp") << "libcurl handle and HttpOpRequest handle in disagreement or inactive request." + << " Handle: " << static_cast<HttpHandle>(handle) + << LL_ENDL; + return false; + } + + active_set_t::iterator it(mActiveOps.find(op)); + if (mActiveOps.end() == it) + { + LL_WARNS("CoreHttp") << "libcurl completion for request not on active list. Continuing." + << " Handle: " << static_cast<HttpHandle>(handle) + << LL_ENDL; + return false; + } + + // Deactivate request + mActiveOps.erase(it); + op->mCurlActive = false; + + // Set final status of request if it hasn't failed by other mechanisms yet + if (op->mStatus) + { + op->mStatus = HttpStatus(HttpStatus::EXT_CURL_EASY, status); + } + if (op->mStatus) + { + int http_status(HTTP_OK); + + curl_easy_getinfo(handle, CURLINFO_RESPONSE_CODE, &http_status); + if (http_status >= 100 && http_status <= 999) + { + char * cont_type(NULL); + curl_easy_getinfo(handle, CURLINFO_CONTENT_TYPE, &cont_type); + if (cont_type) + { + op->mReplyConType = cont_type; + } + op->mStatus = HttpStatus(http_status); + } + else + { + LL_WARNS("CoreHttp") << "Invalid HTTP response code (" + << http_status << ") received from server." + << LL_ENDL; + op->mStatus = HttpStatus(HttpStatus::LLCORE, HE_INVALID_HTTP_STATUS); + } + } + + // Detach from multi and recycle handle + curl_multi_remove_handle(multi_handle, handle); + curl_easy_cleanup(handle); + op->mCurlHandle = NULL; + + // Tracing + if (op->mTracing > HTTP_TRACE_OFF) + { + LL_INFOS("CoreHttp") << "TRACE, RequestComplete, Handle: " + << static_cast<HttpHandle>(op) + << ", Status: " << op->mStatus.toHex() + << LL_ENDL; + } + + // Dispatch to next stage + HttpPolicy & policy(mService->getPolicy()); + bool still_active(policy.stageAfterCompletion(op)); + + return still_active; +} + + +int HttpLibcurl::getActiveCount() const +{ + return mActiveOps.size(); +} + + +int HttpLibcurl::getActiveCountInClass(int policy_class) const +{ + int count(0); + + for (active_set_t::const_iterator iter(mActiveOps.begin()); + mActiveOps.end() != iter; + ++iter) + { + if ((*iter)->mReqPolicy == policy_class) + { + ++count; + } + } + + return count; +} + + +// --------------------------------------- +// Free functions +// --------------------------------------- + + +struct curl_slist * append_headers_to_slist(const HttpHeaders * headers, struct curl_slist * slist) +{ + for (HttpHeaders::container_t::const_iterator it(headers->mHeaders.begin()); + + headers->mHeaders.end() != it; + ++it) + { + slist = curl_slist_append(slist, (*it).c_str()); + } + return slist; +} + + +} // end namespace LLCore diff --git a/indra/llcorehttp/_httplibcurl.h b/indra/llcorehttp/_httplibcurl.h new file mode 100644 index 0000000000..611f029ef5 --- /dev/null +++ b/indra/llcorehttp/_httplibcurl.h @@ -0,0 +1,129 @@ +/** + * @file _httplibcurl.h + * @brief Declarations for internal class providing libcurl transport. + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_LIBCURL_H_ +#define _LLCORE_HTTP_LIBCURL_H_ + +#include "linden_common.h" // Modifies curl/curl.h interfaces + +#include <curl/curl.h> +#include <curl/multi.h> + +#include <set> + +#include "httprequest.h" +#include "_httpservice.h" +#include "_httpinternal.h" + + +namespace LLCore +{ + + +class HttpPolicy; +class HttpOpRequest; +class HttpHeaders; + + +/// Implements libcurl-based transport for an HttpService instance. +/// +/// Threading: Single-threaded. Other than for construction/destruction, +/// all methods are expected to be invoked in a single thread, typically +/// a worker thread of some sort. + +class HttpLibcurl +{ +public: + HttpLibcurl(HttpService * service); + virtual ~HttpLibcurl(); + +private: + HttpLibcurl(const HttpLibcurl &); // Not defined + void operator=(const HttpLibcurl &); // Not defined + +public: + /// Give cycles to libcurl to run active requests. Completed + /// operations (successful or failed) will be retried or handed + /// over to the reply queue as final responses. + /// + /// @return Indication of how long this method is + /// willing to wait for next service call. + HttpService::ELoopSpeed processTransport(); + + /// Add request to the active list. Caller is expected to have + /// provided us with a reference count on the op to hold the + /// request. (No additional references will be added.) + void addOp(HttpOpRequest * op); + + /// One-time call to set the number of policy classes to be + /// serviced and to create the resources for each. Value + /// must agree with HttpPolicy::setPolicies() call. + void start(int policy_count); + + /// Synchronously stop libcurl operations. All active requests + /// are canceled and removed from libcurl's handling. Easy + /// handles are detached from their multi handles and released. + /// Multi handles are also released. Canceled requests are + /// completed with canceled status and made available on their + /// respective reply queues. + /// + /// Can be restarted with a start() call. + void shutdown(); + + /// Return global and per-class counts of active requests. + int getActiveCount() const; + int getActiveCountInClass(int policy_class) const; + + /// Attempt to cancel a request identified by handle. + /// + /// Interface shadows HttpService's method. + /// + /// @return True if handle was found and operation canceled. + /// + bool cancel(HttpHandle handle); + +protected: + /// Invoked when libcurl has indicated a request has been processed + /// to completion and we need to move the request to a new state. + bool completeRequest(CURLM * multi_handle, CURL * handle, CURLcode status); + + /// Invoked to cancel an active request, mainly during shutdown + /// and destroy. + void cancelRequest(HttpOpRequest * op); + +protected: + typedef std::set<HttpOpRequest *> active_set_t; + +protected: + HttpService * mService; // Simple reference, not owner + active_set_t mActiveOps; + int mPolicyCount; + CURLM ** mMultiHandles; +}; // end class HttpLibcurl + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_LIBCURL_H_ diff --git a/indra/llcorehttp/_httpopcancel.cpp b/indra/llcorehttp/_httpopcancel.cpp new file mode 100644 index 0000000000..c1912eb3db --- /dev/null +++ b/indra/llcorehttp/_httpopcancel.cpp @@ -0,0 +1,73 @@ +/** + * @file _httpopcancel.cpp + * @brief Definitions for internal class HttpOpCancel + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "_httpopcancel.h" + +#include "httpcommon.h" +#include "httphandler.h" +#include "httpresponse.h" + +#include "_httpservice.h" + + +namespace LLCore +{ + + +// ================================== +// HttpOpCancel +// ================================== + + +HttpOpCancel::HttpOpCancel(HttpHandle handle) + : HttpOperation(), + mHandle(handle) +{} + + +HttpOpCancel::~HttpOpCancel() +{} + + +// Immediately search for the request on various queues +// and cancel operations if found. Return the status of +// the search and cancel as the status of this request. +// The canceled request will return a canceled status to +// its handler. +void HttpOpCancel::stageFromRequest(HttpService * service) +{ + if (! service->cancel(mHandle)) + { + mStatus = HttpStatus(HttpStatus::LLCORE, HE_HANDLE_NOT_FOUND); + } + + addAsReply(); +} + + +} // end namespace LLCore + + diff --git a/indra/llcorehttp/_httpopcancel.h b/indra/llcorehttp/_httpopcancel.h new file mode 100644 index 0000000000..336dfdc573 --- /dev/null +++ b/indra/llcorehttp/_httpopcancel.h @@ -0,0 +1,78 @@ +/** + * @file _httpopcancel.h + * @brief Internal declarations for the HttpOpCancel subclass + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_OPCANCEL_H_ +#define _LLCORE_HTTP_OPCANCEL_H_ + + +#include "linden_common.h" // Modifies curl/curl.h interfaces + +#include "httpcommon.h" + +#include <curl/curl.h> + +#include "_httpoperation.h" +#include "_refcounted.h" + + +namespace LLCore +{ + + +/// HttpOpCancel requests that a previously issued request +/// be canceled, if possible. This includes active requests +/// that may be in the middle of an HTTP transaction. Any +/// completed request will not be canceled and will return +/// its final status unchanged and *this* request will complete +/// with an HE_HANDLE_NOT_FOUND error status. + +class HttpOpCancel : public HttpOperation +{ +public: + /// @param handle Handle of previously-issued request to + /// be canceled. + HttpOpCancel(HttpHandle handle); + +protected: + virtual ~HttpOpCancel(); // Use release() + +private: + HttpOpCancel(const HttpOpCancel &); // Not defined + void operator=(const HttpOpCancel &); // Not defined + +public: + virtual void stageFromRequest(HttpService *); + +public: + // Request data + HttpHandle mHandle; +}; // end class HttpOpCancel + + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_OPCANCEL_H_ + diff --git a/indra/llcorehttp/_httpoperation.cpp b/indra/llcorehttp/_httpoperation.cpp new file mode 100644 index 0000000000..5cf5bc5930 --- /dev/null +++ b/indra/llcorehttp/_httpoperation.cpp @@ -0,0 +1,248 @@ +/** + * @file _httpoperation.cpp + * @brief Definitions for internal classes based on HttpOperation + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "_httpoperation.h" + +#include "httphandler.h" +#include "httpresponse.h" +#include "httprequest.h" + +#include "_httprequestqueue.h" +#include "_httpreplyqueue.h" +#include "_httpservice.h" +#include "_httpinternal.h" + +#include "lltimer.h" + + +namespace LLCore +{ + + +// ================================== +// HttpOperation +// ================================== + + +HttpOperation::HttpOperation() + : LLCoreInt::RefCounted(true), + mReplyQueue(NULL), + mUserHandler(NULL), + mReqPolicy(HttpRequest::DEFAULT_POLICY_ID), + mReqPriority(0U), + mTracing(0) +{ + mMetricCreated = totalTime(); +} + + +HttpOperation::~HttpOperation() +{ + setReplyPath(NULL, NULL); +} + + +void HttpOperation::setReplyPath(HttpReplyQueue * reply_queue, + HttpHandler * user_handler) +{ + if (reply_queue != mReplyQueue) + { + if (mReplyQueue) + { + mReplyQueue->release(); + } + + if (reply_queue) + { + reply_queue->addRef(); + } + + mReplyQueue = reply_queue; + } + + // Not refcounted + mUserHandler = user_handler; +} + + + +void HttpOperation::stageFromRequest(HttpService *) +{ + // Default implementation should never be called. This + // indicates an operation making a transition that isn't + // defined. + LL_ERRS("HttpCore") << "Default stageFromRequest method may not be called." + << LL_ENDL; +} + + +void HttpOperation::stageFromReady(HttpService *) +{ + // Default implementation should never be called. This + // indicates an operation making a transition that isn't + // defined. + LL_ERRS("HttpCore") << "Default stageFromReady method may not be called." + << LL_ENDL; +} + + +void HttpOperation::stageFromActive(HttpService *) +{ + // Default implementation should never be called. This + // indicates an operation making a transition that isn't + // defined. + LL_ERRS("HttpCore") << "Default stageFromActive method may not be called." + << LL_ENDL; +} + + +void HttpOperation::visitNotifier(HttpRequest *) +{ + if (mUserHandler) + { + HttpResponse * response = new HttpResponse(); + + response->setStatus(mStatus); + mUserHandler->onCompleted(static_cast<HttpHandle>(this), response); + + response->release(); + } +} + + +HttpStatus HttpOperation::cancel() +{ + HttpStatus status; + + return status; +} + + +void HttpOperation::addAsReply() +{ + if (mTracing > HTTP_TRACE_OFF) + { + LL_INFOS("CoreHttp") << "TRACE, ToReplyQueue, Handle: " + << static_cast<HttpHandle>(this) + << LL_ENDL; + } + + if (mReplyQueue) + { + addRef(); + mReplyQueue->addOp(this); + } +} + + +// ================================== +// HttpOpStop +// ================================== + + +HttpOpStop::HttpOpStop() + : HttpOperation() +{} + + +HttpOpStop::~HttpOpStop() +{} + + +void HttpOpStop::stageFromRequest(HttpService * service) +{ + // Do operations + service->stopRequested(); + + // Prepare response if needed + addAsReply(); +} + + +// ================================== +// HttpOpNull +// ================================== + + +HttpOpNull::HttpOpNull() + : HttpOperation() +{} + + +HttpOpNull::~HttpOpNull() +{} + + +void HttpOpNull::stageFromRequest(HttpService * service) +{ + // Perform op + // Nothing to perform. This doesn't fall into the libcurl + // ready/active queues, it just bounces over to the reply + // queue directly. + + // Prepare response if needed + addAsReply(); +} + + +// ================================== +// HttpOpSpin +// ================================== + + +HttpOpSpin::HttpOpSpin(int mode) + : HttpOperation(), + mMode(mode) +{} + + +HttpOpSpin::~HttpOpSpin() +{} + + +void HttpOpSpin::stageFromRequest(HttpService * service) +{ + if (0 == mMode) + { + // Spin forever + while (true) + { + ms_sleep(100); + } + } + else + { + ms_sleep(1); // backoff interlock plumbing a bit + this->addRef(); + if (! service->getRequestQueue().addOp(this)) + { + this->release(); + } + } +} + + +} // end namespace LLCore diff --git a/indra/llcorehttp/_httpoperation.h b/indra/llcorehttp/_httpoperation.h new file mode 100644 index 0000000000..914627fad0 --- /dev/null +++ b/indra/llcorehttp/_httpoperation.h @@ -0,0 +1,262 @@ +/** + * @file _httpoperation.h + * @brief Internal declarations for HttpOperation and sub-classes + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_OPERATION_H_ +#define _LLCORE_HTTP_OPERATION_H_ + + +#include "httpcommon.h" +#include "httprequest.h" +#include "_refcounted.h" + + +namespace LLCore +{ + +class HttpReplyQueue; +class HttpHandler; +class HttpService; + +/// HttpOperation is the base class for all request/reply +/// pairs. +/// +/// Operations are expected to be of two types: immediate +/// and queued. Immediate requests go to the singleton +/// request queue and when picked up by the worker thread +/// are executed immediately and there results placed on +/// the supplied reply queue. Queued requests (namely for +/// HTTP operations), go to the request queue, are picked +/// up and moved to a ready queue where they're ordered by +/// priority and managed by the policy component, are +/// then activated issuing HTTP requests and moved to an +/// active list managed by the transport (libcurl) component +/// and eventually finalized when a response is available +/// and status and data return via reply queue. +/// +/// To manage these transitions, derived classes implement +/// three methods: stageFromRequest, stageFromReady and +/// stageFromActive. Immediate requests will only override +/// stageFromRequest which will perform the operation and +/// return the result by invoking addAsReply() to put the +/// request on a reply queue. Queued requests will involve +/// all three stage methods. +/// +/// Threading: not thread-safe. Base and derived classes +/// provide no locking. Instances move across threads +/// via queue-like interfaces that are thread compatible +/// and those interfaces establish the access rules. + +class HttpOperation : public LLCoreInt::RefCounted +{ +public: + /// Threading: called by a consumer/application thread. + HttpOperation(); + +protected: + /// Threading: called by any thread. + virtual ~HttpOperation(); // Use release() + +private: + HttpOperation(const HttpOperation &); // Not defined + void operator=(const HttpOperation &); // Not defined + +public: + /// Register a reply queue and a handler for completion notifications. + /// + /// Invokers of operations that want to receive notification that an + /// operation has been completed do so by binding a reply queue and + /// a handler object to the request. + /// + /// @param reply_queue Pointer to the reply queue where completion + /// notifications are to be queued (typically + /// by addAsReply()). This will typically be + /// the reply queue referenced by the request + /// object. This method will increment the + /// refcount on the queue holding the queue + /// until delivery is complete. Using a reply_queue + /// even if the handler is NULL has some benefits + /// for memory deallocation by keeping it in the + /// originating thread. + /// + /// @param handler Possibly NULL pointer to a non-refcounted + //// handler object to be invoked (onCompleted) + /// when the operation is finished. Note that + /// the handler object is never dereferenced + /// by the worker thread. This is passible data + /// until notification is performed. + /// + /// Threading: called by application thread. + /// + void setReplyPath(HttpReplyQueue * reply_queue, + HttpHandler * handler); + + /// The three possible staging steps in an operation's lifecycle. + /// Asynchronous requests like HTTP operations move from the + /// request queue to the ready queue via stageFromRequest. Then + /// from the ready queue to the active queue by stageFromReady. And + /// when complete, to the reply queue via stageFromActive and the + /// addAsReply utility. + /// + /// Immediate mode operations (everything else) move from the + /// request queue to the reply queue directly via stageFromRequest + /// and addAsReply with no existence on the ready or active queues. + /// + /// These methods will take out a reference count on the request, + /// caller only needs to dispose of its reference when done with + /// the request. + /// + /// Threading: called by worker thread. + /// + virtual void stageFromRequest(HttpService *); + virtual void stageFromReady(HttpService *); + virtual void stageFromActive(HttpService *); + + /// Delivers a notification to a handler object on completion. + /// + /// Once a request is complete and it has been removed from its + /// reply queue, a handler notification may be delivered by a + /// call to HttpRequest::update(). This method does the necessary + /// dispatching. + /// + /// Threading: called by application thread. + /// + virtual void visitNotifier(HttpRequest *); + + /// Cancels the operation whether queued or active. + /// Final status of the request becomes canceled (an error) and + /// that will be delivered to caller via notification scheme. + /// + /// Threading: called by worker thread. + /// + virtual HttpStatus cancel(); + +protected: + /// Delivers request to reply queue on completion. After this + /// call, worker thread no longer accesses the object and it + /// is owned by the reply queue. + /// + /// Threading: called by worker thread. + /// + void addAsReply(); + +protected: + HttpReplyQueue * mReplyQueue; // Have refcount + HttpHandler * mUserHandler; // Naked pointer + +public: + // Request Data + HttpRequest::policy_t mReqPolicy; + HttpRequest::priority_t mReqPriority; + + // Reply Data + HttpStatus mStatus; + + // Tracing, debug and metrics + HttpTime mMetricCreated; + int mTracing; +}; // end class HttpOperation + + +/// HttpOpStop requests the servicing thread to shutdown +/// operations, cease pulling requests from the request +/// queue and release shared resources (particularly +/// those shared via reference count). The servicing +/// thread will then exit. The underlying thread object +/// remains so that another thread can join on the +/// servicing thread prior to final cleanup. The +/// request *does* generate a reply on the response +/// queue, if requested. + +class HttpOpStop : public HttpOperation +{ +public: + HttpOpStop(); + +protected: + virtual ~HttpOpStop(); + +private: + HttpOpStop(const HttpOpStop &); // Not defined + void operator=(const HttpOpStop &); // Not defined + +public: + virtual void stageFromRequest(HttpService *); + +}; // end class HttpOpStop + + +/// HttpOpNull is a do-nothing operation used for testing via +/// a basic loopback pattern. It's executed immediately by +/// the servicing thread which bounces a reply back to the +/// caller without any further delay. + +class HttpOpNull : public HttpOperation +{ +public: + HttpOpNull(); + +protected: + virtual ~HttpOpNull(); + +private: + HttpOpNull(const HttpOpNull &); // Not defined + void operator=(const HttpOpNull &); // Not defined + +public: + virtual void stageFromRequest(HttpService *); + +}; // end class HttpOpNull + + +/// HttpOpSpin is a test-only request that puts the worker +/// thread into a cpu spin. Used for unit tests and cleanup +/// evaluation. You do not want to use this in production. +class HttpOpSpin : public HttpOperation +{ +public: + // 0 does a hard spin in the operation + // 1 does a soft spin continuously requeuing itself + HttpOpSpin(int mode); + +protected: + virtual ~HttpOpSpin(); + +private: + HttpOpSpin(const HttpOpSpin &); // Not defined + void operator=(const HttpOpSpin &); // Not defined + +public: + virtual void stageFromRequest(HttpService *); + +protected: + int mMode; +}; // end class HttpOpSpin + + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_OPERATION_H_ + diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp new file mode 100644 index 0000000000..51a8eaf998 --- /dev/null +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -0,0 +1,911 @@ +/** + * @file _httpoprequest.cpp + * @brief Definitions for internal class HttpOpRequest + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "_httpoprequest.h" + +#include <cstdio> +#include <algorithm> + +#include "httpcommon.h" +#include "httphandler.h" +#include "httpresponse.h" +#include "bufferarray.h" +#include "httpheaders.h" +#include "httpoptions.h" + +#include "_httprequestqueue.h" +#include "_httpreplyqueue.h" +#include "_httpservice.h" +#include "_httppolicy.h" +#include "_httppolicyglobal.h" +#include "_httplibcurl.h" +#include "_httpinternal.h" + +#include "llhttpstatuscodes.h" +#include "llproxy.h" + +namespace +{ + +// Attempts to parse a 'Content-Range:' header. Caller must already +// have verified that the header tag is present. The 'buffer' argument +// will be processed by strtok_r calls which will modify the buffer. +// +// @return -1 if invalid and response should be dropped, 0 if valid an +// correct, 1 if couldn't be parsed. If 0, the first, last, +// and length arguments are also written. 'length' may be +// 0 if the length wasn't available to the server. +// +int parse_content_range_header(char * buffer, + unsigned int * first, + unsigned int * last, + unsigned int * length); + + +// Take data from libcurl's CURLOPT_DEBUGFUNCTION callback and +// escape and format it for a tracing line in logging. Absolutely +// anything including NULs can be in the data. If @scrub is true, +// non-printing or non-ascii characters are replaced with spaces +// otherwise a %XX form of escaping is used. +void escape_libcurl_debug_data(char * buffer, size_t len, bool scrub, + std::string & safe_line); + + +// OS-neutral string comparisons of various types +int os_strncasecmp(const char *s1, const char *s2, size_t n); +int os_strcasecmp(const char *s1, const char *s2); +char * os_strtok_r(char *str, const char *delim, char **saveptr); + + +static const char * const hdr_whitespace(" \t"); +static const char * const hdr_separator(": \t"); + +} // end anonymous namespace + + +namespace LLCore +{ + + +HttpOpRequest::HttpOpRequest() + : HttpOperation(), + mProcFlags(0U), + mReqMethod(HOR_GET), + mReqBody(NULL), + mReqOffset(0), + mReqLength(0), + mReqHeaders(NULL), + mReqOptions(NULL), + mCurlActive(false), + mCurlHandle(NULL), + mCurlService(NULL), + mCurlHeaders(NULL), + mCurlBodyPos(0), + mReplyBody(NULL), + mReplyOffset(0), + mReplyLength(0), + mReplyFullLength(0), + mReplyHeaders(NULL), + mPolicyRetries(0), + mPolicyRetryAt(HttpTime(0)), + mPolicyRetryLimit(HTTP_RETRY_COUNT_DEFAULT) +{ + // *NOTE: As members are added, retry initialization/cleanup + // may need to be extended in @see prepareRequest(). +} + + + +HttpOpRequest::~HttpOpRequest() +{ + if (mReqBody) + { + mReqBody->release(); + mReqBody = NULL; + } + + if (mReqOptions) + { + mReqOptions->release(); + mReqOptions = NULL; + } + + if (mReqHeaders) + { + mReqHeaders->release(); + mReqHeaders = NULL; + } + + if (mCurlHandle) + { + curl_easy_cleanup(mCurlHandle); + mCurlHandle = NULL; + } + + mCurlService = NULL; + + if (mCurlHeaders) + { + curl_slist_free_all(mCurlHeaders); + mCurlHeaders = NULL; + } + + if (mReplyBody) + { + mReplyBody->release(); + mReplyBody = NULL; + } + + if (mReplyHeaders) + { + mReplyHeaders->release(); + mReplyHeaders = NULL; + } +} + + +void HttpOpRequest::stageFromRequest(HttpService * service) +{ + addRef(); + service->getPolicy().addOp(this); // transfers refcount +} + + +void HttpOpRequest::stageFromReady(HttpService * service) +{ + addRef(); + service->getTransport().addOp(this); // transfers refcount +} + + +void HttpOpRequest::stageFromActive(HttpService * service) +{ + if (mReplyLength) + { + // If non-zero, we received and processed a Content-Range + // header with the response. Verify that what it says + // is consistent with the received data. + if (mReplyLength != mReplyBody->size()) + { + // Not as expected, fail the request + mStatus = HttpStatus(HttpStatus::LLCORE, HE_INV_CONTENT_RANGE_HDR); + } + } + + if (mCurlHeaders) + { + // We take these headers out of the request now as they were + // allocated originally in this thread and the notifier doesn't + // need them. This eliminates one source of heap moving across + // threads. + + curl_slist_free_all(mCurlHeaders); + mCurlHeaders = NULL; + } + + addAsReply(); +} + + +void HttpOpRequest::visitNotifier(HttpRequest * request) +{ + if (mUserHandler) + { + HttpResponse * response = new HttpResponse(); + response->setStatus(mStatus); + response->setBody(mReplyBody); + response->setHeaders(mReplyHeaders); + if (mReplyOffset || mReplyLength) + { + // Got an explicit offset/length in response + response->setRange(mReplyOffset, mReplyLength, mReplyFullLength); + } + response->setContentType(mReplyConType); + + mUserHandler->onCompleted(static_cast<HttpHandle>(this), response); + + response->release(); + } +} + + +HttpStatus HttpOpRequest::cancel() +{ + mStatus = HttpStatus(HttpStatus::LLCORE, HE_OP_CANCELED); + + addAsReply(); + + return HttpStatus(); +} + + +HttpStatus HttpOpRequest::setupGet(HttpRequest::policy_t policy_id, + HttpRequest::priority_t priority, + const std::string & url, + HttpOptions * options, + HttpHeaders * headers) +{ + setupCommon(policy_id, priority, url, NULL, options, headers); + mReqMethod = HOR_GET; + + return HttpStatus(); +} + + +HttpStatus HttpOpRequest::setupGetByteRange(HttpRequest::policy_t policy_id, + HttpRequest::priority_t priority, + const std::string & url, + size_t offset, + size_t len, + HttpOptions * options, + HttpHeaders * headers) +{ + setupCommon(policy_id, priority, url, NULL, options, headers); + mReqMethod = HOR_GET; + mReqOffset = offset; + mReqLength = len; + if (offset || len) + { + mProcFlags |= PF_SCAN_RANGE_HEADER; + } + + return HttpStatus(); +} + + +HttpStatus HttpOpRequest::setupPost(HttpRequest::policy_t policy_id, + HttpRequest::priority_t priority, + const std::string & url, + BufferArray * body, + HttpOptions * options, + HttpHeaders * headers) +{ + setupCommon(policy_id, priority, url, body, options, headers); + mReqMethod = HOR_POST; + + return HttpStatus(); +} + + +HttpStatus HttpOpRequest::setupPut(HttpRequest::policy_t policy_id, + HttpRequest::priority_t priority, + const std::string & url, + BufferArray * body, + HttpOptions * options, + HttpHeaders * headers) +{ + setupCommon(policy_id, priority, url, body, options, headers); + mReqMethod = HOR_PUT; + + return HttpStatus(); +} + + +void HttpOpRequest::setupCommon(HttpRequest::policy_t policy_id, + HttpRequest::priority_t priority, + const std::string & url, + BufferArray * body, + HttpOptions * options, + HttpHeaders * headers) +{ + mProcFlags = 0U; + mReqPolicy = policy_id; + mReqPriority = priority; + mReqURL = url; + if (body) + { + body->addRef(); + mReqBody = body; + } + if (headers && ! mReqHeaders) + { + headers->addRef(); + mReqHeaders = headers; + } + if (options && ! mReqOptions) + { + options->addRef(); + mReqOptions = options; + if (options->getWantHeaders()) + { + mProcFlags |= PF_SAVE_HEADERS; + } + mPolicyRetryLimit = options->getRetries(); + mPolicyRetryLimit = llclamp(mPolicyRetryLimit, HTTP_RETRY_COUNT_MIN, HTTP_RETRY_COUNT_MAX); + mTracing = (std::max)(mTracing, llclamp(options->getTrace(), HTTP_TRACE_MIN, HTTP_TRACE_MAX)); + } +} + + +// Sets all libcurl options and data for a request. +// +// Used both for initial requests and to 'reload' for +// a retry, generally with a different CURL handle. +// Junk may be left around from a failed request and that +// needs to be cleaned out. +// +HttpStatus HttpOpRequest::prepareRequest(HttpService * service) +{ + // Scrub transport and result data for retried op case + mCurlActive = false; + mCurlHandle = NULL; + mCurlService = NULL; + if (mCurlHeaders) + { + curl_slist_free_all(mCurlHeaders); + mCurlHeaders = NULL; + } + mCurlBodyPos = 0; + + if (mReplyBody) + { + mReplyBody->release(); + mReplyBody = NULL; + } + mReplyOffset = 0; + mReplyLength = 0; + mReplyFullLength = 0; + if (mReplyHeaders) + { + mReplyHeaders->release(); + mReplyHeaders = NULL; + } + mReplyConType.clear(); + + // *FIXME: better error handling later + HttpStatus status; + + // Get policy options + HttpPolicyGlobal & policy(service->getPolicy().getGlobalOptions()); + + mCurlHandle = curl_easy_init(); + curl_easy_setopt(mCurlHandle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); + curl_easy_setopt(mCurlHandle, CURLOPT_NOSIGNAL, 1); + curl_easy_setopt(mCurlHandle, CURLOPT_NOPROGRESS, 1); + curl_easy_setopt(mCurlHandle, CURLOPT_URL, mReqURL.c_str()); + curl_easy_setopt(mCurlHandle, CURLOPT_PRIVATE, this); + curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, ""); + + if (HTTP_ENABLE_LINKSYS_WRT54G_V5_DNS_FIX) + { + // The Linksys WRT54G V5 router has an issue with frequent + // DNS lookups from LAN machines. If they happen too often, + // like for every HTTP request, the router gets annoyed after + // about 700 or so requests and starts issuing TCP RSTs to + // new connections. Reuse the DNS lookups for even a few + // seconds and no RSTs. + curl_easy_setopt(mCurlHandle, CURLOPT_DNS_CACHE_TIMEOUT, 15); + } + else + { + // *TODO: Revisit this old DNS timeout setting - may no longer be valid + // I don't think this is valid anymore, the Multi shared DNS + // cache is working well. For the case of naked easy handles, + // consider using a shared DNS object. + curl_easy_setopt(mCurlHandle, CURLOPT_DNS_CACHE_TIMEOUT, 0); + } + curl_easy_setopt(mCurlHandle, CURLOPT_AUTOREFERER, 1); + curl_easy_setopt(mCurlHandle, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(mCurlHandle, CURLOPT_MAXREDIRS, HTTP_REDIRECTS_DEFAULT); + curl_easy_setopt(mCurlHandle, CURLOPT_WRITEFUNCTION, writeCallback); + curl_easy_setopt(mCurlHandle, CURLOPT_WRITEDATA, this); + curl_easy_setopt(mCurlHandle, CURLOPT_READFUNCTION, readCallback); + curl_easy_setopt(mCurlHandle, CURLOPT_READDATA, this); + curl_easy_setopt(mCurlHandle, CURLOPT_SSL_VERIFYPEER, 1); + curl_easy_setopt(mCurlHandle, CURLOPT_SSL_VERIFYHOST, 0); + + const std::string * opt_value(NULL); + long opt_long(0L); + policy.get(HttpRequest::GP_LLPROXY, &opt_long); + if (opt_long) + { + // Use the viewer-based thread-safe API which has a + // fast/safe check for proxy enable. Would like to + // encapsulate this someway... + LLProxy::getInstance()->applyProxySettings(mCurlHandle); + } + else if (policy.get(HttpRequest::GP_HTTP_PROXY, &opt_value)) + { + // *TODO: This is fine for now but get fuller socks5/ + // authentication thing going later.... + curl_easy_setopt(mCurlHandle, CURLOPT_PROXY, opt_value->c_str()); + curl_easy_setopt(mCurlHandle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); + } + if (policy.get(HttpRequest::GP_CA_PATH, &opt_value)) + { + curl_easy_setopt(mCurlHandle, CURLOPT_CAPATH, opt_value->c_str()); + } + if (policy.get(HttpRequest::GP_CA_FILE, &opt_value)) + { + curl_easy_setopt(mCurlHandle, CURLOPT_CAINFO, opt_value->c_str()); + } + + switch (mReqMethod) + { + case HOR_GET: + curl_easy_setopt(mCurlHandle, CURLOPT_HTTPGET, 1); + mCurlHeaders = curl_slist_append(mCurlHeaders, "Connection: keep-alive"); + mCurlHeaders = curl_slist_append(mCurlHeaders, "Keep-alive: 300"); + break; + + case HOR_POST: + { + curl_easy_setopt(mCurlHandle, CURLOPT_POST, 1); + curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, ""); + long data_size(0); + if (mReqBody) + { + data_size = mReqBody->size(); + } + curl_easy_setopt(mCurlHandle, CURLOPT_POSTFIELDS, static_cast<void *>(NULL)); + curl_easy_setopt(mCurlHandle, CURLOPT_POSTFIELDSIZE, data_size); + mCurlHeaders = curl_slist_append(mCurlHeaders, "Expect:"); + mCurlHeaders = curl_slist_append(mCurlHeaders, "Connection: keep-alive"); + mCurlHeaders = curl_slist_append(mCurlHeaders, "Keep-alive: 300"); + } + break; + + case HOR_PUT: + { + curl_easy_setopt(mCurlHandle, CURLOPT_UPLOAD, 1); + long data_size(0); + if (mReqBody) + { + data_size = mReqBody->size(); + } + curl_easy_setopt(mCurlHandle, CURLOPT_INFILESIZE, data_size); + curl_easy_setopt(mCurlHandle, CURLOPT_POSTFIELDS, (void *) NULL); + mCurlHeaders = curl_slist_append(mCurlHeaders, "Expect:"); + mCurlHeaders = curl_slist_append(mCurlHeaders, "Connection: keep-alive"); + mCurlHeaders = curl_slist_append(mCurlHeaders, "Keep-alive: 300"); + } + break; + + default: + LL_ERRS("CoreHttp") << "Invalid HTTP method in request: " + << int(mReqMethod) << ". Can't recover." + << LL_ENDL; + break; + } + + // Tracing + if (mTracing >= HTTP_TRACE_CURL_HEADERS) + { + curl_easy_setopt(mCurlHandle, CURLOPT_VERBOSE, 1); + curl_easy_setopt(mCurlHandle, CURLOPT_DEBUGDATA, this); + curl_easy_setopt(mCurlHandle, CURLOPT_DEBUGFUNCTION, debugCallback); + } + + // There's a CURLOPT for this now... + if ((mReqOffset || mReqLength) && HOR_GET == mReqMethod) + { + static const char * const fmt1("Range: bytes=%lu-%lu"); + static const char * const fmt2("Range: bytes=%lu-"); + + char range_line[64]; + +#if LL_WINDOWS + _snprintf_s(range_line, sizeof(range_line), sizeof(range_line) - 1, + (mReqLength ? fmt1 : fmt2), + (unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1)); +#else + snprintf(range_line, sizeof(range_line), + (mReqLength ? fmt1 : fmt2), + (unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1)); +#endif // LL_WINDOWS + range_line[sizeof(range_line) - 1] = '\0'; + mCurlHeaders = curl_slist_append(mCurlHeaders, range_line); + } + + mCurlHeaders = curl_slist_append(mCurlHeaders, "Pragma:"); + + // Request options + long timeout(HTTP_REQUEST_TIMEOUT_DEFAULT); + if (mReqOptions) + { + timeout = mReqOptions->getTimeout(); + timeout = llclamp(timeout, HTTP_REQUEST_TIMEOUT_MIN, HTTP_REQUEST_TIMEOUT_MAX); + } + curl_easy_setopt(mCurlHandle, CURLOPT_TIMEOUT, timeout); + curl_easy_setopt(mCurlHandle, CURLOPT_CONNECTTIMEOUT, timeout); + + // Request headers + if (mReqHeaders) + { + // Caller's headers last to override + mCurlHeaders = append_headers_to_slist(mReqHeaders, mCurlHeaders); + } + curl_easy_setopt(mCurlHandle, CURLOPT_HTTPHEADER, mCurlHeaders); + + if (mProcFlags & (PF_SCAN_RANGE_HEADER | PF_SAVE_HEADERS)) + { + curl_easy_setopt(mCurlHandle, CURLOPT_HEADERFUNCTION, headerCallback); + curl_easy_setopt(mCurlHandle, CURLOPT_HEADERDATA, this); + } + + if (status) + { + mCurlService = service; + } + return status; +} + + +size_t HttpOpRequest::writeCallback(void * data, size_t size, size_t nmemb, void * userdata) +{ + HttpOpRequest * op(static_cast<HttpOpRequest *>(userdata)); + + if (! op->mReplyBody) + { + op->mReplyBody = new BufferArray(); + } + const size_t req_size(size * nmemb); + const size_t write_size(op->mReplyBody->append(static_cast<char *>(data), req_size)); + return write_size; +} + + +size_t HttpOpRequest::readCallback(void * data, size_t size, size_t nmemb, void * userdata) +{ + HttpOpRequest * op(static_cast<HttpOpRequest *>(userdata)); + + if (! op->mReqBody) + { + return 0; + } + const size_t req_size(size * nmemb); + const size_t body_size(op->mReqBody->size()); + if (body_size <= op->mCurlBodyPos) + { + if (body_size < op->mCurlBodyPos) + { + // Warn but continue if the read position moves beyond end-of-body + // for some reason. + LL_WARNS("HttpCore") << "Request body position beyond body size. Truncating request body." + << LL_ENDL; + } + return 0; + } + + const size_t do_size((std::min)(req_size, body_size - op->mCurlBodyPos)); + const size_t read_size(op->mReqBody->read(op->mCurlBodyPos, static_cast<char *>(data), do_size)); + op->mCurlBodyPos += read_size; + return read_size; +} + + +size_t HttpOpRequest::headerCallback(void * data, size_t size, size_t nmemb, void * userdata) +{ + static const char status_line[] = "HTTP/"; + static const size_t status_line_len = sizeof(status_line) - 1; + + static const char con_ran_line[] = "content-range:"; + static const size_t con_ran_line_len = sizeof(con_ran_line) - 1; + + HttpOpRequest * op(static_cast<HttpOpRequest *>(userdata)); + + const size_t hdr_size(size * nmemb); + const char * hdr_data(static_cast<const char *>(data)); // Not null terminated + + if (hdr_size >= status_line_len && ! strncmp(status_line, hdr_data, status_line_len)) + { + // One of possibly several status lines. Reset what we know and start over + // taking results from the last header stanza we receive. + op->mReplyOffset = 0; + op->mReplyLength = 0; + op->mReplyFullLength = 0; + op->mStatus = HttpStatus(); + if (op->mReplyHeaders) + { + op->mReplyHeaders->mHeaders.clear(); + } + } + + // Nothing in here wants a final CR/LF combination. Remove + // it as much as possible. + size_t wanted_hdr_size(hdr_size); + if (wanted_hdr_size && '\n' == hdr_data[wanted_hdr_size - 1]) + { + if (--wanted_hdr_size && '\r' == hdr_data[wanted_hdr_size - 1]) + { + --wanted_hdr_size; + } + } + + // Save header if caller wants them in the response + if (op->mProcFlags & PF_SAVE_HEADERS) + { + // Save headers in response + if (! op->mReplyHeaders) + { + op->mReplyHeaders = new HttpHeaders; + } + op->mReplyHeaders->mHeaders.push_back(std::string(hdr_data, wanted_hdr_size)); + } + + // Detect and parse 'Content-Range' headers + if (op->mProcFlags & PF_SCAN_RANGE_HEADER) + { + char hdr_buffer[128]; // Enough for a reasonable header + size_t frag_size((std::min)(wanted_hdr_size, sizeof(hdr_buffer) - 1)); + + memcpy(hdr_buffer, hdr_data, frag_size); + hdr_buffer[frag_size] = '\0'; + if (frag_size > con_ran_line_len && + ! os_strncasecmp(hdr_buffer, con_ran_line, con_ran_line_len)) + { + unsigned int first(0), last(0), length(0); + int status; + + if (! (status = parse_content_range_header(hdr_buffer, &first, &last, &length))) + { + // Success, record the fragment position + op->mReplyOffset = first; + op->mReplyLength = last - first + 1; + op->mReplyFullLength = length; + } + else if (-1 == status) + { + // Response is badly formed and shouldn't be accepted + op->mStatus = HttpStatus(HttpStatus::LLCORE, HE_INV_CONTENT_RANGE_HDR); + } + else + { + // Ignore the unparsable. + LL_INFOS_ONCE("CoreHttp") << "Problem parsing odd Content-Range header: '" + << std::string(hdr_data, frag_size) + << "'. Ignoring." + << LL_ENDL; + } + } + } + + return hdr_size; +} + + +int HttpOpRequest::debugCallback(CURL * handle, curl_infotype info, char * buffer, size_t len, void * userdata) +{ + HttpOpRequest * op(static_cast<HttpOpRequest *>(userdata)); + + std::string safe_line; + std::string tag; + bool logit(false); + len = (std::min)(len, size_t(256)); // Keep things reasonable in all cases + + switch (info) + { + case CURLINFO_TEXT: + if (op->mTracing >= HTTP_TRACE_CURL_HEADERS) + { + tag = "TEXT"; + escape_libcurl_debug_data(buffer, len, true, safe_line); + logit = true; + } + break; + + case CURLINFO_HEADER_IN: + if (op->mTracing >= HTTP_TRACE_CURL_HEADERS) + { + tag = "HEADERIN"; + escape_libcurl_debug_data(buffer, len, true, safe_line); + logit = true; + } + break; + + case CURLINFO_HEADER_OUT: + if (op->mTracing >= HTTP_TRACE_CURL_HEADERS) + { + tag = "HEADEROUT"; + escape_libcurl_debug_data(buffer, 2 * len, true, safe_line); // Goes out as one line + logit = true; + } + break; + + case CURLINFO_DATA_IN: + if (op->mTracing >= HTTP_TRACE_CURL_HEADERS) + { + tag = "DATAIN"; + logit = true; + if (op->mTracing >= HTTP_TRACE_CURL_BODIES) + { + escape_libcurl_debug_data(buffer, len, false, safe_line); + } + else + { + std::ostringstream out; + out << len << " Bytes"; + safe_line = out.str(); + } + } + break; + + case CURLINFO_DATA_OUT: + if (op->mTracing >= HTTP_TRACE_CURL_HEADERS) + { + tag = "DATAOUT"; + logit = true; + if (op->mTracing >= HTTP_TRACE_CURL_BODIES) + { + escape_libcurl_debug_data(buffer, len, false, safe_line); + } + else + { + std::ostringstream out; + out << len << " Bytes"; + safe_line = out.str(); + } + } + break; + + default: + logit = false; + break; + } + + if (logit) + { + LL_INFOS("CoreHttp") << "TRACE, LibcurlDebug, Handle: " + << static_cast<HttpHandle>(op) + << ", Type: " << tag + << ", Data: " << safe_line + << LL_ENDL; + } + + return 0; +} + + +} // end namespace LLCore + + +// ======================================= +// Anonymous Namespace +// ======================================= + +namespace +{ + +int parse_content_range_header(char * buffer, + unsigned int * first, + unsigned int * last, + unsigned int * length) +{ + char * tok_state(NULL), * tok(NULL); + bool match(true); + + if (! os_strtok_r(buffer, hdr_separator, &tok_state)) + match = false; + if (match && (tok = os_strtok_r(NULL, hdr_whitespace, &tok_state))) + match = 0 == os_strcasecmp("bytes", tok); + if (match && ! (tok = os_strtok_r(NULL, " \t", &tok_state))) + match = false; + if (match) + { + unsigned int lcl_first(0), lcl_last(0), lcl_len(0); + +#if LL_WINDOWS + if (3 == sscanf_s(tok, "%u-%u/%u", &lcl_first, &lcl_last, &lcl_len)) +#else + if (3 == sscanf(tok, "%u-%u/%u", &lcl_first, &lcl_last, &lcl_len)) +#endif // LL_WINDOWS + { + if (lcl_first > lcl_last || lcl_last >= lcl_len) + return -1; + *first = lcl_first; + *last = lcl_last; + *length = lcl_len; + return 0; + } +#if LL_WINDOWS + if (2 == sscanf_s(tok, "%u-%u/*", &lcl_first, &lcl_last)) +#else + if (2 == sscanf(tok, "%u-%u/*", &lcl_first, &lcl_last)) +#endif // LL_WINDOWS + { + if (lcl_first > lcl_last) + return -1; + *first = lcl_first; + *last = lcl_last; + *length = 0; + return 0; + } + } + + // Header is there but badly/unexpectedly formed, try to ignore it. + return 1; +} + + +void escape_libcurl_debug_data(char * buffer, size_t len, bool scrub, std::string & safe_line) +{ + std::string out; + len = (std::min)(len, size_t(200)); + out.reserve(3 * len); + for (int i(0); i < len; ++i) + { + unsigned char uc(static_cast<unsigned char>(buffer[i])); + + if (uc < 32 || uc > 126) + { + if (scrub) + { + out.append(1, ' '); + } + else + { + static const char hex[] = "0123456789ABCDEF"; + char convert[4]; + + convert[0] = '%'; + convert[1] = hex[(uc >> 4) % 16]; + convert[2] = hex[uc % 16]; + convert[3] = '\0'; + out.append(convert); + } + } + else + { + out.append(1, buffer[i]); + } + } + safe_line.swap(out); +} + + +int os_strncasecmp(const char *s1, const char *s2, size_t n) +{ +#if LL_WINDOWS + return _strnicmp(s1, s2, n); +#else + return strncasecmp(s1, s2, n); +#endif // LL_WINDOWS +} + + +int os_strcasecmp(const char *s1, const char *s2) +{ +#if LL_WINDOWS + return _stricmp(s1, s2); +#else + return strcasecmp(s1, s2); +#endif // LL_WINDOWS +} + + +char * os_strtok_r(char *str, const char *delim, char ** savestate) +{ +#if LL_WINDOWS + return strtok_s(str, delim, savestate); +#else + return strtok_r(str, delim, savestate); +#endif +} + + +} // end anonymous namespace + + diff --git a/indra/llcorehttp/_httpoprequest.h b/indra/llcorehttp/_httpoprequest.h new file mode 100644 index 0000000000..7b65d17783 --- /dev/null +++ b/indra/llcorehttp/_httpoprequest.h @@ -0,0 +1,219 @@ +/** + * @file _httpoprequest.h + * @brief Internal declarations for the HttpOpRequest subclass + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_OPREQUEST_H_ +#define _LLCORE_HTTP_OPREQUEST_H_ + + +#include "linden_common.h" // Modifies curl/curl.h interfaces + +#include <string> +#include <curl/curl.h> + +#include "httpcommon.h" +#include "httprequest.h" +#include "_httpoperation.h" +#include "_refcounted.h" + + +namespace LLCore +{ + + +class BufferArray; +class HttpHeaders; +class HttpOptions; + + +/// HttpOpRequest requests a supported HTTP method invocation with +/// option and header overrides. +/// +/// Essentially an RPC to get an HTTP GET, POST or PUT executed +/// asynchronously with options to override behaviors and HTTP +/// headers. +/// +/// Constructor creates a raw object incapable of useful work. +/// A subsequent call to one of the setupXXX() methods provides +/// the information needed to make a working request which can +/// then be enqueued to a request queue. +/// + +class HttpOpRequest : public HttpOperation +{ +public: + HttpOpRequest(); + +protected: + virtual ~HttpOpRequest(); // Use release() + +private: + HttpOpRequest(const HttpOpRequest &); // Not defined + void operator=(const HttpOpRequest &); // Not defined + +public: + enum EMethod + { + HOR_GET, + HOR_POST, + HOR_PUT + }; + + virtual void stageFromRequest(HttpService *); + virtual void stageFromReady(HttpService *); + virtual void stageFromActive(HttpService *); + + virtual void visitNotifier(HttpRequest * request); + +public: + /// Setup Methods + /// + /// Basically an RPC setup for each type of HTTP method + /// invocation with one per method type. These are + /// generally invoked right after construction. + /// + /// Threading: called by application thread + /// + HttpStatus setupGet(HttpRequest::policy_t policy_id, + HttpRequest::priority_t priority, + const std::string & url, + HttpOptions * options, + HttpHeaders * headers); + + HttpStatus setupGetByteRange(HttpRequest::policy_t policy_id, + HttpRequest::priority_t priority, + const std::string & url, + size_t offset, + size_t len, + HttpOptions * options, + HttpHeaders * headers); + + HttpStatus setupPost(HttpRequest::policy_t policy_id, + HttpRequest::priority_t priority, + const std::string & url, + BufferArray * body, + HttpOptions * options, + HttpHeaders * headers); + + HttpStatus setupPut(HttpRequest::policy_t policy_id, + HttpRequest::priority_t priority, + const std::string & url, + BufferArray * body, + HttpOptions * options, + HttpHeaders * headers); + + // Internal method used to setup the libcurl options for a request. + // Does all the libcurl handle setup in one place. + // + // Threading: called by worker thread + // + HttpStatus prepareRequest(HttpService * service); + + virtual HttpStatus cancel(); + +protected: + // Common setup for all the request methods. + // + // Threading: called by application thread + // + void setupCommon(HttpRequest::policy_t policy_id, + HttpRequest::priority_t priority, + const std::string & url, + BufferArray * body, + HttpOptions * options, + HttpHeaders * headers); + + // libcurl operational callbacks + // + // Threading: called by worker thread + // + static size_t writeCallback(void * data, size_t size, size_t nmemb, void * userdata); + static size_t readCallback(void * data, size_t size, size_t nmemb, void * userdata); + static size_t headerCallback(void * data, size_t size, size_t nmemb, void * userdata); + static int debugCallback(CURL *, curl_infotype info, char * buffer, size_t len, void * userdata); + +protected: + unsigned int mProcFlags; + static const unsigned int PF_SCAN_RANGE_HEADER = 0x00000001U; + static const unsigned int PF_SAVE_HEADERS = 0x00000002U; + +public: + // Request data + EMethod mReqMethod; + std::string mReqURL; + BufferArray * mReqBody; + off_t mReqOffset; + size_t mReqLength; + HttpHeaders * mReqHeaders; + HttpOptions * mReqOptions; + + // Transport data + bool mCurlActive; + CURL * mCurlHandle; + HttpService * mCurlService; + curl_slist * mCurlHeaders; + size_t mCurlBodyPos; + + // Result data + HttpStatus mStatus; + BufferArray * mReplyBody; + off_t mReplyOffset; + size_t mReplyLength; + size_t mReplyFullLength; + HttpHeaders * mReplyHeaders; + std::string mReplyConType; + + // Policy data + int mPolicyRetries; + HttpTime mPolicyRetryAt; + int mPolicyRetryLimit; +}; // end class HttpOpRequest + + +/// HttpOpRequestCompare isn't an operation but a uniform comparison +/// functor for STL containers that order by priority. Mainly +/// used for the ready queue container but defined here. +class HttpOpRequestCompare +{ +public: + bool operator()(const HttpOpRequest * lhs, const HttpOpRequest * rhs) + { + return lhs->mReqPriority > rhs->mReqPriority; + } +}; // end class HttpOpRequestCompare + + +// --------------------------------------- +// Free functions +// --------------------------------------- + +// Internal function to append the contents of an HttpHeaders +// instance to a curl_slist object. +curl_slist * append_headers_to_slist(const HttpHeaders *, curl_slist * slist); + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_OPREQUEST_H_ + diff --git a/indra/llcorehttp/_httpopsetget.cpp b/indra/llcorehttp/_httpopsetget.cpp new file mode 100644 index 0000000000..8198528a9b --- /dev/null +++ b/indra/llcorehttp/_httpopsetget.cpp @@ -0,0 +1,97 @@ +/** + * @file _httpopsetget.cpp + * @brief Definitions for internal class HttpOpSetGet + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "_httpopsetget.h" + +#include "httpcommon.h" + +#include "_httpservice.h" +#include "_httppolicy.h" + + +namespace LLCore +{ + + +// ================================== +// HttpOpSetget +// ================================== + + +HttpOpSetGet::HttpOpSetGet() + : HttpOperation(), + mIsGlobal(false), + mDoSet(false), + mSetting(-1), // Nothing requested + mLongValue(0L) +{} + + +HttpOpSetGet::~HttpOpSetGet() +{} + + +void HttpOpSetGet::setupGet(HttpRequest::EGlobalPolicy setting) +{ + mIsGlobal = true; + mSetting = setting; +} + + +void HttpOpSetGet::setupSet(HttpRequest::EGlobalPolicy setting, const std::string & value) +{ + mIsGlobal = true; + mDoSet = true; + mSetting = setting; + mStrValue = value; +} + + +void HttpOpSetGet::stageFromRequest(HttpService * service) +{ + HttpPolicyGlobal & pol_opt(service->getPolicy().getGlobalOptions()); + HttpRequest::EGlobalPolicy setting(static_cast<HttpRequest::EGlobalPolicy>(mSetting)); + + if (mDoSet) + { + mStatus = pol_opt.set(setting, mStrValue); + } + if (mStatus) + { + const std::string * value(NULL); + if ((mStatus = pol_opt.get(setting, &value))) + { + mStrValue = *value; + } + } + + addAsReply(); +} + + +} // end namespace LLCore + + diff --git a/indra/llcorehttp/_httpopsetget.h b/indra/llcorehttp/_httpopsetget.h new file mode 100644 index 0000000000..6966b9d94e --- /dev/null +++ b/indra/llcorehttp/_httpopsetget.h @@ -0,0 +1,83 @@ +/** + * @file _httpopsetget.h + * @brief Internal declarations for the HttpOpSetGet subclass + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_OPSETGET_H_ +#define _LLCORE_HTTP_OPSETGET_H_ + + +#include "linden_common.h" // Modifies curl/curl.h interfaces + +#include "httpcommon.h" + +#include <curl/curl.h> + +#include "_httpoperation.h" +#include "_refcounted.h" + + +namespace LLCore +{ + + +/// HttpOpSetGet requests dynamic changes to policy and +/// configuration settings. +/// +/// *NOTE: Expect this to change. Don't really like it yet. + +class HttpOpSetGet : public HttpOperation +{ +public: + HttpOpSetGet(); + +protected: + virtual ~HttpOpSetGet(); // Use release() + +private: + HttpOpSetGet(const HttpOpSetGet &); // Not defined + void operator=(const HttpOpSetGet &); // Not defined + +public: + /// Threading: called by application thread + void setupGet(HttpRequest::EGlobalPolicy setting); + void setupSet(HttpRequest::EGlobalPolicy setting, const std::string & value); + + virtual void stageFromRequest(HttpService *); + +public: + // Request data + bool mIsGlobal; + bool mDoSet; + int mSetting; + long mLongValue; + std::string mStrValue; + +}; // end class HttpOpSetGet + + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_OPSETGET_H_ + diff --git a/indra/llcorehttp/_httpopsetpriority.cpp b/indra/llcorehttp/_httpopsetpriority.cpp new file mode 100644 index 0000000000..d48c7a0b7d --- /dev/null +++ b/indra/llcorehttp/_httpopsetpriority.cpp @@ -0,0 +1,63 @@ +/** + * @file _httpopsetpriority.cpp + * @brief Definitions for internal classes based on HttpOpSetPriority + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "_httpopsetpriority.h" + +#include "httpresponse.h" +#include "httphandler.h" +#include "_httpservice.h" + + +namespace LLCore +{ + + +HttpOpSetPriority::HttpOpSetPriority(HttpHandle handle, HttpRequest::priority_t priority) + : HttpOperation(), + mHandle(handle), + mPriority(priority) +{} + + +HttpOpSetPriority::~HttpOpSetPriority() +{} + + +void HttpOpSetPriority::stageFromRequest(HttpService * service) +{ + // Do operations + if (! service->changePriority(mHandle, mPriority)) + { + // Request not found, fail the final status + mStatus = HttpStatus(HttpStatus::LLCORE, HE_HANDLE_NOT_FOUND); + } + + // Move directly to response queue + addAsReply(); +} + + +} // end namespace LLCore diff --git a/indra/llcorehttp/_httpopsetpriority.h b/indra/llcorehttp/_httpopsetpriority.h new file mode 100644 index 0000000000..31706b737c --- /dev/null +++ b/indra/llcorehttp/_httpopsetpriority.h @@ -0,0 +1,73 @@ +/** + * @file _httpsetpriority.h + * @brief Internal declarations for HttpSetPriority + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_SETPRIORITY_H_ +#define _LLCORE_HTTP_SETPRIORITY_H_ + + +#include "httpcommon.h" +#include "httprequest.h" +#include "_httpoperation.h" +#include "_refcounted.h" + + +namespace LLCore +{ + + +/// HttpOpSetPriority is an immediate request that +/// searches the various queues looking for a given +/// request handle and changing it's priority if +/// found. +/// +/// *NOTE: This will very likely be removed in the near future +/// when priority is removed from the library. + +class HttpOpSetPriority : public HttpOperation +{ +public: + HttpOpSetPriority(HttpHandle handle, HttpRequest::priority_t priority); + +protected: + virtual ~HttpOpSetPriority(); + +private: + HttpOpSetPriority(const HttpOpSetPriority &); // Not defined + void operator=(const HttpOpSetPriority &); // Not defined + +public: + virtual void stageFromRequest(HttpService *); + +protected: + // Request Data + HttpHandle mHandle; + HttpRequest::priority_t mPriority; +}; // end class HttpOpSetPriority + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_SETPRIORITY_H_ + diff --git a/indra/llcorehttp/_httppolicy.cpp b/indra/llcorehttp/_httppolicy.cpp new file mode 100644 index 0000000000..76c1e22431 --- /dev/null +++ b/indra/llcorehttp/_httppolicy.cpp @@ -0,0 +1,387 @@ +/** + * @file _httppolicy.cpp + * @brief Internal definitions of the Http policy thread + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "linden_common.h" + +#include "_httppolicy.h" + +#include "_httpoprequest.h" +#include "_httpservice.h" +#include "_httplibcurl.h" +#include "_httppolicyclass.h" + +#include "lltimer.h" + + +namespace LLCore +{ + + +// Per-policy-class data for a running system. +// Collection of queues, parameters, history, metrics, etc. +// for a single policy class. +// +// Threading: accessed only by worker thread +struct HttpPolicy::State +{ +public: + State() + : mConnMax(HTTP_CONNECTION_LIMIT_DEFAULT), + mConnAt(HTTP_CONNECTION_LIMIT_DEFAULT), + mConnMin(1), + mNextSample(0), + mErrorCount(0), + mErrorFactor(0) + {} + + HttpReadyQueue mReadyQueue; + HttpRetryQueue mRetryQueue; + + HttpPolicyClass mOptions; + + long mConnMax; + long mConnAt; + long mConnMin; + + HttpTime mNextSample; + unsigned long mErrorCount; + unsigned long mErrorFactor; +}; + + +HttpPolicy::HttpPolicy(HttpService * service) + : mActiveClasses(0), + mState(NULL), + mService(service) +{} + + +HttpPolicy::~HttpPolicy() +{ + shutdown(); + + mService = NULL; +} + + +void HttpPolicy::shutdown() +{ + for (int policy_class(0); policy_class < mActiveClasses; ++policy_class) + { + HttpRetryQueue & retryq(mState[policy_class].mRetryQueue); + while (! retryq.empty()) + { + HttpOpRequest * op(retryq.top()); + retryq.pop(); + + op->cancel(); + op->release(); + } + + HttpReadyQueue & readyq(mState[policy_class].mReadyQueue); + while (! readyq.empty()) + { + HttpOpRequest * op(readyq.top()); + readyq.pop(); + + op->cancel(); + op->release(); + } + } + delete [] mState; + mState = NULL; + mActiveClasses = 0; +} + + +void HttpPolicy::start(const HttpPolicyGlobal & global, + const std::vector<HttpPolicyClass> & classes) +{ + llassert_always(! mState); + + mGlobalOptions = global; + mActiveClasses = classes.size(); + mState = new State [mActiveClasses]; + for (int i(0); i < mActiveClasses; ++i) + { + mState[i].mOptions = classes[i]; + mState[i].mConnMax = classes[i].mConnectionLimit; + mState[i].mConnAt = mState[i].mConnMax; + mState[i].mConnMin = 2; + } +} + + +void HttpPolicy::addOp(HttpOpRequest * op) +{ + const int policy_class(op->mReqPolicy); + + op->mPolicyRetries = 0; + mState[policy_class].mReadyQueue.push(op); +} + + +void HttpPolicy::retryOp(HttpOpRequest * op) +{ + static const HttpTime retry_deltas[] = + { + 250000, // 1st retry in 0.25 S, etc... + 500000, + 1000000, + 2000000, + 5000000 // ... to every 5.0 S. + }; + static const int delta_max(int(LL_ARRAY_SIZE(retry_deltas)) - 1); + + const HttpTime now(totalTime()); + const int policy_class(op->mReqPolicy); + + const HttpTime delta(retry_deltas[llclamp(op->mPolicyRetries, 0, delta_max)]); + op->mPolicyRetryAt = now + delta; + ++op->mPolicyRetries; + LL_WARNS("CoreHttp") << "HTTP request " << static_cast<HttpHandle>(op) + << " retry " << op->mPolicyRetries + << " scheduled for +" << (delta / HttpTime(1000)) + << " mS. Status: " << op->mStatus.toHex() + << LL_ENDL; + if (op->mTracing > 0) + { + LL_INFOS("CoreHttp") << "TRACE, ToRetryQueue, Handle: " + << static_cast<HttpHandle>(op) + << LL_ENDL; + } + mState[policy_class].mRetryQueue.push(op); +} + + +// Attempt to deliver requests to the transport layer. +// +// Tries to find HTTP requests for each policy class with +// available capacity. Starts with the retry queue first +// looking for requests that have waited long enough then +// moves on to the ready queue. +// +// If all queues are empty, will return an indication that +// the worker thread may sleep hard otherwise will ask for +// normal polling frequency. +// +HttpService::ELoopSpeed HttpPolicy::processReadyQueue() +{ + const HttpTime now(totalTime()); + HttpService::ELoopSpeed result(HttpService::REQUEST_SLEEP); + HttpLibcurl & transport(mService->getTransport()); + + for (int policy_class(0); policy_class < mActiveClasses; ++policy_class) + { + State & state(mState[policy_class]); + int active(transport.getActiveCountInClass(policy_class)); + int needed(state.mConnAt - active); // Expect negatives here + + HttpRetryQueue & retryq(state.mRetryQueue); + HttpReadyQueue & readyq(state.mReadyQueue); + + if (needed > 0) + { + // First see if we have any retries... + while (needed > 0 && ! retryq.empty()) + { + HttpOpRequest * op(retryq.top()); + if (op->mPolicyRetryAt > now) + break; + + retryq.pop(); + + op->stageFromReady(mService); + op->release(); + + --needed; + } + + // Now go on to the new requests... + while (needed > 0 && ! readyq.empty()) + { + HttpOpRequest * op(readyq.top()); + readyq.pop(); + + op->stageFromReady(mService); + op->release(); + + --needed; + } + } + + if (! readyq.empty() || ! retryq.empty()) + { + // If anything is ready, continue looping... + result = HttpService::NORMAL; + } + } // end foreach policy_class + + return result; +} + + +bool HttpPolicy::changePriority(HttpHandle handle, HttpRequest::priority_t priority) +{ + for (int policy_class(0); policy_class < mActiveClasses; ++policy_class) + { + State & state(mState[policy_class]); + // We don't scan retry queue because a priority change there + // is meaningless. The request will be issued based on retry + // intervals not priority value, which is now moot. + + // Scan ready queue for requests that match policy + HttpReadyQueue::container_type & c(state.mReadyQueue.get_container()); + for (HttpReadyQueue::container_type::iterator iter(c.begin()); c.end() != iter;) + { + HttpReadyQueue::container_type::iterator cur(iter++); + + if (static_cast<HttpHandle>(*cur) == handle) + { + HttpOpRequest * op(*cur); + c.erase(cur); // All iterators are now invalidated + op->mReqPriority = priority; + state.mReadyQueue.push(op); // Re-insert using adapter class + return true; + } + } + } + + return false; +} + + +bool HttpPolicy::cancel(HttpHandle handle) +{ + for (int policy_class(0); policy_class < mActiveClasses; ++policy_class) + { + State & state(mState[policy_class]); + + // Scan retry queue + HttpRetryQueue::container_type & c1(state.mRetryQueue.get_container()); + for (HttpRetryQueue::container_type::iterator iter(c1.begin()); c1.end() != iter;) + { + HttpRetryQueue::container_type::iterator cur(iter++); + + if (static_cast<HttpHandle>(*cur) == handle) + { + HttpOpRequest * op(*cur); + c1.erase(cur); // All iterators are now invalidated + op->cancel(); + op->release(); + return true; + } + } + + // Scan ready queue + HttpReadyQueue::container_type & c2(state.mReadyQueue.get_container()); + for (HttpReadyQueue::container_type::iterator iter(c2.begin()); c2.end() != iter;) + { + HttpReadyQueue::container_type::iterator cur(iter++); + + if (static_cast<HttpHandle>(*cur) == handle) + { + HttpOpRequest * op(*cur); + c2.erase(cur); // All iterators are now invalidated + op->cancel(); + op->release(); + return true; + } + } + } + + return false; +} + + +bool HttpPolicy::stageAfterCompletion(HttpOpRequest * op) +{ + static const HttpStatus cant_connect(HttpStatus::EXT_CURL_EASY, CURLE_COULDNT_CONNECT); + static const HttpStatus cant_res_proxy(HttpStatus::EXT_CURL_EASY, CURLE_COULDNT_RESOLVE_PROXY); + static const HttpStatus cant_res_host(HttpStatus::EXT_CURL_EASY, CURLE_COULDNT_RESOLVE_HOST); + static const HttpStatus send_error(HttpStatus::EXT_CURL_EASY, CURLE_SEND_ERROR); + static const HttpStatus recv_error(HttpStatus::EXT_CURL_EASY, CURLE_RECV_ERROR); + static const HttpStatus upload_failed(HttpStatus::EXT_CURL_EASY, CURLE_UPLOAD_FAILED); + static const HttpStatus op_timedout(HttpStatus::EXT_CURL_EASY, CURLE_OPERATION_TIMEDOUT); + static const HttpStatus post_error(HttpStatus::EXT_CURL_EASY, CURLE_HTTP_POST_ERROR); + + // Retry or finalize + if (! op->mStatus) + { + // If this failed, we might want to retry. Have to inspect + // the status a little more deeply for those reasons worth retrying... + if (op->mPolicyRetries < op->mPolicyRetryLimit && + ((op->mStatus.isHttpStatus() && op->mStatus.mType >= 499 && op->mStatus.mType <= 599) || + cant_connect == op->mStatus || + cant_res_proxy == op->mStatus || + cant_res_host == op->mStatus || + send_error == op->mStatus || + recv_error == op->mStatus || + upload_failed == op->mStatus || + op_timedout == op->mStatus || + post_error == op->mStatus)) + { + // Okay, worth a retry. We include 499 in this test as + // it's the old 'who knows?' error from many grid services... + retryOp(op); + return true; // still active/ready + } + } + + // This op is done, finalize it delivering it to the reply queue... + if (! op->mStatus) + { + LL_WARNS("CoreHttp") << "HTTP request " << static_cast<HttpHandle>(op) + << " failed after " << op->mPolicyRetries + << " retries. Reason: " << op->mStatus.toString() + << " (" << op->mStatus.toHex() << ")" + << LL_ENDL; + } + else if (op->mPolicyRetries) + { + LL_WARNS("CoreHttp") << "HTTP request " << static_cast<HttpHandle>(op) + << " succeeded on retry " << op->mPolicyRetries << "." + << LL_ENDL; + } + + op->stageFromActive(mService); + op->release(); + return false; // not active +} + + +int HttpPolicy::getReadyCount(HttpRequest::policy_t policy_class) const +{ + if (policy_class < mActiveClasses) + { + return (mState[policy_class].mReadyQueue.size() + + mState[policy_class].mRetryQueue.size()); + } + return 0; +} + + +} // end namespace LLCore diff --git a/indra/llcorehttp/_httppolicy.h b/indra/llcorehttp/_httppolicy.h new file mode 100644 index 0000000000..03d92c0b8e --- /dev/null +++ b/indra/llcorehttp/_httppolicy.h @@ -0,0 +1,161 @@ +/** + * @file _httppolicy.h + * @brief Declarations for internal class enforcing policy decisions. + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_POLICY_H_ +#define _LLCORE_HTTP_POLICY_H_ + + +#include "httprequest.h" +#include "_httpservice.h" +#include "_httpreadyqueue.h" +#include "_httpretryqueue.h" +#include "_httppolicyglobal.h" +#include "_httppolicyclass.h" +#include "_httpinternal.h" + + +namespace LLCore +{ + +class HttpReadyQueue; +class HttpOpRequest; + + +/// Implements class-based queuing policies for an HttpService instance. +/// +/// Threading: Single-threaded. Other than for construction/destruction, +/// all methods are expected to be invoked in a single thread, typically +/// a worker thread of some sort. +class HttpPolicy +{ +public: + HttpPolicy(HttpService *); + virtual ~HttpPolicy(); + +private: + HttpPolicy(const HttpPolicy &); // Not defined + void operator=(const HttpPolicy &); // Not defined + +public: + /// Cancel all ready and retry requests sending them to + /// their notification queues. Release state resources + /// making further request handling impossible. + /// + /// Threading: called by worker thread + void shutdown(); + + /// Deliver policy definitions and enable handling of + /// requests. One-time call invoked before starting + /// the worker thread. + /// + /// Threading: called by application thread + void start(const HttpPolicyGlobal & global, + const std::vector<HttpPolicyClass> & classes); + + /// Give the policy layer some cycles to scan the ready + /// queue promoting higher-priority requests to active + /// as permited. + /// + /// @return Indication of how soon this method + /// should be called again. + /// + /// Threading: called by worker thread + HttpService::ELoopSpeed processReadyQueue(); + + /// Add request to a ready queue. Caller is expected to have + /// provided us with a reference count to hold the request. (No + /// additional references will be added.) + /// + /// OpRequest is owned by the request queue after this call + /// and should not be modified by anyone until retrieved + /// from queue. + /// + /// Threading: called by any thread + void addOp(HttpOpRequest *); + + /// Similar to addOp, used when a caller wants to retry a + /// request that has failed. It's placed on a special retry + /// queue but ordered by retry time not priority. Otherwise, + /// handling is the same and retried operations are considered + /// before new ones but that doesn't guarantee completion + /// order. + /// + /// Threading: called by worker thread + void retryOp(HttpOpRequest *); + + /// Attempt to change the priority of an earlier request. + /// Request that Shadows HttpService's method + /// + /// Threading: called by worker thread + bool changePriority(HttpHandle handle, HttpRequest::priority_t priority); + + /// Attempt to cancel a previous request. + /// Shadows HttpService's method as well + /// + /// Threading: called by worker thread + bool cancel(HttpHandle handle); + + /// When transport is finished with an op and takes it off the + /// active queue, it is delivered here for dispatch. Policy + /// may send it back to the ready/retry queues if it needs another + /// go or we may finalize it and send it on to the reply queue. + /// + /// @return Returns true of the request is still active + /// or ready after staging, false if has been + /// sent on to the reply queue. + /// + /// Threading: called by worker thread + bool stageAfterCompletion(HttpOpRequest * op); + + // Get pointer to global policy options. Caller is expected + // to do context checks like no setting once running. + /// + /// Threading: called by any thread *but* the object may + /// only be modified by the worker thread once running. + /// + HttpPolicyGlobal & getGlobalOptions() + { + return mGlobalOptions; + } + + /// Get ready counts for a particular policy class + /// + /// Threading: called by worker thread + int getReadyCount(HttpRequest::policy_t policy_class) const; + +protected: + struct State; + + int mActiveClasses; + State * mState; + HttpService * mService; // Naked pointer, not refcounted, not owner + HttpPolicyGlobal mGlobalOptions; + +}; // end class HttpPolicy + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_POLICY_H_ diff --git a/indra/llcorehttp/_httppolicyclass.cpp b/indra/llcorehttp/_httppolicyclass.cpp new file mode 100644 index 0000000000..a23b81322c --- /dev/null +++ b/indra/llcorehttp/_httppolicyclass.cpp @@ -0,0 +1,125 @@ +/** + * @file _httppolicyclass.cpp + * @brief Definitions for internal class defining class policy option. + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "_httppolicyclass.h" + +#include "_httpinternal.h" + + +namespace LLCore +{ + + +HttpPolicyClass::HttpPolicyClass() + : mSetMask(0UL), + mConnectionLimit(HTTP_CONNECTION_LIMIT_DEFAULT), + mPerHostConnectionLimit(HTTP_CONNECTION_LIMIT_DEFAULT), + mPipelining(0) +{} + + +HttpPolicyClass::~HttpPolicyClass() +{} + + +HttpPolicyClass & HttpPolicyClass::operator=(const HttpPolicyClass & other) +{ + if (this != &other) + { + mSetMask = other.mSetMask; + mConnectionLimit = other.mConnectionLimit; + mPerHostConnectionLimit = other.mPerHostConnectionLimit; + mPipelining = other.mPipelining; + } + return *this; +} + + +HttpPolicyClass::HttpPolicyClass(const HttpPolicyClass & other) + : mSetMask(other.mSetMask), + mConnectionLimit(other.mConnectionLimit), + mPerHostConnectionLimit(other.mPerHostConnectionLimit), + mPipelining(other.mPipelining) +{} + + +HttpStatus HttpPolicyClass::set(HttpRequest::EClassPolicy opt, long value) +{ + switch (opt) + { + case HttpRequest::CP_CONNECTION_LIMIT: + mConnectionLimit = llclamp(value, long(HTTP_CONNECTION_LIMIT_MIN), long(HTTP_CONNECTION_LIMIT_MAX)); + break; + + case HttpRequest::CP_PER_HOST_CONNECTION_LIMIT: + mPerHostConnectionLimit = llclamp(value, long(HTTP_CONNECTION_LIMIT_MIN), mConnectionLimit); + break; + + case HttpRequest::CP_ENABLE_PIPELINING: + mPipelining = llclamp(value, 0L, 1L); + break; + + default: + return HttpStatus(HttpStatus::LLCORE, HE_INVALID_ARG); + } + + mSetMask |= 1UL << int(opt); + return HttpStatus(); +} + + +HttpStatus HttpPolicyClass::get(HttpRequest::EClassPolicy opt, long * value) +{ + static const HttpStatus not_set(HttpStatus::LLCORE, HE_OPT_NOT_SET); + long * src(NULL); + + switch (opt) + { + case HttpRequest::CP_CONNECTION_LIMIT: + src = &mConnectionLimit; + break; + + case HttpRequest::CP_PER_HOST_CONNECTION_LIMIT: + src = &mPerHostConnectionLimit; + break; + + case HttpRequest::CP_ENABLE_PIPELINING: + src = &mPipelining; + break; + + default: + return HttpStatus(HttpStatus::LLCORE, HE_INVALID_ARG); + } + + if (! (mSetMask & (1UL << int(opt)))) + return not_set; + + *value = *src; + return HttpStatus(); +} + + +} // end namespace LLCore diff --git a/indra/llcorehttp/_httppolicyclass.h b/indra/llcorehttp/_httppolicyclass.h new file mode 100644 index 0000000000..d175413cbd --- /dev/null +++ b/indra/llcorehttp/_httppolicyclass.h @@ -0,0 +1,59 @@ +/** + * @file _httppolicyclass.h + * @brief Declarations for internal class defining policy class options. + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_POLICY_CLASS_H_ +#define _LLCORE_HTTP_POLICY_CLASS_H_ + + +#include "httprequest.h" + + +namespace LLCore +{ + +class HttpPolicyClass +{ +public: + HttpPolicyClass(); + ~HttpPolicyClass(); + + HttpPolicyClass & operator=(const HttpPolicyClass &); + HttpPolicyClass(const HttpPolicyClass &); // Not defined + +public: + HttpStatus set(HttpRequest::EClassPolicy opt, long value); + HttpStatus get(HttpRequest::EClassPolicy opt, long * value); + +public: + unsigned long mSetMask; + long mConnectionLimit; + long mPerHostConnectionLimit; + long mPipelining; +}; // end class HttpPolicyClass + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_POLICY_CLASS_H_ diff --git a/indra/llcorehttp/_httppolicyglobal.cpp b/indra/llcorehttp/_httppolicyglobal.cpp new file mode 100644 index 0000000000..72f409d3b1 --- /dev/null +++ b/indra/llcorehttp/_httppolicyglobal.cpp @@ -0,0 +1,175 @@ +/** + * @file _httppolicyglobal.cpp + * @brief Definitions for internal class defining global policy option. + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "_httppolicyglobal.h" + +#include "_httpinternal.h" + + +namespace LLCore +{ + + +HttpPolicyGlobal::HttpPolicyGlobal() + : mSetMask(0UL), + mConnectionLimit(HTTP_CONNECTION_LIMIT_DEFAULT), + mTrace(HTTP_TRACE_OFF), + mUseLLProxy(0) +{} + + +HttpPolicyGlobal::~HttpPolicyGlobal() +{} + + +HttpPolicyGlobal & HttpPolicyGlobal::operator=(const HttpPolicyGlobal & other) +{ + if (this != &other) + { + mSetMask = other.mSetMask; + mConnectionLimit = other.mConnectionLimit; + mCAPath = other.mCAPath; + mCAFile = other.mCAFile; + mHttpProxy = other.mHttpProxy; + mTrace = other.mTrace; + mUseLLProxy = other.mUseLLProxy; + } + return *this; +} + + +HttpStatus HttpPolicyGlobal::set(HttpRequest::EGlobalPolicy opt, long value) +{ + switch (opt) + { + case HttpRequest::GP_CONNECTION_LIMIT: + mConnectionLimit = llclamp(value, long(HTTP_CONNECTION_LIMIT_MIN), long(HTTP_CONNECTION_LIMIT_MAX)); + break; + + case HttpRequest::GP_TRACE: + mTrace = llclamp(value, long(HTTP_TRACE_MIN), long(HTTP_TRACE_MAX)); + break; + + case HttpRequest::GP_LLPROXY: + mUseLLProxy = llclamp(value, 0L, 1L); + break; + + default: + return HttpStatus(HttpStatus::LLCORE, HE_INVALID_ARG); + } + + mSetMask |= 1UL << int(opt); + return HttpStatus(); +} + + +HttpStatus HttpPolicyGlobal::set(HttpRequest::EGlobalPolicy opt, const std::string & value) +{ + switch (opt) + { + case HttpRequest::GP_CA_PATH: + mCAPath = value; + break; + + case HttpRequest::GP_CA_FILE: + mCAFile = value; + break; + + case HttpRequest::GP_HTTP_PROXY: + mCAFile = value; + break; + + default: + return HttpStatus(HttpStatus::LLCORE, HE_INVALID_ARG); + } + + mSetMask |= 1UL << int(opt); + return HttpStatus(); +} + + +HttpStatus HttpPolicyGlobal::get(HttpRequest::EGlobalPolicy opt, long * value) +{ + static const HttpStatus not_set(HttpStatus::LLCORE, HE_OPT_NOT_SET); + long * src(NULL); + + switch (opt) + { + case HttpRequest::GP_CONNECTION_LIMIT: + src = &mConnectionLimit; + break; + + case HttpRequest::GP_TRACE: + src = &mTrace; + break; + + case HttpRequest::GP_LLPROXY: + src = &mUseLLProxy; + break; + + default: + return HttpStatus(HttpStatus::LLCORE, HE_INVALID_ARG); + } + + if (! (mSetMask & (1UL << int(opt)))) + return not_set; + + *value = *src; + return HttpStatus(); +} + + +HttpStatus HttpPolicyGlobal::get(HttpRequest::EGlobalPolicy opt, const std::string ** value) +{ + static const HttpStatus not_set(HttpStatus::LLCORE, HE_OPT_NOT_SET); + const std::string * src(NULL); + + switch (opt) + { + case HttpRequest::GP_CA_PATH: + src = &mCAPath; + break; + + case HttpRequest::GP_CA_FILE: + src = &mCAFile; + break; + + case HttpRequest::GP_HTTP_PROXY: + src = &mHttpProxy; + break; + + default: + return HttpStatus(HttpStatus::LLCORE, HE_INVALID_ARG); + } + + if (! (mSetMask & (1UL << int(opt)))) + return not_set; + + *value = src; + return HttpStatus(); +} + +} // end namespace LLCore diff --git a/indra/llcorehttp/_httppolicyglobal.h b/indra/llcorehttp/_httppolicyglobal.h new file mode 100644 index 0000000000..a50d0e4188 --- /dev/null +++ b/indra/llcorehttp/_httppolicyglobal.h @@ -0,0 +1,66 @@ +/** + * @file _httppolicyglobal.h + * @brief Declarations for internal class defining global policy option. + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_POLICY_GLOBAL_H_ +#define _LLCORE_HTTP_POLICY_GLOBAL_H_ + + +#include "httprequest.h" + + +namespace LLCore +{ + +class HttpPolicyGlobal +{ +public: + HttpPolicyGlobal(); + ~HttpPolicyGlobal(); + + HttpPolicyGlobal & operator=(const HttpPolicyGlobal &); + +private: + HttpPolicyGlobal(const HttpPolicyGlobal &); // Not defined + +public: + HttpStatus set(HttpRequest::EGlobalPolicy opt, long value); + HttpStatus set(HttpRequest::EGlobalPolicy opt, const std::string & value); + HttpStatus get(HttpRequest::EGlobalPolicy opt, long * value); + HttpStatus get(HttpRequest::EGlobalPolicy opt, const std::string ** value); + +public: + unsigned long mSetMask; + long mConnectionLimit; + std::string mCAPath; + std::string mCAFile; + std::string mHttpProxy; + long mTrace; + long mUseLLProxy; +}; // end class HttpPolicyGlobal + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_POLICY_GLOBAL_H_ diff --git a/indra/llcorehttp/_httpreadyqueue.h b/indra/llcorehttp/_httpreadyqueue.h new file mode 100644 index 0000000000..5f19a9c5f9 --- /dev/null +++ b/indra/llcorehttp/_httpreadyqueue.h @@ -0,0 +1,124 @@ +/** + * @file _httpreadyqueue.h + * @brief Internal declaration for the operation ready queue + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_READY_QUEUE_H_ +#define _LLCORE_HTTP_READY_QUEUE_H_ + + +#include <queue> + +#include "_httpinternal.h" +#include "_httpoprequest.h" + + +namespace LLCore +{ + +/// HttpReadyQueue provides a simple priority queue for HttpOpRequest objects. +/// +/// This uses the priority_queue adaptor class to provide the queue +/// as well as the ordering scheme while allowing us access to the +/// raw container if we follow a few simple rules. One of the more +/// important of those rules is that any iterator becomes invalid +/// on element erasure. So pay attention. +/// +/// If LLCORE_HTTP_READY_QUEUE_IGNORES_PRIORITY tests true, the class +/// implements a std::priority_queue interface but on std::deque +/// behavior to eliminate sensitivity to priority. In the future, +/// this will likely become the only behavior or it may become +/// a run-time election. +/// +/// Threading: not thread-safe. Expected to be used entirely by +/// a single thread, typically a worker thread of some sort. + +#if LLCORE_HTTP_READY_QUEUE_IGNORES_PRIORITY + +typedef std::deque<HttpOpRequest *> HttpReadyQueueBase; + +#else + +typedef std::priority_queue<HttpOpRequest *, + std::deque<HttpOpRequest *>, + LLCore::HttpOpRequestCompare> HttpReadyQueueBase; + +#endif // LLCORE_HTTP_READY_QUEUE_IGNORES_PRIORITY + +class HttpReadyQueue : public HttpReadyQueueBase +{ +public: + HttpReadyQueue() + : HttpReadyQueueBase() + {} + + ~HttpReadyQueue() + {} + +protected: + HttpReadyQueue(const HttpReadyQueue &); // Not defined + void operator=(const HttpReadyQueue &); // Not defined + +public: + +#if LLCORE_HTTP_READY_QUEUE_IGNORES_PRIORITY + // Types and methods needed to make a std::deque look + // more like a std::priority_queue, at least for our + // purposes. + typedef HttpReadyQueueBase container_type; + + const_reference top() const + { + return front(); + } + + void pop() + { + pop_front(); + } + + void push(const value_type & v) + { + push_back(v); + } + +#endif // LLCORE_HTTP_READY_QUEUE_IGNORES_PRIORITY + + const container_type & get_container() const + { + return *this; + } + + container_type & get_container() + { + return *this; + } + +}; // end class HttpReadyQueue + + +} // end namespace LLCore + + +#endif // _LLCORE_HTTP_READY_QUEUE_H_ diff --git a/indra/llcorehttp/_httpreplyqueue.cpp b/indra/llcorehttp/_httpreplyqueue.cpp new file mode 100644 index 0000000000..558b7bdee9 --- /dev/null +++ b/indra/llcorehttp/_httpreplyqueue.cpp @@ -0,0 +1,107 @@ +/** + * @file _httpreplyqueue.cpp + * @brief Internal definitions for the operation reply queue + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "_httpreplyqueue.h" + + +#include "_mutex.h" +#include "_thread.h" +#include "_httpoperation.h" + +using namespace LLCoreInt; + + +namespace LLCore +{ + + +HttpReplyQueue::HttpReplyQueue() + : RefCounted(true) +{ +} + + +HttpReplyQueue::~HttpReplyQueue() +{ + while (! mQueue.empty()) + { + HttpOperation * op = mQueue.back(); + mQueue.pop_back(); + op->release(); + } +} + + +void HttpReplyQueue::addOp(HttpOperation * op) +{ + { + HttpScopedLock lock(mQueueMutex); + + mQueue.push_back(op); + } + mQueueCV.notify_all(); +} + + +HttpOperation * HttpReplyQueue::fetchOp() +{ + HttpOperation * result(NULL); + + { + HttpScopedLock lock(mQueueMutex); + + if (mQueue.empty()) + return NULL; + + result = mQueue.front(); + mQueue.erase(mQueue.begin()); + } + + // Caller also acquires the reference count + return result; +} + + +void HttpReplyQueue::fetchAll(OpContainer & ops) +{ + // Not valid putting something back on the queue... + llassert_always(ops.empty()); + + { + HttpScopedLock lock(mQueueMutex); + + if (! mQueue.empty()) + { + mQueue.swap(ops); + } + } + + // Caller also acquires the reference counts on each op. + return; +} + + +} // end namespace LLCore diff --git a/indra/llcorehttp/_httpreplyqueue.h b/indra/llcorehttp/_httpreplyqueue.h new file mode 100644 index 0000000000..4220a09a3b --- /dev/null +++ b/indra/llcorehttp/_httpreplyqueue.h @@ -0,0 +1,108 @@ +/** + * @file _httpreplyqueue.h + * @brief Internal declarations for the operation reply queue. + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_REPLY_QUEUE_H_ +#define _LLCORE_HTTP_REPLY_QUEUE_H_ + + +#include "_refcounted.h" +#include "_mutex.h" + + +namespace LLCore +{ + + +class HttpOperation; + + +/// Almost identical to the HttpRequestQueue class but +/// whereas that class is a singleton and is known to the +/// HttpService object, this queue is 1:1 with HttpRequest +/// instances and isn't explicitly referenced by the +/// service object. Instead, HttpOperation objects that +/// want to generate replies back to their creators also +/// keep references to the corresponding HttpReplyQueue. +/// The HttpService plumbing then simply delivers replies +/// to the requested reply queue. +/// +/// One result of that is that the fetch operations do +/// not have a wait forever option. The service object +/// doesn't keep handles on everything it would need to +/// notify so it can't wake up sleepers should it need to +/// shutdown. So only non-blocking or timed-blocking modes +/// are anticipated. These are how most application consumers +/// will be coded anyway so it shouldn't be too much of a +/// burden. + +class HttpReplyQueue : public LLCoreInt::RefCounted +{ +public: + /// Caller acquires a Refcount on construction + HttpReplyQueue(); + +protected: + virtual ~HttpReplyQueue(); // Use release() + +private: + HttpReplyQueue(const HttpReplyQueue &); // Not defined + void operator=(const HttpReplyQueue &); // Not defined + +public: + typedef std::vector<HttpOperation *> OpContainer; + + /// Insert an object at the back of the reply queue. + /// + /// Library also takes possession of one reference count to pass + /// through the queue. + /// + /// Threading: callable by any thread. + void addOp(HttpOperation * op); + + /// Fetch an operation from the head of the queue. Returns + /// NULL if none exists. + /// + /// Caller acquires reference count on returned operation. + /// + /// Threading: callable by any thread. + HttpOperation * fetchOp(); + + /// Caller acquires reference count on each returned operation + /// + /// Threading: callable by any thread. + void fetchAll(OpContainer & ops); + +protected: + OpContainer mQueue; + LLCoreInt::HttpMutex mQueueMutex; + LLCoreInt::HttpConditionVariable mQueueCV; + +}; // end class HttpReplyQueue + +} // end namespace LLCore + + +#endif // _LLCORE_HTTP_REPLY_QUEUE_H_ diff --git a/indra/llcorehttp/_httprequestqueue.cpp b/indra/llcorehttp/_httprequestqueue.cpp new file mode 100644 index 0000000000..c16966d078 --- /dev/null +++ b/indra/llcorehttp/_httprequestqueue.cpp @@ -0,0 +1,161 @@ +/** + * @file _httprequestqueue.cpp + * @brief + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "_httprequestqueue.h" + +#include "_httpoperation.h" +#include "_mutex.h" + + +using namespace LLCoreInt; + +namespace LLCore +{ + +HttpRequestQueue * HttpRequestQueue::sInstance(NULL); + + +HttpRequestQueue::HttpRequestQueue() + : RefCounted(true), + mQueueStopped(false) +{ +} + + +HttpRequestQueue::~HttpRequestQueue() +{ + while (! mQueue.empty()) + { + HttpOperation * op = mQueue.back(); + mQueue.pop_back(); + op->release(); + } +} + + +void HttpRequestQueue::init() +{ + llassert_always(! sInstance); + sInstance = new HttpRequestQueue(); +} + + +void HttpRequestQueue::term() +{ + if (sInstance) + { + sInstance->release(); + sInstance = NULL; + } +} + + +HttpStatus HttpRequestQueue::addOp(HttpOperation * op) +{ + bool wake(false); + { + HttpScopedLock lock(mQueueMutex); + + if (mQueueStopped) + { + // Return op and error to caller + return HttpStatus(HttpStatus::LLCORE, HE_SHUTTING_DOWN); + } + wake = mQueue.empty(); + mQueue.push_back(op); + } + if (wake) + { + mQueueCV.notify_all(); + } + return HttpStatus(); +} + + +HttpOperation * HttpRequestQueue::fetchOp(bool wait) +{ + HttpOperation * result(NULL); + + { + HttpScopedLock lock(mQueueMutex); + + while (mQueue.empty()) + { + if (! wait || mQueueStopped) + return NULL; + mQueueCV.wait(lock); + } + + result = mQueue.front(); + mQueue.erase(mQueue.begin()); + } + + // Caller also acquires the reference count + return result; +} + + +void HttpRequestQueue::fetchAll(bool wait, OpContainer & ops) +{ + // Not valid putting something back on the queue... + llassert_always(ops.empty()); + + { + HttpScopedLock lock(mQueueMutex); + + while (mQueue.empty()) + { + if (! wait || mQueueStopped) + return; + mQueueCV.wait(lock); + } + + mQueue.swap(ops); + } + + // Caller also acquires the reference counts on each op. + return; +} + + +void HttpRequestQueue::wakeAll() +{ + mQueueCV.notify_all(); +} + + +void HttpRequestQueue::stopQueue() +{ + { + HttpScopedLock lock(mQueueMutex); + + mQueueStopped = true; + wakeAll(); + } +} + + +} // end namespace LLCore diff --git a/indra/llcorehttp/_httprequestqueue.h b/indra/llcorehttp/_httprequestqueue.h new file mode 100644 index 0000000000..c9c52b7233 --- /dev/null +++ b/indra/llcorehttp/_httprequestqueue.h @@ -0,0 +1,141 @@ +/** + * @file _httprequestqueue.h + * @brief Internal declaration for the operation request queue + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_REQUEST_QUEUE_H_ +#define _LLCORE_HTTP_REQUEST_QUEUE_H_ + + +#include <vector> + +#include "httpcommon.h" +#include "_refcounted.h" +#include "_mutex.h" + + +namespace LLCore +{ + + +class HttpOperation; + + +/// Thread-safe queue of HttpOperation objects. Just +/// a simple queue that handles the transfer of operation +/// requests from all HttpRequest instances into the +/// singleton HttpService instance. + +class HttpRequestQueue : public LLCoreInt::RefCounted +{ +protected: + /// Caller acquires a Refcount on construction + HttpRequestQueue(); + +protected: + virtual ~HttpRequestQueue(); // Use release() + +private: + HttpRequestQueue(const HttpRequestQueue &); // Not defined + void operator=(const HttpRequestQueue &); // Not defined + +public: + static void init(); + static void term(); + + /// Threading: callable by any thread once inited. + inline static HttpRequestQueue * instanceOf() + { + return sInstance; + } + +public: + typedef std::vector<HttpOperation *> OpContainer; + + /// Insert an object at the back of the request queue. + /// + /// Caller must provide one refcount to the queue which takes + /// possession of the count on success. + /// + /// @return Standard status. On failure, caller + /// must dispose of the operation with + /// an explicit release() call. + /// + /// Threading: callable by any thread. + HttpStatus addOp(HttpOperation * op); + + /// Return the operation on the front of the queue. If + /// the queue is empty and @wait is false, call returns + /// immediately and a NULL pointer is returned. If true, + /// caller will sleep until explicitly woken. Wakeups + /// can be spurious and callers must expect NULL pointers + /// even if waiting is indicated. + /// + /// Caller acquires reference count any returned operation + /// + /// Threading: callable by any thread. + HttpOperation * fetchOp(bool wait); + + /// Return all queued requests to caller. The @ops argument + /// should be empty when called and will be swap()'d with + /// current contents. Handling of the @wait argument is + /// identical to @fetchOp. + /// + /// Caller acquires reference count on each returned operation + /// + /// Threading: callable by any thread. + void fetchAll(bool wait, OpContainer & ops); + + /// Wake any sleeping threads. Normal queuing operations + /// won't require this but it may be necessary for termination + /// requests. + /// + /// Threading: callable by any thread. + void wakeAll(); + + /// Disallow further request queuing. Callers to @addOp will + /// get a failure status (LLCORE, HE_SHUTTING_DOWN). Callers + /// to @fetchAll or @fetchOp will get requests that are on the + /// queue but the calls will no longer wait. Instead they'll + /// return immediately. Also wakes up all sleepers to send + /// them on their way. + /// + /// Threading: callable by any thread. + void stopQueue(); + +protected: + static HttpRequestQueue * sInstance; + +protected: + OpContainer mQueue; + LLCoreInt::HttpMutex mQueueMutex; + LLCoreInt::HttpConditionVariable mQueueCV; + bool mQueueStopped; + +}; // end class HttpRequestQueue + +} // end namespace LLCore + + +#endif // _LLCORE_HTTP_REQUEST_QUEUE_H_ diff --git a/indra/llcorehttp/_httpretryqueue.h b/indra/llcorehttp/_httpretryqueue.h new file mode 100644 index 0000000000..745adec09d --- /dev/null +++ b/indra/llcorehttp/_httpretryqueue.h @@ -0,0 +1,94 @@ +/** + * @file _httpretryqueue.h + * @brief Internal declaration for the operation retry queue + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_RETRY_QUEUE_H_ +#define _LLCORE_HTTP_RETRY_QUEUE_H_ + + +#include <queue> + +#include "_httpoprequest.h" + + +namespace LLCore +{ + +/// HttpRetryQueue provides a simple priority queue for HttpOpRequest objects. +/// +/// This uses the priority_queue adaptor class to provide the queue +/// as well as the ordering scheme while allowing us access to the +/// raw container if we follow a few simple rules. One of the more +/// important of those rules is that any iterator becomes invalid +/// on element erasure. So pay attention. +/// +/// Threading: not thread-safe. Expected to be used entirely by +/// a single thread, typically a worker thread of some sort. + +struct HttpOpRetryCompare +{ + bool operator()(const HttpOpRequest * lhs, const HttpOpRequest * rhs) + { + return lhs->mPolicyRetryAt < rhs->mPolicyRetryAt; + } +}; + + +typedef std::priority_queue<HttpOpRequest *, + std::deque<HttpOpRequest *>, + LLCore::HttpOpRetryCompare> HttpRetryQueueBase; + +class HttpRetryQueue : public HttpRetryQueueBase +{ +public: + HttpRetryQueue() + : HttpRetryQueueBase() + {} + + ~HttpRetryQueue() + {} + +protected: + HttpRetryQueue(const HttpRetryQueue &); // Not defined + void operator=(const HttpRetryQueue &); // Not defined + +public: + const container_type & get_container() const + { + return c; + } + + container_type & get_container() + { + return c; + } + +}; // end class HttpRetryQueue + + +} // end namespace LLCore + + +#endif // _LLCORE_HTTP_RETRY_QUEUE_H_ diff --git a/indra/llcorehttp/_httpservice.cpp b/indra/llcorehttp/_httpservice.cpp new file mode 100644 index 0000000000..0825888d0f --- /dev/null +++ b/indra/llcorehttp/_httpservice.cpp @@ -0,0 +1,348 @@ +/** + * @file _httpservice.cpp + * @brief Internal definitions of the Http service thread + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "_httpservice.h" + +#include <boost/bind.hpp> +#include <boost/function.hpp> + +#include "_httpoperation.h" +#include "_httprequestqueue.h" +#include "_httppolicy.h" +#include "_httplibcurl.h" +#include "_thread.h" +#include "_httpinternal.h" + +#include "lltimer.h" +#include "llthread.h" + + +namespace LLCore +{ + +HttpService * HttpService::sInstance(NULL); +volatile HttpService::EState HttpService::sState(NOT_INITIALIZED); + +HttpService::HttpService() + : mRequestQueue(NULL), + mExitRequested(0U), + mThread(NULL), + mPolicy(NULL), + mTransport(NULL) +{ + // Create the default policy class + HttpPolicyClass pol_class; + pol_class.set(HttpRequest::CP_CONNECTION_LIMIT, HTTP_CONNECTION_LIMIT_DEFAULT); + pol_class.set(HttpRequest::CP_PER_HOST_CONNECTION_LIMIT, HTTP_CONNECTION_LIMIT_DEFAULT); + pol_class.set(HttpRequest::CP_ENABLE_PIPELINING, 0L); + mPolicyClasses.push_back(pol_class); +} + + +HttpService::~HttpService() +{ + mExitRequested = 1U; + if (RUNNING == sState) + { + // Trying to kill the service object with a running thread + // is a bit tricky. + if (mRequestQueue) + { + mRequestQueue->stopQueue(); + } + + if (mThread) + { + if (! mThread->timedJoin(250)) + { + // Failed to join, expect problems ahead so do a hard termination. + mThread->cancel(); + + LL_WARNS("CoreHttp") << "Destroying HttpService with running thread. Expect problems." + << LL_ENDL; + } + } + } + + if (mRequestQueue) + { + mRequestQueue->release(); + mRequestQueue = NULL; + } + + delete mTransport; + mTransport = NULL; + + delete mPolicy; + mPolicy = NULL; + + if (mThread) + { + mThread->release(); + mThread = NULL; + } +} + + +void HttpService::init(HttpRequestQueue * queue) +{ + llassert_always(! sInstance); + llassert_always(NOT_INITIALIZED == sState); + sInstance = new HttpService(); + + queue->addRef(); + sInstance->mRequestQueue = queue; + sInstance->mPolicy = new HttpPolicy(sInstance); + sInstance->mTransport = new HttpLibcurl(sInstance); + sState = INITIALIZED; +} + + +void HttpService::term() +{ + if (sInstance) + { + if (RUNNING == sState && sInstance->mThread) + { + // Unclean termination. Thread appears to be running. We'll + // try to give the worker thread a chance to cancel using the + // exit flag... + sInstance->mExitRequested = 1U; + sInstance->mRequestQueue->stopQueue(); + + // And a little sleep + for (int i(0); i < 10 && RUNNING == sState; ++i) + { + ms_sleep(100); + } + } + + delete sInstance; + sInstance = NULL; + } + sState = NOT_INITIALIZED; +} + + +HttpRequest::policy_t HttpService::createPolicyClass() +{ + const HttpRequest::policy_t policy_class(mPolicyClasses.size()); + if (policy_class >= HTTP_POLICY_CLASS_LIMIT) + { + return 0; + } + mPolicyClasses.push_back(HttpPolicyClass()); + return policy_class; +} + + +bool HttpService::isStopped() +{ + // What is really wanted here is something like: + // + // HttpService * service = instanceOf(); + // return STOPPED == sState && (! service || ! service->mThread || ! service->mThread->joinable()); + // + // But boost::thread is not giving me a consistent story on joinability + // of a thread after it returns. Debug and non-debug builds are showing + // different behavior on Linux/Etch so we do a weaker test that may + // not be globally correct (i.e. thread *is* stopping, may not have + // stopped but will very soon): + + return STOPPED == sState; +} + + +/// Threading: callable by consumer thread *once*. +void HttpService::startThread() +{ + llassert_always(! mThread || STOPPED == sState); + llassert_always(INITIALIZED == sState || STOPPED == sState); + + if (mThread) + { + mThread->release(); + } + + // Push current policy definitions, enable policy & transport components + mPolicy->start(mPolicyGlobal, mPolicyClasses); + mTransport->start(mPolicyClasses.size()); + + mThread = new LLCoreInt::HttpThread(boost::bind(&HttpService::threadRun, this, _1)); + sState = RUNNING; +} + + +/// Threading: callable by worker thread. +void HttpService::stopRequested() +{ + mExitRequested = 1U; +} + + +/// Threading: callable by worker thread. +bool HttpService::changePriority(HttpHandle handle, HttpRequest::priority_t priority) +{ + bool found(false); + + // Skip the request queue as we currently don't leave earlier + // requests sitting there. Start with the ready queue... + found = mPolicy->changePriority(handle, priority); + + // If not there, we could try the transport/active queue but priority + // doesn't really have much effect there so we don't waste cycles. + + return found; +} + + +/// Try to find the given request handle on any of the request +/// queues and cancel the operation. +/// +/// @return True if the request was canceled. +/// +/// Threading: callable by worker thread. +bool HttpService::cancel(HttpHandle handle) +{ + bool canceled(false); + + // Request can't be on request queue so skip that. + + // Check the policy component's queues first + canceled = mPolicy->cancel(handle); + + if (! canceled) + { + // If that didn't work, check transport's. + canceled = mTransport->cancel(handle); + } + + return canceled; +} + + +/// Threading: callable by worker thread. +void HttpService::shutdown() +{ + // Disallow future enqueue of requests + mRequestQueue->stopQueue(); + + // Cancel requests already on the request queue + HttpRequestQueue::OpContainer ops; + mRequestQueue->fetchAll(false, ops); + while (! ops.empty()) + { + HttpOperation * op(ops.front()); + ops.erase(ops.begin()); + + op->cancel(); + op->release(); + } + + // Shutdown transport canceling requests, freeing resources + mTransport->shutdown(); + + // And now policy + mPolicy->shutdown(); +} + + +// Working thread loop-forever method. Gives time to +// each of the request queue, policy layer and transport +// layer pieces and then either sleeps for a small time +// or waits for a request to come in. Repeats until +// requested to stop. +void HttpService::threadRun(LLCoreInt::HttpThread * thread) +{ + boost::this_thread::disable_interruption di; + + LLThread::registerThreadID(); + + ELoopSpeed loop(REQUEST_SLEEP); + while (! mExitRequested) + { + loop = processRequestQueue(loop); + + // Process ready queue issuing new requests as needed + ELoopSpeed new_loop = mPolicy->processReadyQueue(); + loop = (std::min)(loop, new_loop); + + // Give libcurl some cycles + new_loop = mTransport->processTransport(); + loop = (std::min)(loop, new_loop); + + // Determine whether to spin, sleep briefly or sleep for next request + if (REQUEST_SLEEP != loop) + { + ms_sleep(HTTP_SERVICE_LOOP_SLEEP_NORMAL_MS); + } + } + + shutdown(); + sState = STOPPED; +} + + +HttpService::ELoopSpeed HttpService::processRequestQueue(ELoopSpeed loop) +{ + HttpRequestQueue::OpContainer ops; + const bool wait_for_req(REQUEST_SLEEP == loop); + + mRequestQueue->fetchAll(wait_for_req, ops); + while (! ops.empty()) + { + HttpOperation * op(ops.front()); + ops.erase(ops.begin()); + + // Process operation + if (! mExitRequested) + { + // Setup for subsequent tracing + long tracing(HTTP_TRACE_OFF); + mPolicy->getGlobalOptions().get(HttpRequest::GP_TRACE, &tracing); + op->mTracing = (std::max)(op->mTracing, int(tracing)); + + if (op->mTracing > HTTP_TRACE_OFF) + { + LL_INFOS("CoreHttp") << "TRACE, FromRequestQueue, Handle: " + << static_cast<HttpHandle>(op) + << LL_ENDL; + } + + // Stage + op->stageFromRequest(this); + } + + // Done with operation + op->release(); + } + + // Queue emptied, allow polling loop to sleep + return REQUEST_SLEEP; +} + + +} // end namespace LLCore diff --git a/indra/llcorehttp/_httpservice.h b/indra/llcorehttp/_httpservice.h new file mode 100644 index 0000000000..ffe0349d4d --- /dev/null +++ b/indra/llcorehttp/_httpservice.h @@ -0,0 +1,224 @@ +/** + * @file _httpservice.h + * @brief Declarations for internal class providing HTTP service. + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_SERVICE_H_ +#define _LLCORE_HTTP_SERVICE_H_ + + +#include <vector> + +#include "linden_common.h" +#include "llapr.h" +#include "httpcommon.h" +#include "httprequest.h" +#include "_httppolicyglobal.h" +#include "_httppolicyclass.h" + + +namespace LLCoreInt +{ + +class HttpThread; + +} + + +namespace LLCore +{ + + +class HttpRequestQueue; +class HttpPolicy; +class HttpLibcurl; + + +/// The HttpService class does the work behind the request queue. It +/// oversees the HTTP workflow carrying out a number of tasks: +/// - Pulling requests from the global request queue +/// - Executing 'immediate' requests directly +/// - Prioritizing and re-queuing on internal queues the slower requests +/// - Providing cpu cycles to the libcurl plumbing +/// - Overseeing retry operations +/// +/// Note that the service object doesn't have a pointer to any +/// reply queue. These are kept by HttpRequest and HttpOperation +/// only. +/// +/// Service, Policy and Transport +/// +/// HttpService could have been a monolithic class combining a request +/// queue servicer, request policy manager and network transport. +/// Instead, to prevent monolithic growth and allow for easier +/// replacement, it was developed as three separate classes: HttpService, +/// HttpPolicy and HttpLibcurl (transport). These always exist in a +/// 1:1:1 relationship with HttpService managing instances of the other +/// two. So, these classes do not use reference counting to refer +/// to one another, their lifecycles are always managed together. + +class HttpService +{ +protected: + HttpService(); + virtual ~HttpService(); + +private: + HttpService(const HttpService &); // Not defined + void operator=(const HttpService &); // Not defined + +public: + enum EState + { + NOT_INITIALIZED = -1, + INITIALIZED, ///< init() has been called + RUNNING, ///< thread created and running + STOPPED ///< thread has committed to exiting + }; + + // Ordered enumeration of idling strategies available to + // threadRun's loop. Ordered so that std::min on values + // produces the most conservative result of multiple + // requests. + enum ELoopSpeed + { + NORMAL, ///< continuous polling of request, ready, active queues + REQUEST_SLEEP ///< can sleep indefinitely waiting for request queue write + }; + + static void init(HttpRequestQueue *); + static void term(); + + /// Threading: callable by any thread once inited. + inline static HttpService * instanceOf() + { + return sInstance; + } + + /// Return the state of the worker thread. Note that the + /// transition from RUNNING to STOPPED is performed by the + /// worker thread itself. This has two weaknesses: + /// - race where the thread hasn't really stopped but will + /// - data ordering between threads where a non-worker thread + /// may see a stale RUNNING status. + /// + /// This transition is generally of interest only to unit tests + /// and these weaknesses shouldn't be any real burden. + /// + /// Threading: callable by any thread with above exceptions. + static EState getState() + { + return sState; + } + + /// Threading: callable by any thread but uses @see getState() and + /// acquires its weaknesses. + static bool isStopped(); + + /// Threading: callable by consumer thread *once*. + void startThread(); + + /// Threading: callable by worker thread. + void stopRequested(); + + /// Threading: callable by worker thread. + void shutdown(); + + /// Try to find the given request handle on any of the request + /// queues and reset the priority (and queue position) of the + /// request if found. + /// + /// @return True if the request was found somewhere. + /// + /// Threading: callable by worker thread. + bool changePriority(HttpHandle handle, HttpRequest::priority_t priority); + + /// Try to find the given request handle on any of the request + /// queues and cancel the operation. + /// + /// @return True if the request was found and canceled. + /// + /// Threading: callable by worker thread. + bool cancel(HttpHandle handle); + + /// Threading: callable by worker thread. + HttpPolicy & getPolicy() + { + return *mPolicy; + } + + /// Threading: callable by worker thread. + HttpLibcurl & getTransport() + { + return *mTransport; + } + + /// Threading: callable by worker thread. + HttpRequestQueue & getRequestQueue() + { + return *mRequestQueue; + } + + /// Threading: callable by consumer thread. + HttpPolicyGlobal & getGlobalOptions() + { + return mPolicyGlobal; + } + + /// Threading: callable by consumer thread. + HttpRequest::policy_t createPolicyClass(); + + /// Threading: callable by consumer thread. + HttpPolicyClass & getClassOptions(HttpRequest::policy_t policy_class) + { + llassert(policy_class >= 0 && policy_class < mPolicyClasses.size()); + return mPolicyClasses[policy_class]; + } + +protected: + void threadRun(LLCoreInt::HttpThread * thread); + + ELoopSpeed processRequestQueue(ELoopSpeed loop); + +protected: + static HttpService * sInstance; + + // === shared data === + static volatile EState sState; + HttpRequestQueue * mRequestQueue; // Refcounted + LLAtomicU32 mExitRequested; + LLCoreInt::HttpThread * mThread; + + // === consumer-thread-only data === + HttpPolicyGlobal mPolicyGlobal; + std::vector<HttpPolicyClass> mPolicyClasses; + + // === working-thread-only data === + HttpPolicy * mPolicy; // Simple pointer, has ownership + HttpLibcurl * mTransport; // Simple pointer, has ownership +}; // end class HttpService + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_SERVICE_H_ diff --git a/indra/llcorehttp/_mutex.h b/indra/llcorehttp/_mutex.h new file mode 100644 index 0000000000..4be4d016d4 --- /dev/null +++ b/indra/llcorehttp/_mutex.h @@ -0,0 +1,55 @@ +/** + * @file _mutex.hpp + * @brief mutex type abstraction + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLCOREINT_MUTEX_H_ +#define LLCOREINT_MUTEX_H_ + + +#include <boost/thread.hpp> + + +namespace LLCoreInt +{ + +// MUTEX TYPES + +// unique mutex type +typedef boost::mutex HttpMutex; + +// CONDITION VARIABLES + +// standard condition variable +typedef boost::condition_variable HttpConditionVariable; + +// LOCKS AND FENCES + +// scoped unique lock +typedef boost::unique_lock<HttpMutex> HttpScopedLock; + +} + +#endif // LLCOREINT_MUTEX_H + diff --git a/indra/llcorehttp/_refcounted.cpp b/indra/llcorehttp/_refcounted.cpp new file mode 100644 index 0000000000..e7d0b72741 --- /dev/null +++ b/indra/llcorehttp/_refcounted.cpp @@ -0,0 +1,45 @@ +/** + * @file _refcounted.cpp + * @brief Atomic, thread-safe ref counting and destruction mixin class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "_refcounted.h" + + +namespace LLCoreInt +{ + +#if ! LL_WINDOWS + +const S32 RefCounted::NOT_REF_COUNTED; + +#endif // ! LL_WINDOWS + +RefCounted::~RefCounted() +{} + + +} // end namespace LLCoreInt + + diff --git a/indra/llcorehttp/_refcounted.h b/indra/llcorehttp/_refcounted.h new file mode 100644 index 0000000000..21a916b13b --- /dev/null +++ b/indra/llcorehttp/_refcounted.h @@ -0,0 +1,126 @@ +/** + * @file _refcounted.h + * @brief Atomic, thread-safe ref counting and destruction mixin class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLCOREINT__REFCOUNTED_H_ +#define LLCOREINT__REFCOUNTED_H_ + + +#include "linden_common.h" + +#include "fix_macros.h" +#include <boost/thread.hpp> + +#include "llapr.h" + + +namespace LLCoreInt +{ + + +class RefCounted +{ +private: + RefCounted(); // Not defined - may not be default constructed + void operator=(const RefCounted &); // Not defined + +public: + explicit RefCounted(bool const implicit) + : mRefCount(implicit) + {} + + // ref-count interface + void addRef() const; + void release() const; + bool isLastRef() const; + S32 getRefCount() const; + void noRef() const; + + static const S32 NOT_REF_COUNTED = -1; + +protected: + virtual ~RefCounted(); + virtual void destroySelf(); + +private: + mutable LLAtomicS32 mRefCount; + +}; // end class RefCounted + + +inline void RefCounted::addRef() const +{ + S32 count(mRefCount++); + llassert_always(count >= 0); +} + + +inline void RefCounted::release() const +{ + S32 count(mRefCount); + llassert_always(count != NOT_REF_COUNTED); + llassert_always(count > 0); + count = mRefCount--; + + // clean ourselves up if that was the last reference + if (0 == count) + { + const_cast<RefCounted *>(this)->destroySelf(); + } +} + + +inline bool RefCounted::isLastRef() const +{ + const S32 count(mRefCount); + llassert_always(count != NOT_REF_COUNTED); + llassert_always(count >= 1); + return (1 == count); +} + + +inline S32 RefCounted::getRefCount() const +{ + const S32 result(mRefCount); + return result; +} + + +inline void RefCounted::noRef() const +{ + llassert_always(mRefCount <= 1); + mRefCount = NOT_REF_COUNTED; +} + + +inline void RefCounted::destroySelf() +{ + delete this; +} + +} // end namespace LLCoreInt + +#endif // LLCOREINT__REFCOUNTED_H_ + diff --git a/indra/llcorehttp/_thread.h b/indra/llcorehttp/_thread.h new file mode 100644 index 0000000000..e058d660e5 --- /dev/null +++ b/indra/llcorehttp/_thread.h @@ -0,0 +1,123 @@ +/** + * @file _thread.h + * @brief thread type abstraction + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLCOREINT_THREAD_H_ +#define LLCOREINT_THREAD_H_ + +#include "linden_common.h" + +#include <boost/thread.hpp> +#include <boost/function.hpp> +#include <boost/date_time/posix_time/posix_time_types.hpp> + +#include "_refcounted.h" + +namespace LLCoreInt +{ + +class HttpThread : public RefCounted +{ +private: + HttpThread(); // Not defined + void operator=(const HttpThread &); // Not defined + + void at_exit() + { + // the thread function has exited so we need to release our reference + // to ourself so that we will be automagically cleaned up. + release(); + } + + void run() + { // THREAD CONTEXT + + // Take out additional reference for the at_exit handler + addRef(); + boost::this_thread::at_thread_exit(boost::bind(&HttpThread::at_exit, this)); + + // run the thread function + mThreadFunc(this); + + } // THREAD CONTEXT + +protected: + virtual ~HttpThread() + { + delete mThread; + } + +public: + /// Constructs a thread object for concurrent execution but does + /// not start running. Caller receives on refcount on the thread + /// instance. If the thread is started, another will be taken + /// out for the exit handler. + explicit HttpThread(boost::function<void (HttpThread *)> threadFunc) + : RefCounted(true), // implicit reference + mThreadFunc(threadFunc) + { + // this creates a boost thread that will call HttpThread::run on this instance + // and pass it the threadfunc callable... + boost::function<void()> f = boost::bind(&HttpThread::run, this); + + mThread = new boost::thread(f); + } + + inline void join() + { + mThread->join(); + } + + inline bool timedJoin(S32 millis) + { + return mThread->timed_join(boost::posix_time::milliseconds(millis)); + } + + inline bool joinable() const + { + return mThread->joinable(); + } + + // A very hostile method to force a thread to quit + inline void cancel() + { + boost::thread::native_handle_type thread(mThread->native_handle()); +#if LL_WINDOWS + TerminateThread(thread, 0); +#else + pthread_cancel(thread); +#endif + } + +private: + boost::function<void(HttpThread *)> mThreadFunc; + boost::thread * mThread; +}; // end class HttpThread + +} // end namespace LLCoreInt + +#endif // LLCOREINT_THREAD_H_ + + diff --git a/indra/llcorehttp/bufferarray.cpp b/indra/llcorehttp/bufferarray.cpp new file mode 100644 index 0000000000..8eaaeed710 --- /dev/null +++ b/indra/llcorehttp/bufferarray.cpp @@ -0,0 +1,352 @@ +/** + * @file bufferarray.cpp + * @brief Implements the BufferArray scatter/gather buffer + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "bufferarray.h" + + +// BufferArray is a list of chunks, each a BufferArray::Block, of contiguous +// data presented as a single array. Chunks are at least BufferArray::BLOCK_ALLOC_SIZE +// in length and can be larger. Any chunk may be partially filled or even +// empty. +// +// The BufferArray itself is sharable as a RefCounted entity. As shared +// reads don't work with the concept of a current position/seek value, +// none is kept with the object. Instead, the read and write operations +// all take position arguments. Single write/shared read isn't supported +// directly and any such attempts have to be serialized outside of this +// implementation. + +namespace LLCore +{ + + +// ================================== +// BufferArray::Block Declaration +// ================================== + +class BufferArray::Block +{ +public: + ~Block(); + + void operator delete(void *); + void operator delete(void *, size_t len); + +protected: + Block(size_t len); + + Block(const Block &); // Not defined + void operator=(const Block &); // Not defined + + // Allocate the block with the additional space for the + // buffered data at the end of the object. + void * operator new(size_t len, size_t addl_len); + +public: + // Only public entry to get a block. + static Block * alloc(size_t len); + +public: + size_t mUsed; + size_t mAlloced; + + // *NOTE: Must be last member of the object. We'll + // overallocate as requested via operator new and index + // into the array at will. + char mData[1]; +}; + + +// ================================== +// BufferArray Definitions +// ================================== + + +#if ! LL_WINDOWS +const size_t BufferArray::BLOCK_ALLOC_SIZE; +#endif // ! LL_WINDOWS + +BufferArray::BufferArray() + : LLCoreInt::RefCounted(true), + mLen(0) +{} + + +BufferArray::~BufferArray() +{ + for (container_t::iterator it(mBlocks.begin()); + it != mBlocks.end(); + ++it) + { + delete *it; + *it = NULL; + } + mBlocks.clear(); +} + + +size_t BufferArray::append(const void * src, size_t len) +{ + const size_t ret(len); + const char * c_src(static_cast<const char *>(src)); + + // First, try to copy into the last block + if (len && ! mBlocks.empty()) + { + Block & last(*mBlocks.back()); + if (last.mUsed < last.mAlloced) + { + // Some will fit... + const size_t copy_len((std::min)(len, (last.mAlloced - last.mUsed))); + + memcpy(&last.mData[last.mUsed], c_src, copy_len); + last.mUsed += copy_len; + llassert_always(last.mUsed <= last.mAlloced); + mLen += copy_len; + c_src += copy_len; + len -= copy_len; + } + } + + // Then get new blocks as needed + while (len) + { + const size_t copy_len((std::min)(len, BLOCK_ALLOC_SIZE)); + + if (mBlocks.size() >= mBlocks.capacity()) + { + mBlocks.reserve(mBlocks.size() + 5); + } + Block * block = Block::alloc(BLOCK_ALLOC_SIZE); + memcpy(block->mData, c_src, copy_len); + block->mUsed = copy_len; + llassert_always(block->mUsed <= block->mAlloced); + mBlocks.push_back(block); + mLen += copy_len; + c_src += copy_len; + len -= copy_len; + } + return ret; +} + + +void * BufferArray::appendBufferAlloc(size_t len) +{ + // If someone asks for zero-length, we give them a valid pointer. + if (mBlocks.size() >= mBlocks.capacity()) + { + mBlocks.reserve(mBlocks.size() + 5); + } + Block * block = Block::alloc((std::max)(BLOCK_ALLOC_SIZE, len)); + block->mUsed = len; + mBlocks.push_back(block); + mLen += len; + return block->mData; +} + + +size_t BufferArray::read(size_t pos, void * dst, size_t len) +{ + char * c_dst(static_cast<char *>(dst)); + + if (pos >= mLen) + return 0; + size_t len_limit(mLen - pos); + len = (std::min)(len, len_limit); + if (0 == len) + return 0; + + size_t result(0), offset(0); + const int block_limit(mBlocks.size()); + int block_start(findBlock(pos, &offset)); + if (block_start < 0) + return 0; + + do + { + Block & block(*mBlocks[block_start]); + size_t block_limit(block.mUsed - offset); + size_t block_len((std::min)(block_limit, len)); + + memcpy(c_dst, &block.mData[offset], block_len); + result += block_len; + len -= block_len; + c_dst += block_len; + offset = 0; + ++block_start; + } + while (len && block_start < block_limit); + + return result; +} + + +size_t BufferArray::write(size_t pos, const void * src, size_t len) +{ + const char * c_src(static_cast<const char *>(src)); + + if (pos > mLen || 0 == len) + return 0; + + size_t result(0), offset(0); + const int block_limit(mBlocks.size()); + int block_start(findBlock(pos, &offset)); + + if (block_start >= 0) + { + // Some or all of the write will be on top of + // existing data. + do + { + Block & block(*mBlocks[block_start]); + size_t block_limit(block.mUsed - offset); + size_t block_len((std::min)(block_limit, len)); + + memcpy(&block.mData[offset], c_src, block_len); + result += block_len; + c_src += block_len; + len -= block_len; + offset = 0; + ++block_start; + } + while (len && block_start < block_limit); + } + + // Something left, see if it will fit in the free + // space of the last block. + if (len && ! mBlocks.empty()) + { + Block & last(*mBlocks.back()); + if (last.mUsed < last.mAlloced) + { + // Some will fit... + const size_t copy_len((std::min)(len, (last.mAlloced - last.mUsed))); + + memcpy(&last.mData[last.mUsed], c_src, copy_len); + last.mUsed += copy_len; + result += copy_len; + llassert_always(last.mUsed <= last.mAlloced); + mLen += copy_len; + c_src += copy_len; + len -= copy_len; + } + } + + if (len) + { + // Some or all of the remaining write data will + // be an append. + result += append(c_src, len); + } + + return result; +} + + +int BufferArray::findBlock(size_t pos, size_t * ret_offset) +{ + *ret_offset = 0; + if (pos >= mLen) + return -1; // Doesn't exist + + const int block_limit(mBlocks.size()); + for (int i(0); i < block_limit; ++i) + { + if (pos < mBlocks[i]->mUsed) + { + *ret_offset = pos; + return i; + } + pos -= mBlocks[i]->mUsed; + } + + // Shouldn't get here but... + return -1; +} + + +bool BufferArray::getBlockStartEnd(int block, const char ** start, const char ** end) +{ + if (block < 0 || block >= mBlocks.size()) + { + return false; + } + + const Block & b(*mBlocks[block]); + *start = &b.mData[0]; + *end = &b.mData[b.mUsed]; + return true; +} + + +// ================================== +// BufferArray::Block Definitions +// ================================== + + +BufferArray::Block::Block(size_t len) + : mUsed(0), + mAlloced(len) +{ + memset(mData, 0, len); +} + + +BufferArray::Block::~Block() +{ + mUsed = 0; + mAlloced = 0; +} + + +void * BufferArray::Block::operator new(size_t len, size_t addl_len) +{ + void * mem = new char[len + addl_len + sizeof(void *)]; + return mem; +} + + +void BufferArray::Block::operator delete(void * mem) +{ + char * cmem = static_cast<char *>(mem); + delete [] cmem; +} + + +void BufferArray::Block::operator delete(void * mem, size_t) +{ + operator delete(mem); +} + + +BufferArray::Block * BufferArray::Block::alloc(size_t len) +{ + Block * block = new (len) Block(len); + return block; +} + + +} // end namespace LLCore diff --git a/indra/llcorehttp/bufferarray.h b/indra/llcorehttp/bufferarray.h new file mode 100644 index 0000000000..1094a435b4 --- /dev/null +++ b/indra/llcorehttp/bufferarray.h @@ -0,0 +1,137 @@ +/** + * @file bufferarray.h + * @brief Public-facing declaration for the BufferArray scatter/gather class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_BUFFER_ARRAY_H_ +#define _LLCORE_BUFFER_ARRAY_H_ + + +#include <cstdlib> +#include <vector> + +#include "_refcounted.h" + + +namespace LLCore +{ + +class BufferArrayStreamBuf; + +/// A very simple scatter/gather type map for bulk data. The motivation +/// for this class is the writedata callback used by libcurl. Response +/// bodies are delivered to the caller in a sequence of sequential write +/// operations and this class captures them without having to reallocate +/// and move data. +/// +/// The interface looks a little like a unix file descriptor but only +/// just. There is a notion of a current position, starting from 0, +/// which is used as the position in the data when performing read and +/// write operations. The position also moves after various operations: +/// - seek(...) +/// - read(...) +/// - write(...) +/// - append(...) +/// - appendBufferAlloc(...) +/// The object also keeps a total length value which is updated after +/// write and append operations and beyond which the current position +/// cannot be set. +/// +/// Threading: not thread-safe +/// +/// Allocation: Refcounted, heap only. Caller of the constructor +/// is given a single refcount. +/// +class BufferArray : public LLCoreInt::RefCounted +{ +public: + // BufferArrayStreamBuf has intimate knowledge of this + // implementation to implement a buffer-free adapter. + // Changes here will likely need to be reflected there. + friend class BufferArrayStreamBuf; + + BufferArray(); + +protected: + virtual ~BufferArray(); // Use release() + +private: + BufferArray(const BufferArray &); // Not defined + void operator=(const BufferArray &); // Not defined + +public: + // Internal magic number, may be used by unit tests. + static const size_t BLOCK_ALLOC_SIZE = 65540; + + /// Appends the indicated data to the BufferArray + /// modifying current position and total size. New + /// position is one beyond the final byte of the buffer. + /// + /// @return Count of bytes copied to BufferArray + size_t append(const void * src, size_t len); + + /// Similar to @see append(), this call guarantees a + /// contiguous block of memory of requested size placed + /// at the current end of the BufferArray. On return, + /// the data in the memory is considered valid whether + /// the caller writes to it or not. + /// + /// @return Pointer to contiguous region at end + /// of BufferArray of 'len' size. + void * appendBufferAlloc(size_t len); + + /// Current count of bytes in BufferArray instance. + size_t size() const + { + return mLen; + } + + /// Copies data from the given position in the instance + /// to the caller's buffer. Will return a short count of + /// bytes copied if the 'len' extends beyond the data. + size_t read(size_t pos, void * dst, size_t len); + + /// Copies data from the caller's buffer to the instance + /// at the current position. May overwrite existing data, + /// append data when current position is equal to the + /// size of the instance or do a mix of both. + size_t write(size_t pos, const void * src, size_t len); + +protected: + int findBlock(size_t pos, size_t * ret_offset); + + bool getBlockStartEnd(int block, const char ** start, const char ** end); + +protected: + class Block; + typedef std::vector<Block *> container_t; + + container_t mBlocks; + size_t mLen; +}; // end class BufferArray + + +} // end namespace LLCore + +#endif // _LLCORE_BUFFER_ARRAY_H_ diff --git a/indra/llcorehttp/bufferstream.cpp b/indra/llcorehttp/bufferstream.cpp new file mode 100644 index 0000000000..6553900eef --- /dev/null +++ b/indra/llcorehttp/bufferstream.cpp @@ -0,0 +1,285 @@ +/** + * @file bufferstream.cpp + * @brief Implements the BufferStream adapter class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "bufferstream.h" + +#include "bufferarray.h" + + +namespace LLCore +{ + +BufferArrayStreamBuf::BufferArrayStreamBuf(BufferArray * array) + : mBufferArray(array), + mReadCurPos(0), + mReadCurBlock(-1), + mReadBegin(NULL), + mReadCur(NULL), + mReadEnd(NULL), + mWriteCurPos(0) +{ + if (array) + { + array->addRef(); + mWriteCurPos = array->mLen; + } +} + + +BufferArrayStreamBuf::~BufferArrayStreamBuf() +{ + if (mBufferArray) + { + mBufferArray->release(); + mBufferArray = NULL; + } +} + + +BufferArrayStreamBuf::int_type BufferArrayStreamBuf::underflow() +{ + if (! mBufferArray) + { + return traits_type::eof(); + } + + if (mReadCur == mReadEnd) + { + // Find the next block with actual data or leave + // mCurBlock/mCur/mEnd unchanged if we're at the end + // of any block chain. + const char * new_begin(NULL), * new_end(NULL); + int new_cur_block(mReadCurBlock + 1); + + while (mBufferArray->getBlockStartEnd(new_cur_block, &new_begin, &new_end)) + { + if (new_begin != new_end) + { + break; + } + ++new_cur_block; + } + if (new_begin == new_end) + { + return traits_type::eof(); + } + + mReadCurBlock = new_cur_block; + mReadBegin = mReadCur = new_begin; + mReadEnd = new_end; + } + + return traits_type::to_int_type(*mReadCur); +} + + +BufferArrayStreamBuf::int_type BufferArrayStreamBuf::uflow() +{ + const int_type ret(underflow()); + + if (traits_type::eof() != ret) + { + ++mReadCur; + ++mReadCurPos; + } + return ret; +} + + +BufferArrayStreamBuf::int_type BufferArrayStreamBuf::pbackfail(int_type ch) +{ + if (! mBufferArray) + { + return traits_type::eof(); + } + + if (mReadCur == mReadBegin) + { + // Find the previous block with actual data or leave + // mCurBlock/mBegin/mCur/mEnd unchanged if we're at the + // beginning of any block chain. + const char * new_begin(NULL), * new_end(NULL); + int new_cur_block(mReadCurBlock - 1); + + while (mBufferArray->getBlockStartEnd(new_cur_block, &new_begin, &new_end)) + { + if (new_begin != new_end) + { + break; + } + --new_cur_block; + } + if (new_begin == new_end) + { + return traits_type::eof(); + } + + mReadCurBlock = new_cur_block; + mReadBegin = new_begin; + mReadEnd = mReadCur = new_end; + } + + if (traits_type::eof() != ch && mReadCur[-1] != ch) + { + return traits_type::eof(); + } + --mReadCurPos; + return traits_type::to_int_type(*--mReadCur); +} + + +std::streamsize BufferArrayStreamBuf::showmanyc() +{ + if (! mBufferArray) + { + return -1; + } + return mBufferArray->mLen - mReadCurPos; +} + + +BufferArrayStreamBuf::int_type BufferArrayStreamBuf::overflow(int c) +{ + if (! mBufferArray || mWriteCurPos > mBufferArray->mLen) + { + return traits_type::eof(); + } + const size_t wrote(mBufferArray->write(mWriteCurPos, &c, 1)); + mWriteCurPos += wrote; + return wrote ? c : traits_type::eof(); +} + + +std::streamsize BufferArrayStreamBuf::xsputn(const char * src, std::streamsize count) +{ + if (! mBufferArray || mWriteCurPos > mBufferArray->mLen) + { + return 0; + } + const size_t wrote(mBufferArray->write(mWriteCurPos, src, count)); + mWriteCurPos += wrote; + return wrote; +} + + +std::streampos BufferArrayStreamBuf::seekoff(std::streamoff off, + std::ios_base::seekdir way, + std::ios_base::openmode which) +{ + std::streampos ret(-1); + + if (! mBufferArray) + { + return ret; + } + + if (std::ios_base::in == which) + { + size_t pos(0); + + switch (way) + { + case std::ios_base::beg: + pos = off; + break; + + case std::ios_base::cur: + pos = mReadCurPos += off; + break; + + case std::ios_base::end: + pos = mBufferArray->mLen - off; + break; + + default: + return ret; + } + + if (pos >= mBufferArray->size()) + { + pos = (std::max)(size_t(0), mBufferArray->size() - 1); + } + size_t ba_offset(0); + int block(mBufferArray->findBlock(pos, &ba_offset)); + if (block < 0) + return ret; + const char * start(NULL), * end(NULL); + if (! mBufferArray->getBlockStartEnd(block, &start, &end)) + return ret; + mReadCurBlock = block; + mReadBegin = start; + mReadCur = start + ba_offset; + mReadEnd = end; + ret = mReadCurPos = pos; + } + else if (std::ios_base::out == which) + { + size_t pos(0); + + switch (way) + { + case std::ios_base::beg: + pos = off; + break; + + case std::ios_base::cur: + pos = mWriteCurPos += off; + break; + + case std::ios_base::end: + pos = mBufferArray->mLen - off; + break; + + default: + return ret; + } + + if (pos < 0) + return ret; + if (pos > mBufferArray->size()) + { + pos = mBufferArray->size(); + } + ret = mWriteCurPos = pos; + } + + return ret; +} + + +BufferArrayStream::BufferArrayStream(BufferArray * ba) + : std::iostream(&mStreamBuf), + mStreamBuf(ba) +{} + + +BufferArrayStream::~BufferArrayStream() +{} + + +} // end namespace LLCore + + diff --git a/indra/llcorehttp/bufferstream.h b/indra/llcorehttp/bufferstream.h new file mode 100644 index 0000000000..9327a798aa --- /dev/null +++ b/indra/llcorehttp/bufferstream.h @@ -0,0 +1,153 @@ +/** + * @file bufferstream.h + * @brief Public-facing declaration for the BufferStream adapter class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_BUFFER_STREAM_H_ +#define _LLCORE_BUFFER_STREAM_H_ + + +#include <sstream> +#include <cstdlib> + +#include "bufferarray.h" + + +/// @file bufferstream.h +/// +/// std::streambuf and std::iostream adapters for BufferArray +/// objects. +/// +/// BufferArrayStreamBuf inherits std::streambuf and implements +/// an unbuffered interface for streambuf. This may or may not +/// be the most time efficient implementation and it is a little +/// challenging. +/// +/// BufferArrayStream inherits std::iostream and will be the +/// adapter object most callers will be interested in (though +/// it uses BufferArrayStreamBuf internally). Instances allow +/// for the usual streaming operators ('<<', '>>') and serialization +/// methods. +/// +/// Example of LLSD serialization to a BufferArray: +/// +/// BufferArray * ba = new BufferArray; +/// BufferArrayStream bas(ba); +/// LLSDSerialize::toXML(llsd, bas); +/// operationOnBufferArray(ba); +/// ba->release(); +/// ba = NULL; +/// // operationOnBufferArray and bas are each holding +/// // references to the ba instance at this point. +/// + +namespace LLCore +{ + + +// ===================================================== +// BufferArrayStreamBuf +// ===================================================== + +/// Adapter class to put a std::streambuf interface on a BufferArray +/// +/// Application developers will rarely be interested in anything +/// other than the constructor and even that will rarely be used +/// except indirectly via the @BufferArrayStream class. The +/// choice of interfaces implemented yields a bufferless adapter +/// that doesn't used either the input or output pointer triplets +/// of the more common buffered implementations. This may or may +/// not be faster and that question could stand to be looked at +/// sometime. +/// + +class BufferArrayStreamBuf : public std::streambuf +{ +public: + /// Constructor increments the reference count on the + /// BufferArray argument and calls release() on destruction. + BufferArrayStreamBuf(BufferArray * array); + virtual ~BufferArrayStreamBuf(); + +private: + BufferArrayStreamBuf(const BufferArrayStreamBuf &); // Not defined + void operator=(const BufferArrayStreamBuf &); // Not defined + +public: + // Input interfaces from std::streambuf + int_type underflow(); + int_type uflow(); + int_type pbackfail(int_type ch); + std::streamsize showmanyc(); + + // Output interfaces from std::streambuf + int_type overflow(int c); + std::streamsize xsputn(const char * src, std::streamsize count); + + // Common/misc interfaces from std::streambuf + std::streampos seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which); + +protected: + BufferArray * mBufferArray; // Ref counted + size_t mReadCurPos; + int mReadCurBlock; + const char * mReadBegin; + const char * mReadCur; + const char * mReadEnd; + size_t mWriteCurPos; + +}; // end class BufferArrayStreamBuf + + +// ===================================================== +// BufferArrayStream +// ===================================================== + +/// Adapter class that supplies streaming operators to BufferArray +/// +/// Provides a streaming adapter to an existing BufferArray +/// instance so that the convenient '<<' and '>>' conversions +/// can be applied to a BufferArray. Very convenient for LLSD +/// serialization and parsing as well. + +class BufferArrayStream : public std::iostream +{ +public: + /// Constructor increments the reference count on the + /// BufferArray argument and calls release() on destruction. + BufferArrayStream(BufferArray * ba); + ~BufferArrayStream(); + +protected: + BufferArrayStream(const BufferArrayStream &); + void operator=(const BufferArrayStream &); + +protected: + BufferArrayStreamBuf mStreamBuf; +}; // end class BufferArrayStream + + +} // end namespace LLCore + +#endif // _LLCORE_BUFFER_STREAM_H_ diff --git a/indra/llcorehttp/examples/http_texture_load.cpp b/indra/llcorehttp/examples/http_texture_load.cpp new file mode 100644 index 0000000000..40ad4f047d --- /dev/null +++ b/indra/llcorehttp/examples/http_texture_load.cpp @@ -0,0 +1,947 @@ +/** + * @file http_texture_load.cpp + * @brief Texture download example for core-http library + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include <iostream> +#include <cstdio> +#include <cstdlib> +#include <set> +#include <map> +#if !defined(WIN32) +#include <pthread.h> +#endif + +#include "linden_common.h" + +#include "httpcommon.h" +#include "httprequest.h" +#include "httphandler.h" +#include "httpresponse.h" +#include "httpheaders.h" +#include "bufferarray.h" +#include "_mutex.h" + +#include <curl/curl.h> +#include <openssl/crypto.h> + +#include "lltimer.h" + + +void init_curl(); +void term_curl(); +unsigned long ssl_thread_id_callback(void); +void ssl_locking_callback(int mode, int type, const char * file, int line); +void usage(std::ostream & out); + +// Default command line settings +static int concurrency_limit(40); +static char url_format[1024] = "http://example.com/some/path?texture_id=%s.texture"; + +#if defined(WIN32) + +#define strncpy(_a, _b, _c) strncpy_s(_a, _b, _c) +#define strtok_r(_a, _b, _c) strtok_s(_a, _b, _c) + +int getopt(int argc, char * const argv[], const char *optstring); +char *optarg(NULL); +int optind(1); + +#endif + + +// Mostly just a container for the texture IDs and fetch +// parameters.... +class WorkingSet : public LLCore::HttpHandler +{ +public: + WorkingSet(); + ~WorkingSet(); + + bool reload(LLCore::HttpRequest *); + + virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response); + + void loadTextureUuids(FILE * in); + +public: + struct Spec + { + std::string mUuid; + int mOffset; + int mLength; + }; + typedef std::set<LLCore::HttpHandle> handle_set_t; + typedef std::vector<Spec> texture_list_t; + +public: + bool mVerbose; + bool mRandomRange; + int mMaxConcurrency; + handle_set_t mHandles; + int mRemaining; + int mLimit; + int mAt; + std::string mUrl; + texture_list_t mTextures; + int mErrorsApi; + int mErrorsHttp; + int mErrorsHttp404; + int mErrorsHttp416; + int mErrorsHttp500; + int mErrorsHttp503; + int mSuccesses; + long mByteCount; + LLCore::HttpHeaders * mHeaders; +}; + + +// Gather process information while we run. Process +// size, cpu consumed, wallclock time. + +class Metrics +{ +public: + class MetricsImpl; + +public: + Metrics(); + ~Metrics(); + + void init(); + void sample(); + void term(); + +protected: + MetricsImpl * mImpl; + +public: + U64 mMaxVSZ; + U64 mMinVSZ; + U64 mStartWallTime; + U64 mEndWallTime; + U64 mStartUTime; + U64 mEndUTime; + U64 mStartSTime; + U64 mEndSTime; +}; + + +// +// +// +int main(int argc, char** argv) +{ + LLCore::HttpStatus status; + bool do_random(false); + bool do_verbose(false); + + int option(-1); + while (-1 != (option = getopt(argc, argv, "u:c:h?Rv"))) + { + switch (option) + { + case 'u': + strncpy(url_format, optarg, sizeof(url_format)); + url_format[sizeof(url_format) - 1] = '\0'; + break; + + case 'c': + { + unsigned long value; + char * end; + + value = strtoul(optarg, &end, 10); + if (value < 1 || value > 100 || *end != '\0') + { + usage(std::cerr); + return 1; + } + concurrency_limit = value; + } + break; + + case 'R': + do_random = true; + break; + + case 'v': + do_verbose = true; + break; + + case 'h': + case '?': + usage(std::cout); + return 0; + } + } + + if ((optind + 1) != argc) + { + usage(std::cerr); + return 1; + } + + FILE * uuids(fopen(argv[optind], "r")); + if (! uuids) + { + const char * errstr(strerror(errno)); + + std::cerr << "Couldn't open UUID file '" << argv[optind] << "'. Reason: " + << errstr << std::endl; + return 1; + } + + // Initialization + init_curl(); + LLCore::HttpRequest::createService(); + LLCore::HttpRequest::setPolicyClassOption(LLCore::HttpRequest::DEFAULT_POLICY_ID, + LLCore::HttpRequest::CP_CONNECTION_LIMIT, + concurrency_limit); + LLCore::HttpRequest::startThread(); + + // Get service point + LLCore::HttpRequest * hr = new LLCore::HttpRequest(); + + // Get a handler/working set + WorkingSet ws; + + // Fill the working set with work + ws.mUrl = url_format; + ws.loadTextureUuids(uuids); + ws.mRandomRange = do_random; + ws.mVerbose = do_verbose; + ws.mMaxConcurrency = 100; + + if (! ws.mTextures.size()) + { + std::cerr << "No UUIDs found in file '" << argv[optind] << "'." << std::endl; + return 1; + } + + // Setup metrics + Metrics metrics; + metrics.init(); + + // Run it + int passes(0); + while (! ws.reload(hr)) + { + hr->update(5000000); + ms_sleep(2); + if (0 == (++passes % 200)) + { + metrics.sample(); + } + } + metrics.sample(); + metrics.term(); + + // Report + std::cout << "HTTP errors: " << ws.mErrorsHttp << " API errors: " << ws.mErrorsApi + << " Successes: " << ws.mSuccesses << " Byte count: " << ws.mByteCount + << std::endl; + std::cout << "HTTP 404 errors: " << ws.mErrorsHttp404 << " HTTP 416 errors: " << ws.mErrorsHttp416 + << " HTTP 500 errors: " << ws.mErrorsHttp500 << " HTTP 503 errors: " << ws.mErrorsHttp503 + << std::endl; + std::cout << "User CPU: " << (metrics.mEndUTime - metrics.mStartUTime) + << " uS System CPU: " << (metrics.mEndSTime - metrics.mStartSTime) + << " uS Wall Time: " << (metrics.mEndWallTime - metrics.mStartWallTime) + << " uS Maximum VSZ: " << metrics.mMaxVSZ + << " Bytes Minimum VSZ: " << metrics.mMinVSZ << " Bytes" + << std::endl; + + // Clean up + hr->requestStopThread(NULL); + ms_sleep(1000); + delete hr; + LLCore::HttpRequest::destroyService(); + term_curl(); + + return 0; +} + + +void usage(std::ostream & out) +{ + out << "\n" + "usage:\thttp_texture_load [options] uuid_file\n" + "\n" + "This is a standalone program to drive the New Platform HTTP Library.\n" + "The program is supplied with a file of texture UUIDs, one per line\n" + "These are fetched sequentially using a pool of concurrent connection\n" + "until all are fetched. The default URL format is only useful from\n" + "within Linden Lab but this can be overriden with a printf-style\n" + "URL formatting string on the command line.\n" + "\n" + "Options:\n" + "\n" + " -u <url_format> printf-style format string for URL generation\n" + " Default: " << url_format << "\n" + " -R Issue GETs with random Range: headers\n" + " -c <limit> Maximum request concurrency. Range: [1..100]\n" + " Default: " << concurrency_limit << "\n" + " -v Verbose mode. Issue some chatter while running\n" + " -h print this help\n" + "\n" + << std::endl; +} + + +WorkingSet::WorkingSet() + : LLCore::HttpHandler(), + mVerbose(false), + mRandomRange(false), + mRemaining(200), + mLimit(200), + mAt(0), + mErrorsApi(0), + mErrorsHttp(0), + mErrorsHttp404(0), + mErrorsHttp416(0), + mErrorsHttp500(0), + mErrorsHttp503(0), + mSuccesses(0), + mByteCount(0L) +{ + mTextures.reserve(30000); + + mHeaders = new LLCore::HttpHeaders; + mHeaders->mHeaders.push_back("Accept: image/x-j2c"); +} + + +WorkingSet::~WorkingSet() +{ + if (mHeaders) + { + mHeaders->release(); + mHeaders = NULL; + } +} + + +bool WorkingSet::reload(LLCore::HttpRequest * hr) +{ + int to_do((std::min)(mRemaining, mMaxConcurrency - int(mHandles.size()))); + + for (int i(0); i < to_do; ++i) + { + char buffer[1024]; +#if defined(WIN32) + _snprintf_s(buffer, sizeof(buffer), sizeof(buffer) - 1, mUrl.c_str(), mTextures[mAt].mUuid.c_str()); +#else + snprintf(buffer, sizeof(buffer), mUrl.c_str(), mTextures[mAt].mUuid.c_str()); +#endif + int offset(mRandomRange ? ((unsigned long) rand()) % 1000000UL : mTextures[mAt].mOffset); + int length(mRandomRange ? ((unsigned long) rand()) % 1000000UL : mTextures[mAt].mLength); + + LLCore::HttpHandle handle; + if (offset || length) + { + handle = hr->requestGetByteRange(0, 0, buffer, offset, length, NULL, mHeaders, this); + } + else + { + handle = hr->requestGet(0, 0, buffer, NULL, mHeaders, this); + } + if (! handle) + { + // Fatal. Couldn't queue up something. + std::cerr << "Failed to queue work to HTTP Service. Reason: " + << hr->getStatus().toString() << std::endl; + exit(1); + } + else + { + mHandles.insert(handle); + } + mAt++; + mRemaining--; + + if (mVerbose) + { + static int count(0); + ++count; + if (0 == (count %5)) + std::cout << "Queued " << count << std::endl; + } + } + + // Are we done? + return (! mRemaining) && mHandles.empty(); +} + + +void WorkingSet::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response) +{ + handle_set_t::iterator it(mHandles.find(handle)); + if (mHandles.end() == it) + { + // Wha? + std::cerr << "Failed to find handle in request list. Fatal." << std::endl; + exit(1); + } + else + { + LLCore::HttpStatus status(response->getStatus()); + if (status) + { + // More success + LLCore::BufferArray * data(response->getBody()); + mByteCount += data->size(); + ++mSuccesses; + } + else + { + // Something in this library or libcurl + if (status.isHttpStatus()) + { + static const LLCore::HttpStatus hs404(404); + static const LLCore::HttpStatus hs416(416); + static const LLCore::HttpStatus hs500(500); + static const LLCore::HttpStatus hs503(503); + + ++mErrorsHttp; + if (hs404 == status) + { + ++mErrorsHttp404; + } + else if (hs416 == status) + { + ++mErrorsHttp416; + } + else if (hs500 == status) + { + ++mErrorsHttp500; + } + else if (hs503 == status) + { + ++mErrorsHttp503; + } + } + else + { + ++mErrorsApi; + } + } + mHandles.erase(it); + } + + if (mVerbose) + { + static int count(0); + ++count; + if (0 == (count %5)) + std::cout << "Handled " << count << std::endl; + } +} + + +void WorkingSet::loadTextureUuids(FILE * in) +{ + char buffer[1024]; + + while (fgets(buffer, sizeof(buffer), in)) + { + WorkingSet::Spec texture; + char * state(NULL); + char * token = strtok_r(buffer, " \t\n,", &state); + if (token && 36 == strlen(token)) + { + // Close enough for this function + texture.mUuid = token; + texture.mOffset = 0; + texture.mLength = 0; + token = strtok_r(buffer, " \t\n,", &state); + if (token) + { + int offset(atoi(token)); + token = strtok_r(buffer, " \t\n,", &state); + if (token) + { + int length(atoi(token)); + texture.mOffset = offset; + texture.mLength = length; + } + } + mTextures.push_back(texture); + } + } + mRemaining = mLimit = mTextures.size(); +} + + +int ssl_mutex_count(0); +LLCoreInt::HttpMutex ** ssl_mutex_list = NULL; + +void init_curl() +{ + curl_global_init(CURL_GLOBAL_ALL); + + ssl_mutex_count = CRYPTO_num_locks(); + if (ssl_mutex_count > 0) + { + ssl_mutex_list = new LLCoreInt::HttpMutex * [ssl_mutex_count]; + + for (int i(0); i < ssl_mutex_count; ++i) + { + ssl_mutex_list[i] = new LLCoreInt::HttpMutex; + } + + CRYPTO_set_locking_callback(ssl_locking_callback); + CRYPTO_set_id_callback(ssl_thread_id_callback); + } +} + + +void term_curl() +{ + CRYPTO_set_locking_callback(NULL); + for (int i(0); i < ssl_mutex_count; ++i) + { + delete ssl_mutex_list[i]; + } + delete [] ssl_mutex_list; +} + + +unsigned long ssl_thread_id_callback(void) +{ +#if defined(WIN32) + return (unsigned long) GetCurrentThread(); +#else + return (unsigned long) pthread_self(); +#endif +} + + +void ssl_locking_callback(int mode, int type, const char * /* file */, int /* line */) +{ + if (type >= 0 && type < ssl_mutex_count) + { + if (mode & CRYPTO_LOCK) + { + ssl_mutex_list[type]->lock(); + } + else + { + ssl_mutex_list[type]->unlock(); + } + } +} + + +#if defined(WIN32) + +// Very much a subset of posix functionality. Don't push +// it too hard... +int getopt(int argc, char * const argv[], const char *optstring) +{ + static int pos(0); + while (optind < argc) + { + if (pos == 0) + { + if (argv[optind][0] != '-') + return -1; + pos = 1; + } + if (! argv[optind][pos]) + { + ++optind; + pos = 0; + continue; + } + const char * thing(strchr(optstring, argv[optind][pos])); + if (! thing) + { + ++optind; + return -1; + } + if (thing[1] == ':') + { + optarg = argv[++optind]; + ++optind; + pos = 0; + } + else + { + optarg = NULL; + ++pos; + } + return *thing; + } + return -1; +} + +#endif + + + +#if LL_WINDOWS + +#define PSAPI_VERSION 1 +#include "windows.h" +#include "psapi.h" + +class Metrics::MetricsImpl +{ +public: + MetricsImpl() + {} + + ~MetricsImpl() + {} + + void init(Metrics * metrics) + { + HANDLE self(GetCurrentProcess()); // Does not have to be closed + FILETIME ft_dummy, ft_system, ft_user; + GetProcessTimes(self, &ft_dummy, &ft_dummy, &ft_system, &ft_user); + ULARGE_INTEGER uli; + uli.u.LowPart = ft_system.dwLowDateTime; + uli.u.HighPart = ft_system.dwHighDateTime; + metrics->mStartSTime = uli.QuadPart / U64L(10); // Convert to uS + uli.u.LowPart = ft_user.dwLowDateTime; + uli.u.HighPart = ft_user.dwHighDateTime; + metrics->mStartUTime = uli.QuadPart / U64L(10); + metrics->mStartWallTime = totalTime(); + } + + void sample(Metrics * metrics) + { + PROCESS_MEMORY_COUNTERS_EX counters; + + GetProcessMemoryInfo(GetCurrentProcess(), + (PROCESS_MEMORY_COUNTERS *) &counters, + sizeof(counters)); + // Okay, PrivateUsage isn't truly VSZ but it will be + // a good tracker for leaks and fragmentation. Work on + // a better estimator later... + SIZE_T vsz(counters.PrivateUsage); + metrics->mMaxVSZ = (std::max)(metrics->mMaxVSZ, U64(vsz)); + metrics->mMinVSZ = (std::min)(metrics->mMinVSZ, U64(vsz)); + } + + void term(Metrics * metrics) + { + HANDLE self(GetCurrentProcess()); // Does not have to be closed + FILETIME ft_dummy, ft_system, ft_user; + GetProcessTimes(self, &ft_dummy, &ft_dummy, &ft_system, &ft_user); + ULARGE_INTEGER uli; + uli.u.LowPart = ft_system.dwLowDateTime; + uli.u.HighPart = ft_system.dwHighDateTime; + metrics->mEndSTime = uli.QuadPart / U64L(10); + uli.u.LowPart = ft_user.dwLowDateTime; + uli.u.HighPart = ft_user.dwHighDateTime; + metrics->mEndUTime = uli.QuadPart / U64L(10); + metrics->mEndWallTime = totalTime(); + } + +protected: +}; + +#elif LL_DARWIN + +#include <sys/resource.h> +#include <mach/mach.h> + +class Metrics::MetricsImpl +{ +public: + MetricsImpl() + {} + + ~MetricsImpl() + {} + + void init(Metrics * metrics) + { + U64 utime, stime; + + if (getTimes(&utime, &stime)) + { + metrics->mStartSTime = stime; + metrics->mStartUTime = utime; + } + metrics->mStartWallTime = totalTime(); + sample(metrics); + } + + void sample(Metrics * metrics) + { + U64 vsz; + + if (getVM(&vsz)) + { + metrics->mMaxVSZ = (std::max)(metrics->mMaxVSZ, vsz); + metrics->mMinVSZ = (std::min)(metrics->mMinVSZ, vsz); + } + } + + void term(Metrics * metrics) + { + U64 utime, stime; + + if (getTimes(&utime, &stime)) + { + metrics->mEndSTime = stime; + metrics->mEndUTime = utime; + } + metrics->mEndWallTime = totalTime(); + } + +protected: + bool getVM(U64 * vsz) + { + task_basic_info task_info_block; + mach_msg_type_number_t task_info_count(TASK_BASIC_INFO_COUNT); + + if (KERN_SUCCESS != task_info(mach_task_self(), + TASK_BASIC_INFO, + (task_info_t) &task_info_block, + &task_info_count)) + { + return false; + } + * vsz = task_info_block.virtual_size; + return true; + } + + bool getTimes(U64 * utime, U64 * stime) + { + struct rusage usage; + + if (getrusage(RUSAGE_SELF, &usage)) + { + return false; + } + * utime = U64(usage.ru_utime.tv_sec) * U64L(1000000) + usage.ru_utime.tv_usec; + * stime = U64(usage.ru_stime.tv_sec) * U64L(1000000) + usage.ru_stime.tv_usec; + return true; + } + +}; + +#else + +class Metrics::MetricsImpl +{ +public: + MetricsImpl() + : mProcFS(NULL), + mUsecsPerTick(U64L(0)) + {} + + + ~MetricsImpl() + { + if (mProcFS) + { + fclose(mProcFS); + mProcFS = NULL; + } + } + + void init(Metrics * metrics) + { + if (! mProcFS) + { + mProcFS = fopen("/proc/self/stat", "r"); + if (! mProcFS) + { + const int errnum(errno); + LL_ERRS("Main") << "Error opening proc fs: " << strerror(errnum) << LL_ENDL; + } + } + + long ticks_per_sec(sysconf(_SC_CLK_TCK)); + mUsecsPerTick = U64L(1000000) / ticks_per_sec; + U64 usecs_per_sec(mUsecsPerTick * ticks_per_sec); + if (900000 > usecs_per_sec || 1100000 < usecs_per_sec) + { + LL_ERRS("Main") << "Resolution problems using uSecs for ticks" << LL_ENDL; + } + + U64 utime, stime; + if (scanProcFS(&utime, &stime, NULL)) + { + metrics->mStartSTime = stime; + metrics->mStartUTime = utime; + } + metrics->mStartWallTime = totalTime(); + + sample(metrics); + } + + + void sample(Metrics * metrics) + { + U64 vsz; + if (scanProcFS(NULL, NULL, &vsz)) + { + metrics->mMaxVSZ = (std::max)(metrics->mMaxVSZ, vsz); + metrics->mMinVSZ = (std::min)(metrics->mMinVSZ, vsz); + } + } + + + void term(Metrics * metrics) + { + U64 utime, stime; + if (scanProcFS(&utime, &stime, NULL)) + { + metrics->mEndSTime = stime; + metrics->mEndUTime = utime; + } + metrics->mEndWallTime = totalTime(); + + sample(metrics); + + if (mProcFS) + { + fclose(mProcFS); + mProcFS = NULL; + } + } + +protected: + bool scanProcFS(U64 * utime, U64 * stime, U64 * vsz) + { + if (mProcFS) + { + int i_dummy; + unsigned int ui_dummy; + unsigned long ul_dummy, user_ticks, sys_ticks, vsize; + long l_dummy, rss; + unsigned long long ull_dummy; + char c_dummy; + + char buffer[256]; + + static const char * format("%d %*s %c %d %d %d %d %d %u %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld %llu %lu %ld"); + + fseek(mProcFS, 0L, SEEK_SET); + size_t len = fread(buffer, 1, sizeof(buffer) - 1, mProcFS); + if (! len) + { + return false; + } + buffer[len] = '\0'; + if (23 == sscanf(buffer, format, + &i_dummy, // pid + // &s_dummy, // command name + &c_dummy, // state + &i_dummy, // ppid + &i_dummy, // pgrp + &i_dummy, // session + &i_dummy, // terminal + &i_dummy, // terminal group id + &ui_dummy, // flags + &ul_dummy, // minor faults + &ul_dummy, // minor faults in children + &ul_dummy, // major faults + &ul_dummy, // major faults in children + &user_ticks, + &sys_ticks, + &l_dummy, // cutime + &l_dummy, // cstime + &l_dummy, // process priority + &l_dummy, // nice value + &l_dummy, // thread count + &l_dummy, // time to SIGALRM + &ull_dummy, // start time + &vsize, + &rss)) + { + // Looks like we understand the line + if (utime) + { + *utime = user_ticks * mUsecsPerTick; + } + + if (stime) + { + *stime = sys_ticks * mUsecsPerTick; + } + + if (vsz) + { + *vsz = vsize; + } + return true; + } + } + return false; + } + +protected: + FILE * mProcFS; + U64 mUsecsPerTick; + +}; + + +#endif // LL_WINDOWS + +Metrics::Metrics() + : mMaxVSZ(U64(0)), + mMinVSZ(U64L(0xffffffffffffffff)), + mStartWallTime(U64(0)), + mEndWallTime(U64(0)), + mStartUTime(U64(0)), + mEndUTime(U64(0)), + mStartSTime(U64(0)), + mEndSTime(U64(0)) +{ + mImpl = new MetricsImpl(); +} + + +Metrics::~Metrics() +{ + delete mImpl; + mImpl = NULL; +} + + +void Metrics::init() +{ + mImpl->init(this); +} + + +void Metrics::sample() +{ + mImpl->sample(this); +} + + +void Metrics::term() +{ + mImpl->term(this); +} + + diff --git a/indra/llcorehttp/httpcommon.cpp b/indra/llcorehttp/httpcommon.cpp new file mode 100644 index 0000000000..f2fcbf77a3 --- /dev/null +++ b/indra/llcorehttp/httpcommon.cpp @@ -0,0 +1,179 @@ +/** + * @file httpcommon.cpp + * @brief + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "httpcommon.h" + +#include <curl/curl.h> +#include <string> +#include <sstream> + + +namespace LLCore +{ + +HttpStatus::type_enum_t EXT_CURL_EASY; +HttpStatus::type_enum_t EXT_CURL_MULTI; +HttpStatus::type_enum_t LLCORE; + +HttpStatus::operator unsigned long() const +{ + static const int shift(sizeof(unsigned long) * 4); + + unsigned long result(((unsigned long) mType) << shift | (unsigned long) (int) mStatus); + return result; +} + + +std::string HttpStatus::toHex() const +{ + std::ostringstream result; + result.width(8); + result.fill('0'); + result << std::hex << operator unsigned long(); + return result.str(); +} + + +std::string HttpStatus::toString() const +{ + static const char * llcore_errors[] = + { + "", + "HTTP error reply status", + "Services shutting down", + "Operation canceled", + "Invalid Content-Range header encountered", + "Request handle not found", + "Invalid datatype for argument or option", + "Option has not been explicitly set", + "Option is not dynamic and must be set early", + "Invalid HTTP status code received from server" + }; + static const int llcore_errors_count(sizeof(llcore_errors) / sizeof(llcore_errors[0])); + + static const struct + { + type_enum_t mCode; + const char * mText; + } + http_errors[] = + { + // Keep sorted by mCode, we binary search this list. + { 100, "Continue" }, + { 101, "Switching Protocols" }, + { 200, "OK" }, + { 201, "Created" }, + { 202, "Accepted" }, + { 203, "Non-Authoritative Information" }, + { 204, "No Content" }, + { 205, "Reset Content" }, + { 206, "Partial Content" }, + { 300, "Multiple Choices" }, + { 301, "Moved Permanently" }, + { 302, "Found" }, + { 303, "See Other" }, + { 304, "Not Modified" }, + { 305, "Use Proxy" }, + { 307, "Temporary Redirect" }, + { 400, "Bad Request" }, + { 401, "Unauthorized" }, + { 402, "Payment Required" }, + { 403, "Forbidden" }, + { 404, "Not Found" }, + { 405, "Method Not Allowed" }, + { 406, "Not Acceptable" }, + { 407, "Proxy Authentication Required" }, + { 408, "Request Time-out" }, + { 409, "Conflict" }, + { 410, "Gone" }, + { 411, "Length Required" }, + { 412, "Precondition Failed" }, + { 413, "Request Entity Too Large" }, + { 414, "Request-URI Too Large" }, + { 415, "Unsupported Media Type" }, + { 416, "Requested range not satisfiable" }, + { 417, "Expectation Failed" }, + { 500, "Internal Server Error" }, + { 501, "Not Implemented" }, + { 502, "Bad Gateway" }, + { 503, "Service Unavailable" }, + { 504, "Gateway Time-out" }, + { 505, "HTTP Version not supported" } + }; + static const int http_errors_count(sizeof(http_errors) / sizeof(http_errors[0])); + + if (*this) + { + return std::string(""); + } + switch (mType) + { + case EXT_CURL_EASY: + return std::string(curl_easy_strerror(CURLcode(mStatus))); + + case EXT_CURL_MULTI: + return std::string(curl_multi_strerror(CURLMcode(mStatus))); + + case LLCORE: + if (mStatus >= 0 && mStatus < llcore_errors_count) + { + return std::string(llcore_errors[mStatus]); + } + break; + + default: + if (isHttpStatus()) + { + // Binary search for the error code and string + int bottom(0), top(http_errors_count); + while (true) + { + int at((bottom + top) / 2); + if (mType == http_errors[at].mCode) + { + return std::string(http_errors[at].mText); + } + if (at == bottom) + { + break; + } + else if (mType < http_errors[at].mCode) + { + top = at; + } + else + { + bottom = at; + } + } + } + break; + } + return std::string("Unknown error"); +} + +} // end namespace LLCore + diff --git a/indra/llcorehttp/httpcommon.h b/indra/llcorehttp/httpcommon.h new file mode 100644 index 0000000000..c0d4ec5aad --- /dev/null +++ b/indra/llcorehttp/httpcommon.h @@ -0,0 +1,311 @@ +/** + * @file httpcommon.h + * @brief Public-facing declarations and definitions of common types + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_COMMON_H_ +#define _LLCORE_HTTP_COMMON_H_ + +/// @package LLCore::HTTP +/// +/// This library implements a high-level, Indra-code-free client interface to +/// HTTP services based on actual patterns found in the viewer and simulator. +/// Interfaces are similar to those supplied by the legacy classes +/// LLCurlRequest and LLHTTPClient. To that is added a policy scheme that +/// allows an application to specify connection behaviors: limits on +/// connections, HTTP keepalive, HTTP pipelining, retry-on-error limits, etc. +/// +/// Features of the library include: +/// - Single, private working thread where all transport and processing occurs. +/// - Support for multiple consumers running in multiple threads. +/// - Scatter/gather (a.k.a. buffer array) model for bulk data movement. +/// - Reference counting used for many object instance lifetimes. +/// - Minimal data sharing across threads for correctness and low latency. +/// +/// The public interface is declared in a few key header files: +/// - "llcorehttp/bufferarray.h" +/// - "llcorehttp/httpcommon.h" +/// - "llcorehttp/httphandler.h" +/// - "llcorehttp/httpheaders.h" +/// - "llcorehttp/httpoptions.h" +/// - "llcorehttp/httprequest.h" +/// - "llcorehttp/httpresponse.h" +/// +/// The library is still under early development and particular users +/// may need access to internal implementation details that are found +/// in the _*.h header files. But this is a crutch to be avoided if at +/// all possible and probably indicates some interface work is neeeded. +/// +/// Using the library is fairly easy. Global setup needs a few +/// steps: +/// +/// - libcurl initialization including thread-safely callbacks for SSL: +/// . curl_global_init(...) +/// . CRYPTO_set_locking_callback(...) +/// . CRYPTO_set_id_callback(...) +/// - HttpRequest::createService() called to instantiate singletons +/// and support objects. +/// +/// An HTTP consumer in an application, and an application may have many +/// consumers, does a few things: +/// +/// - Instantiate and retain an object based on HttpRequest. This +/// object becomes the portal into runtime services for the consumer. +/// - Derive or mixin the HttpHandler class if you want notification +/// when requests succeed or fail. This object's onCompleted() +/// method is invoked and an instance can be shared across +/// requests. +/// +/// Issuing a request is straightforward: +/// - Construct a suitable URL. +/// - Configure HTTP options for the request. (optional) +/// - Build a list of additional headers. (optional) +/// - Invoke one of the requestXXXX() methods (requestGetByteRange, +/// requestPost, etc.) on the HttpRequest instance supplying the +/// above along with a policy class, a priority and an optional +/// pointer to an HttpHandler instance. Work is then queued to +/// the worker thread and occurs asynchronously. +/// - Periodically invoke the update() method on the HttpRequest +/// instance which performs completion notification to HttpHandler +/// objects. +/// - Do completion processing in your onCompletion() method. +/// +/// Code fragments: +/// Rather than a poorly-maintained example in comments, look in the +/// example subdirectory which is a minimal yet functional tool to do +/// GET request performance testing. With four calls: +/// +/// init_curl(); +/// LLCore::HttpRequest::createService(); +/// LLCore::HttpRequest::startThread(); +/// LLCore::HttpRequest * hr = new LLCore::HttpRequest(); +/// +/// the program is basically ready to issue requests. +/// + + +#include "linden_common.h" // Modifies curl/curl.h interfaces + +#include <string> + + +namespace LLCore +{ + + +/// All queued requests are represented by an HttpHandle value. +/// The invalid value is returned when a request failed to queue. +/// The actual status for these failures is then fetched with +/// HttpRequest::getStatus(). +/// +/// The handle is valid only for the life of a request. On +/// return from any HttpHandler notification, the handle immediately +/// becomes invalid and may be recycled for other queued requests. + +typedef void * HttpHandle; +#define LLCORE_HTTP_HANDLE_INVALID (NULL) + +/// For internal scheduling and metrics, we use a microsecond +/// timebase compatible with the environment. +typedef U64 HttpTime; + +/// Error codes defined by the library itself as distinct from +/// libcurl (or any other transport provider). +enum HttpError +{ + // Successful value compatible with the libcurl codes. + HE_SUCCESS = 0, + + // Intended for HTTP reply codes 100-999, indicates that + // the reply should be considered an error by the application. + HE_REPLY_ERROR = 1, + + // Service is shutting down and requested operation will + // not be queued or performed. + HE_SHUTTING_DOWN = 2, + + // Operation was canceled by request. + HE_OP_CANCELED = 3, + + // Invalid content range header received. + HE_INV_CONTENT_RANGE_HDR = 4, + + // Request handle not found + HE_HANDLE_NOT_FOUND = 5, + + // Invalid datatype for option/setting + HE_INVALID_ARG = 6, + + // Option hasn't been explicitly set + HE_OPT_NOT_SET = 7, + + // Option not dynamic, must be set during init phase + HE_OPT_NOT_DYNAMIC = 8, + + // Invalid HTTP status code returned by server + HE_INVALID_HTTP_STATUS = 9 + +}; // end enum HttpError + + +/// HttpStatus encapsulates errors from libcurl (easy, multi), HTTP +/// reply status codes and internal errors as well. The encapsulation +/// isn't expected to completely isolate the caller from libcurl but +/// basic operational tests (success or failure) are provided. +/// +/// Non-HTTP status are encoded as (type, status) with type being +/// one of: EXT_CURL_EASY, EXT_CURL_MULTI or LLCORE and status +/// being the success/error code from that domain. HTTP status +/// is encoded as (status, error_flag). Status should be in the +/// range [100, 999] and error_flag is either HE_SUCCESS or +/// HE_REPLY_ERROR to indicate whether this should be treated as +/// a successful status or an error. The application is responsible +/// for making that determination and a range like [200, 299] isn't +/// automatically assumed to be definitive. +/// +/// Examples: +/// +/// 1. Construct a default, successful status code: +/// HttpStatus(); +/// +/// 2. Construct a successful, HTTP 200 status code: +/// HttpStatus(200); +/// +/// 3. Construct a failed, HTTP 404 not-found status code: +/// HttpStatus(404); +/// +/// 4. Construct a failed libcurl couldn't connect status code: +/// HttpStatus(HttpStatus::EXT_CURL_EASY, CURLE_COULDNT_CONNECT); +/// +/// 5. Construct an HTTP 301 status code to be treated as success: +/// HttpStatus(301, HE_SUCCESS); +/// + +struct HttpStatus +{ + typedef unsigned short type_enum_t; + + HttpStatus() + : mType(LLCORE), + mStatus(HE_SUCCESS) + {} + + HttpStatus(type_enum_t type, short status) + : mType(type), + mStatus(status) + {} + + HttpStatus(int http_status) + : mType(http_status), + mStatus(http_status >= 200 && http_status <= 299 + ? HE_SUCCESS + : HE_REPLY_ERROR) + { + llassert(http_status >= 100 && http_status <= 999); + } + + HttpStatus(const HttpStatus & rhs) + : mType(rhs.mType), + mStatus(rhs.mStatus) + {} + + HttpStatus & operator=(const HttpStatus & rhs) + { + // Don't care if lhs & rhs are the same object + + mType = rhs.mType; + mStatus = rhs.mStatus; + return *this; + } + + static const type_enum_t EXT_CURL_EASY = 0; + static const type_enum_t EXT_CURL_MULTI = 1; + static const type_enum_t LLCORE = 2; + + type_enum_t mType; + short mStatus; + + /// Test for successful status in the code regardless + /// of error source (internal, libcurl). + /// + /// @return 'true' when status is successful. + /// + operator bool() const + { + return 0 == mStatus; + } + + /// Inverse of previous operator. + /// + /// @return 'true' on any error condition + bool operator !() const + { + return 0 != mStatus; + } + + /// Equality and inequality tests to bypass bool conversion + /// which will do the wrong thing in conditional expressions. + bool operator==(const HttpStatus & rhs) const + { + return mType == rhs.mType && mStatus == rhs.mStatus; + } + + bool operator!=(const HttpStatus & rhs) const + { + return ! operator==(rhs); + } + + /// Convert to single numeric representation. Mainly + /// for logging or other informal purposes. Also + /// creates an ambiguous second path to integer conversion + /// which tends to find programming errors such as formatting + /// the status to a stream (operator<<). + operator unsigned long() const; + unsigned long toULong() const + { + return operator unsigned long(); + } + + /// And to convert to a hex string. + std::string toHex() const; + + /// Convert status to a string representation. For + /// success, returns an empty string. For failure + /// statuses, a string as appropriate for the source of + /// the error code (libcurl easy, libcurl multi, or + /// LLCore itself). + std::string toString() const; + + /// Returns true if the status value represents an + /// HTTP response status (100 - 999). + bool isHttpStatus() const + { + return mType >= type_enum_t(100) && mType <= type_enum_t(999); + } + +}; // end struct HttpStatus + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_COMMON_H_ diff --git a/indra/llcorehttp/httphandler.h b/indra/llcorehttp/httphandler.h new file mode 100644 index 0000000000..9171e4e7b9 --- /dev/null +++ b/indra/llcorehttp/httphandler.h @@ -0,0 +1,88 @@ +/** + * @file httphandler.h + * @brief Public-facing declarations for the HttpHandler class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_HANDLER_H_ +#define _LLCORE_HTTP_HANDLER_H_ + + +#include "httpcommon.h" + + +namespace LLCore +{ + +class HttpResponse; + + +/// HttpHandler defines an interface used by the library to +/// notify library callers of significant events, currently +/// request completion. Callers must derive or mixin this class +/// then provide an implementation of the @see onCompleted +/// method to receive such notifications. An instance may +/// be shared by any number of requests and across instances +/// of HttpRequest running in the same thread. +/// +/// Threading: HttpHandler itself is pure interface and is +/// tread-compatible. Most derivations, however, will have +/// different constraints. +/// +/// Allocation: Not refcounted, may be stack allocated though +/// that is rarely a good idea. Queued requests and replies keep +/// a naked pointer to the handler and this can result in a +/// dangling pointer if lifetimes aren't managed correctly. + +class HttpHandler +{ +public: + virtual ~HttpHandler() + {} + + /// Method invoked during calls to @see update(). Each invocation + /// represents the completion of some requested operation. Caller + /// can identify the request from the handle and interrogate the + /// response argument for success/failure, data and other information. + /// + /// @param handle Identifier of the request generating + /// the notification. + /// @param response Supplies detailed information about + /// the request including status codes + /// (both programming and HTTP), HTTP body + /// data and encodings, headers, etc. + /// The response object is refcounted and + /// the called code may retain the object + /// by invoking @see addRef() on it. The + /// library itself drops all references to + /// to object on return and never touches + /// it again. + /// + virtual void onCompleted(HttpHandle handle, HttpResponse * response) = 0; + +}; // end class HttpHandler + + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_HANDLER_H_ diff --git a/indra/llcorehttp/httpheaders.cpp b/indra/llcorehttp/httpheaders.cpp new file mode 100644 index 0000000000..2832696271 --- /dev/null +++ b/indra/llcorehttp/httpheaders.cpp @@ -0,0 +1,44 @@ +/** + * @file httpheaders.cpp + * @brief Implementation of the HTTPHeaders class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "httpheaders.h" + + +namespace LLCore +{ + + +HttpHeaders::HttpHeaders() + : RefCounted(true) +{} + + +HttpHeaders::~HttpHeaders() +{} + + +} // end namespace LLCore + diff --git a/indra/llcorehttp/httpheaders.h b/indra/llcorehttp/httpheaders.h new file mode 100644 index 0000000000..3449daa3a1 --- /dev/null +++ b/indra/llcorehttp/httpheaders.h @@ -0,0 +1,87 @@ +/** + * @file httpheaders.h + * @brief Public-facing declarations for the HttpHeaders class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_HEADERS_H_ +#define _LLCORE_HTTP_HEADERS_H_ + + +#include <string> + +#include "_refcounted.h" + + +namespace LLCore +{ + +/// +/// Maintains an ordered list of name/value pairs representing +/// HTTP header lines. This is used both to provide additional +/// headers when making HTTP requests and in responses when the +/// caller has asked that headers be returned (not the default +/// option). +/// +/// @note +/// This is a minimally-functional placeholder at the moment +/// to fill out the class hierarchy. The final class will be +/// something else, probably more pair-oriented. It's also +/// an area where shared values are desirable so refcounting is +/// already specced and a copy-on-write scheme imagined. +/// Expect changes here. +/// +/// Threading: Not intrinsically thread-safe. It *is* expected +/// that callers will build these objects and then share them +/// via reference counting with the worker thread. The implication +/// is that once an HttpHeader instance is handed to a request, +/// the object must be treated as read-only. +/// +/// Allocation: Refcounted, heap only. Caller of the +/// constructor is given a refcount. +/// + +class HttpHeaders : public LLCoreInt::RefCounted +{ +public: + /// @post In addition to the instance, caller has a refcount + /// to the instance. A call to @see release() will destroy + /// the instance. + HttpHeaders(); + +protected: + virtual ~HttpHeaders(); // Use release() + + HttpHeaders(const HttpHeaders &); // Not defined + void operator=(const HttpHeaders &); // Not defined + +public: + typedef std::vector<std::string> container_t; + container_t mHeaders; + +}; // end class HttpHeaders + +} // end namespace LLCore + + +#endif // _LLCORE_HTTP_HEADERS_H_ diff --git a/indra/llcorehttp/httpoptions.cpp b/indra/llcorehttp/httpoptions.cpp new file mode 100644 index 0000000000..1699d19f8d --- /dev/null +++ b/indra/llcorehttp/httpoptions.cpp @@ -0,0 +1,73 @@ +/** + * @file httpoptions.cpp + * @brief Implementation of the HTTPOptions class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "httpoptions.h" + +#include "_httpinternal.h" + + +namespace LLCore +{ + + +HttpOptions::HttpOptions() + : RefCounted(true), + mWantHeaders(false), + mTracing(HTTP_TRACE_OFF), + mTimeout(HTTP_REQUEST_TIMEOUT_DEFAULT), + mRetries(HTTP_RETRY_COUNT_DEFAULT) +{} + + +HttpOptions::~HttpOptions() +{} + + +void HttpOptions::setWantHeaders(bool wanted) +{ + mWantHeaders = wanted; +} + + +void HttpOptions::setTrace(long level) +{ + mTracing = int(level); +} + + +void HttpOptions::setTimeout(unsigned int timeout) +{ + mTimeout = timeout; +} + + +void HttpOptions::setRetries(unsigned int retries) +{ + mRetries = retries; +} + + +} // end namespace LLCore diff --git a/indra/llcorehttp/httpoptions.h b/indra/llcorehttp/httpoptions.h new file mode 100644 index 0000000000..97e46a8cd3 --- /dev/null +++ b/indra/llcorehttp/httpoptions.h @@ -0,0 +1,106 @@ +/** + * @file httpoptions.h + * @brief Public-facing declarations for the HTTPOptions class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_OPTIONS_H_ +#define _LLCORE_HTTP_OPTIONS_H_ + + +#include "httpcommon.h" + +#include "_refcounted.h" + + +namespace LLCore +{ + + +/// Really a struct in spirit, it provides options that +/// modify HTTP requests. +/// +/// Sharing instances across requests. It's intended that +/// these be shared across requests: caller can create one +/// of these, set it up as needed and then reference it +/// repeatedly in HTTP operations. But see the Threading +/// note about references. +/// +/// Threading: While this class does nothing to ensure thread +/// safety, it *is* intended to be shared between the application +/// thread and the worker thread. This means that once an instance +/// is delivered to the library in request operations, the +/// option data must not be written until all such requests +/// complete and relinquish their references. +/// +/// Allocation: Refcounted, heap only. Caller of the constructor +/// is given a refcount. +/// +class HttpOptions : public LLCoreInt::RefCounted +{ +public: + HttpOptions(); + +protected: + virtual ~HttpOptions(); // Use release() + + HttpOptions(const HttpOptions &); // Not defined + void operator=(const HttpOptions &); // Not defined + +public: + void setWantHeaders(bool wanted); + bool getWantHeaders() const + { + return mWantHeaders; + } + + void setTrace(int long); + int getTrace() const + { + return mTracing; + } + + void setTimeout(unsigned int timeout); + unsigned int getTimeout() const + { + return mTimeout; + } + + void setRetries(unsigned int retries); + unsigned int getRetries() const + { + return mRetries; + } + +protected: + bool mWantHeaders; + int mTracing; + unsigned int mTimeout; + unsigned int mRetries; + +}; // end class HttpOptions + + +} // end namespace HttpOptions + +#endif // _LLCORE_HTTP_OPTIONS_H_ diff --git a/indra/llcorehttp/httprequest.cpp b/indra/llcorehttp/httprequest.cpp new file mode 100644 index 0000000000..9b739a8825 --- /dev/null +++ b/indra/llcorehttp/httprequest.cpp @@ -0,0 +1,504 @@ +/** + * @file httprequest.cpp + * @brief Implementation of the HTTPRequest class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "httprequest.h" + +#include "_httprequestqueue.h" +#include "_httpreplyqueue.h" +#include "_httpservice.h" +#include "_httppolicy.h" +#include "_httpoperation.h" +#include "_httpoprequest.h" +#include "_httpopsetpriority.h" +#include "_httpopcancel.h" +#include "_httpopsetget.h" + +#include "lltimer.h" + + +namespace +{ + +bool has_inited(false); + +} + +namespace LLCore +{ + +// ==================================== +// HttpRequest Implementation +// ==================================== + + +HttpRequest::policy_t HttpRequest::sNextPolicyID(1); + + +HttpRequest::HttpRequest() + : //HttpHandler(), + mReplyQueue(NULL), + mRequestQueue(NULL) +{ + mRequestQueue = HttpRequestQueue::instanceOf(); + mRequestQueue->addRef(); + + mReplyQueue = new HttpReplyQueue(); +} + + +HttpRequest::~HttpRequest() +{ + if (mRequestQueue) + { + mRequestQueue->release(); + mRequestQueue = NULL; + } + + if (mReplyQueue) + { + mReplyQueue->release(); + mReplyQueue = NULL; + } +} + + +// ==================================== +// Policy Methods +// ==================================== + + +HttpStatus HttpRequest::setPolicyGlobalOption(EGlobalPolicy opt, long value) +{ + if (HttpService::RUNNING == HttpService::instanceOf()->getState()) + { + return HttpStatus(HttpStatus::LLCORE, HE_OPT_NOT_DYNAMIC); + } + return HttpService::instanceOf()->getGlobalOptions().set(opt, value); +} + + +HttpStatus HttpRequest::setPolicyGlobalOption(EGlobalPolicy opt, const std::string & value) +{ + if (HttpService::RUNNING == HttpService::instanceOf()->getState()) + { + return HttpStatus(HttpStatus::LLCORE, HE_OPT_NOT_DYNAMIC); + } + return HttpService::instanceOf()->getGlobalOptions().set(opt, value); +} + + +HttpRequest::policy_t HttpRequest::createPolicyClass() +{ + if (HttpService::RUNNING == HttpService::instanceOf()->getState()) + { + return 0; + } + return HttpService::instanceOf()->createPolicyClass(); +} + + +HttpStatus HttpRequest::setPolicyClassOption(policy_t policy_id, + EClassPolicy opt, + long value) +{ + if (HttpService::RUNNING == HttpService::instanceOf()->getState()) + { + return HttpStatus(HttpStatus::LLCORE, HE_OPT_NOT_DYNAMIC); + } + return HttpService::instanceOf()->getClassOptions(policy_id).set(opt, value); +} + + +// ==================================== +// Request Methods +// ==================================== + + +HttpStatus HttpRequest::getStatus() const +{ + return mLastReqStatus; +} + + +HttpHandle HttpRequest::requestGet(policy_t policy_id, + priority_t priority, + const std::string & url, + HttpOptions * options, + HttpHeaders * headers, + HttpHandler * user_handler) +{ + HttpStatus status; + HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); + + HttpOpRequest * op = new HttpOpRequest(); + if (! (status = op->setupGet(policy_id, priority, url, options, headers))) + { + op->release(); + mLastReqStatus = status; + return handle; + } + op->setReplyPath(mReplyQueue, user_handler); + if (! (status = mRequestQueue->addOp(op))) // transfers refcount + { + op->release(); + mLastReqStatus = status; + return handle; + } + + mLastReqStatus = status; + handle = static_cast<HttpHandle>(op); + + return handle; +} + + +HttpHandle HttpRequest::requestGetByteRange(policy_t policy_id, + priority_t priority, + const std::string & url, + size_t offset, + size_t len, + HttpOptions * options, + HttpHeaders * headers, + HttpHandler * user_handler) +{ + HttpStatus status; + HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); + + HttpOpRequest * op = new HttpOpRequest(); + if (! (status = op->setupGetByteRange(policy_id, priority, url, offset, len, options, headers))) + { + op->release(); + mLastReqStatus = status; + return handle; + } + op->setReplyPath(mReplyQueue, user_handler); + if (! (status = mRequestQueue->addOp(op))) // transfers refcount + { + op->release(); + mLastReqStatus = status; + return handle; + } + + mLastReqStatus = status; + handle = static_cast<HttpHandle>(op); + + return handle; +} + + +HttpHandle HttpRequest::requestPost(policy_t policy_id, + priority_t priority, + const std::string & url, + BufferArray * body, + HttpOptions * options, + HttpHeaders * headers, + HttpHandler * user_handler) +{ + HttpStatus status; + HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); + + HttpOpRequest * op = new HttpOpRequest(); + if (! (status = op->setupPost(policy_id, priority, url, body, options, headers))) + { + op->release(); + mLastReqStatus = status; + return handle; + } + op->setReplyPath(mReplyQueue, user_handler); + if (! (status = mRequestQueue->addOp(op))) // transfers refcount + { + op->release(); + mLastReqStatus = status; + return handle; + } + + mLastReqStatus = status; + handle = static_cast<HttpHandle>(op); + + return handle; +} + + +HttpHandle HttpRequest::requestPut(policy_t policy_id, + priority_t priority, + const std::string & url, + BufferArray * body, + HttpOptions * options, + HttpHeaders * headers, + HttpHandler * user_handler) +{ + HttpStatus status; + HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); + + HttpOpRequest * op = new HttpOpRequest(); + if (! (status = op->setupPut(policy_id, priority, url, body, options, headers))) + { + op->release(); + mLastReqStatus = status; + return handle; + } + op->setReplyPath(mReplyQueue, user_handler); + if (! (status = mRequestQueue->addOp(op))) // transfers refcount + { + op->release(); + mLastReqStatus = status; + return handle; + } + + mLastReqStatus = status; + handle = static_cast<HttpHandle>(op); + + return handle; +} + + +HttpHandle HttpRequest::requestNoOp(HttpHandler * user_handler) +{ + HttpStatus status; + HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); + + HttpOpNull * op = new HttpOpNull(); + op->setReplyPath(mReplyQueue, user_handler); + if (! (status = mRequestQueue->addOp(op))) // transfers refcount + { + op->release(); + mLastReqStatus = status; + return handle; + } + + mLastReqStatus = status; + handle = static_cast<HttpHandle>(op); + + return handle; +} + + +HttpStatus HttpRequest::update(long usecs) +{ + HttpOperation * op(NULL); + + if (usecs) + { + const HttpTime limit(totalTime() + HttpTime(usecs)); + while (limit >= totalTime() && (op = mReplyQueue->fetchOp())) + { + // Process operation + op->visitNotifier(this); + + // We're done with the operation + op->release(); + } + } + else + { + // Same as above, just no time limit + HttpReplyQueue::OpContainer replies; + mReplyQueue->fetchAll(replies); + if (! replies.empty()) + { + for (HttpReplyQueue::OpContainer::iterator iter(replies.begin()); + replies.end() != iter; + ++iter) + { + // Swap op pointer for NULL; + op = *iter; *iter = NULL; + + // Process operation + op->visitNotifier(this); + + // We're done with the operation + op->release(); + } + } + } + + return HttpStatus(); +} + + + + +// ==================================== +// Request Management Methods +// ==================================== + +HttpHandle HttpRequest::requestCancel(HttpHandle request, HttpHandler * user_handler) +{ + HttpStatus status; + HttpHandle ret_handle(LLCORE_HTTP_HANDLE_INVALID); + + HttpOpCancel * op = new HttpOpCancel(request); + op->setReplyPath(mReplyQueue, user_handler); + if (! (status = mRequestQueue->addOp(op))) // transfers refcount + { + op->release(); + mLastReqStatus = status; + return ret_handle; + } + + mLastReqStatus = status; + ret_handle = static_cast<HttpHandle>(op); + + return ret_handle; +} + + +HttpHandle HttpRequest::requestSetPriority(HttpHandle request, priority_t priority, + HttpHandler * handler) +{ + HttpStatus status; + HttpHandle ret_handle(LLCORE_HTTP_HANDLE_INVALID); + + HttpOpSetPriority * op = new HttpOpSetPriority(request, priority); + op->setReplyPath(mReplyQueue, handler); + if (! (status = mRequestQueue->addOp(op))) // transfers refcount + { + op->release(); + mLastReqStatus = status; + return ret_handle; + } + + mLastReqStatus = status; + ret_handle = static_cast<HttpHandle>(op); + + return ret_handle; +} + + +// ==================================== +// Utility Methods +// ==================================== + +HttpStatus HttpRequest::createService() +{ + HttpStatus status; + + if (! has_inited) + { + HttpRequestQueue::init(); + HttpRequestQueue * rq = HttpRequestQueue::instanceOf(); + HttpService::init(rq); + has_inited = true; + } + + return status; +} + + +HttpStatus HttpRequest::destroyService() +{ + HttpStatus status; + + if (has_inited) + { + HttpService::term(); + HttpRequestQueue::term(); + has_inited = false; + } + + return status; +} + + +HttpStatus HttpRequest::startThread() +{ + HttpStatus status; + + HttpService::instanceOf()->startThread(); + + return status; +} + + +HttpHandle HttpRequest::requestStopThread(HttpHandler * user_handler) +{ + HttpStatus status; + HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); + + HttpOpStop * op = new HttpOpStop(); + op->setReplyPath(mReplyQueue, user_handler); + if (! (status = mRequestQueue->addOp(op))) // transfers refcount + { + op->release(); + mLastReqStatus = status; + return handle; + } + + mLastReqStatus = status; + handle = static_cast<HttpHandle>(op); + + return handle; +} + + +HttpHandle HttpRequest::requestSpin(int mode) +{ + HttpStatus status; + HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); + + HttpOpSpin * op = new HttpOpSpin(mode); + op->setReplyPath(mReplyQueue, NULL); + if (! (status = mRequestQueue->addOp(op))) // transfers refcount + { + op->release(); + mLastReqStatus = status; + return handle; + } + + mLastReqStatus = status; + handle = static_cast<HttpHandle>(op); + + return handle; +} + +// ==================================== +// Dynamic Policy Methods +// ==================================== + +HttpHandle HttpRequest::requestSetHttpProxy(const std::string & proxy, HttpHandler * handler) +{ + HttpStatus status; + HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); + + HttpOpSetGet * op = new HttpOpSetGet(); + op->setupSet(GP_HTTP_PROXY, proxy); + op->setReplyPath(mReplyQueue, handler); + if (! (status = mRequestQueue->addOp(op))) // transfers refcount + { + op->release(); + mLastReqStatus = status; + return handle; + } + + mLastReqStatus = status; + handle = static_cast<HttpHandle>(op); + + return handle; +} + + +} // end namespace LLCore + diff --git a/indra/llcorehttp/httprequest.h b/indra/llcorehttp/httprequest.h new file mode 100644 index 0000000000..ab2f302d34 --- /dev/null +++ b/indra/llcorehttp/httprequest.h @@ -0,0 +1,535 @@ +/** + * @file httprequest.h + * @brief Public-facing declarations for HttpRequest class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_REQUEST_H_ +#define _LLCORE_HTTP_REQUEST_H_ + + +#include "httpcommon.h" +#include "httphandler.h" + + +namespace LLCore +{ + +class HttpRequestQueue; +class HttpReplyQueue; +class HttpService; +class HttpOptions; +class HttpHeaders; +class HttpOperation; +class BufferArray; + +/// HttpRequest supplies the entry into the HTTP transport +/// services in the LLCore libraries. Services provided include: +/// +/// - Some, but not all, global initialization of libcurl. +/// - Starting asynchronous, threaded HTTP requests. +/// - Definition of policy classes affect request handling. +/// - Utilities to control request options and headers +/// +/// Requests +/// +/// The class supports the current HTTP request operations: +/// +/// - requestGetByteRange: GET with Range header for a single range of bytes +/// +/// Policy Classes +/// +/// <TBD> +/// +/// Usage +/// +/// <TBD> +/// +/// Threading: An instance may only be used by one application/ +/// consumer thread. But a thread may have as many instances of +/// this as it likes. +/// +/// Allocation: Not refcounted, may be stack allocated though that +/// hasn't been tested. Queued requests can still run and any +/// queued replies will keep refcounts to the reply queue leading +/// to memory leaks. +/// +/// @pre Before using this class (static or instances), some global +/// initialization is required. See @see httpcommon.h for more information. +/// +/// @nosubgrouping +/// + +class HttpRequest +{ +public: + HttpRequest(); + virtual ~HttpRequest(); + +private: + HttpRequest(const HttpRequest &); // Disallowed + void operator=(const HttpRequest &); // Disallowed + +public: + typedef unsigned int policy_t; + typedef unsigned int priority_t; + +public: + /// @name PolicyMethods + /// @{ + + /// Represents a default, catch-all policy class that guarantees + /// eventual service for any HTTP request. + static const int DEFAULT_POLICY_ID = 0; + + enum EGlobalPolicy + { + /// Maximum number of connections the library will use to + /// perform operations. This is somewhat soft as the underlying + /// transport will cache some connections (up to 5). + + /// A long value setting the maximum number of connections + /// allowed over all policy classes. Note that this will be + /// a somewhat soft value. There may be an additional five + /// connections per policy class depending upon runtime + /// behavior. + GP_CONNECTION_LIMIT, + + /// String containing a system-appropriate directory name + /// where SSL certs are stored. + GP_CA_PATH, + + /// String giving a full path to a file containing SSL certs. + GP_CA_FILE, + + /// String of host/port to use as simple HTTP proxy. This is + /// going to change in the future into something more elaborate + /// that may support richer schemes. + GP_HTTP_PROXY, + + /// Long value that if non-zero enables the use of the + /// traditional LLProxy code for http/socks5 support. If + /// enabled, has priority over GP_HTTP_PROXY. + GP_LLPROXY, + + /// Long value setting the logging trace level for the + /// library. Possible values are: + /// 0 - No tracing (default) + /// 1 - Basic tracing of request start, stop and major events. + /// 2 - Connection, header and payload size information from + /// HTTP transactions. + /// 3 - Partial logging of payload itself. + /// + /// These values are also used in the trace modes for + /// individual requests in HttpOptions. Also be aware that + /// tracing tends to impact performance of the viewer. + GP_TRACE + }; + + /// Set a parameter on a global policy option. Calls + /// made after the start of the servicing thread are + /// not honored and return an error status. + /// + /// @param opt Enum of option to be set. + /// @param value Desired value of option. + /// @return Standard status code. + static HttpStatus setPolicyGlobalOption(EGlobalPolicy opt, long value); + static HttpStatus setPolicyGlobalOption(EGlobalPolicy opt, const std::string & value); + + /// Create a new policy class into which requests can be made. + /// + /// @return If positive, the policy_id used to reference + /// the class in other methods. If 0, an error + /// occurred and @see getStatus() may provide more + /// detail on the reason. + static policy_t createPolicyClass(); + + enum EClassPolicy + { + /// Limits the number of connections used for the class. + CP_CONNECTION_LIMIT, + + /// Limits the number of connections used for a single + /// literal address/port pair within the class. + CP_PER_HOST_CONNECTION_LIMIT, + + /// Suitable requests are allowed to pipeline on their + /// connections when they ask for it. + CP_ENABLE_PIPELINING + }; + + /// Set a parameter on a class-based policy option. Calls + /// made after the start of the servicing thread are + /// not honored and return an error status. + /// + /// @param policy_id ID of class as returned by @see createPolicyClass(). + /// @param opt Enum of option to be set. + /// @param value Desired value of option. + /// @return Standard status code. + static HttpStatus setPolicyClassOption(policy_t policy_id, EClassPolicy opt, long value); + + /// @} + + /// @name RequestMethods + /// + /// @{ + + /// Some calls expect to succeed as the normal part of operation and so + /// return a useful value rather than a status. When they do fail, the + /// status is saved and can be fetched with this method. + /// + /// @return Status of the failing method invocation. If the + /// preceding call succeeded or other HttpStatus + /// returning calls immediately preceded this method, + /// the returned value may not be reliable. + /// + HttpStatus getStatus() const; + + /// Queue a full HTTP GET request to be issued for entire entity. + /// The request is queued and serviced by the working thread and + /// notification of completion delivered to the optional HttpHandler + /// argument during @see update() calls. + /// + /// With a valid handle returned, it can be used to reference the + /// request in other requests (like cancellation) and will be an + /// argument when any HttpHandler object is invoked. + /// + /// Headers supplied by default: + /// - Connection: keep-alive + /// - Accept: */* + /// - Accept-Encoding: deflate, gzip + /// - Keep-alive: 300 + /// - Host: <stuff> + /// + /// Some headers excluded by default: + /// - Pragma: + /// - Cache-control: + /// - Range: + /// - Transfer-Encoding: + /// - Referer: + /// + /// @param policy_id Default or user-defined policy class under + /// which this request is to be serviced. + /// @param priority Standard priority scheme inherited from + /// Indra code base (U32-type scheme). + /// @param url URL with any encoded query parameters to + /// be accessed. + /// @param options Optional instance of an HttpOptions object + /// to provide additional controls over the request + /// function for this request only. Any such + /// object then becomes shared-read across threads + /// and no code should modify the HttpOptions + /// instance. + /// @param headers Optional instance of an HttpHeaders object + /// to provide additional and/or overridden + /// headers for the request. As with options, + /// the instance becomes shared-read across threads + /// and no code should modify the HttpHeaders + /// instance. + /// @param handler Optional pointer to an HttpHandler instance + /// whose onCompleted() method will be invoked + /// during calls to update(). This is a non- + /// reference-counted object which would be a + /// problem for shutdown and other edge cases but + /// the pointer is only dereferenced during + /// calls to update(). + /// + /// @return The handle of the request if successfully + /// queued or LLCORE_HTTP_HANDLE_INVALID if the + /// request could not be queued. In the latter + /// case, @see getStatus() will return more info. + /// + HttpHandle requestGet(policy_t policy_id, + priority_t priority, + const std::string & url, + HttpOptions * options, + HttpHeaders * headers, + HttpHandler * handler); + + + /// Queue a full HTTP GET request to be issued with a 'Range' header. + /// The request is queued and serviced by the working thread and + /// notification of completion delivered to the optional HttpHandler + /// argument during @see update() calls. + /// + /// With a valid handle returned, it can be used to reference the + /// request in other requests (like cancellation) and will be an + /// argument when any HttpHandler object is invoked. + /// + /// Headers supplied by default: + /// - Connection: keep-alive + /// - Accept: */* + /// - Accept-Encoding: deflate, gzip + /// - Keep-alive: 300 + /// - Host: <stuff> + /// - Range: <stuff> (will be omitted if offset == 0 and len == 0) + /// + /// Some headers excluded by default: + /// - Pragma: + /// - Cache-control: + /// - Transfer-Encoding: + /// - Referer: + /// + /// @param policy_id @see requestGet() + /// @param priority " + /// @param url " + /// @param offset Offset of first byte into resource to be returned. + /// @param len Count of bytes to be returned + /// @param options @see requestGet() + /// @param headers " + /// @param handler " + /// @return " + /// + HttpHandle requestGetByteRange(policy_t policy_id, + priority_t priority, + const std::string & url, + size_t offset, + size_t len, + HttpOptions * options, + HttpHeaders * headers, + HttpHandler * handler); + + + /// Queue a full HTTP POST. Query arguments and body may + /// be provided. Caller is responsible for escaping and + /// encoding and communicating the content types. + /// + /// Headers supplied by default: + /// - Connection: keep-alive + /// - Accept: */* + /// - Accept-Encoding: deflate, gzip + /// - Keep-Alive: 300 + /// - Host: <stuff> + /// - Content-Length: <digits> + /// - Content-Type: application/x-www-form-urlencoded + /// + /// Some headers excluded by default: + /// - Pragma: + /// - Cache-Control: + /// - Transfer-Encoding: ... chunked ... + /// - Referer: + /// - Content-Encoding: + /// - Expect: + /// + /// @param policy_id @see requestGet() + /// @param priority " + /// @param url " + /// @param body Byte stream to be sent as the body. No + /// further encoding or escaping will be done + /// to the content. + /// @param options @see requestGet()K(optional) + /// @param headers " + /// @param handler " + /// @return " + /// + HttpHandle requestPost(policy_t policy_id, + priority_t priority, + const std::string & url, + BufferArray * body, + HttpOptions * options, + HttpHeaders * headers, + HttpHandler * handler); + + + /// Queue a full HTTP PUT. Query arguments and body may + /// be provided. Caller is responsible for escaping and + /// encoding and communicating the content types. + /// + /// Headers supplied by default: + /// - Connection: keep-alive + /// - Accept: */* + /// - Accept-Encoding: deflate, gzip + /// - Keep-Alive: 300 + /// - Host: <stuff> + /// - Content-Length: <digits> + /// + /// Some headers excluded by default: + /// - Pragma: + /// - Cache-Control: + /// - Transfer-Encoding: ... chunked ... + /// - Referer: + /// - Content-Encoding: + /// - Expect: + /// - Content-Type: + /// + /// @param policy_id @see requestGet() + /// @param priority " + /// @param url " + /// @param body Byte stream to be sent as the body. No + /// further encoding or escaping will be done + /// to the content. + /// @param options @see requestGet()K(optional) + /// @param headers " + /// @param handler " + /// @return " + /// + HttpHandle requestPut(policy_t policy_id, + priority_t priority, + const std::string & url, + BufferArray * body, + HttpOptions * options, + HttpHeaders * headers, + HttpHandler * handler); + + + /// Queue a NoOp request. + /// The request is queued and serviced by the working thread which + /// immediately processes it and returns the request to the reply + /// queue. + /// + /// @param handler @see requestGet() + /// @return " + /// + HttpHandle requestNoOp(HttpHandler * handler); + + /// While all the heavy work is done by the worker thread, notifications + /// must be performed in the context of the application thread. These + /// are done synchronously during calls to this method which gives the + /// library control so notification can be performed. Application handlers + /// are expected to return 'quickly' and do any significant processing + /// outside of the notification callback to onCompleted(). + /// + /// @param usecs Maximum number of wallclock microseconds to + /// spend in the call. As hinted at above, this + /// is partly a function of application code so it's + /// a soft limit. A '0' value will run without + /// time limit until everything queued has been + /// delivered. + /// + /// @return Standard status code. + HttpStatus update(long usecs); + + /// @} + + /// @name RequestMgmtMethods + /// + /// @{ + + HttpHandle requestCancel(HttpHandle request, HttpHandler *); + + /// Request that a previously-issued request be reprioritized. + /// The status of whether the change itself succeeded arrives + /// via notification. + /// + /// @param request Handle of previously-issued request to + /// be changed. + /// @param priority New priority value. + /// @param handler @see requestGet() + /// @return " + /// + HttpHandle requestSetPriority(HttpHandle request, priority_t priority, HttpHandler * handler); + + /// @} + + /// @name UtilityMethods + /// + /// @{ + + /// Initialization method that needs to be called before queueing any + /// requests. Doesn't start the worker thread and may be called befoer + /// or after policy setup. + static HttpStatus createService(); + + /// Mostly clean shutdown of services prior to exit. Caller is expected + /// to have stopped a running worker thread before calling this. + static HttpStatus destroyService(); + + /// Called once after @see createService() to start the worker thread. + /// Stopping the thread is achieved by requesting it via @see requestStopThread(). + /// May be called before or after requests are issued. + static HttpStatus startThread(); + + /// Queues a request to the worker thread to have it stop processing + /// and exit (without exiting the program). When the operation is + /// picked up by the worker thread, it immediately processes it and + /// begins detaching from refcounted resources like request and + /// reply queues and then returns to the host OS. It *does* queue a + /// reply to give the calling application thread a notification that + /// the operation has been performed. + /// + /// @param handler (optional) + /// @return The handle of the request if successfully + /// queued or LLCORE_HTTP_HANDLE_INVALID if the + /// request could not be queued. In the latter + /// case, @see getStatus() will return more info. + /// As the request cannot be cancelled, the handle + /// is generally not useful. + /// + HttpHandle requestStopThread(HttpHandler * handler); + + /// Queue a Spin request. + /// DEBUG/TESTING ONLY. This puts the worker into a CPU spin for + /// test purposes. + /// + /// @param mode 0 for hard spin, 1 for soft spin + /// @return Standard handle return cases. + /// + HttpHandle requestSpin(int mode); + + /// @} + + /// @name DynamicPolicyMethods + /// + /// @{ + + /// Request that a running transport pick up a new proxy setting. + /// An empty string will indicate no proxy is to be used. + HttpHandle requestSetHttpProxy(const std::string & proxy, HttpHandler * handler); + + /// @} + +protected: + void generateNotification(HttpOperation * op); + +private: + /// @name InstanceData + /// + /// @{ + HttpStatus mLastReqStatus; + HttpReplyQueue * mReplyQueue; + HttpRequestQueue * mRequestQueue; + + /// @} + + // ==================================== + /// @name GlobalState + /// + /// @{ + /// + /// Must be established before any threading is allowed to + /// start. + /// + static policy_t sNextPolicyID; + + /// @} + // End Global State + // ==================================== + +}; // end class HttpRequest + + +} // end namespace LLCore + + + +#endif // _LLCORE_HTTP_REQUEST_H_ diff --git a/indra/llcorehttp/httpresponse.cpp b/indra/llcorehttp/httpresponse.cpp new file mode 100644 index 0000000000..a552e48a1b --- /dev/null +++ b/indra/llcorehttp/httpresponse.cpp @@ -0,0 +1,91 @@ +/** + * @file httpresponse.cpp + * @brief + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "httpresponse.h" +#include "bufferarray.h" +#include "httpheaders.h" + + +namespace LLCore +{ + + +HttpResponse::HttpResponse() + : LLCoreInt::RefCounted(true), + mReplyOffset(0U), + mReplyLength(0U), + mReplyFullLength(0U), + mBufferArray(NULL), + mHeaders(NULL) +{} + + +HttpResponse::~HttpResponse() +{ + setBody(NULL); + setHeaders(NULL); +} + + +void HttpResponse::setBody(BufferArray * ba) +{ + if (mBufferArray == ba) + return; + + if (mBufferArray) + { + mBufferArray->release(); + } + + if (ba) + { + ba->addRef(); + } + + mBufferArray = ba; +} + + +void HttpResponse::setHeaders(HttpHeaders * headers) +{ + if (mHeaders == headers) + return; + + if (mHeaders) + { + mHeaders->release(); + } + + if (headers) + { + headers->addRef(); + } + + mHeaders = headers; +} + + +} // end namespace LLCore diff --git a/indra/llcorehttp/httpresponse.h b/indra/llcorehttp/httpresponse.h new file mode 100644 index 0000000000..4a481db6ac --- /dev/null +++ b/indra/llcorehttp/httpresponse.h @@ -0,0 +1,161 @@ +/** + * @file httpresponse.h + * @brief Public-facing declarations for the HttpResponse class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LLCORE_HTTP_RESPONSE_H_ +#define _LLCORE_HTTP_RESPONSE_H_ + + +#include <string> + +#include "httpcommon.h" + +#include "_refcounted.h" + + +namespace LLCore +{ + +class BufferArray; +class HttpHeaders; + +/// HttpResponse is instantiated by the library and handed to +/// the caller during callbacks to the handler. It supplies +/// all the status, header and HTTP body data the caller is +/// interested in. Methods provide simple getters to return +/// individual pieces of the response. +/// +/// Typical usage will have the caller interrogate the object +/// and return from the handler callback. Instances are refcounted +/// and callers can bump the count and retain the object as needed. +/// +/// Threading: Not intrinsically thread-safe. +/// +/// Allocation: Refcounted, heap only. Caller of the constructor +/// is given a refcount. +/// +class HttpResponse : public LLCoreInt::RefCounted +{ +public: + HttpResponse(); + +protected: + virtual ~HttpResponse(); // Use release() + + HttpResponse(const HttpResponse &); // Not defined + void operator=(const HttpResponse &); // Not defined + +public: + /// Returns the final status of the requested operation. + /// + HttpStatus getStatus() const + { + return mStatus; + } + + void setStatus(const HttpStatus & status) + { + mStatus = status; + } + + /// Simple getter for the response body returned as a scatter/gather + /// buffer. If the operation doesn't produce data (such as the Null + /// or StopThread operations), this may be NULL. + /// + /// Caller can hold onto the response by incrementing the reference + /// count of the returned object. + BufferArray * getBody() const + { + return mBufferArray; + } + + /// Set the response data in the instance. Will drop the reference + /// count to any existing data and increment the count of that passed + /// in. It is legal to set the data to NULL. + void setBody(BufferArray * ba); + + /// And a getter for the headers. And as with @see getResponse(), + /// if headers aren't available because the operation doesn't produce + /// any or delivery of headers wasn't requested in the options, this + /// will be NULL. + /// + /// Caller can hold onto the headers by incrementing the reference + /// count of the returned object. + HttpHeaders * getHeaders() const + { + return mHeaders; + } + + /// Behaves like @see setResponse() but for header data. + void setHeaders(HttpHeaders * headers); + + /// If a 'Range:' header was used, these methods are involved + /// in setting and returning data about the actual response. + /// If both @offset and @length are returned as 0, we probably + /// didn't get a Content-Range header in the response. This + /// occurs with various Capabilities-based services and the + /// caller is going to have to make assumptions on receipt of + /// a 206 status. The @full value may also be zero in cases of + /// parsing problems or a wild-carded length response. + void getRange(unsigned int * offset, unsigned int * length, unsigned int * full) const + { + *offset = mReplyOffset; + *length = mReplyLength; + *full = mReplyFullLength; + } + + void setRange(unsigned int offset, unsigned int length, unsigned int full_length) + { + mReplyOffset = offset; + mReplyLength = length; + mReplyFullLength = full_length; + } + + /// + const std::string & getContentType() const + { + return mContentType; + } + + void setContentType(const std::string & con_type) + { + mContentType = con_type; + } + +protected: + // Response data here + HttpStatus mStatus; + unsigned int mReplyOffset; + unsigned int mReplyLength; + unsigned int mReplyFullLength; + BufferArray * mBufferArray; + HttpHeaders * mHeaders; + std::string mContentType; +}; + + +} // end namespace LLCore + +#endif // _LLCORE_HTTP_RESPONSE_H_ diff --git a/indra/llcorehttp/tests/llcorehttp_test.cpp b/indra/llcorehttp/tests/llcorehttp_test.cpp new file mode 100644 index 0000000000..e863ddd13f --- /dev/null +++ b/indra/llcorehttp/tests/llcorehttp_test.cpp @@ -0,0 +1,175 @@ +/** + * @file llcorehttp_test + * @brief Main test runner + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llcorehttp_test.h" + +#include <iostream> +#include <sstream> + +// These are not the right way in viewer for some reason: +// #include <tut/tut.hpp> +// #include <tut/tut_reporter.hpp> +// This works: +#include "../test/lltut.h" + +// Pull in each of the test sets +#include "test_bufferarray.hpp" +#include "test_bufferstream.hpp" +#include "test_httpstatus.hpp" +#include "test_refcounted.hpp" +#include "test_httpoperation.hpp" +#include "test_httprequest.hpp" +#include "test_httpheaders.hpp" +#include "test_httprequestqueue.hpp" + +#include "llproxy.h" + +unsigned long ssl_thread_id_callback(void); +void ssl_locking_callback(int mode, int type, const char * file, int line); + +#if 0 // lltut provides main and runner + +namespace tut +{ + test_runner_singleton runner; +} + +int main() +{ + curl_global_init(CURL_GLOBAL_ALL); + + // *FIXME: Need threaded/SSL curl setup here. + + tut::reporter reporter; + + tut::runner.get().set_callback(&reporter); + tut::runner.get().run_tests(); + return !reporter.all_ok(); + + curl_global_cleanup(); +} + +#endif // 0 + +int ssl_mutex_count(0); +LLCoreInt::HttpMutex ** ssl_mutex_list = NULL; + +void init_curl() +{ + curl_global_init(CURL_GLOBAL_ALL); + + ssl_mutex_count = CRYPTO_num_locks(); + if (ssl_mutex_count > 0) + { + ssl_mutex_list = new LLCoreInt::HttpMutex * [ssl_mutex_count]; + + for (int i(0); i < ssl_mutex_count; ++i) + { + ssl_mutex_list[i] = new LLCoreInt::HttpMutex; + } + + CRYPTO_set_locking_callback(ssl_locking_callback); + CRYPTO_set_id_callback(ssl_thread_id_callback); + } + + LLProxy::getInstance(); +} + + +void term_curl() +{ + LLProxy::cleanupClass(); + + CRYPTO_set_locking_callback(NULL); + for (int i(0); i < ssl_mutex_count; ++i) + { + delete ssl_mutex_list[i]; + } + delete [] ssl_mutex_list; +} + + +unsigned long ssl_thread_id_callback(void) +{ +#if defined(WIN32) + return (unsigned long) GetCurrentThread(); +#else + return (unsigned long) pthread_self(); +#endif +} + + +void ssl_locking_callback(int mode, int type, const char * /* file */, int /* line */) +{ + if (type >= 0 && type < ssl_mutex_count) + { + if (mode & CRYPTO_LOCK) + { + ssl_mutex_list[type]->lock(); + } + else + { + ssl_mutex_list[type]->unlock(); + } + } +} + + +std::string get_base_url() +{ + const char * env(getenv("LL_TEST_PORT")); + + if (! env) + { + std::cerr << "LL_TEST_PORT environment variable missing." << std::endl; + std::cerr << "Test expects to run in test_llcorehttp_peer.py script." << std::endl; + tut::ensure("LL_TEST_PORT set in environment", NULL != env); + } + + int port(atoi(env)); + std::ostringstream out; + out << "http://localhost:" << port << "/"; + return out.str(); +} + + +void stop_thread(LLCore::HttpRequest * req) +{ + if (req) + { + req->requestStopThread(NULL); + + int count = 0; + int limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + req->update(1000); + usleep(100000); + } + } +} + + diff --git a/indra/llcorehttp/tests/llcorehttp_test.h b/indra/llcorehttp/tests/llcorehttp_test.h new file mode 100644 index 0000000000..a9567435ce --- /dev/null +++ b/indra/llcorehttp/tests/llcorehttp_test.h @@ -0,0 +1,64 @@ +/** + * @file llcorehttp_test.h + * @brief Main test runner + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + + +#ifndef _LLCOREHTTP_TEST_H_ +#define _LLCOREHTTP_TEST_H_ + +#include "linden_common.h" // Modifies curl interfaces + +#include <curl/curl.h> +#include <openssl/crypto.h> +#include <string> + +#include "httprequest.h" + +// Initialization and cleanup for libcurl. Mainly provides +// a mutex callback for SSL and a thread ID hash for libcurl. +// If you don't use these (or equivalent) and do use libcurl, +// you'll see stalls and other anomalies when performing curl +// operations. +extern void init_curl(); +extern void term_curl(); +extern std::string get_base_url(); +extern void stop_thread(LLCore::HttpRequest * req); + +class ScopedCurlInit +{ +public: + ScopedCurlInit() + { + init_curl(); + } + + ~ScopedCurlInit() + { + term_curl(); + } +}; + + +#endif // _LLCOREHTTP_TEST_H_ diff --git a/indra/llcorehttp/tests/test_allocator.cpp b/indra/llcorehttp/tests/test_allocator.cpp new file mode 100644 index 0000000000..ea12dc58eb --- /dev/null +++ b/indra/llcorehttp/tests/test_allocator.cpp @@ -0,0 +1,184 @@ +/** + * @file test_allocator.cpp + * @brief quick and dirty allocator for tracking memory allocations + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "test_allocator.h" + +#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 +#include <libkern/OSAtomic.h> +#elif defined(_MSC_VER) +#include <Windows.h> +#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ ) > 40100 +// atomic extensions are built into GCC on posix platforms +#endif + +#include <cassert> +#include <cstdlib> +#include <cstring> +#include <vector> +#include <iostream> +#include <new> + +#include <boost/thread.hpp> + + +#if defined(WIN32) +#define THROW_BAD_ALLOC() _THROW1(std::bad_alloc) +#define THROW_NOTHING() _THROW0() +#else +#define THROW_BAD_ALLOC() throw(std::bad_alloc) +#define THROW_NOTHING() throw() +#endif + + +struct BlockHeader +{ + struct Block * next; + std::size_t size; + bool in_use; +}; + +struct Block +{ + BlockHeader hdr; + unsigned char data[1]; +}; + +#define TRACE_MSG(val) std::cout << __FUNCTION__ << "(" << val << ") [" << __FILE__ << ":" << __LINE__ << "]" << std::endl; + +static unsigned char MemBuf[ 4096 * 1024 ]; +Block * pNext = static_cast<Block *>(static_cast<void *>(MemBuf)); +volatile std::size_t MemTotal = 0; + +// cross-platform compare and swap operation +static bool CAS(void * volatile * ptr, void * expected, void * new_value) +{ +#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 + return OSAtomicCompareAndSwapPtr( expected, new_value, ptr ); +#elif defined(_MSC_VER) + return expected == InterlockedCompareExchangePointer( ptr, new_value, expected ); +#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ ) > 40100 + return __sync_bool_compare_and_swap( ptr, expected, new_value ); +#endif +} + +static void * GetMem(std::size_t size) +{ + // TRACE_MSG(size); + volatile Block * pBlock = NULL; + volatile Block * pNewNext = NULL; + + // do a lock-free update of the global next pointer + do + { + pBlock = pNext; + pNewNext = (volatile Block *)(pBlock->data + size); + + } while(! CAS((void * volatile *) &pNext, (void *) pBlock, (void *) pNewNext)); + + // if we get here, we safely carved out a block of memory in the + // memory pool... + + // initialize our block + pBlock->hdr.next = (Block *)(pBlock->data + size); + pBlock->hdr.size = size; + pBlock->hdr.in_use = true; + memset((void *) pBlock->data, 0, pBlock->hdr.size); + + // do a lock-free update of the global memory total + volatile size_t total = 0; + volatile size_t new_total = 0; + do + { + total = MemTotal; + new_total = total + size; + + } while (! CAS((void * volatile *) &MemTotal, (void *) total, (void *) new_total)); + + return (void *) pBlock->data; +} + + +static void FreeMem(void * p) +{ + // get the pointer to the block record + Block * pBlock = (Block *)((unsigned char *) p - sizeof(BlockHeader)); + + // TRACE_MSG(pBlock->hdr.size); + bool * cur_in_use = &(pBlock->hdr.in_use); + volatile bool in_use = false; + bool new_in_use = false; + do + { + in_use = pBlock->hdr.in_use; + } while (! CAS((void * volatile *) cur_in_use, (void *) in_use, (void *) new_in_use)); + + // do a lock-free update of the global memory total + volatile size_t total = 0; + volatile size_t new_total = 0; + do + { + total = MemTotal; + new_total = total - pBlock->hdr.size; + } while (! CAS((void * volatile *)&MemTotal, (void *) total, (void *) new_total)); +} + + +std::size_t GetMemTotal() +{ + return MemTotal; +} + + +void * operator new(std::size_t size) THROW_BAD_ALLOC() +{ + return GetMem( size ); +} + + +void * operator new[](std::size_t size) THROW_BAD_ALLOC() +{ + return GetMem( size ); +} + + +void operator delete(void * p) THROW_NOTHING() +{ + if (p) + { + FreeMem( p ); + } +} + + +void operator delete[](void * p) THROW_NOTHING() +{ + if (p) + { + FreeMem( p ); + } +} + + diff --git a/indra/llcorehttp/tests/test_allocator.h b/indra/llcorehttp/tests/test_allocator.h new file mode 100644 index 0000000000..3572bbc5c5 --- /dev/null +++ b/indra/llcorehttp/tests/test_allocator.h @@ -0,0 +1,47 @@ +/** + * @file test_allocator.h + * @brief quick and dirty allocator for tracking memory allocations + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef TEST_ALLOCATOR_H +#define TEST_ALLOCATOR_H + +#include <cstdlib> +#include <new> + +size_t GetMemTotal(); +#if defined(WIN32) +void * operator new(std::size_t size) _THROW1(std::bad_alloc); +void * operator new[](std::size_t size) _THROW1(std::bad_alloc); +void operator delete(void * p) _THROW0(); +void operator delete[](void * p) _THROW0(); +#else +void * operator new(std::size_t size) throw (std::bad_alloc); +void * operator new[](std::size_t size) throw (std::bad_alloc); +void operator delete(void * p) throw (); +void operator delete[](void * p) throw (); +#endif + +#endif // TEST_ALLOCATOR_H + diff --git a/indra/llcorehttp/tests/test_bufferarray.hpp b/indra/llcorehttp/tests/test_bufferarray.hpp new file mode 100644 index 0000000000..8a2a64d970 --- /dev/null +++ b/indra/llcorehttp/tests/test_bufferarray.hpp @@ -0,0 +1,432 @@ +/** + * @file test_bufferarray.hpp + * @brief unit tests for the LLCore::BufferArray class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#ifndef TEST_LLCORE_BUFFER_ARRAY_H_ +#define TEST_LLCORE_BUFFER_ARRAY_H_ + +#include "bufferarray.h" + +#include <iostream> + +#include "test_allocator.h" + + +using namespace LLCore; + + + +namespace tut +{ + +struct BufferArrayTestData +{ + // the test objects inherit from this so the member functions and variables + // can be referenced directly inside of the test functions. + size_t mMemTotal; +}; + +typedef test_group<BufferArrayTestData> BufferArrayTestGroupType; +typedef BufferArrayTestGroupType::object BufferArrayTestObjectType; +BufferArrayTestGroupType BufferArrayTestGroup("BufferArray Tests"); + +template <> template <> +void BufferArrayTestObjectType::test<1>() +{ + set_test_name("BufferArray construction"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + BufferArray * ba = new BufferArray(); + ensure("One ref on construction of BufferArray", ba->getRefCount() == 1); + ensure("Memory being used", mMemTotal < GetMemTotal()); + ensure("Nothing in BA", 0 == ba->size()); + + // Try to read + char buffer[20]; + size_t read_len(ba->read(0, buffer, sizeof(buffer))); + ensure("Read returns empty", 0 == read_len); + + // release the implicit reference, causing the object to be released + ba->release(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); +} + +template <> template <> +void BufferArrayTestObjectType::test<2>() +{ + set_test_name("BufferArray single write"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + BufferArray * ba = new BufferArray(); + + // write some data to the buffer + char str1[] = "abcdefghij"; + char buffer[256]; + + size_t len = ba->write(0, str1, strlen(str1)); + ensure("Wrote length correct", strlen(str1) == len); + ensure("Recorded size correct", strlen(str1) == ba->size()); + + // read some data back + memset(buffer, 'X', sizeof(buffer)); + len = ba->read(2, buffer, 2); + ensure("Read length correct", 2 == len); + ensure("Read content correct", 'c' == buffer[0] && 'd' == buffer[1]); + ensure("Read didn't overwrite", 'X' == buffer[2]); + + // release the implicit reference, causing the object to be released + ba->release(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); +} + + +template <> template <> +void BufferArrayTestObjectType::test<3>() +{ + set_test_name("BufferArray multiple writes"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + BufferArray * ba = new BufferArray(); + + // write some data to the buffer + char str1[] = "abcdefghij"; + size_t str1_len(strlen(str1)); + char buffer[256]; + + size_t len = ba->write(0, str1, str1_len); + ensure("Wrote length correct", str1_len == len); + ensure("Recorded size correct", str1_len == ba->size()); + + // again... + len = ba->write(str1_len, str1, strlen(str1)); + ensure("Wrote length correct", str1_len == len); + ensure("Recorded size correct", (2 * str1_len) == ba->size()); + + // read some data back + memset(buffer, 'X', sizeof(buffer)); + len = ba->read(8, buffer, 4); + ensure("Read length correct", 4 == len); + ensure("Read content correct", 'i' == buffer[0] && 'j' == buffer[1]); + ensure("Read content correct", 'a' == buffer[2] && 'b' == buffer[3]); + ensure("Read didn't overwrite", 'X' == buffer[4]); + + // Read whole thing + memset(buffer, 'X', sizeof(buffer)); + len = ba->read(0, buffer, sizeof(buffer)); + ensure("Read length correct", (2 * str1_len) == len); + ensure("Read content correct (3)", 0 == strncmp(buffer, str1, str1_len)); + ensure("Read content correct (4)", 0 == strncmp(&buffer[str1_len], str1, str1_len)); + ensure("Read didn't overwrite (5)", 'X' == buffer[2 * str1_len]); + + // release the implicit reference, causing the object to be released + ba->release(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); +} + +template <> template <> +void BufferArrayTestObjectType::test<4>() +{ + set_test_name("BufferArray overwriting"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + BufferArray * ba = new BufferArray(); + + // write some data to the buffer + char str1[] = "abcdefghij"; + size_t str1_len(strlen(str1)); + char str2[] = "ABCDEFGHIJ"; + char buffer[256]; + + size_t len = ba->write(0, str1, str1_len); + ensure("Wrote length correct", str1_len == len); + ensure("Recorded size correct", str1_len == ba->size()); + + // again... + len = ba->write(str1_len, str1, strlen(str1)); + ensure("Wrote length correct", str1_len == len); + ensure("Recorded size correct", (2 * str1_len) == ba->size()); + + // reposition and overwrite + len = ba->write(8, str2, 4); + ensure("Overwrite length correct", 4 == len); + + // Leave position and read verifying content (stale really from seek() days) + memset(buffer, 'X', sizeof(buffer)); + len = ba->read(12, buffer, 4); + ensure("Read length correct", 4 == len); + ensure("Read content correct", 'c' == buffer[0] && 'd' == buffer[1]); + ensure("Read content correct.2", 'e' == buffer[2] && 'f' == buffer[3]); + ensure("Read didn't overwrite", 'X' == buffer[4]); + + // reposition and check + len = ba->read(6, buffer, 8); + ensure("Read length correct.2", 8 == len); + ensure("Read content correct.3", 'g' == buffer[0] && 'h' == buffer[1]); + ensure("Read content correct.4", 'A' == buffer[2] && 'B' == buffer[3]); + ensure("Read content correct.5", 'C' == buffer[4] && 'D' == buffer[5]); + ensure("Read content correct.6", 'c' == buffer[6] && 'd' == buffer[7]); + ensure("Read didn't overwrite.7", 'X' == buffer[8]); + + // release the implicit reference, causing the object to be released + ba->release(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); +} + +template <> template <> +void BufferArrayTestObjectType::test<5>() +{ + set_test_name("BufferArray multiple writes - sequential reads"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + BufferArray * ba = new BufferArray(); + + // write some data to the buffer + char str1[] = "abcdefghij"; + size_t str1_len(strlen(str1)); + char buffer[256]; + + size_t len = ba->write(0, str1, str1_len); + ensure("Wrote length correct", str1_len == len); + ensure("Recorded size correct", str1_len == ba->size()); + + // again... + len = ba->write(str1_len, str1, str1_len); + ensure("Wrote length correct", str1_len == len); + ensure("Recorded size correct", (2 * str1_len) == ba->size()); + + // read some data back + memset(buffer, 'X', sizeof(buffer)); + len = ba->read(8, buffer, 4); + ensure("Read length correct", 4 == len); + ensure("Read content correct", 'i' == buffer[0] && 'j' == buffer[1]); + ensure("Read content correct.2", 'a' == buffer[2] && 'b' == buffer[3]); + ensure("Read didn't overwrite", 'X' == buffer[4]); + + // Read some more without repositioning + memset(buffer, 'X', sizeof(buffer)); + len = ba->read(12, buffer, sizeof(buffer)); + ensure("Read length correct", (str1_len - 2) == len); + ensure("Read content correct.3", 0 == strncmp(buffer, str1+2, str1_len-2)); + ensure("Read didn't overwrite.2", 'X' == buffer[str1_len-1]); + + // release the implicit reference, causing the object to be released + ba->release(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); +} + +template <> template <> +void BufferArrayTestObjectType::test<6>() +{ + set_test_name("BufferArray overwrite spanning blocks and appending"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + BufferArray * ba = new BufferArray(); + + // write some data to the buffer + char str1[] = "abcdefghij"; + size_t str1_len(strlen(str1)); + char str2[] = "ABCDEFGHIJKLMNOPQRST"; + size_t str2_len(strlen(str2)); + char buffer[256]; + + size_t len = ba->write(0, str1, str1_len); + ensure("Wrote length correct", str1_len == len); + ensure("Recorded size correct", str1_len == ba->size()); + + // again... + len = ba->write(str1_len, str1, strlen(str1)); + ensure("Wrote length correct", str1_len == len); + ensure("Recorded size correct", (2 * str1_len) == ba->size()); + + // reposition and overwrite + len = ba->write(8, str2, str2_len); + ensure("Overwrite length correct", str2_len == len); + + // Leave position and read verifying content + memset(buffer, 'X', sizeof(buffer)); + len = ba->read(8 + str2_len, buffer, 0); + ensure("Read length correct", 0 == len); + ensure("Read didn't overwrite", 'X' == buffer[0]); + + // reposition and check + len = ba->read(0, buffer, sizeof(buffer)); + ensure("Read length correct.2", (str1_len + str2_len - 2) == len); + ensure("Read content correct", 0 == strncmp(buffer, str1, str1_len-2)); + ensure("Read content correct.2", 0 == strncmp(buffer+str1_len-2, str2, str2_len)); + ensure("Read didn't overwrite.2", 'X' == buffer[str1_len + str2_len - 2]); + + // release the implicit reference, causing the object to be released + ba->release(); + + // make sure we didn't leak any memory + ensure("All memory released", mMemTotal == GetMemTotal()); +} + +template <> template <> +void BufferArrayTestObjectType::test<7>() +{ + set_test_name("BufferArray overwrite spanning blocks and sequential writes"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + BufferArray * ba = new BufferArray(); + + // write some data to the buffer + char str1[] = "abcdefghij"; + size_t str1_len(strlen(str1)); + char str2[] = "ABCDEFGHIJKLMNOPQRST"; + size_t str2_len(strlen(str2)); + char buffer[256]; + + // 2x str1 + size_t len = ba->write(0, str1, str1_len); + len = ba->write(str1_len, str1, str1_len); + + // reposition and overwrite + len = ba->write(6, str2, 2); + ensure("Overwrite length correct", 2 == len); + + len = ba->write(8, str2, 2); + ensure("Overwrite length correct.2", 2 == len); + + len = ba->write(10, str2, 2); + ensure("Overwrite length correct.3", 2 == len); + + // append some data + len = ba->append(str2, str2_len); + ensure("Append length correct", str2_len == len); + + // append some more + void * out_buf(ba->appendBufferAlloc(str1_len)); + memcpy(out_buf, str1, str1_len); + + // And some final writes + len = ba->write(3 * str1_len + str2_len, str2, 2); + ensure("Write length correct.2", 2 == len); + + // Check contents + memset(buffer, 'X', sizeof(buffer)); + len = ba->read(0, buffer, sizeof(buffer)); + ensure("Final buffer length correct", (3 * str1_len + str2_len + 2) == len); + ensure("Read content correct", 0 == strncmp(buffer, str1, 6)); + ensure("Read content correct.2", 0 == strncmp(buffer + 6, str2, 2)); + ensure("Read content correct.3", 0 == strncmp(buffer + 8, str2, 2)); + ensure("Read content correct.4", 0 == strncmp(buffer + 10, str2, 2)); + ensure("Read content correct.5", 0 == strncmp(buffer + str1_len + 2, str1 + 2, str1_len - 2)); + ensure("Read content correct.6", 0 == strncmp(buffer + str1_len + str1_len, str2, str2_len)); + ensure("Read content correct.7", 0 == strncmp(buffer + str1_len + str1_len + str2_len, str1, str1_len)); + ensure("Read content correct.8", 0 == strncmp(buffer + str1_len + str1_len + str2_len + str1_len, str2, 2)); + ensure("Read didn't overwrite", 'X' == buffer[str1_len + str1_len + str2_len + str1_len + 2]); + + // release the implicit reference, causing the object to be released + ba->release(); + + // make sure we didn't leak any memory + ensure("All memory released", mMemTotal == GetMemTotal()); +} + +template <> template <> +void BufferArrayTestObjectType::test<8>() +{ + set_test_name("BufferArray zero-length appendBufferAlloc"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + BufferArray * ba = new BufferArray(); + + // write some data to the buffer + char str1[] = "abcdefghij"; + size_t str1_len(strlen(str1)); + char str2[] = "ABCDEFGHIJKLMNOPQRST"; + size_t str2_len(strlen(str2)); + char buffer[256]; + + // 2x str1 + size_t len = ba->write(0, str1, str1_len); + len = ba->write(str1_len, str1, str1_len); + + // zero-length allocate (we allow this with a valid pointer returned) + void * out_buf(ba->appendBufferAlloc(0)); + ensure("Buffer from zero-length appendBufferAlloc non-NULL", NULL != out_buf); + + // Do it again + void * out_buf2(ba->appendBufferAlloc(0)); + ensure("Buffer from zero-length appendBufferAlloc non-NULL.2", NULL != out_buf2); + ensure("Two zero-length appendBufferAlloc buffers distinct", out_buf != out_buf2); + + // And some final writes + len = ba->write(2 * str1_len, str2, str2_len); + + // Check contents + memset(buffer, 'X', sizeof(buffer)); + len = ba->read(0, buffer, sizeof(buffer)); + ensure("Final buffer length correct", (2 * str1_len + str2_len) == len); + ensure("Read content correct.1", 0 == strncmp(buffer, str1, str1_len)); + ensure("Read content correct.2", 0 == strncmp(buffer + str1_len, str1, str1_len)); + ensure("Read content correct.3", 0 == strncmp(buffer + str1_len + str1_len, str2, str2_len)); + ensure("Read didn't overwrite", 'X' == buffer[str1_len + str1_len + str2_len]); + + // release the implicit reference, causing the object to be released + ba->release(); + + // make sure we didn't leak any memory + ensure("All memory released", mMemTotal == GetMemTotal()); +} + +} // end namespace tut + + +#endif // TEST_LLCORE_BUFFER_ARRAY_H_ diff --git a/indra/llcorehttp/tests/test_bufferstream.hpp b/indra/llcorehttp/tests/test_bufferstream.hpp new file mode 100644 index 0000000000..831c901b9d --- /dev/null +++ b/indra/llcorehttp/tests/test_bufferstream.hpp @@ -0,0 +1,304 @@ +/** + * @file test_bufferstream.hpp + * @brief unit tests for the LLCore::BufferArrayStreamBuf/BufferArrayStream classes + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#ifndef TEST_LLCORE_BUFFER_STREAM_H_ +#define TEST_LLCORE_BUFFER_STREAM_H_ + +#include "bufferstream.h" + +#include <iostream> + +#include "test_allocator.h" +#include "llsd.h" +#include "llsdserialize.h" + + +using namespace LLCore; + + +namespace tut +{ + +struct BufferStreamTestData +{ + // the test objects inherit from this so the member functions and variables + // can be referenced directly inside of the test functions. + size_t mMemTotal; +}; + +typedef test_group<BufferStreamTestData> BufferStreamTestGroupType; +typedef BufferStreamTestGroupType::object BufferStreamTestObjectType; +BufferStreamTestGroupType BufferStreamTestGroup("BufferStream Tests"); +typedef BufferArrayStreamBuf::traits_type tst_traits_t; + + +template <> template <> +void BufferStreamTestObjectType::test<1>() +{ + set_test_name("BufferArrayStreamBuf construction with NULL BufferArray"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + BufferArrayStreamBuf * bsb = new BufferArrayStreamBuf(NULL); + ensure("Memory being used", mMemTotal < GetMemTotal()); + + // Not much will work with a NULL + ensure("underflow() on NULL fails", tst_traits_t::eof() == bsb->underflow()); + ensure("uflow() on NULL fails", tst_traits_t::eof() == bsb->uflow()); + ensure("pbackfail() on NULL fails", tst_traits_t::eof() == bsb->pbackfail('c')); + ensure("showmanyc() on NULL fails", bsb->showmanyc() == -1); + ensure("overflow() on NULL fails", tst_traits_t::eof() == bsb->overflow('c')); + ensure("xsputn() on NULL fails", bsb->xsputn("blah", 4) == 0); + ensure("seekoff() on NULL fails", bsb->seekoff(0, std::ios_base::beg, std::ios_base::in) == std::streampos(-1)); + + // release the implicit reference, causing the object to be released + delete bsb; + bsb = NULL; + + // make sure we didn't leak any memory + ensure("Allocated memory returned", mMemTotal == GetMemTotal()); +} + + +template <> template <> +void BufferStreamTestObjectType::test<2>() +{ + set_test_name("BufferArrayStream construction with NULL BufferArray"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + BufferArrayStream * bas = new BufferArrayStream(NULL); + ensure("Memory being used", mMemTotal < GetMemTotal()); + + // Not much will work with a NULL here + ensure("eof() is false on NULL", ! bas->eof()); + ensure("fail() is false on NULL", ! bas->fail()); + ensure("good() on NULL", bas->good()); + + // release the implicit reference, causing the object to be released + delete bas; + bas = NULL; + + // make sure we didn't leak any memory + ensure("Allocated memory returned", mMemTotal == GetMemTotal()); +} + + +template <> template <> +void BufferStreamTestObjectType::test<3>() +{ + set_test_name("BufferArrayStreamBuf construction with empty BufferArray"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted BufferArray with implicit reference + BufferArray * ba = new BufferArray; + BufferArrayStreamBuf * bsb = new BufferArrayStreamBuf(ba); + ensure("Memory being used", mMemTotal < GetMemTotal()); + + // I can release my ref on the BA + ba->release(); + ba = NULL; + + // release the implicit reference, causing the object to be released + delete bsb; + bsb = NULL; + + // make sure we didn't leak any memory + ensure("Allocated memory returned", mMemTotal == GetMemTotal()); +} + + +template <> template <> +void BufferStreamTestObjectType::test<4>() +{ + set_test_name("BufferArrayStream construction with empty BufferArray"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted BufferArray with implicit reference + BufferArray * ba = new BufferArray; + + { + // create a new ref counted object with an implicit reference + BufferArrayStream bas(ba); + ensure("Memory being used", mMemTotal < GetMemTotal()); + } + + // release the implicit reference, causing the object to be released + ba->release(); + ba = NULL; + + // make sure we didn't leak any memory + ensure("Allocated memory returned", mMemTotal == GetMemTotal()); +} + + +template <> template <> +void BufferStreamTestObjectType::test<5>() +{ + set_test_name("BufferArrayStreamBuf construction with real BufferArray"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted BufferArray with implicit reference + BufferArray * ba = new BufferArray; + const char * content("This is a string. A fragment."); + const size_t c_len(strlen(content)); + ba->append(content, c_len); + + // Creat an adapter for the BufferArray + BufferArrayStreamBuf * bsb = new BufferArrayStreamBuf(ba); + ensure("Memory being used", mMemTotal < GetMemTotal()); + + // I can release my ref on the BA + ba->release(); + ba = NULL; + + // Various static state + ensure("underflow() returns 'T'", bsb->underflow() == 'T'); + ensure("underflow() returns 'T' again", bsb->underflow() == 'T'); + ensure("uflow() returns 'T'", bsb->uflow() == 'T'); + ensure("uflow() returns 'h'", bsb->uflow() == 'h'); + ensure("pbackfail('i') fails", tst_traits_t::eof() == bsb->pbackfail('i')); + ensure("pbackfail('T') fails", tst_traits_t::eof() == bsb->pbackfail('T')); + ensure("pbackfail('h') succeeds", bsb->pbackfail('h') == 'h'); + ensure("showmanyc() is everything but the 'T'", bsb->showmanyc() == (c_len - 1)); + ensure("overflow() appends", bsb->overflow('c') == 'c'); + ensure("showmanyc() reflects append", bsb->showmanyc() == (c_len - 1 + 1)); + ensure("xsputn() appends some more", bsb->xsputn("bla!", 4) == 4); + ensure("showmanyc() reflects 2nd append", bsb->showmanyc() == (c_len - 1 + 5)); + ensure("seekoff() succeeds", bsb->seekoff(0, std::ios_base::beg, std::ios_base::in) == std::streampos(0)); + ensure("seekoff() succeeds 2", bsb->seekoff(4, std::ios_base::cur, std::ios_base::in) == std::streampos(4)); + ensure("showmanyc() picks up seekoff", bsb->showmanyc() == (c_len + 5 - 4)); + ensure("seekoff() succeeds 3", bsb->seekoff(0, std::ios_base::end, std::ios_base::in) == std::streampos(c_len + 4)); + ensure("pbackfail('!') succeeds", tst_traits_t::eof() == bsb->pbackfail('!')); + + // release the implicit reference, causing the object to be released + delete bsb; + bsb = NULL; + + // make sure we didn't leak any memory + ensure("Allocated memory returned", mMemTotal == GetMemTotal()); +} + + +template <> template <> +void BufferStreamTestObjectType::test<6>() +{ + set_test_name("BufferArrayStream construction with real BufferArray"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted BufferArray with implicit reference + BufferArray * ba = new BufferArray; + //const char * content("This is a string. A fragment."); + //const size_t c_len(strlen(content)); + //ba->append(content, strlen(content)); + + { + // Creat an adapter for the BufferArray + BufferArrayStream bas(ba); + ensure("Memory being used", mMemTotal < GetMemTotal()); + + // Basic operations + bas << "Hello" << 27 << "."; + ensure("BA length 8", ba->size() == 8); + + std::string str; + bas >> str; + ensure("reads correctly", str == "Hello27."); + } + + // release the implicit reference, causing the object to be released + ba->release(); + ba = NULL; + + // make sure we didn't leak any memory + // ensure("Allocated memory returned", mMemTotal == GetMemTotal()); + // static U64 mem = GetMemTotal(); +} + + +template <> template <> +void BufferStreamTestObjectType::test<7>() +{ + set_test_name("BufferArrayStream with LLSD serialization"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted BufferArray with implicit reference + BufferArray * ba = new BufferArray; + + { + // Creat an adapter for the BufferArray + BufferArrayStream bas(ba); + ensure("Memory being used", mMemTotal < GetMemTotal()); + + // LLSD + LLSD llsd = LLSD::emptyMap(); + + llsd["int"] = LLSD::Integer(3); + llsd["float"] = LLSD::Real(923289.28992); + llsd["string"] = LLSD::String("aksjdl;ajsdgfjgfal;sdgjakl;sdfjkl;ajsdfkl;ajsdfkl;jaskl;dfj"); + + LLSD llsd_map = LLSD::emptyMap(); + llsd_map["int"] = LLSD::Integer(-2889); + llsd_map["float"] = LLSD::Real(2.37829e32); + llsd_map["string"] = LLSD::String("OHIGODHSPDGHOSDHGOPSHDGP"); + + llsd["map"] = llsd_map; + + // Serialize it + LLSDSerialize::toXML(llsd, bas); + + std::string str; + bas >> str; + // std::cout << "SERIALIZED LLSD: " << str << std::endl; + ensure("Extracted string has reasonable length", str.size() > 60); + } + + // release the implicit reference, causing the object to be released + ba->release(); + ba = NULL; + + // make sure we didn't leak any memory + // ensure("Allocated memory returned", mMemTotal == GetMemTotal()); +} + + +} // end namespace tut + + +#endif // TEST_LLCORE_BUFFER_STREAM_H_ diff --git a/indra/llcorehttp/tests/test_httpheaders.hpp b/indra/llcorehttp/tests/test_httpheaders.hpp new file mode 100644 index 0000000000..ce0d19b058 --- /dev/null +++ b/indra/llcorehttp/tests/test_httpheaders.hpp @@ -0,0 +1,108 @@ +/** + * @file test_httpheaders.hpp + * @brief unit tests for the LLCore::HttpHeaders class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#ifndef TEST_LLCORE_HTTP_HEADERS_H_ +#define TEST_LLCORE_HTTP_HEADERS_H_ + +#include "httpheaders.h" + +#include <iostream> + +#include "test_allocator.h" + + +using namespace LLCoreInt; + + + +namespace tut +{ + +struct HttpHeadersTestData +{ + // the test objects inherit from this so the member functions and variables + // can be referenced directly inside of the test functions. + size_t mMemTotal; +}; + +typedef test_group<HttpHeadersTestData> HttpHeadersTestGroupType; +typedef HttpHeadersTestGroupType::object HttpHeadersTestObjectType; +HttpHeadersTestGroupType HttpHeadersTestGroup("HttpHeaders Tests"); + +template <> template <> +void HttpHeadersTestObjectType::test<1>() +{ + set_test_name("HttpHeaders construction"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + HttpHeaders * headers = new HttpHeaders(); + ensure("One ref on construction of HttpHeaders", headers->getRefCount() == 1); + ensure("Memory being used", mMemTotal < GetMemTotal()); + ensure("Nothing in headers", 0 == headers->mHeaders.size()); + + // release the implicit reference, causing the object to be released + headers->release(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); +} + +template <> template <> +void HttpHeadersTestObjectType::test<2>() +{ + set_test_name("HttpHeaders construction"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + HttpHeaders * headers = new HttpHeaders(); + + { + // Append a few strings + std::string str1("Pragma:"); + headers->mHeaders.push_back(str1); + std::string str2("Accept: application/json"); + headers->mHeaders.push_back(str2); + + ensure("Headers retained", 2 == headers->mHeaders.size()); + ensure("First is first", headers->mHeaders[0] == str1); + ensure("Second is second", headers->mHeaders[1] == str2); + } + + // release the implicit reference, causing the object to be released + headers->release(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); +} + +} // end namespace tut + + +#endif // TEST_LLCORE_HTTP_HEADERS_H_ diff --git a/indra/llcorehttp/tests/test_httpoperation.hpp b/indra/llcorehttp/tests/test_httpoperation.hpp new file mode 100644 index 0000000000..17b1a96878 --- /dev/null +++ b/indra/llcorehttp/tests/test_httpoperation.hpp @@ -0,0 +1,125 @@ +/** + * @file test_httpoperation.hpp + * @brief unit tests for the LLCore::HttpOperation-derived classes + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#ifndef TEST_LLCORE_HTTP_OPERATION_H_ +#define TEST_LLCORE_HTTP_OPERATION_H_ + +#include "_httpoperation.h" +#include "httphandler.h" + +#include <iostream> + +#include "test_allocator.h" + + +using namespace LLCoreInt; + + +namespace +{ + +class TestHandler : public LLCore::HttpHandler +{ +public: + virtual void onCompleted(HttpHandle, HttpResponse *) + { + std::cout << "TestHandler::onCompleted() invoked" << std::endl; + } + +}; + + +} // end namespace anonymous + + +namespace tut +{ + struct HttpOperationTestData + { + // the test objects inherit from this so the member functions and variables + // can be referenced directly inside of the test functions. + size_t mMemTotal; + }; + + typedef test_group<HttpOperationTestData> HttpOperationTestGroupType; + typedef HttpOperationTestGroupType::object HttpOperationTestObjectType; + HttpOperationTestGroupType HttpOperationTestGroup("HttpOperation Tests"); + + template <> template <> + void HttpOperationTestObjectType::test<1>() + { + set_test_name("HttpOpNull construction"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + HttpOpNull * op = new HttpOpNull(); + ensure(op->getRefCount() == 1); + ensure(mMemTotal < GetMemTotal()); + + // release the implicit reference, causing the object to be released + op->release(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); + } + + template <> template <> + void HttpOperationTestObjectType::test<2>() + { + set_test_name("HttpOpNull construction with handlers"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // Get some handlers + TestHandler * h1 = new TestHandler(); + + // create a new ref counted object with an implicit reference + HttpOpNull * op = new HttpOpNull(); + + // Add the handlers + op->setReplyPath(NULL, h1); + + // Check ref count + ensure(op->getRefCount() == 1); + + // release the reference, releasing the operation but + // not the handlers. + op->release(); + op = NULL; + ensure(mMemTotal != GetMemTotal()); + + // release the handlers + delete h1; + h1 = NULL; + + ensure(mMemTotal == GetMemTotal()); + } + +} + +#endif // TEST_LLCORE_HTTP_OPERATION_H_ diff --git a/indra/llcorehttp/tests/test_httprequest.hpp b/indra/llcorehttp/tests/test_httprequest.hpp new file mode 100644 index 0000000000..e5488cf941 --- /dev/null +++ b/indra/llcorehttp/tests/test_httprequest.hpp @@ -0,0 +1,2670 @@ +/** + * @file test_httprequest.hpp + * @brief unit tests for the LLCore::HttpRequest class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#ifndef TEST_LLCORE_HTTP_REQUEST_H_ +#define TEST_LLCORE_HTTP_REQUEST_H_ + +#include "httprequest.h" +#include "bufferarray.h" +#include "httphandler.h" +#include "httpheaders.h" +#include "httpresponse.h" +#include "httpoptions.h" +#include "_httpservice.h" +#include "_httprequestqueue.h" + +#include <curl/curl.h> +#include <boost/regex.hpp> +#include <sstream> + +#include "test_allocator.h" +#include "llcorehttp_test.h" + + +using namespace LLCoreInt; + + +namespace +{ + +#if defined(WIN32) + +void usleep(unsigned long usec); + +#endif + +} + +namespace tut +{ + +struct HttpRequestTestData +{ + // the test objects inherit from this so the member functions and variables + // can be referenced directly inside of the test functions. + size_t mMemTotal; + int mHandlerCalls; + HttpStatus mStatus; +}; + +class TestHandler2 : public LLCore::HttpHandler +{ +public: + TestHandler2(HttpRequestTestData * state, + const std::string & name) + : mState(state), + mName(name), + mExpectHandle(LLCORE_HTTP_HANDLE_INVALID) + {} + + virtual void onCompleted(HttpHandle handle, HttpResponse * response) + { + if (LLCORE_HTTP_HANDLE_INVALID != mExpectHandle) + { + ensure("Expected handle received in handler", mExpectHandle == handle); + } + ensure("Handler got a response", NULL != response); + if (response && mState) + { + const HttpStatus actual_status(response->getStatus()); + std::ostringstream test; + test << "Expected HttpStatus received in response. Wanted: " + << mState->mStatus.toHex() << " Received: " << actual_status.toHex(); + ensure(test.str().c_str(), actual_status == mState->mStatus); + } + if (mState) + { + mState->mHandlerCalls++; + } + if (! mHeadersRequired.empty() || ! mHeadersDisallowed.empty()) + { + ensure("Response required with header check", response != NULL); + HttpHeaders * header(response->getHeaders()); // Will not hold onto this + ensure("Some quantity of headers returned", header != NULL); + + if (! mHeadersRequired.empty()) + { + for (int i(0); i < mHeadersRequired.size(); ++i) + { + bool found = false; + for (HttpHeaders::container_t::const_iterator iter(header->mHeaders.begin()); + header->mHeaders.end() != iter; + ++iter) + { + if (boost::regex_match(*iter, mHeadersRequired[i])) + { + found = true; + break; + } + } + std::ostringstream str; + str << "Required header # " << i << " found in response"; + ensure(str.str(), found); + } + } + + if (! mHeadersDisallowed.empty()) + { + for (int i(0); i < mHeadersDisallowed.size(); ++i) + { + for (HttpHeaders::container_t::const_iterator iter(header->mHeaders.begin()); + header->mHeaders.end() != iter; + ++iter) + { + if (boost::regex_match(*iter, mHeadersDisallowed[i])) + { + std::ostringstream str; + str << "Disallowed header # " << i << " not found in response"; + ensure(str.str(), false); + } + } + } + } + } + + if (! mCheckContentType.empty()) + { + ensure("Response required with content type check", response != NULL); + std::string con_type(response->getContentType()); + ensure("Content-Type as expected (" + mCheckContentType + ")", + mCheckContentType == con_type); + } + + // std::cout << "TestHandler2::onCompleted() invoked" << std::endl; + } + + HttpRequestTestData * mState; + std::string mName; + HttpHandle mExpectHandle; + std::string mCheckContentType; + std::vector<boost::regex> mHeadersRequired; + std::vector<boost::regex> mHeadersDisallowed; +}; + +typedef test_group<HttpRequestTestData> HttpRequestTestGroupType; +typedef HttpRequestTestGroupType::object HttpRequestTestObjectType; +HttpRequestTestGroupType HttpRequestTestGroup("HttpRequest Tests"); + +template <> template <> +void HttpRequestTestObjectType::test<1>() +{ + ScopedCurlInit ready; + + set_test_name("HttpRequest construction"); + + HttpRequest * req = NULL; + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + try + { + // Get singletons created + HttpRequest::createService(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory being used", mMemTotal < GetMemTotal()); + + // release the request object + delete req; + req = NULL; + + HttpRequest::destroyService(); + + // make sure we didn't leak any memory + ensure("Memory returned", mMemTotal == GetMemTotal()); + } + catch (...) + { + delete req; + HttpRequest::destroyService(); + throw; + } +} + +template <> template <> +void HttpRequestTestObjectType::test<2>() +{ + ScopedCurlInit ready; + + set_test_name("HttpRequest and Null Op queued"); + + HttpRequest * req = NULL; + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + try + { + // Get singletons created + HttpRequest::createService(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory being used", mMemTotal < GetMemTotal()); + + // Issue a NoOp + HttpHandle handle = req->requestNoOp(NULL); + ensure("Request issued", handle != LLCORE_HTTP_HANDLE_INVALID); + + // release the request object + delete req; + req = NULL; + + // We're still holding onto the operation which is + // sitting, unserviced, on the request queue so... + ensure("Memory being used 2", mMemTotal < GetMemTotal()); + + // Request queue should have two references: global singleton & service object + ensure("Two references to request queue", 2 == HttpRequestQueue::instanceOf()->getRefCount()); + + // Okay, tear it down + HttpRequest::destroyService(); + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory returned", mMemTotal == GetMemTotal()); + } + catch (...) + { + stop_thread(req); + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +template <> template <> +void HttpRequestTestObjectType::test<3>() +{ + ScopedCurlInit ready; + + set_test_name("HttpRequest NoOp + Stop execution"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + + try + { + + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + // Issue a NoOp + HttpHandle handle = req->requestNoOp(&handler); + ensure("Valid handle returned for first request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(20); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + // Okay, request a shutdown of the servicing thread + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 100; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + + ensure("Two handler calls on the way out", 2 == mHandlerCalls); + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); + } + catch (...) + { + stop_thread(req); + delete req; + HttpRequest::destroyService(); + throw; + } +} + +template <> template <> +void HttpRequestTestObjectType::test<4>() +{ + ScopedCurlInit ready; + + set_test_name("2 HttpRequest instances, one thread"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + TestHandler2 handler1(this, "handler1"); + TestHandler2 handler2(this, "handler2"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req1 = NULL; + HttpRequest * req2 = NULL; + + try + { + + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req1 = new HttpRequest(); + req2 = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + // Issue some NoOps + HttpHandle handle = req1->requestNoOp(&handler1); + ensure("Valid handle returned for first request", handle != LLCORE_HTTP_HANDLE_INVALID); + handler1.mExpectHandle = handle; + + handle = req2->requestNoOp(&handler2); + ensure("Valid handle returned for first request", handle != LLCORE_HTTP_HANDLE_INVALID); + handler2.mExpectHandle = handle; + + // Run the notification pump. + int count(0); + int limit(20); + while (count++ < limit && mHandlerCalls < 2) + { + req1->update(1000000); + req2->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 2); + + // Okay, request a shutdown of the servicing thread + handle = req2->requestStopThread(&handler2); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + handler2.mExpectHandle = handle; + + // Run the notification pump again + count = 0; + limit = 100; + while (count++ < limit && mHandlerCalls < 3) + { + req1->update(1000000); + req2->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 3); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release the request object + delete req1; + req1 = NULL; + delete req2; + req2 = NULL; + + // Shut down service + HttpRequest::destroyService(); + + ensure("Two handler calls on the way out", 3 == mHandlerCalls); + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); + } + catch (...) + { + stop_thread(req1); + delete req1; + delete req2; + HttpRequest::destroyService(); + throw; + } +} + +template <> template <> +void HttpRequestTestObjectType::test<5>() +{ + ScopedCurlInit ready; + + set_test_name("HttpRequest Spin (soft) + NoOp + hard termination"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + + try + { + + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + // Issue a Spin + HttpHandle handle = req->requestSpin(1); + ensure("Valid handle returned for spin request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Issue a NoOp + handle = req->requestNoOp(&handler); + ensure("Valid handle returned for no-op request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("NoOp notification received", mHandlerCalls == 1); + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + + // Check memory usage + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); + // This memory test should work but could give problems as it + // relies on the worker thread picking up a friendly request + // to shutdown. Doing so, it drops references to things and + // we should go back to where we started. If it gives you + // problems, look into the code before commenting things out. + } + catch (...) + { + stop_thread(req); + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +template <> template <> +void HttpRequestTestObjectType::test<6>() +{ + ScopedCurlInit ready; + + set_test_name("HttpRequest Spin + NoOp + hard termination"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + + try + { + + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + // Issue a Spin + HttpHandle handle = req->requestSpin(0); // Hard spin + ensure("Valid handle returned for spin request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Issue a NoOp + handle = req->requestNoOp(&handler); + ensure("Valid handle returned for no-op request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("No notifications received", mHandlerCalls == 0); + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + + // Check memory usage + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + // ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); + // This memory test won't work because we're killing the thread + // hard with the hard spinner. There's no opportunity to join + // nicely so many things leak or get destroyed unilaterally. + } + catch (...) + { + stop_thread(req); + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +template <> template <> +void HttpRequestTestObjectType::test<7>() +{ + ScopedCurlInit ready; + + set_test_name("HttpRequest GET to dead port + Stop execution"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + HttpOptions * opts = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + opts = new HttpOptions(); + opts->setRetries(1); // Don't try for too long - default retries take about 18S + + // Issue a GET that can't connect + mStatus = HttpStatus(HttpStatus::EXT_CURL_EASY, CURLE_COULDNT_CONNECT); + HttpHandle handle = req->requestGetByteRange(HttpRequest::DEFAULT_POLICY_ID, + 0U, + "http://127.0.0.1:2/nothing/here", + 0, + 0, + opts, + NULL, + &handler); + ensure("Valid handle returned for ranged request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(50); // With one retry, should fail quickish + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 100; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release options + opts->release(); + opts = NULL; + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + + ensure("Two handler calls on the way out", 2 == mHandlerCalls); + +#if 0 // defined(WIN32) + // Can't do this on any platform anymore, the LL logging system holds + // on to memory and produces what looks like memory leaks... + + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); +#endif + } + catch (...) + { + stop_thread(req); + if (opts) + { + opts->release(); + opts = NULL; + } + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +template <> template <> +void HttpRequestTestObjectType::test<8>() +{ + ScopedCurlInit ready; + + std::string url_base(get_base_url()); + // std::cerr << "Base: " << url_base << std::endl; + + set_test_name("HttpRequest GET to real service"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + // Issue a GET that *can* connect + mStatus = HttpStatus(200); + HttpHandle handle = req->requestGet(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base, + NULL, + NULL, + &handler); + ensure("Valid handle returned for ranged request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + + ensure("Two handler calls on the way out", 2 == mHandlerCalls); + +#if defined(WIN32) + // Can only do this memory test on Windows. On other platforms, + // the LL logging system holds on to memory and produces what looks + // like memory leaks... + + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); +#endif + } + catch (...) + { + stop_thread(req); + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +template <> template <> +void HttpRequestTestObjectType::test<9>() +{ + ScopedCurlInit ready; + + std::string url_base(get_base_url()); + // std::cerr << "Base: " << url_base << std::endl; + + set_test_name("HttpRequest GET with Range: header to real service"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + // Issue a GET that *can* connect + mStatus = HttpStatus(200); + HttpHandle handle = req->requestGetByteRange(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base, + 0, + 0, + NULL, + NULL, + &handler); + ensure("Valid handle returned for ranged request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + + ensure("Two handler calls on the way out", 2 == mHandlerCalls); + +#if defined(WIN32) + // Can only do this memory test on Windows. On other platforms, + // the LL logging system holds on to memory and produces what looks + // like memory leaks... + + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); +#endif + } + catch (...) + { + stop_thread(req); + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +template <> template <> +void HttpRequestTestObjectType::test<10>() +{ + ScopedCurlInit ready; + + std::string url_base(get_base_url()); + // std::cerr << "Base: " << url_base << std::endl; + + set_test_name("HttpRequest PUT to real service"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + BufferArray * body = new BufferArray; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + // Issue a GET that *can* connect + static const char * body_text("Now is the time for all good men..."); + body->append(body_text, strlen(body_text)); + mStatus = HttpStatus(200); + HttpHandle handle = req->requestPut(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base, + body, + NULL, + NULL, + &handler); + ensure("Valid handle returned for ranged request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // Lose the request body + body->release(); + body = NULL; + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + + ensure("Two handler calls on the way out", 2 == mHandlerCalls); + +#if 0 // defined(WIN32) + // Can't do this on any platform anymore, the LL logging system holds + // on to memory and produces what looks like memory leaks... + + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); +#endif + } + catch (...) + { + if (body) + { + body->release(); + } + stop_thread(req); + delete req; + HttpRequest::destroyService(); + throw; + } +} + +template <> template <> +void HttpRequestTestObjectType::test<11>() +{ + ScopedCurlInit ready; + + std::string url_base(get_base_url()); + // std::cerr << "Base: " << url_base << std::endl; + + set_test_name("HttpRequest POST to real service"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + BufferArray * body = new BufferArray; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + // Issue a GET that *can* connect + static const char * body_text("Now is the time for all good men..."); + body->append(body_text, strlen(body_text)); + mStatus = HttpStatus(200); + HttpHandle handle = req->requestPost(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base, + body, + NULL, + NULL, + &handler); + ensure("Valid handle returned for ranged request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // Lose the request body + body->release(); + body = NULL; + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + + ensure("Two handler calls on the way out", 2 == mHandlerCalls); + +#if defined(WIN32) + // Can only do this memory test on Windows. On other platforms, + // the LL logging system holds on to memory and produces what looks + // like memory leaks... + + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); +#endif + } + catch (...) + { + if (body) + { + body->release(); + } + stop_thread(req); + delete req; + HttpRequest::destroyService(); + throw; + } +} + +template <> template <> +void HttpRequestTestObjectType::test<12>() +{ + ScopedCurlInit ready; + + std::string url_base(get_base_url()); + // std::cerr << "Base: " << url_base << std::endl; + + set_test_name("HttpRequest GET with some tracing"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Enable tracing + HttpRequest::setPolicyGlobalOption(LLCore::HttpRequest::GP_TRACE, 2); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + // Issue a GET that *can* connect + mStatus = HttpStatus(200); + HttpHandle handle = req->requestGetByteRange(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base, + 0, + 0, + NULL, + NULL, + &handler); + ensure("Valid handle returned for ranged request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + + ensure("Two handler calls on the way out", 2 == mHandlerCalls); + +#if 0 // defined(WIN32) + // Can't do this on any platform anymore, the LL logging system holds + // on to memory and produces what looks like memory leaks... + + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); +#endif + } + catch (...) + { + stop_thread(req); + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +template <> template <> +void HttpRequestTestObjectType::test<13>() +{ + ScopedCurlInit ready; + + // Warmup boost::regex to pre-alloc memory for memory size tests + boost::regex warmup("askldjflasdj;f", boost::regex::icase); + boost::regex_match("akl;sjflajfk;ajsk", warmup); + + std::string url_base(get_base_url()); + // std::cerr << "Base: " << url_base << std::endl; + + set_test_name("HttpRequest GET with returned headers"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + handler.mHeadersRequired.reserve(20); // Avoid memory leak test failure + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + HttpOptions * opts = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Enable tracing + HttpRequest::setPolicyGlobalOption(LLCore::HttpRequest::GP_TRACE, 2); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + opts = new HttpOptions(); + opts->setWantHeaders(true); + + // Issue a GET that succeeds + mStatus = HttpStatus(200); + handler.mHeadersRequired.push_back(boost::regex("\\W*X-LL-Special:.*", boost::regex::icase)); + HttpHandle handle = req->requestGetByteRange(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base, + 0, + 0, + opts, + NULL, + &handler); + ensure("Valid handle returned for ranged request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // release options + opts->release(); + opts = NULL; + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handler.mHeadersRequired.clear(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + + ensure("Two handler calls on the way out", 2 == mHandlerCalls); + +#if defined(WIN32) + // Can only do this memory test on Windows. On other platforms, + // the LL logging system holds on to memory and produces what looks + // like memory leaks... + + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); +#endif + } + catch (...) + { + stop_thread(req); + if (opts) + { + opts->release(); + opts = NULL; + } + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +template <> template <> +void HttpRequestTestObjectType::test<14>() +{ + ScopedCurlInit ready; + + set_test_name("HttpRequest GET timeout"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + std::string url_base(get_base_url() + "/sleep/"); // path to a 30-second sleep + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + HttpOptions * opts = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + opts = new HttpOptions(); + opts->setRetries(0); // Don't retry + opts->setTimeout(2); + + // Issue a GET that sleeps + mStatus = HttpStatus(HttpStatus::EXT_CURL_EASY, CURLE_OPERATION_TIMEDOUT); + HttpHandle handle = req->requestGetByteRange(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base, + 0, + 0, + opts, + NULL, + &handler); + ensure("Valid handle returned for ranged request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(50); // With one retry, should fail quickish + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 100; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release options + opts->release(); + opts = NULL; + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + + ensure("Two handler calls on the way out", 2 == mHandlerCalls); + +#if defined(WIN32) + // Can only do this memory test on Windows. On other platforms, + // the LL logging system holds on to memory and produces what looks + // like memory leaks... + + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); +#endif + } + catch (...) + { + stop_thread(req); + if (opts) + { + opts->release(); + opts = NULL; + } + delete req; + HttpRequest::destroyService(); + throw; + } +} + +// Test retrieval of Content-Type/Content-Encoding headers +template <> template <> +void HttpRequestTestObjectType::test<15>() +{ + ScopedCurlInit ready; + + std::string url_base(get_base_url()); + // std::cerr << "Base: " << url_base << std::endl; + + set_test_name("HttpRequest GET with Content-Type"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // Load and clear the string setting to preload std::string object + // for memory return tests. + handler.mCheckContentType = "application/llsd+xml"; + handler.mCheckContentType.clear(); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + ensure("Memory allocated on construction", mMemTotal < GetMemTotal()); + + // Issue a GET that *can* connect + mStatus = HttpStatus(200); + handler.mCheckContentType = "application/llsd+xml"; + HttpHandle handle = req->requestGet(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base, + NULL, + NULL, + &handler); + ensure("Valid handle returned for ranged request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handler.mCheckContentType.clear(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + + ensure("Two handler calls on the way out", 2 == mHandlerCalls); + +#if defined(WIN32) + // Can only do this memory test on Windows. On other platforms, + // the LL logging system holds on to memory and produces what looks + // like memory leaks... + + // printf("Old mem: %d, New mem: %d\n", mMemTotal, GetMemTotal()); + ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal()); +#endif + } + catch (...) + { + stop_thread(req); + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +// Test header generation on GET requests +template <> template <> +void HttpRequestTestObjectType::test<16>() +{ + ScopedCurlInit ready; + + // Warmup boost::regex to pre-alloc memory for memory size tests + boost::regex warmup("askldjflasdj;f", boost::regex::icase); + boost::regex_match("akl;sjflajfk;ajsk", warmup); + + std::string url_base(get_base_url()); + + set_test_name("Header generation for HttpRequest GET"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + HttpOptions * options = NULL; + HttpHeaders * headers = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + + // options set + options = new HttpOptions(); + options->setWantHeaders(true); + + // Issue a GET that *can* connect + mStatus = HttpStatus(200); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-connection:\\s*keep-alive", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept:\\s*\\*/\\*", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept-encoding:\\s*((gzip|deflate),\\s*)+(gzip|deflate)", boost::regex::icase)); // close enough + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-keep-alive:\\s*\\d+", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-host:\\s*.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-cache-control:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-pragma:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-range:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-transfer-encoding:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-referer:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-content-type:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-content-encoding:.*", boost::regex::icase)); + HttpHandle handle = req->requestGet(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base + "reflect/", + options, + NULL, + &handler); + ensure("Valid handle returned for get request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + // Do a texture-style fetch + headers = new HttpHeaders; + headers->mHeaders.push_back("Accept: image/x-j2c"); + + mStatus = HttpStatus(200); + handler.mHeadersRequired.clear(); + handler.mHeadersDisallowed.clear(); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-connection:\\s*keep-alive", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept:\\s*image/x-j2c", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept-encoding:\\s*((gzip|deflate),\\s*)+(gzip|deflate)", boost::regex::icase)); // close enough + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-keep-alive:\\s*\\d+", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-host:\\s*.*", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("\\W*X-Reflect-range:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-cache-control:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-pragma:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-transfer-encoding:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-referer:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-content-type:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-content-encoding:.*", boost::regex::icase)); + handle = req->requestGetByteRange(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base + "reflect/", + 0, + 47, + options, + headers, + &handler); + ensure("Valid handle returned for ranged request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 2); + + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handler.mHeadersRequired.clear(); + handler.mHeadersDisallowed.clear(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 3) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 3); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release options & headers + if (options) + { + options->release(); + } + options = NULL; + + if (headers) + { + headers->release(); + } + headers = NULL; + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + } + catch (...) + { + stop_thread(req); + if (options) + { + options->release(); + options = NULL; + } + if (headers) + { + headers->release(); + headers = NULL; + } + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +// Test header generation on POST requests +template <> template <> +void HttpRequestTestObjectType::test<17>() +{ + ScopedCurlInit ready; + + // Warmup boost::regex to pre-alloc memory for memory size tests + boost::regex warmup("askldjflasdj;f", boost::regex::icase); + boost::regex_match("akl;sjflajfk;ajsk", warmup); + + std::string url_base(get_base_url()); + + set_test_name("Header generation for HttpRequest POST"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + HttpOptions * options = NULL; + HttpHeaders * headers = NULL; + BufferArray * ba = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + + // options set + options = new HttpOptions(); + options->setWantHeaders(true); + + // And a buffer array + const char * msg("It was the best of times, it was the worst of times."); + ba = new BufferArray; + ba->append(msg, strlen(msg)); + + // Issue a default POST + mStatus = HttpStatus(200); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-connection:\\s*keep-alive", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept:\\s*\\*/\\*", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept-encoding:\\s*((gzip|deflate),\\s*)+(gzip|deflate)", boost::regex::icase)); // close enough + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-keep-alive:\\s*\\d+", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-host:\\s*.*", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-content-length:\\s*\\d+", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-content-type:\\s*application/x-www-form-urlencoded", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-cache-control:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-pragma:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-range:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-referer:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-content-encoding:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-expect:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-transfer-encoding:\\s*.*chunked.*", boost::regex::icase)); + HttpHandle handle = req->requestPost(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base + "reflect/", + ba, + options, + NULL, + &handler); + ensure("Valid handle returned for get request", handle != LLCORE_HTTP_HANDLE_INVALID); + ba->release(); + ba = NULL; + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handler.mHeadersRequired.clear(); + handler.mHeadersDisallowed.clear(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release options & headers + if (options) + { + options->release(); + } + options = NULL; + + if (headers) + { + headers->release(); + } + headers = NULL; + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + } + catch (...) + { + stop_thread(req); + if (ba) + { + ba->release(); + ba = NULL; + } + if (options) + { + options->release(); + options = NULL; + } + if (headers) + { + headers->release(); + headers = NULL; + } + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +// Test header generation on PUT requests +template <> template <> +void HttpRequestTestObjectType::test<18>() +{ + ScopedCurlInit ready; + + // Warmup boost::regex to pre-alloc memory for memory size tests + boost::regex warmup("askldjflasdj;f", boost::regex::icase); + boost::regex_match("akl;sjflajfk;ajsk", warmup); + + std::string url_base(get_base_url()); + + set_test_name("Header generation for HttpRequest PUT"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + HttpOptions * options = NULL; + HttpHeaders * headers = NULL; + BufferArray * ba = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + + // options set + options = new HttpOptions(); + options->setWantHeaders(true); + + // And a buffer array + const char * msg("It was the best of times, it was the worst of times."); + ba = new BufferArray; + ba->append(msg, strlen(msg)); + + // Issue a default PUT + mStatus = HttpStatus(200); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-connection:\\s*keep-alive", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept:\\s*\\*/\\*", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept-encoding:\\s*((gzip|deflate),\\s*)+(gzip|deflate)", boost::regex::icase)); // close enough + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-keep-alive:\\s*\\d+", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-host:\\s*.*", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-content-length:\\s*\\d+", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-cache-control:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-pragma:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-range:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-referer:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-content-encoding:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-expect:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-transfer-encoding:\\s*.*chunked.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("X-Reflect-content-type:.*", boost::regex::icase)); + HttpHandle handle = req->requestPut(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base + "reflect/", + ba, + options, + NULL, + &handler); + ensure("Valid handle returned for get request", handle != LLCORE_HTTP_HANDLE_INVALID); + ba->release(); + ba = NULL; + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handler.mHeadersRequired.clear(); + handler.mHeadersDisallowed.clear(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release options & headers + if (options) + { + options->release(); + } + options = NULL; + + if (headers) + { + headers->release(); + } + headers = NULL; + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + } + catch (...) + { + stop_thread(req); + if (ba) + { + ba->release(); + ba = NULL; + } + if (options) + { + options->release(); + options = NULL; + } + if (headers) + { + headers->release(); + headers = NULL; + } + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +// Test header generation on GET requests with overrides +template <> template <> +void HttpRequestTestObjectType::test<19>() +{ + ScopedCurlInit ready; + + // Warmup boost::regex to pre-alloc memory for memory size tests + boost::regex warmup("askldjflasdj;f", boost::regex::icase); + boost::regex_match("akl;sjflajfk;ajsk", warmup); + + std::string url_base(get_base_url()); + + set_test_name("Header generation for HttpRequest GET with header overrides"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + HttpOptions * options = NULL; + HttpHeaders * headers = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + + // options set + options = new HttpOptions(); + options->setWantHeaders(true); + + // headers + headers = new HttpHeaders; + headers->mHeaders.push_back("Keep-Alive: 120"); + headers->mHeaders.push_back("Accept-encoding: deflate"); + headers->mHeaders.push_back("Accept: text/plain"); + + // Issue a GET with modified headers + mStatus = HttpStatus(200); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-connection:\\s*keep-alive", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept:\\s*text/plain", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept-encoding:\\s*deflate", boost::regex::icase)); // close enough + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-keep-alive:\\s*120", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-host:\\s*.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("X-Reflect-accept-encoding:\\s*((gzip|deflate),\\s*)+(gzip|deflate)", boost::regex::icase)); // close enough + handler.mHeadersDisallowed.push_back(boost::regex("X-Reflect-keep-alive:\\s*300", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("X-Reflect-accept:\\s*\\*/\\*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-cache-control:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-pragma:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-range:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-transfer-encoding:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-referer:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-content-type:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-content-encoding:.*", boost::regex::icase)); + HttpHandle handle = req->requestGet(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base + "reflect/", + options, + headers, + &handler); + ensure("Valid handle returned for get request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handler.mHeadersRequired.clear(); + handler.mHeadersDisallowed.clear(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release options & headers + if (options) + { + options->release(); + } + options = NULL; + + if (headers) + { + headers->release(); + } + headers = NULL; + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + } + catch (...) + { + stop_thread(req); + if (options) + { + options->release(); + options = NULL; + } + if (headers) + { + headers->release(); + headers = NULL; + } + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +// Test header generation on POST requests with overrides +template <> template <> +void HttpRequestTestObjectType::test<20>() +{ + ScopedCurlInit ready; + + // Warmup boost::regex to pre-alloc memory for memory size tests + boost::regex warmup("askldjflasdj;f", boost::regex::icase); + boost::regex_match("akl;sjflajfk;ajsk", warmup); + + std::string url_base(get_base_url()); + + set_test_name("Header generation for HttpRequest POST with header overrides"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + HttpOptions * options = NULL; + HttpHeaders * headers = NULL; + BufferArray * ba = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + + // options set + options = new HttpOptions(); + options->setWantHeaders(true); + + // headers + headers = new HttpHeaders(); + headers->mHeaders.push_back("keep-Alive: 120"); + headers->mHeaders.push_back("Accept: text/html"); + headers->mHeaders.push_back("content-type: application/llsd+xml"); + headers->mHeaders.push_back("cache-control: no-store"); + + // And a buffer array + const char * msg("<xml><llsd><string>It was the best of times, it was the worst of times.</string></llsd></xml>"); + ba = new BufferArray; + ba->append(msg, strlen(msg)); + + // Issue a default POST + mStatus = HttpStatus(200); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-connection:\\s*keep-alive", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept:\\s*text/html", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept-encoding:\\s*((gzip|deflate),\\s*)+(gzip|deflate)", boost::regex::icase)); // close enough + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-keep-alive:\\s*120", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-host:\\s*.*", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-content-length:\\s*\\d+", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-content-type:\\s*application/llsd\\+xml", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("\\s*X-Reflect-cache-control:\\s*no-store", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("X-Reflect-content-type:\\s*application/x-www-form-urlencoded", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("X-Reflect-accept:\\s*\\*/\\*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("X-Reflect-keep-alive:\\s*300", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-pragma:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-range:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-referer:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-content-encoding:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-expect:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-transfer-encoding:\\s*.*chunked.*", boost::regex::icase)); + HttpHandle handle = req->requestPost(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base + "reflect/", + ba, + options, + headers, + &handler); + ensure("Valid handle returned for get request", handle != LLCORE_HTTP_HANDLE_INVALID); + ba->release(); + ba = NULL; + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handler.mHeadersRequired.clear(); + handler.mHeadersDisallowed.clear(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release options & headers + if (options) + { + options->release(); + } + options = NULL; + + if (headers) + { + headers->release(); + } + headers = NULL; + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + } + catch (...) + { + stop_thread(req); + if (ba) + { + ba->release(); + ba = NULL; + } + if (options) + { + options->release(); + options = NULL; + } + if (headers) + { + headers->release(); + headers = NULL; + } + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +// Test header generation on PUT requests with overrides +template <> template <> +void HttpRequestTestObjectType::test<21>() +{ + ScopedCurlInit ready; + + // Warmup boost::regex to pre-alloc memory for memory size tests + boost::regex warmup("askldjflasdj;f", boost::regex::icase); + boost::regex_match("akl;sjflajfk;ajsk", warmup); + + std::string url_base(get_base_url()); + + set_test_name("Header generation for HttpRequest PUT with header overrides"); + + // Handler can be stack-allocated *if* there are no dangling + // references to it after completion of this method. + // Create before memory record as the string copy will bump numbers. + TestHandler2 handler(this, "handler"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + mHandlerCalls = 0; + + HttpRequest * req = NULL; + HttpOptions * options = NULL; + HttpHeaders * headers = NULL; + BufferArray * ba = NULL; + + try + { + // Get singletons created + HttpRequest::createService(); + + // Start threading early so that thread memory is invariant + // over the test. + HttpRequest::startThread(); + + // create a new ref counted object with an implicit reference + req = new HttpRequest(); + + // options set + options = new HttpOptions(); + options->setWantHeaders(true); + + // headers + headers = new HttpHeaders; + headers->mHeaders.push_back("content-type: text/plain"); + headers->mHeaders.push_back("content-type: text/html"); + headers->mHeaders.push_back("content-type: application/llsd+xml"); + + // And a buffer array + const char * msg("<xml><llsd><string>It was the best of times, it was the worst of times.</string></llsd></xml>"); + ba = new BufferArray; + ba->append(msg, strlen(msg)); + + // Issue a default PUT + mStatus = HttpStatus(200); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-connection:\\s*keep-alive", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept:\\s*\\*/\\*", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-accept-encoding:\\s*((gzip|deflate),\\s*)+(gzip|deflate)", boost::regex::icase)); // close enough + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-keep-alive:\\s*\\d+", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-host:\\s*.*", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-content-length:\\s*\\d+", boost::regex::icase)); + handler.mHeadersRequired.push_back(boost::regex("X-Reflect-content-type:\\s*application/llsd\\+xml", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-cache-control:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-pragma:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-range:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-referer:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-content-encoding:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-expect:.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("\\s*X-Reflect-transfer-encoding:\\s*.*chunked.*", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("X-Reflect-content-type:\\s*text/plain", boost::regex::icase)); + handler.mHeadersDisallowed.push_back(boost::regex("X-Reflect-content-type:\\s*text/html", boost::regex::icase)); + HttpHandle handle = req->requestPut(HttpRequest::DEFAULT_POLICY_ID, + 0U, + url_base + "reflect/", + ba, + options, + headers, + &handler); + ensure("Valid handle returned for get request", handle != LLCORE_HTTP_HANDLE_INVALID); + ba->release(); + ba = NULL; + + // Run the notification pump. + int count(0); + int limit(10); + while (count++ < limit && mHandlerCalls < 1) + { + req->update(1000000); + usleep(100000); + } + ensure("Request executed in reasonable time", count < limit); + ensure("One handler invocation for request", mHandlerCalls == 1); + + + // Okay, request a shutdown of the servicing thread + mStatus = HttpStatus(); + handler.mHeadersRequired.clear(); + handler.mHeadersDisallowed.clear(); + handle = req->requestStopThread(&handler); + ensure("Valid handle returned for second request", handle != LLCORE_HTTP_HANDLE_INVALID); + + // Run the notification pump again + count = 0; + limit = 10; + while (count++ < limit && mHandlerCalls < 2) + { + req->update(1000000); + usleep(100000); + } + ensure("Second request executed in reasonable time", count < limit); + ensure("Second handler invocation", mHandlerCalls == 2); + + // See that we actually shutdown the thread + count = 0; + limit = 10; + while (count++ < limit && ! HttpService::isStopped()) + { + usleep(100000); + } + ensure("Thread actually stopped running", HttpService::isStopped()); + + // release options & headers + if (options) + { + options->release(); + } + options = NULL; + + if (headers) + { + headers->release(); + } + headers = NULL; + + // release the request object + delete req; + req = NULL; + + // Shut down service + HttpRequest::destroyService(); + } + catch (...) + { + stop_thread(req); + if (ba) + { + ba->release(); + ba = NULL; + } + if (options) + { + options->release(); + options = NULL; + } + if (headers) + { + headers->release(); + headers = NULL; + } + delete req; + HttpRequest::destroyService(); + throw; + } +} + + +} // end namespace tut + +namespace +{ + +#if defined(WIN32) + +void usleep(unsigned long usec) +{ + Sleep((DWORD) (usec / 1000UL)); +} + +#endif + +} + +#endif // TEST_LLCORE_HTTP_REQUEST_H_ diff --git a/indra/llcorehttp/tests/test_httprequestqueue.hpp b/indra/llcorehttp/tests/test_httprequestqueue.hpp new file mode 100644 index 0000000000..1de2d8f9ab --- /dev/null +++ b/indra/llcorehttp/tests/test_httprequestqueue.hpp @@ -0,0 +1,186 @@ +/** + * @file test_httprequestqueue.hpp + * @brief unit tests for the LLCore::HttpRequestQueue class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#ifndef TEST_LLCORE_HTTP_REQUESTQUEUE_H_ +#define TEST_LLCORE_HTTP_REQUESTQUEUE_H_ + +#include "_httprequestqueue.h" + +#include <iostream> + +#include "test_allocator.h" +#include "_httpoperation.h" + + +using namespace LLCoreInt; + + + +namespace tut +{ + +struct HttpRequestqueueTestData +{ + // the test objects inherit from this so the member functions and variables + // can be referenced directly inside of the test functions. + size_t mMemTotal; +}; + +typedef test_group<HttpRequestqueueTestData> HttpRequestqueueTestGroupType; +typedef HttpRequestqueueTestGroupType::object HttpRequestqueueTestObjectType; +HttpRequestqueueTestGroupType HttpRequestqueueTestGroup("HttpRequestqueue Tests"); + +template <> template <> +void HttpRequestqueueTestObjectType::test<1>() +{ + set_test_name("HttpRequestQueue construction"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + HttpRequestQueue::init(); + + ensure("One ref on construction of HttpRequestQueue", HttpRequestQueue::instanceOf()->getRefCount() == 1); + ensure("Memory being used", mMemTotal < GetMemTotal()); + + // release the implicit reference, causing the object to be released + HttpRequestQueue::term(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); +} + +template <> template <> +void HttpRequestqueueTestObjectType::test<2>() +{ + set_test_name("HttpRequestQueue refcount works"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + HttpRequestQueue::init(); + + HttpRequestQueue * rq = HttpRequestQueue::instanceOf(); + rq->addRef(); + + // release the singleton, hold on to the object + HttpRequestQueue::term(); + + ensure("One ref after term() called", rq->getRefCount() == 1); + ensure("Memory being used", mMemTotal < GetMemTotal()); + + // Drop ref + rq->release(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); +} + +template <> template <> +void HttpRequestqueueTestObjectType::test<3>() +{ + set_test_name("HttpRequestQueue addOp/fetchOp work"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + HttpRequestQueue::init(); + + HttpRequestQueue * rq = HttpRequestQueue::instanceOf(); + + HttpOperation * op = new HttpOpNull(); + + rq->addOp(op); // transfer my refcount + + op = rq->fetchOp(true); // Potentially hangs the test on failure + ensure("One goes in, one comes out", NULL != op); + op->release(); + + op = rq->fetchOp(false); + ensure("Better not be two of them", NULL == op); + + // release the singleton, hold on to the object + HttpRequestQueue::term(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); +} + +template <> template <> +void HttpRequestqueueTestObjectType::test<4>() +{ + set_test_name("HttpRequestQueue addOp/fetchAll work"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + HttpRequestQueue::init(); + + HttpRequestQueue * rq = HttpRequestQueue::instanceOf(); + + HttpOperation * op = new HttpOpNull(); + rq->addOp(op); // transfer my refcount + + op = new HttpOpNull(); + rq->addOp(op); // transfer my refcount + + op = new HttpOpNull(); + rq->addOp(op); // transfer my refcount + + { + HttpRequestQueue::OpContainer ops; + rq->fetchAll(true, ops); // Potentially hangs the test on failure + ensure("Three go in, three come out", 3 == ops.size()); + + op = rq->fetchOp(false); + ensure("Better not be any more of them", NULL == op); + + // release the singleton, hold on to the object + HttpRequestQueue::term(); + + // We're still holding onto the ops. + ensure(mMemTotal < GetMemTotal()); + + // Release them + while (! ops.empty()) + { + HttpOperation * op = ops.front(); + ops.erase(ops.begin()); + op->release(); + } + } + + // Should be clean + ensure("All memory returned", mMemTotal == GetMemTotal()); +} + +} // end namespace tut + + +#endif // TEST_LLCORE_HTTP_REQUESTQUEUE_H_ diff --git a/indra/llcorehttp/tests/test_httpstatus.hpp b/indra/llcorehttp/tests/test_httpstatus.hpp new file mode 100644 index 0000000000..f7b542d3b5 --- /dev/null +++ b/indra/llcorehttp/tests/test_httpstatus.hpp @@ -0,0 +1,265 @@ +/** + * @file test_llrefcounted + * @brief unit tests for HttpStatus struct + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef TEST_HTTP_STATUS_H_ +#define TEST_HTTP_STATUS_H_ + +#include "httpcommon.h" + +#include <curl/curl.h> +#include <curl/multi.h> + +using namespace LLCore; + +namespace tut +{ + +struct HttpStatusTestData +{ + HttpStatusTestData() + {} +}; + +typedef test_group<HttpStatusTestData> HttpStatusTestGroupType; +typedef HttpStatusTestGroupType::object HttpStatusTestObjectType; + +HttpStatusTestGroupType HttpStatusTestGroup("HttpStatus Tests"); + +template <> template <> +void HttpStatusTestObjectType::test<1>() +{ + set_test_name("HttpStatus construction"); + + // auto allocation fine for this + HttpStatus status; + status.mType = HttpStatus::EXT_CURL_EASY; + status.mStatus = 0; + + ensure(bool(status)); + ensure(false == !(status)); + + status.mType = HttpStatus::EXT_CURL_MULTI; + status.mStatus = 0; + + ensure(bool(status)); + ensure(false == !(status)); + + status.mType = HttpStatus::LLCORE; + status.mStatus = HE_SUCCESS; + + ensure(bool(status)); + ensure(false == !(status)); + + status.mType = HttpStatus::EXT_CURL_MULTI; + status.mStatus = -1; + + ensure(false == bool(status)); + ensure(!(status)); + + status.mType = HttpStatus::EXT_CURL_EASY; + status.mStatus = CURLE_BAD_DOWNLOAD_RESUME; + + ensure(false == bool(status)); + ensure(!(status)); +} + + +template <> template <> +void HttpStatusTestObjectType::test<2>() +{ + set_test_name("HttpStatus memory structure"); + + // Require that an HttpStatus object can be trivially + // returned as a function return value in registers. + // One should fit in an int on all platforms. + + ensure(sizeof(HttpStatus) <= sizeof(int)); +} + + +template <> template <> +void HttpStatusTestObjectType::test<3>() +{ + set_test_name("HttpStatus valid error string conversion"); + + HttpStatus status; + status.mType = HttpStatus::EXT_CURL_EASY; + status.mStatus = 0; + std::string msg = status.toString(); + // std::cout << "Result: " << msg << std::endl; + ensure(msg.empty()); + + status.mType = HttpStatus::EXT_CURL_EASY; + status.mStatus = CURLE_BAD_FUNCTION_ARGUMENT; + msg = status.toString(); + // std::cout << "Result: " << msg << std::endl; + ensure(! msg.empty()); + + status.mType = HttpStatus::EXT_CURL_MULTI; + status.mStatus = CURLM_OUT_OF_MEMORY; + msg = status.toString(); + // std::cout << "Result: " << msg << std::endl; + ensure(! msg.empty()); + + status.mType = HttpStatus::LLCORE; + status.mStatus = HE_SHUTTING_DOWN; + msg = status.toString(); + // std::cout << "Result: " << msg << std::endl; + ensure(! msg.empty()); +} + + +template <> template <> +void HttpStatusTestObjectType::test<4>() +{ + set_test_name("HttpStatus invalid error string conversion"); + + HttpStatus status; + status.mType = HttpStatus::EXT_CURL_EASY; + status.mStatus = 32726; + std::string msg = status.toString(); + // std::cout << "Result: " << msg << std::endl; + ensure(! msg.empty()); + + status.mType = HttpStatus::EXT_CURL_MULTI; + status.mStatus = -470; + msg = status.toString(); + // std::cout << "Result: " << msg << std::endl; + ensure(! msg.empty()); + + status.mType = HttpStatus::LLCORE; + status.mStatus = 923; + msg = status.toString(); + // std::cout << "Result: " << msg << std::endl; + ensure(! msg.empty()); +} + +template <> template <> +void HttpStatusTestObjectType::test<5>() +{ + set_test_name("HttpStatus equality/inequality testing"); + + // Make certain equality/inequality tests do not pass + // through the bool conversion. Distinct successful + // and error statuses should compare unequal. + + HttpStatus status1(HttpStatus::LLCORE, HE_SUCCESS); + HttpStatus status2(HttpStatus::EXT_CURL_EASY, HE_SUCCESS); + ensure(status1 != status2); + + status1.mType = HttpStatus::LLCORE; + status1.mStatus = HE_REPLY_ERROR; + status2.mType = HttpStatus::LLCORE; + status2.mStatus= HE_SHUTTING_DOWN; + ensure(status1 != status2); +} + +template <> template <> +void HttpStatusTestObjectType::test<6>() +{ + set_test_name("HttpStatus basic HTTP status encoding"); + + HttpStatus status; + status.mType = 200; + status.mStatus = HE_SUCCESS; + std::string msg = status.toString(); + ensure(msg.empty()); + ensure(bool(status)); + + // Normally a success but application says error + status.mStatus = HE_REPLY_ERROR; + msg = status.toString(); + ensure(! msg.empty()); + ensure(! bool(status)); + ensure(status.toULong() > 1UL); // Biggish number, not a bool-to-ulong + + // Same statuses with distinct success/fail are distinct + status.mType = 200; + status.mStatus = HE_SUCCESS; + HttpStatus status2(200, HE_REPLY_ERROR); + ensure(status != status2); + + // Normally an error but application says okay + status.mType = 406; + status.mStatus = HE_SUCCESS; + msg = status.toString(); + ensure(msg.empty()); + ensure(bool(status)); + + // Different statuses but both successful are distinct + status.mType = 200; + status.mStatus = HE_SUCCESS; + status2.mType = 201; + status2.mStatus = HE_SUCCESS; + ensure(status != status2); + + // Different statuses but both failed are distinct + status.mType = 200; + status.mStatus = HE_REPLY_ERROR; + status2.mType = 201; + status2.mStatus = HE_REPLY_ERROR; + ensure(status != status2); +} + +template <> template <> +void HttpStatusTestObjectType::test<7>() +{ + set_test_name("HttpStatus HTTP error text strings"); + + HttpStatus status(100, HE_REPLY_ERROR); + std::string msg(status.toString()); + ensure(! msg.empty()); // Should be something + ensure(msg == "Continue"); + + status.mStatus = HE_SUCCESS; + msg = status.toString(); + ensure(msg.empty()); // Success is empty + + status.mType = 199; + status.mStatus = HE_REPLY_ERROR; + msg = status.toString(); + ensure(msg == "Unknown error"); + + status.mType = 505; // Last defined string + status.mStatus = HE_REPLY_ERROR; + msg = status.toString(); + ensure(msg == "HTTP Version not supported"); + + status.mType = 506; // One beyond + status.mStatus = HE_REPLY_ERROR; + msg = status.toString(); + ensure(msg == "Unknown error"); + + status.mType = 999; // Last HTTP status + status.mStatus = HE_REPLY_ERROR; + msg = status.toString(); + ensure(msg == "Unknown error"); +} + +} // end namespace tut + +#endif // TEST_HTTP_STATUS_H + diff --git a/indra/llcorehttp/tests/test_llcorehttp_peer.py b/indra/llcorehttp/tests/test_llcorehttp_peer.py new file mode 100644 index 0000000000..75a3c39ef2 --- /dev/null +++ b/indra/llcorehttp/tests/test_llcorehttp_peer.py @@ -0,0 +1,190 @@ +#!/usr/bin/env python +"""\ +@file test_llsdmessage_peer.py +@author Nat Goodspeed +@date 2008-10-09 +@brief This script asynchronously runs the executable (with args) specified on + the command line, returning its result code. While that executable is + running, we provide dummy local services for use by C++ tests. + +$LicenseInfo:firstyear=2008&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2012, Linden Research, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License only. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +$/LicenseInfo$ +""" + +import os +import sys +import time +import select +import getopt +from threading import Thread +from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler +from SocketServer import ThreadingMixIn + +mydir = os.path.dirname(__file__) # expected to be .../indra/llcorehttp/tests/ +sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python")) +from indra.util.fastest_elementtree import parse as xml_parse +from indra.base import llsd +from testrunner import freeport, run, debug, VERBOSE + +class TestHTTPRequestHandler(BaseHTTPRequestHandler): + """This subclass of BaseHTTPRequestHandler is to receive and echo + LLSD-flavored messages sent by the C++ LLHTTPClient. + """ + def read(self): + # The following logic is adapted from the library module + # SimpleXMLRPCServer.py. + # Get arguments by reading body of request. + # We read this in chunks to avoid straining + # socket.read(); around the 10 or 15Mb mark, some platforms + # begin to have problems (bug #792570). + try: + size_remaining = int(self.headers["content-length"]) + except (KeyError, ValueError): + return "" + max_chunk_size = 10*1024*1024 + L = [] + while size_remaining: + chunk_size = min(size_remaining, max_chunk_size) + chunk = self.rfile.read(chunk_size) + L.append(chunk) + size_remaining -= len(chunk) + return ''.join(L) + # end of swiped read() logic + + def read_xml(self): + # This approach reads the entire POST data into memory first + return llsd.parse(self.read()) +## # This approach attempts to stream in the LLSD XML from self.rfile, +## # assuming that the underlying XML parser reads its input file +## # incrementally. Unfortunately I haven't been able to make it work. +## tree = xml_parse(self.rfile) +## debug("Finished raw parse") +## debug("parsed XML tree %s", tree) +## debug("parsed root node %s", tree.getroot()) +## debug("root node tag %s", tree.getroot().tag) +## return llsd.to_python(tree.getroot()) + + def do_HEAD(self): + self.do_GET(withdata=False) + + def do_GET(self, withdata=True): + # Of course, don't attempt to read data. + self.answer(dict(reply="success", status=200, + reason="Your GET operation worked")) + + def do_POST(self): + # Read the provided POST data. + # self.answer(self.read()) + self.answer(dict(reply="success", status=200, + reason=self.read())) + + def do_PUT(self): + # Read the provided PUT data. + # self.answer(self.read()) + self.answer(dict(reply="success", status=200, + reason=self.read())) + + def answer(self, data, withdata=True): + debug("%s.answer(%s): self.path = %r", self.__class__.__name__, data, self.path) + if "/sleep/" in self.path: + time.sleep(30) + + if "fail" not in self.path: + data = data.copy() # we're going to modify + # Ensure there's a "reply" key in data, even if there wasn't before + data["reply"] = data.get("reply", llsd.LLSD("success")) + response = llsd.format_xml(data) + debug("success: %s", response) + self.send_response(200) + if "/reflect/" in self.path: + self.reflect_headers() + self.send_header("Content-type", "application/llsd+xml") + self.send_header("Content-Length", str(len(response))) + self.send_header("X-LL-Special", "Mememememe"); + self.end_headers() + if withdata: + self.wfile.write(response) + else: # fail requested + status = data.get("status", 500) + # self.responses maps an int status to a (short, long) pair of + # strings. We want the longer string. That's why we pass a string + # pair to get(): the [1] will select the second string, whether it + # came from self.responses or from our default pair. + reason = data.get("reason", + self.responses.get(status, + ("fail requested", + "Your request specified failure status %s " + "without providing a reason" % status))[1]) + debug("fail requested: %s: %r", status, reason) + self.send_error(status, reason) + if "/reflect/" in self.path: + self.reflect_headers() + self.end_headers() + + def reflect_headers(self): + for name in self.headers.keys(): + # print "Header: %s: %s" % (name, self.headers[name]) + self.send_header("X-Reflect-" + name, self.headers[name]) + + if not VERBOSE: + # When VERBOSE is set, skip both these overrides because they exist to + # suppress output. + + def log_request(self, code, size=None): + # For present purposes, we don't want the request splattered onto + # stderr, as it would upset devs watching the test run + pass + + def log_error(self, format, *args): + # Suppress error output as well + pass + +class Server(ThreadingMixIn, HTTPServer): + # This pernicious flag is on by default in HTTPServer. But proper + # operation of freeport() absolutely depends on it being off. + allow_reuse_address = False + +if __name__ == "__main__": + do_valgrind = False + path_search = False + options, args = getopt.getopt(sys.argv[1:], "V", ["valgrind"]) + for option, value in options: + if option == "-V" or option == "--valgrind": + do_valgrind = True + + # Instantiate a Server(TestHTTPRequestHandler) on the first free port + # in the specified port range. Doing this inline is better than in a + # daemon thread: if it blows up here, we'll get a traceback. If it blew up + # in some other thread, the traceback would get eaten and we'd run the + # subject test program anyway. + httpd, port = freeport(xrange(8000, 8020), + lambda port: Server(('127.0.0.1', port), TestHTTPRequestHandler)) + + # Pass the selected port number to the subject test program via the + # environment. We don't want to impose requirements on the test program's + # command-line parsing -- and anyway, for C++ integration tests, that's + # performed in TUT code rather than our own. + os.environ["LL_TEST_PORT"] = str(port) + debug("$LL_TEST_PORT = %s", port) + if do_valgrind: + args = ["valgrind", "--log-file=./valgrind.log"] + args + path_search = True + sys.exit(run(server=Thread(name="httpd", target=httpd.serve_forever), use_path=path_search, *args)) diff --git a/indra/llcorehttp/tests/test_refcounted.hpp b/indra/llcorehttp/tests/test_refcounted.hpp new file mode 100644 index 0000000000..cb4b50287a --- /dev/null +++ b/indra/llcorehttp/tests/test_refcounted.hpp @@ -0,0 +1,156 @@ +/** + * @file test_refcounted.hpp + * @brief unit tests for the LLCoreInt::RefCounted class + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#ifndef TEST_LLCOREINT_REF_COUNTED_H_ +#define TEST_LLCOREINT_REF_COUNTED_H_ + +#include "_refcounted.h" + +#include "test_allocator.h" + +using namespace LLCoreInt; + +namespace tut +{ + struct RefCountedTestData + { + // the test objects inherit from this so the member functions and variables + // can be referenced directly inside of the test functions. + size_t mMemTotal; + }; + + typedef test_group<RefCountedTestData> RefCountedTestGroupType; + typedef RefCountedTestGroupType::object RefCountedTestObjectType; + RefCountedTestGroupType RefCountedTestGroup("RefCounted Tests"); + + template <> template <> + void RefCountedTestObjectType::test<1>() + { + set_test_name("RefCounted construction with implicit count"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + RefCounted * rc = new RefCounted(true); + ensure(rc->getRefCount() == 1); + + // release the implicit reference, causing the object to be released + rc->release(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); + } + + template <> template <> + void RefCountedTestObjectType::test<2>() + { + set_test_name("RefCounted construction without implicit count"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + // create a new ref counted object with an implicit reference + RefCounted * rc = new RefCounted(false); + ensure(rc->getRefCount() == 0); + + // add a reference + rc->addRef(); + ensure(rc->getRefCount() == 1); + + // release the implicit reference, causing the object to be released + rc->release(); + + ensure(mMemTotal == GetMemTotal()); + } + + template <> template <> + void RefCountedTestObjectType::test<3>() + { + set_test_name("RefCounted addRef and release"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + RefCounted * rc = new RefCounted(false); + + for (int i = 0; i < 1024; ++i) + { + rc->addRef(); + } + + ensure(rc->getRefCount() == 1024); + + for (int i = 0; i < 1024; ++i) + { + rc->release(); + } + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); + } + + template <> template <> + void RefCountedTestObjectType::test<4>() + { + set_test_name("RefCounted isLastRef check"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + RefCounted * rc = new RefCounted(true); + + // with only one reference, isLastRef should be true + ensure(rc->isLastRef()); + + // release it to clean up memory + rc->release(); + + // make sure we didn't leak any memory + ensure(mMemTotal == GetMemTotal()); + } + + template <> template <> + void RefCountedTestObjectType::test<5>() + { + set_test_name("RefCounted noRef check"); + + // record the total amount of dynamically allocated memory + mMemTotal = GetMemTotal(); + + RefCounted * rc = new RefCounted(false); + + // set the noRef + rc->noRef(); + + // with only one reference, isLastRef should be true + ensure(rc->getRefCount() == RefCounted::NOT_REF_COUNTED); + + // allow this memory leak, but check that we're leaking a known amount + ensure(mMemTotal == (GetMemTotal() - sizeof(RefCounted))); + } +} + +#endif // TEST_LLCOREINT_REF_COUNTED_H_ diff --git a/indra/llcorehttp/tests/testrunner.py b/indra/llcorehttp/tests/testrunner.py new file mode 100644 index 0000000000..9a2de71142 --- /dev/null +++ b/indra/llcorehttp/tests/testrunner.py @@ -0,0 +1,265 @@ +#!/usr/bin/env python +"""\ +@file testrunner.py +@author Nat Goodspeed +@date 2009-03-20 +@brief Utilities for writing wrapper scripts for ADD_COMM_BUILD_TEST unit tests + +$LicenseInfo:firstyear=2009&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2010, Linden Research, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License only. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +$/LicenseInfo$ +""" + +from __future__ import with_statement + +import os +import sys +import re +import errno +import socket + +VERBOSE = os.environ.get("INTEGRATION_TEST_VERBOSE", "0") # default to quiet +# Support usage such as INTEGRATION_TEST_VERBOSE=off -- distressing to user if +# that construct actually turns on verbosity... +VERBOSE = not re.match(r"(0|off|false|quiet)$", VERBOSE, re.IGNORECASE) + +if VERBOSE: + def debug(fmt, *args): + print fmt % args + sys.stdout.flush() +else: + debug = lambda *args: None + +def freeport(portlist, expr): + """ + Find a free server port to use. Specifically, evaluate 'expr' (a + callable(port)) until it stops raising EADDRINUSE exception. + + Pass: + + portlist: an iterable (e.g. xrange()) of ports to try. If you exhaust the + range, freeport() lets the socket.error exception propagate. If you want + unbounded, you could pass itertools.count(baseport), though of course in + practice the ceiling is 2^16-1 anyway. But it seems prudent to constrain + the range much more sharply: if we're iterating an absurd number of times, + probably something else is wrong. + + expr: a callable accepting a port number, specifically one of the items + from portlist. If calling that callable raises socket.error with + EADDRINUSE, freeport() retrieves the next item from portlist and retries. + + Returns: (expr(port), port) + + port: the value from portlist for which expr(port) succeeded + + Raises: + + Any exception raised by expr(port) other than EADDRINUSE. + + socket.error if, for every item from portlist, expr(port) raises + socket.error. The exception you see is the one from the last item in + portlist. + + StopIteration if portlist is completely empty. + + Example: + + class Server(HTTPServer): + # If you use BaseHTTPServer.HTTPServer, turning off this flag is + # essential for proper operation of freeport()! + allow_reuse_address = False + # ... + server, port = freeport(xrange(8000, 8010), + lambda port: Server(("localhost", port), + MyRequestHandler)) + # pass 'port' to client code + # call server.serve_forever() + """ + try: + # If portlist is completely empty, let StopIteration propagate: that's an + # error because we can't return meaningful values. We have no 'port', + # therefore no 'expr(port)'. + portiter = iter(portlist) + port = portiter.next() + + while True: + try: + # If this value of port works, return as promised. + value = expr(port) + + except socket.error, err: + # Anything other than 'Address already in use', propagate + if err.args[0] != errno.EADDRINUSE: + raise + + # Here we want the next port from portiter. But on StopIteration, + # we want to raise the original exception rather than + # StopIteration. So save the original exc_info(). + type, value, tb = sys.exc_info() + try: + try: + port = portiter.next() + except StopIteration: + raise type, value, tb + finally: + # Clean up local traceback, see docs for sys.exc_info() + del tb + + else: + debug("freeport() returning %s on port %s", value, port) + return value, port + + # Recap of the control flow above: + # If expr(port) doesn't raise, return as promised. + # If expr(port) raises anything but EADDRINUSE, propagate that + # exception. + # If portiter.next() raises StopIteration -- that is, if the port + # value we just passed to expr(port) was the last available -- reraise + # the EADDRINUSE exception. + # If we've actually arrived at this point, portiter.next() delivered a + # new port value. Loop back to pass that to expr(port). + + except Exception, err: + debug("*** freeport() raising %s: %s", err.__class__.__name__, err) + raise + +def run(*args, **kwds): + """All positional arguments collectively form a command line, executed as + a synchronous child process. + In addition, pass server=new_thread_instance as an explicit keyword (to + differentiate it from an additional command-line argument). + new_thread_instance should be an instantiated but not yet started Thread + subclass instance, e.g.: + run("python", "-c", 'print "Hello, world!"', server=TestHTTPServer(name="httpd")) + """ + # If there's no server= keyword arg, don't start a server thread: simply + # run a child process. + try: + thread = kwds.pop("server") + except KeyError: + pass + else: + # Start server thread. Note that this and all other comm server + # threads should be daemon threads: we'll let them run "forever," + # confident that the whole process will terminate when the main thread + # terminates, which will be when the child process terminates. + thread.setDaemon(True) + thread.start() + # choice of os.spawnv(): + # - [v vs. l] pass a list of args vs. individual arguments, + # - [no p] don't use the PATH because we specifically want to invoke the + # executable passed as our first arg, + # - [no e] child should inherit this process's environment. + debug("Running %s...", " ".join(args)) + if kwds.get("use_path", False): + rc = os.spawnvp(os.P_WAIT, args[0], args) + else: + rc = os.spawnv(os.P_WAIT, args[0], args) + debug("%s returned %s", args[0], rc) + return rc + +# **************************************************************************** +# test code -- manual at this point, see SWAT-564 +# **************************************************************************** +def test_freeport(): + # ------------------------------- Helpers -------------------------------- + from contextlib import contextmanager + # helper Context Manager for expecting an exception + # with exc(SomeError): + # raise SomeError() + # raises AssertionError otherwise. + @contextmanager + def exc(exception_class, *args): + try: + yield + except exception_class, err: + for i, expected_arg in enumerate(args): + assert expected_arg == err.args[i], \ + "Raised %s, but args[%s] is %r instead of %r" % \ + (err.__class__.__name__, i, err.args[i], expected_arg) + print "Caught expected exception %s(%s)" % \ + (err.__class__.__name__, ', '.join(repr(arg) for arg in err.args)) + else: + assert False, "Failed to raise " + exception_class.__class__.__name__ + + # helper to raise specified exception + def raiser(exception): + raise exception + + # the usual + def assert_equals(a, b): + assert a == b, "%r != %r" % (a, b) + + # ------------------------ Sanity check the above ------------------------ + class SomeError(Exception): pass + # Without extra args, accept any err.args value + with exc(SomeError): + raiser(SomeError("abc")) + # With extra args, accept only the specified value + with exc(SomeError, "abc"): + raiser(SomeError("abc")) + with exc(AssertionError): + with exc(SomeError, "abc"): + raiser(SomeError("def")) + with exc(AssertionError): + with exc(socket.error, errno.EADDRINUSE): + raiser(socket.error(errno.ECONNREFUSED, 'Connection refused')) + + # ----------- freeport() without engaging socket functionality ----------- + # If portlist is empty, freeport() raises StopIteration. + with exc(StopIteration): + freeport([], None) + + assert_equals(freeport([17], str), ("17", 17)) + + # This is the magic exception that should prompt us to retry + inuse = socket.error(errno.EADDRINUSE, 'Address already in use') + # Get the iterator to our ports list so we can check later if we've used all + ports = iter(xrange(5)) + with exc(socket.error, errno.EADDRINUSE): + freeport(ports, lambda port: raiser(inuse)) + # did we entirely exhaust 'ports'? + with exc(StopIteration): + ports.next() + + ports = iter(xrange(2)) + # Any exception but EADDRINUSE should quit immediately + with exc(SomeError): + freeport(ports, lambda port: raiser(SomeError())) + assert_equals(ports.next(), 1) + + # ----------- freeport() with platform-dependent socket stuff ------------ + # This is what we should've had unit tests to begin with (see CHOP-661). + def newbind(port): + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.bind(('127.0.0.1', port)) + return sock + + bound0, port0 = freeport(xrange(7777, 7780), newbind) + assert_equals(port0, 7777) + bound1, port1 = freeport(xrange(7777, 7780), newbind) + assert_equals(port1, 7778) + bound2, port2 = freeport(xrange(7777, 7780), newbind) + assert_equals(port2, 7779) + with exc(socket.error, errno.EADDRINUSE): + bound3, port3 = freeport(xrange(7777, 7780), newbind) + +if __name__ == "__main__": + test_freeport() diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index d6dcde4b9f..34e25a8a71 100644 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -366,7 +366,7 @@ bool LLCrashLogger::sendCrashLogs() { sent = runCrashLogPost(mAltCrashHost, post_data, std::string("Sending to alternate server"), 3, 5); } - + mSentCrashLogs = sent; return true; diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 6775b005f4..a88ac148ef 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -30,7 +30,6 @@ #include "llmath.h" #include "v4coloru.h" -#include "llmemtype.h" #include "llimagebmp.h" #include "llimagetga.h" @@ -96,8 +95,7 @@ LLImageBase::LLImageBase() mHeight(0), mComponents(0), mBadBufferAllocation(false), - mAllowOverSize(false), - mMemType(LLMemType::MTYPE_IMAGEBASE) + mAllowOverSize(false) { } @@ -167,8 +165,6 @@ void LLImageBase::deleteData() // virtual U8* LLImageBase::allocateData(S32 size) { - LLMemType mt1(mMemType); - if (size < 0) { size = mWidth * mHeight * mComponents; @@ -213,7 +209,6 @@ U8* LLImageBase::allocateData(S32 size) // virtual U8* LLImageBase::reallocateData(S32 size) { - LLMemType mt1(mMemType); U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size); if (!new_datap) { @@ -279,24 +274,26 @@ S32 LLImageRaw::sRawImageCount = 0; LLImageRaw::LLImageRaw() : LLImageBase() { - mMemType = LLMemType::MTYPE_IMAGERAW; ++sRawImageCount; } LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components) : LLImageBase() { - mMemType = LLMemType::MTYPE_IMAGERAW; //llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE ); allocateDataSize(width, height, components); ++sRawImageCount; } -LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components) +LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy) : LLImageBase() { - mMemType = LLMemType::MTYPE_IMAGERAW; - if(allocateDataSize(width, height, components)) + + if(no_copy) + { + setDataAndSize(data, width, height, components); + } + else if(allocateDataSize(width, height, components)) { memcpy(getData(), data, width*height*components); } @@ -370,29 +367,6 @@ BOOL LLImageRaw::resize(U16 width, U16 height, S8 components) return TRUE; } -#if 0 -U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const -{ - LLMemType mt1(mMemType); - U8 *data = new U8[width*height*getComponents()]; - - // Should do some simple bounds checking - if (!data) - { - llerrs << "Out of memory in LLImageRaw::getSubImage" << llendl; - return NULL; - } - - U32 i; - for (i = y_pos; i < y_pos+height; i++) - { - memcpy(data + i*width*getComponents(), /* Flawfinder: ignore */ - getData() + ((y_pos + i)*getWidth() + x_pos)*getComponents(), getComponents()*width); - } - return data; -} -#endif - BOOL LLImageRaw::setSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height, const U8 *data, U32 stride, BOOL reverse_y) { @@ -457,7 +431,6 @@ void LLImageRaw::clear(U8 r, U8 g, U8 b, U8 a) // Reverses the order of the rows in the image void LLImageRaw::verticalFlip() { - LLMemType mt1(mMemType); S32 row_bytes = getWidth() * getComponents(); llassert(row_bytes > 0); std::vector<U8> line_buffer(row_bytes); @@ -590,7 +563,6 @@ void LLImageRaw::composite( LLImageRaw* src ) // Src and dst can be any size. Src has 4 components. Dst has 3 components. void LLImageRaw::compositeScaled4onto3(LLImageRaw* src) { - LLMemType mt1(mMemType); llinfos << "compositeScaled4onto3" << llendl; LLImageRaw* dst = this; // Just for clarity. @@ -832,7 +804,6 @@ void LLImageRaw::copyUnscaled3onto4( LLImageRaw* src ) // Src and dst can be any size. Src and dst have same number of components. void LLImageRaw::copyScaled( LLImageRaw* src ) { - LLMemType mt1(mMemType); LLImageRaw* dst = this; // Just for clarity. llassert_always( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) ); @@ -861,57 +832,9 @@ void LLImageRaw::copyScaled( LLImageRaw* src ) } } -#if 0 -//scale down image by not blending a pixel with its neighbors. -BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height) -{ - LLMemType mt1(mMemType); - - S8 c = getComponents() ; - llassert((1 == c) || (3 == c) || (4 == c) ); - - S32 old_width = getWidth(); - S32 old_height = getHeight(); - - S32 new_data_size = old_width * new_height * c ; - llassert_always(new_data_size > 0); - - F32 ratio_x = (F32)old_width / new_width ; - F32 ratio_y = (F32)old_height / new_height ; - if( ratio_x < 1.0f || ratio_y < 1.0f ) - { - return TRUE; // Nothing to do. - } - ratio_x -= 1.0f ; - ratio_y -= 1.0f ; - - U8* new_data = allocateMemory(new_data_size) ; - llassert_always(new_data != NULL) ; - - U8* old_data = getData() ; - S32 i, j, k, s, t; - for(i = 0, s = 0, t = 0 ; i < new_height ; i++) - { - for(j = 0 ; j < new_width ; j++) - { - for(k = 0 ; k < c ; k++) - { - new_data[s++] = old_data[t++] ; - } - t += (S32)(ratio_x * c + 0.1f) ; - } - t += (S32)(ratio_y * old_width * c + 0.1f) ; - } - - setDataAndSize(new_data, new_width, new_height, c) ; - - return TRUE ; -} -#endif BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data ) { - LLMemType mt1(mMemType); llassert((1 == getComponents()) || (3 == getComponents()) || (4 == getComponents()) ); S32 old_width = getWidth(); @@ -1341,7 +1264,6 @@ LLImageFormatted::LLImageFormatted(S8 codec) mDiscardLevel(-1), mLevels(0) { - mMemType = LLMemType::MTYPE_IMAGEFORMATTED; } // virtual @@ -1660,6 +1582,12 @@ static void avg4_colors2(const U8* a, const U8* b, const U8* c, const U8* d, U8* dst[1] = (U8)(((U32)(a[1]) + b[1] + c[1] + d[1])>>2); } +void LLImageBase::setDataAndSize(U8 *data, S32 size) +{ + ll_assert_aligned(data, 16); + mData = data; mDataSize = size; +} + //static void LLImageBase::generateMip(const U8* indata, U8* mipdata, S32 width, S32 height, S32 nchannels) { diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 46e6d1a901..6cb1226da0 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -30,7 +30,6 @@ #include "lluuid.h" #include "llstring.h" #include "llthread.h" -#include "llmemtype.h" const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2 const S32 MAX_IMAGE_MIP = 11; // 2048x2048 @@ -148,7 +147,7 @@ public: protected: // special accessor to allow direct setting of mData and mDataSize by LLImageFormatted - void setDataAndSize(U8 *data, S32 size) { mData = data; mDataSize = size; } + void setDataAndSize(U8 *data, S32 size); public: static void generateMip(const U8 *indata, U8* mipdata, int width, int height, S32 nchannels); @@ -176,8 +175,6 @@ private: bool mAllowOverSize ; static LLPrivateMemoryPool* sPrivatePoolp ; -public: - LLMemType::DeclareMemType& mMemType; // debug }; // Raw representation of an image (used for textures, and other uncompressed formats @@ -189,7 +186,7 @@ protected: public: LLImageRaw(); LLImageRaw(U16 width, U16 height, S8 components); - LLImageRaw(U8 *data, U16 width, U16 height, S8 components); + LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy = false); // Construct using createFromFile (used by tools) //LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only = false); @@ -211,8 +208,7 @@ public: void contractToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, BOOL scale_image = TRUE); void biasedScaleToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE); BOOL scale( S32 new_width, S32 new_height, BOOL scale_image = TRUE ); - //BOOL scaleDownWithoutBlending( S32 new_width, S32 new_height) ; - + // Fill the buffer with a constant color void fill( const LLColor4U& color ); diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index 452aad25cb..5412f98ee5 100644 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -26,7 +26,6 @@ #include "lldir.h" #include "llimagej2c.h" -#include "llmemtype.h" #include "lltimer.h" #include "llmath.h" #include "llmemory.h" @@ -161,7 +160,6 @@ BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time) BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count ) { LLTimer elapsed; - LLMemType mt1(mMemType); BOOL res = TRUE; @@ -227,7 +225,6 @@ BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, F32 encode_time) BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time) { LLTimer elapsed; - LLMemType mt1(mMemType); resetLastError(); BOOL res = mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible); if (!mLastError.empty()) @@ -404,7 +401,6 @@ BOOL LLImageJ2C::loadAndValidate(const std::string &filename) BOOL LLImageJ2C::validate(U8 *data, U32 file_size) { - LLMemType mt1(mMemType); resetLastError(); diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp index 08476fb72c..e255d65b43 100644 --- a/indra/llimage/tests/llimageworker_test.cpp +++ b/indra/llimage/tests/llimageworker_test.cpp @@ -49,8 +49,7 @@ mWidth(0), mHeight(0), mComponents(0), mBadBufferAllocation(false), -mAllowOverSize(false), -mMemType(LLMemType::MTYPE_IMAGEBASE) +mAllowOverSize(false) { } LLImageBase::~LLImageBase() {} diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index fbf23bc3f0..a80ae73dca 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -75,13 +75,15 @@ LLInventoryObject::LLInventoryObject(const LLUUID& uuid, mUUID(uuid), mParentUUID(parent_uuid), mType(type), - mName(name) + mName(name), + mCreationDate(0) { correctInventoryName(mName); } LLInventoryObject::LLInventoryObject() : - mType(LLAssetType::AT_NONE) + mType(LLAssetType::AT_NONE), + mCreationDate(0) { } @@ -275,6 +277,18 @@ void LLInventoryObject::correctInventoryName(std::string& name) LLStringUtil::truncate(name, DB_INV_ITEM_NAME_STR_LEN); } +time_t LLInventoryObject::getCreationDate() const +{ + return mCreationDate; +} + +void LLInventoryObject::setCreationDate(time_t creation_date_utc) +{ + mCreationDate = creation_date_utc; +} + + + ///---------------------------------------------------------------------------- /// Class LLInventoryItem @@ -297,9 +311,10 @@ LLInventoryItem::LLInventoryItem(const LLUUID& uuid, mDescription(desc), mSaleInfo(sale_info), mInventoryType(inv_type), - mFlags(flags), - mCreationDate(creation_date_utc) + mFlags(flags) { + mCreationDate = creation_date_utc; + LLStringUtil::replaceNonstandardASCII(mDescription, ' '); LLStringUtil::replaceChar(mDescription, '|', ' '); mPermissions.initMasks(inv_type); @@ -312,9 +327,9 @@ LLInventoryItem::LLInventoryItem() : mDescription(), mSaleInfo(), mInventoryType(LLInventoryType::IT_NONE), - mFlags(0), - mCreationDate(0) + mFlags(0) { + mCreationDate = 0; } LLInventoryItem::LLInventoryItem(const LLInventoryItem* other) : @@ -379,11 +394,6 @@ const std::string& LLInventoryItem::getDescription() const return mDescription; } -time_t LLInventoryItem::getCreationDate() const -{ - return mCreationDate; -} - U32 LLInventoryItem::getCRC32() const { // *FIX: Not a real crc - more of a checksum. @@ -440,11 +450,6 @@ void LLInventoryItem::setFlags(U32 flags) mFlags = flags; } -void LLInventoryItem::setCreationDate(time_t creation_date_utc) -{ - mCreationDate = creation_date_utc; -} - // Currently only used in the Viewer to handle calling cards // where the creator is actually used to store the target. void LLInventoryItem::setCreator(const LLUUID& creator) @@ -506,6 +511,12 @@ U32 LLInventoryItem::getFlags() const return mFlags; } +time_t LLInventoryItem::getCreationDate() const +{ + return mCreationDate; +} + + // virtual void LLInventoryItem::packMessage(LLMessageSystem* msg) const { diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index a5cfe59bda..4516e548df 100644 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -30,7 +30,6 @@ #include "lldarray.h" #include "llfoldertype.h" #include "llinventorytype.h" -#include "llmemtype.h" #include "llpermissions.h" #include "llrefcount.h" #include "llsaleinfo.h" @@ -54,7 +53,6 @@ public: // Initialization //-------------------------------------------------------------------- public: - MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY); LLInventoryObject(); LLInventoryObject(const LLUUID& uuid, const LLUUID& parent_uuid, @@ -75,6 +73,7 @@ public: virtual LLAssetType::EType getType() const; LLAssetType::EType getActualType() const; // bypasses indirection for linked items BOOL getIsLinkType() const; + virtual time_t getCreationDate() const; //-------------------------------------------------------------------- // Mutators @@ -85,6 +84,7 @@ public: virtual void rename(const std::string& new_name); void setParent(const LLUUID& new_parent); void setType(LLAssetType::EType type); + virtual void setCreationDate(time_t creation_date_utc); // only stored for items private: // in place correction for inventory name string @@ -113,6 +113,7 @@ protected: LLUUID mParentUUID; // Parent category. Root categories have LLUUID::NULL. LLAssetType::EType mType; std::string mName; + time_t mCreationDate; // seconds from 1/1/1970, UTC }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -129,7 +130,6 @@ public: // Initialization //-------------------------------------------------------------------- public: - MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY); LLInventoryItem(const LLUUID& uuid, const LLUUID& parent_uuid, const LLPermissions& permissions, @@ -178,7 +178,6 @@ public: void setPermissions(const LLPermissions& perm); void setInventoryType(LLInventoryType::EType inv_type); void setFlags(U32 flags); - void setCreationDate(time_t creation_date_utc); void setCreator(const LLUUID& creator); // only used for calling cards // Check for changes in permissions masks and sale info @@ -224,7 +223,6 @@ protected: LLSaleInfo mSaleInfo; LLInventoryType::EType mInventoryType; U32 mFlags; - time_t mCreationDate; // seconds from 1/1/1970, UTC }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -242,7 +240,6 @@ public: // Initialization //-------------------------------------------------------------------- public: - MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY); LLInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid, LLFolderType::EType preferred_type, const std::string& name); diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp index 8282d79b67..8807b36117 100644 --- a/indra/llinventory/llinventorytype.cpp +++ b/indra/llinventory/llinventorytype.cpp @@ -85,6 +85,7 @@ LLInventoryDictionary::LLInventoryDictionary() addEntry(LLInventoryType::IT_GESTURE, new InventoryEntry("gesture", "gesture", 1, LLAssetType::AT_GESTURE)); addEntry(LLInventoryType::IT_MESH, new InventoryEntry("mesh", "mesh", 1, LLAssetType::AT_MESH)); addEntry(LLInventoryType::IT_WIDGET, new InventoryEntry("widget", "widget", 1, LLAssetType::AT_WIDGET)); + addEntry(LLInventoryType::IT_PERSON, new InventoryEntry("person", "person", 1, LLAssetType::AT_PERSON)); } @@ -140,7 +141,7 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] = LLInventoryType::IT_NONE, // 42 AT_NONE LLInventoryType::IT_NONE, // 43 AT_NONE LLInventoryType::IT_NONE, // 44 AT_NONE - LLInventoryType::IT_NONE, // 45 AT_NONE + LLInventoryType::IT_PERSON, // 45 AT_PERSON LLInventoryType::IT_NONE, // 46 AT_NONE LLInventoryType::IT_NONE, // 47 AT_NONE LLInventoryType::IT_NONE, // 48 AT_NONE diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h index 4d1e0db040..645ebab234 100644 --- a/indra/llinventory/llinventorytype.h +++ b/indra/llinventory/llinventorytype.h @@ -63,7 +63,8 @@ public: IT_GESTURE = 20, IT_MESH = 22, IT_WIDGET = 23, - IT_COUNT = 24, + IT_PERSON = 24, + IT_COUNT = 25, IT_NONE = -1 }; diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 433076c7a9..37c603348e 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -193,8 +193,6 @@ void LLParcel::init(const LLUUID &owner_id, mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); - mMediaURLFilterEnable = FALSE; - mMediaURLFilterList = LLSD::emptyArray(); mMediaAllowNavigate = TRUE; mMediaURLTimeout = 0.0f; mMediaPreventCameraZoom = FALSE; @@ -207,7 +205,7 @@ void LLParcel::init(const LLUUID &owner_id, mAABBMin.setVec(SOME_BIG_NUMBER, SOME_BIG_NUMBER, SOME_BIG_NUMBER); mAABBMax.setVec(SOME_BIG_NEG_NUMBER, SOME_BIG_NEG_NUMBER, SOME_BIG_NEG_NUMBER); - mLocalID = 0; + mLocalID = INVALID_PARCEL_ID; //mSimWidePrimCorrection = 0; setMaxPrimCapacity((S32)(sim_object_limit * area / (F32)(REGION_WIDTH_METERS * REGION_WIDTH_METERS))); @@ -336,38 +334,6 @@ void LLParcel::setMediaURLResetTimer(F32 time) mMediaResetTimer.setTimerExpirySec(time); } -void LLParcel::setMediaURLFilterList(LLSD list) -{ - // sanity check LLSD - // must be array of strings - if (!list.isArray()) - { - return; - } - - for (S32 i = 0; i < list.size(); i++) - { - if (!list[i].isString()) - return; - } - - // can't be too big - const S32 MAX_SIZE = 50; - if (list.size() > MAX_SIZE) - { - LLSD new_list = LLSD::emptyArray(); - - for (S32 i = 0; i < llmin(list.size(), MAX_SIZE); i++) - { - new_list.append(list[i]); - } - - list = new_list; - } - - mMediaURLFilterList = list; -} - // virtual void LLParcel::setLocalID(S32 local_id) { @@ -622,34 +588,6 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr return input_stream.good(); } -BOOL LLParcel::importMediaURLFilter(std::istream& input_stream, std::string& url) -{ - skip_to_end_of_next_keyword("{", input_stream); - - while(input_stream.good()) - { - skip_comments_and_emptyspace(input_stream); - std::string line, keyword, value; - get_line(line, input_stream, MAX_STRING); - get_keyword_and_value(keyword, value, line); - - if ("}" == keyword) - { - break; - } - else if ("url" == keyword) - { - url = value; - } - else - { - llwarns << "Unknown keyword in parcel media url filter section: <" - << keyword << ">" << llendl; - } - } - return input_stream.good(); -} - // Assumes we are in a block "ParcelData" void LLParcel::packMessage(LLMessageSystem* msg) { @@ -696,8 +634,6 @@ void LLParcel::packMessage(LLSD& msg) msg["media_allow_navigate"] = getMediaAllowNavigate(); msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom(); msg["media_url_timeout"] = getMediaURLTimeout(); - msg["media_url_filter_enable"] = getMediaURLFilterEnable(); - msg["media_url_filter_list"] = getMediaURLFilterList(); msg["group_id"] = getGroupID(); msg["pass_price"] = mPassPrice; msg["pass_hours"] = mPassHours; @@ -789,7 +725,6 @@ void LLParcel::unpackMessage(LLMessageSystem* msg) msg->getString("MediaLinkSharing", "MediaCurrentURL", buffer); setMediaCurrentURL(buffer); msg->getU8 ( "MediaLinkSharing", "MediaAllowNavigate", mMediaAllowNavigate ); - msg->getU8 ( "MediaLinkSharing", "MediaURLFilterEnable", mMediaURLFilterEnable ); msg->getU8 ( "MediaLinkSharing", "MediaPreventCameraZoom", mMediaPreventCameraZoom ); msg->getF32( "MediaLinkSharing", "MediaURLTimeout", mMediaURLTimeout); } @@ -1250,8 +1185,6 @@ void LLParcel::clearParcel() mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); - setMediaURLFilterList(LLSD::emptyArray()); - setMediaURLFilterEnable(FALSE); setMediaAllowNavigate(TRUE); setMediaPreventCameraZoom(FALSE); setMediaURLTimeout(0.0f); diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index f0b2caca3d..0279e8bef9 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -97,6 +97,7 @@ const U32 RT_OTHER = 0x1 << 3; const U32 RT_LIST = 0x1 << 4; const U32 RT_SELL = 0x1 << 5; +const S32 INVALID_PARCEL_ID = -1; // Timeouts for parcels // default is 21 days * 24h/d * 60m/h * 60s/m *1000000 usec/s = 1814400000000 @@ -247,8 +248,6 @@ public: void setMediaWidth(S32 width); void setMediaHeight(S32 height); void setMediaCurrentURL(const std::string& url); - void setMediaURLFilterEnable(U8 enable) { mMediaURLFilterEnable = enable; } - void setMediaURLFilterList(LLSD list); void setMediaAllowNavigate(U8 enable) { mMediaAllowNavigate = enable; } void setMediaURLTimeout(F32 timeout) { mMediaURLTimeout = timeout; } void setMediaPreventCameraZoom(U8 enable) { mMediaPreventCameraZoom = enable; } @@ -310,7 +309,6 @@ public: // BOOL importStream(std::istream& input_stream); BOOL importAccessEntry(std::istream& input_stream, LLAccessEntry* entry); - BOOL importMediaURLFilter(std::istream& input_stream, std::string& url); // BOOL exportStream(std::ostream& output_stream); void packMessage(LLMessageSystem* msg); @@ -354,8 +352,6 @@ public: U8 getMediaAutoScale() const { return mMediaAutoScale; } U8 getMediaLoop() const { return mMediaLoop; } const std::string& getMediaCurrentURL() const { return mMediaCurrentURL; } - U8 getMediaURLFilterEnable() const { return mMediaURLFilterEnable; } - LLSD getMediaURLFilterList() const { return mMediaURLFilterList; } U8 getMediaAllowNavigate() const { return mMediaAllowNavigate; } F32 getMediaURLTimeout() const { return mMediaURLTimeout; } U8 getMediaPreventCameraZoom() const { return mMediaPreventCameraZoom; } @@ -651,8 +647,6 @@ protected: U8 mMediaLoop; std::string mMediaCurrentURL; LLUUID mMediaID; - U8 mMediaURLFilterEnable; - LLSD mMediaURLFilterList; U8 mMediaAllowNavigate; U8 mMediaPreventCameraZoom; F32 mMediaURLTimeout; diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index cf88de12b4..0c0a844b73 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -1179,7 +1179,7 @@ LLKDUDecodeState::LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap) llassert(mDims == comp_dims); // Safety check; the caller has ensured this } bool use_shorts = (mComps[c].get_bit_depth(true) <= 16); - mLines[c].pre_create(&mAllocator,mDims.size.x,mReversible[c],use_shorts); + mLines[c].pre_create(&mAllocator,mDims.size.x,mReversible[c],use_shorts,0,0); if (res.which() == 0) // No DWT levels used { mEngines[c] = kdu_decoder(res.access_subband(LL_BAND),&mAllocator,use_shorts); @@ -1223,7 +1223,7 @@ separation between consecutive rows in the real buffer. */ { for (c = 0; c < mNumComponents; c++) { - mEngines[c].pull(mLines[c],true); + mEngines[c].pull(mLines[c]); } if ((mNumComponents >= 3) && mUseYCC) { diff --git a/indra/llkdu/llimagej2ckdu.h b/indra/llkdu/llimagej2ckdu.h index 9ab0b9e4a7..fb1f6535ba 100644 --- a/indra/llkdu/llimagej2ckdu.h +++ b/indra/llkdu/llimagej2ckdu.h @@ -32,6 +32,7 @@ // // KDU core header files // +#define KDU_NO_THREADS #include "kdu_elementary.h" #include "kdu_messaging.h" #include "kdu_params.h" diff --git a/indra/llkdu/llkdumem.h b/indra/llkdu/llkdumem.h index 9d923fc367..dbdf88b2d9 100644 --- a/indra/llkdu/llkdumem.h +++ b/indra/llkdu/llkdumem.h @@ -28,6 +28,7 @@ #define LL_LLKDUMEM_H // Support classes for reading and writing from memory buffers in KDU +#define KDU_NO_THREADS #include "kdu_image.h" #include "kdu_elementary.h" #include "kdu_messaging.h" diff --git a/indra/llkdu/tests/llimagej2ckdu_test.cpp b/indra/llkdu/tests/llimagej2ckdu_test.cpp index beee99a522..62c245f125 100644 --- a/indra/llkdu/tests/llimagej2ckdu_test.cpp +++ b/indra/llkdu/tests/llimagej2ckdu_test.cpp @@ -58,8 +58,7 @@ mWidth(0), mHeight(0), mComponents(0), mBadBufferAllocation(false), -mAllowOverSize(false), -mMemType(LLMemType::MTYPE_IMAGEBASE) +mAllowOverSize(false) { } LLImageBase::~LLImageBase() { } U8* LLImageBase::allocateData(S32 ) { return NULL; } @@ -127,7 +126,6 @@ kdu_subband kdu_resolution::access_subband(int ) { kdu_subband a; return a; } void kdu_resolution::get_dims(kdu_dims& ) { } int kdu_resolution::which() { return 0; } int kdu_resolution::get_valid_band_indices(int &) { return 1; } -kdu_decoder::kdu_decoder(kdu_subband , kdu_sample_allocator*, bool , float, int, kdu_thread_env*, kdu_thread_queue*) { } kdu_synthesis::kdu_synthesis(kdu_resolution, kdu_sample_allocator*, bool, float, kdu_thread_env*, kdu_thread_queue*) { } kdu_params::kdu_params(const char*, bool, bool, bool, bool, bool) { } kdu_params::~kdu_params() { } @@ -153,7 +151,6 @@ void kdu_codestream::destroy() { } void kdu_codestream::collect_timing_stats(int ) { } void kdu_codestream::set_max_bytes(kdu_long, bool, bool ) { } void kdu_codestream::get_valid_tiles(kdu_dims& ) { } -void kdu_codestream::create(siz_params*, kdu_compressed_target*, kdu_dims*, int, kdu_long ) { } void kdu_codestream::create(kdu_compressed_source*, kdu_thread_env*) { } void kdu_codestream::apply_input_restrictions( int, int, int, int, kdu_dims*, kdu_component_access_mode ) { } void kdu_codestream::get_subsampling(int , kdu_coords&, bool ) { } @@ -175,7 +172,7 @@ kdu_block* kdu_subband::open_block(kdu_coords, int*, kdu_thread_env*) { return N bool kdu_codestream_comment::put_text(const char*) { return false; } void kdu_customize_warnings(kdu_message*) { } void kdu_customize_errors(kdu_message*) { } -void kdu_convert_ycc_to_rgb(kdu_line_buf&, kdu_line_buf&, kdu_line_buf&, int) { } + kdu_long kdu_multi_analysis::create(kdu_codestream, kdu_tile, bool, kdu_roi_image*, bool, int, kdu_thread_env*, kdu_thread_queue*, bool ) { kdu_long a = 0; return a; } siz_params::siz_params() : kdu_params(NULL, false, false, false, false, false) { } void siz_params::finalize(bool ) { } @@ -184,6 +181,21 @@ int siz_params::write_marker_segment(kdu_output*, kdu_params*, int) { return 0; bool siz_params::check_marker_segment(kdu_uint16, int, kdu_byte a[], int&) { return false; } bool siz_params::read_marker_segment(kdu_uint16, int, kdu_byte a[], int) { return false; } +#ifdef LL_LINUX +// Linux use the old pre KDU v7.0.0 +// *TODO: Supress this legacy stubbs once Linux migrates to v7.0.0 +kdu_decoder::kdu_decoder(kdu_subband , kdu_sample_allocator*, bool , float, int, kdu_thread_env*, kdu_thread_queue*) { } +void kdu_codestream::create(siz_params*, kdu_compressed_target*, kdu_dims*, int, kdu_long ) { } +void kdu_convert_ycc_to_rgb(kdu_line_buf&, kdu_line_buf&, kdu_line_buf&, int) { } +#else +kdu_decoder::kdu_decoder(kdu_subband , kdu_sample_allocator*, bool , float, int, kdu_thread_env*, kdu_thread_queue*, int) { } +void kdu_codestream::create(siz_params*, kdu_compressed_target*, kdu_dims*, int, kdu_long, kdu_thread_env* ) { } +void (*kdu_convert_ycc_to_rgb_rev16)(kdu_int16*,kdu_int16*,kdu_int16*,int); +void (*kdu_convert_ycc_to_rgb_irrev16)(kdu_int16*,kdu_int16*,kdu_int16*,int); +void (*kdu_convert_ycc_to_rgb_rev32)(kdu_int32*,kdu_int32*,kdu_int32*,int); +void (*kdu_convert_ycc_to_rgb_irrev32)(float*,float*,float*,int); +#endif + // ------------------------------------------------------------------------------------------- // TUT // ------------------------------------------------------------------------------------------- diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index b5e59c1ca3..5865ae030c 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -117,6 +117,7 @@ if (LL_TESTS) # INTEGRATION TESTS set(test_libs llmath llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests. + LL_ADD_INTEGRATION_TEST(alignment "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llbbox llbbox.cpp "${test_libs}") LL_ADD_INTEGRATION_TEST(llquaternion llquaternion.cpp "${test_libs}") LL_ADD_INTEGRATION_TEST(mathmisc "" "${test_libs}") diff --git a/indra/llmath/llcamera.h b/indra/llmath/llcamera.h index ec67b91d05..0b591be622 100644 --- a/indra/llmath/llcamera.h +++ b/indra/llmath/llcamera.h @@ -60,7 +60,7 @@ static const F32 MAX_FIELD_OF_VIEW = 175.f * DEG_TO_RAD; // roll(), pitch(), yaw() // etc... - +LL_ALIGN_PREFIX(16) class LLCamera : public LLCoordFrame { @@ -108,7 +108,7 @@ public: }; private: - LLPlane mAgentPlanes[7]; //frustum planes in agent space a la gluUnproject (I'm a bastard, I know) - DaveP + LL_ALIGN_16(LLPlane mAgentPlanes[7]); //frustum planes in agent space a la gluUnproject (I'm a bastard, I know) - DaveP U8 mPlaneMask[8]; // 8 for alignment F32 mView; // angle between top and bottom frustum planes in radians. @@ -116,13 +116,13 @@ private: S32 mViewHeightInPixels; // for ViewHeightInPixels() only F32 mNearPlane; F32 mFarPlane; - LLPlane mLocalPlanes[4]; + LL_ALIGN_16(LLPlane mLocalPlanes[4]); F32 mFixedDistance; // Always return this distance, unless < 0 LLVector3 mFrustCenter; // center of frustum and radius squared for ultra-quick exclusion test F32 mFrustRadiusSquared; - LLPlane mWorldPlanes[PLANE_NUM]; - LLPlane mHorizPlanes[HORIZ_PLANE_NUM]; + LL_ALIGN_16(LLPlane mWorldPlanes[PLANE_NUM]); + LL_ALIGN_16(LLPlane mHorizPlanes[HORIZ_PLANE_NUM]); U32 mPlaneCount; //defaults to 6, if setUserClipPlane is called, uses user supplied clip plane in @@ -208,7 +208,7 @@ protected: void calculateFrustumPlanes(F32 left, F32 right, F32 top, F32 bottom); void calculateFrustumPlanesFromWindow(F32 x1, F32 y1, F32 x2, F32 y2); void calculateWorldFrustumPlanes(); -}; +} LL_ALIGN_POSTFIX(16); #endif diff --git a/indra/llmath/llmatrix3a.h b/indra/llmath/llmatrix3a.h index adb7e3389d..9916cfd2da 100644 --- a/indra/llmath/llmatrix3a.h +++ b/indra/llmath/llmatrix3a.h @@ -111,7 +111,7 @@ public: protected: - LLVector4a mColumns[3]; + LL_ALIGN_16(LLVector4a mColumns[3]); }; diff --git a/indra/llmath/llmatrix4a.h b/indra/llmath/llmatrix4a.h index 27cf5b79f6..c4cefdb4fa 100644 --- a/indra/llmath/llmatrix4a.h +++ b/indra/llmath/llmatrix4a.h @@ -34,7 +34,7 @@ class LLMatrix4a { public: - LLVector4a mMatrix[4]; + LL_ALIGN_16(LLVector4a mMatrix[4]); inline void clear() { diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index 1b11e83b4a..7348904c61 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -31,7 +31,6 @@ #include "v3math.h" #include "llvector4a.h" #include <vector> -#include <set> #define OCT_ERRS LL_WARNS("OctreeErrors") @@ -79,16 +78,18 @@ public: typedef LLOctreeTraveler<T> oct_traveler; typedef LLTreeTraveler<T> tree_traveler; - typedef typename std::set<LLPointer<T> > element_list; - typedef typename element_list::iterator element_iter; - typedef typename element_list::const_iterator const_element_iter; + typedef std::vector< LLPointer<T> > element_list; // note: don't remove the whitespace between "> >" + typedef LLPointer<T>* element_iter; + typedef const LLPointer<T>* const_element_iter; typedef typename std::vector<LLTreeListener<T>*>::iterator tree_listener_iter; - typedef typename std::vector<LLOctreeNode<T>* > child_list; + typedef LLOctreeNode<T>** child_list; + typedef LLOctreeNode<T>** child_iter; + typedef LLTreeNode<T> BaseType; typedef LLOctreeNode<T> oct_node; typedef LLOctreeListener<T> oct_listener; - /*void* operator new(size_t size) + void* operator new(size_t size) { return ll_aligned_malloc_16(size); } @@ -96,7 +97,7 @@ public: void operator delete(void* ptr) { ll_aligned_free_16(ptr); - }*/ + } LLOctreeNode( const LLVector4a& center, const LLVector4a& size, @@ -105,6 +106,10 @@ public: : mParent((oct_node*)parent), mOctant(octant) { + //always keep a NULL terminated list to avoid out of bounds exceptions in debug builds + mData.push_back(NULL); + mDataEnd = &mData[0]; + mCenter = center; mSize = size; @@ -123,6 +128,16 @@ public: { BaseType::destroyListeners(); + for (U32 i = 0; i < mElementCount; ++i) + { + mData[i]->setBinIndex(-1); + mData[i] = NULL; + } + + mData.clear(); + mData.push_back(NULL); + mDataEnd = &mData[0]; + for (U32 i = 0; i < getChildCount(); i++) { delete getChild(i); @@ -219,12 +234,17 @@ public: } void accept(oct_traveler* visitor) { visitor->visit(this); } - virtual bool isLeaf() const { return mChild.empty(); } + virtual bool isLeaf() const { return mChildCount == 0; } U32 getElementCount() const { return mElementCount; } + bool isEmpty() const { return mElementCount == 0; } element_list& getData() { return mData; } const element_list& getData() const { return mData; } - + element_iter getDataBegin() { return &mData[0]; } + element_iter getDataEnd() { return mDataEnd; } + const_element_iter getDataBegin() const { return &mData[0]; } + const_element_iter getDataEnd() const { return mDataEnd; } + U32 getChildCount() const { return mChildCount; } oct_node* getChild(U32 index) { return mChild[index]; } const oct_node* getChild(U32 index) const { return mChild[index]; } @@ -289,7 +309,7 @@ public: virtual bool insert(T* data) { - if (data == NULL) + if (data == NULL || data->getBinIndex() != -1) { OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE BRANCH !!!" << llendl; return false; @@ -302,13 +322,12 @@ public: if ((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius()) || (data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= gOctreeMaxCapacity))) { //it belongs here - //if this is a redundant insertion, error out (should never happen) - llassert(mData.find(data) == mData.end()); - - mData.insert(data); + mData.push_back(NULL); + mData[mElementCount] = data; + mElementCount++; + mDataEnd = &mData[mElementCount]; + data->setBinIndex(mElementCount-1); BaseType::insert(data); - - mElementCount = mData.size(); return true; } else @@ -342,10 +361,12 @@ public: if( lt == 0x7 ) { - mData.insert(data); + mData.push_back(NULL); + mData[mElementCount] = data; + mElementCount++; + mDataEnd = &mData[mElementCount]; + data->setBinIndex(mElementCount-1); BaseType::insert(data); - - mElementCount = mData.size(); return true; } @@ -394,23 +415,58 @@ public: return false; } + void _remove(T* data, S32 i) + { //precondition -- mElementCount > 0, idx is in range [0, mElementCount) + + mElementCount--; + data->setBinIndex(-1); + + if (mElementCount > 0) + { + if (mElementCount != i) + { + mData[i] = mData[mElementCount]; //might unref data, do not access data after this point + mData[i]->setBinIndex(i); + } + + mData[mElementCount] = NULL; + mData.pop_back(); + mDataEnd = &mData[mElementCount]; + } + else + { + mData.clear(); + mData.push_back(NULL); + mDataEnd = &mData[0]; + } + + notifyRemoval(data); + checkAlive(); + } + bool remove(T* data) { - if (mData.find(data) != mData.end()) - { //we have data - mData.erase(data); - mElementCount = mData.size(); - notifyRemoval(data); - checkAlive(); - return true; - } - else if (isInside(data)) + S32 i = data->getBinIndex(); + + if (i >= 0 && i < mElementCount) + { + if (mData[i] == data) + { //found it + _remove(data, i); + llassert(data->getBinIndex() == -1); + return true; + } + } + + if (isInside(data)) { oct_node* dest = getNodeAt(data); if (dest != this) { - return dest->remove(data); + bool ret = dest->remove(data); + llassert(data->getBinIndex() == -1); + return ret; } } @@ -427,21 +483,22 @@ public: } //node is now root - llwarns << "!!! OCTREE REMOVING FACE BY ADDRESS, SEVERE PERFORMANCE PENALTY |||" << llendl; + llwarns << "!!! OCTREE REMOVING ELEMENT BY ADDRESS, SEVERE PERFORMANCE PENALTY |||" << llendl; node->removeByAddress(data); + llassert(data->getBinIndex() == -1); return true; } void removeByAddress(T* data) { - if (mData.find(data) != mData.end()) + for (U32 i = 0; i < mElementCount; ++i) { - mData.erase(data); - mElementCount = mData.size(); - notifyRemoval(data); - llwarns << "FOUND!" << llendl; - checkAlive(); - return; + if (mData[i] == data) + { //we have data + _remove(data, i); + llwarns << "FOUND!" << llendl; + return; + } } for (U32 i = 0; i < getChildCount(); i++) @@ -453,8 +510,8 @@ public: void clearChildren() { - mChild.clear(); mChildCount = 0; + U32* foo = (U32*) mChildMap; foo[0] = foo[1] = 0xFFFFFFFF; } @@ -516,7 +573,7 @@ public: mChildMap[child->getOctant()] = mChildCount; - mChild.push_back(child); + mChild[mChildCount] = child; ++mChildCount; child->setParent(this); @@ -543,9 +600,12 @@ public: mChild[index]->destroy(); delete mChild[index]; } - mChild.erase(mChild.begin() + index); + --mChildCount; + mChild[index] = mChild[mChildCount]; + + //rebuild child map U32* foo = (U32*) mChildMap; foo[0] = foo[1] = 0xFFFFFFFF; @@ -601,11 +661,12 @@ protected: oct_node* mParent; U8 mOctant; - child_list mChild; + LLOctreeNode<T>* mChild[8]; U8 mChildMap[8]; U32 mChildCount; element_list mData; + element_iter mDataEnd; U32 mElementCount; }; diff --git a/indra/llmath/llplane.h b/indra/llmath/llplane.h index a611894721..3c32441b11 100644 --- a/indra/llmath/llplane.h +++ b/indra/llmath/llplane.h @@ -36,6 +36,8 @@ // The plane normal = [A, B, C] // The closest approach = D / sqrt(A*A + B*B + C*C) + +LL_ALIGN_PREFIX(16) class LLPlane { public: @@ -94,7 +96,7 @@ public: private: LLVector4a mV; -}; +} LL_ALIGN_POSTFIX(16); diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h index c7cdf7b32c..01458521ec 100644 --- a/indra/llmath/llsimdmath.h +++ b/indra/llmath/llsimdmath.h @@ -67,11 +67,10 @@ template <typename T> T* LL_NEXT_ALIGNED_ADDRESS_64(T* address) #define LL_ALIGN_16(var) LL_ALIGN_PREFIX(16) var LL_ALIGN_POSTFIX(16) - - #include <xmmintrin.h> #include <emmintrin.h> +#include "llmemory.h" #include "llsimdtypes.h" #include "llsimdtypes.inl" diff --git a/indra/llmath/llsimdtypes.inl b/indra/llmath/llsimdtypes.inl index 712239e425..e905c84954 100644 --- a/indra/llmath/llsimdtypes.inl +++ b/indra/llmath/llsimdtypes.inl @@ -62,6 +62,7 @@ inline LLSimdScalar operator/(const LLSimdScalar& a, const LLSimdScalar& b) inline LLSimdScalar operator-(const LLSimdScalar& a) { static LL_ALIGN_16(const U32 signMask[4]) = {0x80000000, 0x80000000, 0x80000000, 0x80000000 }; + ll_assert_aligned(signMask,16); return _mm_xor_ps(*reinterpret_cast<const LLQuad*>(signMask), a); } @@ -146,6 +147,7 @@ inline LLSimdScalar& LLSimdScalar::operator/=(const LLSimdScalar& rhs) inline LLSimdScalar LLSimdScalar::getAbs() const { static const LL_ALIGN_16(U32 F_ABS_MASK_4A[4]) = { 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF }; + ll_assert_aligned(F_ABS_MASK_4A,16); return _mm_and_ps( mQ, *reinterpret_cast<const LLQuad*>(F_ABS_MASK_4A)); } diff --git a/indra/llmath/llvector4a.cpp b/indra/llmath/llvector4a.cpp index b66b7a7076..6edeb0fefe 100644 --- a/indra/llmath/llvector4a.cpp +++ b/indra/llmath/llvector4a.cpp @@ -24,6 +24,7 @@ * $/LicenseInfo$ */ +#include "llmemory.h" #include "llmath.h" #include "llquantize.h" @@ -44,7 +45,10 @@ extern const LLVector4a LL_V4A_EPSILON = reinterpret_cast<const LLVector4a&> ( F assert(dst != NULL); assert(bytes > 0); assert((bytes % sizeof(F32))== 0); - + ll_assert_aligned(src,16); + ll_assert_aligned(dst,16); + assert(bytes%16==0); + F32* end = dst + (bytes / sizeof(F32) ); if (bytes > 64) @@ -189,6 +193,8 @@ void LLVector4a::quantize16( const LLVector4a& low, const LLVector4a& high ) LLVector4a oneOverDelta; { static LL_ALIGN_16( const F32 F_TWO_4A[4] ) = { 2.f, 2.f, 2.f, 2.f }; + ll_assert_aligned(F_TWO_4A,16); + LLVector4a two; two.load4a( F_TWO_4A ); // Here we use _mm_rcp_ps plus one round of newton-raphson diff --git a/indra/llmath/llvector4a.h b/indra/llmath/llvector4a.h index 596082509d..0526793d3a 100644 --- a/indra/llmath/llvector4a.h +++ b/indra/llmath/llvector4a.h @@ -32,6 +32,7 @@ class LLRotation; #include <assert.h> #include "llpreprocessor.h" +#include "llmemory.h" /////////////////////////////////// // FIRST TIME USERS PLEASE READ @@ -46,6 +47,7 @@ class LLRotation; // LLVector3/LLVector4. ///////////////////////////////// +LL_ALIGN_PREFIX(16) class LLVector4a { public: @@ -82,6 +84,7 @@ public: } // Copy words 16-byte blocks from src to dst. Source and destination must not overlap. + // Source and dest must be 16-byte aligned and size must be multiple of 16. static void memcpyNonAliased16(F32* __restrict dst, const F32* __restrict src, size_t bytes); //////////////////////////////////// @@ -90,6 +93,7 @@ public: LLVector4a() { //DO NOT INITIALIZE -- The overhead is completely unnecessary + ll_assert_aligned(this,16); } LLVector4a(F32 x, F32 y, F32 z, F32 w = 0.f) @@ -313,7 +317,7 @@ public: private: LLQuad mQ; -}; +} LL_ALIGN_POSTFIX(16); inline void update_min_max(LLVector4a& min, LLVector4a& max, const LLVector4a& p) { diff --git a/indra/llmath/llvector4a.inl b/indra/llmath/llvector4a.inl index 7ad22a5631..7c52ffef21 100644 --- a/indra/llmath/llvector4a.inl +++ b/indra/llmath/llvector4a.inl @@ -475,6 +475,7 @@ inline void LLVector4a::setLerp(const LLVector4a& lhs, const LLVector4a& rhs, F3 inline LLBool32 LLVector4a::isFinite3() const { static LL_ALIGN_16(const U32 nanOrInfMask[4]) = { 0x7f800000, 0x7f800000, 0x7f800000, 0x7f800000 }; + ll_assert_aligned(nanOrInfMask,16); const __m128i nanOrInfMaskV = *reinterpret_cast<const __m128i*> (nanOrInfMask); const __m128i maskResult = _mm_and_si128( _mm_castps_si128(mQ), nanOrInfMaskV ); const LLVector4Logical equalityCheck = _mm_castsi128_ps(_mm_cmpeq_epi32( maskResult, nanOrInfMaskV )); diff --git a/indra/llmath/llvector4logical.h b/indra/llmath/llvector4logical.h index dd66b09d43..c5698f7cea 100644 --- a/indra/llmath/llvector4logical.h +++ b/indra/llmath/llvector4logical.h @@ -27,6 +27,7 @@ #ifndef LL_VECTOR4LOGICAL_H #define LL_VECTOR4LOGICAL_H +#include "llmemory.h" //////////////////////////// // LLVector4Logical @@ -77,6 +78,7 @@ public: inline LLVector4Logical& invert() { static const LL_ALIGN_16(U32 allOnes[4]) = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }; + ll_assert_aligned(allOnes,16); mQ = _mm_andnot_ps( mQ, *(LLQuad*)(allOnes) ); return *this; } diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index cc9744756f..02c8d2b86f 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -35,7 +35,6 @@ #include <cmath> #include "llerror.h" -#include "llmemtype.h" #include "llvolumemgr.h" #include "v2math.h" @@ -95,17 +94,6 @@ const S32 SCULPT_MIN_AREA_DETAIL = 1; extern BOOL gDebugGL; -void assert_aligned(void* ptr, uintptr_t alignment) -{ -#if 0 - uintptr_t t = (uintptr_t) ptr; - if (t%alignment != 0) - { - llerrs << "Alignment check failed." << llendl; - } -#endif -} - BOOL check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm) { LLVector3 test = (pt2-pt1)%(pt3-pt2); @@ -328,16 +316,16 @@ public: LLVector4a& min = node->mExtents[0]; LLVector4a& max = node->mExtents[1]; - if (!branch->getData().empty()) + if (!branch->isEmpty()) { //node has data, find AABB that binds data set - const LLVolumeTriangle* tri = *(branch->getData().begin()); + const LLVolumeTriangle* tri = *(branch->getDataBegin()); //initialize min/max to first available vertex min = *(tri->mV[0]); max = *(tri->mV[0]); for (LLOctreeNode<LLVolumeTriangle>::const_element_iter iter = - branch->getData().begin(); iter != branch->getData().end(); ++iter) + branch->getDataBegin(); iter != branch->getDataEnd(); ++iter) { //for each triangle in node //stretch by triangles in node @@ -352,7 +340,7 @@ public: max.setMax(max, *tri->mV[2]); } } - else if (!branch->getChildren().empty()) + else if (!branch->isLeaf()) { //no data, but child nodes exist LLVolumeOctreeListener* child = (LLVolumeOctreeListener*) branch->getChild(0)->getListener(0); @@ -389,8 +377,6 @@ public: LLProfile::Face* LLProfile::addCap(S16 faceID) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - Face *face = vector_append(mFaces, 1); face->mIndex = 0; @@ -403,8 +389,6 @@ LLProfile::Face* LLProfile::addCap(S16 faceID) LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BOOL flat) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - Face *face = vector_append(mFaces, 1); face->mIndex = i; @@ -420,7 +404,6 @@ LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BO //static S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split) { // this is basically LLProfile::genNGon stripped down to only the operations that influence the number of points - LLMemType m1(LLMemType::MTYPE_VOLUME); S32 np = 0; // Generate an n-sided "circular" path. @@ -486,8 +469,6 @@ S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 of // filleted and chamfered corners void LLProfile::genNGon(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - // Generate an n-sided "circular" path. // 0 is (1,0), and we go counter-clockwise along a circular path from there. const F32 tableScale[] = { 1, 1, 1, 0.5f, 0.707107f, 0.53f, 0.525f, 0.5f }; @@ -741,8 +722,6 @@ LLProfile::Face* LLProfile::addHole(const LLProfileParams& params, BOOL flat, F3 S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split, BOOL is_sculpted, S32 sculpt_size) { // this is basically LLProfile::generate stripped down to only operations that influence the number of points - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (detail < MIN_LOD) { detail = MIN_LOD; @@ -853,8 +832,6 @@ S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 de BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split, BOOL is_sculpted, S32 sculpt_size) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if ((!mDirty) && (!is_sculpted)) { return FALSE; @@ -1127,8 +1104,6 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai BOOL LLProfileParams::importFile(LLFILE *fp) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of these buffers will require @@ -1204,8 +1179,6 @@ BOOL LLProfileParams::exportFile(LLFILE *fp) const BOOL LLProfileParams::importLegacyStream(std::istream& input_stream) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of these buffers will require @@ -1297,7 +1270,6 @@ bool LLProfileParams::fromLLSD(LLSD& sd) void LLProfileParams::copyParams(const LLProfileParams ¶ms) { - LLMemType m1(LLMemType::MTYPE_VOLUME); setCurveType(params.getCurveType()); setBegin(params.getBegin()); setEnd(params.getEnd()); @@ -1514,8 +1486,6 @@ const LLVector2 LLPathParams::getEndScale() const S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail) { // this is basically LLPath::generate stripped down to only the operations that influence the number of points - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (detail < MIN_LOD) { detail = MIN_LOD; @@ -1565,8 +1535,6 @@ S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail) BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL is_sculpted, S32 sculpt_size) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if ((!mDirty) && (!is_sculpted)) { return FALSE; @@ -1694,8 +1662,6 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL is_sculpted, S32 sculpt_size) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - mOpen = TRUE; // Draw end caps if (getPathLength() == 0) { @@ -1717,8 +1683,6 @@ BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL LLPathParams::importFile(LLFILE *fp) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of these buffers will require @@ -1863,8 +1827,6 @@ BOOL LLPathParams::exportFile(LLFILE *fp) const BOOL LLPathParams::importLegacyStream(std::istream& input_stream) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of these buffers will require @@ -2072,8 +2034,6 @@ S32 LLVolume::sNumMeshPoints = 0; LLVolume::LLVolume(const LLVolumeParams ¶ms, const F32 detail, const BOOL generate_single_face, const BOOL is_unique) : mParams(params) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - mUnique = is_unique; mFaceMask = 0x0; mDetail = detail; @@ -2145,7 +2105,6 @@ LLVolume::~LLVolume() BOOL LLVolume::generate() { - LLMemType m1(LLMemType::MTYPE_VOLUME); llassert_always(mProfilep); //Added 10.03.05 Dave Parks @@ -2741,8 +2700,6 @@ S32 LLVolume::getNumFaces() const void LLVolume::createVolumeFaces() { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (mGenerateSingleFace) { // do nothing @@ -2914,8 +2871,6 @@ F32 LLVolume::sculptGetSurfaceArea() // create placeholder shape void LLVolume::sculptGeneratePlaceholder() { - LLMemType m1(LLMemType::MTYPE_VOLUME); - S32 sizeS = mPathp->mPath.size(); S32 sizeT = mProfilep->mProfile.size(); @@ -2952,9 +2907,6 @@ void LLVolume::sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8 BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR; BOOL reverse_horizontal = (sculpt_invert ? !sculpt_mirror : sculpt_mirror); // XOR - - LLMemType m1(LLMemType::MTYPE_VOLUME); - S32 sizeS = mPathp->mPath.size(); S32 sizeT = mProfilep->mProfile.size(); @@ -3103,7 +3055,6 @@ void sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32 // sculpt replaces generate() for sculpted surfaces void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level) { - LLMemType m1(LLMemType::MTYPE_VOLUME); U8 sculpt_type = mParams.getSculptType(); BOOL data_is_empty = FALSE; @@ -3240,7 +3191,6 @@ bool LLVolumeParams::operator<(const LLVolumeParams ¶ms) const void LLVolumeParams::copyParams(const LLVolumeParams ¶ms) { - LLMemType m1(LLMemType::MTYPE_VOLUME); mProfileParams.copyParams(params.mProfileParams); mPathParams.copyParams(params.mPathParams); mSculptID = params.getSculptID(); @@ -3612,8 +3562,6 @@ bool LLVolumeParams::validate(U8 prof_curve, F32 prof_begin, F32 prof_end, F32 h S32 *LLVolume::getTriangleIndices(U32 &num_indices) const { - LLMemType m1(LLMemType::MTYPE_VOLUME); - S32 expected_num_triangle_indices = getNumTriangleIndices(); if (expected_num_triangle_indices > MAX_VOLUME_TRIANGLE_INDICES) { @@ -4341,8 +4289,6 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices, const LLMatrix3& norm_mat_in, S32 face_mask) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - LLMatrix4a mat; mat.loadu(mat_in); @@ -4804,241 +4750,8 @@ BOOL equalTriangle(const S32 *a, const S32 *b) return FALSE; } -BOOL LLVolume::cleanupTriangleData( const S32 num_input_vertices, - const std::vector<Point>& input_vertices, - const S32 num_input_triangles, - S32 *input_triangles, - S32 &num_output_vertices, - LLVector3 **output_vertices, - S32 &num_output_triangles, - S32 **output_triangles) -{ - LLMemType m1(LLMemType::MTYPE_VOLUME); - - /* Testing: avoid any cleanup - static BOOL skip_cleanup = TRUE; - if ( skip_cleanup ) - { - num_output_vertices = num_input_vertices; - num_output_triangles = num_input_triangles; - - *output_vertices = new LLVector3[num_input_vertices]; - for (S32 index = 0; index < num_input_vertices; index++) - { - (*output_vertices)[index] = input_vertices[index].mPos; - } - - *output_triangles = new S32[num_input_triangles*3]; - memcpy(*output_triangles, input_triangles, 3*num_input_triangles*sizeof(S32)); // Flawfinder: ignore - return TRUE; - } - */ - - // Here's how we do this: - // Create a structure which contains the original vertex index and the - // LLVector3 data. - // "Sort" the data by the vectors - // Create an array the size of the old vertex list, with a mapping of - // old indices to new indices. - // Go through triangles, shift so the lowest index is first - // Sort triangles by first index - // Remove duplicate triangles - // Allocate and pack new triangle data. - - //LLTimer cleanupTimer; - //llinfos << "In vertices: " << num_input_vertices << llendl; - //llinfos << "In triangles: " << num_input_triangles << llendl; - - S32 i; - typedef std::multiset<LLVertexIndexPair*, lessVertex> vertex_set_t; - vertex_set_t vertex_list; - - LLVertexIndexPair *pairp = NULL; - for (i = 0; i < num_input_vertices; i++) - { - LLVertexIndexPair *new_pairp = new LLVertexIndexPair(input_vertices[i].mPos, i); - vertex_list.insert(new_pairp); - } - - // Generate the vertex mapping and the list of vertices without - // duplicates. This will crash if there are no vertices. - llassert(num_input_vertices > 0); // check for no vertices! - S32 *vertex_mapping = new S32[num_input_vertices]; - LLVector3 *new_vertices = new LLVector3[num_input_vertices]; - LLVertexIndexPair *prev_pairp = NULL; - - S32 new_num_vertices; - - new_num_vertices = 0; - for (vertex_set_t::iterator iter = vertex_list.begin(), - end = vertex_list.end(); - iter != end; iter++) - { - pairp = *iter; - if (!prev_pairp || ((pairp->mVertex - prev_pairp->mVertex).magVecSquared() >= VERTEX_SLOP_SQRD)) - { - new_vertices[new_num_vertices] = pairp->mVertex; - //llinfos << "Added vertex " << new_num_vertices << " : " << pairp->mVertex << llendl; - new_num_vertices++; - // Update the previous - prev_pairp = pairp; - } - else - { - //llinfos << "Removed duplicate vertex " << pairp->mVertex << ", distance magVecSquared() is " << (pairp->mVertex - prev_pairp->mVertex).magVecSquared() << llendl; - } - vertex_mapping[pairp->mIndex] = new_num_vertices - 1; - } - - // Iterate through triangles and remove degenerates, re-ordering vertices - // along the way. - S32 *new_triangles = new S32[num_input_triangles * 3]; - S32 new_num_triangles = 0; - - for (i = 0; i < num_input_triangles; i++) - { - S32 v1 = i*3; - S32 v2 = v1 + 1; - S32 v3 = v1 + 2; - - //llinfos << "Checking triangle " << input_triangles[v1] << ":" << input_triangles[v2] << ":" << input_triangles[v3] << llendl; - input_triangles[v1] = vertex_mapping[input_triangles[v1]]; - input_triangles[v2] = vertex_mapping[input_triangles[v2]]; - input_triangles[v3] = vertex_mapping[input_triangles[v3]]; - - if ((input_triangles[v1] == input_triangles[v2]) - || (input_triangles[v1] == input_triangles[v3]) - || (input_triangles[v2] == input_triangles[v3])) - { - //llinfos << "Removing degenerate triangle " << input_triangles[v1] << ":" << input_triangles[v2] << ":" << input_triangles[v3] << llendl; - // Degenerate triangle, skip - continue; - } - - if (input_triangles[v1] < input_triangles[v2]) - { - if (input_triangles[v1] < input_triangles[v3]) - { - // (0 < 1) && (0 < 2) - new_triangles[new_num_triangles*3] = input_triangles[v1]; - new_triangles[new_num_triangles*3+1] = input_triangles[v2]; - new_triangles[new_num_triangles*3+2] = input_triangles[v3]; - } - else - { - // (0 < 1) && (2 < 0) - new_triangles[new_num_triangles*3] = input_triangles[v3]; - new_triangles[new_num_triangles*3+1] = input_triangles[v1]; - new_triangles[new_num_triangles*3+2] = input_triangles[v2]; - } - } - else if (input_triangles[v2] < input_triangles[v3]) - { - // (1 < 0) && (1 < 2) - new_triangles[new_num_triangles*3] = input_triangles[v2]; - new_triangles[new_num_triangles*3+1] = input_triangles[v3]; - new_triangles[new_num_triangles*3+2] = input_triangles[v1]; - } - else - { - // (1 < 0) && (2 < 1) - new_triangles[new_num_triangles*3] = input_triangles[v3]; - new_triangles[new_num_triangles*3+1] = input_triangles[v1]; - new_triangles[new_num_triangles*3+2] = input_triangles[v2]; - } - new_num_triangles++; - } - - if (new_num_triangles == 0) - { - llwarns << "Created volume object with 0 faces." << llendl; - delete[] new_triangles; - delete[] vertex_mapping; - delete[] new_vertices; - return FALSE; - } - - typedef std::set<S32*, lessTriangle> triangle_set_t; - triangle_set_t triangle_list; - - for (i = 0; i < new_num_triangles; i++) - { - triangle_list.insert(&new_triangles[i*3]); - } - - // Sort through the triangle list, and delete duplicates - - S32 *prevp = NULL; - S32 *curp = NULL; - - S32 *sorted_tris = new S32[new_num_triangles*3]; - S32 cur_tri = 0; - for (triangle_set_t::iterator iter = triangle_list.begin(), - end = triangle_list.end(); - iter != end; iter++) - { - curp = *iter; - if (!prevp || !equalTriangle(prevp, curp)) - { - //llinfos << "Added triangle " << *curp << ":" << *(curp+1) << ":" << *(curp+2) << llendl; - sorted_tris[cur_tri*3] = *curp; - sorted_tris[cur_tri*3+1] = *(curp+1); - sorted_tris[cur_tri*3+2] = *(curp+2); - cur_tri++; - prevp = curp; - } - else - { - //llinfos << "Skipped triangle " << *curp << ":" << *(curp+1) << ":" << *(curp+2) << llendl; - } - } - - *output_vertices = new LLVector3[new_num_vertices]; - num_output_vertices = new_num_vertices; - for (i = 0; i < new_num_vertices; i++) - { - (*output_vertices)[i] = new_vertices[i]; - } - - *output_triangles = new S32[cur_tri*3]; - num_output_triangles = cur_tri; - memcpy(*output_triangles, sorted_tris, 3*cur_tri*sizeof(S32)); /* Flawfinder: ignore */ - - /* - llinfos << "Out vertices: " << num_output_vertices << llendl; - llinfos << "Out triangles: " << num_output_triangles << llendl; - for (i = 0; i < num_output_vertices; i++) - { - llinfos << i << ":" << (*output_vertices)[i] << llendl; - } - for (i = 0; i < num_output_triangles; i++) - { - llinfos << i << ":" << (*output_triangles)[i*3] << ":" << (*output_triangles)[i*3+1] << ":" << (*output_triangles)[i*3+2] << llendl; - } - */ - - //llinfos << "Out vertices: " << num_output_vertices << llendl; - //llinfos << "Out triangles: " << num_output_triangles << llendl; - delete[] vertex_mapping; - vertex_mapping = NULL; - delete[] new_vertices; - new_vertices = NULL; - delete[] new_triangles; - new_triangles = NULL; - delete[] sorted_tris; - sorted_tris = NULL; - triangle_list.clear(); - std::for_each(vertex_list.begin(), vertex_list.end(), DeletePointer()); - vertex_list.clear(); - - return TRUE; -} - - BOOL LLVolumeParams::importFile(LLFILE *fp) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - //llinfos << "importing volume" << llendl; const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ @@ -5093,8 +4806,6 @@ BOOL LLVolumeParams::exportFile(LLFILE *fp) const BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - //llinfos << "importing volume" << llendl; const S32 BUFSIZE = 16384; // *NOTE: changing the size or type of this buffer will require @@ -5134,8 +4845,6 @@ BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) BOOL LLVolumeParams::exportLegacyStream(std::ostream& output_stream) const { - LLMemType m1(LLMemType::MTYPE_VOLUME); - output_stream <<"\tshape 0\n"; output_stream <<"\t{\n"; mPathParams.exportLegacyStream(output_stream); @@ -6351,8 +6060,6 @@ void LerpPlanarVertex(LLVolumeFace::VertexData& v0, BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const std::vector<LLVolume::Point>& mesh = volume->getMesh(); const std::vector<LLVector3>& profile = volume->getProfile().mProfile; S32 max_s = volume->getProfile().getTotal(); @@ -6503,8 +6210,6 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (!(mTypeMask & HOLLOW_MASK) && !(mTypeMask & OPEN_MASK) && ((volume->getParams().getPathParams().getBegin()==0.0f)&& @@ -6891,8 +6596,6 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) void LLVolumeFace::createBinormals() { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (!mBinormals) { allocateBinormals(mNumVertices); @@ -6962,14 +6665,14 @@ void LLVolumeFace::resizeVertices(S32 num_verts) if (num_verts) { mPositions = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); - assert_aligned(mPositions, 16); + ll_assert_aligned(mPositions, 16); mNormals = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); - assert_aligned(mNormals, 16); + ll_assert_aligned(mNormals, 16); //pad texture coordinate block end to allow for QWORD reads S32 size = ((num_verts*sizeof(LLVector2)) + 0xF) & ~0xF; mTexCoords = (LLVector2*) ll_aligned_malloc_16(size); - assert_aligned(mTexCoords, 16); + ll_assert_aligned(mTexCoords, 16); } else { @@ -6990,17 +6693,21 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con { S32 new_verts = mNumVertices+1; S32 new_size = new_verts*16; -// S32 old_size = mNumVertices*16; + S32 old_size = mNumVertices*16; //positions - mPositions = (LLVector4a*) realloc(mPositions, new_size); + mPositions = (LLVector4a*) ll_aligned_realloc_16(mPositions, new_size, old_size); + ll_assert_aligned(mPositions,16); //normals - mNormals = (LLVector4a*) realloc(mNormals, new_size); - + mNormals = (LLVector4a*) ll_aligned_realloc_16(mNormals, new_size, old_size); + ll_assert_aligned(mNormals,16); + //tex coords new_size = ((new_verts*8)+0xF) & ~0xF; - mTexCoords = (LLVector2*) realloc(mTexCoords, new_size); + old_size = ((mNumVertices*8)+0xF) & ~0xF; + mTexCoords = (LLVector2*) ll_aligned_realloc_16(mTexCoords, new_size, old_size); + ll_assert_aligned(mTexCoords,16); //just clear binormals @@ -7053,7 +6760,8 @@ void LLVolumeFace::pushIndex(const U16& idx) S32 old_size = ((mNumIndices*2)+0xF) & ~0xF; if (new_size != old_size) { - mIndices = (U16*) realloc(mIndices, new_size); + mIndices = (U16*) ll_aligned_realloc_16(mIndices, new_size, old_size); + ll_assert_aligned(mIndices,16); } mIndices[mNumIndices++] = idx; @@ -7094,12 +6802,12 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat } //allocate new buffer space - mPositions = (LLVector4a*) realloc(mPositions, new_count*sizeof(LLVector4a)); - assert_aligned(mPositions, 16); - mNormals = (LLVector4a*) realloc(mNormals, new_count*sizeof(LLVector4a)); - assert_aligned(mNormals, 16); - mTexCoords = (LLVector2*) realloc(mTexCoords, (new_count*sizeof(LLVector2)+0xF) & ~0xF); - assert_aligned(mTexCoords, 16); + mPositions = (LLVector4a*) ll_aligned_realloc_16(mPositions, new_count*sizeof(LLVector4a), mNumVertices*sizeof(LLVector4a)); + ll_assert_aligned(mPositions, 16); + mNormals = (LLVector4a*) ll_aligned_realloc_16(mNormals, new_count*sizeof(LLVector4a), mNumVertices*sizeof(LLVector4a)); + ll_assert_aligned(mNormals, 16); + mTexCoords = (LLVector2*) ll_aligned_realloc_16(mTexCoords, (new_count*sizeof(LLVector2)+0xF) & ~0xF, (mNumVertices*sizeof(LLVector2)+0xF) & ~0xF); + ll_assert_aligned(mTexCoords, 16); mNumVertices = new_count; @@ -7145,7 +6853,7 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat new_count = mNumIndices + face.mNumIndices; //allocate new index buffer - mIndices = (U16*) realloc(mIndices, (new_count*sizeof(U16)+0xF) & ~0xF); + mIndices = (U16*) ll_aligned_realloc_16(mIndices, (new_count*sizeof(U16)+0xF) & ~0xF, (mNumIndices*sizeof(U16)+0xF) & ~0xF); //get destination address into new index buffer U16* dst_idx = mIndices+mNumIndices; @@ -7159,8 +6867,6 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - BOOL flat = mTypeMask & FLAT_MASK; U8 sculpt_type = volume->getParams().getSculptType(); diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 2e6f9e2f71..c845556557 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -1023,17 +1023,6 @@ public: LLVector3* normal = NULL, LLVector3* bi_normal = NULL); - // The following cleans up vertices and triangles, - // getting rid of degenerate triangles and duplicate vertices, - // and allocates new arrays with the clean data. - static BOOL cleanupTriangleData( const S32 num_input_vertices, - const std::vector<Point> &input_vertices, - const S32 num_input_triangles, - S32 *input_triangles, - S32 &num_output_vertices, - LLVector3 **output_vertices, - S32 &num_output_triangles, - S32 **output_triangles); LLFaceID generateFaceMask(); BOOL isFaceMaskValid(LLFaceID face_mask); diff --git a/indra/llmath/llvolumemgr.cpp b/indra/llmath/llvolumemgr.cpp index c60b750088..9083273ee5 100644 --- a/indra/llmath/llvolumemgr.cpp +++ b/indra/llmath/llvolumemgr.cpp @@ -26,7 +26,6 @@ #include "linden_common.h" #include "llvolumemgr.h" -#include "llmemtype.h" #include "llvolume.h" @@ -182,7 +181,6 @@ void LLVolumeMgr::insertGroup(LLVolumeLODGroup* volgroup) // protected LLVolumeLODGroup* LLVolumeMgr::createNewGroup(const LLVolumeParams& volume_params) { - LLMemType m1(LLMemType::MTYPE_VOLUME); LLVolumeLODGroup* volgroup = new LLVolumeLODGroup(volume_params); insertGroup(volgroup); return volgroup; @@ -297,7 +295,6 @@ LLVolume* LLVolumeLODGroup::refLOD(const S32 detail) mRefs++; if (mVolumeLODs[detail].isNull()) { - LLMemType m1(LLMemType::MTYPE_VOLUME); mVolumeLODs[detail] = new LLVolume(mVolumeParams, mDetailScales[detail]); } mLODRefs[detail]++; diff --git a/indra/llmath/llvolumeoctree.cpp b/indra/llmath/llvolumeoctree.cpp index b5a935c2b5..cc83cb7235 100644 --- a/indra/llmath/llvolumeoctree.cpp +++ b/indra/llmath/llvolumeoctree.cpp @@ -131,7 +131,7 @@ void LLOctreeTriangleRayIntersect::traverse(const LLOctreeNode<LLVolumeTriangle> void LLOctreeTriangleRayIntersect::visit(const LLOctreeNode<LLVolumeTriangle>* node) { for (LLOctreeNode<LLVolumeTriangle>::const_element_iter iter = - node->getData().begin(); iter != node->getData().end(); ++iter) + node->getDataBegin(); iter != node->getDataEnd(); ++iter) { const LLVolumeTriangle* tri = *iter; @@ -236,8 +236,8 @@ void LLVolumeOctreeValidate::visit(const LLOctreeNode<LLVolumeTriangle>* branch) } //children fit, check data - for (LLOctreeNode<LLVolumeTriangle>::const_element_iter iter = branch->getData().begin(); - iter != branch->getData().end(); ++iter) + for (LLOctreeNode<LLVolumeTriangle>::const_element_iter iter = branch->getDataBegin(); + iter != branch->getDataEnd(); ++iter) { const LLVolumeTriangle* tri = *iter; diff --git a/indra/llmath/llvolumeoctree.h b/indra/llmath/llvolumeoctree.h index 688d91dc40..9ae34a0c4e 100644 --- a/indra/llmath/llvolumeoctree.h +++ b/indra/llmath/llvolumeoctree.h @@ -37,9 +37,19 @@ class LLVolumeTriangle : public LLRefCount { public: + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + LLVolumeTriangle() { - + mBinIndex = -1; } LLVolumeTriangle(const LLVolumeTriangle& rhs) @@ -58,21 +68,38 @@ public: } - LLVector4a mPositionGroup; + LL_ALIGN_16(LLVector4a mPositionGroup); const LLVector4a* mV[3]; U16 mIndex[3]; F32 mRadius; + mutable S32 mBinIndex; + virtual const LLVector4a& getPositionGroup() const; virtual const F32& getBinRadius() const; + + S32 getBinIndex() const { return mBinIndex; } + void setBinIndex(S32 idx) const { mBinIndex = idx; } + + }; class LLVolumeOctreeListener : public LLOctreeListener<LLVolumeTriangle> { public: + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + LLVolumeOctreeListener(LLOctreeNode<LLVolumeTriangle>* node); ~LLVolumeOctreeListener(); @@ -99,8 +126,8 @@ public: public: - LLVector4a mBounds[2]; // bounding box (center, size) of this node and all its children (tight fit to objects) - LLVector4a mExtents[2]; // extents (min, max) of this node and all its children + LL_ALIGN_16(LLVector4a mBounds[2]); // bounding box (center, size) of this node and all its children (tight fit to objects) + LL_ALIGN_16(LLVector4a mExtents[2]); // extents (min, max) of this node and all its children }; class LLOctreeTriangleRayIntersect : public LLOctreeTraveler<LLVolumeTriangle> diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index ac0c45ae6f..5ee3c45502 100644 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -34,16 +34,6 @@ #include "../llsimdmath.h" #include "../llvector4a.h" -void* operator new(size_t size) -{ - return ll_aligned_malloc_16(size); -} - -void operator delete(void *p) -{ - ll_aligned_free_16(p); -} - namespace tut { @@ -59,6 +49,27 @@ tut::alignment_test_t tut_alignment_test("LLAlignment"); LL_ALIGN_PREFIX(16) class MyVector4a { +public: + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void *p) + { + ll_aligned_free_16(p); + } + + void* operator new[](size_t count) + { // try to allocate count bytes for an array + return ll_aligned_malloc_16(count); + } + + void operator delete[](void *p) + { + ll_aligned_free_16(p); + } + LLQuad mQ; } LL_ALIGN_POSTFIX(16); @@ -68,7 +79,7 @@ template<> template<> void alignment_test_object_t::test<1>() { # ifdef LL_DEBUG - skip("This test fails on Windows when compiled in debug mode."); +// skip("This test fails on Windows when compiled in debug mode."); # endif const int num_tests = 7; @@ -78,7 +89,7 @@ void alignment_test_object_t::test<1>() align_ptr = ll_aligned_malloc_16(sizeof(MyVector4a)); ensure("ll_aligned_malloc_16 failed", is_aligned(align_ptr,16)); - align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a)); + align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a), sizeof(MyVector4a)); ensure("ll_aligned_realloc_16 failed", is_aligned(align_ptr,16)); ll_aligned_free_16(align_ptr); @@ -105,7 +116,7 @@ template<> template<> void alignment_test_object_t::test<3>() { # ifdef LL_DEBUG - skip("This test fails on Windows when compiled in debug mode."); +// skip("This test fails on Windows when compiled in debug mode."); # endif const int ARR_SIZE = 7; @@ -117,12 +128,14 @@ void alignment_test_object_t::test<3>() } MyVector4a *veca = new MyVector4a[ARR_SIZE]; + //std::cout << "veca base is " << (S32) veca << std::endl; ensure("LLAligment veca base", is_aligned(veca,16)); for(int i=0; i<ARR_SIZE; i++) { std::cout << "veca[" << i << "]" << std::endl; ensure("LLAlignment veca member unaligned", is_aligned(&veca[i],16)); } + delete [] veca; } } diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h index 56cb2ae73e..daf3a6857b 100644 --- a/indra/llmath/v3color.h +++ b/indra/llmath/v3color.h @@ -33,6 +33,7 @@ class LLVector4; #include "llerror.h" #include "llmath.h" #include "llsd.h" +#include <string.h> // LLColor3 = |r g b| diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index ff31f7665e..8f91d2a23f 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -43,26 +43,26 @@ namespace LLAvatarNameCache { use_display_name_signal_t mUseDisplayNamesSignal; - // Manual override for display names - can disable even if the region - // supports it. - bool sUseDisplayNames = true; - // Cache starts in a paused state until we can determine if the // current region supports display names. bool sRunning = false; + // Use the People API (modern) for fetching name if true. Use the old legacy protocol if false. + // For testing, there's a UsePeopleAPI setting that can be flipped (must restart viewer). + bool sUsePeopleAPI = true; + // Base lookup URL for name service. // On simulator, loaded from indra.xml // On viewer, usually a simulator capability (at People API team's request) // Includes the trailing slash, like "http://pdp60.lindenlab.com:8000/agents/" std::string sNameLookupURL; - // accumulated agent IDs for next query against service + // Accumulated agent IDs for next query against service typedef std::set<LLUUID> ask_queue_t; ask_queue_t sAskQueue; - // agent IDs that have been requested, but with no reply - // maps agent ID to frame time request was made + // Agent IDs that have been requested, but with no reply. + // Maps agent ID to frame time request was made. typedef std::map<LLUUID, F64> pending_queue_t; pending_queue_t sPendingQueue; @@ -73,45 +73,43 @@ namespace LLAvatarNameCache typedef std::map<LLUUID, callback_signal_t*> signal_map_t; signal_map_t sSignalMap; - // names we know about + // The cache at last, i.e. avatar names we know about. typedef std::map<LLUUID, LLAvatarName> cache_t; cache_t sCache; - // Send bulk lookup requests a few times a second at most - // only need per-frame timing resolution + // Send bulk lookup requests a few times a second at most. + // Only need per-frame timing resolution. LLFrameTimer sRequestTimer; - /// Maximum time an unrefreshed cache entry is allowed + // Maximum time an unrefreshed cache entry is allowed. const F64 MAX_UNREFRESHED_TIME = 20.0 * 60.0; - /// Time when unrefreshed cached names were checked last + // Time when unrefreshed cached names were checked last. static F64 sLastExpireCheck; + // Time-to-live for a temp cache entry. + const F64 TEMP_CACHE_ENTRY_LIFETIME = 60.0; + //----------------------------------------------------------------------- // Internal methods //----------------------------------------------------------------------- // Handle name response off network. - // Optionally skip adding to cache, used when this is a fallback to the - // legacy name system. void processName(const LLUUID& agent_id, - const LLAvatarName& av_name, - bool add_to_cache); + const LLAvatarName& av_name); void requestNamesViaCapability(); - // Legacy name system callback + // Legacy name system callbacks void legacyNameCallback(const LLUUID& agent_id, const std::string& full_name, - bool is_group - ); - + bool is_group); + void legacyNameFetch(const LLUUID& agent_id, + const std::string& full_name, + bool is_group); + void requestNamesViaLegacy(); - // Fill in an LLAvatarName with the legacy name data - void buildLegacyName(const std::string& full_name, - LLAvatarName* av_name); - // Do a single callback to a given slot void fireSignal(const LLUUID& agent_id, const callback_slot_t& slot, @@ -206,20 +204,11 @@ public: // Use expiration time from header av_name.mExpires = expires; - // Some avatars don't have explicit display names set - if (av_name.mDisplayName.empty()) - { - av_name.mDisplayName = av_name.mUsername; - } - - LL_DEBUGS("AvNameCache") << "LLAvatarNameResponder::result for " << agent_id << " " - << "user '" << av_name.mUsername << "' " - << "display '" << av_name.mDisplayName << "' " - << "expires in " << expires - now << " seconds" - << LL_ENDL; + LL_DEBUGS("AvNameCache") << "LLAvatarNameResponder::result for " << agent_id << LL_ENDL; + av_name.dump(); // cache it and fire signals - LLAvatarNameCache::processName(agent_id, av_name, true); + LLAvatarNameCache::processName(agent_id, av_name); } // Same logic as error response case @@ -274,41 +263,36 @@ void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id) { // there is no existing cache entry, so make a temporary name from legacy LL_WARNS("AvNameCache") << "LLAvatarNameCache get legacy for agent " - << agent_id << LL_ENDL; + << agent_id << LL_ENDL; gCacheName->get(agent_id, false, // legacy compatibility - boost::bind(&LLAvatarNameCache::legacyNameCallback, - _1, _2, _3)); + boost::bind(&LLAvatarNameCache::legacyNameFetch, _1, _2, _3)); } else { - // we have a chached (but probably expired) entry - since that would have + // we have a cached (but probably expired) entry - since that would have // been returned by the get method, there is no need to signal anyone // Clear this agent from the pending list LLAvatarNameCache::sPendingQueue.erase(agent_id); - const LLAvatarName& av_name = existing->second; - LL_DEBUGS("AvNameCache") << "LLAvatarNameCache use cache for agent " - << agent_id - << "user '" << av_name.mUsername << "' " - << "display '" << av_name.mDisplayName << "' " - << "expires in " << av_name.mExpires - LLFrameTimer::getTotalSeconds() << " seconds" - << LL_ENDL; + LLAvatarName& av_name = existing->second; + LL_DEBUGS("AvNameCache") << "LLAvatarNameCache use cache for agent " << agent_id << LL_ENDL; + av_name.dump(); + + // Reset expiry time so we don't constantly rerequest. + av_name.setExpires(TEMP_CACHE_ENTRY_LIFETIME); } } -void LLAvatarNameCache::processName(const LLUUID& agent_id, - const LLAvatarName& av_name, - bool add_to_cache) +void LLAvatarNameCache::processName(const LLUUID& agent_id, const LLAvatarName& av_name) { - if (add_to_cache) - { - sCache[agent_id] = av_name; - } + // Add to the cache + sCache[agent_id] = av_name; + // Suppress request from the queue sPendingQueue.erase(agent_id); - // signal everyone waiting on this name + // Signal everyone waiting on this name signal_map_t::iterator sig_it = sSignalMap.find(agent_id); if (sig_it != sSignalMap.end()) { @@ -330,8 +314,9 @@ void LLAvatarNameCache::requestNamesViaCapability() // http://pdp60.lindenlab.com:8000/agents/?ids=3941037e-78ab-45f0-b421-bd6e77c1804d&ids=0012809d-7d2d-4c24-9609-af1230a37715&ids=0019aaba-24af-4f0a-aa72-6457953cf7f0 // // Apache can handle URLs of 4096 chars, but let's be conservative - const U32 NAME_URL_MAX = 4096; - const U32 NAME_URL_SEND_THRESHOLD = 3000; + static const U32 NAME_URL_MAX = 4096; + static const U32 NAME_URL_SEND_THRESHOLD = 3500; + std::string url; url.reserve(NAME_URL_MAX); @@ -339,10 +324,12 @@ void LLAvatarNameCache::requestNamesViaCapability() agent_ids.reserve(128); U32 ids = 0; - ask_queue_t::const_iterator it = sAskQueue.begin(); - for ( ; it != sAskQueue.end(); ++it) + ask_queue_t::const_iterator it; + while(!sAskQueue.empty()) { - const LLUUID& agent_id = *it; + it = sAskQueue.begin(); + LLUUID agent_id = *it; + sAskQueue.erase(it); if (url.empty()) { @@ -365,57 +352,63 @@ void LLAvatarNameCache::requestNamesViaCapability() if (url.size() > NAME_URL_SEND_THRESHOLD) { - LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::requestNamesViaCapability first " - << ids << " ids" - << LL_ENDL; - LLHTTPClient::get(url, new LLAvatarNameResponder(agent_ids)); - url.clear(); - agent_ids.clear(); + break; } } if (!url.empty()) { - LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::requestNamesViaCapability all " + LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::requestNamesViaCapability requested " << ids << " ids" << LL_ENDL; LLHTTPClient::get(url, new LLAvatarNameResponder(agent_ids)); - url.clear(); - agent_ids.clear(); } - - // We've moved all asks to the pending request queue - sAskQueue.clear(); } void LLAvatarNameCache::legacyNameCallback(const LLUUID& agent_id, const std::string& full_name, bool is_group) { - // Construct a dummy record for this name. By convention, SLID is blank - // Never expires, but not written to disk, so lasts until end of session. - LLAvatarName av_name; - LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::legacyNameCallback " - << "agent " << agent_id << " " + // Put the received data in the cache + legacyNameFetch(agent_id, full_name, is_group); + + // Retrieve the name and set it to never (or almost never...) expire: when we are using the legacy + // protocol, we do not get an expiration date for each name and there's no reason to ask the + // data again and again so we set the expiration time to the largest value admissible. + std::map<LLUUID,LLAvatarName>::iterator av_record = sCache.find(agent_id); + LLAvatarName& av_name = av_record->second; + av_name.setExpires(MAX_UNREFRESHED_TIME); +} + +void LLAvatarNameCache::legacyNameFetch(const LLUUID& agent_id, + const std::string& full_name, + bool is_group) +{ + LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::legacyNameFetch " + << "agent " << agent_id << " " << "full name '" << full_name << "'" - << ( is_group ? " [group]" : "" ) - << LL_ENDL; - buildLegacyName(full_name, &av_name); - - // Don't add to cache, the data already exists in the legacy name system - // cache and we don't want or need duplicate storage, because keeping the - // two copies in sync is complex. - processName(agent_id, av_name, false); + << ( is_group ? " [group]" : "" ) + << LL_ENDL; + + // Construct an av_name record from this name. + LLAvatarName av_name; + av_name.fromString(full_name); + + // Add to cache: we're still using the new cache even if we're using the old (legacy) protocol. + processName(agent_id, av_name); } void LLAvatarNameCache::requestNamesViaLegacy() { + static const S32 MAX_REQUESTS = 100; F64 now = LLFrameTimer::getTotalSeconds(); std::string full_name; - ask_queue_t::const_iterator it = sAskQueue.begin(); - for (; it != sAskQueue.end(); ++it) + ask_queue_t::const_iterator it; + for (S32 requests = 0; !sAskQueue.empty() && requests < MAX_REQUESTS; ++requests) { - const LLUUID& agent_id = *it; + it = sAskQueue.begin(); + LLUUID agent_id = *it; + sAskQueue.erase(it); // Mark as pending first, just in case the callback is immediately // invoked below. This should never happen in practice. @@ -424,22 +417,19 @@ void LLAvatarNameCache::requestNamesViaLegacy() LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::requestNamesViaLegacy agent " << agent_id << LL_ENDL; gCacheName->get(agent_id, false, // legacy compatibility - boost::bind(&LLAvatarNameCache::legacyNameCallback, - _1, _2, _3)); + boost::bind(&LLAvatarNameCache::legacyNameCallback, _1, _2, _3)); } - - // We've either answered immediately or moved all asks to the - // pending queue - sAskQueue.clear(); } -void LLAvatarNameCache::initClass(bool running) +void LLAvatarNameCache::initClass(bool running, bool usePeopleAPI) { sRunning = running; + sUsePeopleAPI = usePeopleAPI; } void LLAvatarNameCache::cleanupClass() { + sCache.clear(); } void LLAvatarNameCache::importFile(std::istream& istr) @@ -478,7 +468,7 @@ void LLAvatarNameCache::exportFile(std::ostream& ostr) const LLUUID& agent_id = it->first; const LLAvatarName& av_name = it->second; // Do not write temporary or expired entries to the stored cache - if (!av_name.mIsTemporaryName && av_name.mExpires >= max_unrefreshed) + if (av_name.isValidName(max_unrefreshed)) { // key must be a string agents[agent_id.asString()] = av_name.asLLSD(); @@ -499,6 +489,11 @@ bool LLAvatarNameCache::hasNameLookupURL() return !sNameLookupURL.empty(); } +bool LLAvatarNameCache::usePeopleAPI() +{ + return hasNameLookupURL() && sUsePeopleAPI; +} + void LLAvatarNameCache::idle() { // By convention, start running at first idle() call @@ -507,25 +502,30 @@ void LLAvatarNameCache::idle() // *TODO: Possibly re-enabled this based on People API load measurements // 100 ms is the threshold for "user speed" operations, so we can // stall for about that long to batch up requests. - //const F32 SECS_BETWEEN_REQUESTS = 0.1f; - //if (!sRequestTimer.checkExpirationAndReset(SECS_BETWEEN_REQUESTS)) - //{ - // return; - //} + const F32 SECS_BETWEEN_REQUESTS = 0.1f; + if (!sRequestTimer.hasExpired()) + { + return; + } if (!sAskQueue.empty()) { - if (useDisplayNames()) + if (usePeopleAPI()) { requestNamesViaCapability(); } else { - // ...fall back to legacy name cache system requestNamesViaLegacy(); } } + if (sAskQueue.empty()) + { + // cleared the list, reset the request timer. + sRequestTimer.resetWithExpiry(SECS_BETWEEN_REQUESTS); + } + // erase anything that has not been refreshed for more than MAX_UNREFRESHED_TIME eraseUnrefreshed(); } @@ -559,9 +559,8 @@ void LLAvatarNameCache::eraseUnrefreshed() const LLAvatarName& av_name = it->second; if (av_name.mExpires < max_unrefreshed) { - const LLUUID& agent_id = it->first; - LL_DEBUGS("AvNameCache") << agent_id - << " user '" << av_name.mUsername << "' " + LL_DEBUGS("AvNameCache") << it->first + << " user '" << av_name.getAccountName() << "' " << "expired " << now - av_name.mExpires << " secs ago" << LL_ENDL; sCache.erase(it++); @@ -575,20 +574,6 @@ void LLAvatarNameCache::eraseUnrefreshed() } } -void LLAvatarNameCache::buildLegacyName(const std::string& full_name, - LLAvatarName* av_name) -{ - llassert(av_name); - av_name->mUsername = ""; - av_name->mDisplayName = full_name; - av_name->mIsDisplayNameDefault = true; - av_name->mIsTemporaryName = true; - av_name->mExpires = F64_MAX; // not used because these are not cached - LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::buildLegacyName " - << full_name - << LL_ENDL; -} - // fills in av_name if it has it in the cache, even if expired (can check expiry time) // returns bool specifying if av_name was filled, false otherwise bool LLAvatarNameCache::get(const LLUUID& agent_id, LLAvatarName *av_name) @@ -596,38 +581,24 @@ bool LLAvatarNameCache::get(const LLUUID& agent_id, LLAvatarName *av_name) if (sRunning) { // ...only do immediate lookups when cache is running - if (useDisplayNames()) + std::map<LLUUID,LLAvatarName>::iterator it = sCache.find(agent_id); + if (it != sCache.end()) { - // ...use display names cache - std::map<LLUUID,LLAvatarName>::iterator it = sCache.find(agent_id); - if (it != sCache.end()) - { - *av_name = it->second; + *av_name = it->second; - // re-request name if entry is expired - if (av_name->mExpires < LLFrameTimer::getTotalSeconds()) + // re-request name if entry is expired + if (av_name->mExpires < LLFrameTimer::getTotalSeconds()) + { + if (!isRequestPending(agent_id)) { - if (!isRequestPending(agent_id)) - { - LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::get " - << "refresh agent " << agent_id - << LL_ENDL; - sAskQueue.insert(agent_id); - } + LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::get " + << "refresh agent " << agent_id + << LL_ENDL; + sAskQueue.insert(agent_id); } - - return true; - } - } - else - { - // ...use legacy names cache - std::string full_name; - if (gCacheName->getFullName(agent_id, full_name)) - { - buildLegacyName(full_name, av_name); - return true; } + + return true; } } @@ -658,30 +629,14 @@ LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& ag if (sRunning) { // ...only do immediate lookups when cache is running - if (useDisplayNames()) + std::map<LLUUID,LLAvatarName>::iterator it = sCache.find(agent_id); + if (it != sCache.end()) { - // ...use new cache - std::map<LLUUID,LLAvatarName>::iterator it = sCache.find(agent_id); - if (it != sCache.end()) - { - const LLAvatarName& av_name = it->second; - - if (av_name.mExpires > LLFrameTimer::getTotalSeconds()) - { - // ...name already exists in cache, fire callback now - fireSignal(agent_id, slot, av_name); - return connection; - } - } - } - else - { - // ...use old name system - std::string full_name; - if (gCacheName->getFullName(agent_id, full_name)) + const LLAvatarName& av_name = it->second; + + if (av_name.mExpires > LLFrameTimer::getTotalSeconds()) { - LLAvatarName av_name; - buildLegacyName(full_name, &av_name); + // ...name already exists in cache, fire callback now fireSignal(agent_id, slot, av_name); return connection; } @@ -716,33 +671,18 @@ LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& ag void LLAvatarNameCache::setUseDisplayNames(bool use) { - if (use != sUseDisplayNames) + if (use != LLAvatarName::useDisplayNames()) { - sUseDisplayNames = use; - // flush our cache - sCache.clear(); - + LLAvatarName::setUseDisplayNames(use); mUseDisplayNamesSignal(); } } -bool LLAvatarNameCache::useDisplayNames() -{ - // Must be both manually set on and able to look up names. - return sUseDisplayNames && !sNameLookupURL.empty(); -} - void LLAvatarNameCache::erase(const LLUUID& agent_id) { sCache.erase(agent_id); } -void LLAvatarNameCache::fetch(const LLUUID& agent_id) -{ - // re-request, even if request is already pending - sAskQueue.insert(agent_id); -} - void LLAvatarNameCache::insert(const LLUUID& agent_id, const LLAvatarName& av_name) { // *TODO: update timestamp if zero? diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 064942fe53..2a8eb46187 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -37,33 +37,33 @@ class LLUUID; namespace LLAvatarNameCache { - typedef boost::signals2::signal<void (void)> use_display_name_signal_t; // Until the cache is set running, immediate lookups will fail and // async lookups will be queued. This allows us to block requests // until we know if the first region supports display names. - void initClass(bool running); + void initClass(bool running, bool usePeopleAPI); void cleanupClass(); + // Import/export the name cache to file. void importFile(std::istream& istr); void exportFile(std::ostream& ostr); - // On the viewer, usually a simulator capabilitity - // If empty, name cache will fall back to using legacy name - // lookup system + // On the viewer, usually a simulator capabilitity. + // If empty, name cache will fall back to using legacy name lookup system. void setNameLookupURL(const std::string& name_lookup_url); - // Do we have a valid lookup URL, hence are we trying to use the - // new display name lookup system? + // Do we have a valid lookup URL, i.e. are we trying to use the + // more recent display name lookup system? bool hasNameLookupURL(); + bool usePeopleAPI(); // Periodically makes a batch request for display names not already in - // cache. Call once per frame. + // cache. Called once per frame. void idle(); // If name is in cache, returns true and fills in provided LLAvatarName - // otherwise returns false + // otherwise returns false. bool get(const LLUUID& agent_id, LLAvatarName *av_name); // Callback types for get() below @@ -73,25 +73,19 @@ namespace LLAvatarNameCache typedef callback_signal_t::slot_type callback_slot_t; typedef boost::signals2::connection callback_connection_t; - // Fetches name information and calls callback. - // If name information is in cache, callback will be called immediately. + // Fetches name information and calls callbacks. + // If name information is in cache, callbacks will be called immediately. callback_connection_t get(const LLUUID& agent_id, callback_slot_t slot); - // Allow display names to be explicitly disabled for testing. + // Set display name: flips the switch and triggers the callbacks. void setUseDisplayNames(bool use); - bool useDisplayNames(); - + + void insert(const LLUUID& agent_id, const LLAvatarName& av_name); void erase(const LLUUID& agent_id); - /// Provide some fallback for agents that return errors + /// Provide some fallback for agents that return errors. void handleAgentError(const LLUUID& agent_id); - // Force a re-fetch of the most recent data, but keep the current - // data in cache - void fetch(const LLUUID& agent_id); - - void insert(const LLUUID& agent_id, const LLAvatarName& av_name); - // Compute name expiration time from HTTP Cache-Control header, // or return default value, in seconds from epoch. F64 nameExpirationFromHeaders(LLSD headers); diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp index 250cace6e9..01da20f060 100644 --- a/indra/llmessage/llbuffer.cpp +++ b/indra/llmessage/llbuffer.cpp @@ -30,7 +30,6 @@ #include "llbuffer.h" #include "llmath.h" -#include "llmemtype.h" #include "llstl.h" #include "llthread.h" @@ -44,7 +43,6 @@ LLSegment::LLSegment() : mData(NULL), mSize(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) : @@ -52,12 +50,10 @@ LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) : mData(data), mSize(data_len) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLSegment::~LLSegment() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } bool LLSegment::isOnChannel(S32 channel) const @@ -104,7 +100,6 @@ LLHeapBuffer::LLHeapBuffer() : mNextFree(NULL), mReclaimedBytes(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); const S32 DEFAULT_HEAP_BUFFER_SIZE = 16384; allocate(DEFAULT_HEAP_BUFFER_SIZE); } @@ -115,7 +110,6 @@ LLHeapBuffer::LLHeapBuffer(S32 size) : mNextFree(NULL), mReclaimedBytes(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); allocate(size); } @@ -125,7 +119,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) : mNextFree(NULL), mReclaimedBytes(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if((len > 0) && src) { allocate(len); @@ -139,7 +132,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) : // virtual LLHeapBuffer::~LLHeapBuffer() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); delete[] mBuffer; mBuffer = NULL; mSize = 0; @@ -157,7 +149,6 @@ bool LLHeapBuffer::createSegment( S32 size, LLSegment& segment) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); // get actual size of the segment. S32 actual_size = llmin(size, (mSize - S32(mNextFree - mBuffer))); @@ -212,7 +203,6 @@ bool LLHeapBuffer::containsSegment(const LLSegment& segment) const void LLHeapBuffer::allocate(S32 size) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); mReclaimedBytes = 0; mBuffer = new U8[size]; if(mBuffer) @@ -230,12 +220,10 @@ LLBufferArray::LLBufferArray() : mNextBaseChannel(0), mMutexp(NULL) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLBufferArray::~LLBufferArray() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer()); delete mMutexp; @@ -314,7 +302,6 @@ bool LLBufferArray::append(S32 channel, const U8* src, S32 len) { LLMutexLock lock(mMutexp) ; - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::vector<LLSegment> segments; if(copyIntoBuffers(channel, src, len, segments)) { @@ -329,7 +316,6 @@ bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::vector<LLSegment> segments; if(copyIntoBuffers(channel, src, len, segments)) { @@ -345,7 +331,6 @@ bool LLBufferArray::insertAfter( const U8* src, S32 len) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::vector<LLSegment> segments; LLMutexLock lock(mMutexp) ; @@ -366,7 +351,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); segment_iterator_t end = mSegments.end(); segment_iterator_t it = getSegment(address); if(it == end) @@ -414,7 +398,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter( LLSegment& segment) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); segment_iterator_t rv = mSegments.begin(); segment_iterator_t end = mSegments.end(); if(!address) @@ -578,7 +561,6 @@ U8* LLBufferArray::readAfter( U8* dest, S32& len) const { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); U8* rv = start; if(!dest || len <= 0) { @@ -642,7 +624,6 @@ U8* LLBufferArray::seek( S32 delta) const { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); const_segment_iterator_t it; const_segment_iterator_t end = mSegments.end(); U8* rv = start; @@ -786,8 +767,6 @@ U8* LLBufferArray::seek( //test use only bool LLBufferArray::takeContents(LLBufferArray& source) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); - LLMutexLock lock(mMutexp); source.lock(); @@ -813,7 +792,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment( S32 len) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); // start at the end of the buffers, because it is the most likely // to have free space. LLSegment segment; @@ -852,7 +830,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment( bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); // Find out which buffer contains the segment, and if it is found, // ask it to reclaim the memory. @@ -885,7 +862,6 @@ bool LLBufferArray::copyIntoBuffers( std::vector<LLSegment>& segments) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if(!src || !len) return false; S32 copied = 0; LLSegment segment; diff --git a/indra/llmessage/llbufferstream.cpp b/indra/llmessage/llbufferstream.cpp index 8d8ad05ad5..a51a48edc3 100644 --- a/indra/llmessage/llbufferstream.cpp +++ b/indra/llmessage/llbufferstream.cpp @@ -30,7 +30,6 @@ #include "llbufferstream.h" #include "llbuffer.h" -#include "llmemtype.h" #include "llthread.h" static const S32 DEFAULT_OUTPUT_SEGMENT_SIZE = 1024 * 4; @@ -44,19 +43,16 @@ LLBufferStreamBuf::LLBufferStreamBuf( mChannels(channels), mBuffer(buffer) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLBufferStreamBuf::~LLBufferStreamBuf() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); sync(); } // virtual int LLBufferStreamBuf::underflow() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); //lldebugs << "LLBufferStreamBuf::underflow()" << llendl; if(!mBuffer) { @@ -129,7 +125,6 @@ int LLBufferStreamBuf::underflow() // virtual int LLBufferStreamBuf::overflow(int c) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if(!mBuffer) { return EOF; @@ -169,7 +164,6 @@ int LLBufferStreamBuf::overflow(int c) // virtual int LLBufferStreamBuf::sync() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); int return_value = -1; if(!mBuffer) { @@ -251,7 +245,6 @@ streampos LLBufferStreamBuf::seekoff( std::ios::openmode which) #endif { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if(!mBuffer || ((way == std::ios::beg) && (off < 0)) || ((way == std::ios::end) && (off > 0))) @@ -343,10 +336,8 @@ LLBufferStream::LLBufferStream( std::iostream(&mStreamBuf), mStreamBuf(channels, buffer) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLBufferStream::~LLBufferStream() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 479efabb5f..3fb36eecf0 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -36,7 +36,6 @@ #include "llsdserialize.h" #include "lluuid.h" #include "message.h" -#include "llmemtype.h" #include <boost/regex.hpp> @@ -524,6 +523,7 @@ std::string LLCacheName::cleanFullName(const std::string& full_name) } //static +// Transform hard-coded name provided by server to a more legible username std::string LLCacheName::buildUsername(const std::string& full_name) { // rare, but handle hard-coded error names returned from server @@ -549,8 +549,9 @@ std::string LLCacheName::buildUsername(const std::string& full_name) return username; } - // if the input wasn't a correctly formatted legacy name just return it unchanged - return full_name; + // if the input wasn't a correctly formatted legacy name, just return it + // cleaned up from a potential terminal "Resident" + return cleanFullName(full_name); } //static @@ -663,7 +664,6 @@ boost::signals2::connection LLCacheName::get(const LLUUID& id, bool is_group, ol void LLCacheName::processPending() { - LLMemType mt_pp(LLMemType::MTYPE_CACHE_PROCESS_PENDING); const F32 SECS_BETWEEN_PROCESS = 0.1f; if(!impl.mProcessTimer.checkExpirationAndReset(SECS_BETWEEN_PROCESS)) { @@ -769,7 +769,6 @@ std::string LLCacheName::getDefaultLastName() void LLCacheName::Impl::processPendingAsks() { - LLMemType mt_ppa(LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS); sendRequest(_PREHASH_UUIDNameRequest, mAskNameQueue); sendRequest(_PREHASH_UUIDGroupNameRequest, mAskGroupQueue); mAskNameQueue.clear(); @@ -778,7 +777,6 @@ void LLCacheName::Impl::processPendingAsks() void LLCacheName::Impl::processPendingReplies() { - LLMemType mt_ppr(LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES); // First call all the callbacks, because they might send messages. for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it) { diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h index b108e37157..d238c3a247 100644 --- a/indra/llmessage/llcachename.h +++ b/indra/llmessage/llcachename.h @@ -40,7 +40,7 @@ typedef boost::signals2::signal<void (const LLUUID& id, bool is_group)> LLCacheNameSignal; typedef LLCacheNameSignal::slot_type LLCacheNameCallback; -// Old callback with user data for compatability +// Old callback with user data for compatibility typedef void (*old_callback_t)(const LLUUID&, const std::string&, bool, void*); // Here's the theory: diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index e0410906fb..0c2d4b823d 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -679,7 +679,6 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) setPacketInID((id + 1) % LL_MAX_OUT_PACKET_ID); mLastPacketGap = 0; - mOutOfOrderRate.count(0); return; } @@ -775,7 +774,6 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) } } - mOutOfOrderRate.count(gap); mLastPacketGap = gap; } diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index d1c400c6a2..430d6358f7 100644 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -40,7 +40,6 @@ #include "llpacketack.h" #include "lluuid.h" #include "llthrottle.h" -#include "llstat.h" // // Constants @@ -126,8 +125,6 @@ public: S32 getUnackedPacketCount() const { return mUnackedPacketCount; } S32 getUnackedPacketBytes() const { return mUnackedPacketBytes; } F64 getNextPingSendTime() const { return mNextPingSendTime; } - F32 getOutOfOrderRate(LLStatAccum::TimeScale scale = LLStatAccum::SCALE_MINUTE) - { return mOutOfOrderRate.meanValue(scale); } U32 getLastPacketGap() const { return mLastPacketGap; } LLHost getHost() const { return mHost; } F64 getLastPacketInTime() const { return mLastPacketInTime; } @@ -275,7 +272,6 @@ protected: LLTimer mExistenceTimer; // initialized when circuit created, used to track bandwidth numbers S32 mCurrentResendCount; // Number of resent packets since last spam - LLStatRate mOutOfOrderRate; // Rate of out of order packets coming in. U32 mLastPacketGap; // Gap in sequence number of last packet. const F32 mHeartbeatInterval; diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 5ea9b58300..8ffa8e4271 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -133,12 +133,12 @@ std::string LLCurl::getVersionString() ////////////////////////////////////////////////////////////////////////////// LLCurl::Responder::Responder() - : mReferenceCount(0) { } LLCurl::Responder::~Responder() { + LL_CHECK_MEMORY } // virtual @@ -202,23 +202,6 @@ void LLCurl::Responder::completedHeader(U32 status, const std::string& reason, c } -namespace boost -{ - void intrusive_ptr_add_ref(LLCurl::Responder* p) - { - ++p->mReferenceCount; - } - - void intrusive_ptr_release(LLCurl::Responder* p) - { - if (p && 0 == --p->mReferenceCount) - { - delete p; - } - } -}; - - ////////////////////////////////////////////////////////////////////////////// std::set<CURL*> LLCurl::Easy::sFreeHandles; @@ -267,15 +250,18 @@ void LLCurl::Easy::releaseEasyHandle(CURL* handle) LLMutexLock lock(sHandleMutexp) ; if (sActiveHandles.find(handle) != sActiveHandles.end()) { + LL_CHECK_MEMORY sActiveHandles.erase(handle); - + LL_CHECK_MEMORY if(sFreeHandles.size() < MAX_NUM_FREE_HANDLES) { - sFreeHandles.insert(handle); - } - else - { + sFreeHandles.insert(handle); + LL_CHECK_MEMORY + } + else + { LLCurl::deleteEasyHandle(handle) ; + LL_CHECK_MEMORY } } else @@ -308,6 +294,8 @@ LLCurl::Easy* LLCurl::Easy::getEasy() // multi handles cache if they are added to one. CURLcode result = curl_easy_setopt(easy->mCurlEasyHandle, CURLOPT_DNS_CACHE_TIMEOUT, 0); check_curl_code(result); + result = curl_easy_setopt(easy->mCurlEasyHandle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); + check_curl_code(result); ++gCurlEasyCount; return easy; @@ -318,13 +306,15 @@ LLCurl::Easy::~Easy() releaseEasyHandle(mCurlEasyHandle); --gCurlEasyCount; curl_slist_free_all(mHeaders); + LL_CHECK_MEMORY for_each(mStrings.begin(), mStrings.end(), DeletePointerArray()); - + LL_CHECK_MEMORY if (mResponder && LLCurl::sNotQuitting) //aborted { std::string reason("Request timeout, aborted.") ; mResponder->completedRaw(408, //HTTP_REQUEST_TIME_OUT, timeout, abort reason, mChannels, mOutput); + LL_CHECK_MEMORY } mResponder = NULL; } @@ -494,7 +484,8 @@ void LLCurl::Easy::prepRequest(const std::string& url, //setopt(CURLOPT_VERBOSE, 1); // useful for debugging setopt(CURLOPT_NOSIGNAL, 1); - + setopt(CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); + // Set the CURL options for either Socks or HTTP proxy LLProxy::getInstance()->applyProxySettings(this); @@ -599,35 +590,50 @@ void LLCurl::Multi::cleanup(bool deleted) llassert_always(deleted || !mValid) ; LLMutexLock lock(mDeletionMutexp); - + + // Clean up active for(easy_active_list_t::iterator iter = mEasyActiveList.begin(); iter != mEasyActiveList.end(); ++iter) { Easy* easy = *iter; + LL_CHECK_MEMORY check_curl_multi_code(curl_multi_remove_handle(mCurlMultiHandle, easy->getCurlHandle())); - + LL_CHECK_MEMORY if(deleted) { easy->mResponder = NULL ; //avoid triggering mResponder. + LL_CHECK_MEMORY } delete easy; + LL_CHECK_MEMORY } mEasyActiveList.clear(); mEasyActiveMap.clear(); - // Clean up freed + LL_CHECK_MEMORY + + // Clean up freed for_each(mEasyFreeList.begin(), mEasyFreeList.end(), DeletePointer()); mEasyFreeList.clear(); - + + LL_CHECK_MEMORY + check_curl_multi_code(LLCurl::deleteMultiHandle(mCurlMultiHandle)); mCurlMultiHandle = NULL ; + + LL_CHECK_MEMORY delete mMutexp ; mMutexp = NULL ; + + LL_CHECK_MEMORY + delete mEasyMutexp ; mEasyMutexp = NULL ; + LL_CHECK_MEMORY + mQueued = 0 ; mState = STATE_COMPLETED; @@ -935,8 +941,8 @@ bool LLCurlThread::CurlRequest::processRequest() if(!completed) { - setPriority(LLQueuedThread::PRIORITY_LOW) ; - } + setPriority(LLQueuedThread::PRIORITY_LOW) ; + } } return completed ; @@ -946,7 +952,7 @@ void LLCurlThread::CurlRequest::finishRequest(bool completed) { if(mMulti->isDead()) { - mCurlThread->deleteMulti(mMulti) ; + mCurlThread->deleteMulti(mMulti) ; } else { @@ -990,6 +996,7 @@ void LLCurlThread::killMulti(LLCurl::Multi* multi) return ; } + multi->markDead() ; } @@ -1095,12 +1102,15 @@ void LLCurlRequest::get(const std::string& url, LLCurl::ResponderPtr responder) { getByteRange(url, headers_t(), 0, -1, responder); } - + +// Note: (length==0) is interpreted as "the rest of the file", i.e. the whole file if (offset==0) or +// the remainder of the file if not. bool LLCurlRequest::getByteRange(const std::string& url, const headers_t& headers, S32 offset, S32 length, LLCurl::ResponderPtr responder) { + llassert(LLCurl::sNotQuitting); LLCurl::Easy* easy = allocEasy(); if (!easy) { @@ -1113,6 +1123,11 @@ bool LLCurlRequest::getByteRange(const std::string& url, std::string range = llformat("Range: bytes=%d-%d", offset,offset+length-1); easy->slist_append(range.c_str()); } + else if (offset > 0) + { + std::string range = llformat("Range: bytes=%d-", offset); + easy->slist_append(range.c_str()); + } easy->setHeaders(); bool res = addEasy(easy); return res; @@ -1123,6 +1138,7 @@ bool LLCurlRequest::post(const std::string& url, const LLSD& data, LLCurl::ResponderPtr responder, S32 time_out) { + llassert(LLCurl::sNotQuitting); LLCurl::Easy* easy = allocEasy(); if (!easy) { @@ -1150,6 +1166,7 @@ bool LLCurlRequest::post(const std::string& url, const std::string& data, LLCurl::ResponderPtr responder, S32 time_out) { + llassert(LLCurl::sNotQuitting); LLCurl::Easy* easy = allocEasy(); if (!easy) { @@ -1238,6 +1255,208 @@ S32 LLCurlRequest::getQueued() return queued; } +LLCurlTextureRequest::LLCurlTextureRequest(S32 concurrency) : + LLCurlRequest(), + mConcurrency(concurrency), + mInQueue(0), + mMutex(NULL), + mHandleCounter(1), + mTotalIssuedRequests(0), + mTotalReceivedBits(0) +{ + mGlobalTimer.reset(); +} + +LLCurlTextureRequest::~LLCurlTextureRequest() +{ + mRequestMap.clear(); + + for(req_queue_t::iterator iter = mCachedRequests.begin(); iter != mCachedRequests.end(); ++iter) + { + delete *iter; + } + mCachedRequests.clear(); +} + +//return 0: success +// > 0: cached handle +U32 LLCurlTextureRequest::getByteRange(const std::string& url, + const headers_t& headers, + S32 offset, S32 length, U32 pri, + LLCurl::ResponderPtr responder, F32 delay_time) +{ + U32 ret_val = 0; + bool success = false; + + if(mInQueue < mConcurrency && delay_time < 0.f) + { + success = LLCurlRequest::getByteRange(url, headers, offset, length, responder); + } + + LLMutexLock lock(&mMutex); + + if(success) + { + mInQueue++; + mTotalIssuedRequests++; + } + else + { + request_t* request = new request_t(mHandleCounter, url, headers, offset, length, pri, responder); + if(delay_time > 0.f) + { + request->mStartTime = mGlobalTimer.getElapsedTimeF32() + delay_time; + } + + mCachedRequests.insert(request); + mRequestMap[mHandleCounter] = request; + ret_val = mHandleCounter; + mHandleCounter++; + + if(!mHandleCounter) + { + mHandleCounter = 1; + } + } + + return ret_val; +} + +void LLCurlTextureRequest::completeRequest(S32 received_bytes) +{ + LLMutexLock lock(&mMutex); + + llassert_always(mInQueue > 0); + + mInQueue--; + mTotalReceivedBits += received_bytes * 8; +} + +void LLCurlTextureRequest::nextRequests() +{ + if(mCachedRequests.empty() || mInQueue >= mConcurrency) + { + return; + } + + F32 cur_time = mGlobalTimer.getElapsedTimeF32(); + + req_queue_t::iterator iter; + { + LLMutexLock lock(&mMutex); + iter = mCachedRequests.begin(); + } + while(1) + { + request_t* request = *iter; + if(request->mStartTime < cur_time) + { + if(!LLCurlRequest::getByteRange(request->mUrl, request->mHeaders, request->mOffset, request->mLength, request->mResponder)) + { + break; + } + + LLMutexLock lock(&mMutex); + ++iter; + mInQueue++; + mTotalIssuedRequests++; + mCachedRequests.erase(request); + mRequestMap.erase(request->mHandle); + delete request; + + if(iter == mCachedRequests.end() || mInQueue >= mConcurrency) + { + break; + } + } + else + { + LLMutexLock lock(&mMutex); + ++iter; + if(iter == mCachedRequests.end() || mInQueue >= mConcurrency) + { + break; + } + } + } + + return; +} + +void LLCurlTextureRequest::updatePriority(U32 handle, U32 pri) +{ + if(!handle) + { + return; + } + + LLMutexLock lock(&mMutex); + + std::map<S32, request_t*>::iterator iter = mRequestMap.find(handle); + if(iter != mRequestMap.end()) + { + request_t* req = iter->second; + + if(req->mPriority != pri) + { + mCachedRequests.erase(req); + req->mPriority = pri; + mCachedRequests.insert(req); + } + } +} + +void LLCurlTextureRequest::removeRequest(U32 handle) +{ + if(!handle) + { + return; + } + + LLMutexLock lock(&mMutex); + + std::map<S32, request_t*>::iterator iter = mRequestMap.find(handle); + if(iter != mRequestMap.end()) + { + request_t* req = iter->second; + mRequestMap.erase(iter); + mCachedRequests.erase(req); + delete req; + } +} + +bool LLCurlTextureRequest::isWaiting(U32 handle) +{ + if(!handle) + { + return false; + } + + LLMutexLock lock(&mMutex); + return mRequestMap.find(handle) != mRequestMap.end(); +} + +U32 LLCurlTextureRequest::getTotalReceivedBits() +{ + LLMutexLock lock(&mMutex); + + U32 bits = mTotalReceivedBits; + mTotalReceivedBits = 0; + return bits; +} + +U32 LLCurlTextureRequest::getTotalIssuedRequests() +{ + LLMutexLock lock(&mMutex); + return mTotalIssuedRequests; +} + +S32 LLCurlTextureRequest::getNumRequests() +{ + LLMutexLock lock(&mMutex); + return mInQueue; +} + //////////////////////////////////////////////////////////////////////////// // For generating one easy request // associated with a single multi request @@ -1504,29 +1723,42 @@ void LLCurl::cleanupClass() break ; } } + LL_CHECK_MEMORY sCurlThread->shutdown() ; + LL_CHECK_MEMORY delete sCurlThread ; sCurlThread = NULL ; + LL_CHECK_MEMORY #if SAFE_SSL CRYPTO_set_locking_callback(NULL); for_each(sSSLMutex.begin(), sSSLMutex.end(), DeletePointer()); #endif + + LL_CHECK_MEMORY for (std::set<CURL*>::iterator iter = Easy::sFreeHandles.begin(); iter != Easy::sFreeHandles.end(); ++iter) { CURL* curl = *iter; LLCurl::deleteEasyHandle(curl); } + + LL_CHECK_MEMORY Easy::sFreeHandles.clear(); + LL_CHECK_MEMORY + delete Easy::sHandleMutexp ; Easy::sHandleMutexp = NULL ; + LL_CHECK_MEMORY + delete sHandleMutexp ; sHandleMutexp = NULL ; + LL_CHECK_MEMORY + // removed as per https://jira.secondlife.com/browse/SH-3115 //llassert(Easy::sActiveHandles.empty()); } @@ -1534,6 +1766,8 @@ void LLCurl::cleanupClass() //static CURLM* LLCurl::newMultiHandle() { + llassert(sNotQuitting); + LLMutexLock lock(sHandleMutexp) ; if(sTotalHandles + 1 > sMaxHandles) @@ -1567,6 +1801,7 @@ CURLMcode LLCurl::deleteMultiHandle(CURLM* handle) //static CURL* LLCurl::newEasyHandle() { + llassert(sNotQuitting); LLMutexLock lock(sHandleMutexp) ; if(sTotalHandles + 1 > sMaxHandles) @@ -1591,7 +1826,9 @@ void LLCurl::deleteEasyHandle(CURL* handle) if(handle) { LLMutexLock lock(sHandleMutexp) ; + LL_CHECK_MEMORY curl_easy_cleanup(handle) ; + LL_CHECK_MEMORY sTotalHandles-- ; } } diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index d6a7714d4c..7bcf61e233 100644 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -44,6 +44,8 @@ #include "llthread.h" #include "llqueuedthread.h" #include "llframetimer.h" +#include "llpointer.h" + class LLMutex; class LLCurlThread; @@ -67,7 +69,7 @@ public: F64 mSpeedDownload; }; - class Responder + class Responder : public LLThreadSafeRefCount { //LOG_CLASS(Responder); public: @@ -126,13 +128,10 @@ public: return false; } - public: /* but not really -- don't touch this */ - U32 mReferenceCount; - private: std::string mURL; }; - typedef boost::intrusive_ptr<Responder> ResponderPtr; + typedef LLPointer<Responder> ResponderPtr; /** @@ -378,12 +377,6 @@ private: void cleanupMulti(LLCurl::Multi* multi) ; } ; -namespace boost -{ - void intrusive_ptr_add_ref(LLCurl::Responder* p); - void intrusive_ptr_release(LLCurl::Responder* p); -}; - class LLCurlRequest { @@ -414,6 +407,71 @@ private: BOOL mProcessing; }; +//for texture fetch only +class LLCurlTextureRequest : public LLCurlRequest +{ +public: + LLCurlTextureRequest(S32 concurrency); + ~LLCurlTextureRequest(); + + U32 getByteRange(const std::string& url, const headers_t& headers, S32 offset, S32 length, U32 pri, LLCurl::ResponderPtr responder, F32 delay_time = -1.f); + void nextRequests(); + void completeRequest(S32 received_bytes); + + void updatePriority(U32 handle, U32 pri); + void removeRequest(U32 handle); + + U32 getTotalReceivedBits(); + U32 getTotalIssuedRequests(); + S32 getNumRequests(); + bool isWaiting(U32 handle); + +private: + LLMutex mMutex; + S32 mConcurrency; + S32 mInQueue; //request currently in queue. + U32 mHandleCounter; + U32 mTotalIssuedRequests; + U32 mTotalReceivedBits; + + typedef struct _request_t + { + _request_t(U32 handle, const std::string& url, const headers_t& headers, S32 offset, S32 length, U32 pri, LLCurl::ResponderPtr responder) : + mHandle(handle), mUrl(url), mHeaders(headers), mOffset(offset), mLength(length), mPriority(pri), mResponder(responder), mStartTime(0.f) + {} + + U32 mHandle; + std::string mUrl; + LLCurlRequest::headers_t mHeaders; + S32 mOffset; + S32 mLength; + LLCurl::ResponderPtr mResponder; + U32 mPriority; + F32 mStartTime; //start time to issue this request + } request_t; + + struct request_compare + { + bool operator()(const request_t* lhs, const request_t* rhs) const + { + if(lhs->mPriority != rhs->mPriority) + { + return lhs->mPriority > rhs->mPriority; // higher priority in front of queue (set) + } + else + { + return (U32)lhs < (U32)rhs; + } + } + }; + + typedef std::set<request_t*, request_compare> req_queue_t; + req_queue_t mCachedRequests; + std::map<S32, request_t*> mRequestMap; + + LLFrameTimer mGlobalTimer; +}; + class LLCurlEasyRequest { public: diff --git a/indra/llmessage/lldbstrings.h b/indra/llmessage/lldbstrings.h index 9bf1b3eda4..e23d17d5b6 100644 --- a/indra/llmessage/lldbstrings.h +++ b/indra/llmessage/lldbstrings.h @@ -156,18 +156,6 @@ const S32 DB_USER_SKILLS_BUF_SIZE = 255; const S32 DB_NV_NAME_STR_LEN = 128; const S32 DB_NV_NAME_BUF_SIZE = 129; -// votes.vote_text varchar(254) -const S32 DB_VOTE_TEXT_STR_LEN = 254; -const S32 DB_VOTE_TEXT_BUF_SIZE = 255; - -// vpte type text varchar(9) -const S32 DB_VOTE_TYPE_STR_LEN = 9; -const S32 DB_VOTE_TYPE_BUF_SIZE = 10; - -// vote result text -const S32 DB_VOTE_RESULT_BUF_LEN = 8; -const S32 DB_VOTE_RESULT_BUF_SIZE = 9; - // user_start_location.location_name varchar(254) const S32 DB_START_LOCATION_STR_LEN = 254; const S32 DB_START_LOCATION_BUF_SIZE = 255; diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp index 612d765969..d6ed08055e 100644 --- a/indra/llmessage/llhttpassetstorage.cpp +++ b/indra/llmessage/llhttpassetstorage.cpp @@ -749,7 +749,7 @@ LLAssetRequest* LLHTTPAssetStorage::findNextRequest(LLAssetStorage::request_list request_list_t::iterator pending_iter = pending.begin(); request_list_t::iterator pending_end = pending.end(); // Loop over all pending requests until we miss finding it in the running list. - for (; pending_iter != pending.end(); ++pending_iter) + for (; pending_iter != pending_end; ++pending_iter) { LLAssetRequest* req = *pending_iter; // Look for this pending request in the running list. diff --git a/indra/llmessage/llinstantmessage.cpp b/indra/llmessage/llinstantmessage.cpp index d68e0c423e..b0275c161b 100644 --- a/indra/llmessage/llinstantmessage.cpp +++ b/indra/llmessage/llinstantmessage.cpp @@ -43,14 +43,6 @@ const U8 IM_ONLINE = 0; const U8 IM_OFFLINE = 1; -const S32 VOTE_YES = 1; -const S32 VOTE_NO = 0; -const S32 VOTE_ABSTAIN = -1; - -const S32 VOTE_MAJORITY = 0; -const S32 VOTE_SUPER_MAJORITY = 1; -const S32 VOTE_UNANIMOUS = 2; - const char EMPTY_BINARY_BUCKET[] = ""; const S32 EMPTY_BINARY_BUCKET_SIZE = 1; const U32 NO_TIMESTAMP = 0; @@ -69,7 +61,6 @@ LLIMInfo::LLIMInfo() : mViewerThinksToIsOnline(false), mIMType(IM_NOTHING_SPECIAL), mTimeStamp(0), - mSource(IM_FROM_SIM), mTTL(IM_TTL) { } @@ -88,7 +79,6 @@ LLIMInfo::LLIMInfo( LLSD data, U8 offline, U32 timestamp, - EIMSource source, S32 ttl) : mFromID(from_id), mFromGroup(from_group), @@ -104,14 +94,12 @@ LLIMInfo::LLIMInfo( mName(name), mMessage(message), mData(data), - mSource(source), mTTL(ttl) { } -LLIMInfo::LLIMInfo(LLMessageSystem* msg, EIMSource source, S32 ttl) : +LLIMInfo::LLIMInfo(LLMessageSystem* msg, S32 ttl) : mViewerThinksToIsOnline(false), - mSource(source), mTTL(ttl) { unpackMessageBlock(msg); @@ -326,7 +314,6 @@ LLSD im_info_to_llsd(LLPointer<LLIMInfo> im_info) param_message["region_id"] = im_info->mRegionID; param_message["position"] = ll_sd_from_vector3(im_info->mPosition); param_message["data"] = im_info->mData; - param_message["source"]= im_info->mSource; param_message["ttl"] = im_info->mTTL; LLSD param_agent; @@ -359,7 +346,6 @@ LLPointer<LLIMInfo> llsd_to_im_info(const LLSD& im_info_sd) param_message["data"], (U8) param_message["offline"].asInteger(), (U32) param_message["timestamp"].asInteger(), - (EIMSource)param_message["source"].asInteger(), param_message["ttl"].asInteger()); return im_info; @@ -381,7 +367,6 @@ LLPointer<LLIMInfo> LLIMInfo::clone() mData, mOffline, mTimeStamp, - mSource, mTTL); } diff --git a/indra/llmessage/llinstantmessage.h b/indra/llmessage/llinstantmessage.h index e0dae376b4..db4a38ea9e 100644 --- a/indra/llmessage/llinstantmessage.h +++ b/indra/llmessage/llinstantmessage.h @@ -115,8 +115,8 @@ enum EInstantMessage // viewer, since you can't IM an object yet. IM_FROM_TASK = 19, - // sent an IM to a busy user, this is the auto response - IM_BUSY_AUTO_RESPONSE = 20, + // sent an IM to a do not disturb user, this is the auto response + IM_DO_NOT_DISTURB_AUTO_RESPONSE = 20, // Shows the message in the console and chat history IM_CONSOLE_AND_CHAT_HISTORY = 21, @@ -164,57 +164,9 @@ enum EInstantMessage }; -// Hooks for quickly hacking in experimental admin debug messages -// without needing to recompile the viewer -// *NOTE: This functionality has been moved to be a string based -// operation so that we don't even have to do a full recompile. This -// enumeration will be phased out soon. -enum EGodlikeRequest -{ - GOD_WANTS_NOTHING, - - // for requesting physics information about an object - GOD_WANTS_PHYSICS_INFO, - - // two unused requests that can be appropriated for debug - // purposes (no viewer recompile necessary) - GOD_WANTS_FOO, - GOD_WANTS_BAR, - - // to dump simulator terrain data to terrain.raw file - GOD_WANTS_TERRAIN_SAVE, - // to load simulator terrain data from terrain.raw file - GOD_WANTS_TERRAIN_LOAD, - - GOD_WANTS_TOGGLE_AVATAR_GEOMETRY, // HACK for testing new avatar geom - - // real-time telehub operations - GOD_WANTS_TELEHUB_INFO, - GOD_WANTS_CONNECT_TELEHUB, - GOD_WANTS_DELETE_TELEHUB, - GOD_WANTS_ADD_TELEHUB_SPAWNPOINT, - GOD_WANTS_REMOVE_TELEHUB_SPAWNPOINT, - -}; - -enum EIMSource -{ - IM_FROM_VIEWER, - IM_FROM_DATASERVER, - IM_FROM_SIM -}; - extern const U8 IM_ONLINE; extern const U8 IM_OFFLINE; -extern const S32 VOTE_YES; -extern const S32 VOTE_NO; -extern const S32 VOTE_ABSTAIN; - -extern const S32 VOTE_MAJORITY; -extern const S32 VOTE_SUPER_MAJORITY; -extern const S32 VOTE_UNANIMOUS; - extern const char EMPTY_BINARY_BUCKET[]; extern const S32 EMPTY_BINARY_BUCKET_SIZE; @@ -234,7 +186,6 @@ protected: public: LLIMInfo(LLMessageSystem* msg, - EIMSource source = IM_FROM_SIM, S32 ttl = IM_TTL); LLIMInfo( @@ -251,7 +202,6 @@ public: LLSD data, U8 offline, U32 timestamp, - EIMSource source, S32 ttl = IM_TTL); void packInstantMessage(LLMessageSystem* msg) const; @@ -274,7 +224,6 @@ public: std::string mMessage; LLSD mData; - EIMSource mSource; S32 mTTL; }; diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index 987f386aa3..1236fc8b71 100644 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -37,12 +37,10 @@ #include "lliopipe.h" #include "lliosocket.h" #include "llioutil.h" -#include "llmemtype.h" #include "llmemorystream.h" #include "llpumpio.h" #include "llsd.h" #include "llsdserialize_xml.h" -#include "llstat.h" #include "llstl.h" #include "lltimer.h" @@ -141,6 +139,11 @@ private: }; static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_PIPE("HTTP Pipe"); +static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_GET("HTTP Get"); +static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_PUT("HTTP Put"); +static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_POST("HTTP Post"); +static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_DELETE("HTTP Delete"); + LLIOPipe::EStatus LLHTTPPipe::process_impl( const LLChannelDescriptors& channels, buffer_ptr_t& buffer, @@ -177,12 +180,12 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( std::string verb = context[CONTEXT_REQUEST][CONTEXT_VERB]; if(verb == HTTP_VERB_GET) { - LLPerfBlock getblock("http_get"); + LLFastTimer _(FTM_PROCESS_HTTP_GET); mNode.get(LLHTTPNode::ResponsePtr(mResponse), context); } else if(verb == HTTP_VERB_PUT) { - LLPerfBlock putblock("http_put"); + LLFastTimer _(FTM_PROCESS_HTTP_PUT); LLSD input; if (mNode.getContentType() == LLHTTPNode::CONTENT_TYPE_LLSD) { @@ -198,7 +201,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( } else if(verb == HTTP_VERB_POST) { - LLPerfBlock postblock("http_post"); + LLFastTimer _(FTM_PROCESS_HTTP_POST); LLSD input; if (mNode.getContentType() == LLHTTPNode::CONTENT_TYPE_LLSD) { @@ -214,7 +217,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( } else if(verb == HTTP_VERB_DELETE) { - LLPerfBlock delblock("http_delete"); + LLFastTimer _(FTM_PROCESS_HTTP_DELETE); mNode.del(LLHTTPNode::ResponsePtr(mResponse), context); } else if(verb == HTTP_VERB_OPTIONS) @@ -443,7 +446,6 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl( { LLFastTimer t(FTM_PROCESS_HTTP_HEADER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); if(eos) { PUMP_DEBUG; @@ -587,13 +589,11 @@ LLHTTPResponder::LLHTTPResponder(const LLHTTPNode& tree, const LLSD& ctx) : mContentLength(0), mRootNode(tree) { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); } // virtual LLHTTPResponder::~LLHTTPResponder() { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); //lldebugs << "destroying LLHTTPResponder" << llendl; } @@ -603,7 +603,6 @@ bool LLHTTPResponder::readHeaderLine( U8* dest, S32& len) { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); --len; U8* last = buffer->readAfter(channels.in(), mLastRead, dest, len); dest[len] = '\0'; @@ -628,7 +627,6 @@ void LLHTTPResponder::markBad( const LLChannelDescriptors& channels, buffer_ptr_t buffer) { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); mState = STATE_SHORT_CIRCUIT; LLBufferStream out(channels, buffer.get()); out << HTTP_VERSION_STR << " 400 Bad Request\r\n\r\n<html>\n" @@ -648,7 +646,6 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( { LLFastTimer t(FTM_PROCESS_HTTP_RESPONDER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); LLIOPipe::EStatus status = STATUS_OK; // parsing headers diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp index d5b4d45821..0287026659 100644 --- a/indra/llmessage/lliosocket.cpp +++ b/indra/llmessage/lliosocket.cpp @@ -33,7 +33,6 @@ #include "llbuffer.h" #include "llhost.h" -#include "llmemtype.h" #include "llpumpio.h" // @@ -100,7 +99,6 @@ void ll_debug_socket(const char* msg, apr_socket_t* apr_sock) // static LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); LLSocket::ptr_t rv; apr_socket_t* socket = NULL; apr_pool_t* new_pool = NULL; @@ -198,7 +196,6 @@ LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port) // static LLSocket::ptr_t LLSocket::create(apr_socket_t* socket, apr_pool_t* pool) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); LLSocket::ptr_t rv; if(!socket) { @@ -240,12 +237,10 @@ LLSocket::LLSocket(apr_socket_t* socket, apr_pool_t* pool) : mPort(PORT_INVALID) { ll_debug_socket("Constructing wholely formed socket", mSocket); - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLSocket::~LLSocket() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); // *FIX: clean up memory we are holding. if(mSocket) { @@ -265,7 +260,6 @@ LLSocket::~LLSocket() void LLSocket::setBlocking(S32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); // set up the socket options ll_apr_warn_status(apr_socket_timeout_set(mSocket, timeout)); ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 0)); @@ -276,7 +270,6 @@ void LLSocket::setBlocking(S32 timeout) void LLSocket::setNonBlocking() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); // set up the socket options ll_apr_warn_status(apr_socket_timeout_set(mSocket, 0)); ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 1)); @@ -293,12 +286,10 @@ LLIOSocketReader::LLIOSocketReader(LLSocket::ptr_t socket) : mSource(socket), mInitialized(false) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLIOSocketReader::~LLIOSocketReader() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); //lldebugs << "Destroying LLIOSocketReader" << llendl; } @@ -314,7 +305,6 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl( { LLFastTimer t(FTM_PROCESS_SOCKET_READER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_TCP); if(!mSource) return STATUS_PRECONDITION_NOT_MET; if(!mInitialized) { @@ -396,12 +386,10 @@ LLIOSocketWriter::LLIOSocketWriter(LLSocket::ptr_t socket) : mLastWritten(NULL), mInitialized(false) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLIOSocketWriter::~LLIOSocketWriter() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); //lldebugs << "Destroying LLIOSocketWriter" << llendl; } @@ -416,7 +404,6 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl( { LLFastTimer t(FTM_PROCESS_SOCKET_WRITER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_TCP); if(!mDestination) return STATUS_PRECONDITION_NOT_MET; if(!mInitialized) { @@ -550,12 +537,10 @@ LLIOServerSocket::LLIOServerSocket( mInitialized(false), mResponseTimeout(DEFAULT_CHAIN_EXPIRY_SECS) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLIOServerSocket::~LLIOServerSocket() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); //lldebugs << "Destroying LLIOServerSocket" << llendl; } @@ -575,7 +560,6 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl( { LLFastTimer t(FTM_PROCESS_SERVER_SOCKET); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_TCP); if(!pump) { llwarns << "Need a pump for server socket." << llendl; diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h index 16d825d33b..ae8e0087c1 100644 --- a/indra/llmessage/llmessagetemplate.h +++ b/indra/llmessage/llmessagetemplate.h @@ -29,7 +29,6 @@ #include "lldarray.h" #include "message.h" // TODO: babbage: Remove... -#include "llstat.h" #include "llstl.h" class LLMsgVarData @@ -263,6 +262,7 @@ enum EMsgDeprecation MD_DEPRECATED }; + class LLMessageTemplate { public: @@ -364,7 +364,6 @@ public: { if (mHandlerFunc) { - LLPerfBlock msg_cb_time("msg_cb", mName); mHandlerFunc(msgsystem, mUserData); return TRUE; } diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp index f3ef4f2684..0623e99f0a 100644 --- a/indra/llmessage/llpumpio.cpp +++ b/indra/llmessage/llpumpio.cpp @@ -34,9 +34,7 @@ #include "apr_poll.h" #include "llapr.h" -#include "llmemtype.h" #include "llstl.h" -#include "llstat.h" // These should not be enabled in production, but they can be // intensely useful during development for finding certain kinds of @@ -153,7 +151,6 @@ struct ll_delete_apr_pollset_fd_client_data typedef std::pair<LLIOPipe::ptr_t, apr_pollfd_t> pipe_conditional_t; void operator()(const pipe_conditional_t& conditional) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); S32* client_id = (S32*)conditional.second.client_data; delete client_id; } @@ -177,19 +174,16 @@ LLPumpIO::LLPumpIO(apr_pool_t* pool) : { mCurrentChain = mRunningChains.end(); - LLMemType m1(LLMemType::MTYPE_IO_PUMP); initialize(pool); } LLPumpIO::~LLPumpIO() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); cleanup(); } bool LLPumpIO::prime(apr_pool_t* pool) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); cleanup(); initialize(pool); return ((pool == NULL) ? false : true); @@ -197,7 +191,6 @@ bool LLPumpIO::prime(apr_pool_t* pool) bool LLPumpIO::addChain(const chain_t& chain, F32 timeout, bool has_curl_request) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(chain.empty()) return false; #if LL_THREADS_APR @@ -233,7 +226,6 @@ bool LLPumpIO::addChain( LLSD context, F32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); // remember that if the caller is providing a full link // description, we need to have that description matched to a @@ -311,7 +303,6 @@ static std::string events_2_string(apr_int16_t events) bool LLPumpIO::setConditional(LLIOPipe* pipe, const apr_pollfd_t* poll) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(!pipe) return false; ll_debug_poll_fd("Set conditional", poll); @@ -423,7 +414,6 @@ bool LLPumpIO::sleepChain(F64 seconds) bool LLPumpIO::copyCurrentLinkInfo(links_t& links) const { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(mRunningChains.end() == mCurrentChain) { return false; @@ -441,6 +431,7 @@ void LLPumpIO::pump() } static LLFastTimer::DeclareTimer FTM_PUMP_IO("Pump IO"); +static LLFastTimer::DeclareTimer FTM_PUMP_POLL("Pump Poll"); LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t& run_chain) { @@ -454,7 +445,6 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t //timeout is in microseconds void LLPumpIO::pump(const S32& poll_timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); LLFastTimer t1(FTM_PUMP_IO); //llinfos << "LLPumpIO::pump()" << llendl; @@ -536,7 +526,7 @@ void LLPumpIO::pump(const S32& poll_timeout) S32 count = 0; S32 client_id = 0; { - LLPerfBlock polltime("pump_poll"); + LLFastTimer _(FTM_PUMP_POLL); apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd); } PUMP_DEBUG; @@ -747,7 +737,6 @@ void LLPumpIO::pump(const S32& poll_timeout) bool LLPumpIO::respond(LLIOPipe* pipe) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(NULL == pipe) return false; #if LL_THREADS_APR @@ -766,7 +755,6 @@ bool LLPumpIO::respond( LLIOPipe::buffer_ptr_t data, LLSD context) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); // if the caller is providing a full link description, we need to // have that description matched to a particular buffer. if(!data) return false; @@ -789,7 +777,6 @@ static LLFastTimer::DeclareTimer FTM_PUMP_CALLBACK_CHAIN("Chain"); void LLPumpIO::callback() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); //llinfos << "LLPumpIO::callback()" << llendl; if(true) { @@ -840,7 +827,6 @@ void LLPumpIO::control(LLPumpIO::EControl op) void LLPumpIO::initialize(apr_pool_t* pool) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(!pool) return; #if LL_THREADS_APR // SJB: Windows defaults to NESTED and OSX defaults to UNNESTED, so use UNNESTED explicitly. @@ -852,7 +838,6 @@ void LLPumpIO::initialize(apr_pool_t* pool) void LLPumpIO::cleanup() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); #if LL_THREADS_APR if(mChainsMutex) apr_thread_mutex_destroy(mChainsMutex); if(mCallbackMutex) apr_thread_mutex_destroy(mCallbackMutex); @@ -875,7 +860,6 @@ void LLPumpIO::cleanup() void LLPumpIO::rebuildPollset() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); // lldebugs << "LLPumpIO::rebuildPollset()" << llendl; if(mPollset) { @@ -928,7 +912,6 @@ void LLPumpIO::rebuildPollset() void LLPumpIO::processChain(LLChainInfo& chain) { PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_PUMP); LLIOPipe::EStatus status = LLIOPipe::STATUS_OK; links_t::iterator it = chain.mHead; links_t::iterator end = chain.mChainLinks.end(); @@ -1130,7 +1113,6 @@ bool LLPumpIO::handleChainError( LLChainInfo& chain, LLIOPipe::EStatus error) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); links_t::reverse_iterator rit; if(chain.mHead == chain.mChainLinks.end()) { @@ -1194,13 +1176,11 @@ LLPumpIO::LLChainInfo::LLChainInfo() : mEOS(false), mHasCurlRequest(false) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); mTimer.setTimerExpirySec(DEFAULT_CHAIN_EXPIRY_SECS); } void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(timeout > 0.0f) { mTimer.start(); @@ -1215,7 +1195,6 @@ void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout) void LLPumpIO::LLChainInfo::adjustTimeoutSeconds(F32 delta) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(mTimer.getStarted()) { F64 expiry = mTimer.expiresAt(); diff --git a/indra/llmessage/llsdrpcclient.cpp b/indra/llmessage/llsdrpcclient.cpp index 91fd070f07..fcda0e81a3 100644 --- a/indra/llmessage/llsdrpcclient.cpp +++ b/indra/llmessage/llsdrpcclient.cpp @@ -31,7 +31,6 @@ #include "llbufferstream.h" #include "llfiltersd2xmlrpc.h" -#include "llmemtype.h" #include "llpumpio.h" #include "llsd.h" #include "llsdserialize.h" @@ -50,18 +49,15 @@ LLSDRPCResponse::LLSDRPCResponse() : mIsError(false), mIsFault(false) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); } // virtual LLSDRPCResponse::~LLSDRPCResponse() { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); } bool LLSDRPCResponse::extractResponse(const LLSD& sd) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); bool rv = true; if(sd.has(LLSDRPC_RESPONSE_NAME)) { @@ -94,7 +90,6 @@ LLIOPipe::EStatus LLSDRPCResponse::process_impl( { LLFastTimer t(FTM_SDRPC_RESPONSE); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); if(mIsError) { error(pump); @@ -119,13 +114,11 @@ LLSDRPCClient::LLSDRPCClient() : mState(STATE_NONE), mQueue(EPBQ_PROCESS) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); } // virtual LLSDRPCClient::~LLSDRPCClient() { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); } bool LLSDRPCClient::call( @@ -135,7 +128,6 @@ bool LLSDRPCClient::call( LLSDRPCResponse* response, EPassBackQueue queue) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); //llinfos << "RPC: " << uri << "." << method << "(" << *parameter << ")" // << llendl; if(method.empty() || !response) @@ -162,7 +154,6 @@ bool LLSDRPCClient::call( LLSDRPCResponse* response, EPassBackQueue queue) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); //llinfos << "RPC: " << uri << "." << method << "(" << parameter << ")" // << llendl; if(method.empty() || parameter.empty() || !response) @@ -193,7 +184,6 @@ LLIOPipe::EStatus LLSDRPCClient::process_impl( { LLFastTimer t(FTM_PROCESS_SDRPC_CLIENT); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); if((STATE_NONE == mState) || (!pump)) { // You should have called the call() method already. diff --git a/indra/llmessage/llsdrpcserver.cpp b/indra/llmessage/llsdrpcserver.cpp index 9f776aca72..f26ee52f71 100644 --- a/indra/llmessage/llsdrpcserver.cpp +++ b/indra/llmessage/llsdrpcserver.cpp @@ -31,7 +31,6 @@ #include "llbuffer.h" #include "llbufferstream.h" -#include "llmemtype.h" #include "llpumpio.h" #include "llsdserialize.h" #include "llstl.h" @@ -58,12 +57,10 @@ LLSDRPCServer::LLSDRPCServer() : mPump(NULL), mLock(0) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); } LLSDRPCServer::~LLSDRPCServer() { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); std::for_each( mMethods.begin(), mMethods.end(), @@ -109,7 +106,6 @@ LLIOPipe::EStatus LLSDRPCServer::process_impl( { LLFastTimer t(FTM_PROCESS_SDRPC_SERVER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); // lldebugs << "LLSDRPCServer::process_impl" << llendl; // Once we have all the data, We need to read the sd on // the the in channel, and respond on the out channel @@ -253,7 +249,6 @@ ESDRPCSStatus LLSDRPCServer::callMethod( const LLChannelDescriptors& channels, LLBufferArray* response) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); // Try to find the method in the method table. ESDRPCSStatus rv = ESDRPCS_DONE; method_map_t::iterator it = mMethods.find(method); @@ -292,7 +287,6 @@ ESDRPCSStatus LLSDRPCServer::callbackMethod( const LLChannelDescriptors& channels, LLBufferArray* response) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); // Try to find the method in the callback method table. ESDRPCSStatus rv = ESDRPCS_DONE; method_map_t::iterator it = mCallbackMethods.find(method); @@ -320,7 +314,6 @@ void LLSDRPCServer::buildFault( S32 code, const std::string& msg) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); LLBufferStream ostr(channels, data); ostr << FAULT_PART_1 << code << FAULT_PART_2 << msg << FAULT_PART_3; llinfos << "LLSDRPCServer::buildFault: " << code << ", " << msg << llendl; @@ -332,7 +325,6 @@ void LLSDRPCServer::buildResponse( LLBufferArray* data, const LLSD& response) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); LLBufferStream ostr(channels, data); ostr << RESPONSE_PART_1; LLSDSerialize::toNotation(response, ostr); diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index a16f5c7bf0..227efdb07a 100644 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -34,7 +34,6 @@ #include <openssl/ssl.h> #include "llcurl.h" #include "llioutil.h" -#include "llmemtype.h" #include "llproxy.h" #include "llpumpio.h" #include "llsd.h" @@ -81,7 +80,6 @@ LLURLRequestDetail::LLURLRequestDetail() : mIsBodyLimitSet(false), mSSLVerifyCallback(NULL) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mCurlRequest = new LLCurlEasyRequest(); if(!mCurlRequest->isValid()) //failed. @@ -93,7 +91,6 @@ LLURLRequestDetail::LLURLRequestDetail() : LLURLRequestDetail::~LLURLRequestDetail() { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); delete mCurlRequest; mLastRead = NULL; } @@ -156,7 +153,6 @@ std::string LLURLRequest::actionAsVerb(LLURLRequest::ERequestAction action) LLURLRequest::LLURLRequest(LLURLRequest::ERequestAction action) : mAction(action) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); initialize(); } @@ -165,21 +161,18 @@ LLURLRequest::LLURLRequest( const std::string& url) : mAction(action) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); initialize(); setURL(url); } LLURLRequest::~LLURLRequest() { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); delete mDetail; mDetail = NULL ; } void LLURLRequest::setURL(const std::string& url) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mDetail->mURL = url; } @@ -190,7 +183,6 @@ std::string LLURLRequest::getURL() const void LLURLRequest::addHeader(const char* header) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mDetail->mCurlRequest->slist_append(header); } @@ -202,7 +194,6 @@ void LLURLRequest::setBodyLimit(U32 size) void LLURLRequest::setCallback(LLURLRequestComplete* callback) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mCompletionCallback = callback; mDetail->mCurlRequest->setHeaderCallback(&headerCallback, (void*)callback); } @@ -267,8 +258,6 @@ LLIOPipe::EStatus LLURLRequest::handleError( LLIOPipe::EStatus status, LLPumpIO* pump) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); - if(!isValid()) { return STATUS_EXPIRED ; @@ -289,6 +278,8 @@ LLIOPipe::EStatus LLURLRequest::handleError( } static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST("URL Request"); +static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST_GET_RESULT("Get Result"); +static LLFastTimer::DeclareTimer FTM_URL_PERFORM("Perform"); // virtual LLIOPipe::EStatus LLURLRequest::process_impl( @@ -300,7 +291,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl( { LLFastTimer t(FTM_PROCESS_URL_REQUEST); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); //llinfos << "LLURLRequest::process_impl()" << llendl; if (!buffer) return STATUS_ERROR; @@ -358,7 +348,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl( { PUMP_DEBUG; LLIOPipe::EStatus status = STATUS_BREAK; - static LLFastTimer::DeclareTimer FTM_URL_PERFORM("Perform"); { LLFastTimer t(FTM_URL_PERFORM); if(!mDetail->mCurlRequest->wait()) @@ -367,12 +356,11 @@ LLIOPipe::EStatus LLURLRequest::process_impl( } } - while(1) + bool keep_looping = true; + while(keep_looping) { CURLcode result; - static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST_GET_RESULT("Get Result"); - bool newmsg = false; { LLFastTimer t(FTM_PROCESS_URL_REQUEST_GET_RESULT); @@ -421,8 +409,9 @@ LLIOPipe::EStatus LLURLRequest::process_impl( case CURLE_FAILED_INIT: case CURLE_COULDNT_CONNECT: status = STATUS_NO_CONNECTION; + keep_looping = false; break; - default: + default: // CURLE_URL_MALFORMAT llwarns << "URLRequest Error: " << result << ", " << LLCurl::strerror(result) @@ -430,6 +419,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl( << (mDetail->mURL.empty() ? "<EMPTY URL>" : mDetail->mURL) << llendl; status = STATUS_ERROR; + keep_looping = false; break; } } @@ -456,7 +446,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl( void LLURLRequest::initialize() { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mState = STATE_INITIALIZED; mDetail = new LLURLRequestDetail; @@ -477,7 +466,6 @@ bool LLURLRequest::configure() { LLFastTimer t(FTM_URL_REQUEST_CONFIGURE); - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); bool rv = false; S32 bytes = mDetail->mResponseBuffer->countAfter( mDetail->mChannels.in(), @@ -557,7 +545,6 @@ size_t LLURLRequest::downCallback( size_t nmemb, void* user) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); LLURLRequest* req = (LLURLRequest*)user; if(STATE_WAITING_FOR_RESPONSE == req->mState) { @@ -593,7 +580,6 @@ size_t LLURLRequest::upCallback( size_t nmemb, void* user) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); LLURLRequest* req = (LLURLRequest*)user; S32 bytes = llmin( (S32)(size * nmemb), @@ -691,7 +677,6 @@ LLIOPipe::EStatus LLContextURLExtractor::process_impl( { LLFastTimer t(FTM_PROCESS_URL_EXTRACTOR); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); // The destination host is in the context. if(context.isUndefined() || !mRequest) { @@ -719,13 +704,11 @@ LLIOPipe::EStatus LLContextURLExtractor::process_impl( LLURLRequestComplete::LLURLRequestComplete() : mRequestStatus(LLIOPipe::STATUS_ERROR) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); } // virtual LLURLRequestComplete::~LLURLRequestComplete() { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); } //virtual @@ -764,7 +747,6 @@ void LLURLRequestComplete::noResponse() void LLURLRequestComplete::responseStatus(LLIOPipe::EStatus status) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mRequestStatus = status; } diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index b9cddc8e45..00b9d81611 100644 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp @@ -886,8 +886,17 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user return; } - - std::string expanded_filename = gDirUtilp->getExpandedFilename( local_path, local_filename ); + // If we want to use a special path (e.g. LL_PATH_CACHE), we want to make sure we create the + // proper expanded filename. + std::string expanded_filename; + if (local_path != LL_PATH_NONE) + { + expanded_filename = gDirUtilp->getExpandedFilename( local_path, local_filename ); + } + else + { + expanded_filename = local_filename; + } llinfos << "starting file transfer: " << expanded_filename << " to " << mesgsys->getSender() << llendl; BOOL delete_local_on_completion = FALSE; diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 6a425cfe98..ae95087377 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -80,7 +80,6 @@ #include "v3math.h" #include "v4math.h" #include "lltransfertargetvfile.h" -#include "llmemtype.h" // Constants //const char* MESSAGE_LOG_FILENAME = "message.log"; @@ -793,7 +792,6 @@ S32 LLMessageSystem::getReceiveBytes() const void LLMessageSystem::processAcks() { - LLMemType mt_pa(LLMemType::MTYPE_MESSAGE_PROCESS_ACKS); F64 mt_sec = getMessageTimeSeconds(); { gTransferManager.updateTransfers(); @@ -4020,7 +4018,6 @@ void LLMessageSystem::setTimeDecodesSpamThreshold( F32 seconds ) // TODO: babbage: move gServicePump in to LLMessageSystem? bool LLMessageSystem::checkAllMessages(S64 frame_count, LLPumpIO* http_pump) { - LLMemType mt_cam(LLMemType::MTYPE_MESSAGE_CHECK_ALL); if(checkMessages(frame_count)) { return true; diff --git a/indra/llmessage/tests/llcurl_stub.cpp b/indra/llmessage/tests/llcurl_stub.cpp index d84fe0a49f..9b298d0c04 100644 --- a/indra/llmessage/tests/llcurl_stub.cpp +++ b/indra/llmessage/tests/llcurl_stub.cpp @@ -28,7 +28,6 @@ #include "llcurl.h" LLCurl::Responder::Responder() - : mReferenceCount(0) { } @@ -77,19 +76,3 @@ void LLCurl::Responder::result(LLSD const&) { } -namespace boost -{ - void intrusive_ptr_add_ref(LLCurl::Responder* p) - { - ++p->mReferenceCount; - } - - void intrusive_ptr_release(LLCurl::Responder* p) - { - if(p && 0 == --p->mReferenceCount) - { - delete p; - } - } -}; - diff --git a/indra/llmessage/tests/llhttpclient_test.cpp b/indra/llmessage/tests/llhttpclient_test.cpp index 843c3bcc4b..7c3def6024 100644 --- a/indra/llmessage/tests/llhttpclient_test.cpp +++ b/indra/llmessage/tests/llhttpclient_test.cpp @@ -48,7 +48,7 @@ namespace tut { LLSD storage; - + class LLSDStorageNode : public LLHTTPNode { public: @@ -82,8 +82,13 @@ namespace tut { public: HTTPClientTestData(): - local_server(STRINGIZE("http://127.0.0.1:" << getenv("PORT") << "/")) + PORT(getenv("PORT")), + // Turning NULL PORT into empty string doesn't make things work; + // that's just to keep this initializer from blowing up. We test + // PORT separately in the constructor body. + local_server(STRINGIZE("http://127.0.0.1:" << (PORT? PORT : "") << "/")) { + ensure("Set environment variable PORT to local test server port", PORT); apr_pool_create(&mPool, NULL); LLCurl::initClass(false); mServerPump = new LLPumpIO(mPool); @@ -91,7 +96,7 @@ namespace tut LLHTTPClient::setPump(*mClientPump); } - + ~HTTPClientTestData() { delete mServerPump; @@ -107,7 +112,7 @@ namespace tut LLHTTPStandardServices::useServices(); LLHTTPRegistrar::buildAllServices(root); } - + void runThePump(float timeout = 100.0f) { LLTimer timer; @@ -134,6 +139,7 @@ namespace tut mServerPump = NULL; } + const char* const PORT; const std::string local_server; private: @@ -148,11 +154,11 @@ namespace tut { std::string msg = llformat("error() called when not expected, status %d", - mStatus); + mStatus); fail(msg); } } - + void ensureStatusError() { if (!mSawError) @@ -160,7 +166,7 @@ namespace tut fail("error() wasn't called"); } } - + LLSD getResult() { return mResult; @@ -169,7 +175,7 @@ namespace tut { return mHeader; } - + protected: bool mSawError; U32 mStatus; @@ -187,18 +193,18 @@ namespace tut : mClient(client) { } - + public: - static boost::intrusive_ptr<Result> build(HTTPClientTestData& client) + static Result* build(HTTPClientTestData& client) { - return boost::intrusive_ptr<Result>(new Result(client)); + return new Result(client); } - + ~Result() { mClient.mResultDeleted = true; } - + virtual void error(U32 status, const std::string& reason) { mClient.mSawError = true; @@ -216,7 +222,7 @@ namespace tut const LLSD& content) { LLHTTPClient::Responder::completed(status, reason, content); - + mClient.mSawCompleted = true; } @@ -244,12 +250,12 @@ namespace tut mResult.clear(); mHeader.clear(); mResultDeleted = false; - + return Result::build(*this); } }; - - + + typedef test_group<HTTPClientTestData> HTTPClientTestGroup; typedef HTTPClientTestGroup::object HTTPClientTestObject; HTTPClientTestGroup httpClientTestGroup("http_client"); diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 3fc54573a7..8183467dc5 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -15,7 +15,6 @@ include_directories( if (DARWIN) include(CMakeFindFrameworks) - find_library(CARBON_LIBRARY Carbon) find_library(COCOA_LIBRARY Cocoa) endif (DARWIN) @@ -68,7 +67,7 @@ add_dependencies(SLPlugin if (DARWIN) # Mac version needs to link against Carbon - target_link_libraries(SLPlugin ${CARBON_LIBRARY} ${COCOA_LIBRARY}) + target_link_libraries(SLPlugin ${COCOA_LIBRARY}) # Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later) add_custom_command( TARGET SLPlugin POST_BUILD diff --git a/indra/llplugin/slplugin/slplugin-objc.h b/indra/llplugin/slplugin/slplugin-objc.h index 602d848f7e..f2c2b3239c 100644 --- a/indra/llplugin/slplugin/slplugin-objc.h +++ b/indra/llplugin/slplugin/slplugin-objc.h @@ -28,8 +28,26 @@ * @endcond */ +//Protos for ObjectiveC classes (cannot import cocoa here due to BOOL conflict) +class NSWindow; /* Defined in slplugin-objc.mm: */ -void setupCocoa(); -void createAutoReleasePool(); -void deleteAutoReleasePool(); + +class LLCocoaPlugin +{ +public: + LLCocoaPlugin(); + void setupCocoa(); + void createAutoReleasePool(); + void deleteAutoReleasePool(); + void setupGroup(); + void updateWindows(); + void processEvents(); +public: + //EventTargetRef mEventTarget; + NSWindow* mFrontWindow; + NSWindow* mPluginWindow; + int mHackState; +}; + + diff --git a/indra/llplugin/slplugin/slplugin-objc.mm b/indra/llplugin/slplugin/slplugin-objc.mm index 646416b9d2..a434739350 100644 --- a/indra/llplugin/slplugin/slplugin-objc.mm +++ b/indra/llplugin/slplugin/slplugin-objc.mm @@ -30,11 +30,13 @@ #include <AppKit/AppKit.h> +#import <Cocoa/Cocoa.h> #include "slplugin-objc.h" +//Note: NSApp is a global defined by cocoa which is an id to the application. -void setupCocoa() +void LLCocoaPlugin::setupCocoa() { static bool inited = false; @@ -56,6 +58,8 @@ void setupCocoa() // Must first call [[[NSWindow alloc] init] release] to get the NSWindow machinery set up so that NSCursor can use a window to cache the cursor image [[[NSWindow alloc] init] release]; + mPluginWindow = [NSApp mainWindow]; + deleteAutoReleasePool(); inited = true; @@ -64,7 +68,7 @@ void setupCocoa() static NSAutoreleasePool *sPool = NULL; -void createAutoReleasePool() +void LLCocoaPlugin::createAutoReleasePool() { if(!sPool) { @@ -72,7 +76,7 @@ void createAutoReleasePool() } } -void deleteAutoReleasePool() +void LLCocoaPlugin::deleteAutoReleasePool() { if(sPool) { @@ -80,3 +84,94 @@ void deleteAutoReleasePool() sPool = NULL; } } + +LLCocoaPlugin::LLCocoaPlugin():mHackState(0) +{ + NSArray* window_list = [NSApp orderedWindows]; + mFrontWindow = [window_list objectAtIndex:0]; +} + +void LLCocoaPlugin::processEvents() +{ + // Some plugins (webkit at least) will want an event loop. This qualifies. + NSEvent * event; + event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES]; + [NSApp sendEvent: event]; +} + + +//Turns out the window ordering stuff never gets hit with any of the current plugins. +//Leaving the following code here 'just in case' for the time being. + +void LLCocoaPlugin::setupGroup() +{ + // CreateWindowGroup(kWindowGroupAttrFixedLevel, &layer_group); + // if(layer_group) + // { + // // Start out with a window layer that's way out in front (fixes the problem with the menubar not getting hidden on first switch to fullscreen youtube) + // SetWindowGroupName(layer_group, CFSTR("SLPlugin Layer")); + // SetWindowGroupLevel(layer_group, kCGOverlayWindowLevel); + // } + +} + +void LLCocoaPlugin::updateWindows() //SPATTERS give this a better name. +{ +// NSArray* window_list = [NSApp orderedWindows]; +// NSWindow* current_window = [window_list objectAtIndex:0]; +// NSWindow* parent_window = [ current_window parentWindow ]; +// bool this_is_front_process = false; +// bool parent_is_front_process = false; +// +// +// // Check for a change in this process's frontmost window. +// if ( current_window != mFrontWindow ) +// { +// // and figure out whether this process or its parent are currently frontmost +// if ( current_window == parent_window ) parent_is_front_process = true; +// if ( current_window == mPluginWindow ) this_is_front_process = true; +// +// if (current_window != NULL && mFrontWindow == NULL) +// { +// // Opening the first window +// +// if(mHackState == 0) +// { +// // Next time through the event loop, lower the window group layer +// mHackState = 1; +// } +// +// if(parent_is_front_process) +// { +// // Bring this process's windows to the front. +// [mPluginWindow makeKeyAndOrderFront:NSApp]; +// [mPluginWindow setOrderedIndex:0]; +// } +// +// [NSApp activateIgnoringOtherApps:YES]; +// } +// +// else if (( current_window == NULL) && (mFrontWindow != NULL)) +// { +// // Closing the last window +// +// if(this_is_front_process) +// { +// // Try to bring this process's parent to the front +// [parent_window makeKeyAndOrderFront:NSApp]; +// [parent_window setOrderedIndex:0]; +// } +// } +// else if(mHackState == 1) +// { +//// if(layer_group) +//// { +//// // Set the window group level back to something less extreme +//// SetWindowGroupLevel(layer_group, kCGNormalWindowLevel); +//// } +// mHackState = 2; +// } +// +// mFrontWindow = [window_list objectAtIndex:0]; +// } + } diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp index 516a58db88..6c9ba0ae52 100644 --- a/indra/llplugin/slplugin/slplugin.cpp +++ b/indra/llplugin/slplugin/slplugin.cpp @@ -37,8 +37,12 @@ #include "llapr.h" #include "llstring.h" +#include <iostream> +#include <fstream> +using namespace std; + + #if LL_DARWIN - #include <Carbon/Carbon.h> #include "slplugin-objc.h" #endif @@ -176,6 +180,7 @@ int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL int main(int argc, char **argv) #endif { + ll_init_apr(); // Set up llerror logging @@ -216,26 +221,25 @@ int main(int argc, char **argv) // Catch signals that most kinds of crashes will generate, and exit cleanly so the system crash dialog isn't shown. signal(SIGILL, &crash_handler); // illegal instruction -# if LL_DARWIN - signal(SIGEMT, &crash_handler); // emulate instruction executed -# endif // LL_DARWIN signal(SIGFPE, &crash_handler); // floating-point exception signal(SIGBUS, &crash_handler); // bus error signal(SIGSEGV, &crash_handler); // segmentation violation signal(SIGSYS, &crash_handler); // non-existent system call invoked #endif +# if LL_DARWIN + signal(SIGEMT, &crash_handler); // emulate instruction executed -#if LL_DARWIN - setupCocoa(); - createAutoReleasePool(); -#endif + LLCocoaPlugin cocoa_interface; + cocoa_interface.setupCocoa(); + cocoa_interface.createAutoReleasePool(); +#endif //LL_DARWIN LLPluginProcessChild *plugin = new LLPluginProcessChild(); plugin->init(port); #if LL_DARWIN - deleteAutoReleasePool(); + cocoa_interface.deleteAutoReleasePool(); #endif LLTimer timer; @@ -246,114 +250,22 @@ int main(int argc, char **argv) #endif #if LL_DARWIN + // If the plugin opens a new window (such as the Flash plugin's fullscreen player), we may need to bring this plugin process to the foreground. // Use this to track the current frontmost window and bring this process to the front if it changes. - WindowRef front_window = NULL; - WindowGroupRef layer_group = NULL; - int window_hack_state = 0; - CreateWindowGroup(kWindowGroupAttrFixedLevel, &layer_group); - if(layer_group) - { - // Start out with a window layer that's way out in front (fixes the problem with the menubar not getting hidden on first switch to fullscreen youtube) - SetWindowGroupName(layer_group, CFSTR("SLPlugin Layer")); - SetWindowGroupLevel(layer_group, kCGOverlayWindowLevel); - } -#endif - -#if LL_DARWIN - EventTargetRef event_target = GetEventDispatcherTarget(); + // cocoa_interface.mEventTarget = GetEventDispatcherTarget(); #endif while(!plugin->isDone()) { #if LL_DARWIN - createAutoReleasePool(); + cocoa_interface.createAutoReleasePool(); #endif timer.reset(); plugin->idle(); #if LL_DARWIN { - // Some plugins (webkit at least) will want an event loop. This qualifies. - EventRef event; - if(ReceiveNextEvent(0, 0, kEventDurationNoWait, true, &event) == noErr) - { - SendEventToEventTarget (event, event_target); - ReleaseEvent(event); - } - - // Check for a change in this process's frontmost window. - if(GetFrontWindowOfClass(kAllWindowClasses, true) != front_window) - { - ProcessSerialNumber self = { 0, kCurrentProcess }; - ProcessSerialNumber parent = { 0, kNoProcess }; - ProcessSerialNumber front = { 0, kNoProcess }; - Boolean this_is_front_process = false; - Boolean parent_is_front_process = false; - { - // Get this process's parent - ProcessInfoRec info; - info.processInfoLength = sizeof(ProcessInfoRec); - info.processName = NULL; - info.processAppSpec = NULL; - if(GetProcessInformation( &self, &info ) == noErr) - { - parent = info.processLauncher; - } - - // and figure out whether this process or its parent are currently frontmost - if(GetFrontProcess(&front) == noErr) - { - (void) SameProcess(&self, &front, &this_is_front_process); - (void) SameProcess(&parent, &front, &parent_is_front_process); - } - } - - if((GetFrontWindowOfClass(kAllWindowClasses, true) != NULL) && (front_window == NULL)) - { - // Opening the first window - - if(window_hack_state == 0) - { - // Next time through the event loop, lower the window group layer - window_hack_state = 1; - } - - if(layer_group) - { - SetWindowGroup(GetFrontWindowOfClass(kAllWindowClasses, true), layer_group); - } - - if(parent_is_front_process) - { - // Bring this process's windows to the front. - (void) SetFrontProcess( &self ); - } - - ActivateWindow(GetFrontWindowOfClass(kAllWindowClasses, true), true); - } - else if((GetFrontWindowOfClass(kAllWindowClasses, true) == NULL) && (front_window != NULL)) - { - // Closing the last window - - if(this_is_front_process) - { - // Try to bring this process's parent to the front - (void) SetFrontProcess(&parent); - } - } - else if(window_hack_state == 1) - { - if(layer_group) - { - // Set the window group level back to something less extreme - SetWindowGroupLevel(layer_group, kCGNormalWindowLevel); - } - window_hack_state = 2; - } - - front_window = GetFrontWindowOfClass(kAllWindowClasses, true); - - } - } + cocoa_interface.processEvents(); + } #endif F64 elapsed = timer.getElapsedTimeF64(); F64 remaining = plugin->getSleepTime() - elapsed; @@ -377,7 +289,8 @@ int main(int argc, char **argv) // LL_INFOS("slplugin") << "slept for "<< timer.getElapsedTimeF64() * 1000.0f << " ms" << LL_ENDL; } - + + #if LL_WINDOWS // More agressive checking of interfering exception handlers. // Doesn't appear to be required so far - even for plugins @@ -387,14 +300,14 @@ int main(int argc, char **argv) #endif #if LL_DARWIN - deleteAutoReleasePool(); + cocoa_interface.deleteAutoReleasePool(); #endif } - delete plugin; ll_cleanup_apr(); + return 0; } diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index cb32a510b8..28ed051c55 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1026,7 +1026,8 @@ void LLModel::setVolumeFaceData( if (tc.get()) { - LLVector4a::memcpyNonAliased16((F32*) face.mTexCoords, (F32*) tc.get(), num_verts*2*sizeof(F32)); + U32 tex_size = (num_verts*2*sizeof(F32)+0xF)&~0xF; + LLVector4a::memcpyNonAliased16((F32*) face.mTexCoords, (F32*) tc.get(), tex_size); } else { diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 30532247ac..946251f383 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -27,7 +27,6 @@ #include "linden_common.h" #include "material_codes.h" -#include "llmemtype.h" #include "llerror.h" #include "message.h" #include "llprimitive.h" @@ -149,7 +148,8 @@ bool LLPrimitive::cleanupVolumeManager() LLPrimitive::LLPrimitive() : mTextureList(), mNumTEs(0), - mMiscFlags(0) + mMiscFlags(0), + mNumBumpmapTEs(0) { mPrimitiveCode = 0; @@ -188,7 +188,6 @@ void LLPrimitive::clearTextureList() // static LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code) { - LLMemType m1(LLMemType::MTYPE_PRIMITIVE); LLPrimitive *retval = new LLPrimitive(); if (retval) @@ -206,7 +205,6 @@ LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code) //=============================================================== void LLPrimitive::init_primitive(LLPCode p_code) { - LLMemType m1(LLMemType::MTYPE_PRIMITIVE); clearTextureList(); mPrimitiveCode = p_code; } @@ -237,7 +235,10 @@ void LLPrimitive::setAllTETextures(const LLUUID &tex_id) //=============================================================== void LLPrimitive::setTE(const U8 index, const LLTextureEntry& te) { - mTextureList.copyTexture(index, te); + if(mTextureList.copyTexture(index, te) != TEM_CHANGE_NONE && te.getBumpmap() > 0) + { + mNumBumpmapTEs++; + } } S32 LLPrimitive::setTETexture(const U8 index, const LLUUID &id) @@ -316,6 +317,7 @@ S32 LLPrimitive::setTERotation(const U8 index, const F32 r) //=============================================================== S32 LLPrimitive::setTEBumpShinyFullbright(const U8 index, const U8 bump) { + updateNumBumpmap(index, bump); return mTextureList.setBumpShinyFullbright(index, bump); } @@ -326,11 +328,13 @@ S32 LLPrimitive::setTEMediaTexGen(const U8 index, const U8 media) S32 LLPrimitive::setTEBumpmap(const U8 index, const U8 bump) { + updateNumBumpmap(index, bump); return mTextureList.setBumpMap(index, bump); } S32 LLPrimitive::setTEBumpShiny(const U8 index, const U8 bump_shiny) { + updateNumBumpmap(index, bump_shiny); return mTextureList.setBumpShiny(index, bump_shiny); } @@ -698,7 +702,6 @@ S32 face_index_from_id(LLFaceID face_ID, const std::vector<LLProfile::Face>& fac BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume) { - LLMemType m1(LLMemType::MTYPE_VOLUME); LLVolume *volumep; if (unique_volume) { @@ -1445,6 +1448,26 @@ void LLPrimitive::takeTextureList(LLPrimTextureList& other_list) mTextureList.take(other_list); } +void LLPrimitive::updateNumBumpmap(const U8 index, const U8 bump) +{ + LLTextureEntry* te = getTE(index); + if(!te) + { + return; + } + + U8 old_bump = te->getBumpmap(); + if(old_bump > 0) + { + mNumBumpmapTEs--; + } + if((bump & TEM_BUMP_MASK) > 0) + { + mNumBumpmapTEs++; + } + + return; +} //============================================================================ // Moved from llselectmgr.cpp diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index 998016f8f6..8dcaa8c740 100644 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -421,7 +421,8 @@ public: inline BOOL isAvatar() const; inline BOOL isSittingAvatar() const; inline BOOL isSittingAvatarOnGround() const; - + inline bool hasBumpmap() const { return mNumBumpmapTEs > 0;} + void setFlags(U32 flags) { mMiscFlags = flags; } void addFlags(U32 flags) { mMiscFlags |= flags; } void removeFlags(U32 flags) { mMiscFlags &= ~flags; } @@ -435,6 +436,9 @@ public: inline static BOOL isPrimitive(const LLPCode pcode); inline static BOOL isApp(const LLPCode pcode); +private: + void updateNumBumpmap(const U8 index, const U8 bump); + protected: LLPCode mPrimitiveCode; // Primitive code LLVector3 mVelocity; // how fast are we moving? @@ -444,6 +448,7 @@ protected: LLPrimTextureList mTextureList; // list of texture GUIDs, scales, offsets U8 mMaterial; // Material code U8 mNumTEs; // # of faces on the primitve + U8 mNumBumpmapTEs; // number of bumpmap TEs. U32 mMiscFlags; // home for misc bools public: diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp index 36e04df7b7..7ef87ed382 100644 --- a/indra/llprimitive/llprimtexturelist.cpp +++ b/indra/llprimitive/llprimtexturelist.cpp @@ -28,7 +28,6 @@ #include "llprimtexturelist.h" #include "lltextureentry.h" -#include "llmemtype.h" // static //int (TMyClass::*pt2Member)(float, char, char) = NULL; // C++ @@ -367,7 +366,6 @@ S32 LLPrimTextureList::size() const // sets the size of the mEntryList container void LLPrimTextureList::setSize(S32 new_size) { - LLMemType m1(LLMemType::MTYPE_PRIMITIVE); if (new_size < 0) { new_size = 0; diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 4dc2fcd714..8772779645 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -599,6 +599,11 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch if(!fgi) { fgi = mFontFreetype->getGlyphInfo(wch); + + if (NULL == fgi) + { + return 0; + } } // account for glyphs that run beyond the starting point for the next glyphs @@ -789,7 +794,7 @@ const LLFontDescriptor& LLFontGL::getFontDesc() const } // static -void LLFontGL::initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::string& app_dir, const std::vector<std::string>& xui_paths, bool create_gl_textures) +void LLFontGL::initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::string& app_dir, bool create_gl_textures) { sVertDPI = (F32)llfloor(screen_dpi * y_scale); sHorizDPI = (F32)llfloor(screen_dpi * x_scale); @@ -800,7 +805,7 @@ void LLFontGL::initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::st // Font registry init if (!sFontRegistry) { - sFontRegistry = new LLFontRegistry(xui_paths, create_gl_textures); + sFontRegistry = new LLFontRegistry(create_gl_textures); sFontRegistry->parseFontInfo("fonts.xml"); } else diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index 5ed5d2c4eb..0988e99deb 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -150,7 +150,7 @@ public: const LLFontDescriptor& getFontDesc() const; - static void initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::string& app_dir, const std::vector<std::string>& xui_paths, bool create_gl_textures = true); + static void initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::string& app_dir, bool create_gl_textures = true); // Load sans-serif, sans-serif-small, etc. // Slow, requires multiple seconds to load fonts. diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index 4d22eba3d9..b5bdba996f 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -163,14 +163,9 @@ LLFontDescriptor LLFontDescriptor::normalize() const return LLFontDescriptor(new_name,new_size,new_style,getFileNames()); } -LLFontRegistry::LLFontRegistry(const string_vec_t& xui_paths, - bool create_gl_textures) +LLFontRegistry::LLFontRegistry(bool create_gl_textures) : mCreateGLTextures(create_gl_textures) { - // Propagate this down from LLUICtrlFactory so LLRender doesn't - // need an upstream dependency on LLUI. - mXUIPaths = xui_paths; - // This is potentially a slow directory traversal, so we want to // cache the result. mUltimateFallbackList = LLWindow::getDynamicFallbackFontList(); @@ -183,27 +178,30 @@ LLFontRegistry::~LLFontRegistry() bool LLFontRegistry::parseFontInfo(const std::string& xml_filename) { - bool success = false; // Succeed if we find at least one XUI file - const string_vec_t& xml_paths = mXUIPaths; + bool success = false; // Succeed if we find and read at least one XUI file + const string_vec_t xml_paths = gDirUtilp->findSkinnedFilenames(LLDir::XUI, xml_filename); + if (xml_paths.empty()) + { + // We didn't even find one single XUI file + return false; + } + for (string_vec_t::const_iterator path_it = xml_paths.begin(); path_it != xml_paths.end(); ++path_it) { - LLXMLNodePtr root; - std::string full_filename = gDirUtilp->findSkinnedFilename(*path_it, xml_filename); - bool parsed_file = LLXMLNode::parseFile(full_filename, root, NULL); + bool parsed_file = LLXMLNode::parseFile(*path_it, root, NULL); if (!parsed_file) continue; - + if ( root.isNull() || ! root->hasName( "fonts" ) ) { - llwarns << "Bad font info file: " - << full_filename << llendl; + llwarns << "Bad font info file: " << *path_it << llendl; continue; } - + std::string root_name; root->getAttributeString("name",root_name); if (root->hasName("fonts")) @@ -215,7 +213,7 @@ bool LLFontRegistry::parseFontInfo(const std::string& xml_filename) } //if (success) // dump(); - + return success; } diff --git a/indra/llrender/llfontregistry.h b/indra/llrender/llfontregistry.h index 8b06191c56..059248fbbd 100644 --- a/indra/llrender/llfontregistry.h +++ b/indra/llrender/llfontregistry.h @@ -67,8 +67,7 @@ class LLFontRegistry public: // create_gl_textures - set to false for test apps with no OpenGL window, // such as llui_libtest - LLFontRegistry(const string_vec_t& xui_paths, - bool create_gl_textures); + LLFontRegistry(bool create_gl_textures); ~LLFontRegistry(); // Load standard font info from XML file(s). @@ -105,7 +104,6 @@ private: font_size_map_t mFontSizes; string_vec_t mUltimateFallbackList; - string_vec_t mXUIPaths; bool mCreateGLTextures; }; diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 0b56b3889c..c8cf3713ab 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -44,7 +44,6 @@ #include "llmath.h" #include "m4math.h" #include "llstring.h" -#include "llmemtype.h" #include "llstacktrace.h" #include "llglheaders.h" @@ -598,11 +597,6 @@ bool LLGLManager::initGL() if (mGLVendor.substr(0,4) == "ATI ") { mGLVendorShort = "ATI"; - BOOL mobile = FALSE; - if (mGLRenderer.find("MOBILITY") != std::string::npos) - { - mobile = TRUE; - } mIsATI = TRUE; #if LL_WINDOWS && !LL_MESA_HEADLESS @@ -1490,9 +1484,7 @@ void assert_glerror() void clear_glerror() { - // Create or update texture to be used with this data - GLenum error; - error = glGetError(); + glGetError(); } /////////////////////////////////////////////////////////////// @@ -2323,7 +2315,6 @@ void LLGLNamePool::release(GLuint name) //static void LLGLNamePool::upkeepPools() { - LLMemType mt(LLMemType::MTYPE_UPKEEP_POOLS); for (tracker_t::instance_iter iter = beginInstances(); iter != endInstances(); ++iter) { LLGLNamePool & pool = *iter; diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index 964495a3ab..d70e764769 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -424,6 +424,10 @@ const U32 FENCE_WAIT_TIME_NANOSECONDS = 1000; //1 ms class LLGLFence { public: + virtual ~LLGLFence() + { + } + virtual void placeFence() = 0; virtual bool isCompleted() = 0; virtual void wait() = 0; diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h index a0727b8686..509de51f4d 100644 --- a/indra/llrender/llglheaders.h +++ b/indra/llrender/llglheaders.h @@ -993,7 +993,12 @@ extern void glGetBufferPointervARB (GLenum, GLenum, GLvoid* *); } #endif +#if __MAC_OS_X_VERSION_MAX_ALLOWED <= 1070 +#include <OpenGL/gl.h> +#else #include <AGL/gl.h> +#endif + #endif // LL_MESA / LL_WINDOWS / LL_DARWIN diff --git a/indra/llrender/llglstates.h b/indra/llrender/llglstates.h index e26aead676..0e2c3bcb44 100644 --- a/indra/llrender/llglstates.h +++ b/indra/llrender/llglstates.h @@ -59,7 +59,6 @@ protected: LLGLEnable mColorMaterial; LLGLDisable mAlphaTest, mBlend, mCullFace, mDither, mFog, mLineSmooth, mLineStipple, mNormalize, mPolygonSmooth, - mTextureGenQ, mTextureGenR, mTextureGenS, mTextureGenT, mGLMultisample; public: LLGLSDefault() @@ -76,10 +75,6 @@ public: mLineStipple(GL_LINE_STIPPLE), mNormalize(GL_NORMALIZE), mPolygonSmooth(GL_POLYGON_SMOOTH), - mTextureGenQ(GL_TEXTURE_GEN_Q), - mTextureGenR(GL_TEXTURE_GEN_R), - mTextureGenS(GL_TEXTURE_GEN_S), - mTextureGenT(GL_TEXTURE_GEN_T), mGLMultisample(GL_MULTISAMPLE_ARB) { } }; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 659d3ca409..a4d7872ec2 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -237,9 +237,11 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat) //---------------------------------------------------------------------------- +static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_STATS("Image Stats"); // static void LLImageGL::updateStats(F32 current_time) { + LLFastTimer t(FTM_IMAGE_UPDATE_STATS); sLastFrameTime = current_time; sBoundTextureMemoryInBytes = sCurBoundTextureMemory; sCurBoundTextureMemory = 0; @@ -476,7 +478,7 @@ bool LLImageGL::checkSize(S32 width, S32 height) return check_power_of_two(width) && check_power_of_two(height); } -void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents) +void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level) { if (width != mWidth || height != mHeight || ncomponents != mComponents) { @@ -509,6 +511,11 @@ void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents) width >>= 1; height >>= 1; } + + if(discard_level > 0) + { + mMaxDiscardLevel = llmax(mMaxDiscardLevel, (S8)discard_level); + } } else { @@ -858,14 +865,13 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image) llassert(mCurrentDiscardLevel >= 0); discard_level = mCurrentDiscardLevel; } - discard_level = llclamp(discard_level, 0, (S32)mMaxDiscardLevel); - + // Actual image width/height = raw image width/height * 2^discard_level S32 w = raw_image->getWidth() << discard_level; S32 h = raw_image->getHeight() << discard_level; // setSize may call destroyGLTexture if the size does not match - setSize(w, h, raw_image->getComponents()); + setSize(w, h, raw_image->getComponents(), discard_level); if( !mHasExplicitFormat ) { @@ -1262,8 +1268,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S llassert(mCurrentDiscardLevel >= 0); discard_level = mCurrentDiscardLevel; } - discard_level = llclamp(discard_level, 0, (S32)mMaxDiscardLevel); - + // Actual image width/height = raw image width/height * 2^discard_level S32 raw_w = imageraw->getWidth() ; S32 raw_h = imageraw->getHeight() ; @@ -1271,7 +1276,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S S32 h = raw_h << discard_level; // setSize may call destroyGLTexture if the size does not match - setSize(w, h, imageraw->getComponents()); + setSize(w, h, imageraw->getComponents(), discard_level); if( !mHasExplicitFormat ) { diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index e118c28c1b..cf3c484c79 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -100,7 +100,7 @@ protected: public: virtual void dump(); // debugging info to llinfos - void setSize(S32 width, S32 height, S32 ncomponents); + void setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level = -1); void setComponents(S32 ncomponents) { mComponents = (S8)ncomponents ;} void setAllowCompression(bool allow) { mAllowCompression = allow; } diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 348c1eb1b7..4597d06260 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -648,7 +648,7 @@ void LLTexUnit::setTextureCombiner(eTextureBlendOp op, eTextureBlendSrc src1, eT gGL.flush(); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); } - + // We want an early out, because this function does a LOT of stuff. if ( ( (isAlpha && (mCurrAlphaOp == op) && (mCurrAlphaSrc1 == src1) && (mCurrAlphaSrc2 == src2)) || (!isAlpha && (mCurrColorOp == op) && (mCurrColorSrc1 == src1) && (mCurrColorSrc2 == src2)) ) && !gGL.mDirty) @@ -1437,6 +1437,17 @@ void LLRender::matrixMode(U32 mode) mMatrixMode = mode; } +U32 LLRender::getMatrixMode() +{ + if (mMatrixMode >= MM_TEXTURE0 && mMatrixMode <= MM_TEXTURE3) + { //always return MM_TEXTURE if current matrix mode points at any texture matrix + return MM_TEXTURE; + } + + return mMatrixMode; +} + + void LLRender::loadIdentity() { flush(); diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index fa5f7f311d..78a310e525 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -346,6 +346,7 @@ public: void loadIdentity(); void multMatrix(const GLfloat* m); void matrixMode(U32 mode); + U32 getMatrixMode(); const glh::matrix4f& getModelviewMatrix(); const glh::matrix4f& getProjectionMatrix(); diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index 99f0da330c..c1b96a43da 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -51,11 +51,13 @@ void check_framebuffer_status() } bool LLRenderTarget::sUseFBO = false; +U32 LLRenderTarget::sCurFBO = 0; LLRenderTarget::LLRenderTarget() : mResX(0), mResY(0), mFBO(0), + mPreviousFBO(0), mDepth(0), mStencil(0), mUseDepth(false), @@ -69,8 +71,47 @@ LLRenderTarget::~LLRenderTarget() release(); } +void LLRenderTarget::resize(U32 resx, U32 resy, U32 color_fmt) +{ + //for accounting, get the number of pixels added/subtracted + S32 pix_diff = (resx*resy)-(mResX*mResY); + + mResX = resx; + mResY = resy; + + for (U32 i = 0; i < mTex.size(); ++i) + { //resize color attachments + gGL.getTexUnit(0)->bindManual(mUsage, mTex[i]); + LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, color_fmt, mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE, NULL, false); + sBytesAllocated += pix_diff*4; + } + + if (mDepth) + { //resize depth attachment + if (mStencil) + { + //use render buffers where stencil buffers are in play + glBindRenderbuffer(GL_RENDERBUFFER, mDepth); + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, mResX, mResY); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + } + else + { + gGL.getTexUnit(0)->bindManual(mUsage, mDepth); + U32 internal_type = LLTexUnit::getInternalType(mUsage); + LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT24, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL, false); + } + + sBytesAllocated += pix_diff*4; + } +} + + bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo, S32 samples) { + resx = llmin(resx, (U32) 4096); + resy = llmin(resy, (U32) 4096); + stop_glerror(); release(); stop_glerror(); @@ -110,7 +151,7 @@ bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, boo glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, LLTexUnit::getInternalType(mUsage), mDepth, 0); stop_glerror(); } - glBindFramebuffer(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO); } stop_glerror(); @@ -127,10 +168,19 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt) } U32 offset = mTex.size(); - if (offset >= 4 || - (offset > 0 && (mFBO == 0 || !gGLManager.mHasDrawBuffers))) + + if( offset >= 4 ) { - llerrs << "Too many color attachments!" << llendl; + llwarns << "Too many color attachments" << llendl; + llassert( offset < 4 ); + return false; + } + if( offset > 0 && (mFBO == 0 || !gGLManager.mHasDrawBuffers) ) + { + llwarns << "FBO not used or no drawbuffers available; mFBO=" << (U32)mFBO << " gGLManager.mHasDrawBuffers=" << (U32)gGLManager.mHasDrawBuffers << llendl; + llassert( mFBO != 0 ); + llassert( gGLManager.mHasDrawBuffers ); + return false; } U32 tex; @@ -188,7 +238,7 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt) check_framebuffer_status(); - glBindFramebuffer(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO); } mTex.push_back(tex); @@ -277,7 +327,7 @@ void LLRenderTarget::shareDepthBuffer(LLRenderTarget& target) check_framebuffer_status(); - glBindFramebuffer(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO); target.mUseDepth = true; } @@ -340,9 +390,13 @@ void LLRenderTarget::bindTarget() { if (mFBO) { + mPreviousFBO = sCurFBO; + stop_glerror(); glBindFramebuffer(GL_FRAMEBUFFER, mFBO); + sCurFBO = mFBO; + stop_glerror(); if (gGLManager.mHasDrawBuffers) { //setup multiple render targets @@ -368,16 +422,6 @@ void LLRenderTarget::bindTarget() sBoundTarget = this; } -// static -void LLRenderTarget::unbindTarget() -{ - if (gGLManager.mHasFramebufferObject) - { - glBindFramebuffer(GL_FRAMEBUFFER, 0); - } - sBoundTarget = NULL; -} - void LLRenderTarget::clear(U32 mask_in) { U32 mask = GL_COLOR_BUFFER_BIT; @@ -443,7 +487,8 @@ void LLRenderTarget::flush(bool fetch_depth) else { stop_glerror(); - glBindFramebuffer(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, mPreviousFBO); + sCurFBO = mPreviousFBO; stop_glerror(); } } @@ -473,7 +518,7 @@ void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0, stop_glerror(); glCopyTexSubImage2D(LLTexUnit::getInternalType(mUsage), 0, srcX0, srcY0, dstX0, dstY0, dstX1, dstY1); stop_glerror(); - glBindFramebuffer(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO); stop_glerror(); } else @@ -490,7 +535,7 @@ void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0, stop_glerror(); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); stop_glerror(); - glBindFramebuffer(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO); stop_glerror(); } } @@ -516,7 +561,7 @@ void LLRenderTarget::copyContentsToFramebuffer(LLRenderTarget& source, S32 srcX0 stop_glerror(); glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); stop_glerror(); - glBindFramebuffer(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO); stop_glerror(); } } diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h index 8360458840..cf15f66d31 100644 --- a/indra/llrender/llrendertarget.h +++ b/indra/llrender/llrendertarget.h @@ -57,14 +57,13 @@ */ -class LLMultisampleBuffer; - class LLRenderTarget { public: //whether or not to use FBO implementation static bool sUseFBO; static U32 sBytesAllocated; + static U32 sCurFBO; LLRenderTarget(); ~LLRenderTarget(); @@ -74,6 +73,12 @@ public: //multiple calls will release previously allocated resources bool allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage = LLTexUnit::TT_TEXTURE, bool use_fbo = false, S32 samples = 0); + //resize existing attachments to use new resolution and color format + // CAUTION: if the GL runs out of memory attempting to resize, this render target will be undefined + // DO NOT use for screen space buffers or for scratch space for an image that might be uploaded + // DO use for render targets that resize often and aren't likely to ruin someone's day if they break + void resize(U32 resx, U32 resy, U32 color_fmt); + //add color buffer attachment //limit of 4 color attachments per render target bool addColorAttachment(U32 color_fmt); @@ -92,9 +97,6 @@ public: //applies appropriate viewport void bindTarget(); - //unbind target for rendering - static void unbindTarget(); - //clear render targer, clears depth buffer if present, //uses scissor rect if in copy-to-texture mode void clear(U32 mask = 0xFFFFFFFF); @@ -144,6 +146,7 @@ protected: std::vector<U32> mTex; std::vector<U32> mInternalFormat; U32 mFBO; + U32 mPreviousFBO; U32 mDepth; bool mStencil; bool mUseDepth; diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index a9248d4d73..b6a9a6b653 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -643,7 +643,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade text[count++] = strdup("#define textureCube texture\n"); text[count++] = strdup("#define texture2DLod textureLod\n"); text[count++] = strdup("#define shadow2D(a,b) vec2(texture(a,b))\n"); - + if (major_version > 1 || minor_version >= 40) { //GLSL 1.40 replaces texture2DRect et al with texture text[count++] = strdup("#define texture2DRect texture\n"); diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 80752231d7..dfbd8cd4ee 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -31,17 +31,12 @@ #include "llvertexbuffer.h" // #include "llrender.h" #include "llglheaders.h" -#include "llmemtype.h" #include "llrender.h" #include "llvector4a.h" #include "llshadermgr.h" #include "llglslshader.h" #include "llmemory.h" -#if LL_DARWIN -#define LL_VBO_POOLING 1 -#else -#endif //Next Highest Power Of Two //helper function, returns first number > v that is a power of 2, or v if v is already a power of 2 U32 nhpo2(U32 v) @@ -294,6 +289,7 @@ void LLVBOPool::seedPool() } + void LLVBOPool::cleanup() { U32 size = LL_VBO_BLOCK_SIZE; @@ -558,8 +554,21 @@ void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, con gGL.syncMatrices(); U32 count = pos.size(); - llassert_always(norm.size() >= pos.size()); - llassert_always(count > 0); + + llassert(norm.size() >= pos.size()); + llassert(count > 0); + + if( count == 0 ) + { + llwarns << "Called drawArrays with 0 vertices" << llendl; + return; + } + + if( norm.size() < pos.size() ) + { + llwarns << "Called drawArrays with #" << norm.size() << " normals and #" << pos.size() << " vertices" << llendl; + return; + } unbind(); @@ -860,7 +869,6 @@ void LLVertexBuffer::unbind() //static void LLVertexBuffer::cleanupClass() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_CLEANUP_CLASS); unbind(); sStreamIBOPool.cleanup(); @@ -941,8 +949,6 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) : mMappable(false), mFence(NULL) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_CONSTRUCTOR); - mMappable = (mUsage == GL_DYNAMIC_DRAW_ARB && !sDisableVBOMapping); //zero out offsets @@ -1002,7 +1008,6 @@ S32 LLVertexBuffer::getSize() const //virtual LLVertexBuffer::~LLVertexBuffer() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTRUCTOR); destroyGLBuffer(); destroyGLIndices(); @@ -1122,8 +1127,6 @@ void LLVertexBuffer::releaseIndices() void LLVertexBuffer::createGLBuffer(U32 size) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_VERTICES); - if (mGLBuffer) { destroyGLBuffer(); @@ -1153,8 +1156,6 @@ void LLVertexBuffer::createGLBuffer(U32 size) void LLVertexBuffer::createGLIndices(U32 size) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_INDICES); - if (mGLIndices) { destroyGLIndices(); @@ -1189,7 +1190,6 @@ void LLVertexBuffer::createGLIndices(U32 size) void LLVertexBuffer::destroyGLBuffer() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_BUFFER); if (mGLBuffer) { if (mMappedDataUsingVBOs) @@ -1210,7 +1210,6 @@ void LLVertexBuffer::destroyGLBuffer() void LLVertexBuffer::destroyGLIndices() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_INDICES); if (mGLIndices) { if (mMappedIndexDataUsingVBOs) @@ -1231,8 +1230,6 @@ void LLVertexBuffer::destroyGLIndices() void LLVertexBuffer::updateNumVerts(S32 nverts) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_VERTS); - llassert(nverts >= 0); if (nverts > 65536) @@ -1255,8 +1252,6 @@ void LLVertexBuffer::updateNumVerts(S32 nverts) void LLVertexBuffer::updateNumIndices(S32 nindices) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_INDICES); - llassert(nindices >= 0); U32 needed_size = sizeof(U16) * nindices; @@ -1273,8 +1268,6 @@ void LLVertexBuffer::updateNumIndices(S32 nindices) void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER); - stop_glerror(); if (nverts < 0 || nindices < 0 || @@ -1425,8 +1418,6 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices) llassert(newnverts >= 0); llassert(newnindices >= 0); - LLMemType mt2(LLMemType::MTYPE_VERTEX_RESIZE_BUFFER); - updateNumVerts(newnverts); updateNumIndices(newnindices); @@ -1474,7 +1465,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_BUFFER("VBO Map"); volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range) { bindGLBuffer(true); - LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER); if (mFinal) { llerrs << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << llendl; @@ -1523,7 +1513,6 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo if (!mVertexLocked) { - LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES); mVertexLocked = true; sMappedCount++; stop_glerror(); @@ -1654,7 +1643,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_INDEX("IBO Map"); volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER); bindGLIndices(true); if (mFinal) { @@ -1701,8 +1689,6 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range if (!mIndexLocked) { - LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES); - mIndexLocked = true; sMappedCount++; stop_glerror(); @@ -1825,7 +1811,6 @@ static LLFastTimer::DeclareTimer FTM_IBO_FLUSH_RANGE("Flush IBO Range"); void LLVertexBuffer::unmapBuffer() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_UNMAP_BUFFER); if (!useVBOs()) { return; //nothing to unmap @@ -2179,7 +2164,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask) { flush(); - LLMemType mt2(LLMemType::MTYPE_VERTEX_SET_BUFFER); //set up pointers if the data mask is different ... bool setup = (sLastMask != data_mask); @@ -2321,7 +2305,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask) // virtual (default) void LLVertexBuffer::setupVertexBuffer(U32 data_mask) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER); stop_glerror(); volatile U8* base = useVBOs() ? (U8*) mAlignedOffset : mMappedData; diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index cca4ca3981..9c961d67d6 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -33,6 +33,7 @@ set(llui_SOURCE_FILES llbadgeholder.cpp llbadgeowner.cpp llbutton.cpp + llchatentry.cpp llcheckboxctrl.cpp llclipboard.cpp llcombobox.cpp @@ -46,12 +47,16 @@ set(llui_SOURCE_FILES lleditmenuhandler.cpp llf32uictrl.cpp llfiltereditor.cpp + llflashtimer.cpp llflatlistview.cpp llfloater.cpp llfloaterreg.cpp llfloaterreglistener.cpp llflyoutbutton.cpp llfocusmgr.cpp + llfolderview.cpp + llfolderviewitem.cpp + llfolderviewmodel.cpp llfunctorregistry.cpp lliconctrl.cpp llkeywords.cpp @@ -66,7 +71,6 @@ set(llui_SOURCE_FILES llmultislider.cpp llmultisliderctrl.cpp llnotifications.cpp - llnotificationslistener.cpp llnotificationsutil.cpp llpanel.cpp llprogressbar.cpp @@ -135,6 +139,7 @@ set(llui_HEADER_FILES llbadgeowner.h llbutton.h llcallbackmap.h + llchatentry.h llcheckboxctrl.h llclipboard.h llcombobox.h @@ -148,14 +153,17 @@ set(llui_HEADER_FILES lleditmenuhandler.h llf32uictrl.h llfiltereditor.h + llflashtimer.h llflatlistview.h llfloater.h llfloaterreg.h llfloaterreglistener.h llflyoutbutton.h llfocusmgr.h + llfolderview.h + llfolderviewitem.h + llfolderviewmodel.h llfunctorregistry.h - llhandle.h llhelp.h lliconctrl.h llkeywords.h @@ -172,7 +180,6 @@ set(llui_HEADER_FILES llmultislider.h llnotificationptr.h llnotifications.h - llnotificationslistener.h llnotificationsutil.h llnotificationtemplate.h llnotificationvisibilityrule.h diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index c025cd7939..43462bd244 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -184,7 +184,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitleFontStyle(std::string if (mHeaderTextbox) { std::string text = mHeaderTextbox->getText(); - mStyleParams.font(mHeaderTextbox->getDefaultFont()); + mStyleParams.font(mHeaderTextbox->getFont()); mStyleParams.font.style(style); mHeaderTextbox->setText(text, mStyleParams); } diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 705fe16559..a8149a9a1d 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -105,6 +105,7 @@ LLButton::Params::Params() badge("badge"), handle_right_mouse("handle_right_mouse"), held_down_delay("held_down_delay"), + button_flash_enable("button_flash_enable", false), button_flash_count("button_flash_count"), button_flash_rate("button_flash_rate") { @@ -171,9 +172,24 @@ LLButton::LLButton(const LLButton::Params& p) mHeldDownSignal(NULL), mUseDrawContextAlpha(p.use_draw_context_alpha), mHandleRightMouse(p.handle_right_mouse), - mButtonFlashCount(p.button_flash_count), - mButtonFlashRate(p.button_flash_rate) + mFlashingTimer(NULL) { + if (p.button_flash_enable) + { + // If optional parameter "p.button_flash_count" is not provided, LLFlashTimer will be + // used instead it a "default" value from gSavedSettings.getS32("FlashCount")). + // Likewise, missing "p.button_flash_rate" is replaced by gSavedSettings.getF32("FlashPeriod"). + // Note: flashing should be allowed in settings.xml (boolean key "EnableButtonFlashing"). + S32 flash_count = p.button_flash_count.isProvided()? p.button_flash_count : 0; + F32 flash_rate = p.button_flash_rate.isProvided()? p.button_flash_rate : 0.0; + mFlashingTimer = new LLFlashTimer ((LLFlashTimer::callback_t)NULL, flash_count, flash_rate); + } + else + { + mButtonFlashCount = p.button_flash_count; + mButtonFlashRate = p.button_flash_rate; + } + static LLUICachedControl<S32> llbutton_orig_h_pad ("UIButtonOrigHPad", 0); static Params default_params(LLUICtrlFactory::getDefaultParams<LLButton>()); @@ -267,6 +283,11 @@ LLButton::~LLButton() delete mMouseDownSignal; delete mMouseUpSignal; delete mHeldDownSignal; + + if (mFlashingTimer) + { + mFlashingTimer->unset(); + } } // HACK: Committing a button is the same as instantly clicking it. @@ -591,22 +612,6 @@ void LLButton::draw() { static LLCachedControl<bool> sEnableButtonFlashing(*LLUI::sSettingGroups["config"], "EnableButtonFlashing", true); F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency(); - bool flash = FALSE; - - if( mFlashing) - { - if ( sEnableButtonFlashing) - { - F32 elapsed = mFlashingTimer.getElapsedTimeF32(); - S32 flash_count = S32(elapsed * mButtonFlashRate * 2.f); - // flash on or off? - flash = (flash_count % 2 == 0) || flash_count > S32((F32)mButtonFlashCount * 2.f); - } - else - { // otherwise just highlight button in flash color - flash = true; - } - } bool pressed_by_keyboard = FALSE; if (hasFocus()) @@ -631,9 +636,21 @@ void LLButton::draw() bool selected = getToggleState(); bool use_glow_effect = FALSE; - LLColor4 glow_color = LLColor4::white; + LLColor4 highlighting_color = LLColor4::white; + LLColor4 glow_color; LLRender::eBlendType glow_type = LLRender::BT_ADD_WITH_ALPHA; LLUIImage* imagep = NULL; + + // Cancel sticking of color, if the button is pressed, + // or when a flashing of the previously selected button is ended + if (mFlashingTimer + && ((selected && !mFlashingTimer->isFlashingInProgress()) || pressed)) + { + mFlashing = false; + } + + bool flash = mFlashing && sEnableButtonFlashing; + if (pressed && mDisplayPressedState) { imagep = selected ? mImagePressedSelected : mImagePressed; @@ -699,15 +716,20 @@ void LLButton::draw() imagep = mImageFlash; } // else use usual flashing via flash_color - else + else if (mFlashingTimer) { LLColor4 flash_color = mFlashBgColor.get(); use_glow_effect = TRUE; glow_type = LLRender::BT_ALPHA; // blend the glow - if (mNeedsHighlight) // highlighted AND flashing - glow_color = (glow_color*0.5f + flash_color*0.5f) % 2.0f; // average between flash and highlight colour, with sum of the opacity - else + + if (mFlashingTimer->isCurrentlyHighlighted() || !mFlashingTimer->isFlashingInProgress()) + { glow_color = flash_color; + } + else if (mNeedsHighlight) + { + glow_color = highlighting_color; + } } } @@ -756,8 +778,7 @@ void LLButton::draw() if (use_glow_effect) { mCurGlowStrength = lerp(mCurGlowStrength, - mFlashing ? (flash? 1.0 : 0.0) - : mHoverGlowStrength, + mFlashing ? (mFlashingTimer->isCurrentlyHighlighted() || !mFlashingTimer->isFlashingInProgress() || mNeedsHighlight? 1.0 : 0.0) : mHoverGlowStrength, LLCriticalDamp::getInterpolant(0.05f)); } else @@ -944,21 +965,26 @@ void LLButton::setToggleState(BOOL b) { setControlValue(b); // will fire LLControlVariable callbacks (if any) setValue(b); // may or may not be redundant + setFlashing(false); // stop flash state whenever the selected/unselected state if reset // Unselected label assignments autoResize(); } } -void LLButton::setFlashing( BOOL b ) +void LLButton::setFlashing(bool b) { - if ((bool)b != mFlashing) + if (mFlashingTimer) { mFlashing = b; - mFlashingTimer.reset(); + (b ? mFlashingTimer->startFlashing() : mFlashingTimer->stopFlashing()); + } + else if (b != mFlashing) + { + mFlashing = b; + mFrameTimer.reset(); } } - BOOL LLButton::toggleState() { bool flipped = ! getToggleState(); diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index deaa0823c6..060db59a8a 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -30,6 +30,7 @@ #include "lluuid.h" #include "llbadgeowner.h" #include "llcontrol.h" +#include "llflashtimer.h" #include "lluictrl.h" #include "v4color.h" #include "llframetimer.h" @@ -133,6 +134,7 @@ public: Optional<bool> handle_right_mouse; + Optional<bool> button_flash_enable; Optional<S32> button_flash_count; Optional<F32> button_flash_rate; @@ -199,8 +201,9 @@ public: void setToggleState(BOOL b); void setHighlight(bool b); - void setFlashing( BOOL b ); + void setFlashing( bool b ); BOOL getFlashing() const { return mFlashing; } + LLFlashTimer* getFlashTimer() {return mFlashingTimer;} void setHAlign( LLFontGL::HAlign align ) { mHAlign = align; } LLFontGL::HAlign getHAlign() const { return mHAlign; } @@ -373,7 +376,8 @@ protected: bool mForcePressedState; bool mDisplayPressedState; - LLFrameTimer mFlashingTimer; + LLFrameTimer mFrameTimer; + LLFlashTimer * mFlashingTimer; bool mHandleRightMouse; }; diff --git a/indra/llui/llchatentry.cpp b/indra/llui/llchatentry.cpp new file mode 100644 index 0000000000..9e48dcde7e --- /dev/null +++ b/indra/llui/llchatentry.cpp @@ -0,0 +1,237 @@ +/** + * @file llchatentry.cpp + * @brief LLChatEntry implementation + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "linden_common.h" + +#include "llchatentry.h" + +static LLDefaultChildRegistry::Register<LLChatEntry> r("chat_editor"); + +LLChatEntry::Params::Params() +: has_history("has_history", true), + is_expandable("is_expandable", false), + expand_lines_count("expand_lines_count", 1) +{} + +LLChatEntry::LLChatEntry(const Params& p) +: LLTextEditor(p), + mTextExpandedSignal(NULL), + mHasHistory(p.has_history), + mIsExpandable(p.is_expandable), + mExpandLinesCount(p.expand_lines_count), + mPrevLinesCount(0) +{ + // Initialize current history line iterator + mCurrentHistoryLine = mLineHistory.begin(); + + mAutoIndent = false; +} + +LLChatEntry::~LLChatEntry() +{ + delete mTextExpandedSignal; +} + +void LLChatEntry::draw() +{ + if(mIsExpandable) + { + expandText(); + } + + LLTextEditor::draw(); +} + +void LLChatEntry::onCommit() +{ + updateHistory(); + LLTextEditor::onCommit(); +} + +boost::signals2::connection LLChatEntry::setTextExpandedCallback(const commit_signal_t::slot_type& cb) +{ + if (!mTextExpandedSignal) + { + mTextExpandedSignal = new commit_signal_t(); + } + return mTextExpandedSignal->connect(cb); +} + +void LLChatEntry::expandText() +{ + int visible_lines_count = llabs(getVisibleLines(true).first - getVisibleLines(true).second); + bool can_expand = getLineCount() <= mExpandLinesCount; + + // true if pasted text has more lines than expand height limit and expand limit is not reached yet + bool text_pasted = (getLineCount() > mExpandLinesCount) && (visible_lines_count < mExpandLinesCount); + + if (mIsExpandable && (can_expand || text_pasted) && getLineCount() != mPrevLinesCount) + { + int lines_height = 0; + if (text_pasted) + { + // text is pasted and now mLineInfoList.size() > mExpandLineCounts and mLineInfoList is not empty, + // so lines_height is the sum of the last 'mExpandLinesCount' lines height + lines_height = (mLineInfoList.end() - mExpandLinesCount)->mRect.mTop - mLineInfoList.back().mRect.mBottom; + } + else + { + lines_height = mLineInfoList.begin()->mRect.mTop - mLineInfoList.back().mRect.mBottom; + } + + int height = mVPad * 2 + lines_height; + + LLRect doc_rect = getRect(); + doc_rect.setOriginAndSize(doc_rect.mLeft, doc_rect.mBottom, doc_rect.getWidth(), height); + setShape(doc_rect); + + mPrevLinesCount = getLineCount(); + + if (mTextExpandedSignal) + { + (*mTextExpandedSignal)(this, LLSD() ); + } + } +} + +// line history support +void LLChatEntry::updateHistory() +{ + // On history enabled, remember committed line and + // reset current history line number. + // Be sure only to remember lines that are not empty and that are + // different from the last on the list. + if (mHasHistory && getLength()) + { + // Add text to history, ignoring duplicates + if (mLineHistory.empty() || getText() != mLineHistory.back()) + { + mLineHistory.push_back(getText()); + } + + mCurrentHistoryLine = mLineHistory.end(); + } +} + +void LLChatEntry::beforeValueChange() +{ + if(this->getLength() == 0 && !mLabel.empty()) + { + this->clearSegments(); + } +} + +void LLChatEntry::onValueChange(S32 start, S32 end) +{ + //Internally resetLabel() must meet a condition before it can reset the label + resetLabel(); +} + +bool LLChatEntry::useLabel() +{ + return !getLength() && !mLabel.empty(); +} + +void LLChatEntry::onFocusReceived() +{ + +} + +void LLChatEntry::onFocusLost() +{ + +} + +BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask) +{ + BOOL handled = FALSE; + + // In the case of a chat entry, pressing RETURN when something is selected + // should NOT erase the selection (unlike a notecard, for example) + if (key == KEY_RETURN) + { + endOfDoc(); + startSelection(); + endSelection(); + } + + LLTextEditor::handleSpecialKey(key, mask); + + switch(key) + { + case KEY_RETURN: + if (MASK_NONE == mask) + { + needsReflow(); + } + break; + + case KEY_UP: + if (mHasHistory && MASK_CONTROL == mask) + { + if (!mLineHistory.empty() && mCurrentHistoryLine > mLineHistory.begin()) + { + setText(*(--mCurrentHistoryLine)); + endOfDoc(); + } + else + { + LLUI::reportBadKeystroke(); + } + handled = TRUE; + } + break; + + case KEY_DOWN: + if (mHasHistory && MASK_CONTROL == mask) + { + if (!mLineHistory.empty() && mCurrentHistoryLine < (mLineHistory.end() - 1) ) + { + setText(*(++mCurrentHistoryLine)); + endOfDoc(); + } + else if (!mLineHistory.empty() && mCurrentHistoryLine == (mLineHistory.end() - 1) ) + { + mCurrentHistoryLine++; + std::string empty(""); + setText(empty); + needsReflow(); + endOfDoc(); + } + else + { + LLUI::reportBadKeystroke(); + } + handled = TRUE; + } + break; + + default: + break; + } + + return handled; +} diff --git a/indra/llui/llchatentry.h b/indra/llui/llchatentry.h new file mode 100644 index 0000000000..49181c8d78 --- /dev/null +++ b/indra/llui/llchatentry.h @@ -0,0 +1,103 @@ +/** + * @file llchatentry.h + * @author Paul Guslisty + * @brief Text editor widget which is used for user input + * + * Features: + * Optional line history so previous entries can be recalled by CTRL UP/DOWN + * Optional auto-resize behavior on input chat field + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLCHATENTRY_H_ +#define LLCHATENTRY_H_ + +#include "lltexteditor.h" + +class LLChatEntry : public LLTextEditor +{ +public: + + struct Params : public LLInitParam::Block<Params, LLTextEditor::Params> + { + Optional<bool> has_history, + is_expandable; + + Optional<int> expand_lines_count; + + Params(); + }; + + virtual ~LLChatEntry(); + +protected: + + friend class LLUICtrlFactory; + LLChatEntry(const Params& p); + /*virtual*/ void beforeValueChange(); + /*virtual*/ void onValueChange(S32 start, S32 end); + /*virtual*/ bool useLabel(); + +public: + + virtual void draw(); + virtual void onCommit(); + /*virtual*/ void onFocusReceived(); + /*virtual*/ void onFocusLost(); + + boost::signals2::connection setTextExpandedCallback(const commit_signal_t::slot_type& cb); + +private: + + /** + * Implements auto-resize behavior. + * When user's typing reaches the right edge of the chat field + * the chat field expands vertically by one line. The bottom of + * the chat field remains bottom-justified. The chat field does + * not expand beyond mExpandLinesCount. + */ + void expandText(); + + /** + * Implements line history so previous entries can be recalled by CTRL UP/DOWN + */ + void updateHistory(); + + BOOL handleSpecialKey(const KEY key, const MASK mask); + + + // Fired when text height expanded to mExpandLinesCount + commit_signal_t* mTextExpandedSignal; + + // line history support: + typedef std::vector<std::string> line_history_t; + line_history_t::iterator mCurrentHistoryLine; // currently browsed history line + line_history_t mLineHistory; // line history storage + bool mHasHistory; // flag for enabled/disabled line history + bool mIsExpandable; + + int mExpandLinesCount; + int mPrevLinesCount; +}; + +#endif /* LLCHATENTRY_H_ */ diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp index 4fe444c1a4..5525520d78 100644 --- a/indra/llui/llcheckboxctrl.cpp +++ b/indra/llui/llcheckboxctrl.cpp @@ -107,7 +107,7 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p) LLButton::Params params = p.check_button; params.rect(btn_rect); //params.control_name(p.control_name); - params.click_callback.function(boost::bind(&LLCheckBoxCtrl::onButtonPress, this, _2)); + params.click_callback.function(boost::bind(&LLCheckBoxCtrl::onCommit, this)); params.commit_on_return(false); // Checkboxes only allow boolean initial values, but buttons can // take any LLSD. @@ -123,18 +123,6 @@ LLCheckBoxCtrl::~LLCheckBoxCtrl() // Children all cleaned up by default view destructor. } - -// static -void LLCheckBoxCtrl::onButtonPress( const LLSD& data ) -{ - //if (mRadioStyle) - //{ - // setValue(TRUE); - //} - - onCommit(); -} - void LLCheckBoxCtrl::onCommit() { if( getEnabled() ) diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h index 67d8091a97..5ce45b2135 100644 --- a/indra/llui/llcheckboxctrl.h +++ b/indra/llui/llcheckboxctrl.h @@ -103,8 +103,6 @@ public: virtual void setControlName(const std::string& control_name, LLView* context); - void onButtonPress(const LLSD& data); - virtual BOOL isDirty() const; // Returns TRUE if the user has modified this control. virtual void resetDirty(); // Clear dirty state diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 806d2ef3f6..41e5d74042 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -563,8 +563,7 @@ void LLComboBox::showList() S32 min_width = getRect().getWidth(); S32 max_width = llmax(min_width, MAX_COMBO_WIDTH); // make sure we have up to date content width metrics - mList->calcColumnWidths(); - S32 list_width = llclamp(mList->getMaxContentWidth(), min_width, max_width); + S32 list_width = llclamp(mList->calcMaxContentWidth(), min_width, max_width); if (mListPosition == BELOW) { diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index 0e2f3f1961..625fb8e870 100644 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -63,6 +63,7 @@ LLCommand::Params::Params() , is_running_parameters("is_running_parameters") , is_starting_function("is_starting_function") , is_starting_parameters("is_starting_parameters") + , is_flashing_allowed("is_flashing_allowed", false) { } @@ -83,6 +84,7 @@ LLCommand::LLCommand(const LLCommand::Params& p) , mIsRunningParameters(p.is_running_parameters) , mIsStartingFunction(p.is_starting_function) , mIsStartingParameters(p.is_starting_parameters) + , mIsFlashingAllowed(p.is_flashing_allowed) { } diff --git a/indra/llui/llcommandmanager.h b/indra/llui/llcommandmanager.h index a7276a48aa..ff5a8a3257 100644 --- a/indra/llui/llcommandmanager.h +++ b/indra/llui/llcommandmanager.h @@ -111,6 +111,8 @@ public: Optional<std::string> is_starting_function; Optional<LLSD> is_starting_parameters; + Optional<bool> is_flashing_allowed; + Params(); }; @@ -138,6 +140,8 @@ public: const std::string& isStartingFunctionName() const { return mIsStartingFunction; } const LLSD& isStartingParameters() const { return mIsStartingParameters; } + bool isFlashingAllowed() const { return mIsFlashingAllowed; } + private: LLCommandId mIdentifier; @@ -161,6 +165,8 @@ private: std::string mIsStartingFunction; LLSD mIsStartingParameters; + + bool mIsFlashingAllowed; }; diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp index af39e41fa6..bd42497cb6 100644 --- a/indra/llui/lldockcontrol.cpp +++ b/indra/llui/lldockcontrol.cpp @@ -31,7 +31,6 @@ LLDockControl::LLDockControl(LLView* dockWidget, LLFloater* dockableFloater, const LLUIImagePtr& dockTongue, DocAt dockAt, get_allowed_rect_callback_t get_allowed_rect_callback) : - mDockWidget(dockWidget), mDockableFloater(dockableFloater), mDockTongue(dockTongue), mDockTongueX(0), @@ -39,6 +38,11 @@ LLDockControl::LLDockControl(LLView* dockWidget, LLFloater* dockableFloater, { mDockAt = dockAt; + if (dockWidget != NULL) + { + mDockWidgetHandle = dockWidget->getHandle(); + } + if (dockableFloater->isDocked()) { on(); @@ -62,7 +66,7 @@ LLDockControl::LLDockControl(LLView* dockWidget, LLFloater* dockableFloater, repositionDockable(); } - if (mDockWidget != NULL) + if (getDock() != NULL) { mDockWidgetVisible = isDockVisible(); } @@ -78,14 +82,15 @@ LLDockControl::~LLDockControl() void LLDockControl::setDock(LLView* dockWidget) { - mDockWidget = dockWidget; - if (mDockWidget != NULL) + if (dockWidget != NULL) { + mDockWidgetHandle = dockWidget->getHandle(); repositionDockable(); mDockWidgetVisible = isDockVisible(); } else { + mDockWidgetHandle = LLHandle<LLView>(); mDockWidgetVisible = false; } } @@ -97,8 +102,8 @@ void LLDockControl::getAllowedRect(LLRect& rect) void LLDockControl::repositionDockable() { - if (!mDockWidget) return; - LLRect dockRect = mDockWidget->calcScreenRect(); + if (!getDock()) return; + LLRect dockRect = getDock()->calcScreenRect(); LLRect rootRect; LLRect floater_rect = mDockableFloater->calcScreenRect(); mGetAllowedRectCallback(rootRect); @@ -150,13 +155,13 @@ bool LLDockControl::isDockVisible() { bool res = true; - if (mDockWidget != NULL) + if (getDock() != NULL) { //we should check all hierarchy - res = mDockWidget->isInVisibleChain(); + res = getDock()->isInVisibleChain(); if (res) { - LLRect dockRect = mDockWidget->calcScreenRect(); + LLRect dockRect = getDock()->calcScreenRect(); switch (mDockAt) { @@ -169,7 +174,7 @@ bool LLDockControl::isDockVisible() // assume that parent for all dockable floaters // is the root view LLRect dockParentRect = - mDockWidget->getRootView()->calcScreenRect(); + getDock()->getRootView()->calcScreenRect(); if (dockRect.mRight <= dockParentRect.mLeft || dockRect.mLeft >= dockParentRect.mRight) { @@ -189,7 +194,7 @@ bool LLDockControl::isDockVisible() void LLDockControl::moveDockable() { // calculate new dockable position - LLRect dockRect = mDockWidget->calcScreenRect(); + LLRect dockRect = getDock()->calcScreenRect(); LLRect rootRect; mGetAllowedRectCallback(rootRect); @@ -263,7 +268,7 @@ void LLDockControl::moveDockable() // calculate dock tongue position - dockParentRect = mDockWidget->getParent()->calcScreenRect(); + dockParentRect = getDock()->getParent()->calcScreenRect(); if (dockRect.getCenterX() < dockParentRect.mLeft) { mDockTongueX = dockParentRect.mLeft - mDockTongue->getWidth() / 2; @@ -299,7 +304,7 @@ void LLDockControl::moveDockable() } // calculate dock tongue position - dockParentRect = mDockWidget->getParent()->calcScreenRect(); + dockParentRect = getDock()->getParent()->calcScreenRect(); if (dockRect.getCenterX() < dockParentRect.mLeft) { mDockTongueX = dockParentRect.mLeft - mDockTongue->getWidth() / 2; diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h index c9602011f6..98a9c7236d 100644 --- a/indra/llui/lldockcontrol.h +++ b/indra/llui/lldockcontrol.h @@ -63,7 +63,7 @@ public: void setDock(LLView* dockWidget); LLView* getDock() { - return mDockWidget; + return mDockWidgetHandle.get(); } void repositionDockable(); void drawToungue(); @@ -83,7 +83,7 @@ private: bool mRecalculateDockablePosition; bool mDockWidgetVisible; DocAt mDockAt; - LLView* mDockWidget; + LLHandle<LLView> mDockWidgetHandle; LLRect mPrevDockRect; LLRect mRootRect; LLRect mFloaterRect; diff --git a/indra/llui/llflashtimer.cpp b/indra/llui/llflashtimer.cpp new file mode 100644 index 0000000000..e49628acd5 --- /dev/null +++ b/indra/llui/llflashtimer.cpp @@ -0,0 +1,100 @@ +/** + * @file llflashtimer.cpp + * @brief LLFlashTimer class implementation + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#include "../newview/llviewerprecompiledheaders.h" + +#include "llflashtimer.h" +#include "../newview/llviewercontrol.h" +#include "lleventtimer.h" + +LLFlashTimer::LLFlashTimer(callback_t cb, S32 count, F32 period) + : LLEventTimer(period) + , mCallback(cb) + , mCurrentTickCount(0) + , mIsFlashingInProgress(false) + , mIsCurrentlyHighlighted(false) + , mUnset(false) +{ + mEventTimer.stop(); + + // By default use settings from settings.xml to be able change them via Debug settings. See EXT-5973. + // Due to Timer is implemented as derived class from EventTimer it is impossible to change period + // in runtime. So, both settings are made as required restart. + mFlashCount = 2 * ((count > 0) ? count : gSavedSettings.getS32("FlashCount")); + if (mPeriod <= 0) + { + mPeriod = gSavedSettings.getF32("FlashPeriod"); + } +} + +void LLFlashTimer::unset() +{ + mUnset = true; + mCallback = NULL; +} + +BOOL LLFlashTimer::tick() +{ + mIsCurrentlyHighlighted = !mIsCurrentlyHighlighted; + + if (mCallback) + { + mCallback(mIsCurrentlyHighlighted); + } + + if (++mCurrentTickCount >= mFlashCount) + { + stopFlashing(); + } + + return mUnset; +} + +void LLFlashTimer::startFlashing() +{ + mIsFlashingInProgress = true; + mIsCurrentlyHighlighted = true; + mEventTimer.start(); +} + +void LLFlashTimer::stopFlashing() +{ + mEventTimer.stop(); + mIsFlashingInProgress = false; + mIsCurrentlyHighlighted = false; + mCurrentTickCount = 0; +} + +bool LLFlashTimer::isFlashingInProgress() +{ + return mIsFlashingInProgress; +} + +bool LLFlashTimer::isCurrentlyHighlighted() +{ + return mIsCurrentlyHighlighted; +} + + diff --git a/indra/llui/llflashtimer.h b/indra/llui/llflashtimer.h new file mode 100644 index 0000000000..c60f99a8ea --- /dev/null +++ b/indra/llui/llflashtimer.h @@ -0,0 +1,73 @@ +/** + * @file llflashtimer.h + * @brief LLFlashTimer class implementation + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_FLASHTIMER_H +#define LL_FLASHTIMER_H + +#include "lleventtimer.h" + +class LLFlashTimer : public LLEventTimer +{ +public: + + typedef boost::function<void (bool)> callback_t; + + /** + * Constructor. + * + * @param count - how many times callback should be called (twice to not change original state) + * @param period - how frequently callback should be called + * @param cb - callback to be called each tick + */ + LLFlashTimer(callback_t cb = NULL, S32 count = 0, F32 period = 0.0); + ~LLFlashTimer() {}; + + /*virtual*/ BOOL tick(); + + void startFlashing(); + void stopFlashing(); + + bool isFlashingInProgress(); + bool isCurrentlyHighlighted(); + /* + * Use this instead of deleting this object. + * The next call to tick() will return true and that will destroy this object. + */ + void unset(); + +private: + callback_t mCallback; + /** + * How many times parent will blink. + */ + S32 mFlashCount; + S32 mCurrentTickCount; + bool mIsCurrentlyHighlighted; + bool mIsFlashingInProgress; + bool mUnset; +}; + +#endif /* LL_FLASHTIMER_H */ diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 8ca1e685a9..09e27a264a 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -64,6 +64,8 @@ // use this to control "jumping" behavior when Ctrl-Tabbing const S32 TABBED_FLOATER_OFFSET = 0; +extern LLControlGroup gSavedSettings; + namespace LLInitParam { void TypeValues<LLFloaterEnums::EOpenPositioning>::declareValues() @@ -627,6 +629,17 @@ void LLFloater::setVisible( BOOL visible ) storeVisibilityControl(); } + +void LLFloater::setIsSingleInstance(BOOL is_single_instance) +{ + mSingleInstance = is_single_instance; + if (!mIsReuseInitialized) + { + mReuseInstance = is_single_instance; // reuse single-instance floaters by default + } +} + + // virtual void LLFloater::handleVisibilityChange ( BOOL new_visibility ) { @@ -642,14 +655,20 @@ void LLFloater::openFloater(const LLSD& key) { llinfos << "Opening floater " << getName() << llendl; mKey = key; // in case we need to open ourselves again - + if (getSoundFlags() != SILENT // don't play open sound for hosted (tabbed) windows && !getHost() && !getFloaterHost() && (!getVisible() || isMinimized())) { - make_ui_sound("UISndWindowOpen"); + //Don't play a sound for incoming voice call based upon chat preference setting + bool playSound = !(getName() == "incoming call" && gSavedSettings.getBOOL("PlaySoundIncomingVoiceCall") == FALSE); + + if(playSound) + { + make_ui_sound("UISndWindowOpen"); + } } //RN: for now, we don't allow rehosting from one multifloater to another @@ -713,6 +732,33 @@ void LLFloater::closeFloater(bool app_quitting) make_ui_sound("UISndWindowClose"); } + gFocusMgr.clearLastFocusForGroup(this); + + if (hasFocus()) + { + // Do this early, so UI controls will commit before the + // window is taken down. + releaseFocus(); + + // give focus to dependee floater if it exists, and we had focus first + if (isDependent()) + { + LLFloater* dependee = mDependeeHandle.get(); + if (dependee && !dependee->isDead()) + { + dependee->setFocus(TRUE); + } + } + } + + + //If floater is a dependent, remove it from parent (dependee) + LLFloater* dependee = mDependeeHandle.get(); + if (dependee) + { + dependee->removeDependentFloater(this); + } + // now close dependent floater for(handle_set_iter_t dependent_it = mDependents.begin(); dependent_it != mDependents.end(); ) @@ -731,24 +777,6 @@ void LLFloater::closeFloater(bool app_quitting) } cleanupHandles(); - gFocusMgr.clearLastFocusForGroup(this); - - if (hasFocus()) - { - // Do this early, so UI controls will commit before the - // window is taken down. - releaseFocus(); - - // give focus to dependee floater if it exists, and we had focus first - if (isDependent()) - { - LLFloater* dependee = mDependeeHandle.get(); - if (dependee && !dependee->isDead()) - { - dependee->setFocus(TRUE); - } - } - } dirtyRect(); @@ -785,6 +813,20 @@ void LLFloater::closeFloater(bool app_quitting) } /*virtual*/ +void LLFloater::closeHostedFloater() +{ + // When toggling *visibility*, close the host instead of the floater when hosted + if (getHost()) + { + getHost()->closeFloater(); + } + else + { + closeFloater(); + } +} + +/*virtual*/ void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent) { LLPanel::reshape(width, height, called_from_parent); @@ -1101,17 +1143,26 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user) const LLRect old_rect = getRect(); LLView::handleReshape(new_rect, by_user); - if (by_user && !isMinimized()) + if (by_user && !getHost()) { - storeRectControl(); - mPositioning = LLFloaterEnums::POSITIONING_RELATIVE; - LLRect screen_rect = calcScreenRect(); - mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert(); + static_cast<LLFloaterView*>(getParent())->adjustToFitScreen(this, !isMinimized()); } // if not minimized, adjust all snapped dependents to new shape if (!isMinimized()) { + if (by_user) + { + if (isDocked()) + { + setDocked( false, false); + } + storeRectControl(); + mPositioning = LLFloaterEnums::POSITIONING_RELATIVE; + LLRect screen_rect = calcScreenRect(); + mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert(); + } + // gather all snapped dependents for(handle_set_iter_t dependent_it = mDependents.begin(); dependent_it != mDependents.end(); ++dependent_it) @@ -1175,7 +1226,6 @@ void LLFloater::setMinimized(BOOL minimize) { // minimized flag should be turned on before release focus mMinimized = TRUE; - mExpandedRect = getRect(); // If the floater has been dragged while minimized in the @@ -1248,7 +1298,6 @@ void LLFloater::setMinimized(BOOL minimize) } setOrigin( mExpandedRect.mLeft, mExpandedRect.mBottom ); - if (mButtonsEnabled[BUTTON_RESTORE]) { mButtonsEnabled[BUTTON_MINIMIZE] = TRUE; @@ -1284,7 +1333,6 @@ void LLFloater::setMinimized(BOOL minimize) // Reshape *after* setting mMinimized reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE ); - applyPositioning(NULL, false); } make_ui_sound("UISndWindowClose"); @@ -1406,7 +1454,6 @@ void LLFloater::setHost(LLMultiFloater* host) mButtonScale = 1.f; //mButtonsEnabled[BUTTON_TEAR_OFF] = FALSE; } - updateTitleButtons(); if (host) { mHostHandle = host->getHandle(); @@ -1416,6 +1463,8 @@ void LLFloater::setHost(LLMultiFloater* host) { mHostHandle.markDead(); } + + updateTitleButtons(); } void LLFloater::moveResizeHandlesToFront() @@ -1572,10 +1621,19 @@ void LLFloater::bringToFront( S32 x, S32 y ) // virtual -void LLFloater::setVisibleAndFrontmost(BOOL take_focus) +void LLFloater::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key) { - setVisible(TRUE); - setFrontmost(take_focus); + LLMultiFloater* hostp = getHost(); + if (hostp) + { + hostp->setVisible(TRUE); + hostp->setFrontmost(take_focus); + } + else + { + setVisible(TRUE); + setFrontmost(take_focus); + } } void LLFloater::setFrontmost(BOOL take_focus) @@ -1657,10 +1715,12 @@ void LLFloater::onClickTearOff(LLFloater* self) gFloaterView->addChild(self); self->openFloater(self->getKey()); - - // only force position for floaters that don't have that data saved - if (self->mRectControl.empty()) + if (self->mSaveRect && !self->mRectControl.empty()) { + self->applyRectControl(); + } + else + { // only force position for floaters that don't have that data saved new_rect.setLeftTopAndSize(host_floater->getRect().mLeft + 5, host_floater->getRect().mTop - floater_header_size - 5, self->getRect().getWidth(), self->getRect().getHeight()); self->setRect(new_rect); } @@ -1674,6 +1734,10 @@ void LLFloater::onClickTearOff(LLFloater* self) LLMultiFloater* new_host = (LLMultiFloater*)self->mLastHostHandle.get(); if (new_host) { + if (self->mSaveRect) + { + self->storeRectControl(); + } self->setMinimized(FALSE); // to reenable minimize button if it was minimized new_host->showFloater(self); // make sure host is visible @@ -1682,6 +1746,7 @@ void LLFloater::onClickTearOff(LLFloater* self) self->setTornOff(false); } self->updateTitleButtons(); + self->setOpenPositioning(LLFloaterEnums::POSITIONING_RELATIVE); } // static @@ -1707,56 +1772,22 @@ void LLFloater::onClickHelp( LLFloater* self ) } } -// static -LLFloater* LLFloater::getClosableFloaterFromFocus() +void LLFloater::initRectControl() { - LLFloater* focused_floater = NULL; - LLInstanceTracker<LLFloater>::instance_iter it = beginInstances(); - LLInstanceTracker<LLFloater>::instance_iter end_it = endInstances(); - for (; it != end_it; ++it) + // save_rect and save_visibility only apply to registered floaters + if (mSaveRect) { - if (it->hasFocus()) - { - LLFloater& floater = *it; - focused_floater = &floater; - break; - } - } - - if (it == endInstances()) - { - // nothing found, return - return NULL; - } - - // The focused floater may not be closable, - // Find and close a parental floater that is closeable, if any. - LLFloater* prev_floater = NULL; - for(LLFloater* floater_to_close = focused_floater; - NULL != floater_to_close; - floater_to_close = gFloaterView->getParentFloater(floater_to_close)) - { - if(floater_to_close->isCloseable()) - { - return floater_to_close; - } - - // If floater has as parent root view - // gFloaterView->getParentFloater(floater_to_close) returns - // the same floater_to_close, so we need to check this. - if (prev_floater == floater_to_close) { - break; - } - prev_floater = floater_to_close; + std::string ctrl_name = getControlName(mInstanceName, mKey); + mRectControl = LLFloaterReg::declareRectControl(ctrl_name); + mPosXControl = LLFloaterReg::declarePosXControl(ctrl_name); + mPosYControl = LLFloaterReg::declarePosYControl(ctrl_name); } - - return NULL; } // static -void LLFloater::closeFocusedFloater() +void LLFloater::closeFrontmostFloater() { - LLFloater* floater_to_close = LLFloater::getClosableFloaterFromFocus(); + LLFloater* floater_to_close = gFloaterView->getFrontmostClosableFloater(); if(floater_to_close) { floater_to_close->closeFloater(); @@ -2197,7 +2228,8 @@ LLFloaterView::LLFloaterView (const Params& p) mFocusCycleMode(FALSE), mMinimizePositionVOffset(0), mSnapOffsetBottom(0), - mSnapOffsetRight(0) + mSnapOffsetRight(0), + mFrontChild(NULL) { mSnapView = getHandle(); } @@ -2346,6 +2378,17 @@ LLRect LLFloaterView::findNeighboringPosition( LLFloater* reference_floater, LLF void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) { + if (mFrontChild == child) + { + if (give_focus && !gFocusMgr.childHasKeyboardFocus(child)) + { + child->setFocus(TRUE); + } + return; + } + + mFrontChild = child; + // *TODO: make this respect floater's mAutoFocus value, instead of // using parameter if (child->getHost()) @@ -2353,15 +2396,14 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) // this floater is hosted elsewhere and hence not one of our children, abort return; } - std::vector<LLView*> floaters_to_move; + std::vector<LLFloater*> floaters_to_move; // Look at all floaters...tab - for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) + for (child_list_const_iter_t child_it = beginChild(); child_it != endChild(); ++child_it) { - LLView* viewp = *child_it; - LLFloater *floater = (LLFloater *)viewp; + LLFloater* floater = dynamic_cast<LLFloater*>(*child_it); // ...but if I'm a dependent floater... - if (child->isDependent()) + if (floater && child->isDependent()) { // ...look for floaters that have me as a dependent... LLFloater::handle_set_iter_t found_dependent = floater->mDependents.find(child->getHandle()); @@ -2369,15 +2411,14 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) if (found_dependent != floater->mDependents.end()) { // ...and make sure all children of that floater (including me) are brought to front... - for(LLFloater::handle_set_iter_t dependent_it = floater->mDependents.begin(); - dependent_it != floater->mDependents.end(); ) + for (LLFloater::handle_set_iter_t dependent_it = floater->mDependents.begin(); + dependent_it != floater->mDependents.end(); ++dependent_it) { LLFloater* sibling = dependent_it->get(); if (sibling) { floaters_to_move.push_back(sibling); } - ++dependent_it; } //...before bringing my parent to the front... floaters_to_move.push_back(floater); @@ -2385,10 +2426,10 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) } } - std::vector<LLView*>::iterator view_it; - for(view_it = floaters_to_move.begin(); view_it != floaters_to_move.end(); ++view_it) + std::vector<LLFloater*>::iterator floater_it; + for(floater_it = floaters_to_move.begin(); floater_it != floaters_to_move.end(); ++floater_it) { - LLFloater* floaterp = (LLFloater*)(*view_it); + LLFloater* floaterp = *floater_it; sendChildToFront(floaterp); // always unminimize dependee, but allow dependents to stay minimized @@ -2400,23 +2441,19 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) floaters_to_move.clear(); // ...then bringing my own dependents to the front... - for(LLFloater::handle_set_iter_t dependent_it = child->mDependents.begin(); - dependent_it != child->mDependents.end(); ) + for (LLFloater::handle_set_iter_t dependent_it = child->mDependents.begin(); + dependent_it != child->mDependents.end(); ++dependent_it) { LLFloater* dependent = dependent_it->get(); if (dependent) { sendChildToFront(dependent); - //don't un-minimize dependent windows automatically - // respect user's wishes - //dependent->setMinimized(FALSE); } - ++dependent_it; } // ...and finally bringing myself to front // (do this last, so that I'm left in front at end of this call) - if( *getChildList()->begin() != child ) + if (*beginChild() != child) { sendChildToFront(child); } @@ -2474,6 +2511,24 @@ void LLFloaterView::highlightFocusedFloater() } } +LLFloater* LLFloaterView::getFrontmostClosableFloater() +{ + child_list_const_iter_t child_it; + LLFloater* frontmost_floater = NULL; + + for ( child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) + { + frontmost_floater = (LLFloater *)(*child_it); + + if (frontmost_floater->isInVisibleChain() && frontmost_floater->isCloseable()) + { + return frontmost_floater; + } + } + + return NULL; +} + void LLFloaterView::unhighlightFocusedFloater() { for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) @@ -2938,21 +2993,14 @@ void LLFloaterView::popVisibleAll(const skip_list_t& skip_list) void LLFloater::setInstanceName(const std::string& name) { - if (name == mInstanceName) - return; + if (name != mInstanceName) + { llassert_always(mInstanceName.empty()); mInstanceName = name; if (!mInstanceName.empty()) { std::string ctrl_name = getControlName(mInstanceName, mKey); - - // save_rect and save_visibility only apply to registered floaters - if (mSaveRect) - { - mRectControl = LLFloaterReg::declareRectControl(ctrl_name); - mPosXControl = LLFloaterReg::declarePosXControl(ctrl_name); - mPosYControl = LLFloaterReg::declarePosYControl(ctrl_name); - } + initRectControl(); if (!mVisibilityControl.empty()) { mVisibilityControl = LLFloaterReg::declareVisibilityControl(ctrl_name); @@ -2963,6 +3011,7 @@ void LLFloater::setInstanceName(const std::string& name) } } } +} void LLFloater::setKey(const LLSD& newkey) { @@ -3229,24 +3278,14 @@ bool LLFloater::isVisible(const LLFloater* floater) static LLFastTimer::DeclareTimer FTM_BUILD_FLOATERS("Build Floaters"); -bool LLFloater::buildFromFile(const std::string& filename, LLXMLNodePtr output_node) +bool LLFloater::buildFromFile(const std::string& filename) { LLFastTimer timer(FTM_BUILD_FLOATERS); LLXMLNodePtr root; - //if exporting, only load the language being exported, - //instead of layering localized version on top of english - if (output_node) - { - if (!LLUICtrlFactory::getLocalizedXMLNode(filename, root)) - { - llwarns << "Couldn't parse floater from: " << LLUI::getLocalizedSkinPath() + gDirUtilp->getDirDelimiter() + filename << llendl; - return false; - } - } - else if (!LLUICtrlFactory::getLayeredXMLNode(filename, root)) + if (!LLUICtrlFactory::getLayeredXMLNode(filename, root)) { - llwarns << "Couldn't parse floater from: " << LLUI::getSkinPath() + gDirUtilp->getDirDelimiter() + filename << llendl; + llwarns << "Couldn't find (or parse) floater from: " << filename << llendl; return false; } @@ -3271,7 +3310,7 @@ bool LLFloater::buildFromFile(const std::string& filename, LLXMLNodePtr output_n getCommitCallbackRegistrar().pushScope(); getEnableCallbackRegistrar().pushScope(); - res = initFloaterXML(root, getParent(), filename, output_node); + res = initFloaterXML(root, getParent(), filename, NULL); setXMLFilename(filename); diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 64d6dcea04..4dba1e645f 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -202,7 +202,7 @@ public: // Don't export top/left for rect, only height/width static void setupParamsForExport(Params& p, LLView* parent); - bool buildFromFile(const std::string &filename, LLXMLNodePtr output_node = NULL); + bool buildFromFile(const std::string &filename); boost::signals2::connection setMinimizeCallback( const commit_signal_t::slot_type& cb ); boost::signals2::connection setOpenCallback( const commit_signal_t::slot_type& cb ); @@ -217,13 +217,17 @@ public: /*virtual*/ void setFocus( BOOL b ); /*virtual*/ void setIsChrome(BOOL is_chrome); /*virtual*/ void setRect(const LLRect &rect); + void setIsSingleInstance(BOOL is_single_instance); void initFloater(const Params& p); void openFloater(const LLSD& key = LLSD()); // If allowed, close the floater cleanly, releasing focus. - void closeFloater(bool app_quitting = false); + virtual void closeFloater(bool app_quitting = false); + + // Close the floater or its host. Use when hidding or toggling a floater instance. + virtual void closeHostedFloater(); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); @@ -301,6 +305,7 @@ public: /*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); // do not override void setFrontmost(BOOL take_focus = TRUE); + virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); // Defaults to false. virtual BOOL canSaveAs() const { return FALSE; } @@ -324,13 +329,13 @@ public: virtual void setDocked(bool docked, bool pop_on_undock = true); virtual void setTornOff(bool torn_off) { mTornOff = torn_off; } + bool isTornOff() {return mTornOff;} + void setOpenPositioning(LLFloaterEnums::EOpenPositioning pos) {mPositioning = pos;} - // Return a closeable floater, if any, given the current focus. - static LLFloater* getClosableFloaterFromFocus(); - // Close the floater returned by getClosableFloaterFromFocus() and + // Close the floater returned by getFrontmostClosableFloater() and // handle refocusing. - static void closeFocusedFloater(); + static void closeFrontmostFloater(); // LLNotification::Params contextualNotification(const std::string& name) // { @@ -356,6 +361,7 @@ protected: void stackWith(LLFloater& other); + virtual void initRectControl(); virtual bool applyRectControl(); bool applyDockState(); void applyPositioning(LLFloater* other, bool on_open); @@ -369,7 +375,6 @@ protected: void setInstanceName(const std::string& name); virtual void bringToFront(S32 x, S32 y); - virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE); void setExpandedRect(const LLRect& rect) { mExpandedRect = rect; } // size when not minimized const LLRect& getExpandedRect() const { return mExpandedRect; } @@ -443,9 +448,10 @@ private: LLUIString mTitle; LLUIString mShortTitle; - BOOL mSingleInstance; // TRUE if there is only ever one instance of the floater - bool mReuseInstance; // true if we want to hide the floater when we close it instead of destroying it - std::string mInstanceName; // Store the instance name so we can remove ourselves from the list + BOOL mSingleInstance; // TRUE if there is only ever one instance of the floater + bool mReuseInstance; // true if we want to hide the floater when we close it instead of destroying it + bool mIsReuseInitialized; // true if mReuseInstance already set from parameters + std::string mInstanceName; // Store the instance name so we can remove ourselves from the list BOOL mCanTearOff; BOOL mCanMinimize; @@ -559,6 +565,7 @@ public: S32 getZOrder(LLFloater* child); void setFloaterSnapView(LLHandle<LLView> snap_view) {mSnapView = snap_view; } + LLFloater* getFrontmostClosableFloater(); private: void hiddenFloaterClosed(LLFloater* floater); @@ -571,6 +578,7 @@ private: S32 mMinimizePositionVOffset; typedef std::vector<std::pair<LLHandle<LLFloater>, boost::signals2::connection> > hidden_floaters_t; hidden_floaters_t mHiddenFloaters; + LLFloater * mFrontChild; }; // diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 9115eb7174..1cdddf0d5b 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -154,7 +154,7 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key) llwarns << "Failed to build floater type: '" << name << "'." << llendl; return NULL; } - bool success = res->buildFromFile(xui_file, NULL); + bool success = res->buildFromFile(xui_file); if (!success) { llwarns << "Failed to build floater type: '" << name << "'." << llendl; @@ -264,17 +264,9 @@ bool LLFloaterReg::hideInstance(const std::string& name, const LLSD& key) LLFloater* instance = findInstance(name, key); if (instance) { - // When toggling *visibility*, close the host instead of the floater when hosted - if (instance->getHost()) - instance->getHost()->closeFloater(); - else - instance->closeFloater(); - return true; - } - else - { - return false; + instance->closeHostedFloater(); } + return (instance != NULL); } //static @@ -284,11 +276,7 @@ bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key) LLFloater* instance = findInstance(name, key); if (LLFloater::isShown(instance)) { - // When toggling *visibility*, close the host instead of the floater when hosted - if (instance->getHost()) - instance->getHost()->closeFloater(); - else - instance->closeFloater(); + instance->closeHostedFloater(); return false; } else @@ -481,31 +469,58 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& // * Also, if it is not on top, bring it forward when focus is given. // * Else the target floater is open, close it. // - std::string name = sdname.asString(); LLFloater* instance = getInstance(name, key); + if (!instance) { lldebugs << "Unable to get instance of floater '" << name << "'" << llendl; + return; } - else if (instance->isMinimized()) + + // If hosted, we need to take that into account + LLFloater* host = instance->getHost(); + + if (host) { - instance->setMinimized(FALSE); - instance->setVisibleAndFrontmost(); - } - else if (!instance->isShown()) - { - instance->openFloater(key); - instance->setVisibleAndFrontmost(); - } - else if (!instance->isFrontmost()) - { - instance->setVisibleAndFrontmost(); + if (host->isMinimized() || !host->isShown() || !host->isFrontmost()) + { + host->setMinimized(FALSE); + instance->openFloater(key); + instance->setVisibleAndFrontmost(true, key); + } + else if (!instance->getVisible()) + { + instance->openFloater(key); + instance->setVisibleAndFrontmost(true, key); + instance->setFocus(TRUE); + } + else + { + instance->closeHostedFloater(); + } } else { - instance->closeFloater(); + if (instance->isMinimized()) + { + instance->setMinimized(FALSE); + instance->setVisibleAndFrontmost(true, key); + } + else if (!instance->isShown()) + { + instance->openFloater(key); + instance->setVisibleAndFrontmost(true, key); + } + else if (!instance->isFrontmost()) + { + instance->setVisibleAndFrontmost(true, key); + } + else + { + instance->closeHostedFloater(); + } } } diff --git a/indra/newview/llfolderview.cpp b/indra/llui/llfolderview.cpp index 8e540a0cc8..8feaf654f0 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -24,39 +24,20 @@ * $/LicenseInfo$ */ -#include "llviewerprecompiledheaders.h" +#include "linden_common.h" #include "llfolderview.h" - -#include "llcallbacklist.h" -#include "llinventorybridge.h" +#include "llfolderviewmodel.h" #include "llclipboard.h" // *TODO: remove this once hack below gone. -#include "llinventoryfilter.h" -#include "llinventoryfunctions.h" -#include "llinventorymodelbackgroundfetch.h" -#include "llinventorypanel.h" -#include "llfoldertype.h" -#include "llfloaterinventory.h"// hacked in for the bonus context menu items. #include "llkeyboard.h" #include "lllineeditor.h" #include "llmenugl.h" #include "llpanel.h" -#include "llpreview.h" #include "llscrollcontainer.h" // hack to allow scrolling -#include "lltooldraganddrop.h" +#include "lltextbox.h" #include "lltrans.h" #include "llui.h" -#include "llviewertexture.h" -#include "llviewertexturelist.h" -#include "llviewerjointattachment.h" -#include "llviewermenu.h" #include "lluictrlfactory.h" -#include "llviewercontrol.h" -#include "llviewerfoldertype.h" -#include "llviewerwindow.h" -#include "llvoavatar.h" -#include "llfloaterproperties.h" -#include "llnotificationsutil.h" // Linden library includes #include "lldbstrings.h" @@ -64,7 +45,6 @@ #include "llfontgl.h" #include "llgl.h" #include "llrender.h" -#include "llinventory.h" // Third-party library includes #include <algorithm> @@ -76,11 +56,7 @@ const S32 RENAME_WIDTH_PAD = 4; const S32 RENAME_HEIGHT_PAD = 1; const S32 AUTO_OPEN_STACK_DEPTH = 16; -const S32 MIN_ITEM_WIDTH_VISIBLE = LLFolderViewItem::ICON_WIDTH - + LLFolderViewItem::ICON_PAD - + LLFolderViewItem::ARROW_SIZE - + LLFolderViewItem::TEXT_PAD - + /*first few characters*/ 40; + const S32 MINIMUM_RENAMER_WIDTH = 80; // *TODO: move in params in xml if necessary. Requires modification of LLFolderView & LLInventoryPanel Params. @@ -94,42 +70,6 @@ enum { F32 LLFolderView::sAutoOpenTime = 1.f; -void delete_selected_item(void* user_data); -void copy_selected_item(void* user_data); -void open_selected_items(void* user_data); -void properties_selected_items(void* user_data); -void paste_items(void* user_data); - - -//--------------------------------------------------------------------------- - -// Tells all folders in a folderview to sort their items -// (and only their items, not folders) by a certain function. -class LLSetItemSortFunction : public LLFolderViewFunctor -{ -public: - LLSetItemSortFunction(U32 ordering) - : mSortOrder(ordering) {} - virtual ~LLSetItemSortFunction() {} - virtual void doFolder(LLFolderViewFolder* folder); - virtual void doItem(LLFolderViewItem* item); - - U32 mSortOrder; -}; - - -// Set the sort order. -void LLSetItemSortFunction::doFolder(LLFolderViewFolder* folder) -{ - folder->setItemSortOrder(mSortOrder); -} - -// Do nothing. -void LLSetItemSortFunction::doItem(LLFolderViewItem* item) -{ - return; -} - //--------------------------------------------------------------------------- // Tells all folders in a folderview to close themselves @@ -154,7 +94,6 @@ public: }; -// Set the sort order. void LLCloseAllFoldersFunctor::doFolder(LLFolderViewFolder* folder) { folder->setOpenArrangeRecursively(mOpen); @@ -177,7 +116,7 @@ const LLRect LLFolderViewScrollContainer::getScrolledViewRect() const LLFolderView* folder_view = dynamic_cast<LLFolderView*>(mScrolledView); if (folder_view) { - S32 height = folder_view->mRunningHeight; + S32 height = folder_view->getRect().getHeight(); rect = mScrolledView->getRect(); rect.setLeftTopAndSize(rect.mLeft, rect.mTop, rect.getWidth(), height); @@ -195,27 +134,25 @@ LLFolderViewScrollContainer::LLFolderViewScrollContainer(const LLScrollContainer /// Class LLFolderView ///---------------------------------------------------------------------------- LLFolderView::Params::Params() -: task_id("task_id"), - title("title"), +: title("title"), use_label_suffix("use_label_suffix"), allow_multiselect("allow_multiselect", true), show_empty_message("show_empty_message", true), - show_load_status("show_load_status", true), - use_ellipses("use_ellipses", false) + use_ellipses("use_ellipses", false), + options_menu("options_menu", "") { + folder_indentation = -4; } // Default constructor LLFolderView::LLFolderView(const Params& p) : LLFolderViewFolder(p), - mRunningHeight(0), mScrollContainer( NULL ), mPopupMenuHandle(), mAllowMultiSelect(p.allow_multiselect), mShowEmptyMessage(p.show_empty_message), mShowFolderHierarchy(FALSE), - mSourceID(p.task_id), mRenameItem( NULL ), mNeedsScroll( FALSE ), mUseLabelSuffix(p.use_label_suffix), @@ -223,9 +160,6 @@ LLFolderView::LLFolderView(const Params& p) mNeedsAutoSelect( FALSE ), mAutoSelectOverride(FALSE), mNeedsAutoRename(FALSE), - mDebugFilters(FALSE), - mSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME), // This gets overridden by a pref immediately - mFilter( new LLInventoryFilter(p.title) ), mShowSelectionContext(FALSE), mShowSingleSelection(FALSE), mArrangeGeneration(0), @@ -236,33 +170,28 @@ LLFolderView::LLFolderView(const Params& p) mParentPanel(p.parent_panel), mUseEllipses(p.use_ellipses), mDraggingOverItem(NULL), - mStatusTextBox(NULL) + mStatusTextBox(NULL), + mShowItemLinkOverlays(p.show_item_link_overlays), + mViewModel(p.view_model) { + mViewModel->setFolderView(this); mRoot = this; - mShowLoadStatus = p.show_load_status(); - LLRect rect = p.rect; LLRect new_rect(rect.mLeft, rect.mBottom + getRect().getHeight(), rect.mLeft + getRect().getWidth(), rect.mBottom); setRect( rect ); reshape(rect.getWidth(), rect.getHeight()); - mIsOpen = TRUE; // this view is always open. mAutoOpenItems.setDepth(AUTO_OPEN_STACK_DEPTH); mAutoOpenCandidate = NULL; mAutoOpenTimer.stop(); mKeyboardSelection = FALSE; - const LLFolderViewItem::Params& item_params = - LLUICtrlFactory::getDefaultParams<LLFolderViewItem>(); - S32 indentation = item_params.folder_indentation(); - mIndentation = -indentation; // children start at indentation 0 - gIdleCallbacks.addFunction(idle, this); + mIndentation = p.folder_indentation; //clear label // go ahead and render root folder as usual // just make sure the label ("Inventory Folder") never shows up mLabel = LLStringUtil::null; - //mRenamer->setWriteableBgColor(LLColor4::white); // Escape is handled by reverting the rename, not commiting it (default behavior) LLLineEditor::Params params; params.name("ren"); @@ -279,10 +208,11 @@ LLFolderView::LLFolderView(const Params& p) // Textbox LLTextBox::Params text_p; LLFontGL* font = getLabelFontForStyle(mLabelStyle); - LLRect new_r = LLRect(rect.mLeft + ICON_PAD, - rect.mTop - TEXT_PAD, + //mIconPad, mTextPad are set in folder_view_item.xml + LLRect new_r = LLRect(rect.mLeft + mIconPad, + rect.mTop - mTextPad, rect.mRight, - rect.mTop - TEXT_PAD - font->getLineHeight()); + rect.mTop - mTextPad - font->getLineHeight()); text_p.rect(new_r); text_p.name(std::string(p.name)); text_p.font(font); @@ -299,7 +229,7 @@ LLFolderView::LLFolderView(const Params& p) // make the popup menu available - LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(p.options_menu, LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance()); if (!menu) { menu = LLUICtrlFactory::getDefaultWidget<LLMenuGL>("inventory_menu"); @@ -307,7 +237,7 @@ LLFolderView::LLFolderView(const Params& p) menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor")); mPopupMenuHandle = menu->getHandle(); - mListener->openItem(); + mViewModelItem->openItem(); } // Destroys the object @@ -326,7 +256,6 @@ LLFolderView::~LLFolderView( void ) mStatusTextBox = NULL; mAutoOpenItems.removeAllNodes(); - gIdleCallbacks.deleteFunction(idle, this); if (mPopupMenuHandle.get()) mPopupMenuHandle.get()->die(); @@ -335,10 +264,7 @@ LLFolderView::~LLFolderView( void ) mItems.clear(); mFolders.clear(); - mItemMap.clear(); - - delete mFilter; - mFilter = NULL; + mViewModel = NULL; } BOOL LLFolderView::canFocusChildren() const @@ -346,46 +272,9 @@ BOOL LLFolderView::canFocusChildren() const return FALSE; } -static LLFastTimer::DeclareTimer FTM_SORT("Sort Inventory"); - -void LLFolderView::setSortOrder(U32 order) -{ - if (order != mSortOrder) - { - LLFastTimer t(FTM_SORT); - - mSortOrder = order; - - sortBy(order); - arrangeAll(); - } -} - - -U32 LLFolderView::getSortOrder() const +void LLFolderView::addFolder( LLFolderViewFolder* folder) { - return mSortOrder; -} - -BOOL LLFolderView::addFolder( LLFolderViewFolder* folder) -{ - // enforce sort order of My Inventory followed by Library - if (folder->getListener()->getUUID() == gInventory.getLibraryRootFolderID()) - { - mFolders.push_back(folder); - } - else - { - mFolders.insert(mFolders.begin(), folder); - } - folder->setShowLoadStatus(mShowLoadStatus); - folder->setOrigin(0, 0); - folder->reshape(getRect().getWidth(), 0); - folder->setVisible(FALSE); - addChild( folder ); - folder->dirtyFilter(); - folder->requestArrange(); - return TRUE; + LLFolderViewFolder::addFolder(folder); } void LLFolderView::closeAllFolders() @@ -405,145 +294,39 @@ void LLFolderView::openTopLevelFolders() } } -void LLFolderView::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse) -{ - // call base class to do proper recursion - LLFolderViewFolder::setOpenArrangeRecursively(openitem, recurse); - // make sure root folder is always open - mIsOpen = TRUE; -} - -static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange"); - // This view grows and shrinks to enclose all of its children items and folders. -S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_generation ) -{ - if (getListener()->getUUID().notNull()) +// *width should be 0 +// conform show folder state works +S32 LLFolderView::arrange( S32* unused_width, S32* unused_height ) { - if (mNeedsSort) - { - mFolders.sort(mSortFunction); - mItems.sort(mSortFunction); - mNeedsSort = false; - } - } - - LLFastTimer t2(FTM_ARRANGE); - - filter_generation = mFilter->getMinRequiredGeneration(); mMinWidth = 0; + S32 target_height; - mHasVisibleChildren = hasFilteredDescendants(filter_generation); - // arrange always finishes, so optimistically set the arrange generation to the most current - mLastArrangeGeneration = getRoot()->getArrangeGeneration(); + LLFolderViewFolder::arrange(&mMinWidth, &target_height); - LLInventoryFilter::EFolderShow show_folder_state = - getRoot()->getFilter()->getShowFolderState(); + LLRect scroll_rect = (mScrollContainer ? mScrollContainer->getContentWindowRect() : LLRect()); + reshape( llmax(scroll_rect.getWidth(), mMinWidth), llround(mCurHeight) ); - S32 total_width = LEFT_PAD; - S32 running_height = mDebugFilters ? LLFontGL::getFontMonospace()->getLineHeight() : 0; - S32 target_height = running_height; - S32 parent_item_height = getRect().getHeight(); - - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) - { - folders_t::iterator fit = iter++; - LLFolderViewFolder* folderp = (*fit); - if (getDebugFilters()) - { - folderp->setVisible(TRUE); - } - else - { - folderp->setVisible((show_folder_state == LLInventoryFilter::SHOW_ALL_FOLDERS || // always show folders? - (folderp->getFiltered(filter_generation) || folderp->hasFilteredDescendants(filter_generation)))); - } - - if (folderp->getVisible()) - { - S32 child_height = 0; - S32 child_width = 0; - S32 child_top = parent_item_height - running_height; - - target_height += folderp->arrange( &child_width, &child_height, filter_generation ); - - mMinWidth = llmax(mMinWidth, child_width); - total_width = llmax( total_width, child_width ); - running_height += child_height; - folderp->setOrigin( ICON_PAD, child_top - (*fit)->getRect().getHeight() ); - } - } - - for (items_t::iterator iter = mItems.begin(); - iter != mItems.end();) - { - items_t::iterator iit = iter++; - LLFolderViewItem* itemp = (*iit); - itemp->setVisible(itemp->getFiltered(filter_generation)); - - if (itemp->getVisible()) - { - S32 child_width = 0; - S32 child_height = 0; - S32 child_top = parent_item_height - running_height; - - target_height += itemp->arrange( &child_width, &child_height, filter_generation ); - itemp->reshape(itemp->getRect().getWidth(), child_height); - - mMinWidth = llmax(mMinWidth, child_width); - total_width = llmax( total_width, child_width ); - running_height += child_height; - itemp->setOrigin( ICON_PAD, child_top - itemp->getRect().getHeight() ); - } - } - - if(!mHasVisibleChildren)// is there any filtered items ? - { - //Nope. We need to display status textbox, let's reserve some place for it - running_height = mStatusTextBox->getTextPixelHeight(); - target_height = running_height; - } - - mRunningHeight = running_height; - LLRect scroll_rect = mScrollContainer->getContentWindowRect(); - reshape( llmax(scroll_rect.getWidth(), total_width), running_height ); - - LLRect new_scroll_rect = mScrollContainer->getContentWindowRect(); + LLRect new_scroll_rect = (mScrollContainer ? mScrollContainer->getContentWindowRect() : LLRect()); if (new_scroll_rect.getWidth() != scroll_rect.getWidth()) { - reshape( llmax(scroll_rect.getWidth(), total_width), running_height ); + reshape( llmax(scroll_rect.getWidth(), mMinWidth), llround(mCurHeight) ); } // move item renamer text field to item's new position updateRenamerPosition(); - mTargetHeight = (F32)target_height; return llround(mTargetHeight); } -const std::string LLFolderView::getFilterSubString(BOOL trim) -{ - return mFilter->getFilterSubString(trim); -} +static LLFastTimer::DeclareTimer FTM_FILTER("Filter Folder View"); -static LLFastTimer::DeclareTimer FTM_FILTER("Filter Inventory"); - -void LLFolderView::filter( LLInventoryFilter& filter ) +void LLFolderView::filter( LLFolderViewFilter& filter ) { LLFastTimer t2(FTM_FILTER); - filter.setFilterCount(llclamp(gSavedSettings.getS32("FilterItemsPerFrame"), 1, 5000)); + filter.setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000)); - if (getCompletedFilterGeneration() < filter.getCurrentGeneration()) - { - mPassedFilter = FALSE; - mMinWidth = 0; - LLFolderViewFolder::filter(filter); - } - else - { - mPassedFilter = TRUE; - } + getViewModelItem()->filter(filter); } void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent) @@ -555,7 +338,7 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent) scroll_rect = mScrollContainer->getContentWindowRect(); } width = llmax(mMinWidth, scroll_rect.getWidth()); - height = llmax(mRunningHeight, scroll_rect.getHeight()); + height = llmax(llround(mCurHeight), scroll_rect.getHeight()); // Restrict width within scroll container's width if (mUseEllipses && mScrollContainer) @@ -616,6 +399,10 @@ LLFolderViewItem* LLFolderView::getCurSelectedItem( void ) return NULL; } +LLFolderView::selected_items_t& LLFolderView::getSelectedItems( void ) +{ + return mSelectedItems; +} // Record the selected item and pass it down the hierachy. BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL openitem, @@ -653,30 +440,6 @@ BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL openitem, return rv; } -void LLFolderView::setSelectionByID(const LLUUID& obj_id, BOOL take_keyboard_focus) -{ - LLFolderViewItem* itemp = getItemByID(obj_id); - if(itemp && itemp->getListener()) - { - itemp->arrangeAndSet(TRUE, take_keyboard_focus); - mSelectThisID.setNull(); - return; - } - else - { - // save the desired item to be selected later (if/when ready) - mSelectThisID = obj_id; - } -} - -void LLFolderView::updateSelection() -{ - if (mSelectThisID.notNull()) - { - setSelectionByID(mSelectThisID, false); - } -} - BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected) { BOOL rv = FALSE; @@ -727,9 +490,6 @@ void LLFolderView::sanitizeSelection() // and we want to preserve context LLFolderViewItem* original_selected_item = getCurSelectedItem(); - // Cache "Show all folders" filter setting - BOOL show_all_folders = (getRoot()->getFilter()->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS); - std::vector<LLFolderViewItem*> items_to_remove; selected_items_t::iterator item_iter; for (item_iter = mSelectedItems.begin(); item_iter != mSelectedItems.end(); ++item_iter) @@ -737,24 +497,19 @@ void LLFolderView::sanitizeSelection() LLFolderViewItem* item = *item_iter; // ensure that each ancestor is open and potentially passes filtering - BOOL visible = item->potentiallyVisible(); // initialize from filter state for this item + BOOL visible = false; + if(item->getViewModelItem() != NULL) + { + visible = item->getViewModelItem()->potentiallyVisible(); // initialize from filter state for this item + } // modify with parent open and filters states LLFolderViewFolder* parent_folder = item->getParentFolder(); - if ( parent_folder ) - { - if ( show_all_folders ) - { // "Show all folders" is on, so this folder is visible - visible = TRUE; - } - else - { // Move up through parent folders and see what's visible + // Move up through parent folders and see what's visible while(parent_folder) { - visible = visible && parent_folder->isOpen() && parent_folder->potentiallyVisible(); + visible = visible && parent_folder->isOpen() && parent_folder->getViewModelItem()->potentiallyVisible(); parent_folder = parent_folder->getParentFolder(); } - } - } // deselect item if any ancestor is closed or didn't pass filter requirements. if (!visible) @@ -804,7 +559,7 @@ void LLFolderView::sanitizeSelection() parent_folder; parent_folder = parent_folder->getParentFolder()) { - if (parent_folder->potentiallyVisible()) + if (parent_folder->getViewModelItem() && parent_folder->getViewModelItem()->potentiallyVisible()) { // give initial selection to first ancestor folder that potentially passes the filter if (!new_selection) @@ -843,42 +598,30 @@ void LLFolderView::clearSelection() } mSelectedItems.clear(); - mSelectThisID.setNull(); } -std::set<LLUUID> LLFolderView::getSelectionList() const +std::set<LLFolderViewItem*> 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()); - } + std::set<LLFolderViewItem*> selection; + std::copy(mSelectedItems.begin(), mSelectedItems.end(), std::inserter(selection, selection.begin())); return selection; } -BOOL LLFolderView::startDrag(LLToolDragAndDrop::ESource source) +bool LLFolderView::startDrag() { - std::vector<EDragAndDropType> types; - uuid_vec_t cargo_ids; + std::vector<LLFolderViewModelItem*> selected_items; selected_items_t::iterator item_it; - BOOL can_drag = TRUE; + if (!mSelectedItems.empty()) { for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) { - EDragAndDropType type = DAD_NONE; - LLUUID id = LLUUID::null; - can_drag = can_drag && (*item_it)->getListener()->startDrag(&type, &id); - - types.push_back(type); - cargo_ids.push_back(id); + selected_items.push_back((*item_it)->getViewModelItem()); } - LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, source, mSourceID); + return getFolderViewModel()->startDrag(selected_items); } - return can_drag; + return false; } void LLFolderView::commitRename( const LLSD& data ) @@ -888,16 +631,6 @@ void LLFolderView::commitRename( const LLSD& data ) void LLFolderView::draw() { - static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", LLColor4::white); - if (mDebugFilters) - { - std::string current_filter_string = llformat("Current Filter: %d, Least Filter: %d, Auto-accept Filter: %d", - mFilter->getCurrentGeneration(), mFilter->getMinRequiredGeneration(), mFilter->getMustPassGeneration()); - LLFontGL::getFontMonospace()->renderUTF8(current_filter_string, 0, 2, - getRect().getHeight() - LLFontGL::getFontMonospace()->getLineHeight(), LLColor4(0.5f, 0.5f, 0.8f, 1.f), - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); - } - //LLFontGL* font = getLabelFontForStyle(mLabelStyle); // if cursor has moved off of me during drag and drop @@ -907,52 +640,18 @@ void LLFolderView::draw() closeAutoOpenedFolders(); } - // while dragging, update selection rendering to reflect single/multi drag status - if (LLToolDragAndDrop::getInstance()->hasMouseCapture()) - { - EAcceptance last_accept = LLToolDragAndDrop::getInstance()->getLastAccept(); - if (last_accept == ACCEPT_YES_SINGLE || last_accept == ACCEPT_YES_COPY_SINGLE) - { - setShowSingleSelection(TRUE); - } - else - { - setShowSingleSelection(FALSE); - } - } - else - { - setShowSingleSelection(FALSE); - } - - - if (mSearchTimer.getElapsedTimeF32() > gSavedSettings.getF32("TypeAheadTimeout") || !mSearchString.size()) + if (mSearchTimer.getElapsedTimeF32() > LLUI::sSettingGroups["config"]->getF32("TypeAheadTimeout") || !mSearchString.size()) { mSearchString.clear(); } - if (hasVisibleChildren() - || mFilter->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS) + if (hasVisibleChildren()) { - mStatusText.clear(); mStatusTextBox->setVisible( FALSE ); } else if (mShowEmptyMessage) { - if (LLInventoryModelBackgroundFetch::instance().folderFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration()) - { - mStatusText = LLTrans::getString("Searching"); - } - else - { - if (getFilter()) - { - LLStringUtil::format_map_t args; - args["[SEARCH_TERM]"] = LLURI::escape(getFilter()->getFilterSubStringOrig()); - mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage(), args); - } - } - mStatusTextBox->setValue(mStatusText); + mStatusTextBox->setValue(getFolderViewModel()->getStatusText()); mStatusTextBox->setVisible( TRUE ); // firstly reshape message textbox with current size. This is necessary to @@ -969,7 +668,11 @@ void LLFolderView::draw() // This will indirectly call ::arrange and reshape of the status textbox. // We should call this method to also notify parent about required rect. // See EXT-7564, EXT-7047. - arrangeFromRoot(); + S32 height = 0; + S32 width = 0; + S32 total_height = arrange( &width, &height ); + notifyParent(LLSD().with("action", "size_changes").with("height", total_height)); + LLUI::popMatrix(); LLUI::pushMatrix(); LLUI::translate((F32)getRect().mLeft, (F32)getRect().mBottom); @@ -996,7 +699,7 @@ void LLFolderView::finishRenamingItem( void ) closeRenamer(); - // List is re-sorted alphabeticly, so scroll to make sure the selected item is visible. + // List is re-sorted alphabetically, so scroll to make sure the selected item is visible. scrollToShowSelection(); } @@ -1005,68 +708,12 @@ void LLFolderView::closeRenamer( void ) if (mRenamer && mRenamer->getVisible()) { // Triggers onRenamerLost() that actually closes the renamer. - gViewerWindow->removePopup(mRenamer); - } -} - -void LLFolderView::removeSelectedItems( void ) -{ - if (mSelectedItems.empty()) return; - LLSD args; - args["QUESTION"] = LLTrans::getString(mSelectedItems.size() > 1 ? "DeleteItems" : "DeleteItem"); - LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLFolderView::onItemsRemovalConfirmation, this, _1, _2)); -} - -bool isDescendantOfASelectedItem(LLFolderViewItem* item, const std::vector<LLFolderViewItem*>& selectedItems) -{ - LLFolderViewItem* item_parent = dynamic_cast<LLFolderViewItem*>(item->getParent()); - - if (item_parent) - { - for(std::vector<LLFolderViewItem*>::const_iterator it = selectedItems.begin(); it != selectedItems.end(); ++it) - { - const LLFolderViewItem* const selected_item = (*it); - - LLFolderViewItem* parent = item_parent; - - while (parent) - { - if (selected_item == parent) - { - return true; - } - - parent = dynamic_cast<LLFolderViewItem*>(parent->getParent()); - } - } - } - - return false; -} - -// static -void LLFolderView::removeCutItems() -{ - // There's no item in "cut" mode on the clipboard -> exit - if (!LLClipboard::instance().isCutMode()) - return; - - // Get the list of clipboard item uuids and iterate through them - LLDynamicArray<LLUUID> objects; - LLClipboard::instance().pasteFromClipboard(objects); - for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin(); - iter != objects.end(); - ++iter) - { - gInventory.removeObject(*iter); + LLUI::removePopup(mRenamer); } } -void LLFolderView::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response) +void LLFolderView::removeSelectedItems() { - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option != 0) return; // canceled - if(getVisible() && getEnabled()) { // just in case we're removing the renaming item. @@ -1097,68 +744,38 @@ void LLFolderView::onItemsRemovalConfirmation(const LLSD& notification, const LL // iterate through the new container. count = items.size(); LLUUID new_selection_id; + LLFolderViewItem* item_to_select = getNextUnselectedItem(); + if(count == 1) { LLFolderViewItem* item_to_delete = items[0]; LLFolderViewFolder* parent = item_to_delete->getParentFolder(); - LLFolderViewItem* new_selection = item_to_delete->getNextOpenNode(FALSE); - if (!new_selection) - { - new_selection = item_to_delete->getPreviousOpenNode(FALSE); - } if(parent) { - if (parent->removeItem(item_to_delete)) + if (item_to_delete->remove()) { // change selection on successful delete - if (new_selection) - { - setSelectionFromRoot(new_selection, new_selection->isOpen(), mParentPanel->hasFocus()); - } - else - { - setSelectionFromRoot(NULL, mParentPanel->hasFocus()); - } + setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel->hasFocus()); } } arrangeAll(); } else if (count > 1) { - LLDynamicArray<LLFolderViewEventListener*> listeners; - LLFolderViewEventListener* listener; - LLFolderViewItem* last_item = items[count - 1]; - LLFolderViewItem* new_selection = last_item->getNextOpenNode(FALSE); - while(new_selection && new_selection->isSelected()) - { - new_selection = new_selection->getNextOpenNode(FALSE); - } - if (!new_selection) - { - new_selection = last_item->getPreviousOpenNode(FALSE); - while (new_selection && (new_selection->isSelected() || isDescendantOfASelectedItem(new_selection, items))) - { - new_selection = new_selection->getPreviousOpenNode(FALSE); - } - } - if (new_selection) - { - setSelectionFromRoot(new_selection, new_selection->isOpen(), mParentPanel->hasFocus()); - } - else - { - setSelectionFromRoot(NULL, mParentPanel->hasFocus()); - } + LLDynamicArray<LLFolderViewModelItem*> listeners; + LLFolderViewModelItem* listener; + + setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel->hasFocus()); for(S32 i = 0; i < count; ++i) { - listener = items[i]->getListener(); - if(listener && (listeners.find(listener) == LLDynamicArray<LLFolderViewEventListener*>::FAIL)) + listener = items[i]->getViewModelItem(); + if(listener && (listeners.find(listener) == LLDynamicArray<LLFolderViewModelItem*>::FAIL)) { listeners.put(listener); } } - listener = listeners.get(0); + listener = static_cast<LLFolderViewModelItem*>(listeners.get(0)); if(listener) { listener->removeBatch(listeners); @@ -1169,82 +786,6 @@ void LLFolderView::onItemsRemovalConfirmation(const LLSD& notification, const LL } } -// open the selected item. -void LLFolderView::openSelectedItems( void ) -{ - if(getVisible() && getEnabled()) - { - if (mSelectedItems.size() == 1) - { - mSelectedItems.front()->openItem(); - } - else - { - LLMultiPreview* multi_previewp = new LLMultiPreview(); - LLMultiProperties* multi_propertiesp = new LLMultiProperties(); - - selected_items_t::iterator item_it; - for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) - { - // IT_{OBJECT,ATTACHMENT} creates LLProperties - // floaters; others create LLPreviews. Put - // each one in the right type of container. - LLFolderViewEventListener* listener = (*item_it)->getListener(); - bool is_prop = listener && (listener->getInventoryType() == LLInventoryType::IT_OBJECT || listener->getInventoryType() == LLInventoryType::IT_ATTACHMENT); - if (is_prop) - LLFloater::setFloaterHost(multi_propertiesp); - else - LLFloater::setFloaterHost(multi_previewp); - (*item_it)->openItem(); - } - - LLFloater::setFloaterHost(NULL); - // *NOTE: LLMulti* will safely auto-delete when open'd - // without any children. - multi_previewp->openFloater(LLSD()); - multi_propertiesp->openFloater(LLSD()); - } - } -} - -void LLFolderView::propertiesSelectedItems( void ) -{ - if(getVisible() && getEnabled()) - { - if (mSelectedItems.size() == 1) - { - LLFolderViewItem* folder_item = mSelectedItems.front(); - if(!folder_item) return; - folder_item->getListener()->showProperties(); - } - else - { - LLMultiProperties* multi_propertiesp = new LLMultiProperties(); - - LLFloater::setFloaterHost(multi_propertiesp); - - selected_items_t::iterator item_it; - for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) - { - (*item_it)->getListener()->showProperties(); - } - - LLFloater::setFloaterHost(NULL); - multi_propertiesp->openFloater(LLSD()); - } - } -} - -void LLFolderView::changeType(LLInventoryModel *model, LLFolderType::EType new_folder_type) -{ - LLFolderBridge *folder_bridge = LLFolderBridge::sSelf.get(); - - if (!folder_bridge) return; - LLViewerInventoryCategory *cat = folder_bridge->getCategory(); - if (!cat) return; - cat->changeType(new_folder_type); -} - void LLFolderView::autoOpenItem( LLFolderViewFolder* item ) { if ((mAutoOpenItems.check() == item) || @@ -1268,7 +809,7 @@ void LLFolderView::autoOpenItem( LLFolderViewFolder* item ) mAutoOpenItems.push(item); item->setOpen(TRUE); - LLRect content_rect = mScrollContainer->getContentWindowRect(); + LLRect content_rect = (mScrollContainer ? mScrollContainer->getContentWindowRect() : LLRect()); LLRect constraint_rect(0,content_rect.getHeight(), content_rect.getWidth(), 0); scrollToShowItem(item, constraint_rect); } @@ -1329,7 +870,7 @@ BOOL LLFolderView::canCopy() const for (selected_items_t::const_iterator selected_it = mSelectedItems.begin(); selected_it != mSelectedItems.end(); ++selected_it) { const LLFolderViewItem* item = *selected_it; - if (!item->getListener()->isItemCopyable()) + if (!item->getViewModelItem()->isItemCopyable()) { return FALSE; } @@ -1345,11 +886,11 @@ void LLFolderView::copy() S32 count = mSelectedItems.size(); if(getVisible() && getEnabled() && (count > 0)) { - LLFolderViewEventListener* listener = NULL; + LLFolderViewModelItem* listener = NULL; selected_items_t::iterator item_it; for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) { - listener = (*item_it)->getListener(); + listener = (*item_it)->getViewModelItem(); if(listener) { listener->copyToClipboard(); @@ -1369,7 +910,7 @@ BOOL LLFolderView::canCut() const for (selected_items_t::const_iterator selected_it = mSelectedItems.begin(); selected_it != mSelectedItems.end(); ++selected_it) { const LLFolderViewItem* item = *selected_it; - const LLFolderViewEventListener* listener = item->getListener(); + const LLFolderViewModelItem* listener = item->getViewModelItem(); if (!listener || !listener->isItemRemovable()) { @@ -1383,20 +924,28 @@ void LLFolderView::cut() { // clear the inventory clipboard LLClipboard::instance().reset(); - S32 count = mSelectedItems.size(); - if(getVisible() && getEnabled() && (count > 0)) + if(getVisible() && getEnabled() && (mSelectedItems.size() > 0)) { - LLFolderViewEventListener* listener = NULL; - selected_items_t::iterator item_it; - for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) + // Find out which item will be selected once the selection will be cut + LLFolderViewItem* item_to_select = getNextUnselectedItem(); + + // Get the selection: removeItem() modified mSelectedItems and makes iterating on it unwise + std::set<LLFolderViewItem*> inventory_selected = getSelectionList(); + + // Move each item to the clipboard and out of their folder + for (std::set<LLFolderViewItem*>::iterator item_it = inventory_selected.begin(); item_it != inventory_selected.end(); ++item_it) { - listener = (*item_it)->getListener(); - if(listener) + LLFolderViewItem* item_to_cut = *item_it; + LLFolderViewModelItem* listener = item_to_cut->getViewModelItem(); + if (listener) { listener->cutToClipboard(); + listener->removeItem(); } } - LLFolderView::removeCutItems(); + + // Update the selection + setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel->hasFocus()); } mSearchString.clear(); } @@ -1415,11 +964,11 @@ BOOL LLFolderView::canPaste() const { // *TODO: only check folders and parent folders of items const LLFolderViewItem* item = (*item_it); - const LLFolderViewEventListener* listener = item->getListener(); + const LLFolderViewModelItem* listener = item->getViewModelItem(); if(!listener || !listener->isClipboardPasteable()) { const LLFolderViewFolder* folderp = item->getParentFolder(); - listener = folderp->getListener(); + listener = folderp->getViewModelItem(); if (!listener || !listener->isClipboardPasteable()) { return FALSE; @@ -1437,24 +986,24 @@ void LLFolderView::paste() if(getVisible() && getEnabled()) { // find set of unique folders to paste into - std::set<LLFolderViewItem*> folder_set; + std::set<LLFolderViewFolder*> folder_set; selected_items_t::iterator selected_it; for (selected_it = mSelectedItems.begin(); selected_it != mSelectedItems.end(); ++selected_it) { LLFolderViewItem* item = *selected_it; - LLFolderViewEventListener* listener = item->getListener(); - if (listener->getInventoryType() != LLInventoryType::IT_CATEGORY) + LLFolderViewFolder* folder = dynamic_cast<LLFolderViewFolder*>(item); + if (folder == NULL) { - item = item->getParentFolder(); + folder = item->getParentFolder(); } - folder_set.insert(item); + folder_set.insert(folder); } - std::set<LLFolderViewItem*>::iterator set_iter; + std::set<LLFolderViewFolder*>::iterator set_iter; for(set_iter = folder_set.begin(); set_iter != folder_set.end(); ++set_iter) { - LLFolderViewEventListener* listener = (*set_iter)->getListener(); + LLFolderViewModelItem* listener = (*set_iter)->getViewModelItem(); if(listener && listener->isClipboardPasteable()) { listener->pasteFromClipboard(); @@ -1476,8 +1025,8 @@ void LLFolderView::startRenamingSelectedItem( void ) { item = mSelectedItems.front(); } - if(getVisible() && getEnabled() && (count == 1) && item && item->getListener() && - item->getListener()->isItemRenameable()) + if(getVisible() && getEnabled() && (count == 1) && item && item->getViewModelItem() && + item->getViewModelItem()->isItemRenameable()) { mRenameItem = item; @@ -1490,7 +1039,7 @@ void LLFolderView::startRenamingSelectedItem( void ) // set focus will fail unless item is visible mRenamer->setFocus( TRUE ); mRenamer->setTopLostCallback(boost::bind(&LLFolderView::onRenamerLost, this)); - gViewerWindow->addPopup(mRenamer); + LLUI::addPopup(mRenamer); } } @@ -1529,11 +1078,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) mSearchString.clear(); handled = TRUE; } - else - { - LLFolderView::openSelectedItems(); - handled = TRUE; - } } break; @@ -1548,25 +1092,37 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) case KEY_PAGE_UP: mSearchString.clear(); + if (mScrollContainer) + { mScrollContainer->pageUp(30); + } handled = TRUE; break; case KEY_PAGE_DOWN: mSearchString.clear(); + if (mScrollContainer) + { mScrollContainer->pageDown(30); + } handled = TRUE; break; case KEY_HOME: mSearchString.clear(); + if (mScrollContainer) + { mScrollContainer->goToTop(); + } handled = TRUE; break; case KEY_END: mSearchString.clear(); + if (mScrollContainer) + { mScrollContainer->goToBottom(); + } break; case KEY_DOWN: @@ -1590,12 +1146,12 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if (next->isSelected()) { // shrink selection - changeSelectionFromRoot(last_selected, FALSE); + changeSelection(last_selected, FALSE); } else if (last_selected->getParentFolder() == next->getParentFolder()) { // grow selection - changeSelectionFromRoot(next, TRUE); + changeSelection(next, TRUE); } } } @@ -1654,12 +1210,12 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if (prev->isSelected()) { // shrink selection - changeSelectionFromRoot(last_selected, FALSE); + changeSelection(last_selected, FALSE); } else if (last_selected->getParentFolder() == prev->getParentFolder()) { // grow selection - changeSelectionFromRoot(prev, TRUE); + changeSelection(prev, TRUE); } } } @@ -1719,20 +1275,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) break; } - if (!handled && mParentPanel->hasFocus()) - { - if (key == KEY_BACKSPACE) - { - mSearchTimer.reset(); - if (mSearchString.size()) - { - mSearchString.erase(mSearchString.size() - 1, 1); - } - search(getCurSelectedItem(), mSearchString, FALSE); - handled = TRUE; - } - } - return handled; } @@ -1762,7 +1304,7 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char) } //do text search - if (mSearchTimer.getElapsedTimeF32() > gSavedSettings.getF32("TypeAheadTimeout")) + if (mSearchTimer.getElapsedTimeF32() > LLUI::sSettingGroups["config"]->getF32("TypeAheadTimeout")) { mSearchString.clear(); } @@ -1780,29 +1322,6 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char) } -BOOL LLFolderView::canDoDelete() const -{ - if (mSelectedItems.size() == 0) return FALSE; - - for (selected_items_t::const_iterator item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) - { - if (!(*item_it)->getListener()->isItemRemovable()) - { - return FALSE; - } - } - return TRUE; -} - -void LLFolderView::doDelete() -{ - if(mSelectedItems.size() > 0) - { - removeSelectedItems(); - } -} - - BOOL LLFolderView::handleMouseDown( S32 x, S32 y, MASK mask ) { mKeyboardSelection = FALSE; @@ -1853,7 +1372,7 @@ BOOL LLFolderView::search(LLFolderViewItem* first_item, const std::string &searc } } - const std::string current_item_label(search_item->getSearchableLabel()); + const std::string current_item_label(search_item->getViewModelItem()->getSearchableName()); S32 search_string_length = llmin(upper_case_string.size(), current_item_label.size()); if (!current_item_label.compare(0, search_string_length, upper_case_string)) { @@ -1897,19 +1416,23 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask ) S32 count = mSelectedItems.size(); LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get(); if ( handled - && ( count > 0 && (hasVisibleChildren() || mFilter->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS) ) // show menu only if selected items are visible + && ( count > 0 && (hasVisibleChildren()) ) // show menu only if selected items are visible && menu ) { if (mCallbackRegistrar) + { mCallbackRegistrar->pushScope(); + } updateMenuOptions(menu); menu->updateParent(LLMenuGL::sMenuContainer); LLMenuGL::showPopup(this, menu, x, y); if (mCallbackRegistrar) + { mCallbackRegistrar->popScope(); } + } else { if (menu && menu->getVisible()) @@ -1972,24 +1495,8 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // by the folder which is the hierarchy root. if (!handled) { - if (getListener()->getUUID().notNull()) - { handled = LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); } - else - { - if (!mFolders.empty()) - { - // dispatch to last folder as a hack to support "Contents" folder in object inventory - handled = mFolders.back()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg); - } - } - } - - if (handled) - { - lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderView" << llendl; - } return handled; } @@ -2033,18 +1540,16 @@ void LLFolderView::scrollToShowItem(LLFolderViewItem* item, const LLRect& constr if(item) { LLRect local_rect = item->getLocalRect(); - LLRect item_scrolled_rect; // item position relative to display area of scroller - LLRect visible_doc_rect = mScrollContainer->getVisibleContentRect(); - S32 icon_height = mIcon.isNull() ? 0 : mIcon->getHeight(); S32 label_height = getLabelFontForStyle(mLabelStyle)->getLineHeight(); // when navigating with keyboard, only move top of opened folder on screen, otherwise show whole folder - S32 max_height_to_show = item->isOpen() && mScrollContainer->hasFocus() ? (llmax( icon_height, label_height ) + ICON_PAD) : local_rect.getHeight(); + S32 max_height_to_show = item->isOpen() && mScrollContainer->hasFocus() ? (llmax( icon_height, label_height ) + item->getIconPad()) : local_rect.getHeight(); // get portion of item that we want to see... LLRect item_local_rect = LLRect(item->getIndentation(), local_rect.getHeight(), - llmin(MIN_ITEM_WIDTH_VISIBLE, local_rect.getWidth()), + //+40 is supposed to include few first characters + llmin(item->getLabelXPos() - item->getIndentation() + 40, local_rect.getWidth()), llmax(0, local_rect.getHeight() - max_height_to_show)); LLRect item_doc_rect; @@ -2058,8 +1563,8 @@ void LLFolderView::scrollToShowItem(LLFolderViewItem* item, const LLRect& constr LLRect LLFolderView::getVisibleRect() { - S32 visible_height = mScrollContainer->getRect().getHeight(); - S32 visible_width = mScrollContainer->getRect().getWidth(); + S32 visible_height = (mScrollContainer ? mScrollContainer->getRect().getHeight() : 0); + S32 visible_width = (mScrollContainer ? mScrollContainer->getRect().getWidth() : 0); LLRect visible_rect; visible_rect.setLeftTopAndSize(-getRect().mLeft, visible_height - getRect().mBottom, visible_width, visible_height); return visible_rect; @@ -2088,159 +1593,28 @@ void LLFolderView::setShowSingleSelection(BOOL show) } } -void LLFolderView::addItemID(const LLUUID& id, LLFolderViewItem* itemp) -{ - mItemMap[id] = itemp; -} - -void LLFolderView::removeItemID(const LLUUID& id) -{ - mItemMap.erase(id); -} - -LLFastTimer::DeclareTimer FTM_GET_ITEM_BY_ID("Get FolderViewItem by ID"); -LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id) -{ - LLFastTimer _(FTM_GET_ITEM_BY_ID); - if (id == getListener()->getUUID()) - { - return this; - } - - std::map<LLUUID, LLFolderViewItem*>::iterator map_it; - map_it = mItemMap.find(id); - if (map_it != mItemMap.end()) - { - return map_it->second; - } - - return NULL; -} - -LLFolderViewFolder* LLFolderView::getFolderByID(const LLUUID& id) -{ - if (id == getListener()->getUUID()) - { - return this; - } - - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end(); - ++iter) - { - LLFolderViewFolder *folder = (*iter); - if (folder->getListener()->getUUID() == id) - { - return folder; - } - } - return NULL; -} - -bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata) -{ - std::string action = userdata.asString(); - - if ("rename" == action) - { - startRenamingSelectedItem(); - return true; - } - if ("delete" == action) - { - removeSelectedItems(); - return true; - } - if (("copy" == action) || ("cut" == action)) - { - // Clear the clipboard before we start adding things on it - LLClipboard::instance().reset(); - } - - static const std::string change_folder_string = "change_folder_type_"; - if (action.length() > change_folder_string.length() && - (action.compare(0,change_folder_string.length(),"change_folder_type_") == 0)) - { - LLFolderType::EType new_folder_type = LLViewerFolderType::lookupTypeFromXUIName(action.substr(change_folder_string.length())); - changeType(model, new_folder_type); - return true; - } - - - std::set<LLUUID> selected_items = getSelectionList(); - - LLMultiPreview* multi_previewp = NULL; - LLMultiProperties* multi_propertiesp = NULL; - - if (("task_open" == action || "open" == action) && selected_items.size() > 1) - { - multi_previewp = new LLMultiPreview(); - gFloaterView->addChild(multi_previewp); - - LLFloater::setFloaterHost(multi_previewp); - - } - else if (("task_properties" == action || "properties" == action) && selected_items.size() > 1) - { - multi_propertiesp = new LLMultiProperties(); - gFloaterView->addChild(multi_propertiesp); - - LLFloater::setFloaterHost(multi_propertiesp); - } - - std::set<LLUUID>::iterator set_iter; - - for (set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter) - { - LLFolderViewItem* folder_item = getItemByID(*set_iter); - if(!folder_item) continue; - LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getListener(); - if(!bridge) continue; - bridge->performAction(model, action); - } - - LLFloater::setFloaterHost(NULL); - if (multi_previewp) - { - multi_previewp->openFloater(LLSD()); - } - else if (multi_propertiesp) - { - multi_propertiesp->openFloater(LLSD()); - } - - return true; -} - static LLFastTimer::DeclareTimer FTM_AUTO_SELECT("Open and Select"); static LLFastTimer::DeclareTimer FTM_INVENTORY("Inventory"); // Main idle routine -void LLFolderView::doIdle() +void LLFolderView::update() { // If this is associated with the user's inventory, don't do anything // until that inventory is loaded up. - const LLInventoryPanel *inventory_panel = dynamic_cast<LLInventoryPanel*>(mParentPanel); - if (inventory_panel && !inventory_panel->getIsViewsInitialized()) - { - return; - } - LLFastTimer t2(FTM_INVENTORY); - BOOL debug_filters = gSavedSettings.getBOOL("DebugInventoryFilters"); - if (debug_filters != getDebugFilters()) + if (getFolderViewModel()->getFilter().isModified() && getFolderViewModel()->getFilter().isNotDefault()) { - mDebugFilters = debug_filters; - arrangeAll(); + mNeedsAutoSelect = TRUE; } - BOOL filter_modified_and_active = mFilter->isModified() && mFilter->isNotDefault(); - mNeedsAutoSelect = filter_modified_and_active && - !(gFocusMgr.childHasKeyboardFocus(this) || gFocusMgr.getMouseCapture()); - mFilter->clearModified(); - // filter to determine visibility before arranging - filterFromRoot(); + filter(getFolderViewModel()->getFilter()); + // Clear the modified setting on the filter only if the filter count is non-zero after running the filter process + // Note: if the filter count is zero, then the filter most likely halted before completing the entire set of items + if (getFolderViewModel()->getFilter().isModified() && (getFolderViewModel()->getFilter().getFilterCount() > 0)) + { + getFolderViewModel()->getFilter().clearModified(); + } // automatically show matching items, and select first one if we had a selection if (mNeedsAutoSelect) @@ -2248,7 +1622,7 @@ void LLFolderView::doIdle() LLFastTimer t3(FTM_AUTO_SELECT); // select new item only if a filtered item not currently selected LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back(); - if (!mAutoSelectOverride && (!selected_itemp || !selected_itemp->potentiallyVisible())) + if (!mAutoSelectOverride && (!selected_itemp || !selected_itemp->getViewModelItem()->potentiallyVisible())) { // these are named variables to get around gcc not binding non-const references to rvalues // and functor application is inherently non-const to allow for stateful functors @@ -2258,7 +1632,7 @@ void LLFolderView::doIdle() // Open filtered folders for folder views with mAutoSelectOverride=TRUE. // Used by LLPlacesFolderView. - if (!mFilter->getFilterSubString().empty()) + if (getFolderViewModel()->getFilter().showAllResults()) { // these are named variables to get around gcc not binding non-const references to rvalues // and functor application is inherently non-const to allow for stateful functors @@ -2269,16 +1643,30 @@ void LLFolderView::doIdle() scrollToShowSelection(); } - BOOL filter_finished = mCompletedFilterGeneration >= mFilter->getCurrentGeneration() - && !LLInventoryModelBackgroundFetch::instance().folderFetchActive(); + BOOL filter_finished = getViewModelItem()->passedFilter() + && mViewModel->contentsReady(); if (filter_finished - || gFocusMgr.childHasKeyboardFocus(inventory_panel) - || gFocusMgr.childHasMouseCapture(inventory_panel)) + || gFocusMgr.childHasKeyboardFocus(mParentPanel) + || gFocusMgr.childHasMouseCapture(mParentPanel)) { // finishing the filter process, giving focus to the folder view, or dragging the scrollbar all stop the auto select process mNeedsAutoSelect = FALSE; } + BOOL is_visible = isInVisibleChain(); + + //Puts folders/items in proper positions + if ( is_visible ) + { + sanitizeSelection(); + if( needsArrange() ) + { + S32 height = 0; + S32 width = 0; + S32 total_height = arrange( &width, &height ); + notifyParent(LLSD().with("action", "size_changes").with("height", total_height)); + } + } // during filtering process, try to pin selected item's location on screen // this will happen when searching your inventory and when new items arrive @@ -2290,22 +1678,30 @@ void LLFolderView::doIdle() // lets pin it! mPinningSelectedItem = TRUE; - LLRect visible_content_rect = mScrollContainer->getVisibleContentRect(); + //Computes visible area + const LLRect visible_content_rect = (mScrollContainer ? mScrollContainer->getVisibleContentRect() : LLRect()); LLFolderViewItem* selected_item = mSelectedItems.back(); + //Computes location of selected content, content outside visible area will be scrolled to using below code LLRect item_rect; selected_item->localRectToOtherView(selected_item->getLocalRect(), &item_rect, this); - // if item is visible in scrolled region - if (visible_content_rect.overlaps(item_rect)) + + //Computes intersected region of the selected content and visible area + LLRect overlap_rect(item_rect); + overlap_rect.intersectWith(visible_content_rect); + + //Don't scroll when the selected content exists within the visible area + if (overlap_rect.getHeight() >= selected_item->getItemHeight()) { // then attempt to keep it in same place on screen mScrollConstraintRect = item_rect; mScrollConstraintRect.translate(-visible_content_rect.mLeft, -visible_content_rect.mBottom); } + //Scroll because the selected content is outside the visible area else { // otherwise we just want it onscreen somewhere - LLRect content_rect = mScrollContainer->getContentWindowRect(); + LLRect content_rect = (mScrollContainer ? mScrollContainer->getContentWindowRect() : LLRect()); mScrollConstraintRect.setOriginAndSize(0, 0, content_rect.getWidth(), content_rect.getHeight()); } } @@ -2328,22 +1724,10 @@ void LLFolderView::doIdle() else { // during normal use (page up/page down, etc), just try to fit item on screen - LLRect content_rect = mScrollContainer->getContentWindowRect(); + LLRect content_rect = (mScrollContainer ? mScrollContainer->getContentWindowRect() : LLRect()); constraint_rect.setOriginAndSize(0, 0, content_rect.getWidth(), content_rect.getHeight()); } - - BOOL is_visible = isInVisibleChain(); - - if ( is_visible ) - { - sanitizeSelection(); - if( needsArrange() ) - { - arrangeFromRoot(); - } - } - if (mSelectedItems.size() && mNeedsScroll) { scrollToShowItem(mSelectedItems.back(), constraint_rect); @@ -2364,17 +1748,6 @@ void LLFolderView::doIdle() mSignalSelectCallback = FALSE; } - -//static -void LLFolderView::idle(void* user_data) -{ - LLFolderView* self = (LLFolderView*)user_data; - if ( self ) - { // Do the real idle - self->doIdle(); - } -} - void LLFolderView::dumpSelectionInformation() { llinfos << "LLFolderView::dumpSelectionInformation()" << llendl; @@ -2392,13 +1765,13 @@ void LLFolderView::updateRenamerPosition() if(mRenameItem) { // See also LLFolderViewItem::draw() - S32 x = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mRenameItem->getIndentation(); + S32 x = mRenameItem->getLabelXPos(); S32 y = mRenameItem->getRect().getHeight() - mRenameItem->getItemHeight() - RENAME_HEIGHT_PAD; mRenameItem->localPointToScreen( x, y, &x, &y ); screenPointToLocal( x, y, &x, &y ); mRenamer->setOrigin( x, y ); - LLRect scroller_rect(0, 0, gViewerWindow->getWindowWidthScaled(), 0); + LLRect scroller_rect(0, 0, (S32)LLUI::getWindowSize().mV[VX], 0); if (mScrollContainer) { scroller_rect = mScrollContainer->getContentWindowRect(); @@ -2425,14 +1798,15 @@ void LLFolderView::updateMenuOptions(LLMenuGL* menu) // Successively filter out invalid options - U32 flags = FIRST_SELECTED_ITEM; + U32 multi_select_flag = (mSelectedItems.size() > 1 ? ITEM_IN_MULTI_SELECTION : 0x0); + U32 flags = multi_select_flag | FIRST_SELECTED_ITEM; for (selected_items_t::iterator item_itor = mSelectedItems.begin(); item_itor != mSelectedItems.end(); ++item_itor) { LLFolderViewItem* selected_item = (*item_itor); selected_item->buildContextMenu(*menu, flags); - flags = 0x0; + flags = multi_select_flag; } addNoOptions(menu); @@ -2545,7 +1919,7 @@ void LLFolderView::onRenamerLost() if( mRenameItem ) { - setSelectionFromRoot( mRenameItem, TRUE ); + setSelection( mRenameItem, TRUE ); mRenameItem = NULL; } } @@ -2569,72 +1943,12 @@ LLFolderViewItem* LLFolderView::getNextUnselectedItem() return new_selection; } -LLInventoryFilter* LLFolderView::getFilter() +S32 LLFolderView::getItemHeight() { - return mFilter; -} - -void LLFolderView::setFilterPermMask( PermissionMask filter_perm_mask ) -{ - mFilter->setFilterPermissions(filter_perm_mask); -} - -U32 LLFolderView::getFilterObjectTypes() const -{ - return mFilter->getFilterObjectTypes(); -} - -PermissionMask LLFolderView::getFilterPermissions() const -{ - return mFilter->getFilterPermissions(); -} - -BOOL LLFolderView::isFilterModified() + if(!hasVisibleChildren()) { - return mFilter->isNotDefault(); + //We need to display status textbox, let's reserve some place for it + return llmax(0, mStatusTextBox->getTextPixelHeight()); } - -void delete_selected_item(void* user_data) -{ - if(user_data) - { - LLFolderView* fv = reinterpret_cast<LLFolderView*>(user_data); - fv->removeSelectedItems(); - } -} - -void copy_selected_item(void* user_data) -{ - if(user_data) - { - LLFolderView* fv = reinterpret_cast<LLFolderView*>(user_data); - fv->copy(); - } -} - -void paste_items(void* user_data) -{ - if(user_data) - { - LLFolderView* fv = reinterpret_cast<LLFolderView*>(user_data); - fv->paste(); - } -} - -void open_selected_items(void* user_data) -{ - if(user_data) - { - LLFolderView* fv = reinterpret_cast<LLFolderView*>(user_data); - fv->openSelectedItems(); - } -} - -void properties_selected_items(void* user_data) -{ - if(user_data) - { - LLFolderView* fv = reinterpret_cast<LLFolderView*>(user_data); - fv->propertiesSelectedItems(); - } + return 0; } diff --git a/indra/newview/llfolderview.h b/indra/llui/llfolderview.h index 3f78312a98..11fccdace4 100644 --- a/indra/newview/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -39,19 +39,16 @@ #include "lluictrl.h" #include "v4color.h" -#include "lldarray.h" #include "stdenums.h" #include "lldepthstack.h" #include "lleditmenuhandler.h" #include "llfontgl.h" #include "llscrollcontainer.h" -#include "lltooldraganddrop.h" -#include "llviewertexture.h" -class LLFolderViewEventListener; +class LLFolderViewModelInterface; class LLFolderViewFolder; class LLFolderViewItem; -class LLInventoryModel; +class LLFolderViewFilter; class LLPanel; class LLLineEditor; class LLMenuGL; @@ -90,136 +87,104 @@ public: struct Params : public LLInitParam::Block<Params, LLFolderViewFolder::Params> { Mandatory<LLPanel*> parent_panel; - Optional<LLUUID> task_id; Optional<std::string> title; Optional<bool> use_label_suffix, allow_multiselect, show_empty_message, - show_load_status, - use_ellipses; + use_ellipses, + show_item_link_overlays; + Mandatory<LLFolderViewModelInterface*> view_model; + Mandatory<std::string> options_menu; + Params(); }; friend class LLFolderViewScrollContainer; + typedef std::deque<LLFolderViewItem*> selected_items_t; LLFolderView(const Params&); virtual ~LLFolderView( void ); virtual BOOL canFocusChildren() const; + virtual const LLFolderView* getRoot() const { return this; } virtual LLFolderView* getRoot() { return this; } - // FolderViews default to sort by name. This will change that, - // and resort the items if necessary. - void setSortOrder(U32 order); - void setFilterPermMask(PermissionMask filter_perm_mask); - + LLFolderViewModelInterface* getFolderViewModel() { return mViewModel; } + const LLFolderViewModelInterface* getFolderViewModel() const { return mViewModel; } + typedef boost::signals2::signal<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)> signal_t; void setSelectCallback(const signal_t::slot_type& cb) { mSelectSignal.connect(cb); } void setReshapeCallback(const signal_t::slot_type& cb) { mReshapeSignal.connect(cb); } - // filter is never null - LLInventoryFilter* getFilter(); - const std::string getFilterSubString(BOOL trim = FALSE); - U32 getFilterObjectTypes() const; - PermissionMask getFilterPermissions() const; - // *NOTE: use getFilter()->getShowFolderState(); - //LLInventoryFilter::EFolderShow getShowFolderState(); - U32 getSortOrder() const; - BOOL isFilterModified(); - bool getAllowMultiSelect() { return mAllowMultiSelect; } // Close all folders in the view void closeAllFolders(); void openTopLevelFolders(); - virtual void toggleOpen() {}; - virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse); - virtual BOOL addFolder( LLFolderViewFolder* folder); + virtual void addFolder( LLFolderViewFolder* folder); // Find width and height of this object and its children. Also // makes sure that this view and its children are the right size. - virtual S32 arrange( S32* width, S32* height, S32 filter_generation ); + virtual S32 arrange( S32* width, S32* height ); + virtual S32 getItemHeight(); void arrangeAll() { mArrangeGeneration++; } S32 getArrangeGeneration() { return mArrangeGeneration; } - // Apply filters to control visibility of inventory items - virtual void filter( LLInventoryFilter& filter); + // applies filters to control visibility of items + virtual void filter( LLFolderViewFilter& filter); // Get the last selected item virtual LLFolderViewItem* getCurSelectedItem( void ); + selected_items_t& getSelectedItems( void ); // Record the selected item and pass it down the hierarchy. virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, - BOOL take_keyboard_focus); + BOOL take_keyboard_focus = TRUE); - // Used by menu callbacks - void setSelectionByID(const LLUUID& obj_id, BOOL take_keyboard_focus); - - // Called once a frame to update the selection if mSelectThisID has been set - void updateSelection(); - - // This method is used to toggle the selection of an item. - // Walks children and keeps track of selected objects. + // This method is used to toggle the selection of an item. Walks + // children, and keeps track of selected objects. virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected); - virtual std::set<LLUUID> getSelectionList() const; + virtual std::set<LLFolderViewItem*> getSelectionList() const; - // Make sure if ancestor is selected, descendents are not + // Make sure if ancestor is selected, descendants are not void sanitizeSelection(); - void clearSelection(); + virtual void clearSelection(); void addToSelectionList(LLFolderViewItem* item); void removeFromSelectionList(LLFolderViewItem* item); - BOOL startDrag(LLToolDragAndDrop::ESource source); + bool startDrag(); void setDragAndDropThisFrame() { mDragAndDropThisFrame = TRUE; } void setDraggingOverItem(LLFolderViewItem* item) { mDraggingOverItem = item; } LLFolderViewItem* getDraggingOverItem() { return mDraggingOverItem; } // Deletion functionality void removeSelectedItems(); - static void removeCutItems(); - - // Open the selected item - void openSelectedItems( void ); - void propertiesSelectedItems( void ); - - // Change the folder type - void changeType(LLInventoryModel *model, LLFolderType::EType new_folder_type); void autoOpenItem(LLFolderViewFolder* item); void closeAutoOpenedFolders(); BOOL autoOpenTest(LLFolderViewFolder* item); + BOOL isOpen() const { return TRUE; } // root folder always open // Copy & paste - virtual void copy(); virtual BOOL canCopy() const; + virtual void copy(); - virtual void cut(); virtual BOOL canCut() const; + virtual void cut(); - virtual void paste(); virtual BOOL canPaste() const; - - virtual void doDelete(); - virtual BOOL canDoDelete() const; + virtual void paste(); LLFolderViewItem* getNextUnselectedItem(); - + // Public rename functionality - can only start the process void startRenamingSelectedItem( void ); - // These functions were used when there was only one folderview, - // and relied on that concept. This functionality is now handled - // by the listeners and the lldraganddroptool. - //LLFolderViewItem* getMovingItem() { return mMovingItem; } - //void setMovingItem( LLFolderViewItem* item ) { mMovingItem = item; } - //void dragItemIntoFolder( LLFolderViewItem* moving_item, LLFolderViewFolder* dst_folder, BOOL drop, BOOL* accept ); - //void dragFolderIntoFolder( LLFolderViewFolder* moving_folder, LLFolderViewFolder* dst_folder, BOOL drop, BOOL* accept ); - // LLView functionality ///*virtual*/ BOOL handleKey( KEY key, MASK mask, BOOL called_from_parent ); /*virtual*/ BOOL handleKeyHere( KEY key, MASK mask ); @@ -250,16 +215,9 @@ public: BOOL getShowSingleSelection() { return mShowSingleSelection; } F32 getSelectionFadeElapsedTime() { return mMultiSelectionFadeTimer.getElapsedTimeF32(); } bool getUseEllipses() { return mUseEllipses; } + S32 getSelectedCount() { return (S32)mSelectedItems.size(); } - void addItemID(const LLUUID& id, LLFolderViewItem* itemp); - void removeItemID(const LLUUID& id); - LLFolderViewItem* getItemByID(const LLUUID& id); - LLFolderViewFolder* getFolderByID(const LLUUID& id); - - bool doToSelected(LLInventoryModel* model, const LLSD& userdata); - - void doIdle(); // Real idle routine - static void idle(void* user_data); // static glue to doIdle() + void update(); // needs to be called periodically (e.g. once per frame) BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; } BOOL needsAutoRename() { return mNeedsAutoRename; } @@ -267,9 +225,9 @@ public: void setPinningSelectedItem(BOOL val) { mPinningSelectedItem = val; } void setAutoSelectOverride(BOOL val) { mAutoSelectOverride = val; } - void setCallbackRegistrar(LLUICtrl::CommitCallbackRegistry::ScopedRegistrar* registrar) { mCallbackRegistrar = registrar; } + bool showItemLinkOverlays() { return mShowItemLinkOverlays; } - BOOL getDebugFilters() { return mDebugFilters; } + void setCallbackRegistrar(LLUICtrl::CommitCallbackRegistry::ScopedRegistrar* registrar) { mCallbackRegistrar = registrar; } LLPanel* getParentPanel() { return mParentPanel; } // DEBUG only @@ -298,18 +256,15 @@ protected: BOOL addNoOptions(LLMenuGL* menu) const; - void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response); protected: LLHandle<LLView> mPopupMenuHandle; - typedef std::deque<LLFolderViewItem*> selected_items_t; selected_items_t mSelectedItems; BOOL mKeyboardSelection; BOOL mAllowMultiSelect; BOOL mShowEmptyMessage; BOOL mShowFolderHierarchy; - LLUUID mSourceID; // Renaming variables and methods LLFolderViewItem* mRenameItem; // The item currently being renamed @@ -322,15 +277,13 @@ protected: BOOL mAutoSelectOverride; BOOL mNeedsAutoRename; bool mUseLabelSuffix; + bool mShowItemLinkOverlays; - BOOL mDebugFilters; - U32 mSortOrder; LLDepthStack<LLFolderViewFolder> mAutoOpenItems; LLFolderViewFolder* mAutoOpenCandidate; LLFrameTimer mAutoOpenTimer; LLFrameTimer mSearchTimer; std::string mSearchString; - LLInventoryFilter* mFilter; BOOL mShowSelectionContext; BOOL mShowSingleSelection; LLFrameTimer mMultiSelectionFadeTimer; @@ -340,13 +293,11 @@ protected: signal_t mReshapeSignal; S32 mSignalSelectCallback; S32 mMinWidth; - S32 mRunningHeight; - std::map<LLUUID, LLFolderViewItem*> mItemMap; BOOL mDragAndDropThisFrame; - LLUUID mSelectThisID; // if non null, select this item - LLPanel* mParentPanel; + + LLFolderViewModelInterface* mViewModel; /** * Is used to determine if we need to cut text In LLFolderViewItem to avoid horizontal scroll. @@ -367,11 +318,82 @@ public: }; -bool sort_item_name(LLFolderViewItem* a, LLFolderViewItem* b); -bool sort_item_date(LLFolderViewItem* a, LLFolderViewItem* b); + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLFolderViewFunctor +// +// Simple abstract base class for applying a functor to folders and +// items in a folder view hierarchy. This is suboptimal for algorithms +// that only work folders or only work on items, but I'll worry about +// that later when it's determined to be too slow. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLFolderViewFunctor +{ +public: + virtual ~LLFolderViewFunctor() {} + virtual void doFolder(LLFolderViewFolder* folder) = 0; + virtual void doItem(LLFolderViewItem* item) = 0; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLSelectFirstFilteredItem +// +// This will select the first *item* found in the hierarchy. If no item can be +// selected, the first matching folder will. +// Since doFolder() is done first but we prioritize item selection, we let the +// first filtered folder set the selection and raise a folder flag. +// The selection might be overridden by the first filtered item in doItem() +// which checks an item flag. Since doFolder() checks the item flag too, the first +// item will still be selected if items were to be done first and folders second. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLSelectFirstFilteredItem : public LLFolderViewFunctor +{ +public: + LLSelectFirstFilteredItem() : mItemSelected(FALSE), mFolderSelected(FALSE) {} + virtual ~LLSelectFirstFilteredItem() {} + virtual void doFolder(LLFolderViewFolder* folder); + virtual void doItem(LLFolderViewItem* item); + BOOL wasItemSelected() { return mItemSelected || mFolderSelected; } +protected: + BOOL mItemSelected; + BOOL mFolderSelected; +}; + +class LLOpenFilteredFolders : public LLFolderViewFunctor +{ +public: + LLOpenFilteredFolders() {} + virtual ~LLOpenFilteredFolders() {} + virtual void doFolder(LLFolderViewFolder* folder); + virtual void doItem(LLFolderViewItem* item); +}; + +class LLSaveFolderState : public LLFolderViewFunctor +{ +public: + LLSaveFolderState() : mApply(FALSE) {} + virtual ~LLSaveFolderState() {} + virtual void doFolder(LLFolderViewFolder* folder); + virtual void doItem(LLFolderViewItem* item) {} + void setApply(BOOL apply); + void clearOpenFolders() { mOpenFolders.clear(); } +protected: + std::set<LLUUID> mOpenFolders; + BOOL mApply; +}; + +class LLOpenFoldersWithSelection : public LLFolderViewFunctor +{ +public: + LLOpenFoldersWithSelection() {} + virtual ~LLOpenFoldersWithSelection() {} + virtual void doFolder(LLFolderViewFolder* folder); + virtual void doItem(LLFolderViewItem* item); +}; // Flags for buildContextMenu() const U32 SUPPRESS_OPEN_ITEM = 0x1; const U32 FIRST_SELECTED_ITEM = 0x2; +const U32 ITEM_IN_MULTI_SELECTION = 0x4; #endif // LL_LLFOLDERVIEW_H diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp new file mode 100755 index 0000000000..fdb4108afb --- /dev/null +++ b/indra/llui/llfolderviewitem.cpp @@ -0,0 +1,2095 @@ +/** +* @file llfolderviewitem.cpp +* @brief Items and folders that can appear in a hierarchical folder view +* +* $LicenseInfo:firstyear=2001&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2010, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ +#include "../newview/llviewerprecompiledheaders.h" + +#include "llflashtimer.h" + +#include "linden_common.h" +#include "llfolderviewitem.h" +#include "llfolderview.h" +#include "llfolderviewmodel.h" +#include "llpanel.h" +#include "llcriticaldamp.h" +#include "llclipboard.h" +#include "llfocusmgr.h" // gFocusMgr +#include "lltrans.h" +#include "llwindow.h" + +///---------------------------------------------------------------------------- +/// Class LLFolderViewItem +///---------------------------------------------------------------------------- + +static LLDefaultChildRegistry::Register<LLFolderViewItem> r("folder_view_item"); + +// statics +std::map<U8, LLFontGL*> LLFolderViewItem::sFonts; // map of styles to fonts + +bool LLFolderViewItem::sColorSetInitialized = false; +LLUIColor LLFolderViewItem::sFgColor; +LLUIColor LLFolderViewItem::sHighlightBgColor; +LLUIColor LLFolderViewItem::sFlashBgColor; +LLUIColor LLFolderViewItem::sFocusOutlineColor; +LLUIColor LLFolderViewItem::sMouseOverColor; +LLUIColor LLFolderViewItem::sFilterBGColor; +LLUIColor LLFolderViewItem::sFilterTextColor; +LLUIColor LLFolderViewItem::sSuffixColor; +LLUIColor LLFolderViewItem::sSearchStatusColor; + +// only integers can be initialized in header +const F32 LLFolderViewItem::FOLDER_CLOSE_TIME_CONSTANT = 0.02f; +const F32 LLFolderViewItem::FOLDER_OPEN_TIME_CONSTANT = 0.03f; + +const LLColor4U DEFAULT_WHITE(255, 255, 255); + + +//static +LLFontGL* LLFolderViewItem::getLabelFontForStyle(U8 style) +{ + LLFontGL* rtn = sFonts[style]; + if (!rtn) // grab label font with this style, lazily + { + LLFontDescriptor labelfontdesc("SansSerif", "Small", style); + rtn = LLFontGL::getFont(labelfontdesc); + if (!rtn) + { + rtn = LLFontGL::getFontDefault(); + } + sFonts[style] = rtn; + } + return rtn; +} + +//static +void LLFolderViewItem::initClass() +{ +} + +//static +void LLFolderViewItem::cleanupClass() +{ + sFonts.clear(); +} + + +// NOTE: Optimize this, we call it a *lot* when opening a large inventory +LLFolderViewItem::Params::Params() +: root(), + listener(), + folder_arrow_image("folder_arrow_image"), + folder_indentation("folder_indentation"), + selection_image("selection_image"), + item_height("item_height"), + item_top_pad("item_top_pad"), + creation_date(), + allow_open("allow_open", true), + font_color("font_color"), + font_highlight_color("font_highlight_color"), + left_pad("left_pad", 0), + icon_pad("icon_pad", 0), + icon_width("icon_width", 0), + text_pad("text_pad", 0), + text_pad_right("text_pad_right", 0), + arrow_size("arrow_size", 0), + max_folder_item_overlap("max_folder_item_overlap", 0) +{ } + +// Default constructor +LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) +: LLView(p), + mLabelWidth(0), + mLabelWidthDirty(false), + mLabelPaddingRight(DEFAULT_LABEL_PADDING_RIGHT), + mParentFolder( NULL ), + mIsSelected( FALSE ), + mIsCurSelection( FALSE ), + mSelectPending(FALSE), + mLabelStyle( LLFontGL::NORMAL ), + mHasVisibleChildren(FALSE), + mLocalIndentation(p.folder_indentation), + mIndentation(0), + mItemHeight(p.item_height), + mControlLabelRotation(0.f), + mDragAndDropTarget(FALSE), + mLabel(p.name), + mRoot(p.root), + mViewModelItem(p.listener), + mIsMouseOverTitle(false), + mAllowOpen(p.allow_open), + mFontColor(p.font_color), + mFontHighlightColor(p.font_highlight_color), + mLeftPad(p.left_pad), + mIconPad(p.icon_pad), + mIconWidth(p.icon_width), + mTextPad(p.text_pad), + mTextPadRight(p.text_pad_right), + mArrowSize(p.arrow_size), + mMaxFolderItemOverlap(p.max_folder_item_overlap) +{ + if (!sColorSetInitialized) + { + sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); + sFlashBgColor = LLUIColorTable::instance().getColor("MenuItemFlashBgColor", DEFAULT_WHITE); + sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE); + sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE); + sFilterBGColor = LLUIColorTable::instance().getColor("FilterBackgroundColor", DEFAULT_WHITE); + sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", DEFAULT_WHITE); + sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemColor", DEFAULT_WHITE); + sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE); + sColorSetInitialized = true; + } + + if (mViewModelItem) + { + mViewModelItem->setFolderViewItem(this); + } +} + +// Destroys the object +LLFolderViewItem::~LLFolderViewItem() +{ + mViewModelItem = NULL; +} + +BOOL LLFolderViewItem::postBuild() +{ + refresh(); + return TRUE; +} + + +LLFolderView* LLFolderViewItem::getRoot() +{ + return mRoot; +} + +const LLFolderView* LLFolderViewItem::getRoot() const +{ + return mRoot; +} +// Returns true if this object is a child (or grandchild, etc.) of potential_ancestor. +BOOL LLFolderViewItem::isDescendantOf( const LLFolderViewFolder* potential_ancestor ) +{ + LLFolderViewItem* root = this; + while( root->mParentFolder ) + { + if( root->mParentFolder == potential_ancestor ) + { + return TRUE; + } + root = root->mParentFolder; + } + return FALSE; +} + +LLFolderViewItem* LLFolderViewItem::getNextOpenNode(BOOL include_children) +{ + if (!mParentFolder) + { + return NULL; + } + + LLFolderViewItem* itemp = mParentFolder->getNextFromChild( this, include_children ); + while(itemp && !itemp->getVisible()) + { + LLFolderViewItem* next_itemp = itemp->mParentFolder->getNextFromChild( itemp, include_children ); + if (itemp == next_itemp) + { + // hit last item + return itemp->getVisible() ? itemp : this; + } + itemp = next_itemp; + } + + return itemp; +} + +LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children) +{ + if (!mParentFolder) + { + return NULL; + } + + LLFolderViewItem* itemp = mParentFolder->getPreviousFromChild( this, include_children ); + + // Skip over items that are invisible or are hidden from the UI. + while(itemp && !itemp->getVisible()) + { + LLFolderViewItem* next_itemp = itemp->mParentFolder->getPreviousFromChild( itemp, include_children ); + if (itemp == next_itemp) + { + // hit first item + return itemp->getVisible() ? itemp : this; + } + itemp = next_itemp; + } + + return itemp; +} + +BOOL LLFolderViewItem::passedFilter(S32 filter_generation) +{ + return getViewModelItem()->passedFilter(filter_generation); +} + +void LLFolderViewItem::refresh() +{ + LLFolderViewModelItem& vmi = *getViewModelItem(); + + mLabel = vmi.getDisplayName(); + + setToolTip(vmi.getName()); + mIcon = vmi.getIcon(); + mIconOpen = vmi.getIconOpen(); + mIconOverlay = vmi.getIconOverlay(); + + if (mRoot->useLabelSuffix()) + { + mLabelStyle = vmi.getLabelStyle(); + mLabelSuffix = vmi.getLabelSuffix(); + } + + mLabelWidthDirty = true; + vmi.dirtyFilter(); +} + +// Utility function for LLFolderView +void LLFolderViewItem::arrangeAndSet(BOOL set_selection, + BOOL take_keyboard_focus) +{ + LLFolderView* root = getRoot(); + if (getParentFolder()) + { + getParentFolder()->requestArrange(); + } + if(set_selection) + { + getRoot()->setSelection(this, TRUE, take_keyboard_focus); + if(root) + { + root->scrollToShowSelection(); + } + } +} + + +std::set<LLFolderViewItem*> LLFolderViewItem::getSelectionList() const +{ + std::set<LLFolderViewItem*> selection; + return selection; +} + +// addToFolder() returns TRUE if it succeeds. FALSE otherwise +void LLFolderViewItem::addToFolder(LLFolderViewFolder* folder) +{ + folder->addItem(this); +} + + +// Finds width and height of this object and its children. Also +// makes sure that this view and its children are the right size. +S32 LLFolderViewItem::arrange( S32* width, S32* height ) +{ + // Only indent deeper items in hierarchy + mIndentation = (getParentFolder()) + ? getParentFolder()->getIndentation() + mLocalIndentation + : 0; + if (mLabelWidthDirty) + { + mLabelWidth = getLabelXPos() + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + mLabelPaddingRight; + mLabelWidthDirty = false; + } + + *width = llmax(*width, mLabelWidth); + + // determine if we need to use ellipses to avoid horizontal scroll. EXT-719 + bool use_ellipses = getRoot()->getUseEllipses(); + if (use_ellipses) + { + // limit to set rect to avoid horizontal scrollbar + *width = llmin(*width, getRoot()->getRect().getWidth()); + } + *height = getItemHeight(); + return *height; +} + +S32 LLFolderViewItem::getItemHeight() +{ + return mItemHeight; +} + +S32 LLFolderViewItem::getLabelXPos() +{ + return getIndentation() + mArrowSize + mTextPad + mIconWidth + mIconPad; +} + +S32 LLFolderViewItem::getIconPad() +{ + return mIconPad; +} + +S32 LLFolderViewItem::getTextPad() +{ + return mTextPad; +} + +// *TODO: This can be optimized a lot by simply recording that it is +// selected in the appropriate places, and assuming that set selection +// means 'deselect' for a leaf item. Do this optimization after +// multiple selection is implemented to make sure it all plays nice +// together. +BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus) +{ + if (selection == this && !mIsSelected) + { + selectItem(); + } + else if (mIsSelected) // Deselect everything else. + { + deselectItem(); + } + return mIsSelected; +} + +BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selected) +{ + if (selection == this) + { + if (mIsSelected) + { + deselectItem(); + } + else + { + selectItem(); + } + return TRUE; + } + return FALSE; +} + +void LLFolderViewItem::deselectItem(void) +{ + mIsSelected = FALSE; +} + +void LLFolderViewItem::selectItem(void) +{ + if (mIsSelected == FALSE) + { + mIsSelected = TRUE; + getViewModelItem()->selectItem(); + } +} + +BOOL LLFolderViewItem::isMovable() +{ + return getViewModelItem()->isItemMovable(); +} + +BOOL LLFolderViewItem::isRemovable() +{ + return getViewModelItem()->isItemRemovable(); +} + +void LLFolderViewItem::destroyView() +{ + getRoot()->removeFromSelectionList(this); + + if (mParentFolder) + { + // removeView deletes me + mParentFolder->extractItem(this); + } + delete this; +} + +// Call through to the viewed object and return true if it can be +// removed. +//BOOL LLFolderViewItem::removeRecursively(BOOL single_item) +BOOL LLFolderViewItem::remove() +{ + if(!isRemovable()) + { + return FALSE; + } + return getViewModelItem()->removeItem(); +} + +// Build an appropriate context menu for the item. +void LLFolderViewItem::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + getViewModelItem()->buildContextMenu(menu, flags); +} + +void LLFolderViewItem::openItem( void ) +{ + if (mAllowOpen) + { + getViewModelItem()->openItem(); + } +} + +void LLFolderViewItem::rename(const std::string& new_name) +{ + if( !new_name.empty() ) + { + getViewModelItem()->renameItem(new_name); + } +} + +const std::string& LLFolderViewItem::getName( void ) const +{ + static const std::string noName(""); + return getViewModelItem() ? getViewModelItem()->getName() : noName; +} + +// LLView functionality +BOOL LLFolderViewItem::handleRightMouseDown( S32 x, S32 y, MASK mask ) +{ + if(!mIsSelected) + { + getRoot()->setSelection(this, FALSE); + } + make_ui_sound("UISndClick"); + return TRUE; +} + +BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask ) +{ + if (LLView::childrenHandleMouseDown(x, y, mask)) + { + return TRUE; + } + + // No handler needed for focus lost since this class has no + // state that depends on it. + gFocusMgr.setMouseCapture( this ); + + if (!mIsSelected) + { + if(mask & MASK_CONTROL) + { + getRoot()->changeSelection(this, !mIsSelected); + } + else if (mask & MASK_SHIFT) + { + getParentFolder()->extendSelectionTo(this); + } + else + { + getRoot()->setSelection(this, FALSE); + } + make_ui_sound("UISndClick"); + } + else + { + // If selected, we reserve the decision of deselecting/reselecting to the mouse up moment. + // This is necessary so we maintain selection consistent when starting a drag. + mSelectPending = TRUE; + } + + mDragStartX = x; + mDragStartY = y; + return TRUE; +} + +BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask ) +{ + static LLCachedControl<S32> drag_and_drop_threshold(*LLUI::sSettingGroups["config"],"DragAndDropDistanceThreshold"); + + mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight)); + + if( hasMouseCapture() && isMovable() ) + { + LLFolderView* root = getRoot(); + + if( (x - mDragStartX) * (x - mDragStartX) + (y - mDragStartY) * (y - mDragStartY) > drag_and_drop_threshold() * drag_and_drop_threshold() + && root->getCurSelectedItem() + && root->startDrag()) + { + // RN: when starting drag and drop, clear out last auto-open + root->autoOpenTest(NULL); + root->setShowSelectionContext(TRUE); + + // Release keyboard focus, so that if stuff is dropped into the + // world, pressing the delete key won't blow away the inventory + // item. + gFocusMgr.setKeyboardFocus(NULL); + + getWindow()->setCursor(UI_CURSOR_ARROW); + } + else if (x != mDragStartX || y != mDragStartY) + { + getWindow()->setCursor(UI_CURSOR_NOLOCKED); + } + + return TRUE; + } + else + { + getRoot()->setShowSelectionContext(FALSE); + getWindow()->setCursor(UI_CURSOR_ARROW); + // let parent handle this then... + return FALSE; + } +} + + +BOOL LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask ) +{ + openItem(); + return TRUE; +} + +BOOL LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask ) +{ + if (LLView::childrenHandleMouseUp(x, y, mask)) + { + return TRUE; + } + + // if mouse hasn't moved since mouse down... + if ( pointInView(x, y) && mSelectPending ) + { + //...then select + if(mask & MASK_CONTROL) + { + getRoot()->changeSelection(this, !mIsSelected); + } + else if (mask & MASK_SHIFT) + { + getParentFolder()->extendSelectionTo(this); + } + else + { + getRoot()->setSelection(this, FALSE); + } + } + + mSelectPending = FALSE; + + if( hasMouseCapture() ) + { + if (getRoot()) + { + getRoot()->setShowSelectionContext(FALSE); + } + gFocusMgr.setMouseCapture( NULL ); + } + return TRUE; +} + +void LLFolderViewItem::onMouseLeave(S32 x, S32 y, MASK mask) +{ + mIsMouseOverTitle = false; +} + +BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + BOOL handled = FALSE; + BOOL accepted = getViewModelItem()->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg); + handled = accepted; + if (accepted) + { + mDragAndDropTarget = TRUE; + *accept = ACCEPT_YES_MULTI; + } + else + { + *accept = ACCEPT_NO; + } + if(mParentFolder && !handled) + { + // store this item to get it in LLFolderBridge::dragItemIntoFolder on drop event. + mRoot->setDraggingOverItem(this); + handled = mParentFolder->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg); + mRoot->setDraggingOverItem(NULL); + } + if (handled) + { + lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewItem" << llendl; + } + + return handled; +} + +void LLFolderViewItem::drawOpenFolderArrow(const Params& default_params, const LLUIColor& fg_color) +{ + //--------------------------------------------------------------------------------// + // Draw open folder arrow + // + const S32 TOP_PAD = default_params.item_top_pad; + + if (hasVisibleChildren() || getViewModelItem()->hasChildren()) + { + LLUIImage* arrow_image = default_params.folder_arrow_image; + gl_draw_scaled_rotated_image( + mIndentation, getRect().getHeight() - mArrowSize - mTextPad - TOP_PAD, + mArrowSize, mArrowSize, mControlLabelRotation, arrow_image->getImage(), fg_color); + } +} + +/*virtual*/ bool LLFolderViewItem::isHighlightAllowed() +{ + return mIsSelected; +} + +/*virtual*/ bool LLFolderViewItem::isHighlightActive() +{ + return mIsCurSelection; +} + +void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeyboardFocus, const LLUIColor &selectColor, const LLUIColor &flashColor, + const LLUIColor &focusOutlineColor, const LLUIColor &mouseOverColor) +{ + const S32 focus_top = getRect().getHeight(); + const S32 focus_bottom = getRect().getHeight() - mItemHeight; + const bool folder_open = (getRect().getHeight() > mItemHeight + 4); + const S32 FOCUS_LEFT = 1; + + // Determine which background color to use for highlighting + LLUIColor bgColor = (isFlashing() ? flashColor : selectColor); + + //--------------------------------------------------------------------------------// + // Draw highlight for selected items + // Note: Always render "current" item or flashing item, only render other selected + // items if mShowSingleSelection is FALSE. + // + if (isHighlightAllowed()) + + { + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + + // Highlight for selected but not current items + if (!isHighlightActive() && !isFlashing()) + { + LLColor4 bg_color = bgColor; + // do time-based fade of extra objects + F32 fade_time = (getRoot() ? getRoot()->getSelectionFadeElapsedTime() : 0.0f); + if (getRoot() && getRoot()->getShowSingleSelection()) + { + // fading out + bg_color.mV[VALPHA] = clamp_rescale(fade_time, 0.f, 0.4f, bg_color.mV[VALPHA], 0.f); + } + else + { + // fading in + bg_color.mV[VALPHA] = clamp_rescale(fade_time, 0.f, 0.4f, 0.f, bg_color.mV[VALPHA]); + } + gl_rect_2d(FOCUS_LEFT, + focus_top, + getRect().getWidth() - 2, + focus_bottom, + bg_color, hasKeyboardFocus); + } + + // Highlight for currently selected or flashing item + if (isHighlightActive()) + { + // Background + gl_rect_2d(FOCUS_LEFT, + focus_top, + getRect().getWidth() - 2, + focus_bottom, + bgColor, hasKeyboardFocus); + // Outline + gl_rect_2d(FOCUS_LEFT, + focus_top, + getRect().getWidth() - 2, + focus_bottom, + focusOutlineColor, FALSE); + } + + if (folder_open) + { + gl_rect_2d(FOCUS_LEFT, + focus_bottom + 1, // overlap with bottom edge of above rect + getRect().getWidth() - 2, + 0, + focusOutlineColor, FALSE); + if (showContent && !isFlashing()) + { + gl_rect_2d(FOCUS_LEFT, + focus_bottom + 1, + getRect().getWidth() - 2, + 0, + bgColor, TRUE); + } + } + } + else if (mIsMouseOverTitle) + { + gl_rect_2d(FOCUS_LEFT, + focus_top, + getRect().getWidth() - 2, + focus_bottom, + mouseOverColor, FALSE); + } + + //--------------------------------------------------------------------------------// + // Draw DragNDrop highlight + // + if (mDragAndDropTarget) + { + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gl_rect_2d(FOCUS_LEFT, + focus_top, + getRect().getWidth() - 2, + focus_bottom, + bgColor, FALSE); + if (folder_open) + { + gl_rect_2d(FOCUS_LEFT, + focus_bottom + 1, // overlap with bottom edge of above rect + getRect().getWidth() - 2, + 0, + bgColor, FALSE); + } + mDragAndDropTarget = FALSE; + } +} + +void LLFolderViewItem::drawLabel(const LLFontGL * font, const F32 x, const F32 y, const LLColor4& color, F32 &right_x) +{ + //--------------------------------------------------------------------------------// + // Draw the actual label text + // + font->renderUTF8(mLabel, 0, x, y, color, + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + S32_MAX, getRect().getWidth() - (S32) x - mLabelPaddingRight, &right_x, TRUE); +} + +void LLFolderViewItem::draw() +{ + const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE); + const BOOL filled = show_context || (getRoot() ? getRoot()->getParentPanel()->hasFocus() : FALSE); // If we have keyboard focus, draw selection filled + + const Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>(); + const S32 TOP_PAD = default_params.item_top_pad; + + const LLFontGL* font = getLabelFontForStyle(mLabelStyle); + + getViewModelItem()->update(); + + drawOpenFolderArrow(default_params, sFgColor); + + drawHighlight(show_context, filled, sHighlightBgColor, sFlashBgColor, sFocusOutlineColor, sMouseOverColor); + + //--------------------------------------------------------------------------------// + // Draw open icon + // + const S32 icon_x = mIndentation + mArrowSize + mTextPad; + if (!mIconOpen.isNull() && (llabs(mControlLabelRotation) > 80)) // For open folders + { + mIconOpen->draw(icon_x, getRect().getHeight() - mIconOpen->getHeight() - TOP_PAD + 1); + } + else if (mIcon) + { + mIcon->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1); + } + + if (mIconOverlay && getRoot()->showItemLinkOverlays()) + { + mIconOverlay->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1); + } + + //--------------------------------------------------------------------------------// + // Exit if no label to draw + // + if (mLabel.empty()) + { + return; + } + + std::string::size_type filter_string_length = mViewModelItem->hasFilterStringMatch() ? mViewModelItem->getFilterStringSize() : 0; + F32 right_x = 0; + F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD; + F32 text_left = (F32)getLabelXPos(); + std::string combined_string = mLabel + mLabelSuffix; + + if (filter_string_length > 0) + { + S32 left = llround(text_left) + font->getWidth(combined_string, 0, mViewModelItem->getFilterStringOffset()) - 2; + S32 right = left + font->getWidth(combined_string, mViewModelItem->getFilterStringOffset(), filter_string_length) + 2; + S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD); + S32 top = getRect().getHeight() - TOP_PAD; + + LLUIImage* box_image = default_params.selection_image; + LLRect box_rect(left, top, right, bottom); + box_image->draw(box_rect, sFilterBGColor); + } + + LLColor4 color = (mIsSelected && filled) ? mFontHighlightColor : mFontColor; + drawLabel(font, text_left, y, color, right_x); + + //--------------------------------------------------------------------------------// + // Draw label suffix + // + if (!mLabelSuffix.empty()) + { + font->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor, + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + S32_MAX, S32_MAX, &right_x, FALSE ); + } + + //--------------------------------------------------------------------------------// + // Highlight string match + // + if (filter_string_length > 0) + { + F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, mViewModelItem->getFilterStringOffset()); + F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD; + font->renderUTF8( combined_string, mViewModelItem->getFilterStringOffset(), match_string_left, yy, + sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + filter_string_length, S32_MAX, &right_x, FALSE ); + } + + //Gilbert Linden 9-20-2012: Although this should be legal, removing it because it causes the mLabelSuffix rendering to + //be distorted...oddly. I initially added this in but didn't need it after all. So removing to prevent unnecessary bug. + //LLView::draw(); +} + +const LLFolderViewModelInterface* LLFolderViewItem::getFolderViewModel( void ) const +{ + return getRoot()->getFolderViewModel(); +} + +LLFolderViewModelInterface* LLFolderViewItem::getFolderViewModel( void ) +{ + return getRoot()->getFolderViewModel(); +} + +bool LLFolderViewItem::isInSelection() const +{ + return mIsSelected || (mParentFolder && mParentFolder->isInSelection()); +} + + + +///---------------------------------------------------------------------------- +/// Class LLFolderViewFolder +///---------------------------------------------------------------------------- + +LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ): + LLFolderViewItem( p ), + mIsOpen(FALSE), + mExpanderHighlighted(FALSE), + mCurHeight(0.f), + mTargetHeight(0.f), + mAutoOpenCountdown(0.f), + mLastArrangeGeneration( -1 ), + mLastCalculatedWidth(0) +{ +} + +void LLFolderViewFolder::updateLabelRotation() +{ + if (mAutoOpenCountdown != 0.f) + { + mControlLabelRotation = mAutoOpenCountdown * -90.f; + } + else if (isOpen()) + { + mControlLabelRotation = lerp(mControlLabelRotation, -90.f, LLCriticalDamp::getInterpolant(0.04f)); + } + else + { + mControlLabelRotation = lerp(mControlLabelRotation, 0.f, LLCriticalDamp::getInterpolant(0.025f)); + } +} + +// Destroys the object +LLFolderViewFolder::~LLFolderViewFolder( void ) +{ + // The LLView base class takes care of object destruction. make sure that we + // don't have mouse or keyboard focus + gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit() +} + +// addToFolder() returns TRUE if it succeeds. FALSE otherwise +void LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder) +{ + folder->addFolder(this); +} + +static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange"); + +// Finds width and height of this object and its children. Also +// makes sure that this view and its children are the right size. +S32 LLFolderViewFolder::arrange( S32* width, S32* height ) +{ + // sort before laying out contents + getRoot()->getFolderViewModel()->sort(this); + + LLFastTimer t2(FTM_ARRANGE); + + // evaluate mHasVisibleChildren + mHasVisibleChildren = false; + if (getViewModelItem()->descendantsPassedFilter()) + { + // We have to verify that there's at least one child that's not filtered out + bool found = false; + // Try the items first + for (items_t::iterator iit = mItems.begin(); iit != mItems.end(); ++iit) + { + LLFolderViewItem* itemp = (*iit); + found = itemp->passedFilter(); + if (found) + break; + } + if (!found) + { + // If no item found, try the folders + for (folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit) + { + LLFolderViewFolder* folderp = (*fit); + found = folderp->passedFilter(); + if (found) + break; + } + } + + mHasVisibleChildren = found; + } + + // calculate height as a single item (without any children), and reshapes rectangle to match + LLFolderViewItem::arrange( width, height ); + + // clamp existing animated height so as to never get smaller than a single item + mCurHeight = llmax((F32)*height, mCurHeight); + + // initialize running height value as height of single item in case we have no children + F32 running_height = (F32)*height; + F32 target_height = (F32)*height; + + // are my children visible? + if (needsArrange()) + { + // set last arrange generation first, in case children are animating + // and need to be arranged again + mLastArrangeGeneration = getRoot()->getArrangeGeneration(); + if (isOpen()) + { + // Add sizes of children + S32 parent_item_height = getRect().getHeight(); + + for(folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit) + { + LLFolderViewFolder* folderp = (*fit); + folderp->setVisible(folderp->passedFilter()); // passed filter or has descendants that passed filter + + if (folderp->getVisible()) + { + S32 child_width = *width; + S32 child_height = 0; + S32 child_top = parent_item_height - llround(running_height); + + target_height += folderp->arrange( &child_width, &child_height ); + + running_height += (F32)child_height; + *width = llmax(*width, child_width); + folderp->setOrigin( 0, child_top - folderp->getRect().getHeight() ); + } + } + for(items_t::iterator iit = mItems.begin(); + iit != mItems.end(); ++iit) + { + LLFolderViewItem* itemp = (*iit); + itemp->setVisible(itemp->passedFilter()); + + if (itemp->getVisible()) + { + S32 child_width = *width; + S32 child_height = 0; + S32 child_top = parent_item_height - llround(running_height); + + target_height += itemp->arrange( &child_width, &child_height ); + // don't change width, as this item is as wide as its parent folder by construction + itemp->reshape( itemp->getRect().getWidth(), child_height); + + running_height += (F32)child_height; + *width = llmax(*width, child_width); + itemp->setOrigin( 0, child_top - itemp->getRect().getHeight() ); + } + } + } + + mTargetHeight = target_height; + // cache this width so next time we can just return it + mLastCalculatedWidth = *width; + } + else + { + // just use existing width + *width = mLastCalculatedWidth; + } + + // animate current height towards target height + if (llabs(mCurHeight - mTargetHeight) > 1.f) + { + mCurHeight = lerp(mCurHeight, mTargetHeight, LLCriticalDamp::getInterpolant(isOpen() ? FOLDER_OPEN_TIME_CONSTANT : FOLDER_CLOSE_TIME_CONSTANT)); + + requestArrange(); + + // hide child elements that fall out of current animated height + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end();) + { + folders_t::iterator fit = iter++; + // number of pixels that bottom of folder label is from top of parent folder + if (getRect().getHeight() - (*fit)->getRect().mTop + (*fit)->getItemHeight() + > llround(mCurHeight) + mMaxFolderItemOverlap) + { + // hide if beyond current folder height + (*fit)->setVisible(FALSE); + } + } + + for (items_t::iterator iter = mItems.begin(); + iter != mItems.end();) + { + items_t::iterator iit = iter++; + // number of pixels that bottom of item label is from top of parent folder + if (getRect().getHeight() - (*iit)->getRect().mBottom + > llround(mCurHeight) + mMaxFolderItemOverlap) + { + (*iit)->setVisible(FALSE); + } + } + } + else + { + mCurHeight = mTargetHeight; + } + + // don't change width as this item is already as wide as its parent folder + reshape(getRect().getWidth(),llround(mCurHeight)); + + // pass current height value back to parent + *height = llround(mCurHeight); + + return llround(mTargetHeight); +} + +BOOL LLFolderViewFolder::needsArrange() +{ + return mLastArrangeGeneration < getRoot()->getArrangeGeneration(); +} + +// Passes selection information on to children and record selection +// information if necessary. +BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem, + BOOL take_keyboard_focus) +{ + BOOL rv = FALSE; + if (selection == this) + { + if (!isSelected()) + { + selectItem(); + } + rv = TRUE; + } + else + { + if (isSelected()) + { + deselectItem(); + } + rv = FALSE; + } + BOOL child_selected = FALSE; + + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end();) + { + folders_t::iterator fit = iter++; + if((*fit)->setSelection(selection, openitem, take_keyboard_focus)) + { + rv = TRUE; + child_selected = TRUE; + } + } + for (items_t::iterator iter = mItems.begin(); + iter != mItems.end();) + { + items_t::iterator iit = iter++; + if((*iit)->setSelection(selection, openitem, take_keyboard_focus)) + { + rv = TRUE; + child_selected = TRUE; + } + } + if(openitem && child_selected) + { + setOpenArrangeRecursively(TRUE); + } + return rv; +} + +// This method is used to change the selection of an item. +// Recursively traverse all children; if 'selection' is 'this' then change +// the select status if necessary. +// Returns TRUE if the selection state of this folder, or of a child, was changed. +BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selected) +{ + BOOL rv = FALSE; + if(selection == this) + { + if (isSelected() != selected) + { + rv = TRUE; + if (selected) + { + selectItem(); + } + else + { + deselectItem(); + } + } + } + + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end();) + { + folders_t::iterator fit = iter++; + if((*fit)->changeSelection(selection, selected)) + { + rv = TRUE; + } + } + for (items_t::iterator iter = mItems.begin(); + iter != mItems.end();) + { + items_t::iterator iit = iter++; + if((*iit)->changeSelection(selection, selected)) + { + rv = TRUE; + } + } + return rv; +} + +LLFolderViewFolder* LLFolderViewFolder::getCommonAncestor(LLFolderViewItem* item_a, LLFolderViewItem* item_b, bool& reverse) +{ + if (!item_a->getParentFolder() || !item_b->getParentFolder()) return NULL; + + std::deque<LLFolderViewFolder*> item_a_ancestors; + + LLFolderViewFolder* parent = item_a->getParentFolder(); + while(parent) + { + item_a_ancestors.push_back(parent); + parent = parent->getParentFolder(); + } + + std::deque<LLFolderViewFolder*> item_b_ancestors; + + parent = item_b->getParentFolder(); + while(parent) + { + item_b_ancestors.push_back(parent); + parent = parent->getParentFolder(); + } + + LLFolderViewFolder* common_ancestor = item_a->getRoot(); + + while(item_a_ancestors.size() > item_b_ancestors.size()) + { + item_a = item_a_ancestors.front(); + item_a_ancestors.pop_front(); + } + + while(item_b_ancestors.size() > item_a_ancestors.size()) + { + item_b = item_b_ancestors.front(); + item_b_ancestors.pop_front(); + } + + while(item_a_ancestors.size()) + { + common_ancestor = item_a_ancestors.front(); + + if (item_a_ancestors.front() == item_b_ancestors.front()) + { + // which came first, sibling a or sibling b? + for (folders_t::iterator it = common_ancestor->mFolders.begin(), end_it = common_ancestor->mFolders.end(); + it != end_it; + ++it) + { + LLFolderViewItem* item = *it; + + if (item == item_a) + { + reverse = false; + return common_ancestor; + } + if (item == item_b) + { + reverse = true; + return common_ancestor; + } + } + + for (items_t::iterator it = common_ancestor->mItems.begin(), end_it = common_ancestor->mItems.end(); + it != end_it; + ++it) + { + LLFolderViewItem* item = *it; + + if (item == item_a) + { + reverse = false; + return common_ancestor; + } + if (item == item_b) + { + reverse = true; + return common_ancestor; + } + } + break; + } + + item_a = item_a_ancestors.front(); + item_a_ancestors.pop_front(); + item_b = item_b_ancestors.front(); + item_b_ancestors.pop_front(); + } + + return NULL; +} + +void LLFolderViewFolder::gatherChildRangeExclusive(LLFolderViewItem* start, LLFolderViewItem* end, bool reverse, std::vector<LLFolderViewItem*>& items) +{ + bool selecting = start == NULL; + if (reverse) + { + for (items_t::reverse_iterator it = mItems.rbegin(), end_it = mItems.rend(); + it != end_it; + ++it) + { + if (*it == end) + { + return; + } + if (selecting) + { + items.push_back(*it); + } + + if (*it == start) + { + selecting = true; + } + } + for (folders_t::reverse_iterator it = mFolders.rbegin(), end_it = mFolders.rend(); + it != end_it; + ++it) + { + if (*it == end) + { + return; + } + + if (selecting) + { + items.push_back(*it); + } + + if (*it == start) + { + selecting = true; + } + } + } + else + { + for (folders_t::iterator it = mFolders.begin(), end_it = mFolders.end(); + it != end_it; + ++it) + { + if (*it == end) + { + return; + } + + if (selecting) + { + items.push_back(*it); + } + + if (*it == start) + { + selecting = true; + } + } + for (items_t::iterator it = mItems.begin(), end_it = mItems.end(); + it != end_it; + ++it) + { + if (*it == end) + { + return; + } + + if (selecting) + { + items.push_back(*it); + } + + if (*it == start) + { + selecting = true; + } + } + } +} + +void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection) +{ + if (getRoot()->getAllowMultiSelect() == FALSE) return; + + LLFolderViewItem* cur_selected_item = getRoot()->getCurSelectedItem(); + if (cur_selected_item == NULL) + { + cur_selected_item = new_selection; + } + + + bool reverse = false; + LLFolderViewFolder* common_ancestor = getCommonAncestor(cur_selected_item, new_selection, reverse); + if (!common_ancestor) return; + + LLFolderViewItem* last_selected_item_from_cur = cur_selected_item; + LLFolderViewFolder* cur_folder = cur_selected_item->getParentFolder(); + + std::vector<LLFolderViewItem*> items_to_select_forward; + + while(cur_folder != common_ancestor) + { + cur_folder->gatherChildRangeExclusive(last_selected_item_from_cur, NULL, reverse, items_to_select_forward); + + last_selected_item_from_cur = cur_folder; + cur_folder = cur_folder->getParentFolder(); + } + + std::vector<LLFolderViewItem*> items_to_select_reverse; + + LLFolderViewItem* last_selected_item_from_new = new_selection; + cur_folder = new_selection->getParentFolder(); + while(cur_folder != common_ancestor) + { + cur_folder->gatherChildRangeExclusive(last_selected_item_from_new, NULL, !reverse, items_to_select_reverse); + + last_selected_item_from_new = cur_folder; + cur_folder = cur_folder->getParentFolder(); + } + + common_ancestor->gatherChildRangeExclusive(last_selected_item_from_cur, last_selected_item_from_new, reverse, items_to_select_forward); + + for (std::vector<LLFolderViewItem*>::reverse_iterator it = items_to_select_reverse.rbegin(), end_it = items_to_select_reverse.rend(); + it != end_it; + ++it) + { + items_to_select_forward.push_back(*it); + } + + LLFolderView* root = getRoot(); + + for (std::vector<LLFolderViewItem*>::iterator it = items_to_select_forward.begin(), end_it = items_to_select_forward.end(); + it != end_it; + ++it) + { + LLFolderViewItem* item = *it; + if (item->isSelected()) + { + root->removeFromSelectionList(item); + } + else + { + item->selectItem(); + } + root->addToSelectionList(item); + } + + if (new_selection->isSelected()) + { + root->removeFromSelectionList(new_selection); + } + else + { + new_selection->selectItem(); + } + root->addToSelectionList(new_selection); +} + + +void LLFolderViewFolder::destroyView() +{ + while (!mItems.empty()) + { + LLFolderViewItem *itemp = mItems.back(); + itemp->destroyView(); // LLFolderViewItem::destroyView() removes entry from mItems + } + + while (!mFolders.empty()) + { + LLFolderViewFolder *folderp = mFolders.back(); + folderp->destroyView(); // LLFolderVievFolder::destroyView() removes entry from mFolders + } + + LLFolderViewItem::destroyView(); +} + +// extractItem() removes the specified item from the folder, but +// doesn't delete it. +void LLFolderViewFolder::extractItem( LLFolderViewItem* item ) +{ + if (item->isSelected()) + getRoot()->clearSelection(); + items_t::iterator it = std::find(mItems.begin(), mItems.end(), item); + if(it == mItems.end()) + { + // This is an evil downcast. However, it's only doing + // pointer comparison to find if (which it should be ) the + // item is in the container, so it's pretty safe. + LLFolderViewFolder* f = static_cast<LLFolderViewFolder*>(item); + folders_t::iterator ft; + ft = std::find(mFolders.begin(), mFolders.end(), f); + if (ft != mFolders.end()) + { + mFolders.erase(ft); + } + } + else + { + mItems.erase(it); + } + //item has been removed, need to update filter + getViewModelItem()->removeChild(item->getViewModelItem()); + //because an item is going away regardless of filter status, force rearrange + requestArrange(); + removeChild(item); +} + +BOOL LLFolderViewFolder::isMovable() +{ + if( !(getViewModelItem()->isItemMovable()) ) + { + return FALSE; + } + + for (items_t::iterator iter = mItems.begin(); + iter != mItems.end();) + { + items_t::iterator iit = iter++; + if(!(*iit)->isMovable()) + { + return FALSE; + } + } + + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end();) + { + folders_t::iterator fit = iter++; + if(!(*fit)->isMovable()) + { + return FALSE; + } + } + return TRUE; +} + + +BOOL LLFolderViewFolder::isRemovable() +{ + if( !(getViewModelItem()->isItemRemovable()) ) + { + return FALSE; + } + + for (items_t::iterator iter = mItems.begin(); + iter != mItems.end();) + { + items_t::iterator iit = iter++; + if(!(*iit)->isRemovable()) + { + return FALSE; + } + } + + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end();) + { + folders_t::iterator fit = iter++; + if(!(*fit)->isRemovable()) + { + return FALSE; + } + } + return TRUE; +} + +// this is an internal method used for adding items to folders. +void LLFolderViewFolder::addItem(LLFolderViewItem* item) +{ + if (item->getParentFolder()) + { + item->getParentFolder()->extractItem(item); + } + item->setParentFolder(this); + + mItems.push_back(item); + + item->setRect(LLRect(0, 0, getRect().getWidth(), 0)); + item->setVisible(FALSE); + + addChild(item); + + // When the model is already hooked into a hierarchy (i.e. has a parent), do not reparent it + // Note: this happens when models are created before views or shared between views + if (!item->getViewModelItem()->hasParent()) + { + getViewModelItem()->addChild(item->getViewModelItem()); + } +} + +// this is an internal method used for adding items to folders. +void LLFolderViewFolder::addFolder(LLFolderViewFolder* folder) +{ + if (folder->mParentFolder) + { + folder->mParentFolder->extractItem(folder); + } + folder->mParentFolder = this; + mFolders.push_back(folder); + folder->setOrigin(0, 0); + folder->reshape(getRect().getWidth(), 0); + folder->setVisible(FALSE); + // rearrange all descendants too, as our indentation level might have changed + //folder->requestArrange(); + //requestSort(); + + addChild(folder); + + // When the model is already hooked into a hierarchy (i.e. has a parent), do not reparent it + // Note: this happens when models are created before views or shared between views + if (!folder->getViewModelItem()->hasParent()) + { + getViewModelItem()->addChild(folder->getViewModelItem()); + } +} + +void LLFolderViewFolder::requestArrange() +{ + if ( mLastArrangeGeneration != -1) + { + mLastArrangeGeneration = -1; + // flag all items up to root + if (mParentFolder) + { + mParentFolder->requestArrange(); + } + } +} + +void LLFolderViewFolder::toggleOpen() +{ + setOpen(!isOpen()); +} + +// Force a folder open or closed +void LLFolderViewFolder::setOpen(BOOL openitem) +{ + setOpenArrangeRecursively(openitem); +} + +void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse) +{ + BOOL was_open = isOpen(); + mIsOpen = openitem; + if(!was_open && openitem) + { + getViewModelItem()->openItem(); + } + else if(was_open && !openitem) + { + getViewModelItem()->closeItem(); + } + + if (recurse == RECURSE_DOWN || recurse == RECURSE_UP_DOWN) + { + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end();) + { + folders_t::iterator fit = iter++; + (*fit)->setOpenArrangeRecursively(openitem, RECURSE_DOWN); /* Flawfinder: ignore */ + } + } + if (mParentFolder + && (recurse == RECURSE_UP + || recurse == RECURSE_UP_DOWN)) + { + mParentFolder->setOpenArrangeRecursively(openitem, RECURSE_UP); + } + + if (was_open != isOpen()) + { + requestArrange(); + } +} + +BOOL LLFolderViewFolder::handleDragAndDropFromChild(MASK mask, + BOOL drop, + EDragAndDropType c_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + BOOL accepted = mViewModelItem->dragOrDrop(mask,drop,c_type,cargo_data, tooltip_msg); + if (accepted) + { + mDragAndDropTarget = TRUE; + *accept = ACCEPT_YES_MULTI; + } + else + { + *accept = ACCEPT_NO; + } + + // drag and drop to child item, so clear pending auto-opens + getRoot()->autoOpenTest(NULL); + + return TRUE; +} + +void LLFolderViewFolder::openItem( void ) +{ + toggleOpen(); +} + +void LLFolderViewFolder::applyFunctorToChildren(LLFolderViewFunctor& functor) +{ + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end();) + { + folders_t::iterator fit = iter++; + functor.doItem((*fit)); + } + for (items_t::iterator iter = mItems.begin(); + iter != mItems.end();) + { + items_t::iterator iit = iter++; + functor.doItem((*iit)); + } +} + +void LLFolderViewFolder::applyFunctorRecursively(LLFolderViewFunctor& functor) +{ + functor.doFolder(this); + + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end();) + { + folders_t::iterator fit = iter++; + (*fit)->applyFunctorRecursively(functor); + } + for (items_t::iterator iter = mItems.begin(); + iter != mItems.end();) + { + items_t::iterator iit = iter++; + functor.doItem((*iit)); + } +} + +// LLView functionality +BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask, + BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + BOOL handled = FALSE; + + if (isOpen()) + { + handled = (childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg) != NULL); + } + + if (!handled) + { + handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + + lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewFolder" << llendl; + } + + return TRUE; +} + +BOOL LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask, + BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + BOOL accepted = getViewModelItem()->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg); + + if (accepted) + { + mDragAndDropTarget = TRUE; + *accept = ACCEPT_YES_MULTI; + } + else + { + *accept = ACCEPT_NO; + } + + if (!drop && accepted) + { + getRoot()->autoOpenTest(this); + } + + return TRUE; +} + + +BOOL LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask ) +{ + BOOL handled = FALSE; + + if( isOpen() ) + { + handled = childrenHandleRightMouseDown( x, y, mask ) != NULL; + } + if (!handled) + { + handled = LLFolderViewItem::handleRightMouseDown( x, y, mask ); + } + return handled; +} + + +BOOL LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask) +{ + mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight)); + + BOOL handled = LLView::handleHover(x, y, mask); + + if (!handled) + { + // this doesn't do child processing + handled = LLFolderViewItem::handleHover(x, y, mask); + } + + return handled; +} + +BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask ) +{ + BOOL handled = FALSE; + if( isOpen() ) + { + handled = childrenHandleMouseDown(x,y,mask) != NULL; + } + if( !handled ) + { + if(mIndentation < x && x < mIndentation + (isCollapsed() ? 0 : mArrowSize) + mTextPad) + { + toggleOpen(); + handled = TRUE; + } + else + { + // do normal selection logic + handled = LLFolderViewItem::handleMouseDown(x, y, mask); + } + } + + return handled; +} + +BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask ) +{ + BOOL handled = FALSE; + if( isOpen() ) + { + handled = childrenHandleDoubleClick( x, y, mask ) != NULL; + } + if( !handled ) + { + if(mIndentation < x && x < mIndentation + (isCollapsed() ? 0 : mArrowSize) + mTextPad) + { + // don't select when user double-clicks plus sign + // so as not to contradict single-click behavior + toggleOpen(); + } + else + { + getRoot()->setSelection(this, FALSE); + toggleOpen(); + } + handled = TRUE; + } + return handled; +} + +void LLFolderViewFolder::draw() +{ + updateLabelRotation(); + + LLFolderViewItem::draw(); + + // draw children if root folder, or any other folder that is open or animating to closed state + if( getRoot() == this || (isOpen() || mCurHeight != mTargetHeight )) + { + LLView::draw(); + } + + mExpanderHighlighted = FALSE; +} + +// this does prefix traversal, as folders are listed above their contents +LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, BOOL include_children ) +{ + BOOL found_item = FALSE; + + LLFolderViewItem* result = NULL; + // when not starting from a given item, start at beginning + if(item == NULL) + { + found_item = TRUE; + } + + // find current item among children + folders_t::iterator fit = mFolders.begin(); + folders_t::iterator fend = mFolders.end(); + + items_t::iterator iit = mItems.begin(); + items_t::iterator iend = mItems.end(); + + // if not trivially starting at the beginning, we have to find the current item + if (!found_item) + { + // first, look among folders, since they are always above items + for(; fit != fend; ++fit) + { + if(item == (*fit)) + { + found_item = TRUE; + // if we are on downwards traversal + if (include_children && (*fit)->isOpen()) + { + // look for first descendant + return (*fit)->getNextFromChild(NULL, TRUE); + } + // otherwise advance to next folder + ++fit; + include_children = TRUE; + break; + } + } + + // didn't find in folders? Check items... + if (!found_item) + { + for(; iit != iend; ++iit) + { + if(item == (*iit)) + { + found_item = TRUE; + // point to next item + ++iit; + break; + } + } + } + } + + if (!found_item) + { + // you should never call this method with an item that isn't a child + // so we should always find something + llassert(FALSE); + return NULL; + } + + // at this point, either iit or fit point to a candidate "next" item + // if both are out of range, we need to punt up to our parent + + // now, starting from found folder, continue through folders + // searching for next visible folder + while(fit != fend && !(*fit)->getVisible()) + { + // turn on downwards traversal for next folder + ++fit; + } + + if (fit != fend) + { + result = (*fit); + } + else + { + // otherwise, scan for next visible item + while(iit != iend && !(*iit)->getVisible()) + { + ++iit; + } + + // check to see if we have a valid item + if (iit != iend) + { + result = (*iit); + } + } + + if( !result && mParentFolder ) + { + // If there are no siblings or children to go to, recurse up one level in the tree + // and skip children for this folder, as we've already discounted them + result = mParentFolder->getNextFromChild(this, FALSE); + } + + return result; +} + +// this does postfix traversal, as folders are listed above their contents +LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* item, BOOL include_children ) +{ + BOOL found_item = FALSE; + + LLFolderViewItem* result = NULL; + // when not starting from a given item, start at end + if(item == NULL) + { + found_item = TRUE; + } + + // find current item among children + folders_t::reverse_iterator fit = mFolders.rbegin(); + folders_t::reverse_iterator fend = mFolders.rend(); + + items_t::reverse_iterator iit = mItems.rbegin(); + items_t::reverse_iterator iend = mItems.rend(); + + // if not trivially starting at the end, we have to find the current item + if (!found_item) + { + // first, look among items, since they are always below the folders + for(; iit != iend; ++iit) + { + if(item == (*iit)) + { + found_item = TRUE; + // point to next item + ++iit; + break; + } + } + + // didn't find in items? Check folders... + if (!found_item) + { + for(; fit != fend; ++fit) + { + if(item == (*fit)) + { + found_item = TRUE; + // point to next folder + ++fit; + break; + } + } + } + } + + if (!found_item) + { + // you should never call this method with an item that isn't a child + // so we should always find something + llassert(FALSE); + return NULL; + } + + // at this point, either iit or fit point to a candidate "next" item + // if both are out of range, we need to punt up to our parent + + // now, starting from found item, continue through items + // searching for next visible item + while(iit != iend && !(*iit)->getVisible()) + { + ++iit; + } + + if (iit != iend) + { + // we found an appropriate item + result = (*iit); + } + else + { + // otherwise, scan for next visible folder + while(fit != fend && !(*fit)->getVisible()) + { + ++fit; + } + + // check to see if we have a valid folder + if (fit != fend) + { + // try selecting child element of this folder + if ((*fit)->isOpen() && include_children) + { + result = (*fit)->getPreviousFromChild(NULL); + } + else + { + result = (*fit); + } + } + } + + if( !result ) + { + // If there are no siblings or children to go to, recurse up one level in the tree + // which gets back to this folder, which will only be visited if it is a valid, visible item + result = this; + } + + return result; +} + diff --git a/indra/newview/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index 577b6b54a2..ca31931e19 100644..100755 --- a/indra/newview/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -26,55 +26,16 @@ #ifndef LLFOLDERVIEWITEM_H #define LLFOLDERVIEWITEM_H +#include "llflashtimer.h" #include "llview.h" -#include "lldarray.h" // *TODO: Eliminate, forward declare #include "lluiimage.h" -class LLFontGL; class LLFolderView; -class LLFolderViewEventListener; +class LLFolderViewModelItem; class LLFolderViewFolder; class LLFolderViewFunctor; -class LLFolderViewItem; -class LLFolderViewListenerFunctor; -class LLInventoryFilter; -class LLMenuGL; -class LLUIImage; -class LLViewerInventoryItem; - -// These are grouping of inventory types. -// Order matters when sorting system folders to the top. -enum EInventorySortGroup -{ - SG_SYSTEM_FOLDER, - SG_TRASH_FOLDER, - SG_NORMAL_FOLDER, - SG_ITEM -}; - -// *TODO: do we really need one sort object per folder? -// can we just have one of these per LLFolderView ? -class LLInventorySort -{ -public: - LLInventorySort() - : mSortOrder(0), - mByDate(false), - mSystemToTop(false), - mFoldersByName(false) { } - - // Returns true if order has changed - bool updateSort(U32 order); - U32 getSort() { return mSortOrder; } - bool isByDate() { return mByDate; } - - bool operator()(const LLFolderViewItem* const& a, const LLFolderViewItem* const& b); -private: - U32 mSortOrder; - bool mByDate; - bool mSystemToTop; - bool mFoldersByName; -}; +class LLFolderViewFilter; +class LLFolderViewModelInterface; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLFolderViewItem @@ -86,134 +47,130 @@ private: class LLFolderViewItem : public LLView { public: - static void initClass(); - static void cleanupClass(); - struct Params : public LLInitParam::Block<Params, LLView::Params> { - Optional<LLUIImage*> icon; - Optional<LLUIImage*> icon_open; // used for folders - Optional<LLUIImage*> icon_overlay; // for links - Optional<LLFolderView*> root; - Mandatory<LLFolderViewEventListener*> listener; - - Optional<LLUIImage*> folder_arrow_image; - Optional<S32> folder_indentation; // pixels - Optional<LLUIImage*> selection_image; - Optional<S32> item_height; // pixels - Optional<S32> item_top_pad; // pixels - - Optional<S32> creation_date; //UTC seconds - + Optional<LLUIImage*> folder_arrow_image, + selection_image; + Mandatory<LLFolderView*> root; + Mandatory<LLFolderViewModelItem*> listener; + + Optional<S32> folder_indentation, // pixels + item_height, + item_top_pad; + + Optional<time_t> creation_date; + Optional<bool> allow_open; + + Optional<LLUIColor> font_color; + Optional<LLUIColor> font_highlight_color; + + Optional<S32> left_pad, + icon_pad, + icon_width, + text_pad, + text_pad_right, + arrow_size, + max_folder_item_overlap; Params(); }; - // layout constants - static const S32 LEFT_PAD = 5; - // LEFT_INDENTATION is set via folder_indentation above - static const S32 ICON_PAD = 2; - static const S32 ICON_WIDTH = 16; - static const S32 TEXT_PAD = 1; - static const S32 TEXT_PAD_RIGHT = 4; - static const S32 ARROW_SIZE = 12; - static const S32 MAX_FOLDER_ITEM_OVERLAP = 2; - // animation parameters - static const F32 FOLDER_CLOSE_TIME_CONSTANT; - static const F32 FOLDER_OPEN_TIME_CONSTANT; - - // Mostly for debugging printout purposes. - const std::string& getSearchableLabel() { return mSearchableLabel; } - - BOOL isLoading() const { return mIsLoading; } -private: - BOOL mIsSelected; + static const S32 DEFAULT_LABEL_PADDING_RIGHT = 4; + // animation parameters + static const F32 FOLDER_CLOSE_TIME_CONSTANT, + FOLDER_OPEN_TIME_CONSTANT; protected: friend class LLUICtrlFactory; - friend class LLFolderViewEventListener; + friend class LLFolderViewModelItem; LLFolderViewItem(const Params& p); std::string mLabel; - std::string mSearchableLabel; S32 mLabelWidth; bool mLabelWidthDirty; - time_t mCreationDate; + S32 mLabelPaddingRight; LLFolderViewFolder* mParentFolder; - LLFolderViewEventListener* mListener; - BOOL mIsCurSelection; - BOOL mSelectPending; + LLPointer<LLFolderViewModelItem> mViewModelItem; LLFontGL::StyleFlags mLabelStyle; std::string mLabelSuffix; - LLUIImagePtr mIcon; - std::string mStatusText; - LLUIImagePtr mIconOpen; - LLUIImagePtr mIconOverlay; - BOOL mHasVisibleChildren; + LLUIImagePtr mIcon, + mIconOpen, + mIconOverlay; + S32 mLocalIndentation; S32 mIndentation; S32 mItemHeight; - BOOL mPassedFilter; - S32 mLastFilterGeneration; - std::string::size_type mStringMatchOffset; + S32 mDragStartX, + mDragStartY; + + S32 mLeftPad, + mIconPad, + mIconWidth, + mTextPad, + mTextPadRight, + mArrowSize, + mMaxFolderItemOverlap; + F32 mControlLabelRotation; LLFolderView* mRoot; - BOOL mDragAndDropTarget; - BOOL mIsLoading; - LLTimer mTimeSinceRequestStart; - bool mShowLoadStatus; - bool mIsMouseOverTitle; - - // helper function to change the selection from the root. - void changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected); + bool mHasVisibleChildren, + mIsCurSelection, + mDragAndDropTarget, + mIsMouseOverTitle, + mAllowOpen, + mSelectPending; + + LLUIColor mFontColor; + LLUIColor mFontHighlightColor; + + // For now assuming all colors are the same in derived classes. + static bool sColorSetInitialized; + static LLUIColor sFgColor; + static LLUIColor sFgDisabledColor; + static LLUIColor sHighlightBgColor; + static LLUIColor sFlashBgColor; + static LLUIColor sFocusOutlineColor; + static LLUIColor sMouseOverColor; + static LLUIColor sFilterBGColor; + static LLUIColor sFilterTextColor; + static LLUIColor sSuffixColor; + static LLUIColor sSearchStatusColor; // this is an internal method used for adding items to folders. A // no-op at this level, but reimplemented in derived classes. - virtual BOOL addItem(LLFolderViewItem*) { return FALSE; } - virtual BOOL addFolder(LLFolderViewFolder*) { return FALSE; } + virtual void addItem(LLFolderViewItem*) { } + virtual void addFolder(LLFolderViewFolder*) { } + virtual bool isHighlightAllowed(); + virtual bool isHighlightActive(); + virtual bool isFlashing() { return false; } + virtual void setFlashState(bool) { } static LLFontGL* getLabelFontForStyle(U8 style); - virtual void setCreationDate(time_t creation_date_utc) { mCreationDate = creation_date_utc; } + BOOL mIsSelected; public: + static void initClass(); + static void cleanupClass(); + BOOL postBuild(); - // This function clears the currently selected item, and records - // the specified selected item appropriately for display and use - // in the UI. If open is TRUE, then folders are opened up along - // the way to the selection. - void setSelectionFromRoot(LLFolderViewItem* selection, BOOL openitem, - BOOL take_keyboard_focus = TRUE); - - // This function is called when the folder view is dirty. It's - // implemented here but called by derived classes when folding the - // views. - void arrangeFromRoot(); - void filterFromRoot( void ); - + virtual void openItem( void ); + void arrangeAndSet(BOOL set_selection, BOOL take_keyboard_focus); virtual ~LLFolderViewItem( void ); // addToFolder() returns TRUE if it succeeds. FALSE otherwise - enum { ARRANGE = TRUE, DO_NOT_ARRANGE = FALSE }; - virtual BOOL addToFolder(LLFolderViewFolder* folder, LLFolderView* root); - - virtual EInventorySortGroup getSortGroup() const; + virtual void addToFolder(LLFolderViewFolder* folder); // Finds width and height of this object and it's children. Also // makes sure that this view and it's children are the right size. - virtual S32 arrange( S32* width, S32* height, S32 filter_generation ); + virtual S32 arrange( S32* width, S32* height ); virtual S32 getItemHeight(); - - // applies filters to control visibility of inventory items - virtual void filter( LLInventoryFilter& filter); - - // updates filter serial number and optionally propagated value up to root - S32 getLastFilterGeneration() { return mLastFilterGeneration; } - - virtual void dirtyFilter(); + virtual S32 getLabelXPos(); + S32 getIconPad(); + S32 getTextPad(); // If 'selection' is 'this' then note that otherwise ignore. // Returns TRUE if this item ends up being selected. @@ -231,7 +188,7 @@ public: virtual void selectItem(); // gets multiple-element selection - virtual std::set<LLUUID> getSelectionList() const; + virtual std::set<LLFolderViewItem*> getSelectionList() const; // Returns true is this object and all of its children can be removed (deleted by user) virtual BOOL isRemovable(); @@ -253,74 +210,54 @@ public: BOOL hasVisibleChildren() { return mHasVisibleChildren; } - void setShowLoadStatus(bool status) { mShowLoadStatus = status; } - // Call through to the viewed object and return true if it can be // removed. Returns true if it's removed. //virtual BOOL removeRecursively(BOOL single_item); BOOL remove(); // Build an appropriate context menu for the item. Flags unused. - void buildContextMenu(LLMenuGL& menu, U32 flags); + void buildContextMenu(class LLMenuGL& menu, U32 flags); // This method returns the actual name of the thing being // viewed. This method will ask the viewed object itself. const std::string& getName( void ) const; - const std::string& getSearchableLabel( void ) const; - // This method returns the label displayed on the view. This // method was primarily added to allow sorting on the folder // contents possible before the entire view has been constructed. const std::string& getLabel() const { return mLabel; } - // Used for sorting, like getLabel() above. - virtual time_t getCreationDate() const { return mCreationDate; } - LLFolderViewFolder* getParentFolder( void ) { return mParentFolder; } const LLFolderViewFolder* getParentFolder( void ) const { return mParentFolder; } + void setParentFolder(LLFolderViewFolder* parent) { mParentFolder = parent; } + LLFolderViewItem* getNextOpenNode( BOOL include_children = TRUE ); LLFolderViewItem* getPreviousOpenNode( BOOL include_children = TRUE ); - const LLFolderViewEventListener* getListener( void ) const { return mListener; } - LLFolderViewEventListener* getListener( void ) { return mListener; } - - // Gets the inventory item if it exists (null otherwise) - LLViewerInventoryItem * getInventoryItem(void); + const LLFolderViewModelItem* getViewModelItem( void ) const { return mViewModelItem; } + LLFolderViewModelItem* getViewModelItem( void ) { return mViewModelItem; } + + const LLFolderViewModelInterface* getFolderViewModel( void ) const; + LLFolderViewModelInterface* getFolderViewModel( void ); // just rename the object. void rename(const std::string& new_name); - // open - virtual void openItem( void ); - virtual void preview(void); - - // Show children (unfortunate that this is called "open") + // Show children virtual void setOpen(BOOL open = TRUE) {}; - virtual BOOL isOpen() const { return FALSE; } virtual LLFolderView* getRoot(); + virtual const LLFolderView* getRoot() const; BOOL isDescendantOf( const LLFolderViewFolder* potential_ancestor ); S32 getIndentation() { return mIndentation; } - virtual BOOL potentiallyVisible(); // do we know for a fact that this item won't be displayed? - virtual BOOL potentiallyFiltered(); // do we know for a fact that this item has been filtered out? - - virtual BOOL getFiltered(); - virtual BOOL getFiltered(S32 filter_generation); - virtual void setFiltered(BOOL filtered, S32 filter_generation); - - // change the icon - void setIcon(LLUIImagePtr icon); + virtual BOOL passedFilter(S32 filter_generation = -1); // refresh information from the object being viewed. - void refreshFromListener(); virtual void refresh(); - virtual void applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor); - // LLView functionality virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask ); @@ -330,25 +267,23 @@ public: virtual void onMouseLeave(S32 x, S32 y, MASK mask); - virtual LLView* findChildView(const std::string& name, BOOL recurse) const { return NULL; } + //virtual LLView* findChildView(const std::string& name, BOOL recurse) const { return LLView::findChildView(name, recurse); } // virtual void handleDropped(); virtual void draw(); + void drawOpenFolderArrow(const Params& default_params, const LLUIColor& fg_color); + void drawHighlight(const BOOL showContent, const BOOL hasKeyboardFocus, const LLUIColor &selectColor, const LLUIColor &flashColor, const LLUIColor &outlineColor, const LLUIColor &mouseOverColor); + void drawLabel(const LLFontGL * font, const F32 x, const F32 y, const LLColor4& color, F32 &right_x); virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg); + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); private: static std::map<U8, LLFontGL*> sFonts; // map of styles to fonts }; - -// function used for sorting. -typedef bool (*sort_order_f)(LLFolderViewItem* a, LLFolderViewItem* b); - - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLFolderViewFolder // @@ -363,33 +298,26 @@ protected: LLFolderViewFolder( const LLFolderViewItem::Params& ); friend class LLUICtrlFactory; -public: - typedef enum e_trash - { - UNKNOWN, TRASH, NOT_TRASH - } ETrash; + void updateLabelRotation(); + virtual bool isCollapsed() { return FALSE; } +public: typedef std::list<LLFolderViewItem*> items_t; typedef std::list<LLFolderViewFolder*> folders_t; protected: items_t mItems; folders_t mFolders; - LLInventorySort mSortFunction; BOOL mIsOpen; BOOL mExpanderHighlighted; F32 mCurHeight; F32 mTargetHeight; F32 mAutoOpenCountdown; - time_t mSubtreeCreationDate; - mutable ETrash mAmTrash; S32 mLastArrangeGeneration; S32 mLastCalculatedWidth; - S32 mCompletedFilterGeneration; S32 mMostFilteredDescendantGeneration; bool mNeedsSort; - bool mPassedFolderFilter; public: typedef enum e_recurse_type @@ -403,48 +331,25 @@ public: virtual ~LLFolderViewFolder( void ); - virtual BOOL potentiallyVisible(); - LLFolderViewItem* getNextFromChild( LLFolderViewItem*, BOOL include_children = TRUE ); LLFolderViewItem* getPreviousFromChild( LLFolderViewItem*, BOOL include_children = TRUE ); // addToFolder() returns TRUE if it succeeds. FALSE otherwise - virtual BOOL addToFolder(LLFolderViewFolder* folder, LLFolderView* root); + virtual void addToFolder(LLFolderViewFolder* folder); // Finds width and height of this object and it's children. Also // makes sure that this view and it's children are the right size. - virtual S32 arrange( S32* width, S32* height, S32 filter_generation ); + virtual S32 arrange( S32* width, S32* height ); BOOL needsArrange(); - void requestSort(); - - // Returns the sort group (system, trash, folder) for this folder. - virtual EInventorySortGroup getSortGroup() const; - virtual void setCompletedFilterGeneration(S32 generation, BOOL recurse_up); - virtual S32 getCompletedFilterGeneration() { return mCompletedFilterGeneration; } - - BOOL hasFilteredDescendants(S32 filter_generation); - BOOL hasFilteredDescendants(); - - // applies filters to control visibility of inventory items - virtual void filter( LLInventoryFilter& filter); - virtual void setFiltered(BOOL filtered, S32 filter_generation); - virtual BOOL getFiltered(); - virtual BOOL getFiltered(S32 filter_generation); - - virtual void dirtyFilter(); - - // folder-specific filtering (filter status propagates top down instead of bottom up) - void filterFolder(LLInventoryFilter& filter); - void setFilteredFolder(bool filtered, S32 filter_generation); - bool getFilteredFolder(S32 filter_generation); + bool descendantsPassedFilter(S32 filter_generation = -1); // Passes selection information on to children and record // selection information if necessary. // Returns TRUE if this object (or a child) ends up being selected. // If 'openitem' is TRUE then folders are opened up along the way to the selection. - virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus); + virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus = TRUE); // This method is used to change the selection of an item. // Recursively traverse all children; if 'selection' is 'this' then change @@ -464,31 +369,13 @@ public: // destroys this folder, and all children virtual void destroyView(); - // If this folder can be removed, remove all children that can be - // removed, return TRUE if this is empty after the operation and - // it's viewed folder object can be removed. - //virtual BOOL removeRecursively(BOOL single_item); - //virtual BOOL remove(); - - // remove the specified item (and any children) if - // possible. Return TRUE if the item was deleted. - BOOL removeItem(LLFolderViewItem* item); - - // simply remove the view (and any children) Don't bother telling - // the listeners. - void removeView(LLFolderViewItem* item); - // extractItem() removes the specified item from the folder, but // doesn't delete it. - void extractItem( LLFolderViewItem* item ); + virtual void extractItem( LLFolderViewItem* item ); // This function is called by a child that needs to be resorted. void resort(LLFolderViewItem* item); - void setItemSortOrder(U32 ordering); - void sortBy(U32); - //BOOL (*func)(LLFolderViewItem* a, LLFolderViewItem* b)); - void setAutoOpenCountdown(F32 countdown) { mAutoOpenCountdown = countdown; } // folders can be opened. This will usually be called by internal @@ -499,8 +386,7 @@ public: virtual void setOpen(BOOL openitem = TRUE); // Called when a child is refreshed. - // don't rearrange child folder contents unless explicitly requested - virtual void requestArrange(BOOL include_descendants = FALSE); + virtual void requestArrange(); // internal method which doesn't update the entire view. This // method was written because the list iterators destroy the state @@ -513,65 +399,60 @@ public: // special case if an object is dropped on the child. BOOL handleDragAndDropFromChild(MASK mask, - BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg); + BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); - void applyFunctorRecursively(LLFolderViewFunctor& functor); - virtual void applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor); // Just apply this functor to the folder's immediate children. void applyFunctorToChildren(LLFolderViewFunctor& functor); + // apply this functor to the folder's descendants. + void applyFunctorRecursively(LLFolderViewFunctor& functor); virtual void openItem( void ); - virtual BOOL addItem(LLFolderViewItem* item); - virtual BOOL addFolder( LLFolderViewFolder* folder); // LLView functionality virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask ); virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg); - BOOL handleDragAndDropToThisFolder(MASK mask, BOOL drop, + virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, + BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); + BOOL handleDragAndDropToThisFolder(MASK mask, + BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); virtual void draw(); - time_t getCreationDate() const; - bool isTrash() const; - - folders_t::const_iterator getFoldersBegin() const { return mFolders.begin(); } - folders_t::const_iterator getFoldersEnd() const { return mFolders.end(); } + folders_t::iterator getFoldersBegin() { return mFolders.begin(); } + folders_t::iterator getFoldersEnd() { return mFolders.end(); } folders_t::size_type getFoldersCount() const { return mFolders.size(); } items_t::const_iterator getItemsBegin() const { return mItems.begin(); } items_t::const_iterator getItemsEnd() const { return mItems.end(); } items_t::size_type getItemsCount() const { return mItems.size(); } + LLFolderViewFolder* getCommonAncestor(LLFolderViewItem* item_a, LLFolderViewItem* item_b, bool& reverse); void gatherChildRangeExclusive(LLFolderViewItem* start, LLFolderViewItem* end, bool reverse, std::vector<LLFolderViewItem*>& items); -}; -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLFolderViewListenerFunctor -// -// This simple abstract base class can be used to applied to all -// listeners in a hierarchy. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // internal functions for tracking folders and items separately + // use addToFolder() virtual method to ensure folders are always added to mFolders + // and not mItems + void addItem(LLFolderViewItem* item); + void addFolder( LLFolderViewFolder* folder); -class LLFolderViewListenerFunctor -{ -public: - virtual ~LLFolderViewListenerFunctor() {} - virtual void operator()(LLFolderViewEventListener* listener) = 0; + //WARNING: do not call directly...use the appropriate LLFolderViewModel-derived class instead + template<typename SORT_FUNC> void sortFolders(const SORT_FUNC& func) { mFolders.sort(func); } + template<typename SORT_FUNC> void sortItems(const SORT_FUNC& func) { mItems.sort(func); } }; + #endif // LLFOLDERVIEWITEM_H diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp new file mode 100644 index 0000000000..3593804554 --- /dev/null +++ b/indra/llui/llfolderviewmodel.cpp @@ -0,0 +1,68 @@ +/** + * @file llfolderviewmodel.cpp + * @brief Implementation of the view model collection of classes. + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "linden_common.h" + +#include "llfolderviewmodel.h" +#include "lltrans.h" + +bool LLFolderViewModelCommon::needsSort(LLFolderViewModelItem* item) +{ + return item->getSortVersion() < mTargetSortVersion; +} + +std::string LLFolderViewModelCommon::getStatusText() +{ + if (!contentsReady() || mFolderView->getViewModelItem()->getLastFilterGeneration() < getFilter().getCurrentGeneration()) + { + return LLTrans::getString("Searching"); + } + else + { + return getFilter().getEmptyLookupMessage(); + } +} + +void LLFolderViewModelCommon::filter() +{ + getFilter().setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000)); + mFolderView->getViewModelItem()->filter(getFilter()); +} + +bool LLFolderViewModelItemCommon::hasFilterStringMatch() +{ + return mStringMatchOffsetFilter != std::string::npos; +} + +std::string::size_type LLFolderViewModelItemCommon::getFilterStringOffset() +{ + return mStringMatchOffsetFilter; +} + +std::string::size_type LLFolderViewModelItemCommon::getFilterStringSize() +{ + return mRootViewModel.getFilter().getFilterStringSize(); +} diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h new file mode 100644 index 0000000000..1b61212c0e --- /dev/null +++ b/indra/llui/llfolderviewmodel.h @@ -0,0 +1,444 @@ +/** + * @file llfolderviewmodel.h + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#ifndef LLFOLDERVIEWMODEL_H +#define LLFOLDERVIEWMODEL_H + +#include "llfontgl.h" // just for StyleFlags enum +#include "llfolderview.h" + +// These are grouping of inventory types. +// Order matters when sorting system folders to the top. +enum EInventorySortGroup +{ + SG_SYSTEM_FOLDER, + SG_TRASH_FOLDER, + SG_NORMAL_FOLDER, + SG_ITEM +}; + +class LLFontGL; +class LLInventoryModel; +class LLMenuGL; +class LLUIImage; +class LLUUID; +class LLFolderViewItem; +class LLFolderViewFolder; + +class LLFolderViewFilter +{ +public: + enum EFilterModified + { + FILTER_NONE, // nothing to do, already filtered + FILTER_RESTART, // restart filtering from scratch + FILTER_LESS_RESTRICTIVE, // existing filtered items will certainly pass this filter + FILTER_MORE_RESTRICTIVE // if you didn't pass the previous filter, you definitely won't pass this one + }; + +public: + + LLFolderViewFilter() {} + virtual ~LLFolderViewFilter() {} + + // +-------------------------------------------------------------------+ + // + Execution And Results + // +-------------------------------------------------------------------+ + virtual bool check(const LLFolderViewModelItem* item) = 0; + virtual bool checkFolder(const LLFolderViewModelItem* folder) const = 0; + + virtual void setEmptyLookupMessage(const std::string& message) = 0; + virtual std::string getEmptyLookupMessage() const = 0; + + virtual bool showAllResults() const = 0; + + virtual std::string::size_type getStringMatchOffset(LLFolderViewModelItem* item) const = 0; + virtual std::string::size_type getFilterStringSize() const = 0; + // +-------------------------------------------------------------------+ + // + Status + // +-------------------------------------------------------------------+ + virtual bool isActive() const = 0; + virtual bool isModified() const = 0; + virtual void clearModified() = 0; + virtual const std::string& getName() const = 0; + virtual const std::string& getFilterText() = 0; + //RN: this is public to allow system to externally force a global refilter + virtual void setModified(EFilterModified behavior = FILTER_RESTART) = 0; + + // +-------------------------------------------------------------------+ + // + Count + // +-------------------------------------------------------------------+ + virtual void setFilterCount(S32 count) = 0; + virtual S32 getFilterCount() const = 0; + virtual void decrementFilterCount() = 0; + + // +-------------------------------------------------------------------+ + // + Default + // +-------------------------------------------------------------------+ + virtual bool isDefault() const = 0; + virtual bool isNotDefault() const = 0; + virtual void markDefault() = 0; + virtual void resetDefault() = 0; + + // +-------------------------------------------------------------------+ + // + Generation + // +-------------------------------------------------------------------+ + virtual S32 getCurrentGeneration() const = 0; + virtual S32 getFirstSuccessGeneration() const = 0; + virtual S32 getFirstRequiredGeneration() const = 0; +}; + +class LLFolderViewModelInterface +{ +public: + virtual ~LLFolderViewModelInterface() {} + virtual void requestSortAll() = 0; + + virtual void sort(class LLFolderViewFolder*) = 0; + virtual void filter() = 0; + + virtual bool contentsReady() = 0; + virtual void setFolderView(LLFolderView* folder_view) = 0; + virtual LLFolderViewFilter& getFilter() = 0; + virtual const LLFolderViewFilter& getFilter() const = 0; + virtual std::string getStatusText() = 0; + + virtual bool startDrag(std::vector<LLFolderViewModelItem*>& items) = 0; +}; + +// This is an abstract base class that users of the folderview classes +// would use to bridge the folder view with the underlying data +class LLFolderViewModelItem : public LLRefCount +{ +public: + LLFolderViewModelItem() { } + virtual ~LLFolderViewModelItem() { } + + virtual void update() {} //called when drawing + virtual const std::string& getName() const = 0; + virtual const std::string& getDisplayName() const = 0; + virtual const std::string& getSearchableName() const = 0; + + virtual LLPointer<LLUIImage> getIcon() const = 0; + virtual LLPointer<LLUIImage> getIconOpen() const { return getIcon(); } + virtual LLPointer<LLUIImage> getIconOverlay() const { return NULL; } + + virtual LLFontGL::StyleFlags getLabelStyle() const = 0; + virtual std::string getLabelSuffix() const = 0; + + virtual void openItem( void ) = 0; + virtual void closeItem( void ) = 0; + virtual void selectItem(void) = 0; + + virtual BOOL isItemRenameable() const = 0; + virtual BOOL renameItem(const std::string& new_name) = 0; + + virtual BOOL isItemMovable( void ) const = 0; // Can be moved to another folder + virtual void move( LLFolderViewModelItem* parent_listener ) = 0; + + virtual BOOL isItemRemovable( void ) const = 0; // Can be destroyed + virtual BOOL removeItem() = 0; + virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch) = 0; + + virtual BOOL isItemCopyable() const = 0; + virtual BOOL copyToClipboard() const = 0; + virtual BOOL cutToClipboard() const = 0; + + virtual BOOL isClipboardPasteable() const = 0; + virtual void pasteFromClipboard() = 0; + virtual void pasteLinkFromClipboard() = 0; + + virtual void buildContextMenu(LLMenuGL& menu, U32 flags) = 0; + + virtual bool potentiallyVisible() = 0; // is the item definitely visible or we haven't made up our minds yet? + + virtual bool filter( LLFolderViewFilter& filter) = 0; + virtual bool passedFilter(S32 filter_generation = -1) = 0; + virtual bool descendantsPassedFilter(S32 filter_generation = -1) = 0; + virtual void setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset = std::string::npos, std::string::size_type string_size = 0) = 0; + virtual void setPassedFolderFilter(bool passed, S32 filter_generation) = 0; + virtual void dirtyFilter() = 0; + virtual bool hasFilterStringMatch() = 0; + virtual std::string::size_type getFilterStringOffset() = 0; + virtual std::string::size_type getFilterStringSize() = 0; + + virtual S32 getLastFilterGeneration() const = 0; + + virtual bool hasChildren() const = 0; + virtual void addChild(LLFolderViewModelItem* child) = 0; + virtual void removeChild(LLFolderViewModelItem* child) = 0; + + // This method will be called to determine if a drop can be + // performed, and will set drop to TRUE if a drop is + // requested. Returns TRUE if a drop is possible/happened, + // otherwise FALSE. + virtual BOOL dragOrDrop(MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + std::string& tooltip_msg) = 0; + + virtual void requestSort() = 0; + virtual S32 getSortVersion() = 0; + virtual void setSortVersion(S32 version) = 0; + virtual void setParent(LLFolderViewModelItem* parent) = 0; + virtual bool hasParent() = 0; + +protected: + + friend class LLFolderViewItem; + virtual void setFolderViewItem(LLFolderViewItem* folder_view_item) = 0; + +}; + + +class LLFolderViewModelItemCommon : public LLFolderViewModelItem +{ +public: + LLFolderViewModelItemCommon(LLFolderViewModelInterface& root_view_model) + : mSortVersion(-1), + mPassedFilter(true), + mPassedFolderFilter(true), + mStringMatchOffsetFilter(std::string::npos), + mStringFilterSize(0), + mFolderViewItem(NULL), + mLastFilterGeneration(-1), + mLastFolderFilterGeneration(-1), + mMostFilteredDescendantGeneration(-1), + mParent(NULL), + mRootViewModel(root_view_model) + { + mChildren.clear(); + } + + void requestSort() { mSortVersion = -1; } + S32 getSortVersion() { return mSortVersion; } + void setSortVersion(S32 version) { mSortVersion = version;} + + S32 getLastFilterGeneration() const { return mLastFilterGeneration; } + S32 getLastFolderFilterGeneration() const { return mLastFolderFilterGeneration; } + void dirtyFilter() + { + mLastFilterGeneration = -1; + mLastFolderFilterGeneration = -1; + + // bubble up dirty flag all the way to root + if (mParent) + { + mParent->dirtyFilter(); + } + } + bool hasFilterStringMatch(); + std::string::size_type getFilterStringOffset(); + std::string::size_type getFilterStringSize(); + + typedef std::list<LLFolderViewModelItem*> child_list_t; + + virtual void addChild(LLFolderViewModelItem* child) + { + // Avoid duplicates: bail out if that child is already present in the list + // Note: this happens when models are created before views + child_list_t::const_iterator iter; + for (iter = mChildren.begin(); iter != mChildren.end(); iter++) + { + if (child == *iter) + { + return; + } + } + mChildren.push_back(child); + child->setParent(this); + dirtyFilter(); + requestSort(); + } + virtual void removeChild(LLFolderViewModelItem* child) + { + mChildren.remove(child); + child->setParent(NULL); + dirtyFilter(); + } + + virtual void clearChildren() + { + // As this is cleaning the whole list of children wholesale, we do need to delete the pointed objects + // This is different and not equivalent to calling removeChild() on each child + std::for_each(mChildren.begin(), mChildren.end(), DeletePointer()); + mChildren.clear(); + dirtyFilter(); + } + + child_list_t::const_iterator getChildrenBegin() const { return mChildren.begin(); } + child_list_t::const_iterator getChildrenEnd() const { return mChildren.end(); } + child_list_t::size_type getChildrenCount() const { return mChildren.size(); } + + void setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset = std::string::npos, std::string::size_type string_size = 0) + { + mPassedFilter = passed; + mLastFilterGeneration = filter_generation; + mStringMatchOffsetFilter = string_offset; + mStringFilterSize = string_size; + } + + void setPassedFolderFilter(bool passed, S32 filter_generation) + { + mPassedFolderFilter = passed; + mLastFolderFilterGeneration = filter_generation; + } + + virtual bool potentiallyVisible() + { + return passedFilter() // we've passed the filter + || getLastFilterGeneration() < mRootViewModel.getFilter().getFirstSuccessGeneration() // or we don't know yet + || descendantsPassedFilter(); + } + + virtual bool passedFilter(S32 filter_generation = -1) + { + if (filter_generation < 0) + filter_generation = mRootViewModel.getFilter().getFirstSuccessGeneration(); + + bool passed_folder_filter = mPassedFolderFilter && mLastFolderFilterGeneration >= filter_generation; + bool passed_filter = mPassedFilter && mLastFilterGeneration >= filter_generation; + return passed_folder_filter + && (descendantsPassedFilter(filter_generation) + || passed_filter); + } + + virtual bool descendantsPassedFilter(S32 filter_generation = -1) + { + if (filter_generation < 0) filter_generation = mRootViewModel.getFilter().getFirstSuccessGeneration(); + return mMostFilteredDescendantGeneration >= filter_generation; + } + + +protected: + virtual void setParent(LLFolderViewModelItem* parent) { mParent = parent; } + virtual bool hasParent() { return mParent != NULL; } + + S32 mSortVersion; + bool mPassedFilter; + bool mPassedFolderFilter; + std::string::size_type mStringMatchOffsetFilter; + std::string::size_type mStringFilterSize; + + S32 mLastFilterGeneration; + S32 mLastFolderFilterGeneration; + S32 mMostFilteredDescendantGeneration; + + child_list_t mChildren; + LLFolderViewModelItem* mParent; + LLFolderViewModelInterface& mRootViewModel; + + void setFolderViewItem(LLFolderViewItem* folder_view_item) { mFolderViewItem = folder_view_item;} + LLFolderViewItem* mFolderViewItem; +}; + + + +class LLFolderViewModelCommon : public LLFolderViewModelInterface +{ +public: + LLFolderViewModelCommon() + : mTargetSortVersion(0), + mFolderView(NULL) + {} + + virtual void requestSortAll() + { + // sort everything + mTargetSortVersion++; + } + virtual std::string getStatusText(); + virtual void filter(); + + void setFolderView(LLFolderView* folder_view) { mFolderView = folder_view;} + +protected: + bool needsSort(class LLFolderViewModelItem* item); + + S32 mTargetSortVersion; + LLFolderView* mFolderView; + +}; + +template <typename SORT_TYPE, typename ITEM_TYPE, typename FOLDER_TYPE, typename FILTER_TYPE> +class LLFolderViewModel : public LLFolderViewModelCommon +{ +public: + LLFolderViewModel(){} + virtual ~LLFolderViewModel() {} + + typedef SORT_TYPE SortType; + typedef ITEM_TYPE ItemType; + typedef FOLDER_TYPE FolderType; + typedef FILTER_TYPE FilterType; + + virtual SortType& getSorter() { return mSorter; } + virtual const SortType& getSorter() const { return mSorter; } + virtual void setSorter(const SortType& sorter) { mSorter = sorter; requestSortAll(); } + + virtual FilterType& getFilter() { return mFilter; } + virtual const FilterType& getFilter() const { return mFilter; } + virtual void setFilter(const FilterType& filter) { mFilter = filter; } + + // By default, we assume the content is available. If a network fetch mechanism is implemented for the model, + // this method needs to be overloaded and return the relevant fetch status. + virtual bool contentsReady() { return true; } + + + struct ViewModelCompare + { + ViewModelCompare(const SortType& sorter) + : mSorter(sorter) + {} + + bool operator () (const LLFolderViewItem* a, const LLFolderViewItem* b) const + { + return mSorter(static_cast<const ItemType*>(a->getViewModelItem()), static_cast<const ItemType*>(b->getViewModelItem())); + } + + bool operator () (const LLFolderViewFolder* a, const LLFolderViewFolder* b) const + { + return mSorter(static_cast<const ItemType*>(a->getViewModelItem()), static_cast<const ItemType*>(b->getViewModelItem())); + } + + const SortType& mSorter; + }; + + void sort(LLFolderViewFolder* folder) + { + if (needsSort(folder->getViewModelItem())) + { + folder->sortFolders(ViewModelCompare(getSorter())); + folder->sortItems(ViewModelCompare(getSorter())); + folder->getViewModelItem()->setSortVersion(mTargetSortVersion); + folder->requestArrange(); + } + } + +protected: + SortType mSorter; + FilterType mFilter; +}; + +#endif // LLFOLDERVIEWMODEL_H diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 4c730286da..e642883991 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -32,11 +32,10 @@ #include "lllocalcliprect.h" #include "llpanel.h" -#include "llresizebar.h" #include "llcriticaldamp.h" #include "boost/foreach.hpp" -static const F32 MIN_FRACTIONAL_SIZE = 0.0f; +static const F32 MIN_FRACTIONAL_SIZE = 0.00001f; static const F32 MAX_FRACTIONAL_SIZE = 1.f; static LLDefaultChildRegistry::Register<LLLayoutStack> register_layout_stack("layout_stack"); @@ -71,7 +70,7 @@ LLLayoutPanel::LLLayoutPanel(const Params& p) mCollapseAmt(0.f), mVisibleAmt(1.f), // default to fully visible mResizeBar(NULL), - mFractionalSize(MIN_FRACTIONAL_SIZE), + mFractionalSize(0.f), mTargetDim(0), mIgnoreReshape(false), mOrientation(LLLayoutStack::HORIZONTAL) @@ -521,7 +520,7 @@ void LLLayoutStack::updateFractionalSizes() { if (panelp->mAutoResize) { - total_resizable_dim += llmax(0, panelp->getLayoutDim() - panelp->getRelevantMinDim()); + total_resizable_dim += llmax(MIN_FRACTIONAL_SIZE, (F32)(panelp->getLayoutDim() - panelp->getRelevantMinDim())); } } @@ -672,12 +671,12 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& S32 new_dim = (mOrientation == HORIZONTAL) ? new_rect.getWidth() : new_rect.getHeight(); - S32 delta_dim = new_dim - resized_panel->getVisibleDim(); - if (delta_dim == 0) return; + S32 delta_panel_dim = new_dim - resized_panel->getVisibleDim(); + if (delta_panel_dim == 0) return; F32 total_visible_fraction = 0.f; F32 delta_auto_resize_headroom = 0.f; - F32 original_auto_resize_headroom = 0.f; + F32 old_auto_resize_headroom = 0.f; LLLayoutPanel* other_resize_panel = NULL; LLLayoutPanel* following_panel = NULL; @@ -686,7 +685,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& { if (panelp->mAutoResize) { - original_auto_resize_headroom += (F32)(panelp->mTargetDim - panelp->getRelevantMinDim()); + old_auto_resize_headroom += (F32)(panelp->mTargetDim - panelp->getRelevantMinDim()); if (panelp->getVisible() && !panelp->mCollapsed) { total_visible_fraction += panelp->mFractionalSize; @@ -704,25 +703,24 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& } } - if (resized_panel->mAutoResize) { if (!other_resize_panel || !other_resize_panel->mAutoResize) { - delta_auto_resize_headroom += delta_dim; + delta_auto_resize_headroom += delta_panel_dim; } } else { if (!other_resize_panel || other_resize_panel->mAutoResize) { - delta_auto_resize_headroom -= delta_dim; + delta_auto_resize_headroom -= delta_panel_dim; } } F32 fraction_given_up = 0.f; F32 fraction_remaining = 1.f; - F32 updated_auto_resize_headroom = original_auto_resize_headroom + delta_auto_resize_headroom; + F32 new_auto_resize_headroom = old_auto_resize_headroom + delta_auto_resize_headroom; enum { @@ -734,7 +732,14 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& BOOST_FOREACH(LLLayoutPanel* panelp, mPanels) { - if (!panelp->getVisible() || panelp->mCollapsed) continue; + if (!panelp->getVisible() || panelp->mCollapsed) + { + if (panelp->mAutoResize) + { + fraction_remaining -= panelp->mFractionalSize; + } + continue; + } if (panelp == resized_panel) { @@ -746,9 +751,9 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& case BEFORE_RESIZED_PANEL: if (panelp->mAutoResize) { // freeze current size as fraction of overall auto_resize space - F32 fractional_adjustment_factor = updated_auto_resize_headroom == 0.f + F32 fractional_adjustment_factor = new_auto_resize_headroom == 0.f ? 1.f - : original_auto_resize_headroom / updated_auto_resize_headroom; + : old_auto_resize_headroom / new_auto_resize_headroom; F32 new_fractional_size = llclamp(panelp->mFractionalSize * fractional_adjustment_factor, MIN_FRACTIONAL_SIZE, MAX_FRACTIONAL_SIZE); @@ -765,9 +770,9 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& case RESIZED_PANEL: if (panelp->mAutoResize) { // freeze new size as fraction - F32 new_fractional_size = (updated_auto_resize_headroom == 0.f) + F32 new_fractional_size = (new_auto_resize_headroom == 0.f) ? MAX_FRACTIONAL_SIZE - : llclamp(total_visible_fraction * (F32)(new_dim - panelp->getRelevantMinDim()) / updated_auto_resize_headroom, MIN_FRACTIONAL_SIZE, MAX_FRACTIONAL_SIZE); + : llclamp(total_visible_fraction * (F32)(new_dim - panelp->getRelevantMinDim()) / new_auto_resize_headroom, MIN_FRACTIONAL_SIZE, MAX_FRACTIONAL_SIZE); fraction_given_up -= new_fractional_size - panelp->mFractionalSize; fraction_remaining -= panelp->mFractionalSize; panelp->mFractionalSize = new_fractional_size; @@ -790,8 +795,13 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& } else { + if (new_auto_resize_headroom < 1.f) + { + new_auto_resize_headroom = 1.f; + } + F32 new_fractional_size = llclamp(total_visible_fraction * (F32)(panelp->mTargetDim - panelp->getRelevantMinDim() + delta_auto_resize_headroom) - / updated_auto_resize_headroom, + / new_auto_resize_headroom, MIN_FRACTIONAL_SIZE, MAX_FRACTIONAL_SIZE); fraction_given_up -= new_fractional_size - panelp->mFractionalSize; @@ -800,7 +810,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& } else { - panelp->mTargetDim -= delta_dim; + panelp->mTargetDim -= delta_panel_dim; } which_panel = AFTER_RESIZED_PANEL; break; @@ -816,7 +826,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& } } updateLayout(); - normalizeFractionalSizes(); + //normalizeFractionalSizes(); } void LLLayoutStack::reshape(S32 width, S32 height, BOOL called_from_parent) diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index 648cd5fdce..02c664f1a0 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -29,6 +29,7 @@ #define LL_LLLAYOUTSTACK_H #include "llpanel.h" +#include "llresizebar.h" class LLLayoutPanel; @@ -178,6 +179,9 @@ public: F32 getAutoResizeFactor() const; F32 getVisibleAmount() const; S32 getVisibleDim() const; + LLResizeBar* getResizeBar() { return mResizeBar; } + + bool isCollapsed() const { return mCollapsed;} void setOrientation(LLLayoutStack::ELayoutOrientation orientation); void storeOriginalDim(); diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 48d49af588..6976b06a92 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -157,8 +157,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) mHighlightColor(p.highlight_color()), mPreeditBgColor(p.preedit_bg_color()), mGLFont(p.font), - mContextMenuHandle(), - mAutoreplaceCallback() + mContextMenuHandle() { llassert( mMaxLengthBytes > 0 ); @@ -203,6 +202,14 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) LLLineEditor::~LLLineEditor() { mCommitOnFocusLost = FALSE; + + // Make sure no context menu linger around once the widget is deleted + LLContextMenu* menu = static_cast<LLContextMenu*>(mContextMenuHandle.get()); + if (menu) + { + menu->hide(); + } + setContextMenu(NULL); // calls onCommit() while LLLineEditor still valid gFocusMgr.releaseFocusIfNeeded( this ); @@ -971,12 +978,6 @@ void LLLineEditor::addChar(const llwchar uni_char) LLUI::reportBadKeystroke(); } - if (!mReadOnly && mAutoreplaceCallback != NULL) - { - // call callback - mAutoreplaceCallback(mText, mCursorPos); - } - getWindow()->hideCursorUntilMouseMove(); } diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 71dd53f608..40f931ecc1 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -189,9 +189,6 @@ public: virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text ); virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); - typedef boost::function<void(LLUIString&, S32&)> autoreplace_callback_t; - autoreplace_callback_t mAutoreplaceCallback; - void setAutoreplaceCallback(autoreplace_callback_t cb) { mAutoreplaceCallback = cb; } void setLabel(const LLStringExplicit &new_label) { mLabel = new_label; } const std::string& getLabel() { return mLabel.getString(); } diff --git a/indra/llui/llloadingindicator.cpp b/indra/llui/llloadingindicator.cpp index 6ac38f5ad4..1ede5b706f 100644 --- a/indra/llui/llloadingindicator.cpp +++ b/indra/llui/llloadingindicator.cpp @@ -52,7 +52,7 @@ LLLoadingIndicator::LLLoadingIndicator(const Params& p) void LLLoadingIndicator::initFromParams(const Params& p) { - BOOST_FOREACH(LLUIImage* image, p.images.image) + BOOST_FOREACH(LLUIImage* image, p.images().image) { mImages.push_back(image); } diff --git a/indra/llui/llloadingindicator.h b/indra/llui/llloadingindicator.h index c1f979c111..ffcb329f42 100644 --- a/indra/llui/llloadingindicator.h +++ b/indra/llui/llloadingindicator.h @@ -51,7 +51,7 @@ class LLLoadingIndicator LOG_CLASS(LLLoadingIndicator); public: - struct Images : public LLInitParam::BatchBlock<Images> + struct Images : public LLInitParam::Block<Images> { Multiple<LLUIImage*> image; @@ -62,8 +62,8 @@ public: struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> { - Optional<F32> images_per_sec; - Optional<Images> images; + Optional<F32> images_per_sec; + Optional<Atomic<Images> > images; Params() : images_per_sec("images_per_sec", 1.0f), diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp index 50d59f79f4..746ade4648 100644 --- a/indra/llui/llmenubutton.cpp +++ b/indra/llui/llmenubutton.cpp @@ -44,33 +44,27 @@ void LLMenuButton::MenuPositions::declareValues() LLMenuButton::Params::Params() : menu_filename("menu_filename"), - position("position", MP_BOTTOM_LEFT) + position("menu_position", MP_BOTTOM_LEFT) { + addSynonym(position, "position"); } LLMenuButton::LLMenuButton(const LLMenuButton::Params& p) : LLButton(p), mIsMenuShown(false), - mMenuPosition(p.position) + mMenuPosition(p.position), + mOwnMenu(false) { std::string menu_filename = p.menu_filename; - if (!menu_filename.empty()) - { - LLToggleableMenu* menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(menu_filename, LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance()); - if (!menu) - { - llwarns << "Error loading menu_button menu" << llendl; - return; - } - - menu->setVisibilityChangeCallback(boost::bind(&LLMenuButton::onMenuVisibilityChange, this, _2)); - - mMenuHandle = menu->getHandle(); + setMenu(menu_filename, mMenuPosition); + updateMenuOrigin(); +} - updateMenuOrigin(); - } +LLMenuButton::~LLMenuButton() +{ + cleanup(); } boost::signals2::connection LLMenuButton::setMouseDownCallback( const mouse_signal_t::slot_type& cb ) @@ -80,9 +74,7 @@ boost::signals2::connection LLMenuButton::setMouseDownCallback( const mouse_sign void LLMenuButton::hideMenu() { - if(mMenuHandle.isDead()) return; - - LLToggleableMenu* menu = dynamic_cast<LLToggleableMenu*>(mMenuHandle.get()); + LLToggleableMenu* menu = getMenu(); if (menu) { menu->setVisible(FALSE); @@ -94,19 +86,39 @@ LLToggleableMenu* LLMenuButton::getMenu() return dynamic_cast<LLToggleableMenu*>(mMenuHandle.get()); } -void LLMenuButton::setMenu(LLToggleableMenu* menu, EMenuPosition position /*MP_TOP_LEFT*/) +void LLMenuButton::setMenu(const std::string& menu_filename, EMenuPosition position /*MP_TOP_LEFT*/) +{ + if (menu_filename.empty()) + { + return; + } + + LLToggleableMenu* menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(menu_filename, LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance()); + if (!menu) + { + llwarns << "Error loading menu_button menu" << llendl; + return; + } + + setMenu(menu, position, true); +} + +void LLMenuButton::setMenu(LLToggleableMenu* menu, EMenuPosition position /*MP_TOP_LEFT*/, bool take_ownership /*false*/) { if (!menu) return; + cleanup(); // destroy the previous memnu if we own it + mMenuHandle = menu->getHandle(); mMenuPosition = position; + mOwnMenu = take_ownership; menu->setVisibilityChangeCallback(boost::bind(&LLMenuButton::onMenuVisibilityChange, this, _2)); } BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask ) { - if (mMenuHandle.isDead()) return FALSE; + if (!getMenu()) return FALSE; if( KEY_RETURN == key && mask == MASK_NONE && !gKeyboard->getKeyRepeated(key)) { @@ -118,7 +130,7 @@ BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask ) return TRUE; } - LLToggleableMenu* menu = dynamic_cast<LLToggleableMenu*>(mMenuHandle.get()); + LLToggleableMenu* menu = getMenu(); if (menu && menu->getVisible() && key == KEY_ESCAPE && mask == MASK_NONE) { menu->setVisible(FALSE); @@ -139,9 +151,12 @@ BOOL LLMenuButton::handleMouseDown(S32 x, S32 y, MASK mask) void LLMenuButton::toggleMenu() { - if(mMenuHandle.isDead()) return; + if (mValidateSignal && !(*mValidateSignal)(this, LLSD())) + { + return; + } - LLToggleableMenu* menu = dynamic_cast<LLToggleableMenu*>(mMenuHandle.get()); + LLToggleableMenu* menu = getMenu(); if (!menu) return; // Store the button rectangle to toggle menu visibility if a mouse event @@ -170,7 +185,8 @@ void LLMenuButton::toggleMenu() void LLMenuButton::updateMenuOrigin() { - if (mMenuHandle.isDead()) return; + LLToggleableMenu* menu = getMenu(); + if (!menu) return; LLRect rect = getRect(); @@ -179,12 +195,12 @@ void LLMenuButton::updateMenuOrigin() case MP_TOP_LEFT: { mX = rect.mLeft; - mY = rect.mTop + mMenuHandle.get()->getRect().getHeight(); + mY = rect.mTop + menu->getRect().getHeight(); break; } case MP_TOP_RIGHT: { - const LLRect& menu_rect = mMenuHandle.get()->getRect(); + const LLRect& menu_rect = menu->getRect(); mX = rect.mRight - menu_rect.getWidth(); mY = rect.mTop + menu_rect.getHeight(); break; @@ -211,3 +227,11 @@ void LLMenuButton::onMenuVisibilityChange(const LLSD& param) mIsMenuShown = false; } } + +void LLMenuButton::cleanup() +{ + if (mMenuHandle.get() && mOwnMenu) + { + mMenuHandle.get()->die(); + } +} diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h index e2396e7fb2..67ec1983b3 100644 --- a/indra/llui/llmenubutton.h +++ b/indra/llui/llmenubutton.h @@ -34,6 +34,8 @@ class LLToggleableMenu; class LLMenuButton : public LLButton { + LOG_CLASS(LLMenuButton); + public: typedef enum e_menu_position { @@ -53,7 +55,7 @@ public: { // filename for it's toggleable menu Optional<std::string> menu_filename; - Optional<EMenuPosition> position; + Optional<EMenuPosition, MenuPositions> position; Params(); }; @@ -68,13 +70,15 @@ public: void hideMenu(); LLToggleableMenu* getMenu(); - void setMenu(LLToggleableMenu* menu, EMenuPosition position = MP_TOP_LEFT); + void setMenu(const std::string& menu_filename, EMenuPosition position = MP_TOP_LEFT); + void setMenu(LLToggleableMenu* menu, EMenuPosition position = MP_TOP_LEFT, bool take_ownership = false); void setMenuPosition(EMenuPosition position) { mMenuPosition = position; } protected: friend class LLUICtrlFactory; LLMenuButton(const Params&); + ~LLMenuButton(); void toggleMenu(); void updateMenuOrigin(); @@ -82,11 +86,14 @@ protected: void onMenuVisibilityChange(const LLSD& param); private: + void cleanup(); + LLHandle<LLView> mMenuHandle; bool mIsMenuShown; EMenuPosition mMenuPosition; S32 mX; S32 mY; + bool mOwnMenu; // true if we manage the menu lifetime }; diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index efb9848a90..f7bf39c897 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -593,12 +593,12 @@ BOOL LLMenuItemSeparatorGL::handleMouseDown(S32 x, S32 y, MASK mask) { // the menu items are in the child list in bottom up order LLView* prev_menu_item = parent_menu->findNextSibling(this); - return prev_menu_item ? prev_menu_item->handleMouseDown(x, prev_menu_item->getRect().getHeight(), mask) : FALSE; + return (prev_menu_item && prev_menu_item->getVisible() && prev_menu_item->getEnabled()) ? prev_menu_item->handleMouseDown(x, prev_menu_item->getRect().getHeight(), mask) : FALSE; } else { LLView* next_menu_item = parent_menu->findPrevSibling(this); - return next_menu_item ? next_menu_item->handleMouseDown(x, 0, mask) : FALSE; + return (next_menu_item && next_menu_item->getVisible() && next_menu_item->getEnabled()) ? next_menu_item->handleMouseDown(x, 0, mask) : FALSE; } } @@ -608,12 +608,12 @@ BOOL LLMenuItemSeparatorGL::handleMouseUp(S32 x, S32 y, MASK mask) if (y > getRect().getHeight() / 2) { LLView* prev_menu_item = parent_menu->findNextSibling(this); - return prev_menu_item ? prev_menu_item->handleMouseUp(x, prev_menu_item->getRect().getHeight(), mask) : FALSE; + return (prev_menu_item && prev_menu_item->getVisible() && prev_menu_item->getEnabled()) ? prev_menu_item->handleMouseUp(x, prev_menu_item->getRect().getHeight(), mask) : FALSE; } else { LLView* next_menu_item = parent_menu->findPrevSibling(this); - return next_menu_item ? next_menu_item->handleMouseUp(x, 0, mask) : FALSE; + return (next_menu_item && next_menu_item->getVisible() && next_menu_item->getEnabled()) ? next_menu_item->handleMouseUp(x, 0, mask) : FALSE; } } @@ -1751,16 +1751,50 @@ void LLMenuGL::setCanTearOff(BOOL tear_off) bool LLMenuGL::addChild(LLView* view, S32 tab_group) { - if (LLMenuGL* menup = dynamic_cast<LLMenuGL*>(view)) + LLMenuGL* menup = dynamic_cast<LLMenuGL*>(view); + if (menup) { - appendMenu(menup); - return true; + return appendMenu(menup); } - else if (LLMenuItemGL* itemp = dynamic_cast<LLMenuItemGL*>(view)) + + LLMenuItemGL* itemp = dynamic_cast<LLMenuItemGL*>(view); + if (itemp) { - append(itemp); - return true; + return append(itemp); } + + return false; +} + +// Used in LLContextMenu and in LLTogleableMenu + +// Add an item to the context menu branch +bool LLMenuGL::addContextChild(LLView* view, S32 tab_group) +{ + LLContextMenu* context = dynamic_cast<LLContextMenu*>(view); + if (context) + { + return appendContextSubMenu(context); + } + + LLMenuItemSeparatorGL* separator = dynamic_cast<LLMenuItemSeparatorGL*>(view); + if (separator) + { + return append(separator); + } + + LLMenuItemGL* item = dynamic_cast<LLMenuItemGL*>(view); + if (item) + { + return append(item); + } + + LLMenuGL* menup = dynamic_cast<LLMenuGL*>(view); + if (menup) + { + return appendMenu(menup); + } + return false; } @@ -2427,6 +2461,56 @@ void LLMenuGL::empty( void ) deleteAllChildren(); } +// erase group of items from menu +void LLMenuGL::erase( S32 begin, S32 end, bool arrange/* = true*/) +{ + S32 items = mItems.size(); + + if ( items == 0 || begin >= end || begin < 0 || end > items ) + { + return; + } + + item_list_t::iterator start_position = mItems.begin(); + std::advance(start_position, begin); + + item_list_t::iterator end_position = mItems.begin(); + std::advance(end_position, end); + + for (item_list_t::iterator position_iter = start_position; position_iter != end_position; position_iter++) + { + LLUICtrl::removeChild(*position_iter); + } + + mItems.erase(start_position, end_position); + + if (arrange) + { + needsArrange(); + } +} + +// add new item at position +void LLMenuGL::insert( S32 position, LLView * ctrl, bool arrange /*= true*/ ) +{ + LLMenuItemGL * item = dynamic_cast<LLMenuItemGL *>(ctrl); + + if (NULL == item || position < 0 || position >= mItems.size()) + { + return; + } + + item_list_t::iterator position_iter = mItems.begin(); + std::advance(position_iter, position); + mItems.insert(position_iter, item); + LLUICtrl::addChild(item); + + if (arrange) + { + needsArrange(); + } +} + // Adjust rectangle of the menu void LLMenuGL::setLeftAndBottom(S32 left, S32 bottom) { @@ -2468,7 +2552,8 @@ BOOL LLMenuGL::append( LLMenuItemGL* item ) // add a separator to this menu BOOL LLMenuGL::addSeparator() { - LLMenuItemGL* separator = new LLMenuItemSeparatorGL(); + LLMenuItemSeparatorGL::Params p; + LLMenuItemGL* separator = LLUICtrlFactory::create<LLMenuItemSeparatorGL>(p); return addChild(separator); } @@ -2501,6 +2586,30 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu ) return success; } +// add a context menu branch +BOOL LLMenuGL::appendContextSubMenu(LLMenuGL *menu) +{ + if (menu == this) + { + llerrs << "Can't attach a context menu to itself" << llendl; + } + + LLContextMenuBranch *item; + LLContextMenuBranch::Params p; + p.name = menu->getName(); + p.label = menu->getLabel(); + p.branch = (LLContextMenu *)menu; + p.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor"); + p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor"); + p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor"); + p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor"); + + item = LLUICtrlFactory::create<LLContextMenuBranch>(p); + LLMenuGL::sMenuContainer->addChild(item->getBranch()); + + return append( item ); +} + void LLMenuGL::setEnabledSubMenus(BOOL enable) { setEnabled(enable); @@ -3037,7 +3146,17 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) const S32 CURSOR_HEIGHT = 22; // Approximate "normal" cursor size const S32 CURSOR_WIDTH = 12; - if(menu->getChildList()->empty()) + //Do not show menu if all menu items are disabled + BOOL item_enabled = false; + for (LLView::child_list_t::const_iterator itor = menu->getChildList()->begin(); + itor != menu->getChildList()->end(); + ++itor) + { + LLView *menu_item = (*itor); + item_enabled = item_enabled || menu_item->getEnabled(); + } + + if(menu->getChildList()->empty() || !item_enabled) { return; } @@ -3725,39 +3844,6 @@ void LLTearOffMenu::closeTearOff() mMenu->setDropShadowed(TRUE); } - -//----------------------------------------------------------------------------- -// class LLContextMenuBranch -// A branch to another context menu -//----------------------------------------------------------------------------- -class LLContextMenuBranch : public LLMenuItemGL -{ -public: - struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params> - { - Mandatory<LLContextMenu*> branch; - }; - - LLContextMenuBranch(const Params&); - - virtual ~LLContextMenuBranch() - {} - - // called to rebuild the draw label - virtual void buildDrawLabel( void ); - - // onCommit() - do the primary funcationality of the menu item. - virtual void onCommit( void ); - - LLContextMenu* getBranch() { return mBranch.get(); } - void setHighlight( BOOL highlight ); - -protected: - void showSubMenu(); - - LLHandle<LLContextMenu> mBranch; -}; - LLContextMenuBranch::LLContextMenuBranch(const LLContextMenuBranch::Params& p) : LLMenuItemGL(p), mBranch( p.branch()->getHandle() ) @@ -4029,49 +4115,8 @@ BOOL LLContextMenu::handleRightMouseUp( S32 x, S32 y, MASK mask ) return result; } -void LLContextMenu::draw() -{ - LLMenuGL::draw(); -} - -BOOL LLContextMenu::appendContextSubMenu(LLContextMenu *menu) -{ - - if (menu == this) - { - llerrs << "Can't attach a context menu to itself" << llendl; - } - - LLContextMenuBranch *item; - LLContextMenuBranch::Params p; - p.name = menu->getName(); - p.label = menu->getLabel(); - p.branch = menu; - p.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor"); - p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor"); - p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor"); - p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor"); - - item = LLUICtrlFactory::create<LLContextMenuBranch>(p); - LLMenuGL::sMenuContainer->addChild(item->getBranch()); - - return append( item ); -} - bool LLContextMenu::addChild(LLView* view, S32 tab_group) { - LLContextMenu* context = dynamic_cast<LLContextMenu*>(view); - if (context) - return appendContextSubMenu(context); - - LLMenuItemSeparatorGL* separator = dynamic_cast<LLMenuItemSeparatorGL*>(view); - if (separator) - return append(separator); - - LLMenuItemGL* item = dynamic_cast<LLMenuItemGL*>(view); - if (item) - return append(item); - - return false; + return addContextChild(view, tab_group); } diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 67b3e1fbe6..51df5df1f8 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -478,6 +478,12 @@ public: // remove all items on the menu void empty( void ); + // erase group of items from menu + void erase( S32 begin, S32 end, bool arrange = true ); + + // add new item at position + void insert( S32 begin, LLView * ctrl, bool arrange = true ); + void setItemLastSelected(LLMenuItemGL* item); // must be in menu U32 getItemCount(); // number of menu items LLMenuItemGL* getItem(S32 number); // 0 = first item @@ -519,6 +525,9 @@ public: void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; } bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; } + // add a context menu branch + BOOL appendContextSubMenu(LLMenuGL *menu); + protected: void createSpilloverBranch(); void cleanupSpilloverBranch(); @@ -528,6 +537,10 @@ protected: // add a menu - this will create a cascading menu virtual BOOL appendMenu( LLMenuGL* menu ); + // Used in LLContextMenu and in LLTogleableMenu + // to add an item of context menu branch + bool addContextChild(LLView* view, S32 tab_group); + // TODO: create accessor methods for these? typedef std::list< LLMenuItemGL* > item_list_t; item_list_t mItems; @@ -668,8 +681,6 @@ public: // can't set visibility directly, must call show or hide virtual void setVisible (BOOL visible); - virtual void draw (); - virtual void show (S32 x, S32 y, LLView* spawning_view = NULL); virtual void hide (); @@ -679,8 +690,6 @@ public: virtual bool addChild (LLView* view, S32 tab_group = 0); - BOOL appendContextSubMenu(LLContextMenu *menu); - LLHandle<LLContextMenu> getHandle() { return getDerivedHandle<LLContextMenu>(); } LLView* getSpawningView() const { return mSpawningViewHandle.get(); } @@ -693,6 +702,37 @@ protected: LLHandle<LLView> mSpawningViewHandle; }; +//----------------------------------------------------------------------------- +// class LLContextMenuBranch +// A branch to another context menu +//----------------------------------------------------------------------------- +class LLContextMenuBranch : public LLMenuItemGL +{ +public: + struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params> + { + Mandatory<LLContextMenu*> branch; + }; + + LLContextMenuBranch(const Params&); + + virtual ~LLContextMenuBranch() + {} + + // called to rebuild the draw label + virtual void buildDrawLabel( void ); + + // onCommit() - do the primary funcationality of the menu item. + virtual void onCommit( void ); + + LLContextMenu* getBranch() { return mBranch.get(); } + void setHighlight( BOOL highlight ); + +protected: + void showSubMenu(); + + LLHandle<LLContextMenu> mBranch; +}; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp index aa5f577897..179b251cdb 100644 --- a/indra/llui/llmultifloater.cpp +++ b/indra/llui/llmultifloater.cpp @@ -41,8 +41,8 @@ LLMultiFloater::LLMultiFloater(const LLSD& key, const LLFloater::Params& params) mTabContainer(NULL), mTabPos(LLTabContainer::TOP), mAutoResize(TRUE), - mOrigMinWidth(0), - mOrigMinHeight(0) + mOrigMinWidth(params.min_width), + mOrigMinHeight(params.min_height) { } @@ -173,7 +173,7 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, else if (floaterp->getHost()) { // floaterp is hosted by somebody else and - // this is adding it, so remove it from it's old host + // this is adding it, so remove it from its old host floaterp->getHost()->removeFloater(floaterp); } else if (floaterp->getParent() == gFloaterView) @@ -188,11 +188,13 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, floater_data.mHeight = floaterp->getRect().getHeight(); floater_data.mCanMinimize = floaterp->isMinimizeable(); floater_data.mCanResize = floaterp->isResizable(); + floater_data.mSaveRect = floaterp->mSaveRect; // remove minimize and close buttons floaterp->setCanMinimize(FALSE); floaterp->setCanResize(FALSE); floaterp->setCanDrag(FALSE); + floaterp->mSaveRect = FALSE; floaterp->storeRectControl(); // avoid double rendering of floater background (makes it more opaque) floaterp->setBackgroundVisible(FALSE); @@ -291,6 +293,7 @@ void LLMultiFloater::removeFloater(LLFloater* floaterp) { LLFloaterData& floater_data = found_data_it->second; floaterp->setCanMinimize(floater_data.mCanMinimize); + floaterp->mSaveRect = floater_data.mSaveRect; if (!floater_data.mCanResize) { // restore original size @@ -468,23 +471,12 @@ BOOL LLMultiFloater::postBuild() void LLMultiFloater::updateResizeLimits() { - static LLUICachedControl<S32> tabcntr_close_btn_size ("UITabCntrCloseBtnSize", 0); - const LLFloater::Params& default_params = LLFloater::getDefaultParams(); - S32 floater_header_size = default_params.header_height; - S32 tabcntr_header_height = LLPANEL_BORDER_WIDTH + tabcntr_close_btn_size; // initialize minimum size constraint to the original xml values. S32 new_min_width = mOrigMinWidth; S32 new_min_height = mOrigMinHeight; - // possibly increase minimum size constraint due to children's minimums. - for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) - { - LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(tab_idx); - if (floaterp) - { - new_min_width = llmax(new_min_width, floaterp->getMinWidth() + LLPANEL_BORDER_WIDTH * 2); - new_min_height = llmax(new_min_height, floaterp->getMinHeight() + floater_header_size + tabcntr_header_height); - } - } + + computeResizeLimits(new_min_width, new_min_height); + setResizeLimits(new_min_width, new_min_height); S32 cur_height = getRect().getHeight(); @@ -510,3 +502,22 @@ void LLMultiFloater::updateResizeLimits() gFloaterView->adjustToFitScreen(this, TRUE); } } + +void LLMultiFloater::computeResizeLimits(S32& new_min_width, S32& new_min_height) +{ + static LLUICachedControl<S32> tabcntr_close_btn_size ("UITabCntrCloseBtnSize", 0); + const LLFloater::Params& default_params = LLFloater::getDefaultParams(); + S32 floater_header_size = default_params.header_height; + S32 tabcntr_header_height = LLPANEL_BORDER_WIDTH + tabcntr_close_btn_size; + + // possibly increase minimum size constraint due to children's minimums. + for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) + { + LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(tab_idx); + if (floaterp) + { + new_min_width = llmax(new_min_width, floaterp->getMinWidth() + LLPANEL_BORDER_WIDTH * 2); + new_min_height = llmax(new_min_height, floaterp->getMinHeight() + floater_header_size + tabcntr_header_height); + } + } +} diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h index 9fa917eca1..d992212650 100644 --- a/indra/llui/llmultifloater.h +++ b/indra/llui/llmultifloater.h @@ -45,8 +45,8 @@ public: virtual BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void draw(); - /*virtual*/ void setVisible(BOOL visible); + virtual void draw(); + virtual void setVisible(BOOL visible); /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); /*virtual*/ bool addChild(LLView* view, S32 tab_group = 0); @@ -79,10 +79,11 @@ public: protected: struct LLFloaterData { - S32 mWidth; - S32 mHeight; - BOOL mCanMinimize; - BOOL mCanResize; + S32 mWidth; + S32 mHeight; + BOOL mCanMinimize; + BOOL mCanResize; + BOOL mSaveRect; }; LLTabContainer* mTabContainer; @@ -93,6 +94,9 @@ protected: LLTabContainer::TabPosition mTabPos; BOOL mAutoResize; S32 mOrigMinWidth, mOrigMinHeight; // logically const but initialized late + +private: + virtual void computeResizeLimits(S32& new_min_width, S32& new_min_height); }; #endif // LL_MULTI_FLOATER_H diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 629eef2c3b..1789f003b9 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -39,7 +39,6 @@ #include "lldir.h" #include "llsdserialize.h" #include "lltrans.h" -#include "llnotificationslistener.h" #include "llstring.h" #include "llsdparam.h" #include "llsdutil.h" @@ -60,7 +59,8 @@ void NotificationPriorityValues::declareValues() } LLNotificationForm::FormElementBase::FormElementBase() -: name("name") +: name("name"), + enabled("enabled", true) {} LLNotificationForm::FormIgnore::FormIgnore() @@ -104,39 +104,7 @@ LLNotificationForm::Params::Params() form_elements("") {} -// Local channel for persistent notifications -// Stores only persistent notifications. -// Class users can use connectChanged() to process persistent notifications -// (see LLNotificationStorage for example). -class LLPersistentNotificationChannel : public LLNotificationChannel -{ - LOG_CLASS(LLPersistentNotificationChannel); -public: - LLPersistentNotificationChannel() : - LLNotificationChannel("Persistent", "Visible", ¬ificationFilter, LLNotificationComparators::orderByUUID()) - { - } - -private: - - // The channel gets all persistent notifications except those that have been canceled - static bool notificationFilter(LLNotificationPtr pNotification) - { - bool handle_notification = false; - - handle_notification = pNotification->isPersistent() - && !pNotification->isCancelled(); - return handle_notification; - } - - void onDelete(LLNotificationPtr pNotification) - { - // we want to keep deleted notifications in our log, otherwise some - // notifications will be lost on exit. - mItems.insert(pNotification); - } -}; bool filterIgnoredNotifications(LLNotificationPtr notification) { @@ -210,6 +178,14 @@ LLNotificationForm::LLNotificationForm() { } +LLNotificationForm::LLNotificationForm( const LLNotificationForm& other ) +{ + mFormData = other.mFormData; + mIgnore = other.mIgnore; + mIgnoreMsg = other.mIgnoreMsg; + mIgnoreSetting = other.mIgnoreSetting; + mInvertSetting = other.mInvertSetting; +} LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotificationForm::Params& p) : mIgnore(IGNORE_NO), @@ -246,14 +222,6 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica LLParamSDParser parser; parser.writeSD(mFormData, p.form_elements); - if (!mFormData.isArray()) - { - // change existing contents to a one element array - LLSD new_llsd_array = LLSD::emptyArray(); - new_llsd_array.append(mFormData); - mFormData = new_llsd_array; - } - for (LLSD::array_iterator it = mFormData.beginArray(), end_it = mFormData.endArray(); it != end_it; ++it) @@ -300,7 +268,7 @@ LLSD LLNotificationForm::getElement(const std::string& element_name) } -bool LLNotificationForm::hasElement(const std::string& element_name) +bool LLNotificationForm::hasElement(const std::string& element_name) const { for (LLSD::array_const_iterator it = mFormData.beginArray(); it != mFormData.endArray(); @@ -311,7 +279,48 @@ bool LLNotificationForm::hasElement(const std::string& element_name) return false; } -void LLNotificationForm::addElement(const std::string& type, const std::string& name, const LLSD& value) +void LLNotificationForm::getElements(LLSD& elements, S32 offset) +{ + //Finds elements that the template did not add + LLSD::array_const_iterator it = mFormData.beginArray() + offset; + + //Keeps track of only the dynamic elements + for(; it != mFormData.endArray(); ++it) + { + elements.append(*it); + } +} + +bool LLNotificationForm::getElementEnabled(const std::string& element_name) const +{ + for (LLSD::array_const_iterator it = mFormData.beginArray(); + it != mFormData.endArray(); + ++it) + { + if ((*it)["name"].asString() == element_name) + { + return (*it)["enabled"].asBoolean(); + } + } + + return false; +} + +void LLNotificationForm::setElementEnabled(const std::string& element_name, bool enabled) +{ + for (LLSD::array_iterator it = mFormData.beginArray(); + it != mFormData.endArray(); + ++it) + { + if ((*it)["name"].asString() == element_name) + { + (*it)["enabled"] = enabled; + } + } +} + + +void LLNotificationForm::addElement(const std::string& type, const std::string& name, const LLSD& value, bool enabled) { LLSD element; element["type"] = type; @@ -319,6 +328,7 @@ void LLNotificationForm::addElement(const std::string& type, const std::string& element["text"] = name; element["value"] = value; element["index"] = mFormData.size(); + element["enabled"] = enabled; mFormData.append(element); } @@ -408,14 +418,19 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par mURLOption(p.url.option), mURLTarget(p.url.target), mUnique(p.unique.isProvided()), + mCombineBehavior(p.unique.combine), mPriority(p.priority), mPersist(p.persist), - mDefaultFunctor(p.functor.isProvided() ? p.functor() : p.name()) + mDefaultFunctor(p.functor.isProvided() ? p.functor() : p.name()), + mLogToChat(p.log_to_chat), + mLogToIM(p.log_to_im), + mShowToast(p.show_toast), + mSoundName("") { if (p.sound.isProvided() && LLUI::sSettingGroups["config"]->controlExists(p.sound)) { - mSoundEffect = LLUUID(LLUI::sSettingGroups["config"]->getString(p.sound)); + mSoundName = p.sound; } BOOST_FOREACH(const LLNotificationTemplate::UniquenessContext& context, p.unique.contexts) @@ -460,18 +475,20 @@ LLNotificationVisibilityRule::LLNotificationVisibilityRule(const LLNotificationV } } -LLNotification::LLNotification(const LLNotification::Params& p) : +LLNotification::LLNotification(const LLSDParamAdapter<Params>& p) : mTimestamp(p.time_stamp), mSubstitutions(p.substitutions), mPayload(p.payload), - mExpiresAt(0), + mExpiresAt(p.expiry), mTemporaryResponder(false), mRespondedTo(false), mPriority(p.priority), mCancelled(false), mIgnored(false), mResponderObj(NULL), - mIsReusable(false) + mId(p.id.isProvided() ? p.id : LLUUID::generateNewID()), + mOfferFromAgent(p.offer_from_agent), + mIsDND(p.is_dnd) { if (p.functor.name.isChosen()) { @@ -494,52 +511,52 @@ LLNotification::LLNotification(const LLNotification::Params& p) : mResponderObj = p.responder; } - mId.generate(); init(p.name, p.form_elements); } -LLNotification::LLNotification(const LLSD& sd) : - mTemporaryResponder(false), - mRespondedTo(false), - mCancelled(false), - mIgnored(false), - mResponderObj(NULL), - mIsReusable(false) -{ - mId.generate(); - mSubstitutions = sd["substitutions"]; - mPayload = sd["payload"]; - mTimestamp = sd["time"]; - mExpiresAt = sd["expiry"]; - mPriority = (ENotificationPriority)sd["priority"].asInteger(); - mResponseFunctorName = sd["responseFunctor"].asString(); - std::string templatename = sd["name"].asString(); - init(templatename, LLSD()); - // replace form with serialized version - mForm = LLNotificationFormPtr(new LLNotificationForm(sd["form"])); -} - - -LLSD LLNotification::asLLSD() +LLSD LLNotification::asLLSD(bool excludeTemplateElements) { - LLSD output; - output["id"] = mId; - output["name"] = mTemplatep->mName; - output["form"] = getForm()->asLLSD(); - output["substitutions"] = mSubstitutions; - output["payload"] = mPayload; - output["time"] = mTimestamp; - output["expiry"] = mExpiresAt; - output["priority"] = (S32)mPriority; - output["responseFunctor"] = mResponseFunctorName; - output["reusable"] = mIsReusable; + LLParamSDParser parser; - if(mResponder) - { - output["responder"] = mResponder->asLLSD(); + Params p; + p.id = mId; + p.name = mTemplatep->mName; + p.substitutions = mSubstitutions; + p.payload = mPayload; + p.time_stamp = mTimestamp; + p.expiry = mExpiresAt; + p.priority = mPriority; + + LLNotificationFormPtr templateForm = mTemplatep->mForm; + LLSD formElements = mForm->asLLSD(); + + //All form elements (dynamic or not) + if(!excludeTemplateElements) + { + p.form_elements = formElements; + } + //Only dynamic form elements (exclude template elements) + else if(templateForm->getNumElements() < formElements.size()) + { + LLSD dynamicElements; + //Offset to dynamic elements and store them + mForm->getElements(dynamicElements, templateForm->getNumElements()); + p.form_elements = dynamicElements; + } + + if(mResponder) + { + p.functor.responder_sd = mResponder->asLLSD(); + } + + if(!mResponseFunctorName.empty()) + { + p.functor.name = mResponseFunctorName; } + LLSD output; + parser.writeSD(output, p); return output; } @@ -569,7 +586,6 @@ void LLNotification::updateFrom(LLNotificationPtr other) mRespondedTo = other->mRespondedTo; mResponse = other->mResponse; mTemporaryResponder = other->mTemporaryResponder; - mIsReusable = other->isReusable(); update(); } @@ -668,7 +684,7 @@ void LLNotification::respond(const LLSD& response) return; } - if (mTemporaryResponder && !isReusable()) + if (mTemporaryResponder) { LLNotificationFunctorRegistry::instance().unregisterFunctor(mResponseFunctorName); mResponseFunctorName = ""; @@ -829,7 +845,7 @@ void LLNotification::init(const std::string& template_name, const LLSD& form_ele //mSubstitutions["_ARGS"] = get_all_arguments_as_text(mSubstitutions); mForm = LLNotificationFormPtr(new LLNotificationForm(*mTemplatep->mForm)); - mForm->append(form_elements); + mForm->append(form_elements); // apply substitution to form labels mForm->formatElements(mSubstitutions); @@ -897,6 +913,49 @@ std::string LLNotification::getURL() const return (mTemplatep ? url : ""); } +bool LLNotification::canLogToChat() const +{ + return mTemplatep->mLogToChat; +} + +bool LLNotification::canLogToIM() const +{ + return mTemplatep->mLogToIM; +} + +bool LLNotification::canShowToast() const +{ + return mTemplatep->mShowToast; +} + +bool LLNotification::hasFormElements() const +{ + return mTemplatep->mForm->getNumElements() != 0; +} + +void LLNotification::playSound() +{ + make_ui_sound(mTemplatep->mSoundName.c_str()); +} + +LLNotification::ECombineBehavior LLNotification::getCombineBehavior() const +{ + return mTemplatep->mCombineBehavior; +} + +void LLNotification::updateForm( const LLNotificationFormPtr& form ) +{ + mForm = form; +} + +void LLNotification::repost() +{ + mRespondedTo = false; + LLNotifications::instance().update(shared_from_this()); +} + + + // ========================================================= // LLNotificationChannel implementation // --- @@ -957,7 +1016,7 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt std::string cmd = payload["sigtype"]; LLNotificationSet::iterator foundItem = mItems.find(pNotification); bool wasFound = (foundItem != mItems.end()); - bool passesFilter = mFilter(pNotification); + bool passesFilter = mFilter ? mFilter(pNotification) : true; // first, we offer the result of the filter test to the simple // signals for pass/fail. One of these is guaranteed to be called. @@ -966,10 +1025,12 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt bool abortProcessing = false; if (passesFilter) { + onFilterPass(pNotification); abortProcessing = mPassedFilter(payload); } else { + onFilterFail(pNotification); abortProcessing = mFailedFilter(payload); } @@ -987,8 +1048,8 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt { // not in our list, add it and say so mItems.insert(pNotification); - abortProcessing = mChanged(payload); onLoad(pNotification); + abortProcessing = mChanged(payload); } } else if (cmd == "change") @@ -1003,18 +1064,18 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt { // it already existed, so this is a change // since it changed in place, all we have to do is resend the signal - abortProcessing = mChanged(payload); onChange(pNotification); + abortProcessing = mChanged(payload); } else { // not in our list, add it and say so mItems.insert(pNotification); + onChange(pNotification); // our payload is const, so make a copy before changing it LLSD newpayload = payload; newpayload["sigtype"] = "add"; abortProcessing = mChanged(newpayload); - onChange(pNotification); } } else @@ -1023,11 +1084,11 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt { // it already existed, so this is a delete mItems.erase(pNotification); + onChange(pNotification); // our payload is const, so make a copy before changing it LLSD newpayload = payload; newpayload["sigtype"] = "delete"; abortProcessing = mChanged(newpayload); - onChange(pNotification); } // didn't pass, not on our list, do nothing } @@ -1041,8 +1102,8 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt { // not in our list, add it and say so mItems.insert(pNotification); - abortProcessing = mChanged(payload); onAdd(pNotification); + abortProcessing = mChanged(payload); } } else if (cmd == "delete") @@ -1050,65 +1111,35 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt // if we have it in our list, pass on the delete, then delete it, else do nothing if (wasFound) { + onDelete(pNotification); abortProcessing = mChanged(payload); - // do not delete the notification to make LLChatHistory::appendMessage add notification panel to IM window - if( ! pNotification->isReusable() ) - { - mItems.erase(pNotification); - onDelete(pNotification); - } + mItems.erase(pNotification); } } return abortProcessing; } -/* static */ -LLNotificationChannelPtr LLNotificationChannel::buildChannel(const std::string& name, - const std::string& parent, - LLNotificationFilter filter, - LLNotificationComparator comparator) +LLNotificationChannel::LLNotificationChannel(const Params& p) +: LLNotificationChannelBase(p.filter()), + LLInstanceTracker<LLNotificationChannel, std::string>(p.name.isProvided() ? p.name : LLUUID::generateNewID().asString()), + mName(p.name.isProvided() ? p.name : LLUUID::generateNewID().asString()) +{ + BOOST_FOREACH(const std::string& source, p.sources) { - // note: this is not a leak; notifications are self-registering. - // This factory helps to prevent excess deletions by making sure all smart - // pointers to notification channels come from the same source - new LLNotificationChannel(name, parent, filter, comparator); - return LLNotifications::instance().getChannel(name); + connectToChannel(source); + } } LLNotificationChannel::LLNotificationChannel(const std::string& name, const std::string& parent, - LLNotificationFilter filter, - LLNotificationComparator comparator) : -LLNotificationChannelBase(filter, comparator), -mName(name), -mParent(parent) -{ - // store myself in the channel map - LLNotifications::instance().addChannel(LLNotificationChannelPtr(this)); + LLNotificationFilter filter) +: LLNotificationChannelBase(filter), + LLInstanceTracker<LLNotificationChannel, std::string>(name), + mName(name) +{ // bind to notification broadcast - if (parent.empty()) - { - LLNotifications::instance().connectChanged( - boost::bind(&LLNotificationChannelBase::updateItem, this, _1)); - } - else - { - LLNotificationChannelPtr p = LLNotifications::instance().getChannel(parent); - p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1)); - } -} - - -void LLNotificationChannel::setComparator(LLNotificationComparator comparator) -{ - mComparator = comparator; - LLNotificationSet s2(mComparator); - s2.insert(mItems.begin(), mItems.end()); - mItems.swap(s2); - - // notify clients that we've been resorted - mChanged(LLSD().with("sigtype", "sort")); + connectToChannel(parent); } bool LLNotificationChannel::isEmpty() const @@ -1116,6 +1147,11 @@ bool LLNotificationChannel::isEmpty() const return mItems.empty(); } +S32 LLNotificationChannel::size() const +{ + return mItems.size(); +} + LLNotificationChannel::Iterator LLNotificationChannel::begin() { return mItems.begin(); @@ -1126,6 +1162,11 @@ LLNotificationChannel::Iterator LLNotificationChannel::end() return mItems.end(); } +size_t LLNotificationChannel::size() +{ + return mItems.size(); +} + std::string LLNotificationChannel::summarize() { std::string s("Channel '"); @@ -1139,22 +1180,33 @@ std::string LLNotificationChannel::summarize() return s; } +void LLNotificationChannel::connectToChannel( const std::string& channel_name ) +{ + if (channel_name.empty()) + { + LLNotifications::instance().connectChanged( + boost::bind(&LLNotificationChannelBase::updateItem, this, _1)); + } + else + { + LLNotificationChannelPtr p = LLNotifications::instance().getChannel(channel_name); + p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1)); + } +} // --- // END OF LLNotificationChannel implementation // ========================================================= -// ========================================================= +// ============================================== =========== // LLNotifications implementation // --- -LLNotifications::LLNotifications() : LLNotificationChannelBase(LLNotificationFilters::includeEverything, - LLNotificationComparators::orderByUUID()), - mIgnoreAllNotifications(false) +LLNotifications::LLNotifications() +: LLNotificationChannelBase(LLNotificationFilters::includeEverything), + mIgnoreAllNotifications(false) { LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Notification.Show", boost::bind(&LLNotifications::addFromCallback, this, _2)); - - mListener.reset(new LLNotificationsListener(*this)); } @@ -1191,7 +1243,15 @@ bool LLNotifications::uniqueFilter(LLNotificationPtr pNotif) if (pNotif != existing_notification && pNotif->isEquivalentTo(existing_notification)) { - return false; + if (pNotif->getCombineBehavior() == LLNotification::CANCEL_OLD) + { + cancel(existing_notification); + return true; + } + else + { + return false; + } } } @@ -1231,43 +1291,43 @@ bool LLNotifications::failedUniquenessTest(const LLSD& payload) return false; } - // Update the existing unique notification with the data from this particular instance... - // This guarantees that duplicate notifications will be collapsed to the one - // most recently triggered - for (LLNotificationMap::iterator existing_it = mUniqueNotifications.find(pNotif->getName()); - existing_it != mUniqueNotifications.end(); - ++existing_it) + switch(pNotif->getCombineBehavior()) { - LLNotificationPtr existing_notification = existing_it->second; - if (pNotif != existing_notification - && pNotif->isEquivalentTo(existing_notification)) + case LLNotification::REPLACE_WITH_NEW: + // Update the existing unique notification with the data from this particular instance... + // This guarantees that duplicate notifications will be collapsed to the one + // most recently triggered + for (LLNotificationMap::iterator existing_it = mUniqueNotifications.find(pNotif->getName()); + existing_it != mUniqueNotifications.end(); + ++existing_it) { - // copy notification instance data over to oldest instance - // of this unique notification and update it - existing_notification->updateFrom(pNotif); - // then delete the new one - cancel(pNotif); + LLNotificationPtr existing_notification = existing_it->second; + if (pNotif != existing_notification + && pNotif->isEquivalentTo(existing_notification)) + { + // copy notification instance data over to oldest instance + // of this unique notification and update it + existing_notification->updateFrom(pNotif); + // then delete the new one + cancel(pNotif); + } } + break; + case LLNotification::KEEP_OLD: + break; + case LLNotification::CANCEL_OLD: + // already handled by filter logic + break; + default: + break; } return false; } - -void LLNotifications::addChannel(LLNotificationChannelPtr pChan) -{ - mChannels[pChan->getName()] = pChan; -} - LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelName) { - ChannelMap::iterator p = mChannels.find(channelName); - if(p == mChannels.end()) - { - llerrs << "Did not find channel named " << channelName << llendl; - return LLNotificationChannelPtr(); - } - return p->second; + return LLNotificationChannelPtr(LLNotificationChannel::getInstance(channelName)); } @@ -1283,24 +1343,21 @@ void LLNotifications::createDefaultChannels() { // now construct the various channels AFTER loading the notifications, // because the history channel is going to rewrite the stored notifications file - LLNotificationChannel::buildChannel("Enabled", "", - !boost::bind(&LLNotifications::getIgnoreAllNotifications, this)); - LLNotificationChannel::buildChannel("Expiration", "Enabled", - boost::bind(&LLNotifications::expirationFilter, this, _1)); - LLNotificationChannel::buildChannel("Unexpired", "Enabled", - !boost::bind(&LLNotifications::expirationFilter, this, _1)); // use negated bind - LLNotificationChannel::buildChannel("Unique", "Unexpired", - boost::bind(&LLNotifications::uniqueFilter, this, _1)); - LLNotificationChannel::buildChannel("Ignore", "Unique", - filterIgnoredNotifications); - LLNotificationChannel::buildChannel("VisibilityRules", "Ignore", - boost::bind(&LLNotifications::isVisibleByRules, this, _1)); - LLNotificationChannel::buildChannel("Visible", "VisibilityRules", - &LLNotificationFilters::includeEverything); - - // create special persistent notification channel - // this isn't a leak, don't worry about the empty "new" - new LLPersistentNotificationChannel(); + mDefaultChannels.push_back(new LLNotificationChannel("Enabled", "", + !boost::bind(&LLNotifications::getIgnoreAllNotifications, this))); + mDefaultChannels.push_back(new LLNotificationChannel("Expiration", "Enabled", + boost::bind(&LLNotifications::expirationFilter, this, _1))); + mDefaultChannels.push_back(new LLNotificationChannel("Unexpired", "Enabled", + !boost::bind(&LLNotifications::expirationFilter, this, _1))); // use negated bind + mDefaultChannels.push_back(new LLNotificationChannel("Unique", "Unexpired", + boost::bind(&LLNotifications::uniqueFilter, this, _1))); + mDefaultChannels.push_back(new LLNotificationChannel("Ignore", "Unique", + filterIgnoredNotifications)); + mDefaultChannels.push_back(new LLNotificationChannel("VisibilityRules", "Ignore", + boost::bind(&LLNotifications::isVisibleByRules, this, _1))); + mDefaultChannels.push_back(new LLNotificationChannel("Visible", "VisibilityRules", + &LLNotificationFilters::includeEverything)); + mDefaultChannels.push_back(new LLPersistentNotificationChannel()); // connect action methods to these channels LLNotifications::instance().getChannel("Enabled")-> @@ -1424,25 +1481,19 @@ void addPathIfExists(const std::string& new_path, std::vector<std::string>& path bool LLNotifications::loadTemplates() { llinfos << "Reading notifications template" << llendl; - std::vector<std::string> search_paths; - - std::string skin_relative_path = gDirUtilp->getDirDelimiter() + LLUI::getSkinPath() + gDirUtilp->getDirDelimiter() + "notifications.xml"; - std::string localized_skin_relative_path = gDirUtilp->getDirDelimiter() + LLUI::getLocalizedSkinPath() + gDirUtilp->getDirDelimiter() + "notifications.xml"; - - addPathIfExists(gDirUtilp->getDefaultSkinDir() + skin_relative_path, search_paths); - addPathIfExists(gDirUtilp->getDefaultSkinDir() + localized_skin_relative_path, search_paths); - addPathIfExists(gDirUtilp->getSkinDir() + skin_relative_path, search_paths); - addPathIfExists(gDirUtilp->getSkinDir() + localized_skin_relative_path, search_paths); - addPathIfExists(gDirUtilp->getUserSkinDir() + skin_relative_path, search_paths); - addPathIfExists(gDirUtilp->getUserSkinDir() + localized_skin_relative_path, search_paths); + // Passing findSkinnedFilenames(constraint=LLDir::ALL_SKINS) makes it + // output all relevant pathnames instead of just the ones from the most + // specific skin. + std::vector<std::string> search_paths = + gDirUtilp->findSkinnedFilenames(LLDir::XUI, "notifications.xml", LLDir::ALL_SKINS); std::string base_filename = search_paths.front(); LLXMLNodePtr root; BOOL success = LLXMLNode::getLayeredXMLNode(root, search_paths); - + if (!success || root.isNull() || !root->hasName( "notifications" )) { - llerrs << "Problem reading UI Notifications file: " << base_filename << llendl; + llerrs << "Problem reading XML from UI Notifications file: " << base_filename << llendl; return false; } @@ -1452,7 +1503,7 @@ bool LLNotifications::loadTemplates() if(!params.validateBlock()) { - llerrs << "Problem reading UI Notifications file: " << base_filename << llendl; + llerrs << "Problem reading XUI from UI Notifications file: " << base_filename << llendl; return false; } @@ -1508,7 +1559,9 @@ bool LLNotifications::loadTemplates() bool LLNotifications::loadVisibilityRules() { const std::string xml_filename = "notification_visibility.xml"; - std::string full_filename = gDirUtilp->findSkinnedFilename(LLUI::getXUIPaths().front(), xml_filename); + // Note that here we're looking for the "en" version, the default + // language, rather than the most localized version of this file. + std::string full_filename = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, xml_filename); LLNotificationVisibilityRule::Rules params; LLSimpleXUIParser parser; @@ -1536,34 +1589,32 @@ void LLNotifications::addFromCallback(const LLSD& name) add(name.asString(), LLSD(), LLSD()); } -LLNotificationPtr LLNotifications::add(const std::string& name, - const LLSD& substitutions, - const LLSD& payload) +LLNotificationPtr LLNotifications::add(const std::string& name, const LLSD& substitutions, const LLSD& payload) { LLNotification::Params::Functor functor_p; functor_p.name = name; return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p)); } -LLNotificationPtr LLNotifications::add(const std::string& name, - const LLSD& substitutions, - const LLSD& payload, - const std::string& functor_name) +LLNotificationPtr LLNotifications::add(const std::string& name, const LLSD& substitutions, const LLSD& payload, const std::string& functor_name) { LLNotification::Params::Functor functor_p; functor_p.name = functor_name; - return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p)); + return add(LLNotification::Params().name(name) + .substitutions(substitutions) + .payload(payload) + .functor(functor_p)); } //virtual -LLNotificationPtr LLNotifications::add(const std::string& name, - const LLSD& substitutions, - const LLSD& payload, - LLNotificationFunctorRegistry::ResponseFunctor functor) +LLNotificationPtr LLNotifications::add(const std::string& name, const LLSD& substitutions, const LLSD& payload, LLNotificationFunctorRegistry::ResponseFunctor functor) { LLNotification::Params::Functor functor_p; functor_p.function = functor; - return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p)); + return add(LLNotification::Params().name(name) + .substitutions(substitutions) + .payload(payload) + .functor(functor_p)); } // generalized add function that takes a parameter block object for more complex instantiations @@ -1594,12 +1645,11 @@ void LLNotifications::cancel(LLNotificationPtr pNotif) if (pNotif == NULL || pNotif->isCancelled()) return; LLNotificationSet::iterator it=mItems.find(pNotif); - if (it == mItems.end()) + if (it != mItems.end()) { - llerrs << "Attempted to delete nonexistent notification " << pNotif->getName() << llendl; + pNotif->cancel(); + updateItem(LLSD().with("sigtype", "delete").with("id", pNotif->id()), pNotif); } - pNotif->cancel(); - updateItem(LLSD().with("sigtype", "delete").with("id", pNotif->id()), pNotif); } void LLNotifications::cancelByName(const std::string& name) @@ -1638,7 +1688,7 @@ void LLNotifications::update(const LLNotificationPtr pNotif) LLNotificationPtr LLNotifications::find(LLUUID uuid) { - LLNotificationPtr target = LLNotificationPtr(new LLNotification(uuid)); + LLNotificationPtr target = LLNotificationPtr(new LLNotification(LLNotification::Params().id(uuid))); LLNotificationSet::iterator it=mItems.find(target); if (it == mItems.end()) { @@ -1777,22 +1827,18 @@ std::ostream& operator<<(std::ostream& s, const LLNotification& notification) return s; } -//static -void LLPostponedNotification::lookupName(LLPostponedNotification* thiz, - const LLUUID& id, +void LLPostponedNotification::lookupName(const LLUUID& id, bool is_group) { if (is_group) { gCacheName->getGroup(id, boost::bind(&LLPostponedNotification::onGroupNameCache, - thiz, _1, _2, _3)); + this, _1, _2, _3)); } else { - LLAvatarNameCache::get(id, - boost::bind(&LLPostponedNotification::onAvatarNameCache, - thiz, _1, _2)); + fetchAvatarName(id); } } @@ -1803,9 +1849,24 @@ void LLPostponedNotification::onGroupNameCache(const LLUUID& id, finalizeName(full_name); } +void LLPostponedNotification::fetchAvatarName(const LLUUID& id) +{ + if (id.notNull()) + { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + + mAvatarNameCacheConnection = LLAvatarNameCache::get(id, boost::bind(&LLPostponedNotification::onAvatarNameCache, this, _1, _2)); + } +} + void LLPostponedNotification::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) { + mAvatarNameCacheConnection.disconnect(); + std::string name = av_name.getCompleteName(); // from PE merge - we should figure out if this is the right thing to do diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 4ae02b943f..87573c2a56 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -87,17 +87,16 @@ #include <boost/shared_ptr.hpp> #include <boost/enable_shared_from_this.hpp> #include <boost/type_traits.hpp> +#include <boost/signals2.hpp> -// we want to minimize external dependencies, but this one is important -#include "llsd.h" - -// and we need this to manage the notification callbacks #include "llevents.h" #include "llfunctorregistry.h" -#include "llpointer.h" #include "llinitparam.h" -#include "llnotificationslistener.h" +#include "llmortician.h" #include "llnotificationptr.h" +#include "llpointer.h" +#include "llrefcount.h" +#include "llsdparam.h" class LLAvatarName; typedef enum e_notification_priority @@ -164,6 +163,7 @@ public: struct FormElementBase : public LLInitParam::Block<FormElementBase> { Optional<std::string> name; + Optional<bool> enabled; FormElementBase(); }; @@ -233,16 +233,21 @@ public: } EIgnoreType; LLNotificationForm(); + LLNotificationForm(const LLNotificationForm&); LLNotificationForm(const LLSD& sd); LLNotificationForm(const std::string& name, const Params& p); + void fromLLSD(const LLSD& sd); LLSD asLLSD() const; S32 getNumElements() { return mFormData.size(); } LLSD getElement(S32 index) { return mFormData.get(index); } LLSD getElement(const std::string& element_name); - bool hasElement(const std::string& element_name); - void addElement(const std::string& type, const std::string& name, const LLSD& value = LLSD()); + void getElements(LLSD& elements, S32 offset = 0); + bool hasElement(const std::string& element_name) const; + bool getElementEnabled(const std::string& element_name) const; + void setElementEnabled(const std::string& element_name, bool enabled); + void addElement(const std::string& type, const std::string& name, const LLSD& value = LLSD(), bool enabled = true); void formatElements(const LLSD& substitutions); // appends form elements from another form serialized as LLSD void append(const LLSD& sub_form); @@ -296,42 +301,52 @@ LOG_CLASS(LLNotification); friend class LLNotifications; public: + // parameter object used to instantiate a new notification struct Params : public LLInitParam::Block<Params> { friend class LLNotification; Mandatory<std::string> name; - - // optional - Optional<LLSD> substitutions; - Optional<LLSD> payload; + Optional<LLUUID> id; + Optional<LLSD> substitutions, + form_elements, + payload; Optional<ENotificationPriority, NotificationPriorityValues> priority; - Optional<LLSD> form_elements; - Optional<LLDate> time_stamp; + Optional<LLDate> time_stamp, + expiry; Optional<LLNotificationContext*> context; Optional<void*> responder; + Optional<bool> offer_from_agent; + Optional<bool> is_dnd; struct Functor : public LLInitParam::ChoiceBlock<Functor> { Alternative<std::string> name; Alternative<LLNotificationFunctorRegistry::ResponseFunctor> function; Alternative<LLNotificationResponderPtr> responder; + Alternative<LLSD> responder_sd; Functor() - : name("functor_name"), + : name("responseFunctor"), function("functor"), - responder("responder") + responder("responder"), + responder_sd("responder_sd") {} }; Optional<Functor> functor; Params() : name("name"), + id("id"), priority("priority", NOTIFICATION_PRIORITY_UNSPECIFIED), - time_stamp("time_stamp"), + time_stamp("time"), payload("payload"), - form_elements("form_elements") + form_elements("form"), + substitutions("substitutions"), + expiry("expiry"), + offer_from_agent("offer_from_agent", false), + is_dnd("is_dnd", false) { time_stamp = LLDate::now(); responder = NULL; @@ -340,9 +355,13 @@ public: Params(const std::string& _name) : name("name"), priority("priority", NOTIFICATION_PRIORITY_UNSPECIFIED), - time_stamp("time_stamp"), + time_stamp("time"), payload("payload"), - form_elements("form_elements") + form_elements("form"), + substitutions("substitutions"), + expiry("expiry"), + offer_from_agent("offer_from_agent", false), + is_dnd("is_dnd", false) { functor.name = _name; name = _name; @@ -355,7 +374,7 @@ public: private: - LLUUID mId; + const LLUUID mId; LLSD mPayload; LLSD mSubstitutions; LLDate mTimestamp; @@ -367,8 +386,9 @@ private: ENotificationPriority mPriority; LLNotificationFormPtr mForm; void* mResponderObj; // TODO - refactor/remove this field - bool mIsReusable; LLNotificationResponderPtr mResponder; + bool mOfferFromAgent; + bool mIsDND; // a reference to the template LLNotificationTemplatePtr mTemplatep; @@ -392,18 +412,10 @@ private: void init(const std::string& template_name, const LLSD& form_elements); - LLNotification(const Params& p); - - // this is just for making it easy to look things up in a set organized by UUID -- DON'T USE IT - // for anything real! - LLNotification(LLUUID uuid) : mId(uuid), mCancelled(false), mRespondedTo(false), mIgnored(false), mPriority(NOTIFICATION_PRIORITY_UNSPECIFIED), mTemporaryResponder(false) {} - void cancel(); public: - - // constructor from a saved notification - LLNotification(const LLSD& sd); + LLNotification(const LLSDParamAdapter<Params>& p); void setResponseFunctor(std::string const &responseFunctorName); @@ -446,7 +458,12 @@ public: // ["time"] = time at which notification was generated; // ["expiry"] = time at which notification expires; // ["responseFunctor"] = name of registered functor that handles responses to notification; - LLSD asLLSD(); + LLSD asLLSD(bool excludeTemplateElements = false); + + const LLNotificationFormPtr getForm(); + void updateForm(const LLNotificationFormPtr& form); + + void repost(); void respond(const LLSD& sd); void respondWithDefault(); @@ -507,6 +524,21 @@ public: return mTimestamp; } + bool getOfferFromAgent() const + { + return mOfferFromAgent; + } + + bool isDND() const + { + return mIsDND; + } + + void setDND(const bool flag) + { + mIsDND = flag; + } + std::string getType() const; std::string getMessage() const; std::string getFooter() const; @@ -514,8 +546,21 @@ public: std::string getURL() const; S32 getURLOption() const; S32 getURLOpenExternally() const; + bool canLogToChat() const; + bool canLogToIM() const; + bool canShowToast() const; + bool hasFormElements() const; + void playSound(); + + typedef enum e_combine_behavior + { + REPLACE_WITH_NEW, + KEEP_OLD, + CANCEL_OLD + + } ECombineBehavior; - const LLNotificationFormPtr getForm(); + ECombineBehavior getCombineBehavior() const; const LLDate getExpiration() const { @@ -532,10 +577,6 @@ public: return mId; } - bool isReusable() { return mIsReusable; } - - void setReusable(bool reusable) { mIsReusable = reusable; } - // comparing two notifications normally means comparing them by UUID (so we can look them // up quickly this way) bool operator<(const LLNotification& rhs) const @@ -647,44 +688,17 @@ namespace LLNotificationFilters namespace LLNotificationComparators { - typedef enum e_direction { ORDER_DECREASING, ORDER_INCREASING } EDirection; - - // generic order functor that takes method or member variable reference - template<typename T> - struct orderBy + struct orderByUUID { - typedef boost::function<T (LLNotificationPtr)> field_t; - orderBy(field_t field, EDirection direction = ORDER_INCREASING) : mField(field), mDirection(direction) {} bool operator()(LLNotificationPtr lhs, LLNotificationPtr rhs) { - if (mDirection == ORDER_DECREASING) - { - return mField(lhs) > mField(rhs); - } - else - { - return mField(lhs) < mField(rhs); - } + return lhs->id() < rhs->id(); } - - field_t mField; - EDirection mDirection; - }; - - struct orderByUUID : public orderBy<const LLUUID&> - { - orderByUUID(EDirection direction = ORDER_INCREASING) : orderBy<const LLUUID&>(&LLNotification::id, direction) {} - }; - - struct orderByDate : public orderBy<const LLDate&> - { - orderByDate(EDirection direction = ORDER_INCREASING) : orderBy<const LLDate&>(&LLNotification::getDate, direction) {} }; }; typedef boost::function<bool (LLNotificationPtr)> LLNotificationFilter; -typedef boost::function<bool (LLNotificationPtr, LLNotificationPtr)> LLNotificationComparator; -typedef std::set<LLNotificationPtr, LLNotificationComparator> LLNotificationSet; +typedef std::set<LLNotificationPtr, LLNotificationComparators::orderByUUID> LLNotificationSet; typedef std::multimap<std::string, LLNotificationPtr> LLNotificationMap; // ======================================================== @@ -705,12 +719,14 @@ typedef std::multimap<std::string, LLNotificationPtr> LLNotificationMap; // all of the built-in tests should attach to the "Visible" channel // class LLNotificationChannelBase : - public LLEventTrackable + public LLEventTrackable, + public LLRefCount { LOG_CLASS(LLNotificationChannelBase); public: - LLNotificationChannelBase(LLNotificationFilter filter, LLNotificationComparator comp) : - mFilter(filter), mItems(comp) + LLNotificationChannelBase(LLNotificationFilter filter) + : mFilter(filter), + mItems() {} virtual ~LLNotificationChannelBase() {} // you can also connect to a Channel, so you can be notified of @@ -776,6 +792,9 @@ protected: virtual void onDelete(LLNotificationPtr p) {} virtual void onChange(LLNotificationPtr p) {} + virtual void onFilterPass(LLNotificationPtr p) {} + virtual void onFilterFail(LLNotificationPtr p) {} + bool updateItem(const LLSD& payload, LLNotificationPtr pNotification); LLNotificationFilter mFilter; }; @@ -785,63 +804,53 @@ protected: // destroy it, but if it becomes necessary to do so, the shared_ptr model // will ensure that we don't leak resources. class LLNotificationChannel; -typedef boost::shared_ptr<LLNotificationChannel> LLNotificationChannelPtr; +typedef boost::intrusive_ptr<LLNotificationChannel> LLNotificationChannelPtr; // manages a list of notifications // Note that if this is ever copied around, we might find ourselves with multiple copies // of a queue with notifications being added to different nonequivalent copies. So we -// make it inherit from boost::noncopyable, and then create a map of shared_ptr to manage it. -// -// NOTE: LLNotificationChannel is self-registering. The *correct* way to create one is to -// do something like: -// LLNotificationChannel::buildChannel("name", "parent"...); -// This returns an LLNotificationChannelPtr, which you can store, or -// you can then retrieve the channel by using the registry: -// LLNotifications::instance().getChannel("name")... +// make it inherit from boost::noncopyable, and then create a map of LLPointer to manage it. // class LLNotificationChannel : boost::noncopyable, - public LLNotificationChannelBase + public LLNotificationChannelBase, + public LLInstanceTracker<LLNotificationChannel, std::string> { LOG_CLASS(LLNotificationChannel); public: + // Notification Channels have a filter, which determines which notifications + // will be added to this channel. + // Channel filters cannot change. + struct Params : public LLInitParam::Block<Params> + { + Mandatory<std::string> name; + Optional<LLNotificationFilter> filter; + Multiple<std::string> sources; + }; + + LLNotificationChannel(const Params& p = Params()); + LLNotificationChannel(const std::string& name, const std::string& parent, LLNotificationFilter filter); + virtual ~LLNotificationChannel() {} typedef LLNotificationSet::iterator Iterator; std::string getName() const { return mName; } - std::string getParentChannelName() { return mParent; } + + void connectToChannel(const std::string& channel_name); bool isEmpty() const; + S32 size() const; Iterator begin(); Iterator end(); + size_t size(); - // Channels have a comparator to control sort order; - // the default sorts by arrival date - void setComparator(LLNotificationComparator comparator); - std::string summarize(); - // factory method for constructing these channels; since they're self-registering, - // we want to make sure that you can't use new to make them - static LLNotificationChannelPtr buildChannel(const std::string& name, const std::string& parent, - LLNotificationFilter filter=LLNotificationFilters::includeEverything, - LLNotificationComparator comparator=LLNotificationComparators::orderByUUID()); - -protected: - // Notification Channels have a filter, which determines which notifications - // will be added to this channel. - // Channel filters cannot change. - // Channels have a protected constructor so you can't make smart pointers that don't - // come from our internal reference; call NotificationChannel::build(args) - LLNotificationChannel(const std::string& name, const std::string& parent, - LLNotificationFilter filter, LLNotificationComparator comparator); - private: std::string mName; std::string mParent; - LLNotificationComparator mComparator; }; // An interface class to provide a clean linker seam to the LLNotifications class. @@ -924,10 +933,6 @@ public: void createDefaultChannels(); - typedef std::map<std::string, LLNotificationChannelPtr> ChannelMap; - ChannelMap mChannels; - - void addChannel(LLNotificationChannelPtr pChan); LLNotificationChannelPtr getChannel(const std::string& channelName); std::string getGlobalString(const std::string& key) const; @@ -965,7 +970,7 @@ private: bool mIgnoreAllNotifications; - boost::scoped_ptr<LLNotificationsListener> mListener; + std::vector<LLNotificationChannelPtr> mDefaultChannels; }; /** @@ -978,7 +983,7 @@ private: * 1 create class derived from LLPostponedNotification; * 2 call LLPostponedNotification::add method; */ -class LLPostponedNotification +class LLPostponedNotification : public LLMortician { public: /** @@ -996,26 +1001,38 @@ public: thiz->mParams = params; // Avoid header file dependency on llcachename.h - lookupName(thiz, id, is_group); + thiz->lookupName(id, is_group); } private: - static void lookupName(LLPostponedNotification* thiz, const LLUUID& id, bool is_group); + void lookupName(const LLUUID& id, bool is_group); // only used for groups void onGroupNameCache(const LLUUID& id, const std::string& full_name, bool is_group); // only used for avatars + void fetchAvatarName(const LLUUID& id); void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); // used for both group and avatar names void finalizeName(const std::string& name); void cleanup() { - delete this; + die(); } protected: - LLPostponedNotification() {} - virtual ~LLPostponedNotification() {} + LLPostponedNotification() + : mParams(), + mName(), + mAvatarNameCacheConnection() + {} + + virtual ~LLPostponedNotification() + { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + } /** * Abstract method provides possibility to modify notification parameters and @@ -1026,6 +1043,58 @@ protected: LLNotification::Params mParams; std::string mName; + boost::signals2::connection mAvatarNameCacheConnection; +}; + +// Stores only persistent notifications. +// Class users can use connectChanged() to process persistent notifications +// (see LLPersistentNotificationStorage for example). +class LLPersistentNotificationChannel : public LLNotificationChannel +{ + LOG_CLASS(LLPersistentNotificationChannel); +public: + LLPersistentNotificationChannel() + : LLNotificationChannel("Persistent", "Visible", ¬ificationFilter) + { + } + + typedef std::vector<LLNotificationPtr> history_list_t; + history_list_t::iterator beginHistory() { sortHistory(); return mHistory.begin(); } + history_list_t::iterator endHistory() { return mHistory.end(); } + +private: + + struct sortByTime + { + S32 operator ()(const LLNotificationPtr& a, const LLNotificationPtr& b) + { + return a->getDate() < b->getDate(); + } + }; + + void sortHistory() + { + std::sort(mHistory.begin(), mHistory.end(), sortByTime()); + } + + + // The channel gets all persistent notifications except those that have been canceled + static bool notificationFilter(LLNotificationPtr pNotification) + { + bool handle_notification = false; + + handle_notification = pNotification->isPersistent() + && !pNotification->isCancelled(); + + return handle_notification; + } + + void onAdd(LLNotificationPtr p) + { + mHistory.push_back(p); + } + + std::vector<LLNotificationPtr> mHistory; }; #endif//LL_LLNOTIFICATIONS_H diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp deleted file mode 100644 index 3bbeb3a778..0000000000 --- a/indra/llui/llnotificationslistener.cpp +++ /dev/null @@ -1,354 +0,0 @@ -/** - * @file llnotificationslistener.cpp - * @author Brad Kittenbrink - * @date 2009-07-08 - * @brief Implementation for llnotificationslistener. - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "linden_common.h" -#include "llnotificationslistener.h" -#include "llnotifications.h" -#include "llnotificationtemplate.h" -#include "llsd.h" -#include "llui.h" - -LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications) : - LLEventAPI("LLNotifications", - "LLNotifications listener to (e.g.) pop up a notification"), - mNotifications(notifications) -{ - add("requestAdd", - "Add a notification with specified [\"name\"], [\"substitutions\"] and [\"payload\"].\n" - "If optional [\"reply\"] specified, arrange to send user response on that LLEventPump.", - &LLNotificationsListener::requestAdd); - add("listChannels", - "Post to [\"reply\"] a map of info on existing channels", - &LLNotificationsListener::listChannels, - LLSD().with("reply", LLSD())); - add("listChannelNotifications", - "Post to [\"reply\"] an array of info on notifications in channel [\"channel\"]", - &LLNotificationsListener::listChannelNotifications, - LLSD().with("reply", LLSD()).with("channel", LLSD())); - add("respond", - "Respond to notification [\"uuid\"] with data in [\"response\"]", - &LLNotificationsListener::respond, - LLSD().with("uuid", LLSD())); - add("cancel", - "Cancel notification [\"uuid\"]", - &LLNotificationsListener::cancel, - LLSD().with("uuid", LLSD())); - add("ignore", - "Ignore future notification [\"name\"]\n" - "(from <notification name= > in notifications.xml)\n" - "according to boolean [\"ignore\"].\n" - "If [\"name\"] is omitted or undefined, [un]ignore all future notifications.\n" - "Note that ignored notifications are not forwarded unless intercepted before\n" - "the \"Ignore\" channel.", - &LLNotificationsListener::ignore); - add("forward", - "Forward to [\"pump\"] future notifications on channel [\"channel\"]\n" - "according to boolean [\"forward\"]. When enabled, only types matching\n" - "[\"types\"] are forwarded, as follows:\n" - "omitted or undefined: forward all notifications\n" - "string: forward only the specific named [sig]type\n" - "array of string: forward any notification matching any named [sig]type.\n" - "When boolean [\"respond\"] is true, we auto-respond to each forwarded\n" - "notification.", - &LLNotificationsListener::forward, - LLSD().with("channel", LLSD())); -} - -// This is here in the .cpp file so we don't need the definition of class -// Forwarder in the header file. -LLNotificationsListener::~LLNotificationsListener() -{ -} - -void LLNotificationsListener::requestAdd(const LLSD& event_data) const -{ - if(event_data.has("reply")) - { - mNotifications.add(event_data["name"], - event_data["substitutions"], - event_data["payload"], - boost::bind(&LLNotificationsListener::NotificationResponder, - this, - event_data["reply"].asString(), - _1, _2 - ) - ); - } - else - { - mNotifications.add(event_data["name"], - event_data["substitutions"], - event_data["payload"]); - } -} - -void LLNotificationsListener::NotificationResponder(const std::string& reply_pump, - const LLSD& notification, - const LLSD& response) const -{ - LLSD reponse_event; - reponse_event["notification"] = notification; - reponse_event["response"] = response; - LLEventPumps::getInstance()->obtain(reply_pump).post(reponse_event); -} - -void LLNotificationsListener::listChannels(const LLSD& params) const -{ - LLReqID reqID(params); - LLSD response(reqID.makeResponse()); - for (LLNotifications::ChannelMap::const_iterator cmi(mNotifications.mChannels.begin()), - cmend(mNotifications.mChannels.end()); - cmi != cmend; ++cmi) - { - LLSD channelInfo; - channelInfo["parent"] = cmi->second->getParentChannelName(); - response[cmi->first] = channelInfo; - } - LLEventPumps::instance().obtain(params["reply"]).post(response); -} - -void LLNotificationsListener::listChannelNotifications(const LLSD& params) const -{ - LLReqID reqID(params); - LLSD response(reqID.makeResponse()); - LLNotificationChannelPtr channel(mNotifications.getChannel(params["channel"])); - if (channel) - { - LLSD notifications(LLSD::emptyArray()); - for (LLNotificationChannel::Iterator ni(channel->begin()), nend(channel->end()); - ni != nend; ++ni) - { - notifications.append(asLLSD(*ni)); - } - response["notifications"] = notifications; - } - LLEventPumps::instance().obtain(params["reply"]).post(response); -} - -void LLNotificationsListener::respond(const LLSD& params) const -{ - LLNotificationPtr notification(mNotifications.find(params["uuid"])); - if (notification) - { - notification->respond(params["response"]); - } -} - -void LLNotificationsListener::cancel(const LLSD& params) const -{ - LLNotificationPtr notification(mNotifications.find(params["uuid"])); - if (notification) - { - mNotifications.cancel(notification); - } -} - -void LLNotificationsListener::ignore(const LLSD& params) const -{ - // Calling a method named "ignore", but omitting its "ignore" Boolean - // argument, should by default cause something to be ignored. Explicitly - // pass ["ignore"] = false to cancel ignore. - bool ignore = true; - if (params.has("ignore")) - { - ignore = params["ignore"].asBoolean(); - } - // This method can be used to affect either a single notification name or - // all future notifications. The two use substantially different mechanisms. - if (params["name"].isDefined()) - { - // ["name"] was passed: ignore just that notification - LLNotificationTemplatePtr templatep = mNotifications.getTemplate(params["name"]); - if (templatep) - { - templatep->mForm->setIgnored(ignore); - } - } - else - { - // no ["name"]: ignore all future notifications - mNotifications.setIgnoreAllNotifications(ignore); - } -} - -class LLNotificationsListener::Forwarder: public LLEventTrackable -{ - LOG_CLASS(LLNotificationsListener::Forwarder); -public: - Forwarder(LLNotifications& llnotifications, const std::string& channel): - mNotifications(llnotifications), - mRespond(false) - { - // Connect to the specified channel on construction. Because - // LLEventTrackable is a base, we should automatically disconnect when - // destroyed. - LLNotificationChannelPtr channelptr(llnotifications.getChannel(channel)); - if (channelptr) - { - // Insert our processing as a "passed filter" listener. This way - // we get to run before all the "changed" listeners, and we get to - // swipe it (hide it from the other listeners) if desired. - channelptr->connectPassedFilter(boost::bind(&Forwarder::handle, this, _1)); - } - } - - void setPumpName(const std::string& name) { mPumpName = name; } - void setTypes(const LLSD& types) { mTypes = types; } - void setRespond(bool respond) { mRespond = respond; } - -private: - bool handle(const LLSD& notification) const; - bool matchType(const LLSD& filter, const std::string& type) const; - - LLNotifications& mNotifications; - std::string mPumpName; - LLSD mTypes; - bool mRespond; -}; - -void LLNotificationsListener::forward(const LLSD& params) -{ - std::string channel(params["channel"]); - // First decide whether we're supposed to start forwarding or stop it. - // Default to true. - bool forward = true; - if (params.has("forward")) - { - forward = params["forward"].asBoolean(); - } - if (! forward) - { - // This is a request to stop forwarding notifications on the specified - // channel. The rest of the params don't matter. - // Because mForwarders contains scoped_ptrs, erasing the map entry - // DOES delete the heap Forwarder object. Because Forwarder derives - // from LLEventTrackable, destroying it disconnects it from the - // channel. - mForwarders.erase(channel); - return; - } - // From here on, we know we're being asked to start (or modify) forwarding - // on the specified channel. Find or create an appropriate Forwarder. - ForwarderMap::iterator - entry(mForwarders.insert(ForwarderMap::value_type(channel, ForwarderMap::mapped_type())).first); - if (! entry->second) - { - entry->second.reset(new Forwarder(mNotifications, channel)); - } - // Now, whether this Forwarder is brand-new or not, update it with the new - // request info. - Forwarder& fwd(*entry->second); - fwd.setPumpName(params["pump"]); - fwd.setTypes(params["types"]); - fwd.setRespond(params["respond"]); -} - -bool LLNotificationsListener::Forwarder::handle(const LLSD& notification) const -{ - LL_INFOS("LLNotificationsListener") << "handle(" << notification << ")" << LL_ENDL; - if (notification["sigtype"].asString() == "delete") - { - LL_INFOS("LLNotificationsListener") << "ignoring delete" << LL_ENDL; - // let other listeners see the "delete" operation - return false; - } - LLNotificationPtr note(mNotifications.find(notification["id"])); - if (! note) - { - LL_INFOS("LLNotificationsListener") << notification["id"] << " not found" << LL_ENDL; - return false; - } - if (! matchType(mTypes, note->getType())) - { - LL_INFOS("LLNotificationsListener") << "didn't match types " << mTypes << LL_ENDL; - // We're not supposed to intercept this particular notification. Let - // other listeners process it. - return false; - } - LL_INFOS("LLNotificationsListener") << "sending via '" << mPumpName << "'" << LL_ENDL; - // This is a notification we care about. Forward it through specified - // LLEventPump. - LLEventPumps::instance().obtain(mPumpName).post(asLLSD(note)); - // Are we also being asked to auto-respond? - if (mRespond) - { - LL_INFOS("LLNotificationsListener") << "should respond" << LL_ENDL; - note->respond(LLSD::emptyMap()); - // Did that succeed in removing the notification? Only cancel() if - // it's still around -- otherwise we get an LL_ERRS crash! - note = mNotifications.find(notification["id"]); - if (note) - { - LL_INFOS("LLNotificationsListener") << "respond() didn't clear, canceling" << LL_ENDL; - mNotifications.cancel(note); - } - } - // If we've auto-responded to this notification, then it's going to be - // deleted. Other listeners would get the change operation, try to look it - // up and be baffled by lookup failure. So when we auto-respond, suppress - // this notification: don't pass it to other listeners. - return mRespond; -} - -bool LLNotificationsListener::Forwarder::matchType(const LLSD& filter, const std::string& type) const -{ - // Decide whether this notification matches filter: - // undefined: forward all notifications - if (filter.isUndefined()) - { - return true; - } - // array of string: forward any notification matching any named type - if (filter.isArray()) - { - for (LLSD::array_const_iterator ti(filter.beginArray()), tend(filter.endArray()); - ti != tend; ++ti) - { - if (ti->asString() == type) - { - return true; - } - } - // Didn't match any entry in the array - return false; - } - // string: forward only the specific named type - return (filter.asString() == type); -} - -LLSD LLNotificationsListener::asLLSD(LLNotificationPtr note) -{ - LLSD notificationInfo(note->asLLSD()); - // For some reason the following aren't included in LLNotification::asLLSD(). - notificationInfo["summary"] = note->summarize(); - notificationInfo["id"] = note->id(); - notificationInfo["type"] = note->getType(); - notificationInfo["message"] = note->getMessage(); - notificationInfo["label"] = note->getLabel(); - return notificationInfo; -} diff --git a/indra/llui/llnotificationslistener.h b/indra/llui/llnotificationslistener.h deleted file mode 100644 index f9f7641de6..0000000000 --- a/indra/llui/llnotificationslistener.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @file llnotificationslistener.h - * @author Brad Kittenbrink - * @date 2009-07-08 - * @brief Wrap subset of LLNotifications API in event API for test scripts. - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLNOTIFICATIONSLISTENER_H -#define LL_LLNOTIFICATIONSLISTENER_H - -#include "lleventapi.h" -#include "llnotificationptr.h" -#include <boost/shared_ptr.hpp> -#include <map> -#include <string> - -class LLNotifications; -class LLSD; - -class LLNotificationsListener : public LLEventAPI -{ -public: - LLNotificationsListener(LLNotifications & notifications); - ~LLNotificationsListener(); - -private: - void requestAdd(LLSD const & event_data) const; - - void NotificationResponder(const std::string& replypump, - const LLSD& notification, - const LLSD& response) const; - - void listChannels(const LLSD& params) const; - void listChannelNotifications(const LLSD& params) const; - void respond(const LLSD& params) const; - void cancel(const LLSD& params) const; - void ignore(const LLSD& params) const; - void forward(const LLSD& params); - - static LLSD asLLSD(LLNotificationPtr); - - class Forwarder; - typedef std::map<std::string, boost::shared_ptr<Forwarder> > ForwarderMap; - ForwarderMap mForwarders; - LLNotifications & mNotifications; -}; - -#endif // LL_LLNOTIFICATIONSLISTENER_H diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h index b3b0bae862..18a82190b5 100644 --- a/indra/llui/llnotificationtemplate.h +++ b/indra/llui/llnotificationtemplate.h @@ -49,7 +49,6 @@ //#include "llfunctorregistry.h" //#include "llpointer.h" #include "llinitparam.h" -//#include "llnotificationslistener.h" //#include "llnotificationptr.h" //#include "llcachename.h" #include "llnotifications.h" @@ -61,6 +60,18 @@ typedef boost::shared_ptr<LLNotificationForm> LLNotificationFormPtr; // from the appropriate local language directory). struct LLNotificationTemplate { + struct CombineBehaviorNames + : public LLInitParam::TypeValuesHelper<LLNotification::ECombineBehavior, CombineBehaviorNames> + { + static void declareValues() + { + declare("replace_with_new", LLNotification::REPLACE_WITH_NEW); + declare("keep_old", LLNotification::KEEP_OLD); + declare("cancel_old", LLNotification::CANCEL_OLD); + } + }; + + struct GlobalString : public LLInitParam::Block<GlobalString> { Mandatory<std::string> name, @@ -94,9 +105,11 @@ struct LLNotificationTemplate Optional<LLInitParam::Flag> dummy_val; public: Multiple<UniquenessContext> contexts; + Optional<LLNotification::ECombineBehavior, CombineBehaviorNames> combine; UniquenessConstraint() : contexts("context"), + combine("combine", LLNotification::REPLACE_WITH_NEW), dummy_val("") {} }; @@ -183,7 +196,10 @@ struct LLNotificationTemplate struct Params : public LLInitParam::Block<Params> { Mandatory<std::string> name; - Optional<bool> persist; + Optional<bool> persist, + log_to_im, + show_toast, + log_to_chat; Optional<std::string> functor, icon, label, @@ -204,6 +220,9 @@ struct LLNotificationTemplate Params() : name("name"), persist("persist", false), + log_to_im("log_to_im", false), + show_toast("show_toast", true), + log_to_chat("log_to_chat", true), functor("functor"), icon("icon"), label("label"), @@ -262,6 +281,7 @@ struct LLNotificationTemplate // (used for things like progress indications, or repeating warnings // like "the grid is going down in N minutes") bool mUnique; + LLNotification::ECombineBehavior mCombineBehavior; // if we want to be unique only if a certain part of the payload or substitutions args // are constant specify the field names for the payload. The notification will only be // combined if all of the fields named in the context are identical in the @@ -302,12 +322,15 @@ struct LLNotificationTemplate LLNotificationFormPtr mForm; // default priority for notifications of this type ENotificationPriority mPriority; - // UUID of the audio file to be played when this notification arrives - // this is loaded as a name, but looked up to get the UUID upon template load. - // If null, it wasn't specified. - LLUUID mSoundEffect; + // Stores the sound name which can then be used to play the sound using make_ui_sound + std::string mSoundName; // List of tags that rules can match against. std::list<std::string> mTags; + + // inject these notifications into chat/IM streams + bool mLogToChat; + bool mLogToIM; + bool mShowToast; }; #endif //LL_LLNOTIFICATION_TEMPLATE_H diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 00318cec6b..67472ad166 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -968,25 +968,15 @@ static LLFastTimer::DeclareTimer FTM_BUILD_PANELS("Build Panels"); //----------------------------------------------------------------------------- // buildPanel() //----------------------------------------------------------------------------- -BOOL LLPanel::buildFromFile(const std::string& filename, LLXMLNodePtr output_node, const LLPanel::Params& default_params) +BOOL LLPanel::buildFromFile(const std::string& filename, const LLPanel::Params& default_params) { LLFastTimer timer(FTM_BUILD_PANELS); BOOL didPost = FALSE; LLXMLNodePtr root; - //if exporting, only load the language being exported, - //instead of layering localized version on top of english - if (output_node) - { - if (!LLUICtrlFactory::getLocalizedXMLNode(filename, root)) - { - llwarns << "Couldn't parse panel from: " << LLUI::getLocalizedSkinPath() + gDirUtilp->getDirDelimiter() + filename << llendl; - return didPost; - } - } - else if (!LLUICtrlFactory::getLayeredXMLNode(filename, root)) + if (!LLUICtrlFactory::getLayeredXMLNode(filename, root)) { - llwarns << "Couldn't parse panel from: " << LLUI::getSkinPath() + gDirUtilp->getDirDelimiter() + filename << llendl; + llwarns << "Couldn't parse panel from: " << filename << llendl; return didPost; } @@ -1010,7 +1000,7 @@ BOOL LLPanel::buildFromFile(const std::string& filename, LLXMLNodePtr output_nod getCommitCallbackRegistrar().pushScope(); getEnableCallbackRegistrar().pushScope(); - didPost = initPanelXML(root, NULL, output_node, default_params); + didPost = initPanelXML(root, NULL, NULL, default_params); getCommitCallbackRegistrar().popScope(); getEnableCallbackRegistrar().popScope(); diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index f620201020..e63b41f97c 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -105,7 +105,7 @@ protected: LLPanel(const LLPanel::Params& params = getDefaultParams()); public: - BOOL buildFromFile(const std::string &filename, LLXMLNodePtr output_node = NULL, const LLPanel::Params&default_params = getDefaultParams()); + BOOL buildFromFile(const std::string &filename, const LLPanel::Params& default_params = getDefaultParams()); static LLPanel* createFactoryPanel(const std::string& name); diff --git a/indra/llui/llresizebar.cpp b/indra/llui/llresizebar.cpp index 87aeb4d7a7..15e56cbfe5 100644 --- a/indra/llui/llresizebar.cpp +++ b/indra/llui/llresizebar.cpp @@ -45,7 +45,8 @@ LLResizeBar::LLResizeBar(const LLResizeBar::Params& p) mSide( p.side ), mSnappingEnabled(p.snapping_enabled), mAllowDoubleClickSnapping(p.allow_double_click_snapping), - mResizingView(p.resizing_view) + mResizingView(p.resizing_view), + mResizeListener(NULL) { setFollowsNone(); // set up some generically good follow code. @@ -139,13 +140,6 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask) if( valid_rect.localPointInRect( screen_x, screen_y ) && mResizingView ) { - // undock floater when user resize it - LLFloater* parent = dynamic_cast<LLFloater*>( getParent()); - if (parent && parent->isDocked()) - { - parent->setDocked( false, false); - } - // Resize the parent LLRect orig_rect = mResizingView->getRect(); LLRect scaled_rect = orig_rect; @@ -219,20 +213,66 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask) // update last valid mouse cursor position based on resized view's actual size LLRect new_rect = mResizingView->getRect(); + switch(mSide) { case LEFT: - mDragLastScreenX += new_rect.mLeft - orig_rect.mLeft; + { + S32 actual_delta_x = new_rect.mLeft - orig_rect.mLeft; + if (actual_delta_x != delta_x) + { + // restore everything by left + new_rect.mBottom = orig_rect.mBottom; + new_rect.mTop = orig_rect.mTop; + new_rect.mRight = orig_rect.mRight; + mResizingView->setShape(new_rect, true); + } + mDragLastScreenX += actual_delta_x; + break; + } case RIGHT: + { + S32 actual_delta_x = new_rect.mRight - orig_rect.mRight; + if (actual_delta_x != delta_x) + { + // restore everything by left + new_rect.mBottom = orig_rect.mBottom; + new_rect.mTop = orig_rect.mTop; + new_rect.mLeft = orig_rect.mLeft; + mResizingView->setShape(new_rect, true); + } mDragLastScreenX += new_rect.mRight - orig_rect.mRight; break; + } case TOP: + { + S32 actual_delta_y = new_rect.mTop - orig_rect.mTop; + if (actual_delta_y != delta_y) + { + // restore everything by left + new_rect.mBottom = orig_rect.mBottom; + new_rect.mLeft = orig_rect.mLeft; + new_rect.mRight = orig_rect.mRight; + mResizingView->setShape(new_rect, true); + } mDragLastScreenY += new_rect.mTop - orig_rect.mTop; break; + } case BOTTOM: + { + S32 actual_delta_y = new_rect.mBottom - orig_rect.mBottom; + if (actual_delta_y != delta_y) + { + // restore everything by left + new_rect.mTop = orig_rect.mTop; + new_rect.mLeft = orig_rect.mLeft; + new_rect.mRight = orig_rect.mRight; + mResizingView->setShape(new_rect, true); + } mDragLastScreenY += new_rect.mBottom- orig_rect.mBottom; break; + } default: break; } @@ -261,6 +301,11 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask) } } + if (mResizeListener) + { + mResizeListener(NULL); + } + return handled; } // end LLResizeBar::handleHover diff --git a/indra/llui/llresizebar.h b/indra/llui/llresizebar.h index 6daf191918..8190a95a71 100644 --- a/indra/llui/llresizebar.h +++ b/indra/llui/llresizebar.h @@ -71,6 +71,7 @@ public: void setEnableSnapping(BOOL enable) { mSnappingEnabled = enable; } void setAllowDoubleClickSnapping(BOOL allow) { mAllowDoubleClickSnapping = allow; } bool canResize() { return getEnabled() && mMaxSize > mMinSize; } + void setResizeListener(boost::function<void(void*)> listener) {mResizeListener = listener;} private: S32 mDragLastScreenX; @@ -84,6 +85,7 @@ private: BOOL mSnappingEnabled; BOOL mAllowDoubleClickSnapping; LLView* mResizingView; + boost::function<void(void*)> mResizeListener; }; #endif // LL_RESIZEBAR_H diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp index c3a51c36c9..24794305ac 100644 --- a/indra/llui/llresizehandle.cpp +++ b/indra/llui/llresizehandle.cpp @@ -257,23 +257,65 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) // update last valid mouse cursor position based on resized view's actual size LLRect new_rect = resizing_view->getRect(); + S32 actual_delta_x = 0; + S32 actual_delta_y = 0; switch(mCorner) { case LEFT_TOP: - mDragLastScreenX += new_rect.mLeft - orig_rect.mLeft; - mDragLastScreenY += new_rect.mTop - orig_rect.mTop; + actual_delta_x = new_rect.mLeft - orig_rect.mLeft; + actual_delta_y = new_rect.mTop - orig_rect.mTop; + if (actual_delta_x != delta_x + || actual_delta_y != delta_y) + { + new_rect.mRight = orig_rect.mRight; + new_rect.mBottom = orig_rect.mBottom; + resizing_view->setShape(new_rect, true); + } + + mDragLastScreenX += actual_delta_x; + mDragLastScreenY += actual_delta_y; break; case LEFT_BOTTOM: - mDragLastScreenX += new_rect.mLeft - orig_rect.mLeft; - mDragLastScreenY += new_rect.mBottom- orig_rect.mBottom; + actual_delta_x = new_rect.mLeft - orig_rect.mLeft; + actual_delta_y = new_rect.mBottom - orig_rect.mBottom; + if (actual_delta_x != delta_x + || actual_delta_y != delta_y) + { + new_rect.mRight = orig_rect.mRight; + new_rect.mTop = orig_rect.mTop; + resizing_view->setShape(new_rect, true); + } + + mDragLastScreenX += actual_delta_x; + mDragLastScreenY += actual_delta_y; break; case RIGHT_TOP: - mDragLastScreenX += new_rect.mRight - orig_rect.mRight; - mDragLastScreenY += new_rect.mTop - orig_rect.mTop; + actual_delta_x = new_rect.mRight - orig_rect.mRight; + actual_delta_y = new_rect.mTop - orig_rect.mTop; + if (actual_delta_x != delta_x + || actual_delta_y != delta_y) + { + new_rect.mLeft = orig_rect.mLeft; + new_rect.mBottom = orig_rect.mBottom; + resizing_view->setShape(new_rect, true); + } + + mDragLastScreenX += actual_delta_x; + mDragLastScreenY += actual_delta_y; break; case RIGHT_BOTTOM: - mDragLastScreenX += new_rect.mRight - orig_rect.mRight; - mDragLastScreenY += new_rect.mBottom- orig_rect.mBottom; + actual_delta_x = new_rect.mRight - orig_rect.mRight; + actual_delta_y = new_rect.mBottom - orig_rect.mBottom; + if (actual_delta_x != delta_x + || actual_delta_y != delta_y) + { + new_rect.mLeft = orig_rect.mLeft; + new_rect.mTop = orig_rect.mTop; + resizing_view->setShape(new_rect, true); + } + + mDragLastScreenX += actual_delta_x; + mDragLastScreenY += actual_delta_y; break; default: break; diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp index 07a6dfaa10..af124d9826 100644 --- a/indra/llui/llscrolllistcolumn.cpp +++ b/indra/llui/llscrolllistcolumn.cpp @@ -98,6 +98,7 @@ BOOL LLScrollColumnHeader::handleDoubleClick(S32 x, S32 y, MASK mask) if (canResize() && mResizeBar->getRect().pointInRect(x, y)) { // reshape column to max content width + mColumn->mParentCtrl->calcMaxContentWidth(); LLRect column_rect = getRect(); column_rect.mRight = column_rect.mLeft + mColumn->mMaxContentWidth; setShape(column_rect, true); @@ -127,6 +128,8 @@ LLView* LLScrollColumnHeader::findSnapEdge(S32& new_edge_val, const LLCoordGL& m LLRect snap_rect = getSnapRect(); + mColumn->mParentCtrl->calcMaxContentWidth(); + S32 snap_delta = mColumn->mMaxContentWidth - snap_rect.getWidth(); // x coord growing means column growing, so same signs mean we're going in right direction diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 802914e25b..8b9fb47d5c 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -35,6 +35,7 @@ #include "llboost.h" //#include "indra_constants.h" +#include "llavatarnamecache.h" #include "llcheckboxctrl.h" #include "llclipboard.h" #include "llfocusmgr.h" @@ -158,15 +159,14 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p) mMouseWheelOpaque(p.mouse_wheel_opaque), mPageLines(p.page_lines), mMaxSelectable(0), - mAllowKeyboardMovement(TRUE), + mAllowKeyboardMovement(true), mCommitOnKeyboardMovement(p.commit_on_keyboard_movement), - mCommitOnSelectionChange(FALSE), - mSelectionChanged(FALSE), - mNeedsScroll(FALSE), - mCanSelect(TRUE), - mColumnsDirty(FALSE), + mCommitOnSelectionChange(false), + mSelectionChanged(false), + mNeedsScroll(false), + mCanSelect(true), + mColumnsDirty(false), mMaxItemCount(INT_MAX), - mMaxContentWidth(0), mBorderThickness( 2 ), mOnDoubleClickCallback( NULL ), mOnMaximumSelectCallback( NULL ), @@ -180,7 +180,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p) mTotalStaticColumnWidth(0), mTotalColumnPadding(0), mSorted(false), - mDirty(FALSE), + mDirty(false), mOriginalSelection(-1), mLastSelected(NULL), mHeadingHeight(p.heading_height), @@ -356,7 +356,7 @@ void LLScrollListCtrl::clearRows() mScrollLines = 0; mLastSelected = NULL; updateLayout(); - mDirty = FALSE; + mDirty = false; } @@ -580,6 +580,15 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r addColumn(col_params); } + S32 num_cols = item->getNumColumns(); + S32 i = 0; + for (LLScrollListCell* cell = item->getColumn(i); i < num_cols; cell = item->getColumn(++i)) + { + if (i >= (S32)mColumnsIndexed.size()) break; + + cell->setWidth(mColumnsIndexed[i]->getWidth()); + } + updateLineHeightInsert(item); updateLayout(); @@ -591,13 +600,11 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r // NOTE: This is *very* expensive for large lists, especially when we are dirtying the list every frame // while receiving a long list of names. // *TODO: Use bookkeeping to make this an incramental cost with item additions -void LLScrollListCtrl::calcColumnWidths() +S32 LLScrollListCtrl::calcMaxContentWidth() { const S32 HEADING_TEXT_PADDING = 25; const S32 COLUMN_TEXT_PADDING = 10; - mMaxContentWidth = 0; - S32 max_item_width = 0; ordered_columns_t::iterator column_itor; @@ -606,6 +613,35 @@ void LLScrollListCtrl::calcColumnWidths() LLScrollListColumn* column = *column_itor; if (!column) continue; + if (mColumnWidthsDirty) + { + mColumnWidthsDirty = false; + // update max content width for this column, by looking at all items + column->mMaxContentWidth = column->mHeader ? LLFontGL::getFontSansSerifSmall()->getWidth(column->mLabel) + mColumnPadding + HEADING_TEXT_PADDING : 0; + item_list::iterator iter; + for (iter = mItemList.begin(); iter != mItemList.end(); iter++) + { + LLScrollListCell* cellp = (*iter)->getColumn(column->mIndex); + if (!cellp) continue; + + column->mMaxContentWidth = llmax(LLFontGL::getFontSansSerifSmall()->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth); + } + } + max_item_width += column->mMaxContentWidth; + } + + return max_item_width; +} + +bool LLScrollListCtrl::updateColumnWidths() +{ + bool width_changed = false; + ordered_columns_t::iterator column_itor; + for (column_itor = mColumnsIndexed.begin(); column_itor != mColumnsIndexed.end(); ++column_itor) + { + LLScrollListColumn* column = *column_itor; + if (!column) continue; + // update column width S32 new_width = column->getWidth(); if (column->mRelWidth >= 0) @@ -617,23 +653,13 @@ void LLScrollListCtrl::calcColumnWidths() new_width = (mItemListRect.getWidth() - mTotalStaticColumnWidth - mTotalColumnPadding) / mNumDynamicWidthColumns; } - column->setWidth(new_width); - - // update max content width for this column, by looking at all items - column->mMaxContentWidth = column->mHeader ? LLFontGL::getFontSansSerifSmall()->getWidth(column->mLabel) + mColumnPadding + HEADING_TEXT_PADDING : 0; - item_list::iterator iter; - for (iter = mItemList.begin(); iter != mItemList.end(); iter++) + if (column->getWidth() != new_width) { - LLScrollListCell* cellp = (*iter)->getColumn(column->mIndex); - if (!cellp) continue; - - column->mMaxContentWidth = llmax(LLFontGL::getFontSansSerifSmall()->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth); + column->setWidth(new_width); + width_changed = true; } - - max_item_width += column->mMaxContentWidth; } - - mMaxContentWidth = max_item_width; + return width_changed; } const S32 SCROLL_LIST_ROW_PAD = 2; @@ -669,7 +695,12 @@ void LLScrollListCtrl::updateLineHeightInsert(LLScrollListItem* itemp) void LLScrollListCtrl::updateColumns() { - calcColumnWidths(); + if (!mColumnsDirty) + return; + + mColumnsDirty = false; + + bool columns_changed_width = updateColumnWidths(); // update column headers std::vector<LLScrollListColumn*>::iterator column_ordered_it; @@ -718,20 +749,22 @@ void LLScrollListCtrl::updateColumns() } // propagate column widths to individual cells - item_list::iterator iter; - for (iter = mItemList.begin(); iter != mItemList.end(); iter++) + if (columns_changed_width) { - LLScrollListItem *itemp = *iter; - S32 num_cols = itemp->getNumColumns(); - S32 i = 0; - for (LLScrollListCell* cell = itemp->getColumn(i); i < num_cols; cell = itemp->getColumn(++i)) + item_list::iterator iter; + for (iter = mItemList.begin(); iter != mItemList.end(); iter++) { - if (i >= (S32)mColumnsIndexed.size()) break; + LLScrollListItem *itemp = *iter; + S32 num_cols = itemp->getNumColumns(); + S32 i = 0; + for (LLScrollListCell* cell = itemp->getColumn(i); i < num_cols; cell = itemp->getColumn(++i)) + { + if (i >= (S32)mColumnsIndexed.size()) break; - cell->setWidth(mColumnsIndexed[i]->getWidth()); + cell->setWidth(mColumnsIndexed[i]->getWidth()); + } } } - } void LLScrollListCtrl::setHeadingHeight(S32 heading_height) @@ -772,7 +805,7 @@ BOOL LLScrollListCtrl::selectFirstItem() { deselectItem(itemp); } - first_item = FALSE; + first_item = false; } if (mCommitOnSelectionChange) { @@ -1406,17 +1439,23 @@ void LLScrollListCtrl::drawItems() S32 cur_y = y; - S32 line = 0; S32 max_columns = 0; LLColor4 highlight_color = LLColor4::white; static LLUICachedControl<F32> type_ahead_timeout ("TypeAheadTimeout", 0); highlight_color.mV[VALPHA] = clamp_rescale(mSearchTimer.getElapsedTimeF32(), type_ahead_timeout * 0.7f, type_ahead_timeout, 0.4f, 0.f); + S32 first_line = mScrollLines; + S32 last_line = llmin((S32)mItemList.size() - 1, mScrollLines + getLinesPerPage()); + + if (first_line >= mItemList.size()) + { + return; + } item_list::iterator iter; - for (iter = mItemList.begin(); iter != mItemList.end(); iter++) + for (S32 line = first_line; line <= last_line; line++) { - LLScrollListItem* item = *iter; + LLScrollListItem* item = mItemList[line]; item_rect.setOriginAndSize( x, @@ -1480,7 +1519,6 @@ void LLScrollListCtrl::drawItems() cur_y -= mLineHeight; } - line++; } } } @@ -1496,7 +1534,7 @@ void LLScrollListCtrl::draw() if (mNeedsScroll) { scrollToShowSelected(); - mNeedsScroll = FALSE; + mNeedsScroll = false; } LLRect background(0, getRect().getHeight(), getRect().getWidth(), 0); // Draw background @@ -1507,11 +1545,7 @@ void LLScrollListCtrl::draw() gl_rect_2d(background, getEnabled() ? mBgWriteableColor.get() % alpha : mBgReadOnlyColor.get() % alpha ); } - if (mColumnsDirty) - { - updateColumns(); - mColumnsDirty = FALSE; - } + updateColumns(); getChildView("comment_text")->setVisible(mItemList.empty()); @@ -1719,7 +1753,7 @@ BOOL LLScrollListCtrl::handleMouseDown(S32 x, S32 y, MASK mask) setFocus(TRUE); // clear selection changed flag because user is starting a selection operation - mSelectionChanged = FALSE; + mSelectionChanged = false; handleClick(x, y, mask); } @@ -1737,15 +1771,15 @@ BOOL LLScrollListCtrl::handleMouseUp(S32 x, S32 y, MASK mask) if(mask == MASK_NONE) { selectItemAt(x, y, mask); - mNeedsScroll = TRUE; + mNeedsScroll = true; } } // always commit when mouse operation is completed inside list if (mItemListRect.pointInRect(x,y)) { - mDirty |= mSelectionChanged; - mSelectionChanged = FALSE; + mDirty = mDirty || mSelectionChanged; + mSelectionChanged = false; onCommit(); } @@ -1805,7 +1839,9 @@ void LLScrollListCtrl::copyNameToClipboard(std::string id, bool is_group) } else { - gCacheName->getFullName(LLUUID(id), name); + LLAvatarName av_name; + LLAvatarNameCache::get(LLUUID(id), &av_name); + name = av_name.getAccountName(); } LLUrlAction::copyURLToClipboard(name); } @@ -1859,7 +1895,7 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask) { selectItemAt(x, y, mask); gFocusMgr.setMouseCapture(this); - mNeedsScroll = TRUE; + mNeedsScroll = true; } // propagate state of cell to rest of selected column @@ -1888,7 +1924,7 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask) // treat this as a normal single item selection selectItemAt(x, y, mask); gFocusMgr.setMouseCapture(this); - mNeedsScroll = TRUE; + mNeedsScroll = true; // do not eat click (allow double click callback) return FALSE; } @@ -1994,7 +2030,7 @@ BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask) if(mask == MASK_NONE) { selectItemAt(x, y, mask); - mNeedsScroll = TRUE; + mNeedsScroll = true; } } else @@ -2041,7 +2077,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) { // commit implicit in call selectPrevItem(FALSE); - mNeedsScroll = TRUE; + mNeedsScroll = true; handled = TRUE; } break; @@ -2050,7 +2086,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) { // commit implicit in call selectNextItem(FALSE); - mNeedsScroll = TRUE; + mNeedsScroll = true; handled = TRUE; } break; @@ -2058,7 +2094,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) if (mAllowKeyboardMovement || hasFocus()) { selectNthItem(getFirstSelectedIndex() - (mScrollbar->getPageSize() - 1)); - mNeedsScroll = TRUE; + mNeedsScroll = true; if (mCommitOnKeyboardMovement && !mCommitOnSelectionChange) { @@ -2071,7 +2107,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) if (mAllowKeyboardMovement || hasFocus()) { selectNthItem(getFirstSelectedIndex() + (mScrollbar->getPageSize() - 1)); - mNeedsScroll = TRUE; + mNeedsScroll = true; if (mCommitOnKeyboardMovement && !mCommitOnSelectionChange) { @@ -2084,7 +2120,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) if (mAllowKeyboardMovement || hasFocus()) { selectFirstItem(); - mNeedsScroll = TRUE; + mNeedsScroll = true; if (mCommitOnKeyboardMovement && !mCommitOnSelectionChange) { @@ -2097,7 +2133,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) if (mAllowKeyboardMovement || hasFocus()) { selectNthItem(getItemCount() - 1); - mNeedsScroll = TRUE; + mNeedsScroll = true; if (mCommitOnKeyboardMovement && !mCommitOnSelectionChange) { @@ -2136,7 +2172,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) } else if (selectItemByPrefix(wstring_to_utf8str(mSearchString), FALSE)) { - mNeedsScroll = TRUE; + mNeedsScroll = true; // update search string only on successful match mSearchTimer.reset(); @@ -2177,7 +2213,7 @@ BOOL LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char) if (selectItemByPrefix(wstring_to_utf8str(mSearchString + (llwchar)uni_char), FALSE)) { // update search string only on successful match - mNeedsScroll = TRUE; + mNeedsScroll = true; mSearchString += uni_char; mSearchTimer.reset(); @@ -2223,7 +2259,7 @@ BOOL LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char) if (item->getEnabled() && LLStringOps::toLower(item_label[0]) == uni_char) { selectItem(item); - mNeedsScroll = TRUE; + mNeedsScroll = true; cellp->highlightText(0, 1); mSearchTimer.reset(); @@ -2294,7 +2330,7 @@ void LLScrollListCtrl::selectItem(LLScrollListItem* itemp, BOOL select_single_it } itemp->setSelected(TRUE); mLastSelected = itemp; - mSelectionChanged = TRUE; + mSelectionChanged = true; } } @@ -2315,7 +2351,7 @@ void LLScrollListCtrl::deselectItem(LLScrollListItem* itemp) { cellp->highlightText(0, 0); } - mSelectionChanged = TRUE; + mSelectionChanged = true; } } @@ -2323,7 +2359,7 @@ void LLScrollListCtrl::commitIfChanged() { if (mSelectionChanged) { - mDirty = TRUE; + mDirty = true; mSelectionChanged = FALSE; onCommit(); } @@ -2434,7 +2470,8 @@ void LLScrollListCtrl::sortOnce(S32 column, BOOL ascending) void LLScrollListCtrl::dirtyColumns() { - mColumnsDirty = TRUE; + mColumnsDirty = true; + mColumnWidthsDirty = true; // need to keep mColumnsIndexed up to date // just in case someone indexes into it immediately @@ -2720,6 +2757,11 @@ BOOL LLScrollListCtrl::hasSortOrder() const return !mSortColumns.empty(); } +void LLScrollListCtrl::clearSortOrder() +{ + mSortColumns.clear(); +} + void LLScrollListCtrl::clearColumns() { column_map_t::iterator itor; @@ -2998,7 +3040,7 @@ void LLScrollListCtrl::resetDirty() void LLScrollListCtrl::onFocusReceived() { // forget latent selection changes when getting focus - mSelectionChanged = FALSE; + mSelectionChanged = false; LLUICtrl::onFocusReceived(); } diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 44d9635838..38450b6313 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -343,8 +343,8 @@ public: static void onClickColumn(void *userdata); virtual void updateColumns(); - void calcColumnWidths(); - S32 getMaxContentWidth() { return mMaxContentWidth; } + S32 calcMaxContentWidth(); + bool updateColumnWidths(); void setHeadingHeight(S32 heading_height); /** @@ -374,6 +374,7 @@ public: std::string getSortColumnName(); BOOL getSortAscending() { return mSortColumns.empty() ? TRUE : mSortColumns.back().second; } BOOL hasSortOrder() const; + void clearSortOrder(); S32 selectMultiple( uuid_vec_t ids ); // conceptually const, but mutates mItemList @@ -439,16 +440,17 @@ private: S32 mHeadingHeight; // the height of the column header buttons, if visible U32 mMaxSelectable; LLScrollbar* mScrollbar; - BOOL mAllowMultipleSelection; - BOOL mAllowKeyboardMovement; - BOOL mCommitOnKeyboardMovement; - BOOL mCommitOnSelectionChange; - BOOL mSelectionChanged; - BOOL mNeedsScroll; - BOOL mMouseWheelOpaque; - BOOL mCanSelect; - const BOOL mDisplayColumnHeaders; - BOOL mColumnsDirty; + bool mAllowMultipleSelection; + bool mAllowKeyboardMovement; + bool mCommitOnKeyboardMovement; + bool mCommitOnSelectionChange; + bool mSelectionChanged; + bool mNeedsScroll; + bool mMouseWheelOpaque; + bool mCanSelect; + bool mDisplayColumnHeaders; + bool mColumnsDirty; + bool mColumnWidthsDirty; mutable item_list mItemList; @@ -457,7 +459,6 @@ private: S32 mMaxItemCount; LLRect mItemListRect; - S32 mMaxContentWidth; S32 mColumnPadding; BOOL mBackgroundVisible; @@ -497,7 +498,7 @@ private: typedef std::map<std::string, LLScrollListColumn*> column_map_t; column_map_t mColumns; - BOOL mDirty; + bool mDirty; S32 mOriginalSelection; ContextMenuType mContextMenuType; diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index 934879cdfd..8a728df2e7 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -52,6 +52,7 @@ LLSpinCtrl::Params::Params() : label_width("label_width"), decimal_digits("decimal_digits"), allow_text_entry("allow_text_entry", true), + allow_digits_only("allow_digits_only", false), label_wrap("label_wrap", false), text_enabled_color("text_enabled_color"), text_disabled_color("text_disabled_color"), @@ -129,6 +130,10 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p) params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM); mEditor = LLUICtrlFactory::create<LLLineEditor> (params); mEditor->setFocusReceivedCallback( boost::bind(&LLSpinCtrl::onEditorGainFocus, _1, this )); + if (p.allow_digits_only) + { + mEditor->setPrevalidateInput(LLTextValidate::validateNonNegativeS32NoSpace); + } //RN: this seems to be a BAD IDEA, as it makes the editor behavior different when it has focus // than when it doesn't. Instead, if you always have to double click to select all the text, // it's easier to understand diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h index 87814f838e..e34add879d 100644 --- a/indra/llui/llspinctrl.h +++ b/indra/llui/llspinctrl.h @@ -44,6 +44,7 @@ public: Optional<S32> label_width; Optional<U32> decimal_digits; Optional<bool> allow_text_entry; + Optional<bool> allow_digits_only; Optional<bool> label_wrap; Optional<LLUIColor> text_enabled_color; diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 5fc2cc350d..6f895ed939 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -506,8 +506,8 @@ void LLTabContainer::draw() } } - mPrevArrowBtn->setFlashing(FALSE); - mNextArrowBtn->setFlashing(FALSE); + mPrevArrowBtn->setFlashing(false); + mNextArrowBtn->setFlashing(false); } @@ -1209,7 +1209,11 @@ void LLTabContainer::removeTabPanel(LLPanel* child) update_images(mTabList[mTabList.size()-2], mLastTabParams, getTabPosition()); } - removeChild( tuple->mButton ); + if (!getTabsHidden()) + { + // We need to remove tab buttons only if the tabs are not hidden. + removeChild( tuple->mButton ); + } delete tuple->mButton; removeChild( tuple->mTabPanel ); @@ -1480,13 +1484,21 @@ BOOL LLTabContainer::setTab(S32 which) { LLTabTuple* tuple = *iter; BOOL is_selected = ( tuple == selected_tuple ); - tuple->mButton->setUseEllipses(mUseTabEllipses); - tuple->mButton->setHAlign(mFontHalign); - tuple->mTabPanel->setVisible( is_selected ); -// tuple->mTabPanel->setFocus(is_selected); // not clear that we want to do this here. - tuple->mButton->setToggleState( is_selected ); - // RN: this limits tab-stops to active button only, which would require arrow keys to switch tabs - tuple->mButton->setTabStop( is_selected ); + + // Although the selected tab must be complete, we may have hollow LLTabTuple tucked in the list + if (tuple->mButton) + { + tuple->mButton->setUseEllipses(mUseTabEllipses); + tuple->mButton->setHAlign(mFontHalign); + tuple->mButton->setToggleState( is_selected ); + // RN: this limits tab-stops to active button only, which would require arrow keys to switch tabs + tuple->mButton->setTabStop( is_selected ); + } + if (tuple->mTabPanel) + { + tuple->mTabPanel->setVisible( is_selected ); + //tuple->mTabPanel->setFocus(is_selected); // not clear that we want to do this here. + } if (is_selected) { @@ -1557,8 +1569,7 @@ BOOL LLTabContainer::selectTabByName(const std::string& name) LLPanel* panel = getPanelByName(name); if (!panel) { - llwarns << "LLTabContainer::selectTabByName(" - << name << ") failed" << llendl; + llwarns << "LLTabContainer::selectTabByName(" << name << ") failed" << llendl; return FALSE; } diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index cebace2ceb..57862fc626 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -188,10 +188,11 @@ public: void selectFirstTab(); void selectLastTab(); void selectNextTab(); - void selectPrevTab(); + void selectPrevTab(); BOOL selectTabPanel( LLPanel* child ); BOOL selectTab(S32 which); BOOL selectTabByName(const std::string& title); + void setCurrentPanelIndex(S32 index) { mCurrentTabIdx = index; } BOOL getTabPanelFlashing(LLPanel* child); void setTabPanelFlashing(LLPanel* child, BOOL state); @@ -242,8 +243,6 @@ private: void setTabsHidden(BOOL hidden) { mTabsHidden = hidden; } BOOL getTabsHidden() const { return mTabsHidden; } - - void setCurrentPanelIndex(S32 index) { mCurrentTabIdx = index; } void scrollPrev() { mScrollPos = llmax(0, mScrollPos-1); } // No wrap void scrollNext() { mScrollPos = llmin(mScrollPos+1, mMaxScrollPos); } // No wrap diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 3815eec447..ebc9ee244e 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -46,6 +46,7 @@ const F32 CURSOR_FLASH_DELAY = 1.0f; // in seconds const S32 CURSOR_THICKNESS = 2; +const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click. LLTextBase::line_info::line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num) : mDocIndexStart(index_start), @@ -145,6 +146,7 @@ LLTextBase::Params::Params() : cursor_color("cursor_color"), text_color("text_color"), text_readonly_color("text_readonly_color"), + text_tentative_color("text_tentative_color"), bg_visible("bg_visible", false), border_visible("border_visible", false), bg_readonly_color("bg_readonly_color"), @@ -179,7 +181,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) : LLUICtrl(p, LLTextViewModelPtr(new LLTextViewModel)), mURLClickSignal(NULL), mMaxTextByteLength( p.max_text_length ), - mDefaultFont(p.font), + mFont(p.font), mFontShadow(p.font_shadow), mPopupMenu(NULL), mReadOnly(p.read_only), @@ -190,6 +192,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mFgColor(p.text_color), mBorderVisible( p.border_visible ), mReadOnlyFgColor(p.text_readonly_color), + mTentativeFgColor(p.text_tentative_color()), mWriteableBgColor(p.bg_writeable_color), mReadOnlyBgColor(p.bg_readonly_color), mFocusBgColor(p.bg_focus_color), @@ -319,21 +322,26 @@ bool LLTextBase::truncate() return did_truncate; } -const LLStyle::Params& LLTextBase::getDefaultStyleParams() +const LLStyle::Params& LLTextBase::getStyleParams() { //FIXME: convert mDefaultStyle to a flyweight http://www.boost.org/doc/libs/1_40_0/libs/flyweight/doc/index.html //and eliminate color member values if (mStyleDirty) { - mDefaultStyle + mStyle .color(LLUIColor(&mFgColor)) // pass linked color instead of copy of mFGColor .readonly_color(LLUIColor(&mReadOnlyFgColor)) .selected_color(LLUIColor(&mTextSelectedColor)) - .font(mDefaultFont) + .font(mFont) .drop_shadow(mFontShadow); mStyleDirty = false; } - return mDefaultStyle; + return mStyle; +} + +void LLTextBase::beforeValueChange() +{ + } void LLTextBase::onValueChange(S32 start, S32 end) @@ -351,7 +359,6 @@ void LLTextBase::drawSelectionBackground() S32 selection_left = llmin( mSelectionStart, mSelectionEnd ); S32 selection_right = llmax( mSelectionStart, mSelectionEnd ); - LLRect selection_rect = mVisibleTextRect; // Skip through the lines we aren't drawing. LLRect content_display_rect = getVisibleDocumentRect(); @@ -522,11 +529,17 @@ void LLTextBase::drawCursor() void LLTextBase::drawText() { - const S32 text_len = getLength(); - if( text_len <= 0 ) + S32 text_len = getLength(); + + if (text_len <= 0 && mLabel.empty()) { return; } + else if (useLabel()) + { + text_len = mLabel.getWString().length(); + } + S32 selection_left = -1; S32 selection_right = -1; // Draw selection even if we don't have keyboard focus for search/replace @@ -592,7 +605,8 @@ void LLTextBase::drawText() // Find the start of the first word U32 word_start = seg_start, word_end = -1; - while ( (word_start < wstrText.length()) && (!LLStringOps::isAlpha(wstrText[word_start])) ) + U32 text_length = wstrText.length(); + while ( (word_start < text_length) && (!LLStringOps::isAlpha(wstrText[word_start])) ) { word_start++; } @@ -614,11 +628,15 @@ void LLTextBase::drawText() break; } - // Don't process words shorter than 3 characters - std::string word = wstring_to_utf8str(wstrText.substr(word_start, word_end - word_start)); - if ( (word.length() >= 3) && (!LLSpellChecker::instance().checkSpelling(word)) ) + if (word_start < text_length && word_end <= text_length && word_end > word_start) { - mMisspellRanges.push_back(std::pair<U32, U32>(word_start, word_end)); + std::string word = wstring_to_utf8str(wstrText.substr(word_start, word_end - word_start)); + + // Don't process words shorter than 3 characters + if ( (word.length() >= 3) && (!LLSpellChecker::instance().checkSpelling(word)) ) + { + mMisspellRanges.push_back(std::pair<U32, U32>(word_start, word_end)); + } } // Find the start of the next word @@ -739,6 +757,8 @@ void LLTextBase::drawText() S32 LLTextBase::insertStringNoUndo(S32 pos, const LLWString &wstr, LLTextBase::segment_vec_t* segments ) { + beforeValueChange(); + S32 old_len = getLength(); // length() returns character length S32 insert_len = wstr.length(); @@ -770,7 +790,7 @@ S32 LLTextBase::insertStringNoUndo(S32 pos, const LLWString &wstr, LLTextBase::s else { // create default editable segment to hold new text - LLStyleConstSP sp(new LLStyle(getDefaultStyleParams())); + LLStyleConstSP sp(new LLStyle(getStyleParams())); default_segment = new LLNormalTextSegment( sp, pos, pos + insert_len, *this); } @@ -814,6 +834,8 @@ S32 LLTextBase::insertStringNoUndo(S32 pos, const LLWString &wstr, LLTextBase::s S32 LLTextBase::removeStringNoUndo(S32 pos, S32 length) { + + beforeValueChange(); segment_set_t::iterator seg_iter = getSegIterContaining(pos); while(seg_iter != mSegments.end()) { @@ -872,6 +894,8 @@ S32 LLTextBase::removeStringNoUndo(S32 pos, S32 length) S32 LLTextBase::overwriteCharNoUndo(S32 pos, llwchar wc) { + beforeValueChange(); + if (pos > (S32)getLength()) { return 0; @@ -890,7 +914,7 @@ void LLTextBase::createDefaultSegment() // ensures that there is always at least one segment if (mSegments.empty()) { - LLStyleConstSP sp(new LLStyle(getDefaultStyleParams())); + LLStyleConstSP sp(new LLStyle(getStyleParams())); LLTextSegmentPtr default_segment = new LLNormalTextSegment( sp, 0, getLength() + 1, *this); mSegments.insert(default_segment); default_segment->linkToDocument(this); @@ -980,6 +1004,13 @@ void LLTextBase::insertSegment(LLTextSegmentPtr segment_to_insert) BOOL LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask) { + // handle triple click + if (!mTripleClickTimer.hasExpired()) + { + selectAll(); + return TRUE; + } + LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y); if (cur_segment && cur_segment->handleMouseDown(x, y, mask)) { @@ -1054,6 +1085,14 @@ BOOL LLTextBase::handleRightMouseUp(S32 x, S32 y, MASK mask) BOOL LLTextBase::handleDoubleClick(S32 x, S32 y, MASK mask) { + //Don't start triple click timer if user have clicked on scrollbar + mVisibleTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect(); + if (x >= mVisibleTextRect.mLeft && x <= mVisibleTextRect.mRight + && y >= mVisibleTextRect.mBottom && y <= mVisibleTextRect.mTop) + { + mTripleClickTimer.setTimerExpirySec(TRIPLE_CLICK_INTERVAL); + } + LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y); if (cur_segment && cur_segment->handleDoubleClick(x, y, mask)) { @@ -1338,6 +1377,25 @@ void LLTextBase::onSpellCheckSettingsChange() mSpellCheckStart = mSpellCheckEnd = -1; } +void LLTextBase::onFocusReceived() +{ + LLUICtrl::onFocusReceived(); + if (!getLength() && !mLabel.empty()) + { + // delete label which is LLLabelTextSegment + clearSegments(); + } +} + +void LLTextBase::onFocusLost() +{ + LLUICtrl::onFocusLost(); + if (!getLength() && !mLabel.empty()) + { + resetLabel(); + } +} + // Sets the scrollbar from the cursor position void LLTextBase::updateScrollFromCursor() { @@ -1859,6 +1917,8 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url) registrar.add("Url.Execute", boost::bind(&LLUrlAction::executeSLURL, url)); registrar.add("Url.Teleport", boost::bind(&LLUrlAction::teleportToLocation, url)); registrar.add("Url.ShowProfile", boost::bind(&LLUrlAction::showProfile, url)); + registrar.add("Url.SendIM", boost::bind(&LLUrlAction::sendIM, url)); + registrar.add("Url.AddFriend", boost::bind(&LLUrlAction::addFriend, url)); registrar.add("Url.ShowOnMap", boost::bind(&LLUrlAction::showLocationOnMap, url)); registrar.add("Url.CopyLabel", boost::bind(&LLUrlAction::copyLabelToClipboard, url)); registrar.add("Url.CopyUrl", boost::bind(&LLUrlAction::copyURLToClipboard, url)); @@ -1924,7 +1984,7 @@ static LLFastTimer::DeclareTimer FTM_PARSE_HTML("Parse HTML"); void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params) { LLStyle::Params style_params(input_params); - style_params.fillFrom(getDefaultStyleParams()); + style_params.fillFrom(getStyleParams()); S32 part = (S32)LLTextParser::WHOLE; if (mParseHTML && !style_params.is_link) // Don't search for URLs inside a link segment (STORM-358). @@ -2009,6 +2069,44 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c appendTextImpl(new_text,input_params); } +void LLTextBase::setLabel(const LLStringExplicit& label) +{ + mLabel = label; + resetLabel(); +} + +BOOL LLTextBase::setLabelArg(const std::string& key, const LLStringExplicit& text ) +{ + mLabel.setArg(key, text); + return TRUE; +} + +void LLTextBase::resetLabel() +{ + if (useLabel()) + { + clearSegments(); + + LLStyle* style = new LLStyle(getStyleParams()); + style->setColor(mTentativeFgColor); + LLStyleConstSP sp(style); + + LLTextSegmentPtr label = new LLLabelTextSegment(sp, 0, mLabel.getWString().length() + 1, *this); + insertSegment(label); + } +} + +bool LLTextBase::useLabel() +{ + return !getLength() && !mLabel.empty() && !hasFocus(); +} + +void LLTextBase::setFont(const LLFontGL* font) +{ + mFont = font; + mStyleDirty = true; +} + void LLTextBase::needsReflow(S32 index) { lldebugs << "reflow on object " << (void*)this << " index = " << mReflowIndex << ", new index = " << index << llendl; @@ -2239,7 +2337,6 @@ const LLWString& LLTextBase::getWText() const S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, bool hit_past_end_of_line) const { // Figure out which line we're nearest to. - LLRect visible_region = getVisibleDocumentRect(); LLRect doc_rect = mDocumentView->getRect(); S32 doc_y = local_y - doc_rect.mBottom; @@ -2399,7 +2496,7 @@ LLRect LLTextBase::getLocalRectFromDocIndex(S32 pos) const { // return default height rect in upper left local_rect = content_window_rect; - local_rect.mBottom = local_rect.mTop - mDefaultFont->getLineHeight(); + local_rect.mBottom = local_rect.mTop - mFont->getLineHeight(); return local_rect; } @@ -2904,7 +3001,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele { F32 alpha = LLViewDrawContext::getCurrentContext().mAlpha; - const LLWString &text = mEditor.getWText(); + const LLWString &text = getWText(); F32 right_x = rect.mLeft; if (!mStyle->isVisible()) @@ -3067,7 +3164,7 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt if (num_chars > 0) { height = mFontHeight; - const LLWString &text = mEditor.getWText(); + const LLWString &text = getWText(); // if last character is a newline, then return true, forcing line break width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars); } @@ -3076,7 +3173,7 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt S32 LLNormalTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const { - const LLWString &text = mEditor.getWText(); + const LLWString &text = getWText(); return mStyle->getFont()->charFromPixelOffset(text.c_str(), mStart + start_offset, (F32)segment_local_x_coord, F32_MAX, @@ -3086,7 +3183,7 @@ S32 LLNormalTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const { - const LLWString &text = mEditor.getWText(); + const LLWString &text = getWText(); LLUIImagePtr image = mStyle->getImage(); if( image.notNull()) @@ -3122,7 +3219,7 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin S32 last_char_in_run = mStart + segment_offset + num_chars; // check length first to avoid indexing off end of string if (last_char_in_run < mEnd - && (last_char_in_run >= mEditor.getLength() )) + && (last_char_in_run >= getLength())) { num_chars++; } @@ -3140,6 +3237,39 @@ void LLNormalTextSegment::dump() const llendl; } +/*virtual*/ +const LLWString& LLNormalTextSegment::getWText() const +{ + return mEditor.getWText(); +} + +/*virtual*/ +const S32 LLNormalTextSegment::getLength() const +{ + return mEditor.getLength(); +} + +LLLabelTextSegment::LLLabelTextSegment( LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor ) +: LLNormalTextSegment(style, start, end, editor) +{ +} + +LLLabelTextSegment::LLLabelTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible) +: LLNormalTextSegment(color, start, end, editor, is_visible) +{ +} + +/*virtual*/ +const LLWString& LLLabelTextSegment::getWText() const +{ + return mEditor.getWlabel(); +} +/*virtual*/ +const S32 LLLabelTextSegment::getLength() const +{ + return mEditor.getWlabel().length(); +} + // // LLOnHoverChangeableTextSegment // diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 90b147cee1..ad566a36d3 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -106,7 +106,7 @@ class LLNormalTextSegment : public LLTextSegment public: LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor ); LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible = TRUE); - ~LLNormalTextSegment(); + virtual ~LLNormalTextSegment(); /*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; /*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const; @@ -131,6 +131,9 @@ public: protected: F32 drawClippedSegment(S32 seg_start, S32 seg_end, S32 selection_start, S32 selection_end, LLRect rect); + virtual const LLWString& getWText() const; + virtual const S32 getLength() const; + protected: class LLTextBase& mEditor; LLStyleConstSP mStyle; @@ -140,6 +143,21 @@ protected: boost::signals2::connection mImageLoadedConnection; }; +// This text segment is the same as LLNormalTextSegment, the only difference +// is that LLNormalTextSegment draws value of LLTextBase (LLTextBase::getWText()), +// but LLLabelTextSegment draws label of the LLTextBase (LLTextBase::mLabel) +class LLLabelTextSegment : public LLNormalTextSegment +{ +public: + LLLabelTextSegment( LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor ); + LLLabelTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible = TRUE); + +protected: + + /*virtual*/ const LLWString& getWText() const; + /*virtual*/ const S32 getLength() const; +}; + // Text segment that changes it's style depending of mouse pointer position ( is it inside or outside segment) class LLOnHoverChangeableTextSegment : public LLNormalTextSegment { @@ -251,6 +269,7 @@ public: Optional<LLUIColor> cursor_color, text_color, text_readonly_color, + text_tentative_color, bg_readonly_color, bg_writeable_color, bg_focus_color, @@ -314,6 +333,9 @@ public: /*virtual*/ BOOL canDeselect() const; /*virtual*/ void deselect(); + virtual void onFocusReceived(); + virtual void onFocusLost(); + // LLSpellCheckMenuHandler overrides /*virtual*/ bool getSpellCheck() const; @@ -351,6 +373,21 @@ public: const LLWString& getWText() const; void appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params = LLStyle::Params()); + + void setLabel(const LLStringExplicit& label); + virtual BOOL setLabelArg(const std::string& key, const LLStringExplicit& text ); + + const std::string& getLabel() { return mLabel.getString(); } + const LLWString& getWlabel() { return mLabel.getWString();} + + /** + * If label is set, draws text label (which is LLLabelTextSegment) + * that is visible when no user text provided + */ + void resetLabel(); + + void setFont(const LLFontGL* font); + // force reflow of text void needsReflow(S32 index = 0); @@ -390,7 +427,7 @@ public: bool scrolledToStart(); bool scrolledToEnd(); - const LLFontGL* getDefaultFont() const { return mDefaultFont; } + const LLFontGL* getFont() const { return mFont; } virtual void appendLineBreakSegment(const LLStyle::Params& style_params); virtual void appendImageSegment(const LLStyle::Params& style_params); @@ -464,7 +501,9 @@ protected: LLTextBase(const Params &p); virtual ~LLTextBase(); void initFromParams(const Params& p); + virtual void beforeValueChange(); virtual void onValueChange(S32 start, S32 end); + virtual bool useLabel(); // draw methods void drawSelectionBackground(); // draws the black box behind the selected text @@ -490,7 +529,7 @@ protected: void createDefaultSegment(); virtual void updateSegments(); void insertSegment(LLTextSegmentPtr segment_to_insert); - const LLStyle::Params& getDefaultStyleParams(); + const LLStyle::Params& getStyleParams(); // manage lines S32 getLineStart( S32 line ) const; @@ -535,15 +574,16 @@ protected: LLRect mTextBoundingRect; // default text style - LLStyle::Params mDefaultStyle; + LLStyle::Params mStyle; bool mStyleDirty; - const LLFontGL* const mDefaultFont; // font that is used when none specified, can only be set by constructor - const LLFontGL::ShadowType mFontShadow; // shadow style, can only be set by constructor + const LLFontGL* mFont; + const LLFontGL::ShadowType mFontShadow; // colors LLUIColor mCursorColor; LLUIColor mFgColor; LLUIColor mReadOnlyFgColor; + LLUIColor mTentativeFgColor; LLUIColor mWriteableBgColor; LLUIColor mReadOnlyBgColor; LLUIColor mFocusBgColor; @@ -558,7 +598,8 @@ protected: // selection S32 mSelectionStart; S32 mSelectionEnd; - + LLTimer mTripleClickTimer; + BOOL mIsSelecting; // Are we in the middle of a drag-select? // spell checking @@ -587,6 +628,7 @@ protected: bool mClip; // clip text to widget rect bool mClipPartial; // false if we show lines that are partially inside bounding rect bool mPlainText; // didn't use Image or Icon segments + bool mAutoIndent; S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes // support widgets @@ -602,6 +644,7 @@ protected: // Fired when a URL link is clicked commit_signal_t* mURLClickSignal; + LLUIString mLabel; // text label that is visible when no user text provided }; #endif diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 144b6960a1..4a950638a4 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -237,20 +237,24 @@ LLTextEditor::Params::Params() embedded_items("embedded_items", false), ignore_tab("ignore_tab", true), show_line_numbers("show_line_numbers", false), + auto_indent("auto_indent", true), default_color("default_color"), commit_on_focus_lost("commit_on_focus_lost", false), - show_context_menu("show_context_menu") + show_context_menu("show_context_menu"), + enable_tooltip_paste("enable_tooltip_paste") { addSynonym(prevalidate_callback, "text_type"); } LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : LLTextBase(p), + mAutoreplaceCallback(), mBaseDocIsPristine(TRUE), mPristineCmd( NULL ), mLastCmd( NULL ), mDefaultColor( p.default_color() ), mShowLineNumbers ( p.show_line_numbers ), + mAutoIndent(p.auto_indent), mCommitOnFocusLost( p.commit_on_focus_lost), mAllowEmbeddedItems( p.embedded_items ), mMouseDownX(0), @@ -258,7 +262,9 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : mTabsToNextField(p.ignore_tab), mPrevalidateFunc(p.prevalidate_callback()), mContextMenu(NULL), - mShowContextMenu(p.show_context_menu) + mShowContextMenu(p.show_context_menu), + mEnableTooltipPaste(p.enable_tooltip_paste), + mPassDelete(FALSE) { mSourceID.generate(); @@ -1094,8 +1100,27 @@ void LLTextEditor::addChar(llwchar wc) } setCursorPos(mCursorPos + addChar( mCursorPos, wc )); + + if (!mReadOnly && mAutoreplaceCallback != NULL) + { + // autoreplace the text, if necessary + S32 replacement_start; + S32 replacement_length; + LLWString replacement_string; + S32 new_cursor_pos = mCursorPos; + mAutoreplaceCallback(replacement_start, replacement_length, replacement_string, new_cursor_pos, getWText()); + + if (replacement_length > 0 || !replacement_string.empty()) + { + remove(replacement_start, replacement_length, true); + insert(replacement_start, replacement_string, false, LLTextSegmentPtr()); + setCursorPos(new_cursor_pos); + } + } } -void LLTextEditor::addLineBreakChar() + + +void LLTextEditor::addLineBreakChar(BOOL group_together) { if( !getEnabled() ) { @@ -1113,7 +1138,7 @@ void LLTextEditor::addLineBreakChar() LLStyleConstSP sp(new LLStyle(LLStyle::Params())); LLTextSegmentPtr segment = new LLLineBreakTextSegment(sp, mCursorPos); - S32 pos = execute(new TextCmdAddChar(mCursorPos, FALSE, '\n', segment)); + S32 pos = execute(new TextCmdAddChar(mCursorPos, group_together, '\n', segment)); setCursorPos(mCursorPos + pos); } @@ -1411,6 +1436,23 @@ void LLTextEditor::pasteHelper(bool is_primary) // Clean up string (replace tabs and remove characters that our fonts don't support). LLWString clean_string(paste); + cleanStringForPaste(clean_string); + + // Insert the new text into the existing text. + + //paste text with linebreaks. + pasteTextWithLinebreaks(clean_string); + + deselect(); + + onKeyStroke(); + mParseOnTheFly = TRUE; +} + + +// Clean up string (replace tabs and remove characters that our fonts don't support). +void LLTextEditor::cleanStringForPaste(LLWString & clean_string) +{ LLWStringUtil::replaceTabsWithSpaces(clean_string, SPACES_PER_TAB); if( mAllowEmbeddedItems ) { @@ -1429,37 +1471,43 @@ void LLTextEditor::pasteHelper(bool is_primary) } } } +} - // Insert the new text into the existing text. - //paste text with linebreaks. +void LLTextEditor::pasteTextWithLinebreaks(LLWString & clean_string) +{ std::basic_string<llwchar>::size_type start = 0; std::basic_string<llwchar>::size_type pos = clean_string.find('\n',start); - while(pos!=-1) + while((pos != -1) && (pos != clean_string.length() -1)) { if(pos!=start) { std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,pos-start); - setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr())); + setCursorPos(mCursorPos + insert(mCursorPos, str, TRUE, LLTextSegmentPtr())); } - addLineBreakChar(); - + addLineBreakChar(TRUE); // Add a line break and group with the next addition. + start = pos+1; pos = clean_string.find('\n',start); } - std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,clean_string.length()-start); - setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr())); - - deselect(); - - onKeyStroke(); - mParseOnTheFly = TRUE; + if (pos != start) + { + std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,clean_string.length()-start); + setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr())); + } + else + { + addLineBreakChar(FALSE); // Add a line break and end the grouping. + } + } + else + { + addLineBreakChar(FALSE); // Add a line break and end the grouping. + } } - - // copy selection to primary void LLTextEditor::copyPrimary() { @@ -1608,7 +1656,10 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask) { deleteSelection(FALSE); } - autoIndent(); // TODO: make this optional + if (mAutoIndent) + { + autoIndent(); + } } else { @@ -1680,19 +1731,50 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask ) { return FALSE; } - + if (mReadOnly && mScroller) { handled = (mScroller && mScroller->handleKeyHere( key, mask )) || handleSelectionKey(key, mask) || handleControlKey(key, mask); + } + else + { + if (mEnableTooltipPaste && + LLToolTipMgr::instance().toolTipVisible() && + KEY_TAB == key) + { // Paste the first line of a tooltip into the editor + std::string message; + LLToolTipMgr::instance().getToolTipMessage(message); + LLWString tool_tip_text(utf8str_to_wstring(message)); + + if (tool_tip_text.size() > 0) + { + // Delete any selected characters (the tooltip text replaces them) + if(hasSelection()) + { + deleteSelection(TRUE); + } + + std::basic_string<llwchar>::size_type pos = tool_tip_text.find('\n',0); + if (pos != -1) + { // Extract the first line of the tooltip + tool_tip_text = std::basic_string<llwchar>(tool_tip_text, 0, pos); + } + + // Add the text + cleanStringForPaste(tool_tip_text); + pasteTextWithLinebreaks(tool_tip_text); + handled = TRUE; + } + } + else + { // Normal key handling + handled = handleNavigationKey( key, mask ) + || handleSelectionKey(key, mask) + || handleControlKey(key, mask) + || handleSpecialKey(key, mask); } - else - { - handled = handleNavigationKey( key, mask ) - || handleSelectionKey(key, mask) - || handleControlKey(key, mask) - || handleSpecialKey(key, mask); } if( handled ) @@ -1748,7 +1830,7 @@ BOOL LLTextEditor::handleUnicodeCharHere(llwchar uni_char) // virtual BOOL LLTextEditor::canDoDelete() const { - return !mReadOnly && ( hasSelection() || (mCursorPos < getLength()) ); + return !mReadOnly && ( !mPassDelete || ( hasSelection() || (mCursorPos < getLength())) ); } void LLTextEditor::doDelete() @@ -2017,7 +2099,7 @@ void LLTextEditor::drawPreeditMarker() return; } - const S32 line_height = mDefaultFont->getLineHeight(); + const S32 line_height = mFont->getLineHeight(); S32 line_start = getLineStart(cur_line); S32 line_y = mVisibleTextRect.mTop - line_height; @@ -2056,16 +2138,16 @@ void LLTextEditor::drawPreeditMarker() S32 preedit_left = mVisibleTextRect.mLeft; if (left > line_start) { - preedit_left += mDefaultFont->getWidth(text, line_start, left - line_start); + preedit_left += mFont->getWidth(text, line_start, left - line_start); } S32 preedit_right = mVisibleTextRect.mLeft; if (right < line_end) { - preedit_right += mDefaultFont->getWidth(text, line_start, right - line_start); + preedit_right += mFont->getWidth(text, line_start, right - line_start); } else { - preedit_right += mDefaultFont->getWidth(text, line_start, line_end - line_start); + preedit_right += mFont->getWidth(text, line_start, line_end - line_start); } if (mPreeditStandouts[i]) @@ -2446,7 +2528,6 @@ void LLTextEditor::updateSegments() mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); clearSegments(); - segment_set_t::iterator insert_it = mSegments.begin(); for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) { insertSegment(*list_it); @@ -2740,11 +2821,11 @@ BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect const LLWString textString(getWText()); const llwchar * const text = textString.c_str(); - const S32 line_height = mDefaultFont->getLineHeight(); + const S32 line_height = mFont->getLineHeight(); if (coord) { - const S32 query_x = mVisibleTextRect.mLeft + mDefaultFont->getWidth(text, current_line_start, query - current_line_start); + const S32 query_x = mVisibleTextRect.mLeft + mFont->getWidth(text, current_line_start, query - current_line_start); const S32 query_y = mVisibleTextRect.mTop - (current_line - first_visible_line) * line_height - line_height / 2; S32 query_screen_x, query_screen_y; localPointToScreen(query_x, query_y, &query_screen_x, &query_screen_y); @@ -2756,17 +2837,17 @@ BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect S32 preedit_left = mVisibleTextRect.mLeft; if (preedit_left_position > current_line_start) { - preedit_left += mDefaultFont->getWidth(text, current_line_start, preedit_left_position - current_line_start); + preedit_left += mFont->getWidth(text, current_line_start, preedit_left_position - current_line_start); } S32 preedit_right = mVisibleTextRect.mLeft; if (preedit_right_position < current_line_end) { - preedit_right += mDefaultFont->getWidth(text, current_line_start, preedit_right_position - current_line_start); + preedit_right += mFont->getWidth(text, current_line_start, preedit_right_position - current_line_start); } else { - preedit_right += mDefaultFont->getWidth(text, current_line_start, current_line_end - current_line_start); + preedit_right += mFont->getWidth(text, current_line_start, current_line_end - current_line_start); } const S32 preedit_top = mVisibleTextRect.mTop - (current_line - first_visible_line) * line_height; @@ -2843,7 +2924,7 @@ void LLTextEditor::markAsPreedit(S32 position, S32 length) S32 LLTextEditor::getPreeditFontSize() const { - return llround((F32)mDefaultFont->getLineHeight() * LLUI::sGLScaleFactor.mV[VY]); + return llround((F32)mFont->getLineHeight() * LLUI::sGLScaleFactor.mV[VY]); } BOOL LLTextEditor::isDirty() const diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 40821ae9fb..ad46ed45ec 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -64,7 +64,9 @@ public: ignore_tab, show_line_numbers, commit_on_focus_lost, - show_context_menu; + show_context_menu, + enable_tooltip_paste, + auto_indent; //colors Optional<LLUIColor> default_color; @@ -156,6 +158,11 @@ public: BOOL isPristine() const; BOOL allowsEmbeddedItems() const { return mAllowEmbeddedItems; } + // Autoreplace (formerly part of LLLineEditor) + typedef boost::function<void(S32&, S32&, LLWString&, S32&, const LLWString&)> autoreplace_callback_t; + autoreplace_callback_t mAutoreplaceCallback; + void setAutoreplaceCallback(autoreplace_callback_t cb) { mAutoreplaceCallback = cb; } + // // Text manipulation // @@ -202,6 +209,8 @@ public: void setShowContextMenu(bool show) { mShowContextMenu = show; } bool getShowContextMenu() const { return mShowContextMenu; } + void setPassDelete(BOOL b) { mPassDelete = b; } + protected: void showContextMenu(S32 x, S32 y); void drawPreeditMarker(); @@ -214,8 +223,8 @@ protected: S32 indentLine( S32 pos, S32 spaces ); void unindentLineBeforeCloseBrace(); + virtual BOOL handleSpecialKey(const KEY key, const MASK mask); BOOL handleNavigationKey(const KEY key, const MASK mask); - BOOL handleSpecialKey(const KEY key, const MASK mask); BOOL handleSelectionKey(const KEY key, const MASK mask); BOOL handleControlKey(const KEY key, const MASK mask); @@ -239,7 +248,7 @@ protected: // Undoable operations void addChar(llwchar c); // at mCursorPos S32 addChar(S32 pos, llwchar wc); - void addLineBreakChar(); + void addLineBreakChar(BOOL group_together = FALSE); S32 overwriteChar(S32 pos, llwchar wc); void removeChar(); S32 removeChar(S32 pos); @@ -279,6 +288,7 @@ protected: LLUIColor mDefaultColor; BOOL mShowLineNumbers; + bool mAutoIndent; /*virtual*/ void updateSegments(); void updateLinkSegments(); @@ -288,6 +298,8 @@ private: // Methods // void pasteHelper(bool is_primary); + void cleanStringForPaste(LLWString & clean_string); + void pasteTextWithLinebreaks(LLWString & clean_string); void drawLineNumbers(); @@ -321,6 +333,8 @@ private: BOOL mAllowEmbeddedItems; bool mShowContextMenu; bool mParseOnTheFly; + bool mEnableTooltipPaste; + bool mPassDelete; LLUUID mSourceID; diff --git a/indra/llui/lltoggleablemenu.cpp b/indra/llui/lltoggleablemenu.cpp index d29260750f..00d52fe10d 100644 --- a/indra/llui/lltoggleablemenu.cpp +++ b/indra/llui/lltoggleablemenu.cpp @@ -57,7 +57,9 @@ void LLToggleableMenu::handleVisibilityChange (BOOL curVisibilityIn) S32 x,y; LLUI::getMousePositionLocal(LLUI::getRootView(), &x, &y); - if (!curVisibilityIn && mButtonRect.pointInRect(x, y)) + // STORM-1879: also check MouseCapture to see if the button was really + // clicked (otherwise the VisibilityChange was triggered via keyboard shortcut) + if (!curVisibilityIn && mButtonRect.pointInRect(x, y) && gFocusMgr.getMouseCapture()) { mClosedByButtonClick = true; } @@ -99,3 +101,8 @@ bool LLToggleableMenu::toggleVisibility() return true; } + +bool LLToggleableMenu::addChild(LLView* view, S32 tab_group) +{ + return addContextChild(view, tab_group); +} diff --git a/indra/llui/lltoggleablemenu.h b/indra/llui/lltoggleablemenu.h index 2094bd776f..dfe70cbf54 100644 --- a/indra/llui/lltoggleablemenu.h +++ b/indra/llui/lltoggleablemenu.h @@ -47,6 +47,8 @@ public: virtual void handleVisibilityChange (BOOL curVisibilityIn); + virtual bool addChild (LLView* view, S32 tab_group = 0); + const LLRect& getButtonRect() const { return mButtonRect; } // Converts the given local button rect to a screen rect @@ -58,6 +60,8 @@ public: // its visibility off. bool toggleVisibility(); + LLHandle<LLToggleableMenu> getHandle() { return getDerivedHandle<LLToggleableMenu>(); } + protected: bool mClosedByButtonClick; LLRect mButtonRect; diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 81ea0ebf0c..1c74395c66 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -117,7 +117,8 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p) mButtonEnterSignal(NULL), mButtonLeaveSignal(NULL), mButtonRemoveSignal(NULL), - mDragAndDropTarget(false) + mDragAndDropTarget(false), + mCaretIcon(NULL) { mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_WITH_TEXT] = p.button_icon_and_text; mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_ONLY] = p.button_icon; @@ -830,7 +831,12 @@ void LLToolBar::draw() LLUI::translate((F32)getRect().mLeft, (F32)getRect().mBottom); // Position the caret - LLIconCtrl* caret = getChild<LLIconCtrl>("caret"); + if (!mCaretIcon) + { + mCaretIcon = getChild<LLIconCtrl>("caret"); + } + + LLIconCtrl* caret = mCaretIcon; caret->setVisible(FALSE); if (mDragAndDropTarget && !mButtonCommands.empty()) { @@ -866,8 +872,15 @@ void LLToolBar::reshape(S32 width, S32 height, BOOL called_from_parent) void LLToolBar::createButtons() { + std::set<LLUUID> set_flashing; + BOOST_FOREACH(LLToolBarButton* button, mButtons) { + if (button->getFlashTimer() && button->getFlashTimer()->isFlashingInProgress()) + { + set_flashing.insert(button->getCommandId().uuid()); + } + if (mButtonRemoveSignal) { (*mButtonRemoveSignal)(button); @@ -890,6 +903,11 @@ void LLToolBar::createButtons() { (*mButtonAddSignal)(button); } + + if (set_flashing.find(button->getCommandId().uuid()) != set_flashing.end()) + { + button->setFlashing(true); + } } mNeedsLayout = true; } @@ -914,6 +932,7 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id) button_p.label = LLTrans::getString(commandp->labelRef()); button_p.tool_tip = LLTrans::getString(commandp->tooltipRef()); button_p.image_overlay = LLUI::getUIImage(commandp->icon()); + button_p.button_flash_enable = commandp->isFlashingAllowed(); button_p.overwriteFrom(mButtonParams[mButtonType]); LLToolBarButton* button = LLUICtrlFactory::create<LLToolBarButton>(button_p); @@ -1040,10 +1059,9 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // Convert drag position into insert position and rank if (!isReadOnly() && handled && !drop) { - LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; - LLAssetType::EType type = inv_item->getType(); - if (type == LLAssetType::AT_WIDGET) + if (cargo_type == DAD_WIDGET) { + LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; LLCommandId dragged_command(inv_item->getUUID()); int orig_rank = getRankFromPosition(dragged_command); mDragRank = getRankFromPosition(x, y); diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h index a50c60282c..31424a36d4 100644 --- a/indra/llui/lltoolbar.h +++ b/indra/llui/lltoolbar.h @@ -37,6 +37,7 @@ class LLToolBar; class LLToolBarButton; +class LLIconCtrl; typedef boost::function<void (S32 x, S32 y, LLToolBarButton* button)> tool_startdrag_callback_t; typedef boost::function<BOOL (S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)> tool_handledrag_callback_t; @@ -284,6 +285,8 @@ private: button_signal_t* mButtonRemoveSignal; std::string mButtonTooltipSuffix; + + LLIconCtrl* mCaretIcon; }; diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index f737d48abf..f52a3b3323 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -288,7 +288,7 @@ void LLToolTip::initFromParams(const LLToolTip::Params& p) mTextBox->setText(p.message()); } - S32 text_width = llmin(p.max_width(), mTextBox->getTextPixelWidth()); + S32 text_width = llmin(p.max_width(), mTextBox->getTextPixelWidth() + 1); S32 text_height = mTextBox->getTextPixelHeight(); mTextBox->reshape(text_width, text_height); if (mInfoButton) @@ -390,6 +390,15 @@ bool LLToolTip::hasClickCallback() return mHasClickCallback; } +void LLToolTip::getToolTipMessage(std::string & message) +{ + if (mTextBox) + { + message = mTextBox->getText(); + } +} + + // // LLToolTipMgr @@ -594,5 +603,14 @@ void LLToolTipMgr::updateToolTipVisibility() } +// Return the current tooltip text +void LLToolTipMgr::getToolTipMessage(std::string & message) +{ + if (toolTipVisible()) + { + mToolTip->getToolTipMessage(message); + } +} + // EOF diff --git a/indra/llui/lltooltip.h b/indra/llui/lltooltip.h index d71a944c3d..fad127fc4c 100644 --- a/indra/llui/lltooltip.h +++ b/indra/llui/lltooltip.h @@ -105,6 +105,8 @@ public: LLToolTip(const Params& p); void initFromParams(const LLToolTip::Params& params); + void getToolTipMessage(std::string & message); + private: class LLTextBox* mTextBox; class LLButton* mInfoButton; @@ -142,6 +144,8 @@ public: LLRect getMouseNearRect(); void updateToolTipVisibility(); + void getToolTipMessage(std::string & message); + private: void createToolTip(const LLToolTip::Params& params); diff --git a/indra/llui/lltransutil.cpp b/indra/llui/lltransutil.cpp index 58fa8a0828..80d079cbc8 100644 --- a/indra/llui/lltransutil.cpp +++ b/indra/llui/lltransutil.cpp @@ -31,15 +31,20 @@ #include "lltrans.h" #include "lluictrlfactory.h" #include "llxmlnode.h" - +#include "lldir.h" bool LLTransUtil::parseStrings(const std::string& xml_filename, const std::set<std::string>& default_args) { LLXMLNodePtr root; - BOOL success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); + // Pass LLDir::ALL_SKINS to load a composite of all the individual string + // definitions in the default skin and the current skin. This means an + // individual skin can provide an xml_filename that overrides only a + // subset of the available string definitions; any string definition not + // overridden by that skin will be sought in the default skin. + bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root, LLDir::ALL_SKINS); if (!success) { - llerrs << "Couldn't load string table" << llendl; + llerrs << "Couldn't load string table " << xml_filename << llendl; return false; } @@ -54,7 +59,7 @@ bool LLTransUtil::parseLanguageStrings(const std::string& xml_filename) if (!success) { - llerrs << "Couldn't load string table " << xml_filename << llendl; + llerrs << "Couldn't load localization table " << xml_filename << llendl; return false; } diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 87bf518aa1..2a774d54a3 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -77,6 +77,7 @@ std::list<std::string> gUntranslated; /*static*/ LLUI::settings_map_t LLUI::sSettingGroups; /*static*/ LLImageProviderInterface* LLUI::sImageProvider = NULL; /*static*/ LLUIAudioCallback LLUI::sAudioCallback = NULL; +/*static*/ LLUIAudioCallback LLUI::sDeferredAudioCallback = NULL; /*static*/ LLVector2 LLUI::sGLScaleFactor(1.f, 1.f); /*static*/ LLWindow* LLUI::sWindow = NULL; /*static*/ LLView* LLUI::sRootView = NULL; @@ -101,16 +102,18 @@ static LLDefaultChildRegistry::Register<LLToolBar> register_toolbar("toolbar"); // // Functions // -void make_ui_sound(const char* namep) + +LLUUID find_ui_sound(const char * namep) { std::string name = ll_safe_string(namep); + LLUUID uuid = LLUUID(NULL); if (!LLUI::sSettingGroups["config"]->controlExists(name)) { llwarns << "tried to make UI sound for unknown sound name: " << name << llendl; } else { - LLUUID uuid(LLUI::sSettingGroups["config"]->getString(name)); + uuid = LLUUID(LLUI::sSettingGroups["config"]->getString(name)); if (uuid.isNull()) { if (LLUI::sSettingGroups["config"]->getString(name) == LLUUID::null.asString()) @@ -124,7 +127,6 @@ void make_ui_sound(const char* namep) { llwarns << "UI sound named: " << name << " does not translate to a valid uuid" << llendl; } - } else if (LLUI::sAudioCallback != NULL) { @@ -132,9 +134,28 @@ void make_ui_sound(const char* namep) { llinfos << "UI sound name: " << name << llendl; } - LLUI::sAudioCallback(uuid); } } + + return uuid; +} + +void make_ui_sound(const char* namep) +{ + LLUUID soundUUID = find_ui_sound(namep); + if(soundUUID.notNull()) + { + LLUI::sAudioCallback(soundUUID); + } +} + +void make_ui_sound_deferred(const char* namep) +{ + LLUUID soundUUID = find_ui_sound(namep); + if(soundUUID.notNull()) + { + LLUI::sDeferredAudioCallback(soundUUID); + } } BOOL ui_point_in_rect(S32 x, S32 y, S32 left, S32 top, S32 right, S32 bottom) @@ -978,31 +999,31 @@ void gl_rect_2d_checkerboard(const LLRect& rect, GLfloat alpha) { if (!LLGLSLShader::sNoFixedFunction) { - // Initialize the first time this is called. - const S32 PIXELS = 32; - static GLubyte checkerboard[PIXELS * PIXELS]; - static BOOL first = TRUE; - if( first ) + // Initialize the first time this is called. + const S32 PIXELS = 32; + static GLubyte checkerboard[PIXELS * PIXELS]; + static BOOL first = TRUE; + if( first ) + { + for( S32 i = 0; i < PIXELS; i++ ) { - for( S32 i = 0; i < PIXELS; i++ ) + for( S32 j = 0; j < PIXELS; j++ ) { - for( S32 j = 0; j < PIXELS; j++ ) - { - checkerboard[i * PIXELS + j] = ((i & 1) ^ (j & 1)) * 0xFF; - } + checkerboard[i * PIXELS + j] = ((i & 1) ^ (j & 1)) * 0xFF; } - first = FALSE; } + first = FALSE; + } - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - // ...white squares - gGL.color4f( 1.f, 1.f, 1.f, alpha ); - gl_rect_2d(rect); + // ...white squares + gGL.color4f( 1.f, 1.f, 1.f, alpha ); + gl_rect_2d(rect); - // ...gray squares - gGL.color4f( .7f, .7f, .7f, alpha ); - gGL.flush(); + // ...gray squares + gGL.color4f( .7f, .7f, .7f, alpha ); + gGL.flush(); glPolygonStipple( checkerboard ); @@ -1478,148 +1499,137 @@ void gl_segmented_rect_2d_fragment_tex(const S32 left, gGL.popUIMatrix(); } -void gl_segmented_rect_3d_tex(const LLVector2& border_scale, const LLVector3& border_width, - const LLVector3& border_height, const LLVector3& width_vec, const LLVector3& height_vec, - const U32 edges) +void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv_rect, const LLRectf& center_draw_rect, + const LLVector3& width_vec, const LLVector3& height_vec) { - LLVector3 left_border_width = ((edges & (~(U32)ROUNDED_RECT_RIGHT)) != 0) ? border_width : LLVector3::zero; - LLVector3 right_border_width = ((edges & (~(U32)ROUNDED_RECT_LEFT)) != 0) ? border_width : LLVector3::zero; - - LLVector3 top_border_height = ((edges & (~(U32)ROUNDED_RECT_BOTTOM)) != 0) ? border_height : LLVector3::zero; - LLVector3 bottom_border_height = ((edges & (~(U32)ROUNDED_RECT_TOP)) != 0) ? border_height : LLVector3::zero; - - gGL.begin(LLRender::QUADS); { // draw bottom left - gGL.texCoord2f(0.f, 0.f); + gGL.texCoord2f(clip_rect.mLeft, clip_rect.mBottom); gGL.vertex3f(0.f, 0.f, 0.f); - gGL.texCoord2f(border_scale.mV[VX], 0.f); - gGL.vertex3fv(left_border_width.mV); + gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec).mV); - gGL.texCoord2f(border_scale.mV[VX], border_scale.mV[VY]); - gGL.vertex3fv((left_border_width + bottom_border_height).mV); + gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mBottom * height_vec).mV); - gGL.texCoord2f(0.f, border_scale.mV[VY]); - gGL.vertex3fv(bottom_border_height.mV); + gGL.texCoord2f(clip_rect.mLeft, center_uv_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mBottom * height_vec).mV); // draw bottom middle - gGL.texCoord2f(border_scale.mV[VX], 0.f); - gGL.vertex3fv(left_border_width.mV); + gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec).mV); - gGL.texCoord2f(1.f - border_scale.mV[VX], 0.f); - gGL.vertex3fv((width_vec - right_border_width).mV); + gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mRight * width_vec).mV); - gGL.texCoord2f(1.f - border_scale.mV[VX], border_scale.mV[VY]); - gGL.vertex3fv((width_vec - right_border_width + bottom_border_height).mV); + gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mBottom * height_vec).mV); - gGL.texCoord2f(border_scale.mV[VX], border_scale.mV[VY]); - gGL.vertex3fv((left_border_width + bottom_border_height).mV); + gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mBottom * height_vec).mV); // draw bottom right - gGL.texCoord2f(1.f - border_scale.mV[VX], 0.f); - gGL.vertex3fv((width_vec - right_border_width).mV); + gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mRight * width_vec).mV); - gGL.texCoord2f(1.f, 0.f); + gGL.texCoord2f(clip_rect.mRight, clip_rect.mBottom); gGL.vertex3fv(width_vec.mV); - gGL.texCoord2f(1.f, border_scale.mV[VY]); - gGL.vertex3fv((width_vec + bottom_border_height).mV); + gGL.texCoord2f(clip_rect.mRight, center_uv_rect.mBottom); + gGL.vertex3fv((width_vec + center_draw_rect.mBottom * height_vec).mV); - gGL.texCoord2f(1.f - border_scale.mV[VX], border_scale.mV[VY]); - gGL.vertex3fv((width_vec - right_border_width + bottom_border_height).mV); + gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mBottom * height_vec).mV); // draw left - gGL.texCoord2f(0.f, border_scale.mV[VY]); - gGL.vertex3fv(bottom_border_height.mV); + gGL.texCoord2f(clip_rect.mLeft, center_uv_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mBottom * height_vec).mV); - gGL.texCoord2f(border_scale.mV[VX], border_scale.mV[VY]); - gGL.vertex3fv((left_border_width + bottom_border_height).mV); + gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mBottom * height_vec).mV); - gGL.texCoord2f(border_scale.mV[VX], 1.f - border_scale.mV[VY]); - gGL.vertex3fv((left_border_width + height_vec - top_border_height).mV); + gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV); - gGL.texCoord2f(0.f, 1.f - border_scale.mV[VY]); - gGL.vertex3fv((height_vec - top_border_height).mV); + gGL.texCoord2f(clip_rect.mLeft, center_uv_rect.mTop); + gGL.vertex3fv((center_draw_rect.mTop * height_vec).mV); // draw middle - gGL.texCoord2f(border_scale.mV[VX], border_scale.mV[VY]); - gGL.vertex3fv((left_border_width + bottom_border_height).mV); + gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mBottom * height_vec).mV); - gGL.texCoord2f(1.f - border_scale.mV[VX], border_scale.mV[VY]); - gGL.vertex3fv((width_vec - right_border_width + bottom_border_height).mV); + gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mBottom * height_vec).mV); - gGL.texCoord2f(1.f - border_scale.mV[VX], 1.f - border_scale.mV[VY]); - gGL.vertex3fv((width_vec - right_border_width + height_vec - top_border_height).mV); + gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop); + gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mTop * height_vec).mV); - gGL.texCoord2f(border_scale.mV[VX], 1.f - border_scale.mV[VY]); - gGL.vertex3fv((left_border_width + height_vec - top_border_height).mV); + gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV); // draw right - gGL.texCoord2f(1.f - border_scale.mV[VX], border_scale.mV[VY]); - gGL.vertex3fv((width_vec - right_border_width + bottom_border_height).mV); + gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mBottom); + gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mBottom * height_vec).mV); - gGL.texCoord2f(1.f, border_scale.mV[VY]); - gGL.vertex3fv((width_vec + bottom_border_height).mV); + gGL.texCoord2f(clip_rect.mRight, center_uv_rect.mBottom); + gGL.vertex3fv((width_vec + center_draw_rect.mBottom * height_vec).mV); - gGL.texCoord2f(1.f, 1.f - border_scale.mV[VY]); - gGL.vertex3fv((width_vec + height_vec - top_border_height).mV); + gGL.texCoord2f(clip_rect.mRight, center_uv_rect.mTop); + gGL.vertex3fv((width_vec + center_draw_rect.mTop * height_vec).mV); - gGL.texCoord2f(1.f - border_scale.mV[VX], 1.f - border_scale.mV[VY]); - gGL.vertex3fv((width_vec - right_border_width + height_vec - top_border_height).mV); + gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop); + gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mTop * height_vec).mV); // draw top left - gGL.texCoord2f(0.f, 1.f - border_scale.mV[VY]); - gGL.vertex3fv((height_vec - top_border_height).mV); + gGL.texCoord2f(clip_rect.mLeft, center_uv_rect.mTop); + gGL.vertex3fv((center_draw_rect.mTop * height_vec).mV); - gGL.texCoord2f(border_scale.mV[VX], 1.f - border_scale.mV[VY]); - gGL.vertex3fv((left_border_width + height_vec - top_border_height).mV); + gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV); - gGL.texCoord2f(border_scale.mV[VX], 1.f); - gGL.vertex3fv((left_border_width + height_vec).mV); + gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mTop); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec + height_vec).mV); - gGL.texCoord2f(0.f, 1.f); + gGL.texCoord2f(clip_rect.mLeft, clip_rect.mTop); gGL.vertex3fv((height_vec).mV); // draw top middle - gGL.texCoord2f(border_scale.mV[VX], 1.f - border_scale.mV[VY]); - gGL.vertex3fv((left_border_width + height_vec - top_border_height).mV); + gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV); - gGL.texCoord2f(1.f - border_scale.mV[VX], 1.f - border_scale.mV[VY]); - gGL.vertex3fv((width_vec - right_border_width + height_vec - top_border_height).mV); + gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop); + gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mTop * height_vec).mV); - gGL.texCoord2f(1.f - border_scale.mV[VX], 1.f); - gGL.vertex3fv((width_vec - right_border_width + height_vec).mV); + gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mTop); + gGL.vertex3fv((center_draw_rect.mRight * width_vec + height_vec).mV); - gGL.texCoord2f(border_scale.mV[VX], 1.f); - gGL.vertex3fv((left_border_width + height_vec).mV); + gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mTop); + gGL.vertex3fv((center_draw_rect.mLeft * width_vec + height_vec).mV); // draw top right - gGL.texCoord2f(1.f - border_scale.mV[VX], 1.f - border_scale.mV[VY]); - gGL.vertex3fv((width_vec - right_border_width + height_vec - top_border_height).mV); + gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop); + gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mTop * height_vec).mV); - gGL.texCoord2f(1.f, 1.f - border_scale.mV[VY]); - gGL.vertex3fv((width_vec + height_vec - top_border_height).mV); + gGL.texCoord2f(clip_rect.mRight, center_uv_rect.mTop); + gGL.vertex3fv((width_vec + center_draw_rect.mTop * height_vec).mV); - gGL.texCoord2f(1.f, 1.f); + gGL.texCoord2f(clip_rect.mRight, clip_rect.mTop); gGL.vertex3fv((width_vec + height_vec).mV); - gGL.texCoord2f(1.f - border_scale.mV[VX], 1.f); - gGL.vertex3fv((width_vec - right_border_width + height_vec).mV); + gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mTop); + gGL.vertex3fv((center_draw_rect.mRight * width_vec + height_vec).mV); } gGL.end(); } -void gl_segmented_rect_3d_tex_top(const LLVector2& border_scale, const LLVector3& border_width, const LLVector3& border_height, const LLVector3& width_vec, const LLVector3& height_vec) -{ - gl_segmented_rect_3d_tex(border_scale, border_width, border_height, width_vec, height_vec, ROUNDED_RECT_TOP); -} void LLUI::initClass(const settings_map_t& settings, LLImageProviderInterface* image_provider, LLUIAudioCallback audio_callback, + LLUIAudioCallback deferred_audio_callback, const LLVector2* scale_factor, const std::string& language) { @@ -1634,6 +1644,7 @@ void LLUI::initClass(const settings_map_t& settings, sImageProvider = image_provider; sAudioCallback = audio_callback; + sDeferredAudioCallback = deferred_audio_callback; sGLScaleFactor = (scale_factor == NULL) ? LLVector2(1.f, 1.f) : *scale_factor; sWindow = NULL; // set later in startup LLFontGL::sShadowColor = LLUIColorTable::instance().getColor("ColorDropShadow"); @@ -1836,88 +1847,37 @@ struct Paths : public LLInitParam::Block<Paths> {} }; -//static -void LLUI::setupPaths() -{ - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "paths.xml"); - - LLXMLNodePtr root; - BOOL success = LLXMLNode::parseFile(filename, root, NULL); - Paths paths; - - if(success) - { - LLXUIParser parser; - parser.readXUI(root, paths, filename); - } - sXUIPaths.clear(); - - if (success && paths.validateBlock()) - { - LLStringUtil::format_map_t path_args; - path_args["[LANGUAGE]"] = LLUI::getLanguage(); - - for (LLInitParam::ParamIterator<Directory>::const_iterator it = paths.directories.begin(), - end_it = paths.directories.end(); - it != end_it; - ++it) - { - std::string path_val_ui; - for (LLInitParam::ParamIterator<SubDir>::const_iterator subdir_it = it->subdirs.begin(), - subdir_end_it = it->subdirs.end(); - subdir_it != subdir_end_it;) - { - path_val_ui += subdir_it->value(); - if (++subdir_it != subdir_end_it) - path_val_ui += gDirUtilp->getDirDelimiter(); - } - LLStringUtil::format(path_val_ui, path_args); - if (std::find(sXUIPaths.begin(), sXUIPaths.end(), path_val_ui) == sXUIPaths.end()) - { - sXUIPaths.push_back(path_val_ui); - } - - } - } - else // parsing failed - { - std::string slash = gDirUtilp->getDirDelimiter(); - std::string dir = "xui" + slash + "en"; - llwarns << "XUI::config file unable to open: " << filename << llendl; - sXUIPaths.push_back(dir); - } -} - //static std::string LLUI::locateSkin(const std::string& filename) { - std::string slash = gDirUtilp->getDirDelimiter(); std::string found_file = filename; - if (!gDirUtilp->fileExists(found_file)) + if (gDirUtilp->fileExists(found_file)) { - found_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename); // Should be CUSTOM_SKINS? + return found_file; } - if (sSettingGroups["config"] && sSettingGroups["config"]->controlExists("Language")) + + found_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename); // Should be CUSTOM_SKINS? + if (gDirUtilp->fileExists(found_file)) { - if (!gDirUtilp->fileExists(found_file)) - { - std::string localization = getLanguage(); - std::string local_skin = "xui" + slash + localization + slash + filename; - found_file = gDirUtilp->findSkinnedFilename(local_skin); - } + return found_file; } - if (!gDirUtilp->fileExists(found_file)) + + found_file = gDirUtilp->findSkinnedFilename(LLDir::XUI, filename); + if (! found_file.empty()) { - std::string local_skin = "xui" + slash + "en" + slash + filename; - found_file = gDirUtilp->findSkinnedFilename(local_skin); + return found_file; } - if (!gDirUtilp->fileExists(found_file)) + + found_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, filename); + if (gDirUtilp->fileExists(found_file)) { - found_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, filename); + return found_file; } - return found_file; -} + LL_WARNS("LLUI") << "Can't find '" << filename + << "' in user settings, any skin directory or app_settings" << LL_ENDL; + return ""; +} //static LLVector2 LLUI::getWindowSize() @@ -2118,7 +2078,7 @@ const LLView* LLUI::resolvePath(const LLView* context, const std::string& path) namespace LLInitParam { - ParamValue<LLUIColor, TypeValues<LLUIColor> >::ParamValue(const LLUIColor& color) + ParamValue<LLUIColor>::ParamValue(const LLUIColor& color) : super_t(color), red("red"), green("green"), @@ -2129,7 +2089,7 @@ namespace LLInitParam updateBlockFromValue(false); } - void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateValueFromBlock() + void ParamValue<LLUIColor>::updateValueFromBlock() { if (control.isProvided() && !control().empty()) { @@ -2141,7 +2101,7 @@ namespace LLInitParam } } - void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateBlockFromValue(bool make_block_authoritative) + void ParamValue<LLUIColor>::updateBlockFromValue(bool make_block_authoritative) { LLColor4 color = getValue(); red.set(color.mV[VRED], make_block_authoritative); @@ -2157,7 +2117,7 @@ namespace LLInitParam && !(b->getFontDesc() < a->getFontDesc()); } - ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::ParamValue(const LLFontGL* fontp) + ParamValue<const LLFontGL*>::ParamValue(const LLFontGL* fontp) : super_t(fontp), name("name"), size("size"), @@ -2171,7 +2131,7 @@ namespace LLInitParam updateBlockFromValue(false); } - void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateValueFromBlock() + void ParamValue<const LLFontGL*>::updateValueFromBlock() { const LLFontGL* res_fontp = LLFontGL::getFontByName(name); if (res_fontp) @@ -2194,7 +2154,7 @@ namespace LLInitParam } } - void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateBlockFromValue(bool make_block_authoritative) + void ParamValue<const LLFontGL*>::updateBlockFromValue(bool make_block_authoritative) { if (getValue()) { @@ -2204,7 +2164,7 @@ namespace LLInitParam } } - ParamValue<LLRect, TypeValues<LLRect> >::ParamValue(const LLRect& rect) + ParamValue<LLRect>::ParamValue(const LLRect& rect) : super_t(rect), left("left"), top("top"), @@ -2216,7 +2176,7 @@ namespace LLInitParam updateBlockFromValue(false); } - void ParamValue<LLRect, TypeValues<LLRect> >::updateValueFromBlock() + void ParamValue<LLRect>::updateValueFromBlock() { LLRect rect; @@ -2280,7 +2240,7 @@ namespace LLInitParam updateValue(rect); } - void ParamValue<LLRect, TypeValues<LLRect> >::updateBlockFromValue(bool make_block_authoritative) + void ParamValue<LLRect>::updateBlockFromValue(bool make_block_authoritative) { // because of the ambiguity in specifying a rect by position and/or dimensions // we use the lowest priority pairing so that any valid pairing in xui @@ -2297,7 +2257,7 @@ namespace LLInitParam height.set(value.getHeight(), make_block_authoritative); } - ParamValue<LLCoordGL, TypeValues<LLCoordGL> >::ParamValue(const LLCoordGL& coord) + ParamValue<LLCoordGL>::ParamValue(const LLCoordGL& coord) : super_t(coord), x("x"), y("y") @@ -2305,12 +2265,12 @@ namespace LLInitParam updateBlockFromValue(false); } - void ParamValue<LLCoordGL, TypeValues<LLCoordGL> >::updateValueFromBlock() + void ParamValue<LLCoordGL>::updateValueFromBlock() { updateValue(LLCoordGL(x, y)); } - void ParamValue<LLCoordGL, TypeValues<LLCoordGL> >::updateBlockFromValue(bool make_block_authoritative) + void ParamValue<LLCoordGL>::updateBlockFromValue(bool make_block_authoritative) { x.set(getValue().mX, make_block_authoritative); y.set(getValue().mY, make_block_authoritative); diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 28e84fa444..4c1703392a 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -62,6 +62,7 @@ class LLHelp; // UI colors extern const LLColor4 UI_VERTEX_COLOR; void make_ui_sound(const char* name); +void make_ui_sound_deferred(const char * name); BOOL ui_point_in_rect(S32 x, S32 y, S32 left, S32 top, S32 right, S32 bottom); void gl_state_for_2d(S32 width, S32 height); @@ -127,8 +128,7 @@ typedef enum e_rounded_edge void gl_segmented_rect_2d_tex(const S32 left, const S32 top, const S32 right, const S32 bottom, const S32 texture_width, const S32 texture_height, const S32 border_size, const U32 edges = ROUNDED_RECT_ALL); void gl_segmented_rect_2d_fragment_tex(const S32 left, const S32 top, const S32 right, const S32 bottom, const S32 texture_width, const S32 texture_height, const S32 border_size, const F32 start_fragment, const F32 end_fragment, const U32 edges = ROUNDED_RECT_ALL); -void gl_segmented_rect_3d_tex(const LLVector2& border_scale, const LLVector3& border_width, const LLVector3& border_height, const LLVector3& width_vec, const LLVector3& height_vec, U32 edges = ROUNDED_RECT_ALL); -void gl_segmented_rect_3d_tex_top(const LLVector2& border_scale, const LLVector3& border_width, const LLVector3& border_height, const LLVector3& width_vec, const LLVector3& height_vec); +void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv_rect, const LLRectf& center_draw_rect, const LLVector3& width_vec, const LLVector3& height_vec); inline void gl_rect_2d( const LLRect& rect, BOOL filled ) { @@ -275,6 +275,7 @@ public: static void initClass(const settings_map_t& settings, LLImageProviderInterface* image_provider, LLUIAudioCallback audio_callback = NULL, + LLUIAudioCallback deferred_audio_callback = NULL, const LLVector2 *scale_factor = NULL, const std::string& language = LLStringUtil::null); static void cleanupClass(); @@ -292,11 +293,6 @@ public: // Return the ISO639 language name ("en", "ko", etc.) for the viewer UI. // http://www.loc.gov/standards/iso639-2/php/code_list.php static std::string getLanguage(); - - static void setupPaths(); - static const std::vector<std::string>& getXUIPaths() { return sXUIPaths; } - static std::string getSkinPath() { return sXUIPaths.front(); } - static std::string getLocalizedSkinPath() { return sXUIPaths.back(); } //all files may not exist at the localized path //helper functions (should probably move free standing rendering helper functions here) static LLView* getRootView() { return sRootView; } @@ -365,6 +361,7 @@ public: // static settings_map_t sSettingGroups; static LLUIAudioCallback sAudioCallback; + static LLUIAudioCallback sDeferredAudioCallback; static LLVector2 sGLScaleFactor; static LLWindow* sWindow; static LLView* sRootView; @@ -512,7 +509,7 @@ public: namespace LLInitParam { template<> - class ParamValue<LLRect, TypeValues<LLRect> > + class ParamValue<LLRect> : public CustomParamValue<LLRect> { typedef CustomParamValue<LLRect> super_t; @@ -531,7 +528,7 @@ namespace LLInitParam }; template<> - class ParamValue<LLUIColor, TypeValues<LLUIColor> > + class ParamValue<LLUIColor> : public CustomParamValue<LLUIColor> { typedef CustomParamValue<LLUIColor> super_t; @@ -549,7 +546,7 @@ namespace LLInitParam }; template<> - class ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> > + class ParamValue<const LLFontGL*> : public CustomParamValue<const LLFontGL* > { typedef CustomParamValue<const LLFontGL*> super_t; @@ -589,7 +586,7 @@ namespace LLInitParam template<> - class ParamValue<LLCoordGL, TypeValues<LLCoordGL> > + class ParamValue<LLCoordGL> : public CustomParamValue<LLCoordGL> { typedef CustomParamValue<LLCoordGL> super_t; diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp index 9455d09cc0..ffeff15968 100644 --- a/indra/llui/lluicolortable.cpp +++ b/indra/llui/lluicolortable.cpp @@ -32,6 +32,7 @@ #include "llui.h" #include "lluicolortable.h" #include "lluictrlfactory.h" +#include <boost/foreach.hpp> LLUIColorTable::ColorParams::ColorParams() : value("value"), @@ -206,19 +207,12 @@ bool LLUIColorTable::loadFromSettings() { bool result = false; - std::string default_filename = gDirUtilp->getExpandedFilename(LL_PATH_DEFAULT_SKIN, "colors.xml"); - result |= loadFromFilename(default_filename, mLoadedColors); - - std::string current_filename = gDirUtilp->getExpandedFilename(LL_PATH_TOP_SKIN, "colors.xml"); - if(current_filename != default_filename) - { - result |= loadFromFilename(current_filename, mLoadedColors); - } - - current_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors.xml"); - if(current_filename != default_filename) + // pass constraint=LLDir::ALL_SKINS because we want colors.xml from every + // skin dir + BOOST_FOREACH(std::string colors_path, + gDirUtilp->findSkinnedFilenames(LLDir::SKINBASE, "colors.xml", LLDir::ALL_SKINS)) { - result |= loadFromFilename(current_filename, mLoadedColors); + result |= loadFromFilename(colors_path, mLoadedColors); } std::string user_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "colors.xml"); diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 25e7a31e90..60fee47ae0 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -90,10 +90,12 @@ LLUICtrlFactory::~LLUICtrlFactory() void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitParam::BaseBlock& block) { - std::string filename = std::string("widgets") + gDirUtilp->getDirDelimiter() + widget_tag + ".xml"; + std::string filename = gDirUtilp->add("widgets", widget_tag + ".xml"); LLXMLNodePtr root_node; - std::string full_filename = gDirUtilp->findSkinnedFilename(LLUI::getXUIPaths().front(), filename); + // Here we're looking for the "en" version, the default-language version + // of the file, rather than the localized version. + std::string full_filename = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, filename); if (!full_filename.empty()) { LLUICtrlFactory::instance().pushFileName(full_filename); @@ -149,22 +151,12 @@ static LLFastTimer::DeclareTimer FTM_XML_PARSE("XML Reading/Parsing"); //----------------------------------------------------------------------------- // getLayeredXMLNode() //----------------------------------------------------------------------------- -bool LLUICtrlFactory::getLayeredXMLNode(const std::string &xui_filename, LLXMLNodePtr& root) +bool LLUICtrlFactory::getLayeredXMLNode(const std::string &xui_filename, LLXMLNodePtr& root, + LLDir::ESkinConstraint constraint) { LLFastTimer timer(FTM_XML_PARSE); - - std::vector<std::string> paths; - std::string path = gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), xui_filename); - if (!path.empty()) - { - paths.push_back(path); - } - - std::string localize_path = gDirUtilp->findSkinnedFilename(LLUI::getLocalizedSkinPath(), xui_filename); - if (!localize_path.empty() && localize_path != path) - { - paths.push_back(localize_path); - } + std::vector<std::string> paths = + gDirUtilp->findSkinnedFilenames(LLDir::XUI, xui_filename, constraint); if (paths.empty()) { @@ -177,23 +169,6 @@ bool LLUICtrlFactory::getLayeredXMLNode(const std::string &xui_filename, LLXMLNo //----------------------------------------------------------------------------- -// getLocalizedXMLNode() -//----------------------------------------------------------------------------- -bool LLUICtrlFactory::getLocalizedXMLNode(const std::string &xui_filename, LLXMLNodePtr& root) -{ - LLFastTimer timer(FTM_XML_PARSE); - std::string full_filename = gDirUtilp->findSkinnedFilename(LLUI::getLocalizedSkinPath(), xui_filename); - if (!LLXMLNode::parseFile(full_filename, root, NULL)) - { - return false; - } - else - { - return true; - } -} - -//----------------------------------------------------------------------------- // saveToXML() //----------------------------------------------------------------------------- S32 LLUICtrlFactory::saveToXML(LLView* viewp, const std::string& filename) @@ -239,8 +214,10 @@ std::string LLUICtrlFactory::getCurFileName() void LLUICtrlFactory::pushFileName(const std::string& name) -{ - mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), name)); +{ + // Here we seem to be looking for the default language file ("en") rather + // than the localized one, if any. + mFileNames.push_back(gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, name)); } void LLUICtrlFactory::popFileName() @@ -255,14 +232,6 @@ void LLUICtrlFactory::setCtrlParent(LLView* view, LLView* parent, S32 tab_group) parent->addChild(view, tab_group); } - -// Avoid directly using LLUI and LLDir in the template code -//static -std::string LLUICtrlFactory::findSkinnedFilename(const std::string& filename) -{ - return gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), filename); -} - //static void LLUICtrlFactory::copyName(LLXMLNodePtr src, LLXMLNodePtr dest) { @@ -278,13 +247,13 @@ const LLInitParam::BaseBlock& get_empty_param_block() // adds a widget and its param block to various registries //static -void LLUICtrlFactory::registerWidget(const std::type_info* widget_type, const std::type_info* param_block_type, const std::string& tag) +void LLUICtrlFactory::registerWidget(const std::type_info* widget_type, const std::type_info* param_block_type, const std::string& name) { // associate parameter block type with template .xml file - std::string* existing_tag = LLWidgetNameRegistry::instance().getValue(param_block_type); - if (existing_tag != NULL) + std::string* existing_name = LLWidgetNameRegistry::instance().getValue(param_block_type); + if (existing_name != NULL) { - if(*existing_tag != tag) + if(*existing_name != name) { std::cerr << "Duplicate entry for T::Params, try creating empty param block in derived classes that inherit T::Params" << std::endl; // forcing crash here @@ -293,19 +262,15 @@ void LLUICtrlFactory::registerWidget(const std::type_info* widget_type, const st } else { - // widget already registered + // widget already registered this name return; } } - LLWidgetNameRegistry::instance().defaultRegistrar().add(param_block_type, tag); + + LLWidgetNameRegistry::instance().defaultRegistrar().add(param_block_type, name); //FIXME: comment this in when working on schema generation //LLWidgetTypeRegistry::instance().defaultRegistrar().add(tag, widget_type); //LLDefaultParamBlockRegistry::instance().defaultRegistrar().add(widget_type, &get_empty_param_block<T>); } -//static -const std::string* LLUICtrlFactory::getWidgetTag(const std::type_info* widget_type) -{ - return LLWidgetNameRegistry::instance().getValue(widget_type); -} diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index d612ad5005..876bb5ef46 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -31,18 +31,11 @@ #include "llinitparam.h" #include "llregistry.h" #include "llxuiparser.h" +#include "llstl.h" +#include "lldir.h" class LLView; -// sort functor for typeid maps -struct LLCompareTypeID -{ - bool operator()(const std::type_info* lhs, const std::type_info* rhs) const - { - return lhs->before(*rhs); - } -}; - // lookup widget constructor funcs by widget name template <typename DERIVED_TYPE> class LLChildRegistry : public LLRegistrySingleton<std::string, LLWidgetCreatorFunc, DERIVED_TYPE> @@ -71,14 +64,14 @@ protected: // lookup widget name by type class LLWidgetNameRegistry -: public LLRegistrySingleton<const std::type_info*, std::string, LLWidgetNameRegistry , LLCompareTypeID> +: public LLRegistrySingleton<const std::type_info*, std::string, LLWidgetNameRegistry> {}; // lookup function for generating empty param block by widget type // this is used for schema generation //typedef const LLInitParam::BaseBlock& (*empty_param_block_func_t)(); //class LLDefaultParamBlockRegistry -//: public LLRegistrySingleton<const std::type_info*, empty_param_block_func_t, LLDefaultParamBlockRegistry, LLCompareTypeID> +//: public LLRegistrySingleton<const std::type_info*, empty_param_block_func_t, LLDefaultParamBlockRegistry> //{}; extern LLFastTimer::DeclareTimer FTM_WIDGET_SETUP; @@ -105,7 +98,7 @@ private: ParamDefaults() { // look up template file for this param block... - const std::string* param_block_tag = getWidgetTag(&typeid(PARAM_BLOCK)); + const std::string* param_block_tag = LLWidgetNameRegistry::instance().getValue(&typeid(PARAM_BLOCK)); if (param_block_tag) { // ...and if it exists, back fill values using the most specific template first PARAM_BLOCK params; @@ -139,7 +132,6 @@ public: template<typename T> static const typename T::Params& getDefaultParams() { - //#pragma message("Generating ParamDefaults") return ParamDefaults<typename T::Params, 0>::instance().get(); } @@ -169,32 +161,21 @@ public: LLView* createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t&, LLXMLNodePtr output_node ); template<typename T> - static T* createFromFile(const std::string &filename, LLView *parent, const widget_registry_t& registry, LLXMLNodePtr output_node = NULL) + static T* createFromFile(const std::string &filename, LLView *parent, const widget_registry_t& registry) { T* widget = NULL; - - std::string skinned_filename = findSkinnedFilename(filename); + instance().pushFileName(filename); { LLXMLNodePtr root_node; - //if exporting, only load the language being exported, - //instead of layering localized version on top of english - if (output_node) - { - if (!LLUICtrlFactory::getLocalizedXMLNode(filename, root_node)) - { - llwarns << "Couldn't parse XUI file: " << filename << llendl; - goto fail; - } - } - else if (!LLUICtrlFactory::getLayeredXMLNode(filename, root_node)) + if (!LLUICtrlFactory::getLayeredXMLNode(filename, root_node)) { - llwarns << "Couldn't parse XUI file: " << skinned_filename << llendl; + llwarns << "Couldn't parse XUI file: " << instance().getCurFileName() << llendl; goto fail; } - - LLView* view = getInstance()->createFromXML(root_node, parent, filename, registry, output_node); + + LLView* view = getInstance()->createFromXML(root_node, parent, filename, registry, NULL); if (view) { widget = dynamic_cast<T*>(view); @@ -222,8 +203,8 @@ fail: static void createChildren(LLView* viewp, LLXMLNodePtr node, const widget_registry_t&, LLXMLNodePtr output_node = NULL); - static bool getLayeredXMLNode(const std::string &filename, LLXMLNodePtr& root); - static bool getLocalizedXMLNode(const std::string &xui_filename, LLXMLNodePtr& root); + static bool getLayeredXMLNode(const std::string &filename, LLXMLNodePtr& root, + LLDir::ESkinConstraint constraint=LLDir::CURRENT_SKIN); private: //NOTE: both friend declarations are necessary to keep both gcc and msvc happy @@ -303,14 +284,9 @@ private: } - static const std::string* getWidgetTag(const std::type_info* widget_type); - // this exists to get around dependency on llview static void setCtrlParent(LLView* view, LLView* parent, S32 tab_group); - // Avoid directly using LLUI and LLDir in the template code - static std::string findSkinnedFilename(const std::string& filename); - class LLPanel* mDummyPanel; std::vector<std::string> mFileNames; }; diff --git a/indra/llui/lluiimage.cpp b/indra/llui/lluiimage.cpp index 1d9ce29ba9..9ed98f941f 100644 --- a/indra/llui/lluiimage.cpp +++ b/indra/llui/lluiimage.cpp @@ -112,6 +112,50 @@ void LLUIImage::drawBorder(S32 x, S32 y, S32 width, S32 height, const LLColor4& drawSolid(border_rect, color); } +void LLUIImage::draw3D(const LLVector3& origin_agent, const LLVector3& x_axis, const LLVector3& y_axis, + const LLRect& rect, const LLColor4& color) +{ + F32 border_scale = 1.f; + F32 border_height = (1.f - mScaleRegion.getHeight()) * getHeight(); + F32 border_width = (1.f - mScaleRegion.getWidth()) * getWidth(); + if (rect.getHeight() < border_height || rect.getWidth() < border_width) + { + if(border_height - rect.getHeight() > border_width - rect.getWidth()) + { + border_scale = (F32)rect.getHeight() / border_height; + } + else + { + border_scale = (F32)rect.getWidth() / border_width; + } + } + + LLUI::pushMatrix(); + { + LLVector3 rect_origin = origin_agent + (rect.mLeft * x_axis) + (rect.mBottom * y_axis); + LLUI::translate(rect_origin.mV[VX], + rect_origin.mV[VY], + rect_origin.mV[VZ]); + gGL.getTexUnit(0)->bind(getImage()); + gGL.color4fv(color.mV); + + LLRectf center_uv_rect(mClipRegion.mLeft + mScaleRegion.mLeft * mClipRegion.getWidth(), + mClipRegion.mBottom + mScaleRegion.mTop * mClipRegion.getHeight(), + mClipRegion.mLeft + mScaleRegion.mRight * mClipRegion.getWidth(), + mClipRegion.mBottom + mScaleRegion.mBottom * mClipRegion.getHeight()); + gl_segmented_rect_3d_tex(mClipRegion, + center_uv_rect, + LLRectf(border_width * border_scale * 0.5f / (F32)rect.getWidth(), + (rect.getHeight() - (border_height * border_scale * 0.5f)) / (F32)rect.getHeight(), + (rect.getWidth() - (border_width * border_scale * 0.5f)) / (F32)rect.getWidth(), + (border_height * border_scale * 0.5f) / (F32)rect.getHeight()), + rect.getWidth() * x_axis, + rect.getHeight() * y_axis); + + } LLUI::popMatrix(); +} + + S32 LLUIImage::getWidth() const { // return clipped dimensions of actual image area @@ -155,7 +199,7 @@ void LLUIImage::onImageLoaded() namespace LLInitParam { - void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateValueFromBlock() + void ParamValue<LLUIImage*>::updateValueFromBlock() { // The keyword "none" is specifically requesting a null image // do not default to current value. Used to overwrite template images. @@ -172,7 +216,7 @@ namespace LLInitParam } } - void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateBlockFromValue(bool make_block_authoritative) + void ParamValue<LLUIImage*>::updateBlockFromValue(bool make_block_authoritative) { if (getValue() == NULL) { diff --git a/indra/llui/lluiimage.h b/indra/llui/lluiimage.h index f07e8fa746..7817ba1c7b 100644 --- a/indra/llui/lluiimage.h +++ b/indra/llui/lluiimage.h @@ -64,7 +64,9 @@ public: void drawBorder(S32 x, S32 y, S32 width, S32 height, const LLColor4& color, S32 border_width) const; void drawBorder(const LLRect& rect, const LLColor4& color, S32 border_width) const { drawBorder(rect.mLeft, rect.mBottom, rect.getWidth(), rect.getHeight(), color, border_width); } void drawBorder(S32 x, S32 y, const LLColor4& color, S32 border_width) const { drawBorder(x, y, getWidth(), getHeight(), color, border_width); } - + + void draw3D(const LLVector3& origin_agent, const LLVector3& x_axis, const LLVector3& y_axis, const LLRect& rect, const LLColor4& color); + const std::string& getName() const { return mName; } virtual S32 getWidth() const; @@ -92,7 +94,7 @@ protected: namespace LLInitParam { template<> - class ParamValue<LLUIImage*, TypeValues<LLUIImage*> > + class ParamValue<LLUIImage*> : public CustomParamValue<LLUIImage*> { typedef boost::add_reference<boost::add_const<LLUIImage*>::type>::type T_const_ref; @@ -100,7 +102,7 @@ namespace LLInitParam public: Optional<std::string> name; - ParamValue(LLUIImage* const& image) + ParamValue(LLUIImage* const& image = NULL) : super_t(image) { updateBlockFromValue(false); diff --git a/indra/llui/llurlaction.cpp b/indra/llui/llurlaction.cpp index fd9b3d9a6d..f51aeaec13 100644 --- a/indra/llui/llurlaction.cpp +++ b/indra/llui/llurlaction.cpp @@ -24,7 +24,6 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ - #include "linden_common.h" #include "llurlaction.h" @@ -32,6 +31,7 @@ #include "llwindow.h" #include "llurlregistry.h" + // global state for the callback functions LLUrlAction::url_callback_t LLUrlAction::sOpenURLCallback; LLUrlAction::url_callback_t LLUrlAction::sOpenURLInternalCallback; @@ -157,3 +157,34 @@ void LLUrlAction::showProfile(std::string url) } } } + +std::string LLUrlAction::getUserID(std::string url) +{ + LLURI uri(url); + LLSD path_array = uri.pathArray(); + std::string id_str; + if (path_array.size() == 4) + { + id_str = path_array.get(2).asString(); + } + return id_str; +} + +void LLUrlAction::sendIM(std::string url) +{ + std::string id_str = getUserID(url); + if (LLUUID::validate(id_str)) + { + executeSLURL("secondlife:///app/agent/" + id_str + "/im"); + } +} + +void LLUrlAction::addFriend(std::string url) +{ + std::string id_str = getUserID(url); + if (LLUUID::validate(id_str)) + { + executeSLURL("secondlife:///app/agent/" + id_str + "/requestfriend"); + } +} + diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h index c34960b826..e31cd71a20 100644 --- a/indra/llui/llurlaction.h +++ b/indra/llui/llurlaction.h @@ -76,6 +76,9 @@ public: /// if the Url specifies an SL command in the form like 'app/{cmd}/{id}/*', show its profile static void showProfile(std::string url); + static std::string getUserID(std::string url); + static void sendIM(std::string url); + static void addFriend(std::string url); /// specify the callbacks to enable this class's functionality typedef boost::function<void (const std::string&)> url_callback_t; diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index a9e8fbb4e4..99ee688888 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -340,7 +340,8 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const // secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about // x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about // -LLUrlEntryAgent::LLUrlEntryAgent() +LLUrlEntryAgent::LLUrlEntryAgent() : + mAvatarNameCacheConnection() { mPattern = boost::regex(APP_HEADER_REGEX "/agent/[\\da-f-]+/\\w+", boost::regex::perl|boost::regex::icase); @@ -371,7 +372,9 @@ void LLUrlEntryAgent::callObservers(const std::string &id, void LLUrlEntryAgent::onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name) { - std::string label = av_name.getCompleteName(); + mAvatarNameCacheConnection.disconnect(); + + std::string label = av_name.getCompleteName(); // received the agent name from the server - tell our observers callObservers(id.asString(), label, mIcon); @@ -456,9 +459,11 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa } else { - LLAvatarNameCache::get(agent_id, - boost::bind(&LLUrlEntryAgent::onAvatarNameCache, - this, _1, _2)); + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgent::onAvatarNameCache, this, _1, _2)); addObserver(agent_id_string, url, cb); return LLTrans::getString("LoadingData"); } @@ -515,12 +520,15 @@ std::string LLUrlEntryAgent::getIcon(const std::string &url) // secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/(completename|displayname|username) // x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/(completename|displayname|username) // -LLUrlEntryAgentName::LLUrlEntryAgentName() +LLUrlEntryAgentName::LLUrlEntryAgentName() : + mAvatarNameCacheConnection() {} void LLUrlEntryAgentName::onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name) { + mAvatarNameCacheConnection.disconnect(); + std::string label = getName(av_name); // received the agent name from the server - tell our observers callObservers(id.asString(), label, mIcon); @@ -554,9 +562,11 @@ std::string LLUrlEntryAgentName::getLabel(const std::string &url, const LLUrlLab } else { - LLAvatarNameCache::get(agent_id, - boost::bind(&LLUrlEntryAgentCompleteName::onAvatarNameCache, - this, _1, _2)); + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgentName::onAvatarNameCache, this, _1, _2)); addObserver(agent_id_string, url, cb); return LLTrans::getString("LoadingData"); } @@ -597,7 +607,7 @@ LLUrlEntryAgentDisplayName::LLUrlEntryAgentDisplayName() std::string LLUrlEntryAgentDisplayName::getName(const LLAvatarName& avatar_name) { - return avatar_name.mDisplayName; + return avatar_name.getDisplayName(); } // @@ -613,7 +623,7 @@ LLUrlEntryAgentUserName::LLUrlEntryAgentUserName() std::string LLUrlEntryAgentUserName::getName(const LLAvatarName& avatar_name) { - return avatar_name.mUsername.empty() ? avatar_name.getLegacyName() : avatar_name.mUsername; + return avatar_name.getAccountName(); } // diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 5f82721c0f..8c6c32178a 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -171,6 +171,13 @@ class LLUrlEntryAgent : public LLUrlEntryBase { public: LLUrlEntryAgent(); + ~LLUrlEntryAgent() + { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + } /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); /*virtual*/ std::string getIcon(const std::string &url); /*virtual*/ std::string getTooltip(const std::string &string) const; @@ -181,6 +188,7 @@ protected: /*virtual*/ void callObservers(const std::string &id, const std::string &label, const std::string& icon); private: void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name); + boost::signals2::connection mAvatarNameCacheConnection; }; /// @@ -192,6 +200,13 @@ class LLUrlEntryAgentName : public LLUrlEntryBase, public boost::signals2::track { public: LLUrlEntryAgentName(); + ~LLUrlEntryAgentName() + { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + } /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); /*virtual*/ LLStyle::Params getStyle() const; protected: @@ -199,6 +214,7 @@ protected: virtual std::string getName(const LLAvatarName& avatar_name) = 0; private: void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name); + boost::signals2::connection mAvatarNameCacheConnection; }; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 54843227b7..3613a40e2c 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -55,6 +55,8 @@ #include "lltexteditor.h" #include "lltextbox.h" +static const S32 LINE_HEIGHT = 15; + S32 LLView::sDepth = 0; bool LLView::sDebugRects = false; bool LLView::sDebugRectsShowNames = true; @@ -349,7 +351,7 @@ void LLView::removeChild(LLView* child) } else { - llwarns << child->getName() << "is not a child of " << getName() << llendl; + llwarns << "\"" << child->getName() << "\" is not a child of " << getName() << llendl; } updateBoundingRect(); } @@ -873,13 +875,12 @@ BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask) // allow "scrubbing" over ui by showing next tooltip immediately // if previous one was still visible F32 timeout = LLToolTipMgr::instance().toolTipVisible() - ? LLUI::sSettingGroups["config"]->getF32( "ToolTipFastDelay" ) - : LLUI::sSettingGroups["config"]->getF32( "ToolTipDelay" ); + ? LLUI::sSettingGroups["config"]->getF32( "ToolTipFastDelay" ) + : LLUI::sSettingGroups["config"]->getF32( "ToolTipDelay" ); LLToolTipMgr::instance().show(LLToolTip::Params() - .message(tooltip) - .sticky_rect(calcScreenRect()) - .delay_time(timeout)); - + .message(tooltip) + .sticky_rect(calcScreenRect()) + .delay_time(timeout)); handled = TRUE; } @@ -1204,11 +1205,24 @@ void LLView::drawDebugRect() && preview_iter == sPreviewHighlightedElements.end() && sDebugRectsShowNames) { - //char temp[256]; S32 x, y; gGL.color4fv( border_color.mV ); - x = debug_rect.getWidth()/2; - y = debug_rect.getHeight()/2; + + x = debug_rect.getWidth() / 2; + + S32 rect_height = debug_rect.getHeight(); + S32 lines = rect_height / LINE_HEIGHT + 1; + + S32 depth = 0; + LLView * viewp = this; + while (NULL != viewp) + { + viewp = viewp->getParent(); + depth++; + } + + y = rect_height - LINE_HEIGHT * (depth % lines + 1); + std::string debug_text = llformat("%s (%d x %d)", getName().c_str(), debug_rect.getWidth(), debug_rect.getHeight()); LLFontGL::getFontSansSerifSmall()->renderUTF8(debug_text, 0, (F32)x, (F32)y, border_color, @@ -1549,16 +1563,18 @@ void LLView::screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* l void LLView::localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const { - *screen_x = local_x + getRect().mLeft; - *screen_y = local_y + getRect().mBottom; + *screen_x = local_x; + *screen_y = local_y; const LLView* cur = this; - while( cur->mParentView ) + do { + LLRect cur_rect = cur->getRect(); + *screen_x += cur_rect.mLeft; + *screen_y += cur_rect.mBottom; cur = cur->mParentView; - *screen_x += cur->getRect().mLeft; - *screen_y += cur->getRect().mBottom; } + while( cur ); } void LLView::screenRectToLocal(const LLRect& screen, LLRect* local) const diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 1c35349510..15b85a6418 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -67,7 +67,6 @@ const BOOL NOT_MOUSE_OPAQUE = FALSE; const U32 GL_NAME_UI_RESERVED = 2; - // maintains render state during traversal of UI tree class LLViewDrawContext { diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp index afc76024d1..3ad5ad7d42 100644 --- a/indra/llui/llxuiparser.cpp +++ b/indra/llui/llxuiparser.cpp @@ -42,7 +42,7 @@ #include <boost/spirit/include/classic_core.hpp> #include "lluicolor.h" - +#include "v3math.h" using namespace BOOST_SPIRIT_CLASSIC_NS; const S32 MAX_STRING_ATTRIBUTE_SIZE = 40; @@ -79,7 +79,6 @@ struct Occurs : public LLInitParam::Block<Occurs> {} }; - typedef enum { USE_REQUIRED, @@ -101,14 +100,23 @@ namespace LLInitParam struct Element; struct Group; -struct Choice; struct Sequence; -struct Any; + +struct All : public LLInitParam::Block<All, Occurs> +{ + Multiple< Lazy<Element, IS_A_BLOCK> > elements; + + All() + : elements("element") + { + maxOccurs = 1; + } +}; struct Attribute : public LLInitParam::Block<Attribute> { - Mandatory<std::string> name; - Mandatory<std::string> type; + Mandatory<std::string> name, + type; Mandatory<EUse> use; Attribute() @@ -127,24 +135,13 @@ struct Any : public LLInitParam::Block<Any, Occurs> {} }; -struct All : public LLInitParam::Block<All, Occurs> -{ - Multiple< Lazy<Element> > elements; - - All() - : elements("element") - { - maxOccurs = 1; - } -}; - struct Choice : public LLInitParam::ChoiceBlock<Choice, Occurs> { - Alternative< Lazy<Element> > element; - Alternative< Lazy<Group> > group; - Alternative< Lazy<Choice> > choice; - Alternative< Lazy<Sequence> > sequence; - Alternative< Lazy<Any> > any; + Alternative< Lazy<Element, IS_A_BLOCK> > element; + Alternative< Lazy<Group, IS_A_BLOCK> > group; + Alternative< Lazy<Choice, IS_A_BLOCK> > choice; + Alternative< Lazy<Sequence, IS_A_BLOCK> > sequence; + Alternative< Lazy<Any> > any; Choice() : element("element"), @@ -158,11 +155,11 @@ struct Choice : public LLInitParam::ChoiceBlock<Choice, Occurs> struct Sequence : public LLInitParam::ChoiceBlock<Sequence, Occurs> { - Alternative< Lazy<Element> > element; - Alternative< Lazy<Group> > group; - Alternative< Lazy<Choice> > choice; - Alternative< Lazy<Sequence> > sequence; - Alternative< Lazy<Any> > any; + Alternative< Lazy<Element, IS_A_BLOCK> > element; + Alternative< Lazy<Group, IS_A_BLOCK> > group; + Alternative< Lazy<Choice> > choice; + Alternative< Lazy<Sequence, IS_A_BLOCK> > sequence; + Alternative< Lazy<Any> > any; }; struct GroupContents : public LLInitParam::ChoiceBlock<GroupContents, Occurs> @@ -247,7 +244,7 @@ struct ComplexType : public LLInitParam::Block<ComplexType, ComplexTypeContents> Optional<bool> mixed; Multiple<Attribute> attribute; - Multiple< Lazy<Element> > elements; + Multiple< Lazy<Element, IS_A_BLOCK > > elements; ComplexType() : name("name"), @@ -313,7 +310,6 @@ public: setNameSpace(ns); }; } - }; // @@ -625,7 +621,7 @@ void LLXUIXSDWriter::writeXSD(const std::string& type_name, const std::string& p nodep->createChild("schemaLocation", true)->setStringValue(widget_name + ".xsd"); // add to front of schema - mSchemaNode->addChild(nodep, mSchemaNode); + mSchemaNode->addChild(nodep); } for (widget_registry_t::Registrar::registry_map_t::const_iterator it = widget_registryp->currentRegistrar().beginItems(); @@ -670,6 +666,7 @@ LLXUIParser::LLXUIParser() registerParserFuncs<S32>(readS32Value, writeS32Value); registerParserFuncs<F32>(readF32Value, writeF32Value); registerParserFuncs<F64>(readF64Value, writeF64Value); + registerParserFuncs<LLVector3>(readVector3Value, writeVector3Value); registerParserFuncs<LLColor4>(readColor4Value, writeColor4Value); registerParserFuncs<LLUIColor>(readUIColorValue, writeUIColorValue); registerParserFuncs<LLUUID>(readUUIDValue, writeUUIDValue); @@ -880,16 +877,24 @@ LLXMLNodePtr LLXUIParser::getNode(name_stack_t& stack) it = next_it) { ++next_it; + bool force_new_node = false; + if (it->first.empty()) { it->second = false; continue; } + if (next_it != stack.end() && next_it->first.empty() && next_it->second) + { + force_new_node = true; + } + + out_nodes_t::iterator found_it = mOutNodes.find(it->first); // node with this name not yet written - if (found_it == mOutNodes.end() || it->second) + if (found_it == mOutNodes.end() || it->second || force_new_node) { // make an attribute if we are the last element on the name stack bool is_attribute = next_it == stack.end(); @@ -1144,6 +1149,31 @@ bool LLXUIParser::writeF64Value(Parser& parser, const void* val_ptr, name_stack_ return false; } +bool LLXUIParser::readVector3Value(Parser& parser, void* val_ptr) +{ + LLXUIParser& self = static_cast<LLXUIParser&>(parser); + LLVector3* vecp = (LLVector3*)val_ptr; + if(self.mCurReadNode->getFloatValue(3, vecp->mV) >= 3) + { + return true; + } + + return false; +} + +bool LLXUIParser::writeVector3Value(Parser& parser, const void* val_ptr, name_stack_t& stack) +{ + LLXUIParser& self = static_cast<LLXUIParser&>(parser); + LLXMLNodePtr node = self.getNode(stack); + if (node.notNull()) + { + LLVector3 vector = *((LLVector3*)val_ptr); + node->setFloatValue(3, vector.mV); + return true; + } + return false; +} + bool LLXUIParser::readColor4Value(Parser& parser, void* val_ptr) { LLXUIParser& self = static_cast<LLXUIParser&>(parser); diff --git a/indra/llui/llxuiparser.h b/indra/llui/llxuiparser.h index d7cd256967..e48663e5cc 100644 --- a/indra/llui/llxuiparser.h +++ b/indra/llui/llxuiparser.h @@ -127,6 +127,7 @@ private: static bool readS32Value(Parser& parser, void* val_ptr); static bool readF32Value(Parser& parser, void* val_ptr); static bool readF64Value(Parser& parser, void* val_ptr); + static bool readVector3Value(Parser& parser, void* val_ptr); static bool readColor4Value(Parser& parser, void* val_ptr); static bool readUIColorValue(Parser& parser, void* val_ptr); static bool readUUIDValue(Parser& parser, void* val_ptr); @@ -144,6 +145,7 @@ private: static bool writeS32Value(Parser& parser, const void* val_ptr, name_stack_t&); static bool writeF32Value(Parser& parser, const void* val_ptr, name_stack_t&); static bool writeF64Value(Parser& parser, const void* val_ptr, name_stack_t&); + static bool writeVector3Value(Parser& parser, const void* val_ptr, name_stack_t&); static bool writeColor4Value(Parser& parser, const void* val_ptr, name_stack_t&); static bool writeUIColorValue(Parser& parser, const void* val_ptr, name_stack_t&); static bool writeUUIDValue(Parser& parser, const void* val_ptr, name_stack_t&); diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp index 74ed72ef97..5d3f9ac327 100644 --- a/indra/llui/tests/llurlentry_stub.cpp +++ b/indra/llui/tests/llurlentry_stub.cpp @@ -46,11 +46,6 @@ LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& ag return connection; } -bool LLAvatarNameCache::useDisplayNames() -{ - return false; -} - // // Stub implementation for LLCacheName // @@ -106,14 +101,14 @@ LLStyle::Params::Params() namespace LLInitParam { - ParamValue<LLUIColor, TypeValues<LLUIColor> >::ParamValue(const LLUIColor& color) + ParamValue<LLUIColor>::ParamValue(const LLUIColor& color) : super_t(color) {} - void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateValueFromBlock() + void ParamValue<LLUIColor>::updateValueFromBlock() {} - void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateBlockFromValue(bool) + void ParamValue<LLUIColor>::updateBlockFromValue(bool) {} bool ParamCompare<const LLFontGL*, false>::equals(const LLFontGL* a, const LLFontGL* b) @@ -121,14 +116,14 @@ namespace LLInitParam return false; } - ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::ParamValue(const LLFontGL* fontp) + ParamValue<const LLFontGL*>::ParamValue(const LLFontGL* fontp) : super_t(fontp) {} - void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateValueFromBlock() + void ParamValue<const LLFontGL*>::updateValueFromBlock() {} - void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateBlockFromValue(bool) + void ParamValue<const LLFontGL*>::updateBlockFromValue(bool) {} void TypeValues<LLFontGL::HAlign>::declareValues() @@ -140,10 +135,10 @@ namespace LLInitParam void TypeValues<LLFontGL::ShadowType>::declareValues() {} - void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateValueFromBlock() + void ParamValue<LLUIImage*>::updateValueFromBlock() {} - void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateBlockFromValue(bool) + void ParamValue<LLUIImage*>::updateBlockFromValue(bool) {} diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp index 963473c92a..109d3ca7bb 100644 --- a/indra/llui/tests/llurlmatch_test.cpp +++ b/indra/llui/tests/llurlmatch_test.cpp @@ -63,14 +63,14 @@ S32 LLUIImage::getHeight() const namespace LLInitParam { - ParamValue<LLUIColor, TypeValues<LLUIColor> >::ParamValue(const LLUIColor& color) + ParamValue<LLUIColor>::ParamValue(const LLUIColor& color) : super_t(color) {} - void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateValueFromBlock() + void ParamValue<LLUIColor>::updateValueFromBlock() {} - void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateBlockFromValue(bool) + void ParamValue<LLUIColor>::updateBlockFromValue(bool) {} bool ParamCompare<const LLFontGL*, false>::equals(const LLFontGL* a, const LLFontGL* b) @@ -79,14 +79,14 @@ namespace LLInitParam } - ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::ParamValue(const LLFontGL* fontp) + ParamValue<const LLFontGL*>::ParamValue(const LLFontGL* fontp) : super_t(fontp) {} - void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateValueFromBlock() + void ParamValue<const LLFontGL*>::updateValueFromBlock() {} - void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateBlockFromValue(bool) + void ParamValue<const LLFontGL*>::updateBlockFromValue(bool) {} void TypeValues<LLFontGL::HAlign>::declareValues() @@ -98,10 +98,10 @@ namespace LLInitParam void TypeValues<LLFontGL::ShadowType>::declareValues() {} - void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateValueFromBlock() + void ParamValue<LLUIImage*>::updateValueFromBlock() {} - void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateBlockFromValue(bool) + void ParamValue<LLUIImage*>::updateBlockFromValue(bool) {} bool ParamCompare<LLUIImage*, false>::equals( diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt index a819d12861..3c68b279f7 100644 --- a/indra/llvfs/CMakeLists.txt +++ b/indra/llvfs/CMakeLists.txt @@ -36,6 +36,8 @@ set(llvfs_HEADER_FILES if (DARWIN) LIST(APPEND llvfs_SOURCE_FILES lldir_mac.cpp) LIST(APPEND llvfs_HEADER_FILES lldir_mac.h) + LIST(APPEND llvfs_SOURCE_FILES llvfs_objc.mm) + LIST(APPEND llvfs_HEADER_FILES llvfs_objc.h) endif (DARWIN) if (LINUX) @@ -73,8 +75,8 @@ target_link_libraries(llvfs if (DARWIN) include(CMakeFindFrameworks) - find_library(CARBON_LIBRARY Carbon) - target_link_libraries(llvfs ${CARBON_LIBRARY}) + find_library(COCOA_LIBRARY Cocoa) + target_link_libraries(llvfs ${COCOA_LIBRARY}) endif (DARWIN) diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 32d081d552..6899e9a44a 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -41,6 +41,17 @@ #include "lluuid.h" #include "lldiriterator.h" +#include "stringize.h" +#include <boost/foreach.hpp> +#include <boost/range/begin.hpp> +#include <boost/range/end.hpp> +#include <boost/assign/list_of.hpp> +#include <boost/bind.hpp> +#include <boost/ref.hpp> +#include <algorithm> + +using boost::assign::list_of; +using boost::assign::map_list_of; #if LL_WINDOWS #include "lldir_win32.h" @@ -58,6 +69,14 @@ LLDir_Linux gDirUtil; LLDir *gDirUtilp = (LLDir *)&gDirUtil; +/// Values for findSkinnedFilenames(subdir) parameter +const char + *LLDir::XUI = "xui", + *LLDir::TEXTURES = "textures", + *LLDir::SKINBASE = ""; + +static const char* const empty = ""; + LLDir::LLDir() : mAppName(""), mExecutablePathAndName(""), @@ -70,7 +89,9 @@ LLDir::LLDir() mOSCacheDir(""), mCAFile(""), mTempDir(""), - mDirDelimiter("/") // fallback to forward slash if not overridden + mDirDelimiter("/"), // fallback to forward slash if not overridden + mLanguage("en"), + mUserName("undefined") { } @@ -96,9 +117,7 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask) LLDirIterator iter(dirname, mask); while (iter.next(filename)) { - fullpath = dirname; - fullpath += getDirDelimiter(); - fullpath += filename; + fullpath = add(dirname, filename); if(LLFile::isdir(fullpath)) { @@ -270,12 +289,12 @@ std::string LLDir::buildSLOSCacheDir() const } else { - res = getOSUserAppDir() + mDirDelimiter + "cache"; + res = add(getOSUserAppDir(), "cache"); } } else { - res = getOSCacheDir() + mDirDelimiter + "SecondLife"; + res = add(getOSCacheDir(), "SecondLife"); } return res; } @@ -298,19 +317,24 @@ const std::string &LLDir::getDirDelimiter() const return mDirDelimiter; } +const std::string& LLDir::getDefaultSkinDir() const +{ + return mDefaultSkinDir; +} + const std::string &LLDir::getSkinDir() const { return mSkinDir; } -const std::string &LLDir::getUserSkinDir() const +const std::string &LLDir::getUserDefaultSkinDir() const { - return mUserSkinDir; + return mUserDefaultSkinDir; } -const std::string& LLDir::getDefaultSkinDir() const +const std::string &LLDir::getUserSkinDir() const { - return mDefaultSkinDir; + return mUserSkinDir; } const std::string LLDir::getSkinBaseDir() const @@ -323,6 +347,44 @@ const std::string &LLDir::getLLPluginDir() const return mLLPluginDir; } +const std::string &LLDir::getUserName() const +{ + return mUserName; +} + +static std::string ELLPathToString(ELLPath location) +{ + typedef std::map<ELLPath, const char*> ELLPathMap; +#define ENT(symbol) (symbol, #symbol) + static const ELLPathMap sMap = map_list_of + ENT(LL_PATH_NONE) + ENT(LL_PATH_USER_SETTINGS) + ENT(LL_PATH_APP_SETTINGS) + ENT(LL_PATH_PER_SL_ACCOUNT) // returns/expands to blank string if we don't know the account name yet + ENT(LL_PATH_CACHE) + ENT(LL_PATH_CHARACTER) + ENT(LL_PATH_HELP) + ENT(LL_PATH_LOGS) + ENT(LL_PATH_TEMP) + ENT(LL_PATH_SKINS) + ENT(LL_PATH_TOP_SKIN) + ENT(LL_PATH_CHAT_LOGS) + ENT(LL_PATH_PER_ACCOUNT_CHAT_LOGS) + ENT(LL_PATH_USER_SKIN) + ENT(LL_PATH_LOCAL_ASSETS) + ENT(LL_PATH_EXECUTABLE) + ENT(LL_PATH_DEFAULT_SKIN) + ENT(LL_PATH_FONTS) + ENT(LL_PATH_LAST) + ; +#undef ENT + + ELLPathMap::const_iterator found = sMap.find(location); + if (found != sMap.end()) + return found->second; + return STRINGIZE("Invalid ELLPath value " << location); +} + std::string LLDir::getExpandedFilename(ELLPath location, const std::string& filename) const { return getExpandedFilename(location, "", filename); @@ -343,15 +405,11 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd break; case LL_PATH_APP_SETTINGS: - prefix = getAppRODataDir(); - prefix += mDirDelimiter; - prefix += "app_settings"; + prefix = add(getAppRODataDir(), "app_settings"); break; case LL_PATH_CHARACTER: - prefix = getAppRODataDir(); - prefix += mDirDelimiter; - prefix += "character"; + prefix = add(getAppRODataDir(), "character"); break; case LL_PATH_HELP: @@ -363,16 +421,22 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd break; case LL_PATH_USER_SETTINGS: - prefix = getOSUserAppDir(); - prefix += mDirDelimiter; - prefix += "user_settings"; + prefix = add(getOSUserAppDir(), "user_settings"); break; case LL_PATH_PER_SL_ACCOUNT: prefix = getLindenUserDir(); if (prefix.empty()) { - // if we're asking for the per-SL-account directory but we haven't logged in yet (or otherwise don't know the account name from which to build this string), then intentionally return a blank string to the caller and skip the below warning about a blank prefix. + // if we're asking for the per-SL-account directory but we haven't + // logged in yet (or otherwise don't know the account name from + // which to build this string), then intentionally return a blank + // string to the caller and skip the below warning about a blank + // prefix. + LL_DEBUGS("LLDir") << "getLindenUserDir() not yet set: " + << ELLPathToString(location) + << ", '" << subdir1 << "', '" << subdir2 << "', '" << in_filename + << "' => ''" << LL_ENDL; return std::string(); } break; @@ -386,9 +450,7 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd break; case LL_PATH_LOGS: - prefix = getOSUserAppDir(); - prefix += mDirDelimiter; - prefix += "logs"; + prefix = add(getOSUserAppDir(), "logs"); break; case LL_PATH_TEMP: @@ -412,9 +474,7 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd break; case LL_PATH_LOCAL_ASSETS: - prefix = getAppRODataDir(); - prefix += mDirDelimiter; - prefix += "local_assets"; + prefix = add(getAppRODataDir(), "local_assets"); break; case LL_PATH_EXECUTABLE: @@ -422,56 +482,36 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd break; case LL_PATH_FONTS: - prefix = getAppRODataDir(); - prefix += mDirDelimiter; - prefix += "fonts"; + prefix = add(getAppRODataDir(), "fonts"); break; default: llassert(0); } - std::string filename = in_filename; - if (!subdir2.empty()) - { - filename = subdir2 + mDirDelimiter + filename; - } - - if (!subdir1.empty()) - { - filename = subdir1 + mDirDelimiter + filename; - } - if (prefix.empty()) { - llwarns << "prefix is empty, possible bad filename" << llendl; - } - - std::string expanded_filename; - if (!filename.empty()) - { - if (!prefix.empty()) - { - expanded_filename += prefix; - expanded_filename += mDirDelimiter; - expanded_filename += filename; - } - else - { - expanded_filename = filename; - } - } - else if (!prefix.empty()) - { - // Directory only, no file name. - expanded_filename = prefix; + llwarns << ELLPathToString(location) + << ", '" << subdir1 << "', '" << subdir2 << "', '" << in_filename + << "': prefix is empty, possible bad filename" << llendl; } - else + + std::string expanded_filename = add(add(prefix, subdir1), subdir2); + if (expanded_filename.empty() && in_filename.empty()) { - expanded_filename.assign(""); + return ""; } - - //llinfos << "*** EXPANDED FILENAME: <" << expanded_filename << ">" << llendl; + // Use explicit concatenation here instead of another add() call. Callers + // passing in_filename as "" expect to obtain a pathname ending with + // mDirSeparator so they can later directly concatenate with a specific + // filename. A caller using add() doesn't care, but there's still code + // loose in the system that uses std::string::operator+(). + expanded_filename += mDirDelimiter; + expanded_filename += in_filename; + + LL_DEBUGS("LLDir") << ELLPathToString(location) + << ", '" << subdir1 << "', '" << subdir2 << "', '" << in_filename + << "' => '" << expanded_filename << "'" << LL_ENDL; return expanded_filename; } @@ -511,31 +551,207 @@ std::string LLDir::getExtension(const std::string& filepath) const return exten; } -std::string LLDir::findSkinnedFilename(const std::string &filename) const +std::string LLDir::findSkinnedFilenameBaseLang(const std::string &subdir, + const std::string &filename, + ESkinConstraint constraint) const { - return findSkinnedFilename("", "", filename); + // This implementation is basically just as described in the declaration comments. + std::vector<std::string> found(findSkinnedFilenames(subdir, filename, constraint)); + if (found.empty()) + { + return ""; + } + return found.front(); } -std::string LLDir::findSkinnedFilename(const std::string &subdir, const std::string &filename) const +std::string LLDir::findSkinnedFilename(const std::string &subdir, + const std::string &filename, + ESkinConstraint constraint) const { - return findSkinnedFilename("", subdir, filename); + // This implementation is basically just as described in the declaration comments. + std::vector<std::string> found(findSkinnedFilenames(subdir, filename, constraint)); + if (found.empty()) + { + return ""; + } + return found.back(); } -std::string LLDir::findSkinnedFilename(const std::string &subdir1, const std::string &subdir2, const std::string &filename) const +// This method exists because the two code paths for +// findSkinnedFilenames(ALL_SKINS) and findSkinnedFilenames(CURRENT_SKIN) must +// generate the list of candidate pathnames in identical ways. The only +// difference is in the body of the inner loop. +template <typename FUNCTION> +void LLDir::walkSearchSkinDirs(const std::string& subdir, + const std::vector<std::string>& subsubdirs, + const std::string& filename, + const FUNCTION& function) const { - // generate subdirectory path fragment, e.g. "/foo/bar", "/foo", "" - std::string subdirs = ((subdir1.empty() ? "" : mDirDelimiter) + subdir1) - + ((subdir2.empty() ? "" : mDirDelimiter) + subdir2); + BOOST_FOREACH(std::string skindir, mSearchSkinDirs) + { + std::string subdir_path(add(skindir, subdir)); + BOOST_FOREACH(std::string subsubdir, subsubdirs) + { + std::string full_path(add(add(subdir_path, subsubdir), filename)); + if (fileExists(full_path)) + { + function(subsubdir, full_path); + } + } + } +} - std::vector<std::string> search_paths; - - search_paths.push_back(getUserSkinDir() + subdirs); // first look in user skin override - search_paths.push_back(getSkinDir() + subdirs); // then in current skin - search_paths.push_back(getDefaultSkinDir() + subdirs); // then default skin - search_paths.push_back(getCacheDir() + subdirs); // and last in preload directory +// ridiculous little helper function that should go away when we can use lambda +inline void push_back(std::vector<std::string>& vector, const std::string& value) +{ + vector.push_back(value); +} + +typedef std::map<std::string, std::string> StringMap; +// ridiculous little helper function that should go away when we can use lambda +inline void store_in_map(StringMap& map, const std::string& key, const std::string& value) +{ + map[key] = value; +} + +std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir, + const std::string& filename, + ESkinConstraint constraint) const +{ + // Recognize subdirs that have no localization. + static const std::set<std::string> sUnlocalized = list_of + ("") // top-level directory not localized + ("textures") // textures not localized + ; + + LL_DEBUGS("LLDir") << "subdir '" << subdir << "', filename '" << filename + << "', constraint " + << ((constraint == CURRENT_SKIN)? "CURRENT_SKIN" : "ALL_SKINS") + << LL_ENDL; + + // Cache the default language directory for each subdir we've encountered. + // A cache entry whose value is the empty string means "not localized, + // don't bother checking again." + static StringMap sLocalized; + + // Check whether we've already discovered if this subdir is localized. + StringMap::const_iterator found = sLocalized.find(subdir); + if (found == sLocalized.end()) + { + // We have not yet determined that. Is it one of the subdirs "known" + // to be unlocalized? + if (sUnlocalized.find(subdir) != sUnlocalized.end()) + { + // This subdir is known to be unlocalized. Remember that. + found = sLocalized.insert(StringMap::value_type(subdir, "")).first; + } + else + { + // We do not recognize this subdir. Investigate. + std::string subdir_path(add(getDefaultSkinDir(), subdir)); + if (fileExists(add(subdir_path, "en"))) + { + // defaultSkinDir/subdir contains subdir "en". That's our + // default language; this subdir is localized. + found = sLocalized.insert(StringMap::value_type(subdir, "en")).first; + } + else if (fileExists(add(subdir_path, "en-us"))) + { + // defaultSkinDir/subdir contains subdir "en-us" but not "en". + // Set as default language; this subdir is localized. + found = sLocalized.insert(StringMap::value_type(subdir, "en-us")).first; + } + else + { + // defaultSkinDir/subdir contains neither "en" nor "en-us". + // Assume it's not localized. Remember that assumption. + found = sLocalized.insert(StringMap::value_type(subdir, "")).first; + } + } + } + // Every code path above should have resulted in 'found' becoming a valid + // iterator to an entry in sLocalized. + llassert(found != sLocalized.end()); + + // Now -- is this subdir localized, or not? The answer determines what + // subdirectories we check (under subdir) for the requested filename. + std::vector<std::string> subsubdirs; + if (found->second.empty()) + { + // subdir is not localized. filename should be located directly within it. + subsubdirs.push_back(""); + } + else + { + // subdir is localized, and found->second is the default language + // directory within it. Check both the default language and the + // current language -- if it differs from the default, of course. + subsubdirs.push_back(found->second); + if (mLanguage != found->second) + { + subsubdirs.push_back(mLanguage); + } + } - std::string found_file = findFile(filename, search_paths); - return found_file; + // Build results vector. + std::vector<std::string> results; + // The process we use depends on 'constraint'. + if (constraint != CURRENT_SKIN) // meaning ALL_SKINS + { + // ALL_SKINS is simpler: just return every pathname generated by + // walkSearchSkinDirs(). Tricky bit: walkSearchSkinDirs() passes its + // FUNCTION the subsubdir as well as the full pathname. We just want + // the full pathname. + walkSearchSkinDirs(subdir, subsubdirs, filename, + boost::bind(push_back, boost::ref(results), _2)); + } + else // CURRENT_SKIN + { + // CURRENT_SKIN turns out to be a bit of a misnomer because we might + // still return files from two different skins. In any case, this + // value of 'constraint' means we will return at most two paths: one + // for the default language, one for the current language (supposing + // those differ). + // It is important to allow a user to override only the localization + // for a particular file, for all viewer installs, without also + // overriding the default-language file. + // It is important to allow a user to override only the default- + // language file, for all viewer installs, without also overriding the + // applicable localization of that file. + // Therefore, treat the default language and the current language as + // two separate cases. For each, capture the most-specialized file + // that exists. + // Use a map keyed by subsubdir (i.e. language code). This allows us + // to handle the case of a single subsubdirs entry with the same logic + // that handles two. For every real file path generated by + // walkSearchSkinDirs(), update the map entry for its subsubdir. + StringMap path_for; + walkSearchSkinDirs(subdir, subsubdirs, filename, + boost::bind(store_in_map, boost::ref(path_for), _1, _2)); + // Now that we have a path for each of the default language and the + // current language, copy them -- in proper order -- into results. + // Don't drive this by walking the map itself: it matters that we + // generate results in the same order as subsubdirs. + BOOST_FOREACH(std::string subsubdir, subsubdirs) + { + StringMap::const_iterator found(path_for.find(subsubdir)); + if (found != path_for.end()) + { + results.push_back(found->second); + } + } + } + + LL_DEBUGS("LLDir") << empty; + const char* comma = ""; + BOOST_FOREACH(std::string path, results) + { + LL_CONT << comma << "'" << path << "'"; + comma = ", "; + } + LL_CONT << LL_ENDL; + + return results; } std::string LLDir::getTempFilename() const @@ -546,12 +762,7 @@ std::string LLDir::getTempFilename() const random_uuid.generate(); random_uuid.toString(uuid_str); - std::string temp_filename = getTempDir(); - temp_filename += mDirDelimiter; - temp_filename += uuid_str; - temp_filename += ".tmp"; - - return temp_filename; + return add(getTempDir(), uuid_str + ".tmp"); } // static @@ -587,9 +798,7 @@ void LLDir::setLindenUserDir(const std::string &username) std::string userlower(username); LLStringUtil::toLower(userlower); LLStringUtil::replaceChar(userlower, ' ', '_'); - mLindenUserDir = getOSUserAppDir(); - mLindenUserDir += mDirDelimiter; - mLindenUserDir += userlower; + mLindenUserDir = add(getOSUserAppDir(), userlower); } else { @@ -611,6 +820,11 @@ void LLDir::setChatLogsDir(const std::string &path) } } +void LLDir::updatePerAccountChatLogsDir() +{ + mPerAccountChatLogsDir = add(getChatLogsDir(), mUserName); +} + void LLDir::setPerAccountChatLogsDir(const std::string &username) { // if both first and last aren't set, assume we're grabbing the cached dir @@ -621,36 +835,69 @@ void LLDir::setPerAccountChatLogsDir(const std::string &username) std::string userlower(username); LLStringUtil::toLower(userlower); LLStringUtil::replaceChar(userlower, ' ', '_'); - mPerAccountChatLogsDir = getChatLogsDir(); - mPerAccountChatLogsDir += mDirDelimiter; - mPerAccountChatLogsDir += userlower; + + mUserName = userlower; + updatePerAccountChatLogsDir(); } else { llerrs << "NULL name for LLDir::setPerAccountChatLogsDir" << llendl; } - } -void LLDir::setSkinFolder(const std::string &skin_folder) +void LLDir::setSkinFolder(const std::string &skin_folder, const std::string& language) { - mSkinDir = getSkinBaseDir(); - mSkinDir += mDirDelimiter; - mSkinDir += skin_folder; + LL_DEBUGS("LLDir") << "Setting skin '" << skin_folder << "', language '" << language << "'" + << LL_ENDL; + mSkinName = skin_folder; + mLanguage = language; - // user modifications to current skin - // e.g. c:\documents and settings\users\username\application data\second life\skins\dazzle - mUserSkinDir = getOSUserAppDir(); - mUserSkinDir += mDirDelimiter; - mUserSkinDir += "skins"; - mUserSkinDir += mDirDelimiter; - mUserSkinDir += skin_folder; + // This method is called multiple times during viewer initialization. Each + // time it's called, reset mSearchSkinDirs. + mSearchSkinDirs.clear(); // base skin which is used as fallback for all skinned files // e.g. c:\program files\secondlife\skins\default mDefaultSkinDir = getSkinBaseDir(); - mDefaultSkinDir += mDirDelimiter; - mDefaultSkinDir += "default"; + append(mDefaultSkinDir, "default"); + // This is always the most general of the search skin directories. + addSearchSkinDir(mDefaultSkinDir); + + mSkinDir = getSkinBaseDir(); + append(mSkinDir, skin_folder); + // Next level of generality is a skin installed with the viewer. + addSearchSkinDir(mSkinDir); + + // user modifications to skins, current and default + // e.g. c:\documents and settings\users\username\application data\second life\skins\dazzle + mUserSkinDir = getOSUserAppDir(); + append(mUserSkinDir, "skins"); + mUserDefaultSkinDir = mUserSkinDir; + append(mUserDefaultSkinDir, "default"); + append(mUserSkinDir, skin_folder); + // Next level of generality is user modifications to default skin... + addSearchSkinDir(mUserDefaultSkinDir); + // then user-defined skins. + addSearchSkinDir(mUserSkinDir); +} + +void LLDir::addSearchSkinDir(const std::string& skindir) +{ + if (std::find(mSearchSkinDirs.begin(), mSearchSkinDirs.end(), skindir) == mSearchSkinDirs.end()) + { + LL_DEBUGS("LLDir") << "search skin: '" << skindir << "'" << LL_ENDL; + mSearchSkinDirs.push_back(skindir); + } +} + +std::string LLDir::getSkinFolder() const +{ + return mSkinName; +} + +std::string LLDir::getLanguage() const +{ + return mLanguage; } bool LLDir::setCacheDir(const std::string &path) @@ -664,7 +911,7 @@ bool LLDir::setCacheDir(const std::string &path) else { LLFile::mkdir(path); - std::string tempname = path + mDirDelimiter + "temp"; + std::string tempname = add(path, "temp"); LLFILE* file = LLFile::fopen(tempname,"wt"); if (file) { @@ -697,6 +944,57 @@ void LLDir::dumpCurrentDirectories() LL_DEBUGS2("AppInit","Directories") << " SkinDir: " << getSkinDir() << LL_ENDL; } +std::string LLDir::add(const std::string& path, const std::string& name) const +{ + std::string destpath(path); + append(destpath, name); + return destpath; +} + +void LLDir::append(std::string& destpath, const std::string& name) const +{ + // Delegate question of whether we need a separator to helper method. + SepOff sepoff(needSep(destpath, name)); + if (sepoff.first) // do we need a separator? + { + destpath += mDirDelimiter; + } + // If destpath ends with a separator, AND name starts with one, skip + // name's leading separator. + destpath += name.substr(sepoff.second); +} + +LLDir::SepOff LLDir::needSep(const std::string& path, const std::string& name) const +{ + if (path.empty() || name.empty()) + { + // If either path or name are empty, we do not need a separator + // between them. + return SepOff(false, 0); + } + // Here we know path and name are both non-empty. But if path already ends + // with a separator, or if name already starts with a separator, we need + // not add one. + std::string::size_type seplen(mDirDelimiter.length()); + bool path_ends_sep(path.substr(path.length() - seplen) == mDirDelimiter); + bool name_starts_sep(name.substr(0, seplen) == mDirDelimiter); + if ((! path_ends_sep) && (! name_starts_sep)) + { + // If neither path nor name brings a separator to the junction, then + // we need one. + return SepOff(true, 0); + } + if (path_ends_sep && name_starts_sep) + { + // But if BOTH path and name bring a separator, we need not add one. + // Moreover, we should actually skip the leading separator of 'name'. + return SepOff(false, seplen); + } + // Here we know that either path_ends_sep or name_starts_sep is true -- + // but not both. So don't add a separator, and don't skip any characters: + // simple concatenation will do the trick. + return SepOff(false, 0); +} void dir_exists_or_crash(const std::string &dir_name) { diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index 5ee8bdb542..cc10ed5bbd 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -1,4 +1,4 @@ -/** +/** * @file lldir.h * @brief Definition of directory utilities class * @@ -56,7 +56,7 @@ typedef enum ELLPath LL_PATH_LAST } ELLPath; - +/// Directory operations class LLDir { public: @@ -73,10 +73,8 @@ class LLDir virtual S32 deleteFilesInDir(const std::string &dirname, const std::string &mask); // pure virtual functions - virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask) = 0; - virtual std::string getCurPath() = 0; - virtual BOOL fileExists(const std::string &filename) const = 0; + virtual bool fileExists(const std::string &filename) const = 0; const std::string findFile(const std::string& filename, const std::vector<std::string> filenames) const; const std::string findFile(const std::string& filename, const std::string& searchPath1 = "", const std::string& searchPath2 = "", const std::string& searchPath3 = "") const; @@ -100,11 +98,13 @@ class LLDir const std::string &getOSCacheDir() const; // location of OS-specific cache folder (may be empty string) const std::string &getCAFile() const; // File containing TLS certificate authorities const std::string &getDirDelimiter() const; // directory separator for platform (ie. '\' or '/' or ':') + const std::string &getDefaultSkinDir() const; // folder for default skin. e.g. c:\program files\second life\skins\default const std::string &getSkinDir() const; // User-specified skin folder. + const std::string &getUserDefaultSkinDir() const; // dir with user modifications to default skin const std::string &getUserSkinDir() const; // User-specified skin folder with user modifications. e.g. c:\documents and settings\username\application data\second life\skins\curskin - const std::string &getDefaultSkinDir() const; // folder for default skin. e.g. c:\program files\second life\skins\default const std::string getSkinBaseDir() const; // folder that contains all installed skins (not user modifications). e.g. c:\program files\second life\skins const std::string &getLLPluginDir() const; // Directory containing plugins and plugin shell + const std::string &getUserName() const; // Expanded filename std::string getExpandedFilename(ELLPath location, const std::string &filename) const; @@ -117,10 +117,61 @@ class LLDir std::string getExtension(const std::string& filepath) const; // Excludes '.', e.g getExtension("foo.wav") == "wav" // these methods search the various skin paths for the specified file in the following order: - // getUserSkinDir(), getSkinDir(), getDefaultSkinDir() - std::string findSkinnedFilename(const std::string &filename) const; - std::string findSkinnedFilename(const std::string &subdir, const std::string &filename) const; - std::string findSkinnedFilename(const std::string &subdir1, const std::string &subdir2, const std::string &filename) const; + // getUserSkinDir(), getUserDefaultSkinDir(), getSkinDir(), getDefaultSkinDir() + /// param value for findSkinnedFilenames(), explained below + enum ESkinConstraint { CURRENT_SKIN, ALL_SKINS }; + /** + * Given a filename within skin, return an ordered sequence of paths to + * search. Nonexistent files will be filtered out -- which means that the + * vector might be empty. + * + * @param subdir Identify top-level skin subdirectory by passing one of + * LLDir::XUI (file lives under "xui" subtree), LLDir::TEXTURES (file + * lives under "textures" subtree), LLDir::SKINBASE (file lives at top + * level of skin subdirectory). + * @param filename Desired filename within subdir within skin, e.g. + * "panel_login.xml". DO NOT prepend (e.g.) "xui" or the desired language. + * @param constraint Callers perform two different kinds of processing. + * When fetching a XUI file, for instance, the existence of @a filename in + * the specified skin completely supercedes any @a filename in the default + * skin. For that case, leave the default @a constraint=CURRENT_SKIN. The + * returned vector will contain only + * ".../<i>current_skin</i>/xui/en/<i>filename</i>", + * ".../<i>current_skin</i>/xui/<i>current_language</i>/<i>filename</i>". + * But for (e.g.) "strings.xml", we want a given skin to be able to + * override only specific entries from the default skin. Any string not + * defined in the specified skin will be sought in the default skin. For + * that case, pass @a constraint=ALL_SKINS. The returned vector will + * contain at least ".../default/xui/en/strings.xml", + * ".../default/xui/<i>current_language</i>/strings.xml", + * ".../<i>current_skin</i>/xui/en/strings.xml", + * ".../<i>current_skin</i>/xui/<i>current_language</i>/strings.xml". + */ + std::vector<std::string> findSkinnedFilenames(const std::string& subdir, + const std::string& filename, + ESkinConstraint constraint=CURRENT_SKIN) const; + /// Values for findSkinnedFilenames(subdir) parameter + static const char *XUI, *TEXTURES, *SKINBASE; + /** + * Return the base-language pathname from findSkinnedFilenames(), or + * the empty string if no such file exists. Parameters are identical to + * findSkinnedFilenames(). This is shorthand for capturing the vector + * returned by findSkinnedFilenames(), checking for empty() and then + * returning front(). + */ + std::string findSkinnedFilenameBaseLang(const std::string &subdir, + const std::string &filename, + ESkinConstraint constraint=CURRENT_SKIN) const; + /** + * Return the "most localized" pathname from findSkinnedFilenames(), or + * the empty string if no such file exists. Parameters are identical to + * findSkinnedFilenames(). This is shorthand for capturing the vector + * returned by findSkinnedFilenames(), checking for empty() and then + * returning back(). + */ + std::string findSkinnedFilename(const std::string &subdir, + const std::string &filename, + ESkinConstraint constraint=CURRENT_SKIN) const; // random filename in common temporary directory std::string getTempFilename() const; @@ -132,15 +183,38 @@ class LLDir virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir virtual void setPerAccountChatLogsDir(const std::string &username); // Set the per user chat log directory. virtual void setLindenUserDir(const std::string &username); // Set the linden user dir to this user's dir - virtual void setSkinFolder(const std::string &skin_folder); + virtual void setSkinFolder(const std::string &skin_folder, const std::string& language); + virtual std::string getSkinFolder() const; + virtual std::string getLanguage() const; virtual bool setCacheDir(const std::string &path); + virtual void updatePerAccountChatLogsDir(); virtual void dumpCurrentDirectories(); - + // Utility routine std::string buildSLOSCacheDir() const; + /// Append specified @a name to @a destpath, separated by getDirDelimiter() + /// if both are non-empty. + void append(std::string& destpath, const std::string& name) const; + /// Append specified @a name to @a path, separated by getDirDelimiter() + /// if both are non-empty. Return result, leaving @a path unmodified. + std::string add(const std::string& path, const std::string& name) const; + protected: + // Does an add() or append() call need a directory delimiter? + typedef std::pair<bool, unsigned short> SepOff; + SepOff needSep(const std::string& path, const std::string& name) const; + // build mSearchSkinDirs without adding duplicates + void addSearchSkinDir(const std::string& skindir); + + // Internal to findSkinnedFilenames() + template <typename FUNCTION> + void walkSearchSkinDirs(const std::string& subdir, + const std::vector<std::string>& subsubdirs, + const std::string& filename, + const FUNCTION& function) const; + std::string mAppName; // install directory under progams/ ie "SecondLife" std::string mExecutablePathAndName; // full path + Filename of .exe std::string mExecutableFilename; // Filename of .exe @@ -158,11 +232,20 @@ protected: std::string mDefaultCacheDir; // default cache diretory std::string mOSCacheDir; // operating system cache dir std::string mDirDelimiter; + std::string mSkinName; // caller-specified skin name std::string mSkinBaseDir; // Base for skins paths. - std::string mSkinDir; // Location for current skin info. std::string mDefaultSkinDir; // Location for default skin info. + std::string mSkinDir; // Location for current skin info. + std::string mUserDefaultSkinDir; // Location for default skin info. std::string mUserSkinDir; // Location for user-modified skin info. + // Skin directories to search, most general to most specific. This order + // works well for composing fine-grained files, in which an individual item + // in a specific file overrides the corresponding item in more general + // files. Of course, for a file-level search, iterate backwards. + std::vector<std::string> mSearchSkinDirs; + std::string mLanguage; // Current viewer language std::string mLLPluginDir; // Location for plugins and plugin shell + std::string mUserName; // Current user name }; void dir_exists_or_crash(const std::string &dir_name); diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index 407f3b93fb..4edd078640 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -254,7 +254,7 @@ std::string LLDir_Linux::getCurPath() } -BOOL LLDir_Linux::fileExists(const std::string &filename) const +bool LLDir_Linux::fileExists(const std::string &filename) const { struct stat stat_data; // Check the age of the file diff --git a/indra/llvfs/lldir_linux.h b/indra/llvfs/lldir_linux.h index 7603239867..e83a020ba4 100644 --- a/indra/llvfs/lldir_linux.h +++ b/indra/llvfs/lldir_linux.h @@ -47,7 +47,7 @@ public: virtual std::string getCurPath(); virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); - /*virtual*/ BOOL fileExists(const std::string &filename) const; + /*virtual*/ bool fileExists(const std::string &filename) const; /*virtual*/ std::string getLLPluginLauncher(); /*virtual*/ std::string getLLPluginFilename(std::string base_name); diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index 489bc3e4a7..c5041d434c 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -22,7 +22,7 @@ * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ - */ + */ #if LL_DARWIN @@ -35,73 +35,27 @@ #include <sys/stat.h> #include <unistd.h> #include <glob.h> - -#include <Carbon/Carbon.h> - -// -------------------------------------------------------------------------------- - -static OSStatus CFCreateDirectory(FSRef *parentRef, CFStringRef name, FSRef *newRef) -{ - OSStatus result = noErr; - HFSUniStr255 uniStr; - - uniStr.length = CFStringGetLength(name); - CFStringGetCharacters(name, CFRangeMake(0, uniStr.length), uniStr.unicode); - result = FSMakeFSRefUnicode(parentRef, uniStr.length, uniStr.unicode, kTextEncodingMacRoman, newRef); - if (result != noErr) - { - result = FSCreateDirectoryUnicode(parentRef, uniStr.length, uniStr.unicode, 0, NULL, newRef, NULL, NULL); - } - - return result; -} +#include <boost/filesystem.hpp> +#include "llvfs_objc.h" // -------------------------------------------------------------------------------- -static void CFStringRefToLLString(CFStringRef stringRef, std::string &llString, bool releaseWhenDone) +static bool CreateDirectory(const std::string &parent, + const std::string &child, + std::string *fullname) { - if (stringRef) - { - long stringSize = CFStringGetLength(stringRef) + 1; - long bufferSize = CFStringGetMaximumSizeForEncoding(stringSize,kCFStringEncodingUTF8); - char* buffer = new char[bufferSize]; - memset(buffer, 0, bufferSize); - if (CFStringGetCString(stringRef, buffer, bufferSize, kCFStringEncodingUTF8)) - llString = buffer; - delete[] buffer; - if (releaseWhenDone) - CFRelease(stringRef); - } -} - -// -------------------------------------------------------------------------------- - -static void CFURLRefToLLString(CFURLRef urlRef, std::string &llString, bool releaseWhenDone) -{ - if (urlRef) - { - CFURLRef absoluteURLRef = CFURLCopyAbsoluteURL(urlRef); - if (absoluteURLRef) - { - CFStringRef stringRef = CFURLCopyFileSystemPath(absoluteURLRef, kCFURLPOSIXPathStyle); - CFStringRefToLLString(stringRef, llString, true); - CFRelease(absoluteURLRef); - } - if (releaseWhenDone) - CFRelease(urlRef); - } -} - -// -------------------------------------------------------------------------------- - -static void FSRefToLLString(FSRef *fsRef, std::string &llString) -{ - OSStatus error = noErr; - char path[MAX_PATH]; - - error = FSRefMakePath(fsRef, (UInt8*) path, sizeof(path)); - if (error == noErr) - llString = path; + + boost::filesystem::path p(parent); + p /= child; + + if (fullname) + *fullname = std::string(p.string()); + + if (! boost::filesystem::create_directory(p)) + { + return (boost::filesystem::is_directory(p)); + } + return true; } // -------------------------------------------------------------------------------- @@ -109,35 +63,28 @@ static void FSRefToLLString(FSRef *fsRef, std::string &llString) LLDir_Mac::LLDir_Mac() { mDirDelimiter = "/"; - mCurrentDirIndex = -1; - mCurrentDirCount = -1; - - CFBundleRef mainBundleRef = NULL; - CFURLRef executableURLRef = NULL; - CFStringRef stringRef = NULL; - OSStatus error = noErr; - FSRef fileRef; - CFStringRef secondLifeString = CFSTR("SecondLife"); - - mainBundleRef = CFBundleGetMainBundle(); - - executableURLRef = CFBundleCopyExecutableURL(mainBundleRef); - - if (executableURLRef != NULL) + + const std::string secondLifeString = "SecondLife"; + + std::string *executablepathstr = getSystemExecutableFolder(); + + //NOTE: LLINFOS/LLERRS will not output to log here. The streams are not initialized. + + if (executablepathstr) { // mExecutablePathAndName - CFURLRefToLLString(executableURLRef, mExecutablePathAndName, false); - - // mExecutableFilename - stringRef = CFURLCopyLastPathComponent(executableURLRef); - CFStringRefToLLString(stringRef, mExecutableFilename, true); - - // mExecutableDir - CFURLRef executableParentURLRef = CFURLCreateCopyDeletingLastPathComponent(NULL, executableURLRef); - CFURLRefToLLString(executableParentURLRef, mExecutableDir, true); + mExecutablePathAndName = *executablepathstr; + + boost::filesystem::path executablepath(*executablepathstr); + +# ifndef BOOST_SYSTEM_NO_DEPRECATED +#endif + mExecutableFilename = executablepath.filename().string(); + mExecutableDir = executablepath.parent_path().string(); // mAppRODataDir - + std::string *resourcepath = getSystemResourceFolder(); + mAppRODataDir = *resourcepath; // *NOTE: When running in a dev tree, use the copy of // skins in indra/newview/ rather than in the application bundle. This @@ -146,10 +93,7 @@ LLDir_Mac::LLDir_Mac() // MBW -- This keeps the mac application from finding other things. // If this is really for skins, it should JUST apply to skins. - - CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef); - CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true); - + U32 build_dir_pos = mExecutableDir.rfind("/build-darwin-"); if (build_dir_pos != std::string::npos) { @@ -166,55 +110,50 @@ LLDir_Mac::LLDir_Mac() } // mOSUserDir - error = FSFindFolder(kUserDomain, kApplicationSupportFolderType, true, &fileRef); - if (error == noErr) - { - FSRef newFileRef; - - // Create the directory - error = CFCreateDirectory(&fileRef, secondLifeString, &newFileRef); - if (error == noErr) - { - // Save the full path to the folder - FSRefToLLString(&newFileRef, mOSUserDir); - - // Create our sub-dirs - (void) CFCreateDirectory(&newFileRef, CFSTR("data"), NULL); - //(void) CFCreateDirectory(&newFileRef, CFSTR("cache"), NULL); - (void) CFCreateDirectory(&newFileRef, CFSTR("logs"), NULL); - (void) CFCreateDirectory(&newFileRef, CFSTR("user_settings"), NULL); - (void) CFCreateDirectory(&newFileRef, CFSTR("browser_profile"), NULL); - } - } - + std::string *appdir = getSystemApplicationSupportFolder(); + std::string rootdir; + + //Create root directory + if (CreateDirectory(*appdir, secondLifeString, &rootdir)) + { + + // Save the full path to the folder + mOSUserDir = rootdir; + + // Create our sub-dirs + CreateDirectory(rootdir, std::string("data"), NULL); + CreateDirectory(rootdir, std::string("logs"), NULL); + CreateDirectory(rootdir, std::string("user_settings"), NULL); + CreateDirectory(rootdir, std::string("browser_profile"), NULL); + } + //mOSCacheDir - FSRef cacheDirRef; - error = FSFindFolder(kUserDomain, kCachedDataFolderType, true, &cacheDirRef); - if (error == noErr) + std::string *cachedir = getSystemCacheFolder(); + + if (cachedir) + { - FSRefToLLString(&cacheDirRef, mOSCacheDir); - (void)CFCreateDirectory(&cacheDirRef, CFSTR("SecondLife"),NULL); + mOSCacheDir = *cachedir; + //SPATTERS TODO: This changes from ~/Library/Cache/Secondlife to ~/Library/Cache/com.app.secondlife/Secondlife. Last dir level could go away. + CreateDirectory(mOSCacheDir, secondLifeString, NULL); } // mOSUserAppDir mOSUserAppDir = mOSUserDir; // mTempDir - error = FSFindFolder(kOnAppropriateDisk, kTemporaryFolderType, true, &fileRef); - if (error == noErr) - { - FSRef tempRef; - error = CFCreateDirectory(&fileRef, secondLifeString, &tempRef); - if (error == noErr) - FSRefToLLString(&tempRef, mTempDir); - } + //Aura 120920 boost::filesystem::temp_directory_path() not yet implemented on mac. :( + std::string *tmpdir = getSystemTempFolder(); + if (tmpdir) + { + + CreateDirectory(*tmpdir, secondLifeString, &mTempDir); + if (tmpdir) delete tmpdir; + } mWorkingDir = getCurPath(); mLLPluginDir = mAppRODataDir + mDirDelimiter + "llplugin"; - - CFRelease(executableURLRef); - executableURLRef = NULL; } } @@ -235,52 +174,18 @@ void LLDir_Mac::initAppDirs(const std::string &app_name, mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; } mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); - - //dumpCurrentDirectories(); -} - -U32 LLDir_Mac::countFilesInDir(const std::string &dirname, const std::string &mask) -{ - U32 file_count = 0; - glob_t g; - - std::string tmp_str; - tmp_str = dirname; - tmp_str += mask; - - if(glob(tmp_str.c_str(), GLOB_NOSORT, NULL, &g) == 0) - { - file_count = g.gl_pathc; - - globfree(&g); - } - - return (file_count); } std::string LLDir_Mac::getCurPath() { - char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ - getcwd(tmp_str, LL_MAX_PATH); - return tmp_str; + return boost::filesystem::path( boost::filesystem::current_path() ).string(); } -BOOL LLDir_Mac::fileExists(const std::string &filename) const +bool LLDir_Mac::fileExists(const std::string &filename) const { - struct stat stat_data; - // Check the age of the file - // Now, we see if the files we've gathered are recent... - int res = stat(filename.c_str(), &stat_data); - if (!res) - { - return TRUE; - } - else - { - return FALSE; - } + return boost::filesystem::exists(filename); } diff --git a/indra/llvfs/lldir_mac.h b/indra/llvfs/lldir_mac.h index d190d70be4..558727ebbc 100644 --- a/indra/llvfs/lldir_mac.h +++ b/indra/llvfs/lldir_mac.h @@ -22,7 +22,7 @@ * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ - */ + */ #if !LL_DARWIN #error This header must not be included when compiling for any target other than Mac OS. Consider including lldir.h instead. @@ -45,16 +45,10 @@ public: const std::string& app_read_only_data_dir); virtual std::string getCurPath(); - virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); - virtual BOOL fileExists(const std::string &filename) const; + virtual bool fileExists(const std::string &filename) const; /*virtual*/ std::string getLLPluginLauncher(); /*virtual*/ std::string getLLPluginFilename(std::string base_name); - -private: - int mCurrentDirIndex; - int mCurrentDirCount; - std::string mCurrentDir; }; #endif // LL_LLDIR_MAC_H diff --git a/indra/llvfs/lldir_solaris.cpp b/indra/llvfs/lldir_solaris.cpp index 21f8c3acdb..a97d72d539 100644 --- a/indra/llvfs/lldir_solaris.cpp +++ b/indra/llvfs/lldir_solaris.cpp @@ -272,7 +272,7 @@ std::string LLDir_Solaris::getCurPath() } -BOOL LLDir_Solaris::fileExists(const std::string &filename) const +bool LLDir_Solaris::fileExists(const std::string &filename) const { struct stat stat_data; // Check the age of the file diff --git a/indra/llvfs/lldir_solaris.h b/indra/llvfs/lldir_solaris.h index 0b58a45b15..c6dac57e14 100644 --- a/indra/llvfs/lldir_solaris.h +++ b/indra/llvfs/lldir_solaris.h @@ -47,7 +47,7 @@ public: virtual std::string getCurPath(); virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); - /*virtual*/ BOOL fileExists(const std::string &filename) const; + /*virtual*/ bool fileExists(const std::string &filename) const; private: DIR *mDirp; diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index 7709945123..462d1cce06 100644 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -249,7 +249,7 @@ std::string LLDir_Win32::getCurPath() } -BOOL LLDir_Win32::fileExists(const std::string &filename) const +bool LLDir_Win32::fileExists(const std::string &filename) const { llstat stat_data; // Check the age of the file diff --git a/indra/llvfs/lldir_win32.h b/indra/llvfs/lldir_win32.h index 62fb4713ab..450efaf9da 100644 --- a/indra/llvfs/lldir_win32.h +++ b/indra/llvfs/lldir_win32.h @@ -44,7 +44,7 @@ public: /*virtual*/ std::string getCurPath(); /*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask); - /*virtual*/ BOOL fileExists(const std::string &filename) const; + /*virtual*/ bool fileExists(const std::string &filename) const; /*virtual*/ std::string getLLPluginLauncher(); /*virtual*/ std::string getLLPluginFilename(std::string base_name); diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp index ff92cbb7fd..460d2a8b4f 100644 --- a/indra/llvfs/lldiriterator.cpp +++ b/indra/llvfs/lldiriterator.cpp @@ -26,6 +26,7 @@ #include "lldiriterator.h" +#include "fix_macros.h" #include <boost/filesystem.hpp> #include <boost/regex.hpp> @@ -59,7 +60,7 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask) { is_dir = fs::is_directory(dir_path); } - catch (fs::basic_filesystem_error<fs::path>& e) + catch (const fs::filesystem_error& e) { llwarns << e.what() << llendl; return; @@ -76,7 +77,7 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask) { mIter = fs::directory_iterator(dir_path); } - catch (fs::basic_filesystem_error<fs::path>& e) + catch (const fs::filesystem_error& e) { llwarns << e.what() << llendl; return; @@ -121,7 +122,7 @@ bool LLDirIterator::Impl::next(std::string &fname) while (mIter != end_itr && !found) { boost::smatch match; - std::string name = mIter->path().filename(); + std::string name = mIter->path().filename().string(); if (found = boost::regex_match(name, match, mFilterExp)) { fname = name; diff --git a/indra/llvfs/llvfs_objc.h b/indra/llvfs/llvfs_objc.h new file mode 100644 index 0000000000..90101eb2e9 --- /dev/null +++ b/indra/llvfs/llvfs_objc.h @@ -0,0 +1,43 @@ +/** + * @file llvfs_objc.h + * @brief Definition of directory utilities class for Mac OS X + * + * $LicenseInfo:firstyear=2000&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#if !LL_DARWIN +#error This header must not be included when compiling for any target other than Mac OS. Consider including lldir.h instead. +#endif // !LL_DARWIN + +#ifndef LL_LLVFS_OBJC_H +#define LL_LLVFS_OBJC_H + +#include <iostream> + +std::string* getSystemTempFolder(); +std::string* getSystemCacheFolder(); +std::string* getSystemApplicationSupportFolder(); +std::string* getSystemResourceFolder(); +std::string* getSystemExecutableFolder(); + + +#endif LL_LLVFS_OBJC_H diff --git a/indra/llvfs/llvfs_objc.mm b/indra/llvfs/llvfs_objc.mm new file mode 100644 index 0000000000..4f9e2f81e9 --- /dev/null +++ b/indra/llvfs/llvfs_objc.mm @@ -0,0 +1,108 @@ +/** + * @file llvfs_objc.cpp + * @brief Cocoa implementation of directory utilities for Mac OS X + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#if LL_DARWIN + +//WARNING: This file CANNOT use standard linden includes due to conflicts between definitions of BOOL + +#include "llvfs_objc.h" +#import <Cocoa/Cocoa.h> + +std::string* getSystemTempFolder() +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSString * tempDir = NSTemporaryDirectory(); + if (tempDir == nil) + tempDir = @"/tmp"; + std::string *result = ( new std::string([tempDir UTF8String]) ); + [pool release]; + + return result; +} + +//findSystemDirectory scoped exclusively to this file. +std::string* findSystemDirectory(NSSearchPathDirectory searchPathDirectory, + NSSearchPathDomainMask domainMask) +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + std::string *result; + NSString *path = nil; + + // Search for the path + NSArray* paths = NSSearchPathForDirectoriesInDomains(searchPathDirectory, + domainMask, + YES); + if ([paths count]) + { + path = [paths objectAtIndex:0]; + //SPATTERS HACK: Always attempt to create directory, ignore errors. + NSError *error = nil; + + [[NSFileManager defaultManager] createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:&error]; + + + result = new std::string([path UTF8String]); + } + [pool release]; + return result; +} + +std::string* getSystemExecutableFolder() +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + NSString *bundlePath = [[NSBundle mainBundle] executablePath]; + std::string *result = (new std::string([bundlePath UTF8String])); + [pool release]; + + return result; +} + +std::string* getSystemResourceFolder() +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + NSString *bundlePath = [[NSBundle mainBundle] resourcePath]; + std::string *result = (new std::string([bundlePath UTF8String])); + [pool release]; + + return result; +} + +std::string* getSystemCacheFolder() +{ + return findSystemDirectory (NSCachesDirectory, + NSUserDomainMask); +} + +std::string* getSystemApplicationSupportFolder() +{ + return findSystemDirectory (NSApplicationSupportDirectory, + NSUserDomainMask); + +} + +#endif // LL_DARWIN diff --git a/indra/llvfs/tests/lldir_test.cpp b/indra/llvfs/tests/lldir_test.cpp index ea321c5ae9..3cff622a4b 100644 --- a/indra/llvfs/tests/lldir_test.cpp +++ b/indra/llvfs/tests/lldir_test.cpp @@ -27,11 +27,167 @@ #include "linden_common.h" +#include "llstring.h" +#include "tests/StringVec.h" #include "../lldir.h" #include "../lldiriterator.h" #include "../test/lltut.h" +#include "stringize.h" +#include <boost/foreach.hpp> +#include <boost/assign/list_of.hpp> + +using boost::assign::list_of; + +// We use ensure_equals(..., vec(list_of(...))) not because it's functionally +// required, but because ensure_equals() knows how to format a StringVec. +// Turns out that when ensure_equals() displays a test failure with just +// list_of("string")("another"), you see 'stringanother' vs. '("string", +// "another")'. +StringVec vec(const StringVec& v) +{ + return v; +} +// For some tests, use a dummy LLDir that uses memory data instead of touching +// the filesystem +struct LLDir_Dummy: public LLDir +{ + /*----------------------------- LLDir API ------------------------------*/ + LLDir_Dummy() + { + // Initialize important LLDir data members based on the filesystem + // data below. + mDirDelimiter = "/"; + mExecutableDir = "install"; + mExecutableFilename = "test"; + mExecutablePathAndName = add(mExecutableDir, mExecutableFilename); + mWorkingDir = mExecutableDir; + mAppRODataDir = "install"; + mSkinBaseDir = add(mAppRODataDir, "skins"); + mOSUserDir = "user"; + mOSUserAppDir = mOSUserDir; + mLindenUserDir = ""; + + // Make the dummy filesystem look more or less like what we expect in + // the real one. + static const char* preload[] = + { + // We group these fixture-data pathnames by basename, rather than + // sorting by full path as you might expect, because the outcome + // of each test strongly depends on which skins/languages provide + // a given basename. + "install/skins/default/colors.xml", + "install/skins/steam/colors.xml", + "user/skins/default/colors.xml", + "user/skins/steam/colors.xml", + + "install/skins/default/xui/en/strings.xml", + "install/skins/default/xui/fr/strings.xml", + "install/skins/steam/xui/en/strings.xml", + "install/skins/steam/xui/fr/strings.xml", + "user/skins/default/xui/en/strings.xml", + "user/skins/default/xui/fr/strings.xml", + "user/skins/steam/xui/en/strings.xml", + "user/skins/steam/xui/fr/strings.xml", + + "install/skins/default/xui/en/floater.xml", + "install/skins/default/xui/fr/floater.xml", + "user/skins/default/xui/fr/floater.xml", + + "install/skins/default/xui/en/newfile.xml", + "install/skins/default/xui/fr/newfile.xml", + "user/skins/default/xui/en/newfile.xml", + + "install/skins/default/html/en-us/welcome.html", + "install/skins/default/html/fr/welcome.html", + + "install/skins/default/textures/only_default.jpeg", + "install/skins/steam/textures/only_steam.jpeg", + "user/skins/default/textures/only_user_default.jpeg", + "user/skins/steam/textures/only_user_steam.jpeg", + + "install/skins/default/future/somefile.txt" + }; + BOOST_FOREACH(const char* path, preload) + { + buildFilesystem(path); + } + } + + virtual ~LLDir_Dummy() {} + + virtual void initAppDirs(const std::string& app_name, const std::string& app_read_only_data_dir) + { + // Implement this when we write a test that needs it + } + + virtual std::string getCurPath() + { + // Implement this when we write a test that needs it + return ""; + } + + virtual U32 countFilesInDir(const std::string& dirname, const std::string& mask) + { + // Implement this when we write a test that needs it + return 0; + } + + virtual bool fileExists(const std::string& pathname) const + { + // Record fileExists() calls so we can check whether caching is + // working right. Certain LLDir calls should be able to make decisions + // without calling fileExists() again, having already checked existence. + mChecked.insert(pathname); + // For our simple flat set of strings, see whether the identical + // pathname exists in our set. + return (mFilesystem.find(pathname) != mFilesystem.end()); + } + + virtual std::string getLLPluginLauncher() + { + // Implement this when we write a test that needs it + return ""; + } + + virtual std::string getLLPluginFilename(std::string base_name) + { + // Implement this when we write a test that needs it + return ""; + } + + /*----------------------------- Dummy data -----------------------------*/ + void clearFilesystem() { mFilesystem.clear(); } + void buildFilesystem(const std::string& path) + { + // Split the pathname on slashes, ignoring leading, trailing, doubles + StringVec components; + LLStringUtil::getTokens(path, components, "/"); + // Ensure we have an entry representing every level of this path + std::string partial; + BOOST_FOREACH(std::string component, components) + { + append(partial, component); + mFilesystem.insert(partial); + } + } + + void clear_checked() { mChecked.clear(); } + void ensure_checked(const std::string& pathname) const + { + tut::ensure(STRINGIZE(pathname << " was not checked but should have been"), + mChecked.find(pathname) != mChecked.end()); + } + void ensure_not_checked(const std::string& pathname) const + { + tut::ensure(STRINGIZE(pathname << " was checked but should not have been"), + mChecked.find(pathname) == mChecked.end()); + } + + std::set<std::string> mFilesystem; + mutable std::set<std::string> mChecked; +}; namespace tut { @@ -419,5 +575,193 @@ namespace tut LLFile::rmdir(dir1); LLFile::rmdir(dir2); } -} + template<> template<> + void LLDirTest_object_t::test<6>() + { + set_test_name("findSkinnedFilenames()"); + LLDir_Dummy lldir; + /*------------------------ "default", "en" -------------------------*/ + // Setting "default" means we shouldn't consider any "*/skins/steam" + // directories; setting "en" means we shouldn't consider any "xui/fr" + // directories. + lldir.setSkinFolder("default", "en"); + ensure_equals(lldir.getSkinFolder(), "default"); + ensure_equals(lldir.getLanguage(), "en"); + + // top-level directory of a skin isn't localized + ensure_equals(lldir.findSkinnedFilenames(LLDir::SKINBASE, "colors.xml", LLDir::ALL_SKINS), + vec(list_of("install/skins/default/colors.xml") + ("user/skins/default/colors.xml"))); + // We should not have needed to check for skins/default/en. We should + // just "know" that SKINBASE is not localized. + lldir.ensure_not_checked("install/skins/default/en"); + + ensure_equals(lldir.findSkinnedFilenames(LLDir::TEXTURES, "only_default.jpeg"), + vec(list_of("install/skins/default/textures/only_default.jpeg"))); + // Nor should we have needed to check skins/default/textures/en + // because textures is known not to be localized. + lldir.ensure_not_checked("install/skins/default/textures/en"); + + StringVec expected(vec(list_of("install/skins/default/xui/en/strings.xml") + ("user/skins/default/xui/en/strings.xml"))); + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml", LLDir::ALL_SKINS), + expected); + // The first time, we had to probe to find out whether xui was localized. + lldir.ensure_checked("install/skins/default/xui/en"); + lldir.clear_checked(); + // Now make the same call again -- should return same result -- + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml", LLDir::ALL_SKINS), + expected); + // but this time it should remember that xui is localized. + lldir.ensure_not_checked("install/skins/default/xui/en"); + + // localized subdir with "en-us" instead of "en" + ensure_equals(lldir.findSkinnedFilenames("html", "welcome.html"), + vec(list_of("install/skins/default/html/en-us/welcome.html"))); + lldir.ensure_checked("install/skins/default/html/en"); + lldir.ensure_checked("install/skins/default/html/en-us"); + lldir.clear_checked(); + ensure_equals(lldir.findSkinnedFilenames("html", "welcome.html"), + vec(list_of("install/skins/default/html/en-us/welcome.html"))); + lldir.ensure_not_checked("install/skins/default/html/en"); + lldir.ensure_not_checked("install/skins/default/html/en-us"); + + ensure_equals(lldir.findSkinnedFilenames("future", "somefile.txt"), + vec(list_of("install/skins/default/future/somefile.txt"))); + // Test probing for an unrecognized unlocalized future subdir. + lldir.ensure_checked("install/skins/default/future/en"); + lldir.clear_checked(); + ensure_equals(lldir.findSkinnedFilenames("future", "somefile.txt"), + vec(list_of("install/skins/default/future/somefile.txt"))); + // Second time it should remember that future is unlocalized. + lldir.ensure_not_checked("install/skins/default/future/en"); + + // When language is set to "en", requesting an html file pulls up the + // "en-us" version -- not because it magically matches those strings, + // but because there's no "en" localization and it falls back on the + // default "en-us"! Note that it would probably still be better to + // make the default localization be "en" and allow "en-gb" (or + // whatever) localizations, which would work much more the way you'd + // expect. + ensure_equals(lldir.findSkinnedFilenames("html", "welcome.html"), + vec(list_of("install/skins/default/html/en-us/welcome.html"))); + + /*------------------------ "default", "fr" -------------------------*/ + // We start being able to distinguish localized subdirs from + // unlocalized when we ask for a non-English language. + lldir.setSkinFolder("default", "fr"); + ensure_equals(lldir.getLanguage(), "fr"); + + // pass merge=true to request this filename in all relevant skins + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml", LLDir::ALL_SKINS), + vec(list_of + ("install/skins/default/xui/en/strings.xml") + ("install/skins/default/xui/fr/strings.xml") + ("user/skins/default/xui/en/strings.xml") + ("user/skins/default/xui/fr/strings.xml"))); + + // pass (or default) merge=false to request only most specific skin + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml"), + vec(list_of + ("user/skins/default/xui/en/strings.xml") + ("user/skins/default/xui/fr/strings.xml"))); + + // Our dummy floater.xml has a user localization (for "fr") but no + // English override. This is a case in which CURRENT_SKIN nonetheless + // returns paths from two different skins. + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "floater.xml"), + vec(list_of + ("install/skins/default/xui/en/floater.xml") + ("user/skins/default/xui/fr/floater.xml"))); + + // Our dummy newfile.xml has an English override but no user + // localization. This is another case in which CURRENT_SKIN + // nonetheless returns paths from two different skins. + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "newfile.xml"), + vec(list_of + ("user/skins/default/xui/en/newfile.xml") + ("install/skins/default/xui/fr/newfile.xml"))); + + ensure_equals(lldir.findSkinnedFilenames("html", "welcome.html"), + vec(list_of + ("install/skins/default/html/en-us/welcome.html") + ("install/skins/default/html/fr/welcome.html"))); + + /*------------------------ "default", "zh" -------------------------*/ + lldir.setSkinFolder("default", "zh"); + // Because strings.xml has only a "fr" override but no "zh" override + // in any skin, the most localized version we can find is "en". + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml"), + vec(list_of("user/skins/default/xui/en/strings.xml"))); + + /*------------------------- "steam", "en" --------------------------*/ + lldir.setSkinFolder("steam", "en"); + + ensure_equals(lldir.findSkinnedFilenames(LLDir::SKINBASE, "colors.xml", LLDir::ALL_SKINS), + vec(list_of + ("install/skins/default/colors.xml") + ("install/skins/steam/colors.xml") + ("user/skins/default/colors.xml") + ("user/skins/steam/colors.xml"))); + + ensure_equals(lldir.findSkinnedFilenames(LLDir::TEXTURES, "only_default.jpeg"), + vec(list_of("install/skins/default/textures/only_default.jpeg"))); + + ensure_equals(lldir.findSkinnedFilenames(LLDir::TEXTURES, "only_steam.jpeg"), + vec(list_of("install/skins/steam/textures/only_steam.jpeg"))); + + ensure_equals(lldir.findSkinnedFilenames(LLDir::TEXTURES, "only_user_default.jpeg"), + vec(list_of("user/skins/default/textures/only_user_default.jpeg"))); + + ensure_equals(lldir.findSkinnedFilenames(LLDir::TEXTURES, "only_user_steam.jpeg"), + vec(list_of("user/skins/steam/textures/only_user_steam.jpeg"))); + + // CURRENT_SKIN + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml"), + vec(list_of("user/skins/steam/xui/en/strings.xml"))); + + // pass constraint=ALL_SKINS to request this filename in all relevant skins + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml", LLDir::ALL_SKINS), + vec(list_of + ("install/skins/default/xui/en/strings.xml") + ("install/skins/steam/xui/en/strings.xml") + ("user/skins/default/xui/en/strings.xml") + ("user/skins/steam/xui/en/strings.xml"))); + + /*------------------------- "steam", "fr" --------------------------*/ + lldir.setSkinFolder("steam", "fr"); + + // pass CURRENT_SKIN to request only the most specialized files + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml"), + vec(list_of + ("user/skins/steam/xui/en/strings.xml") + ("user/skins/steam/xui/fr/strings.xml"))); + + // pass ALL_SKINS to request this filename in all relevant skins + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml", LLDir::ALL_SKINS), + vec(list_of + ("install/skins/default/xui/en/strings.xml") + ("install/skins/default/xui/fr/strings.xml") + ("install/skins/steam/xui/en/strings.xml") + ("install/skins/steam/xui/fr/strings.xml") + ("user/skins/default/xui/en/strings.xml") + ("user/skins/default/xui/fr/strings.xml") + ("user/skins/steam/xui/en/strings.xml") + ("user/skins/steam/xui/fr/strings.xml"))); + } + + template<> template<> + void LLDirTest_object_t::test<7>() + { + set_test_name("add()"); + LLDir_Dummy lldir; + ensure_equals("both empty", lldir.add("", ""), ""); + ensure_equals("path empty", lldir.add("", "b"), "b"); + ensure_equals("name empty", lldir.add("a", ""), "a"); + ensure_equals("both simple", lldir.add("a", "b"), "a/b"); + ensure_equals("name leading slash", lldir.add("a", "/b"), "a/b"); + ensure_equals("path trailing slash", lldir.add("a/", "b"), "a/b"); + ensure_equals("both bring slashes", lldir.add("a/", "/b"), "a/b"); + } +} diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 5b7424acbb..93b9d36939 100644 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -50,14 +50,15 @@ LLSplashScreen *gSplashScreenp = NULL; BOOL gDebugClicks = FALSE; BOOL gDebugWindowProc = FALSE; -const S32 gURLProtocolWhitelistCount = 3; -const std::string gURLProtocolWhitelist[] = { "file:", "http:", "https:" }; +const S32 gURLProtocolWhitelistCount = 4; +const std::string gURLProtocolWhitelist[] = { "secondlife:", "http:", "https:", "data:" }; // CP: added a handler list - this is what's used to open the protocol and is based on registry entry // only meaningful difference currently is that file: protocols are opened using http: // since no protocol handler exists in registry for file: // Important - these lists should match - protocol to handler -const std::string gURLProtocolWhitelistHandler[] = { "http", "http", "https" }; +// Maestro: This list isn't referenced anywhere that I could find +//const std::string gURLProtocolWhitelistHandler[] = { "http", "http", "https" }; S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type) diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index 4da87f4e06..e9147d552e 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -280,7 +280,7 @@ extern BOOL gDebugWindowProc; // Protocols, like "http" and "https" we support in URLs extern const S32 gURLProtocolWhitelistCount; extern const std::string gURLProtocolWhitelist[]; -extern const std::string gURLProtocolWhitelistHandler[]; +//extern const std::string gURLProtocolWhitelistHandler[]; void simpleEscapeString ( std::string& stringIn ); diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index 52ba8b3bf3..af83b50097 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -36,8 +36,8 @@ #include <AGL/agl.h> // AssertMacros.h does bad things. +#include "fix_macros.h" #undef verify -#undef check #undef require diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 3bf4a48cb6..a15114cb9b 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -2516,6 +2516,23 @@ void exec_cmd(const std::string& cmd, const std::string& arg) // Must begin with protocol identifier. void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async) { + bool found = false; + S32 i; + for (i = 0; i < gURLProtocolWhitelistCount; i++) + { + if (escaped_url.find(gURLProtocolWhitelist[i]) != std::string::npos) + { + found = true; + break; + } + } + + if (!found) + { + llwarns << "spawn_web_browser called for url with protocol not on whitelist: " << escaped_url << llendl; + return; + } + llinfos << "spawn_web_browser: " << escaped_url << llendl; #if LL_LINUX || LL_SOLARIS @@ -2646,8 +2663,9 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList() if (sortpat) { // Sort the list of system fonts from most-to-least-desirable. + FcResult result; fs = FcFontSort(NULL, sortpat, elide_unicode_coverage, - NULL, NULL); + NULL, &result); FcPatternDestroy(sortpat); } diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h index 4e2a269ea3..c5ce892a04 100644 --- a/indra/llwindow/llwindowsdl.h +++ b/indra/llwindow/llwindowsdl.h @@ -41,8 +41,8 @@ #endif // AssertMacros.h does bad things. +#include "fix_macros.h" #undef verify -#undef check #undef require diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 9a4dd41c4e..43c0090993 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -58,7 +58,6 @@ #include <dinput.h> #include <Dbt.h.> -#include "llmemtype.h" // culled from winuser.h #ifndef WM_MOUSEWHEEL /* Added to be compatible with later SDK's */ const S32 WM_MOUSEWHEEL = 0x020A; @@ -1773,8 +1772,6 @@ void LLWindowWin32::gatherInput() MSG msg; int msg_count = 0; - LLMemType m1(LLMemType::MTYPE_GATHER_INPUT); - while ((msg_count < MAX_MESSAGE_PER_UPDATE) && PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { mCallbacks->handlePingWatchdog(this, "Main:TranslateGatherInput"); diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index 9a3a40e476..ee7d1d50b7 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -254,6 +254,7 @@ public: else { llwarns << "Control " << name << " not found." << llendl; + return T(); } return convert_from_llsd<T>(value, type, name); } diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp index 2ffb0d8503..7aa2ce9606 100644 --- a/indra/llxml/llxmlnode.cpp +++ b/indra/llxml/llxmlnode.cpp @@ -147,13 +147,15 @@ LLXMLNodePtr LLXMLNode::deepCopy() for (LLXMLChildList::iterator iter = mChildren->map.begin(); iter != mChildren->map.end(); ++iter) { - newnode->addChild(iter->second->deepCopy()); + LLXMLNodePtr temp_ptr_for_gcc(iter->second->deepCopy()); + newnode->addChild(temp_ptr_for_gcc); } } for (LLXMLAttribList::iterator iter = mAttributes.begin(); iter != mAttributes.end(); ++iter) { - newnode->addChild(iter->second->deepCopy()); + LLXMLNodePtr temp_ptr_for_gcc(iter->second->deepCopy()); + newnode->addChild(temp_ptr_for_gcc); } return newnode; @@ -259,7 +261,7 @@ BOOL LLXMLNode::removeChild(LLXMLNode *target_child) return FALSE; } -void LLXMLNode::addChild(LLXMLNodePtr new_child, LLXMLNodePtr after_child) +void LLXMLNode::addChild(LLXMLNodePtr& new_child) { if (new_child->mParent != NULL) { @@ -273,6 +275,11 @@ void LLXMLNode::addChild(LLXMLNodePtr new_child, LLXMLNodePtr after_child) new_child->mParent = this; if (new_child->mIsAttribute) { + LLXMLAttribList::iterator found_it = mAttributes.find(new_child->mName); + if (found_it != mAttributes.end()) + { + removeChild(found_it->second); + } mAttributes.insert(std::make_pair(new_child->mName, new_child)); } else @@ -285,49 +292,11 @@ void LLXMLNode::addChild(LLXMLNodePtr new_child, LLXMLNodePtr after_child) } mChildren->map.insert(std::make_pair(new_child->mName, new_child)); - // if after_child is specified, it damn well better be in the list of children - // for this node. I'm not going to assert that, because it would be expensive, - // but don't specify that parameter if you didn't get the value for it from the - // list of children of this node! - if (after_child.isNull()) - { - if (mChildren->tail != new_child) - { - mChildren->tail->mNext = new_child; - new_child->mPrev = mChildren->tail; - mChildren->tail = new_child; - } - } - // if after_child == parent, then put new_child at beginning - else if (after_child == this) - { - // add to front of list - new_child->mNext = mChildren->head; - if (mChildren->head) - { - mChildren->head->mPrev = new_child; - mChildren->head = new_child; - } - else // no children - { - mChildren->head = new_child; - mChildren->tail = new_child; - } - } - else + if (mChildren->tail != new_child) { - if (after_child->mNext.notNull()) - { - // if after_child was not the last item, fix up some pointers - after_child->mNext->mPrev = new_child; - new_child->mNext = after_child->mNext; - } - new_child->mPrev = after_child; - after_child->mNext = new_child; - if (mChildren->tail == after_child) - { - mChildren->tail = new_child; - } + mChildren->tail->mNext = new_child; + new_child->mPrev = mChildren->tail; + mChildren->tail = new_child; } } @@ -343,8 +312,9 @@ LLXMLNodePtr LLXMLNode::createChild(const char* name, BOOL is_attribute) // virtual LLXMLNodePtr LLXMLNode::createChild(LLStringTableEntry* name, BOOL is_attribute) { - LLXMLNode* ret = new LLXMLNode(name, is_attribute); + LLXMLNodePtr ret(new LLXMLNode(name, is_attribute)); ret->mID.clear(); + addChild(ret); return ret; } @@ -358,11 +328,12 @@ BOOL LLXMLNode::deleteChild(LLXMLNode *child) return FALSE; } -void LLXMLNode::setParent(LLXMLNodePtr new_parent) +void LLXMLNode::setParent(LLXMLNodePtr& new_parent) { if (new_parent.notNull()) { - new_parent->addChild(this); + LLXMLNodePtr this_ptr(this); + new_parent->addChild(this_ptr); } else { @@ -681,27 +652,6 @@ bool LLXMLNode::updateNode( return TRUE; } - -// static -LLXMLNodePtr LLXMLNode::replaceNode(LLXMLNodePtr node, LLXMLNodePtr update_node) -{ - if (!node || !update_node) - { - llwarns << "Node invalid" << llendl; - return node; - } - - LLXMLNodePtr cloned_node = update_node->deepCopy(); - node->mParent->addChild(cloned_node, node); // add after node - LLXMLNodePtr parent = node->mParent; - parent->removeChild(node); - parent->updateDefault(); - - return cloned_node; -} - - - // static bool LLXMLNode::parseFile(const std::string& filename, LLXMLNodePtr& node, LLXMLNode* defaults_tree) { @@ -897,7 +847,8 @@ bool LLXMLNode::getLayeredXMLNode(LLXMLNodePtr& root, std::vector<std::string>::const_iterator itor; - for (itor = paths.begin(), ++itor; itor != paths.end(); ++itor) + // We've already dealt with the first item, skip that one + for (itor = paths.begin() + 1; itor != paths.end(); ++itor) { std::string layer_filename = *itor; if(layer_filename.empty() || layer_filename == filename) @@ -1198,7 +1149,8 @@ void LLXMLNode::scrubToTree(LLXMLNode *tree) std::vector<LLXMLNodePtr>::iterator itor3; for (itor3=to_delete_list.begin(); itor3!=to_delete_list.end(); ++itor3) { - (*itor3)->setParent(NULL); + LLXMLNodePtr ptr; + (*itor3)->setParent(ptr); } } } @@ -2733,7 +2685,8 @@ void LLXMLNode::setName(LLStringTableEntry* name) mName = name; if (old_parent) { - old_parent->addChild(this); + LLXMLNodePtr this_ptr(this); + old_parent->addChild(this_ptr); } } diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h index e3da7169e7..ec486d7957 100644 --- a/indra/llxml/llxmlnode.h +++ b/indra/llxml/llxmlnode.h @@ -127,8 +127,8 @@ public: BOOL isNull(); BOOL deleteChild(LLXMLNode* child); - void addChild(LLXMLNodePtr new_child, LLXMLNodePtr after_child = LLXMLNodePtr(NULL)); - void setParent(LLXMLNodePtr new_parent); // reparent if necessary + void addChild(LLXMLNodePtr& new_child); + void setParent(LLXMLNodePtr& new_parent); // reparent if necessary // Serialization static bool parseFile( @@ -147,7 +147,6 @@ public: static bool updateNode( LLXMLNodePtr& node, LLXMLNodePtr& update_node); - static LLXMLNodePtr replaceNode(LLXMLNodePtr node, LLXMLNodePtr replacement_node); static bool getLayeredXMLNode(LLXMLNodePtr& root, const std::vector<std::string>& paths); diff --git a/indra/mac_crash_logger/CMakeLists.txt b/indra/mac_crash_logger/CMakeLists.txt index 420e836e36..3906a3bb8c 100644 --- a/indra/mac_crash_logger/CMakeLists.txt +++ b/indra/mac_crash_logger/CMakeLists.txt @@ -23,12 +23,14 @@ include_directories( set(mac_crash_logger_SOURCE_FILES mac_crash_logger.cpp llcrashloggermac.cpp + llcrashloggermacdelegate.mm ) set(mac_crash_logger_HEADER_FILES CMakeLists.txt llcrashloggermac.h + llcrashloggermacdelegate.h ) set_source_files_properties(${mac_crash_logger_HEADER_FILES} @@ -55,9 +57,12 @@ set_target_properties(mac-crash-logger MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) +find_library(COCOA_LIBRARY Cocoa) + target_link_libraries(mac-crash-logger ${LLCRASHLOGGER_LIBRARIES} ${LLVFS_LIBRARIES} + ${COCOA_LIBRARIES} ${LLXML_LIBRARIES} ${LLMESSAGE_LIBRARIES} ${LLVFS_LIBRARIES} diff --git a/indra/mac_crash_logger/CrashReporter.nib b/indra/mac_crash_logger/CrashReporter.nib Binary files differnew file mode 100644 index 0000000000..a30d8d205c --- /dev/null +++ b/indra/mac_crash_logger/CrashReporter.nib diff --git a/indra/mac_crash_logger/CrashReporter.nib/classes.nib b/indra/mac_crash_logger/CrashReporter.nib/classes.nib deleted file mode 100644 index c4b887e72b..0000000000 --- a/indra/mac_crash_logger/CrashReporter.nib/classes.nib +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>IBVersion</key> - <string>1</string> -</dict> -</plist> diff --git a/indra/mac_crash_logger/CrashReporter.nib/info.nib b/indra/mac_crash_logger/CrashReporter.nib/info.nib deleted file mode 100644 index 06805c0e4f..0000000000 --- a/indra/mac_crash_logger/CrashReporter.nib/info.nib +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>IBFramework Version</key> - <string>629</string> - <key>IBLastKnownRelativeProjectPath</key> - <string>../../build-darwin-i386/SecondLife.xcodeproj</string> - <key>IBOldestOS</key> - <integer>5</integer> - <key>IBOpenObjects</key> - <array/> - <key>IBSystem Version</key> - <string>9E17</string> - <key>targetFramework</key> - <string>IBCarbonFramework</string> -</dict> -</plist> diff --git a/indra/mac_crash_logger/CrashReporter.nib/objects.xib b/indra/mac_crash_logger/CrashReporter.nib/objects.xib deleted file mode 100644 index 32647391b6..0000000000 --- a/indra/mac_crash_logger/CrashReporter.nib/objects.xib +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<object class="NSIBObjectData"> - <object name="rootObject" class="NSCustomObject" id="1"> - </object> - <array count="7" name="allObjects"> - <object class="IBCarbonButton" id="182"> - <ostype name="command">ok </ostype> - <string name="title">Send Report</string> - <string name="bounds">414 273 434 378 </string> - </object> - <object class="IBCarbonButton" id="183"> - <ostype name="command">not!</ostype> - <int name="buttonType">2</int> - <string name="title">Don't Send</string> - <string name="bounds">414 390 434 487 </string> - </object> - <object class="IBCarbonStaticText" id="181"> - <string name="title">Second Life appears to have crashed or frozen the last time it ran. This crash reporter collects information about your computer's hardware configuration, operating system, and some Second Life logs, all of which are used for debugging purposes only. In the space below, please briefly describe what you were doing or trying to do just prior to the crash. Thank you for your help! This report is NOT read by Customer Support. If you have billing or other questions, please go to: http://www.secondlife.com/support/ If you don't wish to send Linden Lab a crash report, press Don't Send. </string> - <string name="bounds">20 20 231 487 </string> - </object> - <object class="IBCarbonWindow" id="166"> - <int name="carbonWindowClass">2</int> - <int name="themeBrush">3</int> - <int name="windowPosition">7</int> - <string name="title">Second Life Crash Logger</string> - <object name="rootControl" class="IBCarbonRootControl" id="167"> - <array count="5" name="subviews"> - <reference idRef="181"/> - <reference idRef="182"/> - <reference idRef="183"/> - <object class="IBCarbonEditText" id="185"> - <ostype name="controlSignature">text</ostype> - <boolean name="isUnicode">TRUE</boolean> - <string name="bounds">242 23 391 484 </string> - </object> - <object class="IBCarbonCheckBox" id="193"> - <ostype name="controlSignature">remb</ostype> - <string name="title">Remember This Choice</string> - <string name="bounds">415 20 433 186 </string> - </object> - </array> - <string name="bounds">0 0 454 507 </string> - </object> - <string name="windowRect">257 653 711 1160 </string> - <string name="ScreenRectAtEncodeTime">0 0 768 1024 </string> - </object> - <reference idRef="185"/> - <reference idRef="167"/> - <reference idRef="193"/> - </array> - <array count="7" name="allParents"> - <reference idRef="167"/> - <reference idRef="167"/> - <reference idRef="167"/> - <reference idRef="1"/> - <reference idRef="167"/> - <reference idRef="166"/> - <reference idRef="167"/> - </array> - <dictionary count="2" name="nameTable"> - <string>CrashReporter</string> - <reference idRef="166"/> - <string>File's Owner</string> - <reference idRef="1"/> - </dictionary> - <string name="targetFramework">IBCarbonFramework</string> - <unsigned_int name="nextObjectID">194</unsigned_int> -</object> diff --git a/indra/mac_crash_logger/CrashReporter.xib b/indra/mac_crash_logger/CrashReporter.xib new file mode 100644 index 0000000000..f6d4776d51 --- /dev/null +++ b/indra/mac_crash_logger/CrashReporter.xib @@ -0,0 +1,3895 @@ +<?xml version="1.0" encoding="UTF-8"?> +<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00"> + <data> + <int key="IBDocument.SystemTarget">1070</int> + <string key="IBDocument.SystemVersion">11G63</string> + <string key="IBDocument.InterfaceBuilderVersion">2182</string> + <string key="IBDocument.AppKitVersion">1138.51</string> + <string key="IBDocument.HIToolboxVersion">569.00</string> + <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="NS.object.0">2182</string> + </object> + <array key="IBDocument.IntegratedClassDependencies"> + <string>NSTextField</string> + <string>NSView</string> + <string>NSWindowTemplate</string> + <string>NSMenu</string> + <string>NSMenuItem</string> + <string>NSTextFieldCell</string> + <string>NSButtonCell</string> + <string>IBNSLayoutConstraint</string> + <string>NSButton</string> + <string>NSCustomObject</string> + </array> + <array key="IBDocument.PluginDependencies"> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + </array> + <object class="NSMutableDictionary" key="IBDocument.Metadata"> + <string key="NS.key.0">PluginDependencyRecalculationVersion</string> + <integer value="1" key="NS.object.0"/> + </object> + <array class="NSMutableArray" key="IBDocument.RootObjects" id="1048"> + <object class="NSCustomObject" id="1021"> + <string key="NSClassName">NSApplication</string> + </object> + <object class="NSCustomObject" id="1014"> + <string key="NSClassName">FirstResponder</string> + </object> + <object class="NSCustomObject" id="1050"> + <string key="NSClassName">NSApplication</string> + </object> + <object class="NSMenu" id="649796088"> + <string key="NSTitle">AMainMenu</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="694149608"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">Second Life Crash Logger</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <object class="NSCustomResource" key="NSOnImage" id="35465992"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSMenuCheckmark</string> + </object> + <object class="NSCustomResource" key="NSMixedImage" id="502551668"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSMenuMixedState</string> + </object> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="110575045"> + <string key="NSTitle">Second Life Crash Logger</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="238522557"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">About Second Life Crash Logger</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="304266470"> + <reference key="NSMenu" ref="110575045"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="609285721"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">Preferences…</string> + <string key="NSKeyEquiv">,</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="481834944"> + <reference key="NSMenu" ref="110575045"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1046388886"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">Services</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="752062318"> + <string key="NSTitle">Services</string> + <array class="NSMutableArray" key="NSMenuItems"/> + <string key="NSName">_NSServicesMenu</string> + </object> + </object> + <object class="NSMenuItem" id="646227648"> + <reference key="NSMenu" ref="110575045"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="755159360"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">Hide Second Life Crash Logger</string> + <string key="NSKeyEquiv">h</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="342932134"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">Hide Others</string> + <string key="NSKeyEquiv">h</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="908899353"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">Show All</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1056857174"> + <reference key="NSMenu" ref="110575045"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="632727374"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">Quit Second Life Crash Logger</string> + <string key="NSKeyEquiv">q</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + <string key="NSName">_NSAppleMenu</string> + </object> + </object> + <object class="NSMenuItem" id="379814623"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">File</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="720053764"> + <string key="NSTitle">File</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="705341025"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">New</string> + <string key="NSKeyEquiv">n</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="722745758"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Open…</string> + <string key="NSKeyEquiv">o</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1025936716"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Open Recent</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="1065607017"> + <string key="NSTitle">Open Recent</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="759406840"> + <reference key="NSMenu" ref="1065607017"/> + <string key="NSTitle">Clear Menu</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + <string key="NSName">_NSRecentDocumentsMenu</string> + </object> + </object> + <object class="NSMenuItem" id="425164168"> + <reference key="NSMenu" ref="720053764"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="776162233"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Close</string> + <string key="NSKeyEquiv">w</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1023925487"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Save…</string> + <string key="NSKeyEquiv">s</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="579971712"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Revert to Saved</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1010469920"> + <reference key="NSMenu" ref="720053764"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="294629803"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Page Setup...</string> + <string key="NSKeyEquiv">P</string> + <int key="NSKeyEquivModMask">1179648</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSToolTip"/> + </object> + <object class="NSMenuItem" id="49223823"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Print…</string> + <string key="NSKeyEquiv">p</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="952259628"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">Edit</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="789758025"> + <string key="NSTitle">Edit</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="1058277027"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Undo</string> + <string key="NSKeyEquiv">z</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="790794224"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Redo</string> + <string key="NSKeyEquiv">Z</string> + <int key="NSKeyEquivModMask">1179648</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1040322652"> + <reference key="NSMenu" ref="789758025"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="296257095"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Cut</string> + <string key="NSKeyEquiv">x</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="860595796"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Copy</string> + <string key="NSKeyEquiv">c</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="29853731"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Paste</string> + <string key="NSKeyEquiv">v</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="82994268"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Paste and Match Style</string> + <string key="NSKeyEquiv">V</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="437104165"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Delete</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="583158037"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Select All</string> + <string key="NSKeyEquiv">a</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="212016141"> + <reference key="NSMenu" ref="789758025"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="892235320"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Find</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="963351320"> + <string key="NSTitle">Find</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="447796847"> + <reference key="NSMenu" ref="963351320"/> + <string key="NSTitle">Find…</string> + <string key="NSKeyEquiv">f</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">1</int> + </object> + <object class="NSMenuItem" id="738670835"> + <reference key="NSMenu" ref="963351320"/> + <string key="NSTitle">Find and Replace…</string> + <string key="NSKeyEquiv">f</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">12</int> + </object> + <object class="NSMenuItem" id="326711663"> + <reference key="NSMenu" ref="963351320"/> + <string key="NSTitle">Find Next</string> + <string key="NSKeyEquiv">g</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">2</int> + </object> + <object class="NSMenuItem" id="270902937"> + <reference key="NSMenu" ref="963351320"/> + <string key="NSTitle">Find Previous</string> + <string key="NSKeyEquiv">G</string> + <int key="NSKeyEquivModMask">1179648</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">3</int> + </object> + <object class="NSMenuItem" id="159080638"> + <reference key="NSMenu" ref="963351320"/> + <string key="NSTitle">Use Selection for Find</string> + <string key="NSKeyEquiv">e</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">7</int> + </object> + <object class="NSMenuItem" id="88285865"> + <reference key="NSMenu" ref="963351320"/> + <string key="NSTitle">Jump to Selection</string> + <string key="NSKeyEquiv">j</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="972420730"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Spelling and Grammar</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="769623530"> + <string key="NSTitle">Spelling and Grammar</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="679648819"> + <reference key="NSMenu" ref="769623530"/> + <string key="NSTitle">Show Spelling and Grammar</string> + <string key="NSKeyEquiv">:</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="96193923"> + <reference key="NSMenu" ref="769623530"/> + <string key="NSTitle">Check Document Now</string> + <string key="NSKeyEquiv">;</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="859480356"> + <reference key="NSMenu" ref="769623530"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="948374510"> + <reference key="NSMenu" ref="769623530"/> + <string key="NSTitle">Check Spelling While Typing</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="967646866"> + <reference key="NSMenu" ref="769623530"/> + <string key="NSTitle">Check Grammar With Spelling</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="795346622"> + <reference key="NSMenu" ref="769623530"/> + <string key="NSTitle">Correct Spelling Automatically</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="507821607"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Substitutions</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="698887838"> + <string key="NSTitle">Substitutions</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="65139061"> + <reference key="NSMenu" ref="698887838"/> + <string key="NSTitle">Show Substitutions</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="19036812"> + <reference key="NSMenu" ref="698887838"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="605118523"> + <reference key="NSMenu" ref="698887838"/> + <string key="NSTitle">Smart Copy/Paste</string> + <string key="NSKeyEquiv">f</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">1</int> + </object> + <object class="NSMenuItem" id="197661976"> + <reference key="NSMenu" ref="698887838"/> + <string key="NSTitle">Smart Quotes</string> + <string key="NSKeyEquiv">g</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">2</int> + </object> + <object class="NSMenuItem" id="672708820"> + <reference key="NSMenu" ref="698887838"/> + <string key="NSTitle">Smart Dashes</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="708854459"> + <reference key="NSMenu" ref="698887838"/> + <string key="NSTitle">Smart Links</string> + <string key="NSKeyEquiv">G</string> + <int key="NSKeyEquivModMask">1179648</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">3</int> + </object> + <object class="NSMenuItem" id="537092702"> + <reference key="NSMenu" ref="698887838"/> + <string key="NSTitle">Text Replacement</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="288088188"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Transformations</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="579392910"> + <string key="NSTitle">Transformations</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="1060694897"> + <reference key="NSMenu" ref="579392910"/> + <string key="NSTitle">Make Upper Case</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="879586729"> + <reference key="NSMenu" ref="579392910"/> + <string key="NSTitle">Make Lower Case</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="56570060"> + <reference key="NSMenu" ref="579392910"/> + <string key="NSTitle">Capitalize</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="676164635"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Speech</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="785027613"> + <string key="NSTitle">Speech</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="731782645"> + <reference key="NSMenu" ref="785027613"/> + <string key="NSTitle">Start Speaking</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="680220178"> + <reference key="NSMenu" ref="785027613"/> + <string key="NSTitle">Stop Speaking</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="302598603"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">Format</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="941447902"> + <string key="NSTitle">Format</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="792887677"> + <reference key="NSMenu" ref="941447902"/> + <string key="NSTitle">Font</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="786677654"> + <string key="NSTitle">Font</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="159677712"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Show Fonts</string> + <string key="NSKeyEquiv">t</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="305399458"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Bold</string> + <string key="NSKeyEquiv">b</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">2</int> + </object> + <object class="NSMenuItem" id="814362025"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Italic</string> + <string key="NSKeyEquiv">i</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">1</int> + </object> + <object class="NSMenuItem" id="330926929"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Underline</string> + <string key="NSKeyEquiv">u</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="533507878"> + <reference key="NSMenu" ref="786677654"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="158063935"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Bigger</string> + <string key="NSKeyEquiv">+</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">3</int> + </object> + <object class="NSMenuItem" id="885547335"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Smaller</string> + <string key="NSKeyEquiv">-</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">4</int> + </object> + <object class="NSMenuItem" id="901062459"> + <reference key="NSMenu" ref="786677654"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="767671776"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Kern</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="175441468"> + <string key="NSTitle">Kern</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="252969304"> + <reference key="NSMenu" ref="175441468"/> + <string key="NSTitle">Use Default</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="766922938"> + <reference key="NSMenu" ref="175441468"/> + <string key="NSTitle">Use None</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="677519740"> + <reference key="NSMenu" ref="175441468"/> + <string key="NSTitle">Tighten</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="238351151"> + <reference key="NSMenu" ref="175441468"/> + <string key="NSTitle">Loosen</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="691570813"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Ligature</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="1058217995"> + <string key="NSTitle">Ligature</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="706297211"> + <reference key="NSMenu" ref="1058217995"/> + <string key="NSTitle">Use Default</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="568384683"> + <reference key="NSMenu" ref="1058217995"/> + <string key="NSTitle">Use None</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="663508465"> + <reference key="NSMenu" ref="1058217995"/> + <string key="NSTitle">Use All</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="769124883"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Baseline</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="18263474"> + <string key="NSTitle">Baseline</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="257962622"> + <reference key="NSMenu" ref="18263474"/> + <string key="NSTitle">Use Default</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="644725453"> + <reference key="NSMenu" ref="18263474"/> + <string key="NSTitle">Superscript</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1037576581"> + <reference key="NSMenu" ref="18263474"/> + <string key="NSTitle">Subscript</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="941806246"> + <reference key="NSMenu" ref="18263474"/> + <string key="NSTitle">Raise</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1045724900"> + <reference key="NSMenu" ref="18263474"/> + <string key="NSTitle">Lower</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="739652853"> + <reference key="NSMenu" ref="786677654"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1012600125"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Show Colors</string> + <string key="NSKeyEquiv">C</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="214559597"> + <reference key="NSMenu" ref="786677654"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="596732606"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Copy Style</string> + <string key="NSKeyEquiv">c</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="393423671"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Paste Style</string> + <string key="NSKeyEquiv">v</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + <string key="NSName">_NSFontMenu</string> + </object> + </object> + <object class="NSMenuItem" id="215659978"> + <reference key="NSMenu" ref="941447902"/> + <string key="NSTitle">Text</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="446991534"> + <string key="NSTitle">Text</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="875092757"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Align Left</string> + <string key="NSKeyEquiv">{</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="630155264"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Center</string> + <string key="NSKeyEquiv">|</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="945678886"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Justify</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="512868991"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Align Right</string> + <string key="NSKeyEquiv">}</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="163117631"> + <reference key="NSMenu" ref="446991534"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="31516759"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Writing Direction</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="956096989"> + <string key="NSTitle">Writing Direction</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="257099033"> + <reference key="NSMenu" ref="956096989"/> + <bool key="NSIsDisabled">YES</bool> + <string key="NSTitle">Paragraph</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="551969625"> + <reference key="NSMenu" ref="956096989"/> + <string type="base64-UTF8" key="NSTitle">CURlZmF1bHQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="249532473"> + <reference key="NSMenu" ref="956096989"/> + <string type="base64-UTF8" key="NSTitle">CUxlZnQgdG8gUmlnaHQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="607364498"> + <reference key="NSMenu" ref="956096989"/> + <string type="base64-UTF8" key="NSTitle">CVJpZ2h0IHRvIExlZnQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="508151438"> + <reference key="NSMenu" ref="956096989"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="981751889"> + <reference key="NSMenu" ref="956096989"/> + <bool key="NSIsDisabled">YES</bool> + <string key="NSTitle">Selection</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="380031999"> + <reference key="NSMenu" ref="956096989"/> + <string type="base64-UTF8" key="NSTitle">CURlZmF1bHQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="825984362"> + <reference key="NSMenu" ref="956096989"/> + <string type="base64-UTF8" key="NSTitle">CUxlZnQgdG8gUmlnaHQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="560145579"> + <reference key="NSMenu" ref="956096989"/> + <string type="base64-UTF8" key="NSTitle">CVJpZ2h0IHRvIExlZnQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="908105787"> + <reference key="NSMenu" ref="446991534"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="644046920"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Show Ruler</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="231811626"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Copy Ruler</string> + <string key="NSKeyEquiv">c</string> + <int key="NSKeyEquivModMask">1310720</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="883618387"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Paste Ruler</string> + <string key="NSKeyEquiv">v</string> + <int key="NSKeyEquivModMask">1310720</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="586577488"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">View</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="466310130"> + <string key="NSTitle">View</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="102151532"> + <reference key="NSMenu" ref="466310130"/> + <string key="NSTitle">Show Toolbar</string> + <string key="NSKeyEquiv">t</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="237841660"> + <reference key="NSMenu" ref="466310130"/> + <string key="NSTitle">Customize Toolbar…</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="713487014"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">Window</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="835318025"> + <string key="NSTitle">Window</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="1011231497"> + <reference key="NSMenu" ref="835318025"/> + <string key="NSTitle">Minimize</string> + <string key="NSKeyEquiv">m</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="575023229"> + <reference key="NSMenu" ref="835318025"/> + <string key="NSTitle">Zoom</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="299356726"> + <reference key="NSMenu" ref="835318025"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="625202149"> + <reference key="NSMenu" ref="835318025"/> + <string key="NSTitle">Bring All to Front</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + <string key="NSName">_NSWindowsMenu</string> + </object> + </object> + <object class="NSMenuItem" id="448692316"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">Help</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="992780483"> + <string key="NSTitle">Help</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="105068016"> + <reference key="NSMenu" ref="992780483"/> + <string key="NSTitle">Second Life Crash Logger Help</string> + <string key="NSKeyEquiv">?</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + <string key="NSName">_NSHelpMenu</string> + </object> + </object> + </array> + <string key="NSName">_NSMainMenu</string> + </object> + <object class="NSWindowTemplate" id="972006081"> + <int key="NSWindowStyleMask">15</int> + <int key="NSWindowBacking">2</int> + <string key="NSWindowRect">{{335, 390}, {508, 477}}</string> + <int key="NSWTFlags">1954021376</int> + <string key="NSWindowTitle">Second Life Crash Logger</string> + <string key="NSWindowClass">NSWindow</string> + <nil key="NSViewClass"/> + <nil key="NSUserInterfaceItemIdentifier"/> + <object class="NSView" key="NSWindowView" id="439893737"> + <reference key="NSNextResponder"/> + <int key="NSvFlags">256</int> + <array class="NSMutableArray" key="NSSubviews"> + <object class="NSTextField" id="242877095"> + <reference key="NSNextResponder" ref="439893737"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{17, 228}, {474, 229}}</string> + <reference key="NSSuperview" ref="439893737"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="1018085422"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <string key="NSAntiCompressionPriority">{250, 750}</string> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="502956757"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">272891904</int> + <object class="NSMutableString" key="NSContents"> + <bytes key="NS.bytes">U2Vjb25kIExpZmUgYXBwZWFycyB0byBoYXZlIGNyYXNoZWQgb3IgZnJvemVuIHRoZSBsYXN0IHRpbWUg +aXQgcmFuLgoKVGhpcyBjcmFzaCByZXBvcnRlciBjb2xsZWN0cyBpbmZvcm1hdGlvbiBhYm91dCB5b3Vy +IGNvbXB1dGVyJ3MgaGFyZHdhcmUgY29uZmlndXJhdGlvbiwgb3BlcmF0aW5nIHN5c3RlbSwgYW5kIHNv +bWUgU2Vjb25kIExpZmUgbG9ncywgYWxsIG9mIHdoaWNoIGFyZSB1c2VkIGZvciBkZWJ1Z2dpbmcgcHVy +cG9zZXMgb25seS4KCkluIHRoZSBzcGFjZSBiZWxvdywgcGxlYXNlIGJyaWVmbHkgZGVzY3JpYmUgd2hh +dCB5b3Ugd2VyZSBkb2luZyBvciB0cnlpbmcgdG8gZG8ganVzdCBwcmlvciB0byB0aGUgY3Jhc2guICBU +aGFuayB5b3UgZm9yIHlvdXIgaGVscCEKClRoaXMgcmVwb3J0IGlzIE5PVCByZWFkIGJ5IEN1c3RvbWVy +IFN1cHBvcnQuICBJZiB5b3UgaGF2ZSBiaWxsaW5nIG9yIG90aGVyIHF1ZXN0aW9ucywgcGxlYXNlIGdv +IHRvOiBodHRwOi8vd3d3LnNlY29uZGxpZmUuY29tL3N1cHBvcnQvCgpJZiB5b3UgZG9uJ3Qgd2lzaCB0 +byBzZW5kIExpbmRlbiBMYWIgYSBjcmFzaCByZXBvcnQsIHByZXNzIENhbmNlbC4</bytes> + </object> + <object class="NSFont" key="NSSupport" id="1010806345"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">13</double> + <int key="NSfFlags">16</int> + </object> + <string key="NSCellIdentifier">_NS:9</string> + <reference key="NSControlView" ref="242877095"/> + <object class="NSColor" key="NSBackgroundColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlColor</string> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> + </object> + </object> + <object class="NSColor" key="NSTextColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlTextColor</string> + <object class="NSColor" key="NSColor" id="355388215"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MAA</bytes> + </object> + </object> + </object> + </object> + <object class="NSTextField" id="1018085422"> + <reference key="NSNextResponder" ref="439893737"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{20, 64}, {468, 163}}</string> + <reference key="NSSuperview" ref="439893737"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="688522420"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <string key="NSAntiCompressionPriority">{250, 750}</string> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="867418359"> + <int key="NSCellFlags">-1805517311</int> + <int key="NSCellFlags2">272891904</int> + <string key="NSContents"/> + <object class="NSFont" key="NSSupport"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">9</double> + <int key="NSfFlags">3614</int> + </object> + <string key="NSCellIdentifier">_NS:9</string> + <reference key="NSControlView" ref="1018085422"/> + <bool key="NSDrawsBackground">YES</bool> + <object class="NSColor" key="NSBackgroundColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">textBackgroundColor</string> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MQA</bytes> + </object> + </object> + <object class="NSColor" key="NSTextColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">textColor</string> + <reference key="NSColor" ref="355388215"/> + </object> + </object> + </object> + <object class="NSButton" id="688522420"> + <reference key="NSNextResponder" ref="439893737"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{16, 18}, {189, 30}}</string> + <reference key="NSSuperview" ref="439893737"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="93467784"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="445379790"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">262144</int> + <string key="NSContents">Remember This Choice</string> + <reference key="NSSupport" ref="1010806345"/> + <string key="NSCellIdentifier">_NS:9</string> + <reference key="NSControlView" ref="688522420"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <object class="NSCustomResource" key="NSNormalImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSSwitch</string> + </object> + <object class="NSButtonImageSource" key="NSAlternateImage"> + <string key="NSImageName">NSSwitch</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="93467784"> + <reference key="NSNextResponder" ref="439893737"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{285, 23}, {91, 17}}</string> + <reference key="NSSuperview" ref="439893737"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="46276252"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="623922320"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">134479872</int> + <string key="NSContents">Send Report</string> + <reference key="NSSupport" ref="1010806345"/> + <string key="NSCellIdentifier">_NS:9</string> + <reference key="NSControlView" ref="93467784"/> + <int key="NSButtonFlags">-2038152961</int> + <int key="NSButtonFlags2">164</int> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + </object> + <object class="NSButton" id="46276252"> + <reference key="NSNextResponder" ref="439893737"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{388, 23}, {100, 17}}</string> + <reference key="NSSuperview" ref="439893737"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="398179500"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">134479872</int> + <string key="NSContents">Don't Send</string> + <reference key="NSSupport" ref="1010806345"/> + <string key="NSCellIdentifier">_NS:9</string> + <reference key="NSControlView" ref="46276252"/> + <int key="NSButtonFlags">-2038152961</int> + <int key="NSButtonFlags2">164</int> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + </object> + </array> + <string key="NSFrameSize">{508, 477}</string> + <reference key="NSSuperview"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="242877095"/> + </object> + <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> + <string key="NSMaxSize">{10000000000000, 10000000000000}</string> + <bool key="NSWindowIsRestorable">YES</bool> + </object> + <object class="NSCustomObject" id="976324537"> + <string key="NSClassName">LLCrashLoggerMacDelegate</string> + </object> + </array> + <object class="IBObjectContainer" key="IBDocument.Objects"> + <array class="NSMutableArray" key="connectionRecords"> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">terminate:</string> + <reference key="source" ref="1050"/> + <reference key="destination" ref="632727374"/> + </object> + <int key="connectionID">449</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">orderFrontStandardAboutPanel:</string> + <reference key="source" ref="1021"/> + <reference key="destination" ref="238522557"/> + </object> + <int key="connectionID">142</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="1021"/> + <reference key="destination" ref="976324537"/> + </object> + <int key="connectionID">495</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performMiniaturize:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1011231497"/> + </object> + <int key="connectionID">37</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">arrangeInFront:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="625202149"/> + </object> + <int key="connectionID">39</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">print:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="49223823"/> + </object> + <int key="connectionID">86</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">runPageLayout:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="294629803"/> + </object> + <int key="connectionID">87</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">clearRecentDocuments:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="759406840"/> + </object> + <int key="connectionID">127</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performClose:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="776162233"/> + </object> + <int key="connectionID">193</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleContinuousSpellChecking:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="948374510"/> + </object> + <int key="connectionID">222</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">undo:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1058277027"/> + </object> + <int key="connectionID">223</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">copy:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="860595796"/> + </object> + <int key="connectionID">224</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">checkSpelling:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="96193923"/> + </object> + <int key="connectionID">225</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">paste:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="29853731"/> + </object> + <int key="connectionID">226</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">stopSpeaking:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="680220178"/> + </object> + <int key="connectionID">227</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">cut:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="296257095"/> + </object> + <int key="connectionID">228</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">showGuessPanel:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="679648819"/> + </object> + <int key="connectionID">230</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">redo:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="790794224"/> + </object> + <int key="connectionID">231</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">selectAll:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="583158037"/> + </object> + <int key="connectionID">232</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">startSpeaking:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="731782645"/> + </object> + <int key="connectionID">233</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">delete:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="437104165"/> + </object> + <int key="connectionID">235</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performZoom:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="575023229"/> + </object> + <int key="connectionID">240</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="447796847"/> + </object> + <int key="connectionID">241</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">centerSelectionInVisibleArea:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="88285865"/> + </object> + <int key="connectionID">245</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleGrammarChecking:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="967646866"/> + </object> + <int key="connectionID">347</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleSmartInsertDelete:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="605118523"/> + </object> + <int key="connectionID">355</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticQuoteSubstitution:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="197661976"/> + </object> + <int key="connectionID">356</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticLinkDetection:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="708854459"/> + </object> + <int key="connectionID">357</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">saveDocument:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1023925487"/> + </object> + <int key="connectionID">362</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">revertDocumentToSaved:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="579971712"/> + </object> + <int key="connectionID">364</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">runToolbarCustomizationPalette:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="237841660"/> + </object> + <int key="connectionID">365</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleToolbarShown:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="102151532"/> + </object> + <int key="connectionID">366</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">hide:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="755159360"/> + </object> + <int key="connectionID">367</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">hideOtherApplications:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="342932134"/> + </object> + <int key="connectionID">368</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">unhideAllApplications:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="908899353"/> + </object> + <int key="connectionID">370</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">newDocument:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="705341025"/> + </object> + <int key="connectionID">373</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">openDocument:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="722745758"/> + </object> + <int key="connectionID">374</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">raiseBaseline:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="941806246"/> + </object> + <int key="connectionID">426</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">lowerBaseline:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1045724900"/> + </object> + <int key="connectionID">427</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">copyFont:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="596732606"/> + </object> + <int key="connectionID">428</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">subscript:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1037576581"/> + </object> + <int key="connectionID">429</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">superscript:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="644725453"/> + </object> + <int key="connectionID">430</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">tightenKerning:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="677519740"/> + </object> + <int key="connectionID">431</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">underline:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="330926929"/> + </object> + <int key="connectionID">432</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">orderFrontColorPanel:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1012600125"/> + </object> + <int key="connectionID">433</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">useAllLigatures:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="663508465"/> + </object> + <int key="connectionID">434</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">loosenKerning:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="238351151"/> + </object> + <int key="connectionID">435</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">pasteFont:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="393423671"/> + </object> + <int key="connectionID">436</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">unscript:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="257962622"/> + </object> + <int key="connectionID">437</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">useStandardKerning:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="252969304"/> + </object> + <int key="connectionID">438</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">useStandardLigatures:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="706297211"/> + </object> + <int key="connectionID">439</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">turnOffLigatures:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="568384683"/> + </object> + <int key="connectionID">440</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">turnOffKerning:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="766922938"/> + </object> + <int key="connectionID">441</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticSpellingCorrection:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="795346622"/> + </object> + <int key="connectionID">456</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">orderFrontSubstitutionsPanel:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="65139061"/> + </object> + <int key="connectionID">458</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticDashSubstitution:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="672708820"/> + </object> + <int key="connectionID">461</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticTextReplacement:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="537092702"/> + </object> + <int key="connectionID">463</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">uppercaseWord:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1060694897"/> + </object> + <int key="connectionID">464</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">capitalizeWord:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="56570060"/> + </object> + <int key="connectionID">467</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">lowercaseWord:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="879586729"/> + </object> + <int key="connectionID">468</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">pasteAsPlainText:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="82994268"/> + </object> + <int key="connectionID">486</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="326711663"/> + </object> + <int key="connectionID">487</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="270902937"/> + </object> + <int key="connectionID">488</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="159080638"/> + </object> + <int key="connectionID">489</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">showHelp:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="105068016"/> + </object> + <int key="connectionID">493</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">alignCenter:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="630155264"/> + </object> + <int key="connectionID">518</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">pasteRuler:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="883618387"/> + </object> + <int key="connectionID">519</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleRuler:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="644046920"/> + </object> + <int key="connectionID">520</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">alignRight:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="512868991"/> + </object> + <int key="connectionID">521</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">copyRuler:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="231811626"/> + </object> + <int key="connectionID">522</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">alignJustified:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="945678886"/> + </object> + <int key="connectionID">523</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">alignLeft:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="875092757"/> + </object> + <int key="connectionID">524</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeBaseWritingDirectionNatural:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="551969625"/> + </object> + <int key="connectionID">525</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeBaseWritingDirectionLeftToRight:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="249532473"/> + </object> + <int key="connectionID">526</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeBaseWritingDirectionRightToLeft:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="607364498"/> + </object> + <int key="connectionID">527</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeTextWritingDirectionNatural:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="380031999"/> + </object> + <int key="connectionID">528</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeTextWritingDirectionLeftToRight:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="825984362"/> + </object> + <int key="connectionID">529</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeTextWritingDirectionRightToLeft:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="560145579"/> + </object> + <int key="connectionID">530</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="738670835"/> + </object> + <int key="connectionID">535</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">window</string> + <reference key="source" ref="976324537"/> + <reference key="destination" ref="972006081"/> + </object> + <int key="connectionID">532</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">remember:</string> + <reference key="source" ref="976324537"/> + <reference key="destination" ref="688522420"/> + </object> + <int key="connectionID">1176</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">send:</string> + <reference key="source" ref="976324537"/> + <reference key="destination" ref="93467784"/> + </object> + <int key="connectionID">1177</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">cancel:</string> + <reference key="source" ref="976324537"/> + <reference key="destination" ref="46276252"/> + </object> + <int key="connectionID">1178</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">crashText</string> + <reference key="source" ref="976324537"/> + <reference key="destination" ref="1018085422"/> + </object> + <int key="connectionID">1179</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">rememberCheck</string> + <reference key="source" ref="976324537"/> + <reference key="destination" ref="688522420"/> + </object> + <int key="connectionID">1187</int> + </object> + </array> + <object class="IBMutableOrderedSet" key="objectRecords"> + <array key="orderedObjects"> + <object class="IBObjectRecord"> + <int key="objectID">0</int> + <array key="object" id="0"/> + <reference key="children" ref="1048"/> + <nil key="parent"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-2</int> + <reference key="object" ref="1021"/> + <reference key="parent" ref="0"/> + <string key="objectName">File's Owner</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-1</int> + <reference key="object" ref="1014"/> + <reference key="parent" ref="0"/> + <string key="objectName">First Responder</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-3</int> + <reference key="object" ref="1050"/> + <reference key="parent" ref="0"/> + <string key="objectName">Application</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">29</int> + <reference key="object" ref="649796088"/> + <array class="NSMutableArray" key="children"> + <reference ref="713487014"/> + <reference ref="694149608"/> + <reference ref="952259628"/> + <reference ref="379814623"/> + <reference ref="586577488"/> + <reference ref="302598603"/> + <reference ref="448692316"/> + </array> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">19</int> + <reference key="object" ref="713487014"/> + <array class="NSMutableArray" key="children"> + <reference ref="835318025"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">56</int> + <reference key="object" ref="694149608"/> + <array class="NSMutableArray" key="children"> + <reference ref="110575045"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">217</int> + <reference key="object" ref="952259628"/> + <array class="NSMutableArray" key="children"> + <reference ref="789758025"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">83</int> + <reference key="object" ref="379814623"/> + <array class="NSMutableArray" key="children"> + <reference ref="720053764"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">81</int> + <reference key="object" ref="720053764"/> + <array class="NSMutableArray" key="children"> + <reference ref="1023925487"/> + <reference ref="49223823"/> + <reference ref="722745758"/> + <reference ref="705341025"/> + <reference ref="1025936716"/> + <reference ref="294629803"/> + <reference ref="776162233"/> + <reference ref="425164168"/> + <reference ref="579971712"/> + <reference ref="1010469920"/> + </array> + <reference key="parent" ref="379814623"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">75</int> + <reference key="object" ref="1023925487"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">78</int> + <reference key="object" ref="49223823"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">72</int> + <reference key="object" ref="722745758"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">82</int> + <reference key="object" ref="705341025"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">124</int> + <reference key="object" ref="1025936716"/> + <array class="NSMutableArray" key="children"> + <reference ref="1065607017"/> + </array> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">77</int> + <reference key="object" ref="294629803"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">73</int> + <reference key="object" ref="776162233"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">79</int> + <reference key="object" ref="425164168"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">112</int> + <reference key="object" ref="579971712"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">74</int> + <reference key="object" ref="1010469920"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">125</int> + <reference key="object" ref="1065607017"/> + <array class="NSMutableArray" key="children"> + <reference ref="759406840"/> + </array> + <reference key="parent" ref="1025936716"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">126</int> + <reference key="object" ref="759406840"/> + <reference key="parent" ref="1065607017"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">205</int> + <reference key="object" ref="789758025"/> + <array class="NSMutableArray" key="children"> + <reference ref="437104165"/> + <reference ref="583158037"/> + <reference ref="1058277027"/> + <reference ref="212016141"/> + <reference ref="296257095"/> + <reference ref="29853731"/> + <reference ref="860595796"/> + <reference ref="1040322652"/> + <reference ref="790794224"/> + <reference ref="892235320"/> + <reference ref="972420730"/> + <reference ref="676164635"/> + <reference ref="507821607"/> + <reference ref="288088188"/> + <reference ref="82994268"/> + </array> + <reference key="parent" ref="952259628"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">202</int> + <reference key="object" ref="437104165"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">198</int> + <reference key="object" ref="583158037"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">207</int> + <reference key="object" ref="1058277027"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">214</int> + <reference key="object" ref="212016141"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">199</int> + <reference key="object" ref="296257095"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">203</int> + <reference key="object" ref="29853731"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">197</int> + <reference key="object" ref="860595796"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">206</int> + <reference key="object" ref="1040322652"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">215</int> + <reference key="object" ref="790794224"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">218</int> + <reference key="object" ref="892235320"/> + <array class="NSMutableArray" key="children"> + <reference ref="963351320"/> + </array> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">216</int> + <reference key="object" ref="972420730"/> + <array class="NSMutableArray" key="children"> + <reference ref="769623530"/> + </array> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">200</int> + <reference key="object" ref="769623530"/> + <array class="NSMutableArray" key="children"> + <reference ref="948374510"/> + <reference ref="96193923"/> + <reference ref="679648819"/> + <reference ref="967646866"/> + <reference ref="859480356"/> + <reference ref="795346622"/> + </array> + <reference key="parent" ref="972420730"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">219</int> + <reference key="object" ref="948374510"/> + <reference key="parent" ref="769623530"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">201</int> + <reference key="object" ref="96193923"/> + <reference key="parent" ref="769623530"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">204</int> + <reference key="object" ref="679648819"/> + <reference key="parent" ref="769623530"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">220</int> + <reference key="object" ref="963351320"/> + <array class="NSMutableArray" key="children"> + <reference ref="270902937"/> + <reference ref="88285865"/> + <reference ref="159080638"/> + <reference ref="326711663"/> + <reference ref="447796847"/> + <reference ref="738670835"/> + </array> + <reference key="parent" ref="892235320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">213</int> + <reference key="object" ref="270902937"/> + <reference key="parent" ref="963351320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">210</int> + <reference key="object" ref="88285865"/> + <reference key="parent" ref="963351320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">221</int> + <reference key="object" ref="159080638"/> + <reference key="parent" ref="963351320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">208</int> + <reference key="object" ref="326711663"/> + <reference key="parent" ref="963351320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">209</int> + <reference key="object" ref="447796847"/> + <reference key="parent" ref="963351320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">57</int> + <reference key="object" ref="110575045"/> + <array class="NSMutableArray" key="children"> + <reference ref="238522557"/> + <reference ref="755159360"/> + <reference ref="908899353"/> + <reference ref="632727374"/> + <reference ref="646227648"/> + <reference ref="609285721"/> + <reference ref="481834944"/> + <reference ref="304266470"/> + <reference ref="1046388886"/> + <reference ref="1056857174"/> + <reference ref="342932134"/> + </array> + <reference key="parent" ref="694149608"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">58</int> + <reference key="object" ref="238522557"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">134</int> + <reference key="object" ref="755159360"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">150</int> + <reference key="object" ref="908899353"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">136</int> + <reference key="object" ref="632727374"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">144</int> + <reference key="object" ref="646227648"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">129</int> + <reference key="object" ref="609285721"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">143</int> + <reference key="object" ref="481834944"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">236</int> + <reference key="object" ref="304266470"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">131</int> + <reference key="object" ref="1046388886"/> + <array class="NSMutableArray" key="children"> + <reference ref="752062318"/> + </array> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">149</int> + <reference key="object" ref="1056857174"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">145</int> + <reference key="object" ref="342932134"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">130</int> + <reference key="object" ref="752062318"/> + <reference key="parent" ref="1046388886"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">24</int> + <reference key="object" ref="835318025"/> + <array class="NSMutableArray" key="children"> + <reference ref="299356726"/> + <reference ref="625202149"/> + <reference ref="575023229"/> + <reference ref="1011231497"/> + </array> + <reference key="parent" ref="713487014"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">92</int> + <reference key="object" ref="299356726"/> + <reference key="parent" ref="835318025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5</int> + <reference key="object" ref="625202149"/> + <reference key="parent" ref="835318025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">239</int> + <reference key="object" ref="575023229"/> + <reference key="parent" ref="835318025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">23</int> + <reference key="object" ref="1011231497"/> + <reference key="parent" ref="835318025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">295</int> + <reference key="object" ref="586577488"/> + <array class="NSMutableArray" key="children"> + <reference ref="466310130"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">296</int> + <reference key="object" ref="466310130"/> + <array class="NSMutableArray" key="children"> + <reference ref="102151532"/> + <reference ref="237841660"/> + </array> + <reference key="parent" ref="586577488"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">297</int> + <reference key="object" ref="102151532"/> + <reference key="parent" ref="466310130"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">298</int> + <reference key="object" ref="237841660"/> + <reference key="parent" ref="466310130"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">211</int> + <reference key="object" ref="676164635"/> + <array class="NSMutableArray" key="children"> + <reference ref="785027613"/> + </array> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">212</int> + <reference key="object" ref="785027613"/> + <array class="NSMutableArray" key="children"> + <reference ref="680220178"/> + <reference ref="731782645"/> + </array> + <reference key="parent" ref="676164635"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">195</int> + <reference key="object" ref="680220178"/> + <reference key="parent" ref="785027613"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">196</int> + <reference key="object" ref="731782645"/> + <reference key="parent" ref="785027613"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">346</int> + <reference key="object" ref="967646866"/> + <reference key="parent" ref="769623530"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">348</int> + <reference key="object" ref="507821607"/> + <array class="NSMutableArray" key="children"> + <reference ref="698887838"/> + </array> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">349</int> + <reference key="object" ref="698887838"/> + <array class="NSMutableArray" key="children"> + <reference ref="605118523"/> + <reference ref="197661976"/> + <reference ref="708854459"/> + <reference ref="65139061"/> + <reference ref="19036812"/> + <reference ref="672708820"/> + <reference ref="537092702"/> + </array> + <reference key="parent" ref="507821607"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">350</int> + <reference key="object" ref="605118523"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">351</int> + <reference key="object" ref="197661976"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">354</int> + <reference key="object" ref="708854459"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">371</int> + <reference key="object" ref="972006081"/> + <array class="NSMutableArray" key="children"> + <reference ref="439893737"/> + </array> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">372</int> + <reference key="object" ref="439893737"/> + <array class="NSMutableArray" key="children"> + <reference ref="242877095"/> + <reference ref="1018085422"/> + <reference ref="688522420"/> + <object class="IBNSLayoutConstraint" id="109434655"> + <reference key="firstItem" ref="242877095"/> + <int key="firstAttribute">3</int> + <int key="relation">0</int> + <reference key="secondItem" ref="439893737"/> + <int key="secondAttribute">3</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <reference ref="46276252"/> + <reference ref="93467784"/> + <object class="IBNSLayoutConstraint" id="166525974"> + <reference key="firstItem" ref="439893737"/> + <int key="firstAttribute">6</int> + <int key="relation">0</int> + <reference key="secondItem" ref="242877095"/> + <int key="secondAttribute">6</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="229833409"> + <reference key="firstItem" ref="242877095"/> + <int key="firstAttribute">5</int> + <int key="relation">0</int> + <reference key="secondItem" ref="439893737"/> + <int key="secondAttribute">5</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="992363278"> + <reference key="firstItem" ref="439893737"/> + <int key="firstAttribute">6</int> + <int key="relation">0</int> + <reference key="secondItem" ref="1018085422"/> + <int key="secondAttribute">6</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="646866003"> + <reference key="firstItem" ref="1018085422"/> + <int key="firstAttribute">5</int> + <int key="relation">0</int> + <reference key="secondItem" ref="439893737"/> + <int key="secondAttribute">5</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="98217052"> + <reference key="firstItem" ref="439893737"/> + <int key="firstAttribute">4</int> + <int key="relation">0</int> + <reference key="secondItem" ref="1018085422"/> + <int key="secondAttribute">4</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">64</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="578918264"> + <reference key="firstItem" ref="439893737"/> + <int key="firstAttribute">6</int> + <int key="relation">0</int> + <reference key="secondItem" ref="46276252"/> + <int key="secondAttribute">6</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="591594339"> + <reference key="firstItem" ref="688522420"/> + <int key="firstAttribute">5</int> + <int key="relation">0</int> + <reference key="secondItem" ref="439893737"/> + <int key="secondAttribute">5</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="432526715"> + <reference key="firstItem" ref="439893737"/> + <int key="firstAttribute">4</int> + <int key="relation">0</int> + <reference key="secondItem" ref="688522420"/> + <int key="secondAttribute">4</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">21</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="891430181"> + <reference key="firstItem" ref="439893737"/> + <int key="firstAttribute">6</int> + <int key="relation">0</int> + <reference key="secondItem" ref="93467784"/> + <int key="secondAttribute">6</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">132</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="833183002"> + <reference key="firstItem" ref="93467784"/> + <int key="firstAttribute">11</int> + <int key="relation">0</int> + <reference key="secondItem" ref="46276252"/> + <int key="secondAttribute">11</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">0.0</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">6</int> + <float key="scoringTypeFloat">24</float> + <int key="contentType">2</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="670714078"> + <reference key="firstItem" ref="93467784"/> + <int key="firstAttribute">10</int> + <int key="relation">0</int> + <reference key="secondItem" ref="688522420"/> + <int key="secondAttribute">10</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">0.0</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">6</int> + <float key="scoringTypeFloat">24</float> + <int key="contentType">2</int> + <reference key="containingView" ref="439893737"/> + </object> + </array> + <reference key="parent" ref="972006081"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">375</int> + <reference key="object" ref="302598603"/> + <array class="NSMutableArray" key="children"> + <reference ref="941447902"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">376</int> + <reference key="object" ref="941447902"/> + <array class="NSMutableArray" key="children"> + <reference ref="792887677"/> + <reference ref="215659978"/> + </array> + <reference key="parent" ref="302598603"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">377</int> + <reference key="object" ref="792887677"/> + <array class="NSMutableArray" key="children"> + <reference ref="786677654"/> + </array> + <reference key="parent" ref="941447902"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">388</int> + <reference key="object" ref="786677654"/> + <array class="NSMutableArray" key="children"> + <reference ref="159677712"/> + <reference ref="305399458"/> + <reference ref="814362025"/> + <reference ref="330926929"/> + <reference ref="533507878"/> + <reference ref="158063935"/> + <reference ref="885547335"/> + <reference ref="901062459"/> + <reference ref="767671776"/> + <reference ref="691570813"/> + <reference ref="769124883"/> + <reference ref="739652853"/> + <reference ref="1012600125"/> + <reference ref="214559597"/> + <reference ref="596732606"/> + <reference ref="393423671"/> + </array> + <reference key="parent" ref="792887677"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">389</int> + <reference key="object" ref="159677712"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">390</int> + <reference key="object" ref="305399458"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">391</int> + <reference key="object" ref="814362025"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">392</int> + <reference key="object" ref="330926929"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">393</int> + <reference key="object" ref="533507878"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">394</int> + <reference key="object" ref="158063935"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">395</int> + <reference key="object" ref="885547335"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">396</int> + <reference key="object" ref="901062459"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">397</int> + <reference key="object" ref="767671776"/> + <array class="NSMutableArray" key="children"> + <reference ref="175441468"/> + </array> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">398</int> + <reference key="object" ref="691570813"/> + <array class="NSMutableArray" key="children"> + <reference ref="1058217995"/> + </array> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">399</int> + <reference key="object" ref="769124883"/> + <array class="NSMutableArray" key="children"> + <reference ref="18263474"/> + </array> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">400</int> + <reference key="object" ref="739652853"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">401</int> + <reference key="object" ref="1012600125"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">402</int> + <reference key="object" ref="214559597"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">403</int> + <reference key="object" ref="596732606"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">404</int> + <reference key="object" ref="393423671"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">405</int> + <reference key="object" ref="18263474"/> + <array class="NSMutableArray" key="children"> + <reference ref="257962622"/> + <reference ref="644725453"/> + <reference ref="1037576581"/> + <reference ref="941806246"/> + <reference ref="1045724900"/> + </array> + <reference key="parent" ref="769124883"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">406</int> + <reference key="object" ref="257962622"/> + <reference key="parent" ref="18263474"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">407</int> + <reference key="object" ref="644725453"/> + <reference key="parent" ref="18263474"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">408</int> + <reference key="object" ref="1037576581"/> + <reference key="parent" ref="18263474"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">409</int> + <reference key="object" ref="941806246"/> + <reference key="parent" ref="18263474"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">410</int> + <reference key="object" ref="1045724900"/> + <reference key="parent" ref="18263474"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">411</int> + <reference key="object" ref="1058217995"/> + <array class="NSMutableArray" key="children"> + <reference ref="706297211"/> + <reference ref="568384683"/> + <reference ref="663508465"/> + </array> + <reference key="parent" ref="691570813"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">412</int> + <reference key="object" ref="706297211"/> + <reference key="parent" ref="1058217995"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">413</int> + <reference key="object" ref="568384683"/> + <reference key="parent" ref="1058217995"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">414</int> + <reference key="object" ref="663508465"/> + <reference key="parent" ref="1058217995"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">415</int> + <reference key="object" ref="175441468"/> + <array class="NSMutableArray" key="children"> + <reference ref="252969304"/> + <reference ref="766922938"/> + <reference ref="677519740"/> + <reference ref="238351151"/> + </array> + <reference key="parent" ref="767671776"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">416</int> + <reference key="object" ref="252969304"/> + <reference key="parent" ref="175441468"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">417</int> + <reference key="object" ref="766922938"/> + <reference key="parent" ref="175441468"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">418</int> + <reference key="object" ref="677519740"/> + <reference key="parent" ref="175441468"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">419</int> + <reference key="object" ref="238351151"/> + <reference key="parent" ref="175441468"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">450</int> + <reference key="object" ref="288088188"/> + <array class="NSMutableArray" key="children"> + <reference ref="579392910"/> + </array> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">451</int> + <reference key="object" ref="579392910"/> + <array class="NSMutableArray" key="children"> + <reference ref="1060694897"/> + <reference ref="879586729"/> + <reference ref="56570060"/> + </array> + <reference key="parent" ref="288088188"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">452</int> + <reference key="object" ref="1060694897"/> + <reference key="parent" ref="579392910"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">453</int> + <reference key="object" ref="859480356"/> + <reference key="parent" ref="769623530"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">454</int> + <reference key="object" ref="795346622"/> + <reference key="parent" ref="769623530"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">457</int> + <reference key="object" ref="65139061"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">459</int> + <reference key="object" ref="19036812"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">460</int> + <reference key="object" ref="672708820"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">462</int> + <reference key="object" ref="537092702"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">465</int> + <reference key="object" ref="879586729"/> + <reference key="parent" ref="579392910"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">466</int> + <reference key="object" ref="56570060"/> + <reference key="parent" ref="579392910"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">485</int> + <reference key="object" ref="82994268"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">490</int> + <reference key="object" ref="448692316"/> + <array class="NSMutableArray" key="children"> + <reference ref="992780483"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">491</int> + <reference key="object" ref="992780483"/> + <array class="NSMutableArray" key="children"> + <reference ref="105068016"/> + </array> + <reference key="parent" ref="448692316"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">492</int> + <reference key="object" ref="105068016"/> + <reference key="parent" ref="992780483"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">494</int> + <reference key="object" ref="976324537"/> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">496</int> + <reference key="object" ref="215659978"/> + <array class="NSMutableArray" key="children"> + <reference ref="446991534"/> + </array> + <reference key="parent" ref="941447902"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">497</int> + <reference key="object" ref="446991534"/> + <array class="NSMutableArray" key="children"> + <reference ref="875092757"/> + <reference ref="630155264"/> + <reference ref="945678886"/> + <reference ref="512868991"/> + <reference ref="163117631"/> + <reference ref="31516759"/> + <reference ref="908105787"/> + <reference ref="644046920"/> + <reference ref="231811626"/> + <reference ref="883618387"/> + </array> + <reference key="parent" ref="215659978"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">498</int> + <reference key="object" ref="875092757"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">499</int> + <reference key="object" ref="630155264"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">500</int> + <reference key="object" ref="945678886"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">501</int> + <reference key="object" ref="512868991"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">502</int> + <reference key="object" ref="163117631"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">503</int> + <reference key="object" ref="31516759"/> + <array class="NSMutableArray" key="children"> + <reference ref="956096989"/> + </array> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">504</int> + <reference key="object" ref="908105787"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">505</int> + <reference key="object" ref="644046920"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">506</int> + <reference key="object" ref="231811626"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">507</int> + <reference key="object" ref="883618387"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">508</int> + <reference key="object" ref="956096989"/> + <array class="NSMutableArray" key="children"> + <reference ref="257099033"/> + <reference ref="551969625"/> + <reference ref="249532473"/> + <reference ref="607364498"/> + <reference ref="508151438"/> + <reference ref="981751889"/> + <reference ref="380031999"/> + <reference ref="825984362"/> + <reference ref="560145579"/> + </array> + <reference key="parent" ref="31516759"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">509</int> + <reference key="object" ref="257099033"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">510</int> + <reference key="object" ref="551969625"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">511</int> + <reference key="object" ref="249532473"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">512</int> + <reference key="object" ref="607364498"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">513</int> + <reference key="object" ref="508151438"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">514</int> + <reference key="object" ref="981751889"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">515</int> + <reference key="object" ref="380031999"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">516</int> + <reference key="object" ref="825984362"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">517</int> + <reference key="object" ref="560145579"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">534</int> + <reference key="object" ref="738670835"/> + <reference key="parent" ref="963351320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">536</int> + <reference key="object" ref="242877095"/> + <array class="NSMutableArray" key="children"> + <reference ref="502956757"/> + <object class="IBNSLayoutConstraint" id="697106875"> + <reference key="firstItem" ref="242877095"/> + <int key="firstAttribute">8</int> + <int key="relation">0</int> + <nil key="secondItem"/> + <int key="secondAttribute">0</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">229</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">1</int> + <reference key="containingView" ref="242877095"/> + </object> + </array> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">537</int> + <reference key="object" ref="502956757"/> + <reference key="parent" ref="242877095"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">593</int> + <reference key="object" ref="1018085422"/> + <array class="NSMutableArray" key="children"> + <reference ref="867418359"/> + <object class="IBNSLayoutConstraint" id="276483890"> + <reference key="firstItem" ref="1018085422"/> + <int key="firstAttribute">8</int> + <int key="relation">0</int> + <nil key="secondItem"/> + <int key="secondAttribute">0</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">163</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">1</int> + <reference key="containingView" ref="1018085422"/> + </object> + </array> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">594</int> + <reference key="object" ref="867418359"/> + <reference key="parent" ref="1018085422"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">727</int> + <reference key="object" ref="688522420"/> + <array class="NSMutableArray" key="children"> + <reference ref="445379790"/> + <object class="IBNSLayoutConstraint" id="337680523"> + <reference key="firstItem" ref="688522420"/> + <int key="firstAttribute">7</int> + <int key="relation">0</int> + <nil key="secondItem"/> + <int key="secondAttribute">0</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">183</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">1</int> + <reference key="containingView" ref="688522420"/> + </object> + <object class="IBNSLayoutConstraint" id="73036966"> + <reference key="firstItem" ref="688522420"/> + <int key="firstAttribute">8</int> + <int key="relation">0</int> + <nil key="secondItem"/> + <int key="secondAttribute">0</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">22</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">1</int> + <reference key="containingView" ref="688522420"/> + </object> + </array> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">728</int> + <reference key="object" ref="445379790"/> + <reference key="parent" ref="688522420"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">775</int> + <reference key="object" ref="93467784"/> + <array class="NSMutableArray" key="children"> + <reference ref="623922320"/> + </array> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">776</int> + <reference key="object" ref="623922320"/> + <reference key="parent" ref="93467784"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">780</int> + <reference key="object" ref="46276252"/> + <array class="NSMutableArray" key="children"> + <reference ref="398179500"/> + <object class="IBNSLayoutConstraint" id="944606221"> + <reference key="firstItem" ref="46276252"/> + <int key="firstAttribute">7</int> + <int key="relation">0</int> + <nil key="secondItem"/> + <int key="secondAttribute">0</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">100</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">1</int> + <reference key="containingView" ref="46276252"/> + </object> + </array> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">781</int> + <reference key="object" ref="398179500"/> + <reference key="parent" ref="46276252"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">884</int> + <reference key="object" ref="109434655"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">981</int> + <reference key="object" ref="229833409"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">982</int> + <reference key="object" ref="992363278"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1022</int> + <reference key="object" ref="98217052"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1026</int> + <reference key="object" ref="276483890"/> + <reference key="parent" ref="1018085422"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">979</int> + <reference key="object" ref="166525974"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">985</int> + <reference key="object" ref="646866003"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">977</int> + <reference key="object" ref="697106875"/> + <reference key="parent" ref="242877095"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1099</int> + <reference key="object" ref="337680523"/> + <reference key="parent" ref="688522420"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1093</int> + <reference key="object" ref="578918264"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1100</int> + <reference key="object" ref="73036966"/> + <reference key="parent" ref="688522420"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1098</int> + <reference key="object" ref="432526715"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1168</int> + <reference key="object" ref="670714078"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1167</int> + <reference key="object" ref="833183002"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1095</int> + <reference key="object" ref="591594339"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1166</int> + <reference key="object" ref="891430181"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1076</int> + <reference key="object" ref="944606221"/> + <reference key="parent" ref="46276252"/> + </object> + </array> + </object> + <dictionary class="NSMutableDictionary" key="flattenedProperties"> + <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1022.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1026.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1076.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1093.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1095.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1098.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1099.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1100.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="112.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1166.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1167.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1168.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="124.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="125.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="126.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="143.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="195.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="196.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="197.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="198.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="199.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="200.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="201.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="202.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="203.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="204.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="205.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="206.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="207.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="208.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="209.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="210.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="211.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="212.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="213.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="214.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="215.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="216.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="217.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="218.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="219.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="220.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="221.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="236.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="239.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="296.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="297.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="298.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="346.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="348.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="349.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="350.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="351.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="354.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="371.IBWindowTemplateEditedContentRect">{{380, 496}, {480, 360}}</string> + <integer value="1" key="371.NSWindowTemplate.visibleAtLaunch"/> + <array class="NSMutableArray" key="372.IBNSViewMetadataConstraints"> + <reference ref="109434655"/> + <reference ref="166525974"/> + <reference ref="229833409"/> + <reference ref="992363278"/> + <reference ref="646866003"/> + <reference ref="98217052"/> + <reference ref="578918264"/> + <reference ref="591594339"/> + <reference ref="432526715"/> + <reference ref="891430181"/> + <reference ref="833183002"/> + <reference ref="670714078"/> + </array> + <string key="372.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="372.IBUserGuides" ref="0"/> + <string key="375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="388.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="389.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="390.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="391.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="392.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="393.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="394.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="395.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="396.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="397.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="398.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="399.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="400.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="401.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="402.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="403.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="404.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="405.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="406.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="407.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="408.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="409.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="410.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="411.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="412.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="413.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="414.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="415.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="416.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="417.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="418.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="419.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="451.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="452.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="453.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="454.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="457.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="459.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="462.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="465.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="466.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="485.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="490.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="491.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="492.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="494.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="496.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="497.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="498.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="499.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="500.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="501.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="502.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="503.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="504.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="505.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="506.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="507.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="508.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="509.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="510.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="511.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="512.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="513.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="514.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="515.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="516.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="517.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="534.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <array class="NSMutableArray" key="536.IBNSViewMetadataConstraints"> + <reference ref="697106875"/> + </array> + <boolean value="NO" key="536.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> + <string key="536.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="537.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <array class="NSMutableArray" key="593.IBNSViewMetadataConstraints"> + <reference ref="276483890"/> + </array> + <boolean value="NO" key="593.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> + <string key="593.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="594.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="72.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <array class="NSMutableArray" key="727.IBNSViewMetadataConstraints"> + <reference ref="337680523"/> + <reference ref="73036966"/> + </array> + <boolean value="NO" key="727.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> + <string key="727.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="728.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="73.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="74.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="75.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="77.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="775.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> + <string key="775.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="776.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="78.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <array class="NSMutableArray" key="780.IBNSViewMetadataConstraints"> + <reference ref="944606221"/> + </array> + <boolean value="NO" key="780.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> + <string key="780.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="781.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="79.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="81.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="82.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="83.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="884.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="977.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="979.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="981.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="982.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="985.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/> + <nil key="activeLocalization"/> + <dictionary class="NSMutableDictionary" key="localizations"/> + <nil key="sourceID"/> + <int key="maxID">1187</int> + </object> + <object class="IBClassDescriber" key="IBDocument.Classes"> + <array class="NSMutableArray" key="referencedPartialClassDescriptions"> + <object class="IBPartialClassDescription"> + <string key="className">LLCrashLoggerMacDelegate</string> + <string key="superclassName">NSObject</string> + <dictionary class="NSMutableDictionary" key="actions"> + <string key="cancel:">id</string> + <string key="remember:">id</string> + <string key="send:">id</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="actionInfosByName"> + <object class="IBActionInfo" key="cancel:"> + <string key="name">cancel:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo" key="remember:"> + <string key="name">remember:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo" key="send:"> + <string key="name">send:</string> + <string key="candidateClassName">id</string> + </object> + </dictionary> + <dictionary class="NSMutableDictionary" key="outlets"> + <string key="crashText">NSTextField</string> + <string key="rememberCheck">NSButton</string> + <string key="window">NSWindow</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> + <object class="IBToOneOutletInfo" key="crashText"> + <string key="name">crashText</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo" key="rememberCheck"> + <string key="name">rememberCheck</string> + <string key="candidateClassName">NSButton</string> + </object> + <object class="IBToOneOutletInfo" key="window"> + <string key="name">window</string> + <string key="candidateClassName">NSWindow</string> + </object> + </dictionary> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/LLCrashLoggerMacDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSLayoutConstraint</string> + <string key="superclassName">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/NSLayoutConstraint.h</string> + </object> + </object> + </array> + </object> + <int key="IBDocument.localizationMode">0</int> + <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> + <integer value="1070" key="NS.object.0"/> + </object> + <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> + <int key="IBDocument.defaultPropertyAccessControl">3</int> + <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> + <string key="NSMenuCheckmark">{11, 11}</string> + <string key="NSMenuMixedState">{10, 3}</string> + <string key="NSSwitch">{15, 15}</string> + </dictionary> + <bool key="IBDocument.UseAutolayout">YES</bool> + </data> +</archive> diff --git a/indra/mac_crash_logger/Info.plist b/indra/mac_crash_logger/Info.plist index f48293e825..2ebed11c3f 100644 --- a/indra/mac_crash_logger/Info.plist +++ b/indra/mac_crash_logger/Info.plist @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> @@ -10,8 +10,6 @@ <string></string> <key>CFBundleIconFile</key> <string></string> - <key>CFBundleIdentifier</key> - <string>com.secondlife.indra.crashreporter</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> @@ -22,5 +20,9 @@ <string>????</string> <key>CFBundleVersion</key> <string>1.0.0</string> + <key>NSMainNibFile</key> + <string>CrashReporter</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> </dict> </plist> diff --git a/indra/mac_crash_logger/llcrashloggermac.cpp b/indra/mac_crash_logger/llcrashloggermac.cpp index 8f1c1a2dd0..c5f660ca6e 100644 --- a/indra/mac_crash_logger/llcrashloggermac.cpp +++ b/indra/mac_crash_logger/llcrashloggermac.cpp @@ -27,7 +27,6 @@ #include "llcrashloggermac.h" -#include <Carbon/Carbon.h> #include <iostream> #include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME @@ -38,102 +37,14 @@ #include "lldir.h" #include "llsdserialize.h" -#define MAX_LOADSTRING 100 -const char* const SETTINGS_FILE_HEADER = "version"; -const S32 SETTINGS_FILE_VERSION = 101; - // Windows Message Handlers -BOOL gFirstDialog = TRUE; // Are we currently handling the Send/Don't Send dialog? +BOOL gFirstDialog = TRUE; LLFILE *gDebugFile = NULL; -WindowRef gWindow = NULL; -EventHandlerRef gEventHandler = NULL; std::string gUserNotes = ""; bool gSendReport = false; bool gRememberChoice = false; -IBNibRef nib = NULL; - -OSStatus dialogHandler(EventHandlerCallRef handler, EventRef event, void *userdata) -{ - OSStatus result = eventNotHandledErr; - OSStatus err; - UInt32 evtClass = GetEventClass(event); - UInt32 evtKind = GetEventKind(event); - if((evtClass == kEventClassCommand) && (evtKind == kEventCommandProcess)) - { - HICommand cmd; - err = GetEventParameter(event, kEventParamDirectObject, typeHICommand, NULL, sizeof(cmd), NULL, &cmd); - - - - if(err == noErr) - { - //Get the value of the checkbox - ControlID id; - ControlRef checkBox = NULL; - id.signature = 'remb'; - id.id = 0; - err = GetControlByID(gWindow, &id, &checkBox); - - if(err == noErr) - { - if(GetControl32BitValue(checkBox) == kControlCheckBoxCheckedValue) - { - gRememberChoice = true; - } - else - { - gRememberChoice = false; - } - } - switch(cmd.commandID) - { - case kHICommandOK: - { - char buffer[65535]; /* Flawfinder: ignore */ - Size size = sizeof(buffer) - 1; - ControlRef textField = NULL; - - id.signature = 'text'; - id.id = 0; - - err = GetControlByID(gWindow, &id, &textField); - if(err == noErr) - { - // Get the user response text - err = GetControlData(textField, kControlNoPart, kControlEditTextTextTag, size, (Ptr)buffer, &size); - } - if(err == noErr) - { - // Make sure the string is terminated. - buffer[size] = 0; - gUserNotes = buffer; - - llinfos << buffer << llendl; - } - - // Send the report. - - QuitAppModalLoopForWindow(gWindow); - gSendReport = true; - result = noErr; - } - break; - - case kHICommandCancel: - QuitAppModalLoopForWindow(gWindow); - result = noErr; - break; - default: - result = eventNotHandledErr; - } - } - } - - return(result); -} - LLCrashLoggerMac::LLCrashLoggerMac(void) { @@ -146,73 +57,16 @@ LLCrashLoggerMac::~LLCrashLoggerMac(void) bool LLCrashLoggerMac::init(void) { bool ok = LLCrashLogger::init(); - if(!ok) return false; - if(mCrashBehavior != CRASH_BEHAVIOR_ASK) return true; - - // Real UI... - OSStatus err; - - err = CreateNibReference(CFSTR("CrashReporter"), &nib); - - if(err == noErr) - { - err = CreateWindowFromNib(nib, CFSTR("CrashReporter"), &gWindow); - } - - if(err == noErr) - { - // Set focus to the edit text area - ControlRef textField = NULL; - ControlID id; - - id.signature = 'text'; - id.id = 0; - - // Don't set err if any of this fails, since it's non-critical. - if(GetControlByID(gWindow, &id, &textField) == noErr) - { - SetKeyboardFocus(gWindow, textField, kControlFocusNextPart); - } - } - - if(err == noErr) - { - ShowWindow(gWindow); - } - - if(err == noErr) - { - // Set up an event handler for the window. - EventTypeSpec handlerEvents[] = - { - { kEventClassCommand, kEventCommandProcess } - }; - - InstallWindowEventHandler( - gWindow, - NewEventHandlerUPP(dialogHandler), - GetEventTypeCount (handlerEvents), - handlerEvents, - 0, - &gEventHandler); - } - return true; + return ok; } void LLCrashLoggerMac::gatherPlatformSpecificFiles() { - updateApplication("Gathering hardware information..."); } bool LLCrashLoggerMac::mainLoop() { - OSStatus err = noErr; - - if(err == noErr && mCrashBehavior == CRASH_BEHAVIOR_ASK) - { - RunAppModalLoopForWindow(gWindow); - } - else if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND) + if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND) { gSendReport = true; } @@ -227,26 +81,11 @@ bool LLCrashLoggerMac::mainLoop() { setUserText(gUserNotes); sendCrashLogs(); - } - - if(gWindow != NULL) - { - DisposeWindow(gWindow); - } - - if(nib != NULL) - { - DisposeNibReference(nib); - } - + } + return true; } -void LLCrashLoggerMac::updateApplication(const std::string& message) -{ - LLCrashLogger::updateApplication(message); -} - bool LLCrashLoggerMac::cleanup() { commonCleanup(); diff --git a/indra/mac_crash_logger/llcrashloggermac.h b/indra/mac_crash_logger/llcrashloggermac.h index 4b1d235f24..6d8f63ecac 100644 --- a/indra/mac_crash_logger/llcrashloggermac.h +++ b/indra/mac_crash_logger/llcrashloggermac.h @@ -38,7 +38,6 @@ public: ~LLCrashLoggerMac(void); virtual bool init(); virtual bool mainLoop(); - virtual void updateApplication(const std::string& message = LLStringUtil::null); virtual bool cleanup(); virtual void gatherPlatformSpecificFiles(); }; diff --git a/indra/newview/llmemoryview.h b/indra/mac_crash_logger/llcrashloggermacdelegate.h index dc4849a9c4..c998a8efe2 100644 --- a/indra/newview/llmemoryview.h +++ b/indra/mac_crash_logger/llcrashloggermacdelegate.h @@ -1,8 +1,8 @@ /** - * @file llmemoryview.h - * @brief LLMemoryView class definition + * @file llcrashloggermacdelegate.h + * @brief Mac OSX crash logger implementation * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * $LicenseInfo:firstyear=2003&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. * @@ -24,39 +24,29 @@ * $/LicenseInfo$ */ -#ifndef LL_LLMEMORYVIEW_H -#define LL_LLMEMORYVIEW_H +/* +#import <Cocoa/Cocoa.h> -#include "llview.h" +@interface LLCrashLoggerMacDelegate : NSObject <NSApplicationDelegate> +{ + IBOutlet NSTextField *crashText; + IBOutlet NSButton *rememberCheck; + + NSWindow *_window; + bool mRemember; + +} + +- (void)setWindow:(NSWindow *)newWindow; +- (NSWindow *)window; + +- (IBAction)remember:(id)sender; +- (IBAction)send:(id)sender; +- (IBAction)cancel:(id)sender; + +@property (assign) IBOutlet NSWindow *window; + +@end +*/ -class LLAllocator; -class LLMemoryView : public LLView -{ -public: - struct Params : public LLInitParam::Block<Params, LLView::Params> - { - Params() - { - changeDefault(mouse_opaque, true); - changeDefault(visible, false); - } - }; - LLMemoryView(const LLMemoryView::Params&); - virtual ~LLMemoryView(); - - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); - virtual BOOL handleHover(S32 x, S32 y, MASK mask); - virtual void draw(); - - void refreshProfile(); - -private: - std::vector<LLWString> mLines; - LLAllocator* mAlloc; - BOOL mPaused ; - -}; - -#endif diff --git a/indra/mac_crash_logger/llcrashloggermacdelegate.mm b/indra/mac_crash_logger/llcrashloggermacdelegate.mm new file mode 100644 index 0000000000..b2af76a47c --- /dev/null +++ b/indra/mac_crash_logger/llcrashloggermacdelegate.mm @@ -0,0 +1,75 @@ +/** + * @file llcrashloggermacdelegate.mm + * @brief Mac OSX crash logger implementation + * + * $LicenseInfo:firstyear=2003&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + + +/* +#import "llcrashloggermacdelegate.h" +#include <iostream> + +extern std::string gUserNotes; +extern bool gSendReport; +extern bool gRememberChoice; + +@implementation LLCrashLoggerMacDelegate + +- (void)setWindow:(NSWindow *)window +{ + _window = window; +} + +- (NSWindow *)window +{ + return _window; +} + +- (void)dealloc +{ + [super dealloc]; +} + +std::string* NSToString( NSString *ns_str ) +{ + return ( new std::string([ns_str UTF8String]) ); +} + +- (IBAction)remember:(id)sender +{ + gRememberChoice = [rememberCheck state]; +} + +- (IBAction)send:(id)sender +{ + std::string* user_input = NSToString([crashText stringValue]); + gUserNotes = *user_input; + gSendReport = true; +} + +- (IBAction)cancel:(id)sender +{ + [ _window close]; +} +@end +*/
\ No newline at end of file diff --git a/indra/mac_crash_logger/mac_crash_logger.cpp b/indra/mac_crash_logger/mac_crash_logger.cpp index 6571b35241..6add74556f 100644 --- a/indra/mac_crash_logger/mac_crash_logger.cpp +++ b/indra/mac_crash_logger/mac_crash_logger.cpp @@ -26,11 +26,12 @@ #include "linden_common.h" #include "llcrashloggermac.h" +#include "indra_constants.h" +#include <iostream> + int main(int argc, char **argv) { - llinfos << "Starting crash reporter." << llendl; - LLCrashLoggerMac app; app.parseCommandOptions(argc, argv); @@ -39,9 +40,16 @@ int main(int argc, char **argv) llwarns << "Unable to initialize application." << llendl; return 1; } + if (app.getCrashBehavior() != CRASH_BEHAVIOR_ALWAYS_SEND) + { +// return NSApplicationMain(argc, (const char **)argv); + } app.mainLoop(); + app.cleanup(); + llinfos << "Crash reporter finished normally." << llendl; + return 0; } diff --git a/indra/mac_updater/mac_updater.h b/indra/mac_updater/mac_updater.h new file mode 100644 index 0000000000..f65b481cb6 --- /dev/null +++ b/indra/mac_updater/mac_updater.h @@ -0,0 +1,91 @@ +/** + * @file mac_updater.h + * @brief + * + * $LicenseInfo:firstyear=2006&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include <iostream> +#include <pthread.h> +#include <boost/filesystem.hpp> + +#ifndef LL_MAC_UPDATER_H +#define LL_MAC_UPDATER_H +extern bool gCancelled; +extern bool gFailure; + +void *updatethreadproc(void*); +std::string* walkParents( signed int depth, std::string* childpath ); +std::string* getUserTrashFolder(); + +void setProgress(int cur, int max); +void setProgressText(const std::string& str); +void sendProgress(int cur, int max, std::string str); +void sendDone(); +void sendStopAlert(); + +bool isFSRefViewerBundle(const std::string& targetURL); +bool isDirWritable(const std::string& dir_name); +bool mkTempDir(boost::filesystem::path& temp_dir); +bool copyDir(const std::string& src_dir, const std::string& dest_dir); + +int oldmain(); + +class LLMacUpdater +{ +public: + LLMacUpdater(); + void doUpdate(); + const std::string walkParents( signed int depth, const std::string& childpath ); + bool isApplication(const std::string& app_str); + void filterFile(const char* filename); + + bool findAppBundleOnDiskImage(const boost::filesystem::path& dir_path, + boost::filesystem::path& path_found); + + bool verifyDirectory(const boost::filesystem::path* directory, bool isParent=false); + bool getViewerDir(boost::filesystem::path &app_dir); + bool downloadDMG(const std::string& dmgName, boost::filesystem::path* temp_dir); + bool doMount(const std::string& dmgName, char* deviceNode, const boost::filesystem::path& temp_dir); + bool moveApplication (const boost::filesystem::path& app_dir, + const boost::filesystem::path& temp_dir, + boost::filesystem::path& aside_dir); + bool doInstall(const boost::filesystem::path& app_dir, + const boost::filesystem::path& temp_dir, + boost::filesystem::path& mount_dir, + bool replacingTarget); + void* updatethreadproc(void*); + static void* sUpdatethreadproc(void*); + +public: + std::string *mUpdateURL; + std::string *mProductName; + std::string *mBundleID; + std::string *mDmgFile; + std::string *mMarkerPath; + std::string *mApplicationPath; + static LLMacUpdater *sInstance; + +}; +#endif + + diff --git a/indra/media_plugins/webkit/windows_volume_catcher.cpp b/indra/media_plugins/webkit/windows_volume_catcher.cpp index 5fb84756ee..0cfb810906 100644 --- a/indra/media_plugins/webkit/windows_volume_catcher.cpp +++ b/indra/media_plugins/webkit/windows_volume_catcher.cpp @@ -48,18 +48,37 @@ private: set_volume_func_t mSetVolumeFunc; set_mute_func_t mSetMuteFunc; + // tests if running on Vista, 7, 8 + once in CTOR + bool isWindowsVistaOrHigher(); + F32 mVolume; F32 mPan; + bool mSystemIsVistaOrHigher; }; + +bool VolumeCatcherImpl::isWindowsVistaOrHigher() +{ + OSVERSIONINFO osvi; + ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&osvi); + return osvi.dwMajorVersion >= 6; +} + VolumeCatcherImpl::VolumeCatcherImpl() -: mVolume(1.0f), // default volume is max - mPan(0.f) // default pan is centered +: mVolume(1.0f), // default volume is max + mPan(0.f) // default pan is centered { - HMODULE handle = ::LoadLibrary(L"winmm.dll"); - if(handle) + mSystemIsVistaOrHigher = isWindowsVistaOrHigher(); + + if ( ! mSystemIsVistaOrHigher ) { - mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume"); - mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute"); + HMODULE handle = ::LoadLibrary(L"winmm.dll"); + if(handle) + { + mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume"); + mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute"); + } } } @@ -67,18 +86,29 @@ VolumeCatcherImpl::~VolumeCatcherImpl() { } - void VolumeCatcherImpl::setVolume(F32 volume) { mVolume = volume; - if (mSetMuteFunc) + if ( mSystemIsVistaOrHigher ) { - mSetMuteFunc(volume == 0.f); + // set both left/right to same volume + // TODO: use pan value to set independently + DWORD left_channel = (DWORD)(mVolume * 65535.0f); + DWORD right_channel = (DWORD)(mVolume * 65535.0f); + DWORD hw_volume = left_channel << 16 | right_channel; + ::waveOutSetVolume(NULL, hw_volume); } - if (mSetVolumeFunc) + else { - mSetVolumeFunc(mVolume); + if (mSetMuteFunc) + { + mSetMuteFunc(volume == 0.f); + } + if (mSetVolumeFunc) + { + mSetVolumeFunc(mVolume); + } } } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index eb2d220bce..5d2ebc2fc4 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -18,6 +18,7 @@ include(JsonCpp) include(LLAudio) include(LLCharacter) include(LLCommon) +include(LLCoreHttp) include(LLImage) include(LLImageJ2COJ) include(LLInventory) @@ -34,6 +35,7 @@ include(LLXML) include(LScript) include(Linking) include(NDOF) +include(NVAPI) include(GooglePerfTools) include(TemplateCheck) include(UI) @@ -57,6 +59,7 @@ include_directories( ${LLAUDIO_INCLUDE_DIRS} ${LLCHARACTER_INCLUDE_DIRS} ${LLCOMMON_INCLUDE_DIRS} + ${LLCOREHTTP_INCLUDE_DIRS} ${LLPHYSICS_INCLUDE_DIRS} ${FMOD_INCLUDE_DIR} ${LLIMAGE_INCLUDE_DIRS} @@ -97,6 +100,7 @@ set(viewer_SOURCE_FILES llagentwearables.cpp llagentwearablesfetch.cpp llanimstatelabels.cpp + llappcorehttp.cpp llappearancemgr.cpp llappviewer.cpp llappviewerlistener.cpp @@ -110,12 +114,13 @@ set(viewer_SOURCE_FILES llavatarlist.cpp llavatarlistitem.cpp llavatarpropertiesprocessor.cpp + llblockedlistitem.cpp + llblocklist.cpp llbox.cpp llbreadcrumbview.cpp llbrowsernotification.cpp llbuycurrencyhtml.cpp llcallbacklist.cpp - llcallfloater.cpp llcallingcard.cpp llcapabilitylistener.cpp llcaphttpsender.cpp @@ -133,16 +138,24 @@ set(viewer_SOURCE_FILES llcommanddispatcherlistener.cpp llcommandhandler.cpp llcommandlineparser.cpp + llcommunicationchannel.cpp llcompilequeue.cpp llconfirmationmanager.cpp + llconversationlog.cpp + llconversationloglist.cpp + llconversationloglistitem.cpp + llconversationmodel.cpp + llconversationview.cpp llcurrencyuimanager.cpp llcylinder.cpp lldateutil.cpp lldaycyclemanager.cpp lldebugmessagebox.cpp lldebugview.cpp + lldeferredsounds.cpp lldelayedgestureerror.cpp lldirpicker.cpp + lldonotdisturbnotificationstorage.cpp lldndbutton.cpp lldrawable.cpp lldrawpool.cpp @@ -190,7 +203,10 @@ set(viewer_SOURCE_FILES llfloaterbuycurrencyhtml.cpp llfloaterbuyland.cpp llfloatercamera.cpp + llfloaterchatvoicevolume.cpp llfloatercolorpicker.cpp + llfloaterconversationlog.cpp + llfloaterconversationpreview.cpp llfloaterdeleteenvpreset.cpp llfloaterdestinations.cpp llfloaterdisplayname.cpp @@ -259,13 +275,13 @@ set(viewer_SOURCE_FILES llfloateruipreview.cpp llfloaterurlentry.cpp llfloatervoiceeffect.cpp + llfloatervoicevolume.cpp llfloaterwebcontent.cpp llfloaterwebprofile.cpp llfloaterwhitelistentry.cpp llfloaterwindowsize.cpp llfloaterworldmap.cpp - llfolderview.cpp - llfolderviewitem.cpp + llfolderviewmodelinventory.cpp llfollowcam.cpp llfriendcard.cpp llgesturelistener.cpp @@ -291,8 +307,9 @@ set(viewer_SOURCE_FILES llhudrender.cpp llhudtext.cpp llhudview.cpp - llimfloater.cpp - llimfloatercontainer.cpp + llfloaterimsessiontab.cpp + llfloaterimsession.cpp + llfloaterimcontainer.cpp llimhandler.cpp llimview.cpp llinspect.cpp @@ -334,7 +351,7 @@ set(viewer_SOURCE_FILES llmarketplacenotifications.cpp llmediactrl.cpp llmediadataclient.cpp - llmemoryview.cpp + llmenuoptionpathfindingrebakenavmesh.cpp llmeshrepository.cpp llmimetypes.cpp llmorphview.cpp @@ -344,10 +361,9 @@ set(viewer_SOURCE_FILES llnameeditor.cpp llnamelistctrl.cpp llnavigationbar.cpp - llnearbychat.cpp - llnearbychatbar.cpp - llnearbychathandler.cpp - llnearbychatbarlistener.cpp + llfloaterimnearbychat.cpp + llfloaterimnearbychathandler.cpp + llfloaterimnearbychatlistener.cpp llnetmap.cpp llnotificationalerthandler.cpp llnotificationgrouphandler.cpp @@ -377,7 +393,6 @@ set(viewer_SOURCE_FILES llpanelgroupnotices.cpp llpanelgrouproles.cpp llpanelhome.cpp - llpanelimcontrolpanel.cpp llpanelland.cpp llpanellandaudio.cpp llpanellandmarkinfo.cpp @@ -388,7 +403,6 @@ set(viewer_SOURCE_FILES llpanelmaininventory.cpp llpanelmarketplaceinbox.cpp llpanelmarketplaceinboxinventory.cpp - llpanelmarketplaceoutboxinventory.cpp llpanelmediasettingsgeneral.cpp llpanelmediasettingspermissions.cpp llpanelmediasettingssecurity.cpp @@ -399,7 +413,6 @@ set(viewer_SOURCE_FILES llpanelonlinestatus.cpp llpaneloutfitedit.cpp llpaneloutfitsinventory.cpp - llpanelpathfindingrebakenavmesh.cpp llpanelpeople.cpp llpanelpeoplemenus.cpp llpanelpermissions.cpp @@ -439,10 +452,12 @@ set(viewer_SOURCE_FILES llpathfindingobject.cpp llpathfindingobjectlist.cpp llpathfindingpathtool.cpp + llpersistentnotificationstorage.cpp llphysicsmotion.cpp llphysicsshapebuilderutil.cpp llplacesinventorybridge.cpp llplacesinventorypanel.cpp + llplacesfolderview.cpp llpopupview.cpp llpolymesh.cpp llpolymorph.cpp @@ -673,6 +688,7 @@ set(viewer_HEADER_FILES llagentwearables.h llagentwearablesfetch.h llanimstatelabels.h + llappcorehttp.h llappearance.h llappearancemgr.h llappviewer.h @@ -687,11 +703,12 @@ set(viewer_HEADER_FILES llavatarlist.h llavatarlistitem.h llavatarpropertiesprocessor.h + llblockedlistitem.h + llblocklist.h llbox.h llbreadcrumbview.h llbuycurrencyhtml.h llcallbacklist.h - llcallfloater.h llcallingcard.h llcapabilitylistener.h llcapabilityprovider.h @@ -710,16 +727,24 @@ set(viewer_HEADER_FILES llcommanddispatcherlistener.h llcommandhandler.h llcommandlineparser.h + llcommunicationchannel.h llcompilequeue.h llconfirmationmanager.h + llconversationlog.h + llconversationloglist.h + llconversationloglistitem.h + llconversationmodel.h + llconversationview.h llcurrencyuimanager.h llcylinder.h lldateutil.h lldaycyclemanager.h lldebugmessagebox.h lldebugview.h + lldeferredsounds.h lldelayedgestureerror.h lldirpicker.h + lldonotdisturbnotificationstorage.h lldndbutton.h lldrawable.h lldrawpool.h @@ -767,7 +792,10 @@ set(viewer_HEADER_FILES llfloaterbuycurrencyhtml.h llfloaterbuyland.h llfloatercamera.h + llfloaterchatvoicevolume.h llfloatercolorpicker.h + llfloaterconversationlog.h + llfloaterconversationpreview.h llfloaterdeleteenvpreset.h llfloaterdestinations.h llfloaterdisplayname.h @@ -836,14 +864,13 @@ set(viewer_HEADER_FILES llfloateruipreview.h llfloaterurlentry.h llfloatervoiceeffect.h + llfloatervoicevolume.h llfloaterwebcontent.h llfloaterwebprofile.h llfloaterwhitelistentry.h llfloaterwindowsize.h llfloaterworldmap.h - llfolderview.h - llfoldervieweventlistener.h - llfolderviewitem.h + llfolderviewmodelinventory.h llfollowcam.h llfriendcard.h llgesturelistener.h @@ -868,8 +895,9 @@ set(viewer_HEADER_FILES llhudrender.h llhudtext.h llhudview.h - llimfloater.h - llimfloatercontainer.h + llfloaterimsessiontab.h + llfloaterimsession.h + llfloaterimcontainer.h llimview.h llinspect.h llinspectavatar.h @@ -911,7 +939,7 @@ set(viewer_HEADER_FILES llmarketplacenotifications.h llmediactrl.h llmediadataclient.h - llmemoryview.h + llmenuoptionpathfindingrebakenavmesh.h llmeshrepository.h llmimetypes.h llmorphview.h @@ -921,10 +949,9 @@ set(viewer_HEADER_FILES llnameeditor.h llnamelistctrl.h llnavigationbar.h - llnearbychat.h - llnearbychatbar.h - llnearbychathandler.h - llnearbychatbarlistener.h + llfloaterimnearbychat.h + llfloaterimnearbychathandler.h + llfloaterimnearbychatlistener.h llnetmap.h llnotificationhandler.h llnotificationmanager.h @@ -948,7 +975,6 @@ set(viewer_HEADER_FILES llpanelgroupnotices.h llpanelgrouproles.h llpanelhome.h - llpanelimcontrolpanel.h llpanelland.h llpanellandaudio.h llpanellandmarkinfo.h @@ -959,7 +985,6 @@ set(viewer_HEADER_FILES llpanelmaininventory.h llpanelmarketplaceinbox.h llpanelmarketplaceinboxinventory.h - llpanelmarketplaceoutboxinventory.h llpanelmediasettingsgeneral.h llpanelmediasettingspermissions.h llpanelmediasettingssecurity.h @@ -970,7 +995,6 @@ set(viewer_HEADER_FILES llpanelonlinestatus.h llpaneloutfitedit.h llpaneloutfitsinventory.h - llpanelpathfindingrebakenavmesh.h llpanelpeople.h llpanelpeoplemenus.h llpanelpermissions.h @@ -1005,10 +1029,12 @@ set(viewer_HEADER_FILES llpathfindingobject.h llpathfindingobjectlist.h llpathfindingpathtool.h + llpersistentnotificationstorage.h llphysicsmotion.h llphysicsshapebuilderutil.h llplacesinventorybridge.h llplacesinventorypanel.h + llplacesfolderview.h llpolymesh.h llpolymorph.h llpopupview.h @@ -1567,10 +1593,9 @@ if (WINDOWS) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES # *TODO -reenable this once we get server usage sorted out - #LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:\"__tcmalloc\"" - LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:__tcmalloc " - LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO" - LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF" + LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS} /LARGEADDRESSAWARE" + LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO /LARGEADDRESSAWARE" + LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF /LARGEADDRESSAWARE" ) if(USE_PRECOMPILED_HEADERS) set_target_properties( @@ -1587,7 +1612,7 @@ if (WINDOWS) # 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. - if(USE_GOOGLE_PERFTOOLS) + if(USE_TCMALLOC) # Configure a var for tcmalloc location, if used. # Note the need to specify multiple names explicitly. set(GOOGLE_PERF_TOOLS_SOURCE @@ -1595,7 +1620,7 @@ 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_TCMALLOC) set(COPY_INPUT_DEPENDENCIES @@ -1815,8 +1840,10 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLXML_LIBRARIES} ${LSCRIPT_LIBRARIES} ${LLMATH_LIBRARIES} + ${LLCOREHTTP_LIBRARIES} ${LLCOMMON_LIBRARIES} ${NDOF_LIBRARY} + ${NVAPI_LIBRARY} ${HUNSPELL_LIBRARY} ${viewer_LIBRARIES} ${BOOST_PROGRAM_OPTIONS_LIBRARY} @@ -1865,7 +1892,6 @@ if (LINUX) set(COPY_INPUT_DEPENDENCIES ${VIEWER_BINARY_NAME} linux-crash-logger - linux-updater SLPlugin media_plugin_webkit media_plugin_gstreamer010 @@ -1959,6 +1985,12 @@ if (DARWIN) ) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-updater mac-crash-logger) + + if (ENABLE_SIGNING) + set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}") + else (ENABLE_SIGNING) + set(SIGNING_SETTING "") + endif (ENABLE_SIGNING) if (PACKAGE) add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME}) @@ -1978,6 +2010,7 @@ if (DARWIN) --login_channel=${VIEWER_LOGIN_CHANNEL} --source=${CMAKE_CURRENT_SOURCE_DIR} --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched + ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) @@ -1989,8 +2022,9 @@ if (INSTALL) endif (INSTALL) if (PACKAGE) + set(SYMBOL_SEARCH_DIRS "") if (WINDOWS) - set(VIEWER_DIST_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}") + list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}") set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-windows.tar.bz2") # slplugin.exe failing symbols dump - need to debug, might have to do with updated version of google breakpad # set(VIEWER_EXE_GLOBS "${VIEWER_BINARY_NAME}${CMAKE_EXECUTABLE_SUFFIX} slplugin.exe") @@ -1999,13 +2033,20 @@ if (PACKAGE) set(VIEWER_COPY_MANIFEST copy_w_viewer_manifest) endif (WINDOWS) if (DARWIN) - set(VIEWER_DIST_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app") + list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}") + # *TODO: Generate these search dirs in the cmake files related to each binary. + list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/llplugin/slplugin/${CMAKE_CFG_INTDIR}") + list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/mac_crash_logger/${CMAKE_CFG_INTDIR}") + list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/mac_updater/${CMAKE_CFG_INTDIR}") + list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}") + list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}") + list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/webkit/${CMAKE_CFG_INTDIR}") set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-darwin.tar.bz2") - set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin") + set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin mac-updater mac-crash-logger") set(VIEWER_LIB_GLOB "*.dylib") endif (DARWIN) if (LINUX) - set(VIEWER_DIST_DIR "${CMAKE_CURRENT_BINARY_DIR}/packaged") + list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/packaged") set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-linux.tar.bz2") set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin SLPlugin") set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*") @@ -2025,7 +2066,7 @@ if (PACKAGE) ARGS "${CMAKE_CURRENT_SOURCE_DIR}/generate_breakpad_symbols.py" "${LLBUILD_CONFIG}" - "${VIEWER_DIST_DIR}" + "${SYMBOL_SEARCH_DIRS}" "${VIEWER_EXE_GLOBS}" "${VIEWER_LIB_GLOB}" "${AUTOBUILD_INSTALL_DIR}/bin/dump_syms" @@ -2062,6 +2103,12 @@ if (LL_TESTS) LL_TEST_ADDITIONAL_LIBRARIES "${JSONCPP_LIBRARIES}" ) + set_source_files_properties( + lllogininstance.cpp + PROPERTIES + LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}" + ) + ################################################## # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS ################################################## diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 711191128b..7ab7787d77 100644 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -357,7 +357,7 @@ <key>count</key> <integer>1</integer> <key>map-to</key> - <string>SkinFolder</string> + <string>SkinCurrent</string> </map> <key>slurl</key> diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 73df064ab2..4659673333 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -44,13 +44,14 @@ /> <command name="chat" available_in_toybox="true" + is_flashing_allowed="true" icon="Command_Chat_Icon" label_ref="Command_Chat_Label" - tooltip_ref="Command_Chat_Tooltip" + tooltip_ref="Command_Conversations_Tooltip" execute_function="Floater.ToggleOrBringToFront" - execute_parameters="chat_bar" + execute_parameters="im_container" is_running_function="Floater.IsOpen" - is_running_parameters="chat_bar" + is_running_parameters="im_container" /> <command name="compass" available_in_toybox="false" @@ -239,14 +240,4 @@ is_running_function="Floater.IsOpen" is_running_parameters="camera" /> - <command name="voice" - available_in_toybox="true" - icon="Command_Voice_Icon" - label_ref="Command_Voice_Label" - tooltip_ref="Command_Voice_Tooltip" - execute_function="Floater.ToggleOrBringToFront" - execute_parameters="voice_controls" - is_running_function="Floater.IsOpen" - is_running_parameters="voice_controls" - /> </commands> diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 64122bbb6c..92a241857e 100644 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -48,6 +48,6 @@ --> </array> </map> - </array> + </array> </map> </llsd> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1bf773bb9e..f2e1e7f7d4 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2,6 +2,28 @@ <llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="llsd.xsd"> <map> + <key>IMShowTime</key> + <map> + <key>Comment</key> + <string>Enable(disable) timestamp showing in the chat.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>IMShowNamesForP2PConv</key> + <map> + <key>Comment</key> + <string>Enable(disable) showing of a names in the chat.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>CrashHostUrl</key> <map> <key>Comment</key> @@ -47,7 +69,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>0.95</real> + <real>1</real> </map> <key>AdvanceSnapshot</key> <map> @@ -1562,6 +1584,28 @@ <key>Value</key> <integer>0</integer> </map> + <key>ChatLoadGroupMaxMembers</key> + <map> + <key>Comment</key> + <string>Max number of active members we'll show up for an unresponsive group</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <real>100</real> + </map> + <key>ChatLoadGroupTimeout</key> + <map> + <key>Comment</key> + <string>Time we give the server to send group participants before we hit the server for group info (seconds)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>10.0</real> + </map> <key>ChatOnlineNotification</key> <map> <key>Comment</key> @@ -1595,17 +1639,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>ChatWindow</key> - <map> - <key>Comment</key> - <string>Show chat in multiple windows(by default) or in one multi-tabbed window(requires restart)</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <integer>0</integer> - </map> <key>CheesyBeacon</key> <map> <key>Comment</key> @@ -1628,6 +1661,61 @@ <key>Value</key> <string /> </map> + <key>ContextConeInAlpha</key> + <map> + <key>Comment</key> + <string>Cone In Alpha</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.0</real> + </map> + <key>ContextConeOutAlpha</key> + <map> + <key>Comment</key> + <string>Cone Out Alpha</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>1.0</real> + </map> + <key>ContextConeFadeTime</key> + <map> + <key>Comment</key> + <string>Cone Fade Time</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>.08</real> + </map> + <key>ConversationHistoryPageSize</key> + <map> + <key>Comment</key> + <string>Chat history of conversation opened from call log is displayed by pages. So this is number of entries per page.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>100</integer> + </map> + <key>ConversationSortOrder</key> + <map> + <key>Comment</key> + <string>Specifies sort key for conversations</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>131073</integer> + </map> <key>CloseChatOnReturn</key> <map> <key>Comment</key> @@ -3270,6 +3358,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>FastCacheFetchEnabled</key> + <map> + <key>Comment</key> + <string>Enable texture fast cache fetching if set</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <string>1</string> + </map> <key>FeatureManagerHTTPTable</key> <map> <key>Comment</key> @@ -4040,17 +4139,6 @@ <key>Value</key> <integer>305</integer> </map> - <key>HelpUseLocal</key> - <map> - <key>Comment</key> - <string>If set, always use this for help: skins/default/html/[LANGUAGE]/help-offline/index.html</string> - <key>Persist</key> - <integer>0</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>HelpURLFormat</key> <map> <key>Comment</key> @@ -4183,6 +4271,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>IMShowContentPanel</key> + <map> + <key>Comment</key> + <string>Show Toolbar and Body Panels</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>IgnoreAllNotifications</key> <map> <key>Comment</key> @@ -4225,7 +4324,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>0.65</real> + <real>0.95</real> </map> <key>InBandwidth</key> <map> @@ -5168,7 +5267,7 @@ <key>Comment</key> <string>Center the focal point of the minimap.</string> <key>Persist</key> - <integer>0</integer> + <integer>1</integer> <key>Type</key> <string>Boolean</string> <key>Value</key> @@ -5755,7 +5854,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>MemoryPrivatePoolSize</key> <map> @@ -6208,6 +6307,61 @@ <key>Value</key> <integer>305</integer> </map> + <key>NotificationConferenceIMOptions</key> + <map> + <key>Comment</key> + <string>Specifies how the UI responds to Conference IM Notifications.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>toast</string> + </map> + <key>NotificationFriendIMOptions</key> + <map> + <key>Comment</key> + <string>Specifies how the UI responds to Friend IM Notifications.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>toast</string> + </map> + <key>NotificationGroupChatOptions</key> + <map> + <key>Comment</key> + <string>Specifies how the UI responds to Group Chat Notifications.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>toast</string> + </map> + <key>NotificationNearbyChatOptions</key> + <map> + <key>Comment</key> + <string>Specifies how the UI responds to Nearby Chat Notifications.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>toast</string> + </map> + <key>NotificationNonFriendIMOptions</key> + <map> + <key>Comment</key> + <string>Specifies how the UI responds to Non Friend IM Notifications.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>toast</string> + </map> <key>NotificationToastLifeTime</key> <map> <key>Comment</key> @@ -6724,6 +6878,50 @@ <key>Value</key> <integer>1</integer> </map> + <key>PlaySoundIncomingVoiceCall</key> + <map> + <key>Comment</key> + <string>Plays a sound when have an incoming voice call.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>PlaySoundInventoryOffer</key> + <map> + <key>Comment</key> + <string>Plays a sound when have an inventory offer.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>PlaySoundNewConversation</key> + <map> + <key>Comment</key> + <string>Plays a sound when have a new conversation.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>PlaySoundTeleportOffer</key> + <map> + <key>Comment</key> + <string>Plays a sound when have a teleport offer.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>PluginAttachDebuggerToPlugins</key> <map> <key>Comment</key> @@ -8090,7 +8288,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>0</real> + <real>-0.007</real> </map> <key>RenderShadowOffsetError</key> <map> @@ -9835,7 +10033,7 @@ <key>ShowScriptErrorsLocation</key> <map> <key>Comment</key> - <string>Show script error in chat or window</string> + <string>Show script error in chat (0) or window (1).</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -10019,6 +10217,39 @@ <key>Value</key> <integer>2</integer> </map> + <key>BlockPeopleSortOrder</key> + <map> + <key>Comment</key> + <string>Specifies sort order for recent people (0 = by name, 1 = by type)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>CallLogSortOrder</key> + <map> + <key>Comment</key> + <string>Specifies sort order for Call Log (0 = by name, 1 = by date)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>SortFriendsFirst</key> + <map> + <key>Comment</key> + <string>Specifies whether friends will be sorted first in Call Log</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>ShowPGSearchAll</key> <map> <key>Comment</key> @@ -10778,6 +11009,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>TextureFetchConcurrency</key> + <map> + <key>Comment</key> + <string>Maximum number of HTTP connections used for texture fetches</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>0</integer> + </map> <key>TextureFetchDebuggerEnabled</key> <map> <key>Comment</key> @@ -10789,6 +11031,83 @@ <key>Value</key> <integer>0</integer> </map> + <key>TextureFetchSource</key> + <map> + <key>Comment</key> + <string>Debug use: Source to fetch textures</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>TextureFetchUpdateHighPriority</key> + <map> + <key>Comment</key> + <string>Number of high priority textures to update per frame</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>32</integer> + </map> + <key>TextureFetchUpdateMaxMediumPriority</key> + <map> + <key>Comment</key> + <string>Maximum number of medium priority textures to update per frame</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>256</integer> + </map> + <key>TextureFetchUpdateMinMediumPriority</key> + <map> + <key>Comment</key> + <string>Minimum number of medium priority textures to update per frame</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>32</integer> + </map> + <key>TextureFetchUpdatePriorityThreshold</key> + <map> + <key>Comment</key> + <string>Threshold under which textures will be considered too low priority and skipped for update</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.0</real> + </map> + <key>TextureFetchUpdateSkipLowPriority</key> + <map> + <key>Comment</key> + <string>Flag indicating if we want to skip textures with too low of a priority</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>TextureFetchUpdatePriorities</key> + <map> + <key>Comment</key> + <string>Number of priority texture to update per frame</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>32</integer> + </map> <key>TextureLoadFullRes</key> <map> <key>Comment</key> @@ -12285,16 +12604,16 @@ <key>Value</key> <integer>0</integer> </map> - <key>SpeakerParticipantDefaultOrder</key> + <key>sourceid</key> <map> <key>Comment</key> - <string>Order for displaying speakers in voice controls. 0 = alphabetical. 1 = recent.</string> + <string>Identify referring agency to Linden web servers</string> <key>Persist</key> <integer>1</integer> <key>Type</key> - <string>U32</string> + <string>String</string> <key>Value</key> - <integer>1</integer> + <string /> </map> <key>SpeakerParticipantRemoveDelay</key> <map> @@ -12340,6 +12659,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>UsePeopleAPI</key> + <map> + <key>Comment</key> + <string>Use the people API cap for avatar name fetching, use old legacy protocol if false. Requires restart.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>UseStartScreen</key> <map> <key>Comment</key> @@ -12393,6 +12723,7 @@ <key>Type</key> <string>LLSD</string> <key>Value</key> + <array/> </map> <key>VFSOldSize</key> <map> @@ -12834,10 +13165,10 @@ <key>Value</key> <real>50.0</real> </map> - <key>WellIconFlashCount</key> + <key>FlashCount</key> <map> <key>Comment</key> - <string>Number of flashes of IM Well and Notification Well icons after which flashing buttons stay lit up. Requires restart.</string> + <string>Number of flashes of item. Requires restart.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -12845,16 +13176,16 @@ <key>Value</key> <integer>3</integer> </map> - <key>WellIconFlashPeriod</key> + <key>FlashPeriod</key> <map> <key>Comment</key> - <string>Period at which IM Well and Notification Well icons flash (seconds). Requires restart.</string> + <string>Period at which item flash (seconds). Requires restart.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>F32</string> <key>Value</key> - <real>0.25</real> + <real>0.5</real> </map> <key>WindLightUseAtmosShaders</key> <map> @@ -13971,5 +14302,29 @@ <real>1.0</real> </array> </map> + + <key>HideUIControls</key> + <map> + <key>Comment</key> + <string>Hide all menu items and buttons</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + + <key>SimulateFBOFailure</key> + <map> + <key>Comment</key> + <string>[DEBUG] Make allocateScreenBuffer return false. Used to test error handling.</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml index 01a70f2671..e660c1a33b 100644 --- a/indra/newview/app_settings/settings_minimal.xml +++ b/indra/newview/app_settings/settings_minimal.xml @@ -1 +1,4 @@ -<llsd/>
\ No newline at end of file +<?xml version="1.0"?> +<llsd> + <undef/> +</llsd> diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 143126b334..ada374f892 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -1,9 +1,9 @@ <llsd> <map> - <key>BusyResponseChanged</key> + <key>DoNotDisturbResponseChanged</key> <map> <key>Comment</key> - <string>Does user's busy mode message differ from default?</string> + <string>Does user's do not disturb mode message differ from default?</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -11,17 +11,72 @@ <key>Value</key> <integer>0</integer> </map> - <key>BusyModeResponse</key> + <key>DoNotDisturbModeResponse</key> <map> <key>Comment</key> - <string>Auto response to instant messages while in busy mode.</string> + <string>Auto response to instant messages while in do not disturb mode.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>String</string> <key>Value</key> - <string>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> + <string>This resident has turned on 'Do Not Disturb' and will see your message later.</string> </map> + <key>ConversationsExpandMessagePaneFirst</key> + <map> + <key>Comment</key> + <string>Expand either messages or conversations list pane from Conversations compact mode.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>ConversationsListPaneCollapsed</key> + <map> + <key>Comment</key> + <string>Stores the expanded/collapsed state of the conversations list pane in Conversations floater.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>ConversationsListPaneWidth</key> + <map> + <key>Comment</key> + <string>Conversations floater list pane width.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>205</integer> + </map> + <key>ConversationsMessagePaneCollapsed</key> + <map> + <key>Comment</key> + <string>Stores the expanded/collapsed state of Conversations floater message pane.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>ConversationsMessagePaneWidth</key> + <map> + <key>Comment</key> + <string>Conversations floater message pane width.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>412</integer> + </map> <key>InstantMessageLogPath</key> <map> <key>Comment</key> @@ -121,17 +176,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>LogInstantMessages</key> - <map> - <key>Comment</key> - <string>Log Instant Messages</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> <key>LogShowHistory</key> <map> <key>Comment</key> @@ -215,7 +259,40 @@ <key>Value</key> <integer>0</integer> </map> - <key>ShowFavoritesOnLogin</key> + <key>TranslatingEnabled</key> + <map> + <key>Comment</key> + <string>Translation prefs are set</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>KeepConversationLogTranscripts</key> + <map> + <key>Comment</key> + <string>Keep a conversation log and transcripts</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>2</integer> + </map> + <key>NearbyChatIsNotTornOff</key> + <map> + <key>Comment</key> + <string>saving torn-off state of the nearby chat between sessions</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>ShowFavoritesOnLogin</key> <map> <key>Comment</key> <string>Determines whether favorites of last logged in user will be saved on exit from viewer and shown on login screen</string> diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl index 46d2aa4877..bfd9b9b3eb 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl @@ -46,6 +46,6 @@ void main() frag_data[0] = vec4(diff.rgb, 0.0); frag_data[1] = vec4(0,0,0,0); vec3 nvn = normalize(vary_normal); - frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0); + frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl index 680eadb852..23c4ea2fff 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl @@ -52,5 +52,5 @@ void main() frag_data[1] = vertex_color.aaaa; // spec //frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested vec3 nvn = normalize(tnorm); - frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0); + frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl index b2027d3a5d..c1fa9e4aac 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl @@ -49,6 +49,6 @@ void main() frag_data[0] = vec4(col.rgb, 0.0); frag_data[1] = vec4(0,0,0,0); // spec vec3 nvn = normalize(vary_normal); - frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0); + frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl index ead384b07c..4c68123fac 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl @@ -48,5 +48,5 @@ void main() frag_data[0] = vec4(col.rgb, 0.0); frag_data[1] = vec4(0,0,0,0); vec3 nvn = normalize(vary_normal); - frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0); + frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl index f73fa6f231..ad65c7d330 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl @@ -49,6 +49,6 @@ void main() frag_data[0] = vec4(col.rgb, 0.0); frag_data[1] = vec4(0,0,0,0); // spec vec3 nvn = normalize(vary_normal); - frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0); + frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl index 227aa2aae3..86390bdd83 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl @@ -42,6 +42,6 @@ void main() frag_data[1] = vertex_color.aaaa; // spec //frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested vec3 nvn = normalize(vary_normal); - frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0); + frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl index d442e5403a..788b966af8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl @@ -41,5 +41,5 @@ void main() frag_data[1] = vertex_color.aaaa; // spec //frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested vec3 nvn = normalize(vary_normal); - frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0); + frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl index e02a7b405b..2cef8f2a5d 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl @@ -2093,7 +2093,6 @@ uniform sampler2D diffuseMap; uniform vec2 rcp_screen_res; uniform vec4 rcp_frame_opt; uniform vec4 rcp_frame_opt2; -uniform vec2 screen_res; VARYING vec2 vary_fragcoord; VARYING vec2 vary_tc; diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl index 4d01eeb64e..7e79317543 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl @@ -79,7 +79,7 @@ void main() } vec3 norm = texture2DRect(normalMap, frag.xy).xyz; - norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm + norm = (norm.xyz-0.5)*2.0; // unpack norm norm = normalize(norm); vec4 spec = texture2DRect(specularRect, frag.xy); vec3 diff = texture2DRect(diffuseRect, frag.xy).rgb; diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl index f671d5b750..75757b26c8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl @@ -84,7 +84,7 @@ void main() } vec3 norm = texture2DRect(normalMap, frag.xy).xyz; - norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm + norm = (norm.xyz-0.5)*2.0; // unpack norm float da = dot(norm, lv); if (da < 0.0) { diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index 66e3cf6d13..89448e2167 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -277,7 +277,7 @@ void main() float depth = texture2DRect(depthMap, tc.xy).r; vec3 pos = getPosition_d(tc, depth).xyz; vec3 norm = texture2DRect(normalMap, tc).xyz; - norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm + norm = (norm.xyz-0.5)*2.0; // unpack norm float da = max(dot(norm.xyz, sun_dir.xyz), 0.0); diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl index 2422d73a3e..bac74cbbef 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl @@ -123,7 +123,7 @@ void main() vec4 pos = getPosition(pos_screen); vec3 norm = texture2DRect(normalMap, pos_screen).xyz; - norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm + norm = (norm.xyz-0.5)*2.0; // unpack norm frag_color[0] = 1.0; frag_color[1] = calcAmbientOcclusion(pos, norm); diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl index 8a5e482e80..daf1cc7ea2 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl @@ -56,6 +56,6 @@ void main() frag_data[0] = vec4(outColor.rgb, 0.0); frag_data[1] = vec4(0,0,0,0); vec3 nvn = normalize(vary_normal); - frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0); + frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl index 6cf6106b51..da253846ef 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl @@ -48,5 +48,5 @@ void main() frag_data[0] = vec4(vertex_color.rgb*col.rgb, 0.0); frag_data[1] = vec4(0,0,0,0); vec3 nvn = normalize(vary_normal); - frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0); + frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl index 42dc7c0980..3427d6db57 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl @@ -161,5 +161,5 @@ void main() frag_data[0] = vec4(color.rgb, 0.5); // diffuse frag_data[1] = vec4(0.5,0.5,0.5, 0.95); // speccolor*spec, spec - frag_data[2] = vec4(screenspacewavef.xy*0.5+0.5, screenspacewavef.z, screenspacewavef.z*0.5); // normalxyz, displace + frag_data[2] = vec4(screenspacewavef.xyz*0.5+0.5, screenspacewavef.z*0.5); // normalxyz, displace } diff --git a/indra/newview/app_settings/shaders/class1/objects/previewF.glsl b/indra/newview/app_settings/shaders/class1/objects/previewF.glsl new file mode 100644 index 0000000000..284da3d0ac --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/objects/previewF.glsl @@ -0,0 +1,41 @@ +/** + * @file previewF.glsl + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifdef DEFINE_GL_FRAGCOLOR +out vec4 frag_color; +#else +#define frag_color gl_FragColor +#endif + +uniform sampler2D diffuseMap; + +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0; + +void main() +{ + vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color; + frag_color = color; +} diff --git a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl index 5dcfa87066..7f3f84398b 100644 --- a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl @@ -32,12 +32,51 @@ ATTRIBUTE vec3 position; ATTRIBUTE vec3 normal; ATTRIBUTE vec2 texcoord0; +uniform vec4 color; + VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; +uniform vec4 light_position[8]; +uniform vec3 light_direction[8]; +uniform vec3 light_attenuation[8]; +uniform vec3 light_diffuse[8]; + +//=================================================================================================== +//declare these here explicitly to separate them from atmospheric lighting elsewhere to work around +//drivers that are picky about functions being declared but not defined even if they aren't called +float calcDirectionalLight(vec3 n, vec3 l) +{ + float a = max(dot(n,l),0.0); + return a; +} + + +float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight) +{ + //get light vector + vec3 lv = lp.xyz-v; + + //get distance + float d = length(lv); + + //normalize light vector + lv *= 1.0/d; + + //distance attenuation + float da = clamp(1.0/(la * d), 0.0, 1.0); + + // spotlight coefficient. + float spot = max(dot(-ln, lv), is_pointlight); + da *= spot*spot; // GL_SPOT_EXPONENT=2 + + //angular attenuation + da *= calcDirectionalLight(n, lv); + + return da; +} +//==================================================================================================== -vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol); -void calcAtmospherics(vec3 inPositionEye); void main() { @@ -45,13 +84,15 @@ void main() vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0)); gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - + vec3 norm = normalize(normal_matrix * normal); - calcAtmospherics(pos.xyz); - - vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.)); - vertex_color = color; + vec4 col = vec4(0,0,0,1); - + // Collect normal lights (need to be divided by two, as we later multiply by 2) + col.rgb += light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz); + col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z); + col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z); + + vertex_color = col*color; } diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index 8db4cb58cf..12706f130b 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -34,10 +34,10 @@ out vec4 frag_color; VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; -uniform sampler2DRectShadow shadowMap0; -uniform sampler2DRectShadow shadowMap1; -uniform sampler2DRectShadow shadowMap2; -uniform sampler2DRectShadow shadowMap3; +uniform sampler2DShadow shadowMap0; +uniform sampler2DShadow shadowMap1; +uniform sampler2DShadow shadowMap2; +uniform sampler2DShadow shadowMap3; uniform sampler2DRect depthMap; uniform mat4 shadow_matrix[6]; @@ -58,22 +58,22 @@ uniform float shadow_bias; uniform mat4 inv_proj; -float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc) +float pcfShadow(sampler2DShadow shadowMap, vec4 stc) { stc.xyz /= stc.w; stc.z += shadow_bias; - - stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here + + stc.x = floor(stc.x*shadow_res.x + fract(stc.y*shadow_res.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here - float cs = shadow2DRect(shadowMap, stc.xyz).x; + float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; - - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x; - - return shadow*0.2; + + shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; + + return shadow*0.2; } @@ -99,8 +99,7 @@ void main() if (spos.z < near_split.z) { lpos = shadow_matrix[3]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; shadow += pcfShadow(shadowMap3, lpos)*w; @@ -111,8 +110,7 @@ void main() if (spos.z < near_split.y && spos.z > far_split.z) { lpos = shadow_matrix[2]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; @@ -123,8 +121,7 @@ void main() if (spos.z < near_split.x && spos.z > far_split.y) { lpos = shadow_matrix[1]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; w -= max(near_split.y-spos.z, 0.0)/transition_domain.y; @@ -135,8 +132,7 @@ void main() if (spos.z > far_split.x) { lpos = shadow_matrix[0]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl index 33958a5010..228dc104ac 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl @@ -31,17 +31,16 @@ out vec4 frag_color; #define frag_color gl_FragColor #endif -uniform sampler2DRectShadow shadowMap0; -uniform sampler2DRectShadow shadowMap1; -uniform sampler2DRectShadow shadowMap2; -uniform sampler2DRectShadow shadowMap3; +uniform sampler2DShadow shadowMap0; +uniform sampler2DShadow shadowMap1; +uniform sampler2DShadow shadowMap2; +uniform sampler2DShadow shadowMap3; uniform sampler2DRect depthMap; uniform sampler2D diffuseMap; uniform mat4 shadow_matrix[6]; uniform vec4 shadow_clip; uniform vec2 screen_res; -uniform vec2 shadow_res; vec3 atmosLighting(vec3 light); vec3 scaleSoftClip(vec3 light); @@ -54,6 +53,7 @@ VARYING vec3 vary_pointlight_col; VARYING vec2 vary_texcoord0; VARYING vec4 vertex_color; +uniform vec2 shadow_res; uniform float shadow_bias; uniform mat4 inv_proj; @@ -71,22 +71,22 @@ vec4 getPosition(vec2 pos_screen) return pos; } -float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc) +float pcfShadow(sampler2DShadow shadowMap, vec4 stc) { stc.xyz /= stc.w; stc.z += shadow_bias; - stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here + stc.x = floor(stc.x*shadow_res.x + fract(stc.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here - float cs = shadow2DRect(shadowMap, stc.xyz).x; + float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; - - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x; + + shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; - return shadow*0.2; + return shadow*0.2; } @@ -112,8 +112,7 @@ void main() if (spos.z < near_split.z) { lpos = shadow_matrix[3]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; shadow += pcfShadow(shadowMap3, lpos)*w; @@ -124,8 +123,7 @@ void main() if (spos.z < near_split.y && spos.z > far_split.z) { lpos = shadow_matrix[2]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; @@ -136,8 +134,7 @@ void main() if (spos.z < near_split.x && spos.z > far_split.y) { lpos = shadow_matrix[1]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; w -= max(near_split.y-spos.z, 0.0)/transition_domain.y; @@ -148,8 +145,7 @@ void main() if (spos.z > far_split.x) { lpos = shadow_matrix[0]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl index 2093fc37dc..c3950a10e1 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl @@ -33,17 +33,16 @@ out vec4 frag_color; uniform float minimum_alpha; -uniform sampler2DRectShadow shadowMap0; -uniform sampler2DRectShadow shadowMap1; -uniform sampler2DRectShadow shadowMap2; -uniform sampler2DRectShadow shadowMap3; +uniform sampler2DShadow shadowMap0; +uniform sampler2DShadow shadowMap1; +uniform sampler2DShadow shadowMap2; +uniform sampler2DShadow shadowMap3; uniform sampler2DRect depthMap; uniform sampler2D diffuseMap; uniform mat4 shadow_matrix[6]; uniform vec4 shadow_clip; uniform vec2 screen_res; -uniform vec2 shadow_res; vec3 atmosLighting(vec3 light); vec3 scaleSoftClip(vec3 light); @@ -55,6 +54,8 @@ VARYING vec3 vary_position; VARYING vec3 vary_pointlight_col; VARYING vec2 vary_texcoord0; +uniform vec2 shadow_res; + uniform float shadow_bias; uniform mat4 inv_proj; @@ -72,20 +73,20 @@ vec4 getPosition(vec2 pos_screen) return pos; } -float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc) +float pcfShadow(sampler2DShadow shadowMap, vec4 stc) { stc.xyz /= stc.w; stc.z += shadow_bias; - stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here + stc.x = floor(stc.x*shadow_res.x + fract(stc.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here + float cs = shadow2D(shadowMap, stc.xyz).x; - float cs = shadow2DRect(shadowMap, stc.xyz).x; float shadow = cs; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; return shadow*0.2; } @@ -120,8 +121,7 @@ void main() if (spos.z < near_split.z) { lpos = shadow_matrix[3]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; shadow += pcfShadow(shadowMap3, lpos)*w; @@ -132,8 +132,7 @@ void main() if (spos.z < near_split.y && spos.z > far_split.z) { lpos = shadow_matrix[2]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; @@ -144,8 +143,7 @@ void main() if (spos.z < near_split.x && spos.z > far_split.y) { lpos = shadow_matrix[1]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; w -= max(near_split.y-spos.z, 0.0)/transition_domain.y; @@ -156,8 +154,7 @@ void main() if (spos.z > far_split.x) { lpos = shadow_matrix[0]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl index f7f1f649ce..5621e47ab7 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl @@ -154,7 +154,7 @@ void main() } vec3 norm = texture2DRect(normalMap, frag.xy).xyz; - norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm + norm = (norm.xyz-0.5)*2.0; // unpack norm norm = normalize(norm); float l_dist = -dot(lv, proj_n); diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index a137bea30f..9df9d75905 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -279,7 +279,7 @@ void main() float depth = texture2DRect(depthMap, tc.xy).r; vec3 pos = getPosition_d(tc, depth).xyz; vec3 norm = texture2DRect(normalMap, tc).xyz; - norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm + norm = (norm.xyz-0.5)*2.0; // unpack norm float da = max(dot(norm.xyz, sun_dir.xyz), 0.0); diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl index ab077d9e02..6d6ad6d565 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl @@ -154,7 +154,7 @@ void main() } vec3 norm = texture2DRect(normalMap, frag.xy).xyz; - norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm + norm = (norm.xyz-0.5)*2.0; // unpack norm norm = normalize(norm); float l_dist = -dot(lv, proj_n); diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl index db3d760359..890486c4b1 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl @@ -35,10 +35,10 @@ out vec4 frag_color; uniform sampler2DRect depthMap; uniform sampler2DRect normalMap; -uniform sampler2DRectShadow shadowMap0; -uniform sampler2DRectShadow shadowMap1; -uniform sampler2DRectShadow shadowMap2; -uniform sampler2DRectShadow shadowMap3; +uniform sampler2DShadow shadowMap0; +uniform sampler2DShadow shadowMap1; +uniform sampler2DShadow shadowMap2; +uniform sampler2DShadow shadowMap3; uniform sampler2DShadow shadowMap4; uniform sampler2DShadow shadowMap5; @@ -55,10 +55,10 @@ VARYING vec2 vary_fragcoord; uniform mat4 inv_proj; uniform vec2 screen_res; -uniform vec2 shadow_res; uniform vec2 proj_shadow_res; uniform vec3 sun_dir; +uniform vec2 shadow_res; uniform float shadow_bias; uniform float shadow_offset; @@ -78,30 +78,31 @@ vec4 getPosition(vec2 pos_screen) return pos; } -float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) +float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) { stc.xyz /= stc.w; - stc.z += shadow_bias*scl; + stc.z += shadow_bias; - stc.x = floor(stc.x + fract(pos_screen.y*0.666666666)); // add some jitter to X sample pos according to Y to disguise the snapping going on here + stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*0.666666666))/shadow_res.x; // add some jitter to X sample pos according to Y to disguise the snapping going on here + float cs = shadow2D(shadowMap, stc.xyz).x; - float cs = shadow2DRect(shadowMap, stc.xyz).x; float shadow = cs; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, 1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, -1.5, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; + - return shadow*0.2; + return shadow*0.2; } -float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) +float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) { stc.xyz /= stc.w; stc.z += spot_shadow_bias*scl; stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap - + float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; @@ -125,7 +126,7 @@ void main() vec4 pos = getPosition(pos_screen); vec4 nmap4 = texture2DRect(normalMap, pos_screen); - nmap4 = vec4((nmap4.xy-0.5)*2.0,nmap4.z,nmap4.w); // unpack norm + nmap4 = vec4((nmap4.xyz-0.5)*2.0,nmap4.w); // unpack norm float displace = nmap4.w; vec3 norm = nmap4.xyz; @@ -162,8 +163,7 @@ void main() if (spos.z < near_split.z) { lpos = shadow_matrix[3]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; shadow += pcfShadow(shadowMap3, lpos, 0.25, pos_screen)*w; @@ -174,8 +174,7 @@ void main() if (spos.z < near_split.y && spos.z > far_split.z) { lpos = shadow_matrix[2]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; @@ -186,7 +185,6 @@ void main() if (spos.z < near_split.x && spos.z > far_split.y) { lpos = shadow_matrix[1]*spos; - lpos.xy *= shadow_res; float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; @@ -198,7 +196,6 @@ void main() if (spos.z > far_split.x) { lpos = shadow_matrix[0]*spos; - lpos.xy *= shadow_res; float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; @@ -237,11 +234,11 @@ void main() //spotlight shadow 1 vec4 lpos = shadow_matrix[4]*spos; - frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8, pos_screen); + frag_color[2] = pcfSpotShadow(shadowMap4, lpos, 0.8, pos_screen); //spotlight shadow 2 lpos = shadow_matrix[5]*spos; - frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8, pos_screen); + frag_color[3] = pcfSpotShadow(shadowMap5, lpos, 0.8, pos_screen); //frag_color.rgb = pos.xyz; //frag_color.b = shadow; diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl index dfe108eb01..2dcd3d656f 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl @@ -34,10 +34,10 @@ out vec4 frag_color; uniform sampler2DRect depthMap; uniform sampler2DRect normalMap; -uniform sampler2DRectShadow shadowMap0; -uniform sampler2DRectShadow shadowMap1; -uniform sampler2DRectShadow shadowMap2; -uniform sampler2DRectShadow shadowMap3; +uniform sampler2DShadow shadowMap0; +uniform sampler2DShadow shadowMap1; +uniform sampler2DShadow shadowMap2; +uniform sampler2DShadow shadowMap3; uniform sampler2DShadow shadowMap4; uniform sampler2DShadow shadowMap5; uniform sampler2D noiseMap; @@ -55,10 +55,11 @@ VARYING vec2 vary_fragcoord; uniform mat4 inv_proj; uniform vec2 screen_res; -uniform vec2 shadow_res; uniform vec2 proj_shadow_res; uniform vec3 sun_dir; +uniform vec2 shadow_res; + uniform float shadow_bias; uniform float shadow_offset; @@ -139,30 +140,30 @@ float calcAmbientOcclusion(vec4 pos, vec3 norm) return min(ret, 1.0); } -float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) +float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) { stc.xyz /= stc.w; - stc.z += shadow_bias*scl; + stc.z += shadow_bias; - stc.x = floor(stc.x + fract(pos_screen.y*0.666666666)); + stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*0.666666666))/shadow_res.x; + float cs = shadow2D(shadowMap, stc.xyz).x; - float cs = shadow2DRect(shadowMap, stc.xyz).x; float shadow = cs; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x; - shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x; - + shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; + return shadow*0.2; } -float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) +float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) { stc.xyz /= stc.w; stc.z += spot_shadow_bias*scl; stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap - + float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; @@ -186,7 +187,7 @@ void main() vec4 pos = getPosition(pos_screen); vec4 nmap4 = texture2DRect(normalMap, pos_screen); - nmap4 = vec4((nmap4.xy-0.5)*2.0,nmap4.z,nmap4.w); // unpack norm + nmap4 = vec4((nmap4.xyz-0.5)*2.0,nmap4.w); // unpack norm float displace = nmap4.w; vec3 norm = nmap4.xyz; @@ -223,8 +224,7 @@ void main() if (spos.z < near_split.z) { lpos = shadow_matrix[3]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; shadow += pcfShadow(shadowMap3, lpos, 0.25, pos_screen)*w; @@ -235,8 +235,7 @@ void main() if (spos.z < near_split.y && spos.z > far_split.z) { lpos = shadow_matrix[2]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; @@ -247,8 +246,7 @@ void main() if (spos.z < near_split.x && spos.z > far_split.y) { lpos = shadow_matrix[1]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; w -= max(near_split.y-spos.z, 0.0)/transition_domain.y; @@ -259,8 +257,7 @@ void main() if (spos.z > far_split.x) { lpos = shadow_matrix[0]*spos; - lpos.xy *= shadow_res; - + float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; @@ -298,11 +295,11 @@ void main() //spotlight shadow 1 vec4 lpos = shadow_matrix[4]*spos; - frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8, pos_screen); + frag_color[2] = pcfSpotShadow(shadowMap4, lpos, 0.8, pos_screen); //spotlight shadow 2 lpos = shadow_matrix[5]*spos; - frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8, pos_screen); + frag_color[3] = pcfSpotShadow(shadowMap5, lpos, 0.8, pos_screen); //frag_color.rgb = pos.xyz; //frag_color.b = shadow; diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index eeb632acaf..4030324ecb 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -1,4 +1,4 @@ -version 32 +version 33 // The version number above should be implemented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -97,10 +97,10 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 RenderFSAASamples 1 0 @@ -129,16 +129,16 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// Mid Graphics Settings +// Medium Low Graphics Settings // -list Mid +list LowMid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 @@ -159,16 +159,16 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// High Graphics Settings (purty) +// Medium Graphics Settings (standard) // -list High +list Mid RenderAnisotropic 1 1 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 1.0 @@ -189,12 +189,103 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// Medium High Graphics Settings (deferred enabled) +// +list MidHigh +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Graphics Settings (deferred + SSAO) +// +list High +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Ultra Graphics Settings (deferred + SSAO + shadows) +// +list HighUltra +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 2 +WLSkyDetail 1 48 RenderFSAASamples 1 2 + // // Ultra graphics (REALLY PURTY!) // @@ -230,6 +321,9 @@ RenderFSAASamples 1 2 // list Unknown RenderVBOEnable 1 0 +RenderShadowDetail 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 // // Class 0 Hardware (just old) @@ -244,18 +338,30 @@ list Class1 RenderVBOEnable 1 1 // -// Class 2 Hardware (make it purty) +// Class 2 Hardware // list Class2 RenderVBOEnable 1 1 // -// Class 3 Hardware (make it purty) +// Class 3 Hardware // list Class3 RenderVBOEnable 1 1 // +// Class 4 Hardware +// +list Class4 +RenderVBOEnable 1 1 + +// +// Class 5 Hardware +// +list Class5 +RenderVBOEnable 1 1 + +// // VRAM > 512MB // list VRAMGT512 diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 3a0e7e3697..6d5284c602 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -1,4 +1,4 @@ -version 27 +version 28 // The version number above should be implemented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -94,10 +94,10 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 RenderFSAASamples 1 0 // @@ -125,16 +125,16 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// Mid Graphics Settings +// Medium Low Graphics Settings // -list Mid +list LowMid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 @@ -143,9 +143,9 @@ RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 8 -RenderLocalLights 1 1 RenderMaxPartCount 1 2048 RenderObjectBump 1 1 +RenderLocalLights 1 1 RenderReflectionDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 1.0 @@ -155,16 +155,16 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// High Graphics Settings (purty) +// Medium Graphics Settings (standard) // -list High +list Mid RenderAnisotropic 1 1 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 1.0 @@ -173,9 +173,9 @@ RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 9 -RenderLocalLights 1 1 RenderMaxPartCount 1 4096 RenderObjectBump 1 1 +RenderLocalLights 1 1 RenderReflectionDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 2.0 @@ -185,10 +185,100 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// Medium High Graphics Settings (deferred enabled) +// +list MidHigh +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Graphics Settings (deferred + SSAO) +// +list High +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Ultra Graphics Settings (deferred + SSAO + shadows) +// +list HighUltra +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 2 +WLSkyDetail 1 48 RenderFSAASamples 1 2 // @@ -226,6 +316,9 @@ RenderFSAASamples 1 2 // list Unknown RenderVBOEnable 1 0 +RenderShadowDetail 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 // // Class 0 Hardware (just old) @@ -240,18 +333,30 @@ list Class1 RenderVBOEnable 1 1 // -// Class 2 Hardware (make it purty) +// Class 2 Hardware // list Class2 RenderVBOEnable 1 1 // -// Class 3 Hardware (make it purty) +// Class 3 Hardware // list Class3 RenderVBOEnable 1 1 // +// Class 4 Hardware +// +list Class4 +RenderVBOEnable 1 1 + +// +// Class 5 Hardware +// +list Class5 +RenderVBOEnable 1 1 + +// // VRAM > 512MB // list VRAMGT512 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 96362ff4bb..1c0d45c11b 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -1,4 +1,4 @@ -version 32 +version 35 // The version number above should be implemented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -96,10 +96,10 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 RenderFSAASamples 1 0 // @@ -127,16 +127,16 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// Mid Graphics Settings +// Medium Low Graphics Settings // -list Mid +list LowMid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 @@ -145,9 +145,9 @@ RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 8 -RenderLocalLights 1 1 RenderMaxPartCount 1 2048 RenderObjectBump 1 1 +RenderLocalLights 1 1 RenderReflectionDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 1.0 @@ -157,16 +157,16 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// High Graphics Settings (purty) +// Medium Graphics Settings (standard) // -list High +list Mid RenderAnisotropic 1 1 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 1.0 @@ -175,9 +175,9 @@ RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 9 -RenderLocalLights 1 1 RenderMaxPartCount 1 4096 RenderObjectBump 1 1 +RenderLocalLights 1 1 RenderReflectionDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 2.0 @@ -187,12 +187,103 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// Medium High Graphics Settings (deferred enabled) +// +list MidHigh +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Graphics Settings (deferred + SSAO) +// +list High +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Ultra Graphics Settings (deferred + SSAO + shadows) +// +list HighUltra +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 +WLSkyDetail 1 48 RenderFSAASamples 1 2 + // // Ultra graphics (REALLY PURTY!) // @@ -242,16 +333,27 @@ list Class1 RenderVBOEnable 1 1 // -// Class 2 Hardware (make it purty) +// Class 2 Hardware // list Class2 RenderVBOEnable 1 1 // -// Class 3 Hardware (make it purty) +// Class 3 Hardware // list Class3 RenderVBOEnable 1 1 +// +// Class 4 Hardware +// +list Class4 +RenderVBOEnable 1 1 + +// +// Class 5 Hardware +// +list Class5 +RenderVBOEnable 1 1 // // No Pixel Shaders available diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt index a945f7a693..68e09d010e 100644 --- a/indra/newview/featuretable_xp.txt +++ b/indra/newview/featuretable_xp.txt @@ -1,4 +1,4 @@ -version 31 +version 32 // The version number above should be implemented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -63,9 +63,9 @@ Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 1.0 RenderCompressTextures 1 1 RenderShaderLightingMaxLevel 1 3 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 -RenderShadowDetail 1 0 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 2 WatchdogDisabled 1 1 RenderUseStreamVBO 1 1 RenderFSAASamples 1 16 @@ -96,10 +96,10 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 RenderFSAASamples 1 0 // @@ -127,16 +127,16 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// Mid Graphics Settings +// Medium Low Graphics Settings // -list Mid +list LowMid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 @@ -145,9 +145,9 @@ RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 8 -RenderLocalLights 1 1 RenderMaxPartCount 1 2048 RenderObjectBump 1 1 +RenderLocalLights 1 1 RenderReflectionDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 1.0 @@ -157,16 +157,16 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 +WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// High Graphics Settings (purty) +// Medium Graphics Settings (standard) // -list High +list Mid RenderAnisotropic 1 1 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 1.0 @@ -175,9 +175,9 @@ RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 9 -RenderLocalLights 1 1 RenderMaxPartCount 1 4096 RenderObjectBump 1 1 +RenderLocalLights 1 1 RenderReflectionDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 2.0 @@ -187,10 +187,100 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 -WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// Medium High Graphics Settings (deferred enabled) +// +list MidHigh +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Graphics Settings (deferred + SSAO) +// +list High +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Ultra Graphics Settings (deferred + SSAO + shadows) +// +list HighUltra +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 +WLSkyDetail 1 48 RenderFSAASamples 1 2 // @@ -242,18 +332,30 @@ list Class1 RenderVBOEnable 1 1 // -// Class 2 Hardware (make it purty) +// Class 2 Hardware // list Class2 RenderVBOEnable 1 1 // -// Class 3 Hardware (make it purty) +// Class 3 Hardware // list Class3 RenderVBOEnable 1 1 // +// Class 4 Hardware (deferred + SSAO) +// +list Class4 +RenderVBOEnable 1 1 + +// +// Class 5 Hardware +// +list Class5 +RenderVBOEnable 1 1 + +// // VRAM > 512MB // list VRAMGT512 diff --git a/indra/newview/generate_breakpad_symbols.py b/indra/newview/generate_breakpad_symbols.py index 5ebec1563e..4181e4ebb3 100644 --- a/indra/newview/generate_breakpad_symbols.py +++ b/indra/newview/generate_breakpad_symbols.py @@ -39,17 +39,20 @@ import shlex import subprocess import tarfile import StringIO +import pprint + +DEBUG=False def usage(): - print >>sys.stderr, "usage: %s viewer_dir viewer_exes libs_suffix dump_syms_tool viewer_symbol_file" % sys.argv[0] + print >>sys.stderr, "usage: %s search_dirs viewer_exes libs_suffix dump_syms_tool viewer_symbol_file" % sys.argv[0] class MissingModuleError(Exception): def __init__(self, modules): Exception.__init__(self, "Failed to find required modules: %r" % modules) self.modules = modules -def main(configuration, viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file): - print "generate_breakpad_symbols run with args: %s" % str((configuration, viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file)) +def main(configuration, search_dirs, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file): + print "generate_breakpad_symbols run with args: %s" % str((configuration, search_dirs, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file)) if not re.match("release", configuration, re.IGNORECASE): print "skipping breakpad symbol generation for non-release build." @@ -67,21 +70,49 @@ def main(configuration, viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, vi return True return fnmatch.fnmatch(f, libs_suffix) + search_dirs = search_dirs.split(";") + def list_files(): - for (dirname, subdirs, filenames) in os.walk(viewer_dir): - #print "scanning '%s' for modules..." % dirname - for f in itertools.ifilter(matches, filenames): - yield os.path.join(dirname, f) + for search_dir in search_dirs: + for (dirname, subdirs, filenames) in os.walk(search_dir): + if DEBUG: + print "scanning '%s' for modules..." % dirname + for f in itertools.ifilter(matches, filenames): + yield os.path.join(dirname, f) def dump_module(m): print "dumping module '%s' with '%s'..." % (m, dump_syms_tool) - child = subprocess.Popen([dump_syms_tool, m] , stdout=subprocess.PIPE) + dsym_full_path = m + child = subprocess.Popen([dump_syms_tool, dsym_full_path] , stdout=subprocess.PIPE) out, err = child.communicate() return (m,child.returncode, out, err) - out = tarfile.open(viewer_symbol_file, 'w:bz2') + + modules = {} + + for m in list_files(): + if DEBUG: + print "examining module '%s' ... " % m, + filename=os.path.basename(m) + if -1 != m.find("DWARF"): + # Just use this module; it has the symbols we want. + modules[filename] = m + if DEBUG: + print "found dSYM entry" + elif filename not in modules: + # Only use this if we don't already have a (possibly better) entry. + modules[filename] = m + if DEBUG: + print "found new entry" + elif DEBUG: + print "ignoring entry" + + + print "Found these following modules:" + pprint.pprint( modules ) - for (filename,status,symbols,err) in itertools.imap(dump_module, list_files()): + out = tarfile.open(viewer_symbol_file, 'w:bz2') + for (filename,status,symbols,err) in itertools.imap(dump_module, modules.values()): if status == 0: module_line = symbols[:symbols.index('\n')] module_line = module_line.split() diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index 777d54a5c3..4c39014c8b 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -17,520 +17,582 @@ // // Format: // Fields are separated by one or more tab (not space) characters -// <recognizer name> <regular expression> <class> <supported> +// <recognizer name> <regular expression> <class> <supported> <stats based> <expected OpenGL version> // // Class Numbers: // 0 - Defaults to low graphics settings. No shaders on by default // 1 - Defaults to mid graphics settings. Basic shaders on by default // 2 - Defaults to high graphics settings. Atmospherics on by default. -// 3 - Same as class 2 for now. +// 3 - Same as 2, but with lighting and shadows enabled. +// 4 - Same as 3, but with ambient occlusion enabled. +// 5 - Same as 4, but with shadows set to "Sun/Moon+Projectors." // // Supported Number: // 0 - We claim to not support this card. // 1 - We claim to support this card. // -3Dfx .*3Dfx.* 0 0 -3Dlabs .*3Dlabs.* 0 0 -ATI 3D-Analyze .*ATI.*3D-Analyze.* 0 0 -ATI All-in-Wonder 7500 .*ATI.*All-in-Wonder 75.* 0 1 -ATI All-in-Wonder 8500 .*ATI.*All-in-Wonder 85.* 0 1 -ATI All-in-Wonder 9200 .*ATI.*All-in-Wonder 92.* 0 1 -ATI All-in-Wonder 9xxx .*ATI.*All-in-Wonder 9.* 1 1 -ATI All-in-Wonder HD .*ATI.*All-in-Wonder HD.* 1 1 -ATI All-in-Wonder X600 .*ATI.*All-in-Wonder X6.* 1 1 -ATI All-in-Wonder X800 .*ATI.*All-in-Wonder X8.* 2 1 -ATI All-in-Wonder X1800 .*ATI.*All-in-Wonder X18.* 3 1 -ATI All-in-Wonder X1900 .*ATI.*All-in-Wonder X19.* 3 1 -ATI All-in-Wonder PCI-E .*ATI.*All-in-Wonder.*PCI-E.* 1 1 -ATI All-in-Wonder Radeon .*ATI.*All-in-Wonder Radeon.* 0 1 -ATI ASUS ARES .*ATI.*ASUS.*ARES.* 3 1 -ATI ASUS A9xxx .*ATI.*ASUS.*A9.* 1 1 -ATI ASUS AH24xx .*ATI.*ASUS.*AH24.* 1 1 -ATI ASUS AH26xx .*ATI.*ASUS.*AH26.* 3 1 -ATI ASUS AH34xx .*ATI.*ASUS.*AH34.* 1 1 -ATI ASUS AH36xx .*ATI.*ASUS.*AH36.* 3 1 -ATI ASUS AH46xx .*ATI.*ASUS.*AH46.* 3 1 -ATI ASUS AX3xx .*ATI.*ASUS.*AX3.* 1 1 -ATI ASUS AX5xx .*ATI.*ASUS.*AX5.* 1 1 -ATI ASUS AX8xx .*ATI.*ASUS.*AX8.* 2 1 -ATI ASUS EAH24xx .*ATI.*ASUS.*EAH24.* 2 1 -ATI ASUS EAH26xx .*ATI.*ASUS.*EAH26.* 3 1 -ATI ASUS EAH29xx .*ATI.*ASUS.*EAH29.* 3 1 -ATI ASUS EAH34xx .*ATI.*ASUS.*EAH34.* 1 1 -ATI ASUS EAH36xx .*ATI.*ASUS.*EAH36.* 3 1 -ATI ASUS EAH38xx .*ATI.*ASUS.*EAH38.* 3 1 -ATI ASUS EAH43xx .*ATI.*ASUS.*EAH43.* 1 1 -ATI ASUS EAH45xx .*ATI.*ASUS.*EAH45.* 1 1 -ATI ASUS EAH48xx .*ATI.*ASUS.*EAH48.* 3 1 -ATI ASUS EAH57xx .*ATI.*ASUS.*EAH57.* 3 1 -ATI ASUS EAH58xx .*ATI.*ASUS.*EAH58.* 3 1 -ATI ASUS EAH6xxx .*ATI.*ASUS.*EAH6.* 3 1 -ATI ASUS Radeon X1xxx .*ATI.*ASUS.*X1.* 3 1 -ATI Radeon X7xx .*ATI.*ASUS.*X7.* 1 1 -ATI Radeon X19xx .*ATI.*(Radeon|Diamond) X19.* ?.* 3 1 -ATI Radeon X18xx .*ATI.*(Radeon|Diamond) X18.* ?.* 3 1 -ATI Radeon X17xx .*ATI.*(Radeon|Diamond) X17.* ?.* 2 1 -ATI Radeon X16xx .*ATI.*(Radeon|Diamond) X16.* ?.* 2 1 -ATI Radeon X15xx .*ATI.*(Radeon|Diamond) X15.* ?.* 2 1 -ATI Radeon X13xx .*ATI.*(Radeon|Diamond) X13.* ?.* 1 1 -ATI Radeon X1xxx .*ATI.*(Radeon|Diamond) X1.. ?.* 1 1 -ATI Radeon X2xxx .*ATI.*(Radeon|Diamond) X2.. ?.* 1 1 -ATI Display Adapter .*ATI.*display adapter.* 0 1 -ATI FireGL 5200 .*ATI.*FireGL V52.* 0 1 -ATI FireGL 5xxx .*ATI.*FireGL V5.* 1 1 -ATI FireGL .*ATI.*Fire.*GL.* 0 1 -ATI FirePro M3900 .*ATI.*FirePro.*M39.* 2 1 -ATI FirePro M5800 .*ATI.*FirePro.*M58.* 3 1 -ATI FirePro M7740 .*ATI.*FirePro.*M77.* 3 1 -ATI FirePro M7820 .*ATI.*FirePro.*M78.* 3 1 -ATI FireMV .*ATI.*FireMV.* 0 1 -ATI Geforce 9500 GT .*ATI.*Geforce 9500 *GT.* 2 1 -ATI Geforce 9600 GT .*ATI.*Geforce 9600 *GT.* 2 1 -ATI Geforce 9800 GT .*ATI.*Geforce 9800 *GT.* 2 1 -ATI Generic .*ATI.*Generic.* 0 0 -ATI Hercules 9800 .*ATI.*Hercules.*9800.* 1 1 -ATI IGP 340M .*ATI.*IGP.*340M.* 0 0 -ATI M52 .*ATI.*M52.* 1 1 -ATI M54 .*ATI.*M54.* 1 1 -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 Radeon HD 64xx .*ATI.*AMD Radeon.* HD [67]4..[MG] 3 1 -ATI Radeon HD 65xx .*ATI.*AMD Radeon.* HD [67]5..[MG] 3 1 -ATI Radeon HD 66xx .*ATI.*AMD Radeon.* HD [67]6..[MG] 3 1 -ATI Mobility Radeon 4100 .*ATI.*Mobility.*41.. 1 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.* 1 1 -ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 1 1 -ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 0 1 -ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD *530v.* 1 1 -ATI Mobility Radeon HD 540v .*ATI.*Mobility.*HD *540v.* 2 1 -ATI Mobility Radeon HD 545v .*ATI.*Mobility.*HD *545v.* 2 1 -ATI Mobility Radeon HD 550v .*ATI.*Mobility.*HD *550v.* 2 1 -ATI Mobility Radeon HD 560v .*ATI.*Mobility.*HD *560v.* 2 1 -ATI Mobility Radeon HD 565v .*ATI.*Mobility.*HD *565v.* 2 1 -ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD *23.* 2 1 -ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD *24.* 2 1 -ATI Mobility Radeon HD 2600 .*ATI.*Mobility.*HD *26.* 3 1 -ATI Mobility Radeon HD 2700 .*ATI.*Mobility.*HD *27.* 3 1 -ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD *31.* 0 1 -ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD *32.* 0 1 -ATI Mobility Radeon HD 3400 .*ATI.*Mobility.*HD *34.* 2 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 HD 4200 .*ATI.*Mobility.*HD *42.* 2 1 -ATI Mobility Radeon HD 4300 .*ATI.*Mobility.*HD *43.* 2 1 -ATI Mobility Radeon HD 4500 .*ATI.*Mobility.*HD *45.* 3 1 -ATI Mobility Radeon HD 4600 .*ATI.*Mobility.*HD *46.* 3 1 -ATI Mobility Radeon HD 4800 .*ATI.*Mobility.*HD *48.* 3 1 -ATI Mobility Radeon HD 5100 .*ATI.*Mobility.*HD *51.* 3 1 -ATI Mobility Radeon HD 5300 .*ATI.*Mobility.*HD *53.* 3 1 -ATI Mobility Radeon HD 5400 .*ATI.*Mobility.*HD *54.* 3 1 -ATI Mobility Radeon HD 5500 .*ATI.*Mobility.*HD *55.* 3 1 -ATI Mobility Radeon HD 5600 .*ATI.*Mobility.*HD *56.* 3 1 -ATI Mobility Radeon HD 5700 .*ATI.*Mobility.*HD *57.* 3 1 -ATI Mobility Radeon HD 6200 .*ATI.*Mobility.*HD *62.* 3 1 -ATI Mobility Radeon HD 6300 .*ATI.*Mobility.*HD *63.* 3 1 -ATI Mobility Radeon HD 6400M .*ATI.*Mobility.*HD *64.* 3 1 -ATI Mobility Radeon HD 6500M .*ATI.*Mobility.*HD *65.* 3 1 -ATI Mobility Radeon HD 6600M .*ATI.*Mobility.*HD *66.* 3 1 -ATI Mobility Radeon HD 6700M .*ATI.*Mobility.*HD *67.* 3 1 -ATI Mobility Radeon HD 6800M .*ATI.*Mobility.*HD *68.* 3 1 -ATI Mobility Radeon HD 6900M .*ATI.*Mobility.*HD *69.* 3 1 -ATI Radeon HD 2300 .*ATI.*Radeon HD *23.. 2 1 -ATI Radeon HD 2400 .*ATI.*Radeon HD *24.. 2 1 -ATI Radeon HD 2600 .*ATI.*Radeon HD *26.. 2 1 -ATI Radeon HD 2900 .*ATI.*Radeon HD *29.. 3 1 -ATI Radeon HD 3000 .*ATI.*Radeon HD *30.. 0 1 -ATI Radeon HD 3100 .*ATI.*Radeon HD *31.. 1 1 -ATI Radeon HD 3200 .*ATI.*Radeon HD *32.. 1 1 -ATI Radeon HD 3300 .*ATI.*Radeon HD *33.. 2 1 -ATI Radeon HD 3400 .*ATI.*Radeon HD *34.. 2 1 -ATI Radeon HD 3500 .*ATI.*Radeon HD *35.. 2 1 -ATI Radeon HD 3600 .*ATI.*Radeon HD *36.. 3 1 -ATI Radeon HD 3700 .*ATI.*Radeon HD *37.. 3 1 -ATI Radeon HD 3800 .*ATI.*Radeon HD *38.. 3 1 -ATI Radeon HD 4100 .*ATI.*Radeon HD *41.. 1 1 -ATI Radeon HD 4200 .*ATI.*Radeon HD *42.. 1 1 -ATI Radeon HD 4300 .*ATI.*Radeon HD *43.. 2 1 -ATI Radeon HD 4400 .*ATI.*Radeon HD *44.. 2 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 5400 .*ATI.*Radeon HD *54.. 3 1 -ATI Radeon HD 5500 .*ATI.*Radeon HD *55.. 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 HD 6200 .*ATI.*Radeon HD *62.. 3 1 -ATI Radeon HD 6300 .*ATI.*Radeon HD *63.. 3 1 -ATI Radeon HD 6400 .*ATI.*Radeon HD *64.. 3 1 -ATI Radeon HD 6500 .*ATI.*Radeon HD *65.. 3 1 -ATI Radeon HD 6600 .*ATI.*Radeon HD *66.. 3 1 -ATI Radeon HD 6700 .*ATI.*Radeon HD *67.. 3 1 -ATI Radeon HD 6800 .*ATI.*Radeon HD *68.. 3 1 -ATI Radeon HD 6900 .*ATI.*Radeon HD *69.. 3 1 -ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 0 0 -ATI Radeon 2100 .*ATI.*Radeon 21.. 0 1 -ATI Radeon 3000 .*ATI.*Radeon 30.. 0 1 -ATI Radeon 3100 .*ATI.*Radeon 31.. 1 1 -ATI Radeon 5xxx .*ATI.*Radeon 5... 3 1 -ATI Radeon 7xxx .*ATI.*Radeon 7... 0 1 -ATI Radeon 8xxx .*ATI.*Radeon 8... 0 1 -ATI Radeon 9000 .*ATI.*Radeon 90.. 0 1 -ATI Radeon 9100 .*ATI.*Radeon 91.. 0 1 -ATI Radeon 9200 .*ATI.*Radeon 92.. 0 1 -ATI Radeon 9500 .*ATI.*Radeon 95.. 0 1 -ATI Radeon 9600 .*ATI.*Radeon 96.. 0 1 -ATI Radeon 9700 .*ATI.*Radeon 97.. 1 1 -ATI Radeon 9800 .*ATI.*Radeon 98.. 1 1 -ATI Radeon RV250 .*ATI.*RV250.* 0 1 -ATI Radeon RV600 .*ATI.*RV6.* 1 1 -ATI Radeon RX700 .*ATI.*RX70.* 1 1 -ATI Radeon RX800 .*ATI.*Radeon *RX80.* 2 1 -ATI RS880M .*ATI.*RS880M 1 1 -ATI Radeon RX9550 .*ATI.*RX9550.* 1 1 -ATI Radeon VE .*ATI.*Radeon.*VE.* 0 0 -ATI Radeon X300 .*ATI.*Radeon *X3.* 0 1 -ATI Radeon X400 .*ATI.*Radeon ?X4.* 0 1 -ATI Radeon X500 .*ATI.*Radeon ?X5.* 0 1 -ATI Radeon X600 .*ATI.*Radeon ?X6.* 1 1 -ATI Radeon X700 .*ATI.*Radeon ?X7.* 1 1 -ATI Radeon X800 .*ATI.*Radeon ?X8.* 2 1 -ATI Radeon X900 .*ATI.*Radeon ?X9.* 2 1 -ATI Radeon Xpress .*ATI.*Radeon Xpress.* 0 1 -ATI Rage 128 .*ATI.*Rage 128.* 0 1 -ATI R300 (9700) .*R300.* 1 1 -ATI R350 (9800) .*R350.* 1 1 -ATI R580 (X1900) .*R580.* 3 1 -ATI RC410 (Xpress 200) .*RC410.* 0 0 -ATI RS48x (Xpress 200x) .*RS48.* 0 0 -ATI RS600 (Xpress 3200) .*RS600.* 0 0 -ATI RV350 (9600) .*RV350.* 0 1 -ATI RV370 (X300) .*RV370.* 0 1 -ATI RV410 (X700) .*RV410.* 1 1 -ATI RV515 .*RV515.* 1 1 -ATI RV570 (X1900 GT/PRO) .*RV570.* 3 1 -ATI RV380 .*RV380.* 0 1 -ATI RV530 .*RV530.* 1 1 -ATI RX480 (Xpress 200P) .*RX480.* 0 1 -ATI RX700 .*RX700.* 1 1 -AMD ANTILLES (HD 6990) .*(AMD|ATI).*Antilles.* 3 1 -AMD BARTS (HD 6800) .*(AMD|ATI).*Barts.* 3 1 -AMD CAICOS (HD 6400) .*(AMD|ATI).*Caicos.* 3 1 -AMD CAYMAN (HD 6900) .*(AMD|ATI).*(Cayman|CAYMAM).* 3 1 -AMD CEDAR (HD 5450) .*(AMD|ATI).*Cedar.* 2 1 -AMD CYPRESS (HD 5800) .*(AMD|ATI).*Cypress.* 3 1 -AMD HEMLOCK (HD 5970) .*(AMD|ATI).*Hemlock.* 3 1 -AMD JUNIPER (HD 5700) .*(AMD|ATI).*Juniper.* 3 1 -AMD PARK .*(AMD|ATI).*Park.* 3 1 -AMD REDWOOD (HD 5500/5600) .*(AMD|ATI).*Redwood.* 3 1 -AMD TURKS (HD 6500/6600) .*(AMD|ATI).*Turks.* 3 1 -AMD RS780 (HD 3200) .*RS780.* 0 1 -AMD RS880 (HD 4200) .*RS880.* 1 1 -AMD RV610 (HD 2400) .*RV610.* 1 1 -AMD RV620 (HD 3400) .*RV620.* 1 1 -AMD RV630 (HD 2600) .*RV630.* 2 1 -AMD RV635 (HD 3600) .*RV635.* 3 1 -AMD RV670 (HD 3800) .*RV670.* 3 1 -AMD R680 (HD 3870 X2) .*R680.* 3 1 -AMD R700 (HD 4800 X2) .*R700.* 3 1 -AMD RV710 (HD 4300) .*RV710.* 1 1 -AMD RV730 (HD 4600) .*RV730.* 3 1 -AMD RV740 (HD 4700) .*RV740.* 3 1 -AMD RV770 (HD 4800) .*RV770.* 3 1 -AMD RV790 (HD 4800) .*RV790.* 3 1 -ATI 760G/Radeon 3000 .*ATI.*AMD 760G.* 1 1 -ATI 780L/Radeon 3000 .*ATI.*AMD 780L.* 1 1 -ATI Radeon DDR .*ATI.*Radeon ?DDR.* 0 1 -ATI FirePro 2000 .*ATI.*FirePro 2.* 1 1 -ATI FirePro 3000 .*ATI.*FirePro V3.* 1 1 -ATI FirePro 4000 .*ATI.*FirePro V4.* 2 1 -ATI FirePro 5000 .*ATI.*FirePro V5.* 3 1 -ATI FirePro 7000 .*ATI.*FirePro V7.* 3 1 -ATI FirePro M .*ATI.*FirePro M.* 3 1 -ATI Technologies .*ATI *Technologies.* 0 1 -// This entry is last to work around the "R300" driver problem. -ATI R300 (9700) .*R300.* 1 1 -ATI Radeon .*ATI.*(Diamond|Radeon).* 0 1 -Intel X3100 .*Intel.*X3100.* 0 1 -Intel 830M .*Intel.*830M 0 0 -Intel 845G .*Intel.*845G 0 0 -Intel 855GM .*Intel.*855GM 0 0 -Intel 865G .*Intel.*865G 0 0 -Intel 900 .*Intel.*900.*900 0 0 -Intel 915GM .*Intel.*915GM 0 0 -Intel 915G .*Intel.*915G 0 0 -Intel 945GM .*Intel.*945GM.* 0 1 -Intel 945G .*Intel.*945G.* 0 1 -Intel 950 .*Intel.*950.* 0 1 -Intel 965 .*Intel.*965.* 0 1 -Intel G33 .*Intel.*G33.* 0 0 -Intel G41 .*Intel.*G41.* 0 1 -Intel G45 .*Intel.*G45.* 0 1 -Intel Bear Lake .*Intel.*Bear Lake.* 0 0 -Intel Broadwater .*Intel.*Broadwater.* 0 0 -Intel Brookdale .*Intel.*Brookdale.* 0 0 -Intel Cantiga .*Intel.*Cantiga.* 0 0 -Intel Eaglelake .*Intel.*Eaglelake.* 0 1 -Intel Graphics Media HD .*Intel.*Graphics Media.*HD.* 0 1 -Intel HD Graphics .*Intel.*HD Graphics.* 2 1 -Intel Mobile 4 Series .*Intel.*Mobile.* 4 Series.* 0 1 -Intel Media Graphics HD .*Intel.*Media Graphics HD.* 0 1 -Intel Montara .*Intel.*Montara.* 0 0 -Intel Pineview .*Intel.*Pineview.* 0 1 -Intel Springdale .*Intel.*Springdale.* 0 0 -Intel HD Graphics 2000 .*Intel.*HD2000.* 1 1 -Intel HD Graphics 3000 .*Intel.*HD3000.* 2 1 -Matrox .*Matrox.* 0 0 -Mesa .*Mesa.* 0 0 -NVIDIA 205 .*NVIDIA .*GeForce 205.* 2 1 -NVIDIA 210 .*NVIDIA .*GeForce 210.* 2 1 -NVIDIA 310M .*NVIDIA .*GeForce 310M.* 1 1 -NVIDIA 310 .*NVIDIA .*GeForce 310.* 3 1 -NVIDIA 315M .*NVIDIA .*GeForce 315M.* 2 1 -NVIDIA 315 .*NVIDIA .*GeForce 315.* 3 1 -NVIDIA 320M .*NVIDIA .*GeForce 320M.* 2 1 -NVIDIA G100M .*NVIDIA .*100M.* 0 1 -NVIDIA G100 .*NVIDIA .*100.* 0 1 -NVIDIA G102M .*NVIDIA .*102M.* 0 1 -NVIDIA G103M .*NVIDIA .*103M.* 0 1 -NVIDIA G105M .*NVIDIA .*105M.* 0 1 -NVIDIA G 110M .*NVIDIA .*110M.* 0 1 -NVIDIA G 120M .*NVIDIA .*120M.* 1 1 -NVIDIA G 200 .*NVIDIA .*200(M)?.* 0 1 -NVIDIA G 205M .*NVIDIA .*205(M)?.* 0 1 -NVIDIA G 210 .*NVIDIA .*210(M)?.* 1 1 -NVIDIA 305M .*NVIDIA .*305(M)?.* 1 1 -NVIDIA G 310M .*NVIDIA .*310(M)?.* 2 1 -NVIDIA G 315 .*NVIDIA .*315(M)?.* 2 1 -NVIDIA G 320M .*NVIDIA .*320(M)?.* 2 1 -NVIDIA G 405 .*NVIDIA .*405(M)?.* 1 1 -NVIDIA G 410M .*NVIDIA .*410(M)?.* 1 1 -NVIDIA GT 120M .*NVIDIA .*GT *120(M)?.* 2 1 -NVIDIA GT 120 .*NVIDIA .*GT.*120 2 1 -NVIDIA GT 130M .*NVIDIA .*GT *130(M)?.* 2 1 -NVIDIA GT 140M .*NVIDIA .*GT *140(M)?.* 2 1 -NVIDIA GT 150M .*NVIDIA .*GT(S)? *150(M)?.* 2 1 -NVIDIA GT 160M .*NVIDIA .*GT *160(M)?.* 2 1 -NVIDIA GT 220M .*NVIDIA .*GT *220(M)?.* 2 1 -NVIDIA GT 230M .*NVIDIA .*GT *230(M)?.* 2 1 -NVIDIA GT 240M .*NVIDIA .*GT *240(M)?.* 2 1 -NVIDIA GT 250M .*NVIDIA .*GT *250(M)?.* 2 1 -NVIDIA GT 260M .*NVIDIA .*GT *260(M)?.* 2 1 -NVIDIA GT 320M .*NVIDIA .*GT *320(M)?.* 2 1 -NVIDIA GT 325M .*NVIDIA .*GT *325(M)?.* 0 1 -NVIDIA GT 330M .*NVIDIA .*GT *330(M)?.* 3 1 -NVIDIA GT 335M .*NVIDIA .*GT *335(M)?.* 1 1 -NVIDIA GT 340M .*NVIDIA .*GT *340(M)?.* 2 1 -NVIDIA GT 415M .*NVIDIA .*GT *415(M)?.* 2 1 -NVIDIA GT 420M .*NVIDIA .*GT *420(M)?.* 2 1 -NVIDIA GT 425M .*NVIDIA .*GT *425(M)?.* 3 1 -NVIDIA GT 430M .*NVIDIA .*GT *430(M)?.* 3 1 -NVIDIA GT 435M .*NVIDIA .*GT *435(M)?.* 3 1 -NVIDIA GT 440M .*NVIDIA .*GT *440(M)?.* 3 1 -NVIDIA GT 445M .*NVIDIA .*GT *445(M)?.* 3 1 -NVIDIA GT 450M .*NVIDIA .*GT *450(M)?.* 3 1 -NVIDIA GT 520M .*NVIDIA .*GT *52.(M)?.* 3 1 -NVIDIA GT 530M .*NVIDIA .*GT *530(M)?.* 3 1 -NVIDIA GT 540M .*NVIDIA .*GT *54.(M)?.* 3 1 -NVIDIA GT 550M .*NVIDIA .*GT *550(M)?.* 3 1 -NVIDIA GT 555M .*NVIDIA .*GT *555(M)?.* 3 1 -NVIDIA GTS 160M .*NVIDIA .*GT(S)? *160(M)?.* 2 1 -NVIDIA GTS 240 .*NVIDIA .*GTS *24.* 3 1 -NVIDIA GTS 250 .*NVIDIA .*GTS *25.* 3 1 -NVIDIA GTS 350M .*NVIDIA .*GTS *350M.* 3 1 -NVIDIA GTS 360M .*NVIDIA .*GTS *360M.* 3 1 -NVIDIA GTS 360 .*NVIDIA .*GTS *360.* 3 1 -NVIDIA GTS 450 .*NVIDIA .*GTS *45.* 3 1 -NVIDIA GTX 260 .*NVIDIA .*GTX *26.* 3 1 -NVIDIA GTX 275 .*NVIDIA .*GTX *275.* 3 1 -NVIDIA GTX 270 .*NVIDIA .*GTX *27.* 3 1 -NVIDIA GTX 285 .*NVIDIA .*GTX *285.* 3 1 -NVIDIA GTX 280 .*NVIDIA .*GTX *280.* 3 1 -NVIDIA GTX 290 .*NVIDIA .*GTX *290.* 3 1 -NVIDIA GTX 295 .*NVIDIA .*GTX *295.* 3 1 -NVIDIA GTX 460M .*NVIDIA .*GTX *460M.* 3 1 -NVIDIA GTX 465 .*NVIDIA .*GTX *465.* 3 1 -NVIDIA GTX 460 .*NVIDIA .*GTX *46.* 3 1 -NVIDIA GTX 470M .*NVIDIA .*GTX *470M.* 3 1 -NVIDIA GTX 470 .*NVIDIA .*GTX *47.* 3 1 -NVIDIA GTX 480M .*NVIDIA .*GTX *480M.* 3 1 -NVIDIA GTX 485M .*NVIDIA .*GTX *485M.* 3 1 -NVIDIA GTX 480 .*NVIDIA .*GTX *48.* 3 1 -NVIDIA GTX 530 .*NVIDIA .*GTX *53.* 3 1 -NVIDIA GTX 550 .*NVIDIA .*GTX *55.* 3 1 -NVIDIA GTX 560 .*NVIDIA .*GTX *56.* 3 1 -NVIDIA GTX 570 .*NVIDIA .*GTX *57.* 3 1 -NVIDIA GTX 580M .*NVIDIA .*GTX *580M.* 3 1 -NVIDIA GTX 580 .*NVIDIA .*GTX *58.* 3 1 -NVIDIA GTX 590 .*NVIDIA .*GTX *59.* 3 1 -NVIDIA C51 .*NVIDIA .*C51.* 0 1 -NVIDIA G72 .*NVIDIA .*G72.* 1 1 -NVIDIA G73 .*NVIDIA .*G73.* 1 1 -NVIDIA G84 .*NVIDIA .*G84.* 2 1 -NVIDIA G86 .*NVIDIA .*G86.* 3 1 -NVIDIA G92 .*NVIDIA .*G92.* 3 1 -NVIDIA GeForce .*GeForce 256.* 0 0 -NVIDIA GeForce 2 .*GeForce ?2 ?.* 0 1 -NVIDIA GeForce 3 .*GeForce ?3 ?.* 0 1 -NVIDIA GeForce 3 Ti .*GeForce ?3 Ti.* 0 1 -NVIDIA GeForce 4 .*NVIDIA .*GeForce ?4.* 0 1 -NVIDIA GeForce 4 Go .*NVIDIA .*GeForce ?4.*Go.* 0 1 -NVIDIA GeForce 4 MX .*NVIDIA .*GeForce ?4 MX.* 0 1 -NVIDIA GeForce 4 PCX .*NVIDIA .*GeForce ?4 PCX.* 0 1 -NVIDIA GeForce 4 Ti .*NVIDIA .*GeForce ?4 Ti.* 0 1 -NVIDIA GeForce 6100 .*NVIDIA .*GeForce 61.* 0 1 -NVIDIA GeForce 6200 .*NVIDIA .*GeForce 62.* 0 1 -NVIDIA GeForce 6500 .*NVIDIA .*GeForce 65.* 0 1 -NVIDIA GeForce 6600 .*NVIDIA .*GeForce 66.* 1 1 -NVIDIA GeForce 6700 .*NVIDIA .*GeForce 67.* 2 1 -NVIDIA GeForce 6800 .*NVIDIA .*GeForce 68.* 2 1 -NVIDIA GeForce 7000 .*NVIDIA .*GeForce 70.* 0 1 -NVIDIA GeForce 7100 .*NVIDIA .*GeForce 71.* 0 1 -NVIDIA GeForce 7200 .*NVIDIA .*GeForce 72.* 1 1 -NVIDIA GeForce 7300 .*NVIDIA .*GeForce 73.* 1 1 -NVIDIA GeForce 7500 .*NVIDIA .*GeForce 75.* 1 1 -NVIDIA GeForce 7600 .*NVIDIA .*GeForce 76.* 2 1 -NVIDIA GeForce 7800 .*NVIDIA .*GeForce 78.* 2 1 -NVIDIA GeForce 7900 .*NVIDIA .*GeForce 79.* 2 1 -NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 1 1 -NVIDIA GeForce 8200M .*NVIDIA .*GeForce 8200M.* 1 1 -NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 1 1 -NVIDIA GeForce 8300 .*NVIDIA .*GeForce 83.* 2 1 -NVIDIA GeForce 8400M .*NVIDIA .*GeForce 8400M.* 2 1 -NVIDIA GeForce 8400 .*NVIDIA .*GeForce 84.* 2 1 -NVIDIA GeForce 8500 .*NVIDIA .*GeForce 85.* 3 1 -NVIDIA GeForce 8600M .*NVIDIA .*GeForce 8600M.* 2 1 -NVIDIA GeForce 8600 .*NVIDIA .*GeForce 86.* 3 1 -NVIDIA GeForce 8700M .*NVIDIA .*GeForce 8700M.* 3 1 -NVIDIA GeForce 8700 .*NVIDIA .*GeForce 87.* 3 1 -NVIDIA GeForce 8800M .*NVIDIA .*GeForce 8800M.* 3 1 -NVIDIA GeForce 8800 .*NVIDIA .*GeForce 88.* 3 1 -NVIDIA GeForce 9100M .*NVIDIA .*GeForce 9100M.* 0 1 -NVIDIA GeForce 9100 .*NVIDIA .*GeForce 91.* 0 1 -NVIDIA GeForce 9200M .*NVIDIA .*GeForce 9200M.* 1 1 -NVIDIA GeForce 9200 .*NVIDIA .*GeForce 92.* 1 1 -NVIDIA GeForce 9300M .*NVIDIA .*GeForce 9300M.* 2 1 -NVIDIA GeForce 9300 .*NVIDIA .*GeForce 93.* 2 1 -NVIDIA GeForce 9400M .*NVIDIA .*GeForce 9400M.* 2 1 -NVIDIA GeForce 9400 .*NVIDIA .*GeForce 94.* 2 1 -NVIDIA GeForce 9500M .*NVIDIA .*GeForce 9500M.* 2 1 -NVIDIA GeForce 9500 .*NVIDIA .*GeForce 95.* 2 1 -NVIDIA GeForce 9600M .*NVIDIA .*GeForce 9600M.* 3 1 -NVIDIA GeForce 9600 .*NVIDIA .*GeForce 96.* 2 1 -NVIDIA GeForce 9700M .*NVIDIA .*GeForce 9700M.* 2 1 -NVIDIA GeForce 9800M .*NVIDIA .*GeForce 9800M.* 3 1 -NVIDIA GeForce 9800 .*NVIDIA .*GeForce 98.* 3 1 -NVIDIA GeForce FX 5100 .*NVIDIA .*GeForce FX 51.* 0 1 -NVIDIA GeForce FX 5200 .*NVIDIA .*GeForce FX 52.* 0 1 -NVIDIA GeForce FX 5300 .*NVIDIA .*GeForce FX 53.* 0 1 -NVIDIA GeForce FX 5500 .*NVIDIA .*GeForce FX 55.* 0 1 -NVIDIA GeForce FX 5600 .*NVIDIA .*GeForce FX 56.* 0 1 -NVIDIA GeForce FX 5700 .*NVIDIA .*GeForce FX 57.* 1 1 -NVIDIA GeForce FX 5800 .*NVIDIA .*GeForce FX 58.* 1 1 -NVIDIA GeForce FX 5900 .*NVIDIA .*GeForce FX 59.* 1 1 -NVIDIA GeForce FX Go5100 .*NVIDIA .*GeForce FX Go51.* 0 1 -NVIDIA GeForce FX Go5200 .*NVIDIA .*GeForce FX Go52.* 0 1 -NVIDIA GeForce FX Go5300 .*NVIDIA .*GeForce FX Go53.* 0 1 -NVIDIA GeForce FX Go5500 .*NVIDIA .*GeForce FX Go55.* 0 1 -NVIDIA GeForce FX Go5600 .*NVIDIA .*GeForce FX Go56.* 0 1 -NVIDIA GeForce FX Go5700 .*NVIDIA .*GeForce FX Go57.* 1 1 -NVIDIA GeForce FX Go5800 .*NVIDIA .*GeForce FX Go58.* 1 1 -NVIDIA GeForce FX Go5900 .*NVIDIA .*GeForce FX Go59.* 1 1 -NVIDIA GeForce FX Go5xxx .*NVIDIA .*GeForce FX Go.* 0 1 -NVIDIA GeForce Go 6100 .*NVIDIA .*GeForce Go 61.* 0 1 -NVIDIA GeForce Go 6200 .*NVIDIA .*GeForce Go 62.* 0 1 -NVIDIA GeForce Go 6400 .*NVIDIA .*GeForce Go 64.* 1 1 -NVIDIA GeForce Go 6500 .*NVIDIA .*GeForce Go 65.* 1 1 -NVIDIA GeForce Go 6600 .*NVIDIA .*GeForce Go 66.* 1 1 -NVIDIA GeForce Go 6700 .*NVIDIA .*GeForce Go 67.* 1 1 -NVIDIA GeForce Go 6800 .*NVIDIA .*GeForce Go 68.* 1 1 -NVIDIA GeForce Go 7200 .*NVIDIA .*GeForce Go 72.* 1 1 -NVIDIA GeForce Go 7300 LE .*NVIDIA .*GeForce Go 73.*LE.* 0 1 -NVIDIA GeForce Go 7300 .*NVIDIA .*GeForce Go 73.* 1 1 -NVIDIA GeForce Go 7400 .*NVIDIA .*GeForce Go 74.* 1 1 -NVIDIA GeForce Go 7600 .*NVIDIA .*GeForce Go 76.* 2 1 -NVIDIA GeForce Go 7700 .*NVIDIA .*GeForce Go 77.* 2 1 -NVIDIA GeForce Go 7800 .*NVIDIA .*GeForce Go 78.* 2 1 -NVIDIA GeForce Go 7900 .*NVIDIA .*GeForce Go 79.* 2 1 -NVIDIA D9M .*NVIDIA .*D9M.* 1 1 -NVIDIA G94 .*NVIDIA .*G94.* 3 1 -NVIDIA GeForce Go 6 .*GeForce Go 6.* 1 1 -NVIDIA ION 2 .*NVIDIA .*ION 2.* 2 1 -NVIDIA ION .*NVIDIA .*ION.* 2 1 -NVIDIA NB8M .*NVIDIA .*NB8M.* 1 1 -NVIDIA NB8P .*NVIDIA .*NB8P.* 2 1 -NVIDIA NB9E .*NVIDIA .*NB9E.* 3 1 -NVIDIA NB9M .*NVIDIA .*NB9M.* 1 1 -NVIDIA NB9P .*NVIDIA .*NB9P.* 2 1 -NVIDIA N10 .*NVIDIA .*N10.* 1 1 -NVIDIA GeForce PCX .*GeForce PCX.* 0 1 -NVIDIA Generic .*NVIDIA .*Unknown.* 0 0 -NVIDIA NV17 .*NVIDIA .*NV17.* 0 1 -NVIDIA NV34 .*NVIDIA .*NV34.* 0 1 -NVIDIA NV35 .*NVIDIA .*NV35.* 0 1 -NVIDIA NV36 .*NVIDIA .*NV36.* 1 1 -NVIDIA NV41 .*NVIDIA .*NV41.* 1 1 -NVIDIA NV43 .*NVIDIA .*NV43.* 1 1 -NVIDIA NV44 .*NVIDIA .*NV44.* 1 1 -NVIDIA nForce .*NVIDIA .*nForce.* 0 0 -NVIDIA MCP51 .*NVIDIA .*MCP51.* 1 1 -NVIDIA MCP61 .*NVIDIA .*MCP61.* 1 1 -NVIDIA MCP67 .*NVIDIA .*MCP67.* 1 1 -NVIDIA MCP68 .*NVIDIA .*MCP68.* 1 1 -NVIDIA MCP73 .*NVIDIA .*MCP73.* 1 1 -NVIDIA MCP77 .*NVIDIA .*MCP77.* 1 1 -NVIDIA MCP78 .*NVIDIA .*MCP78.* 1 1 -NVIDIA MCP79 .*NVIDIA .*MCP79.* 1 1 -NVIDIA MCP7A .*NVIDIA .*MCP7A.* 1 1 -NVIDIA Quadro2 .*Quadro2.* 0 1 -NVIDIA Quadro 1000M .*Quadro.*1000M.* 2 1 -NVIDIA Quadro 2000 M/D .*Quadro.*2000.* 3 1 -NVIDIA Quadro 3000M .*Quadro.*3000M.* 3 1 -NVIDIA Quadro 4000M .*Quadro.*4000M.* 3 1 -NVIDIA Quadro 4000 .*Quadro *4000.* 3 1 -NVIDIA Quadro 50x0 M .*Quadro.*50.0.* 3 1 -NVIDIA Quadro 6000 .*Quadro.*6000.* 3 1 -NVIDIA Quadro 400 .*Quadro.*400.* 2 1 -NVIDIA Quadro 600 .*Quadro.*600.* 2 1 -NVIDIA Quadro4 .*Quadro4.* 0 1 -NVIDIA Quadro DCC .*Quadro DCC.* 0 1 -NVIDIA Quadro CX .*Quadro.*CX.* 3 1 -NVIDIA Quadro FX 770M .*Quadro.*FX *770M.* 2 1 -NVIDIA Quadro FX 1500M .*Quadro.*FX *1500M.* 1 1 -NVIDIA Quadro FX 1600M .*Quadro.*FX *1600M.* 2 1 -NVIDIA Quadro FX 2500M .*Quadro.*FX *2500M.* 2 1 -NVIDIA Quadro FX 2700M .*Quadro.*FX *2700M.* 3 1 -NVIDIA Quadro FX 2800M .*Quadro.*FX *2800M.* 3 1 -NVIDIA Quadro FX 3500 .*Quadro.*FX *3500.* 2 1 -NVIDIA Quadro FX 3600 .*Quadro.*FX *3600.* 3 1 -NVIDIA Quadro FX 3700 .*Quadro.*FX *3700.* 3 1 -NVIDIA Quadro FX 3800 .*Quadro.*FX *3800.* 3 1 -NVIDIA Quadro FX 4500 .*Quadro.*FX *45.* 3 1 -NVIDIA Quadro FX 880M .*Quadro.*FX *880M.* 3 1 -NVIDIA Quadro FX 4800 .*NVIDIA .*Quadro *FX *4800.* 3 1 -NVIDIA Quadro FX .*Quadro FX.* 1 1 -NVIDIA Quadro NVS 1xxM .*Quadro NVS *1.[05]M.* 0 1 -NVIDIA Quadro NVS 300M .*NVIDIA .*NVS *300M.* 2 1 -NVIDIA Quadro NVS 320M .*NVIDIA .*NVS *320M.* 2 1 -NVIDIA Quadro NVS 2100M .*NVIDIA .*NVS *2100M.* 2 1 -NVIDIA Quadro NVS 3100M .*NVIDIA .*NVS *3100M.* 2 1 -NVIDIA Quadro NVS 4200M .*NVIDIA .*NVS *4200M.* 2 1 -NVIDIA Quadro NVS 5100M .*NVIDIA .*NVS *5100M.* 2 1 -NVIDIA Quadro NVS .*NVIDIA .*NVS 0 1 -NVIDIA RIVA TNT .*RIVA TNT.* 0 0 -S3 .*S3 Graphics.* 0 0 -SiS SiS.* 0 0 -Trident Trident.* 0 0 -Tungsten Graphics Tungsten.* 0 0 -XGI XGI.* 0 0 -VIA VIA.* 0 0 -Apple Generic Apple.*Generic.* 0 0 -Apple Software Renderer Apple.*Software Renderer.* 0 0 -Humper Humper.* 0 1 +3Dfx .*3Dfx.* 0 0 0 0 +3Dlabs .*3Dlabs.* 0 0 0 0 +ATI 3D-Analyze .*ATI.*3D-Analyze.* 0 0 0 0 +ATI All-in-Wonder 7500 .*ATI.*All-in-Wonder 75.* 0 1 0 0 +ATI All-in-Wonder 8500 .*ATI.*All-in-Wonder 85.* 0 1 0 0 +ATI All-in-Wonder 9200 .*ATI.*All-in-Wonder 92.* 0 1 0 0 +ATI All-in-Wonder 9xxx .*ATI.*All-in-Wonder 9.* 1 1 0 0 +ATI All-in-Wonder HD .*ATI.*All-in-Wonder HD.* 1 1 1 3.3 +ATI All-in-Wonder X600 .*ATI.*All-in-Wonder X6.* 1 1 0 0 +ATI All-in-Wonder X800 .*ATI.*All-in-Wonder X8.* 1 1 1 2.1 +ATI All-in-Wonder X1800 .*ATI.*All-in-Wonder X18.* 3 1 0 0 +ATI All-in-Wonder X1900 .*ATI.*All-in-Wonder X19.* 3 1 0 0 +ATI All-in-Wonder PCI-E .*ATI.*All-in-Wonder.*PCI-E.* 1 1 0 0 +ATI All-in-Wonder Radeon .*ATI.*All-in-Wonder Radeon.* 0 1 0 0 +ATI ASUS ARES .*ATI.*ASUS.*ARES.* 3 1 0 0 +ATI ASUS A9xxx .*ATI.*ASUS.*A9.* 1 1 0 0 +ATI ASUS AH24xx .*ATI.*ASUS.*AH24.* 1 1 1 3.3 +ATI ASUS AH26xx .*ATI.*ASUS.*AH26.* 1 1 1 3.3 +ATI ASUS AH34xx .*ATI.*ASUS.*AH34.* 1 1 1 3.3 +ATI ASUS AH36xx .*ATI.*ASUS.*AH36.* 1 1 1 3.3 +ATI ASUS AH46xx .*ATI.*ASUS.*AH46.* 2 1 1 3.3 +ATI ASUS AX3xx .*ATI.*ASUS.*AX3.* 1 1 0 0 +ATI ASUS AX5xx .*ATI.*ASUS.*AX5.* 1 1 0 0 +ATI ASUS AX8xx .*ATI.*ASUS.*AX8.* 2 1 0 0 +ATI ASUS EAH24xx .*ATI.*ASUS.*EAH24.* 2 1 0 0 +ATI ASUS EAH26xx .*ATI.*ASUS.*EAH26.* 3 1 0 0 +ATI ASUS EAH29xx .*ATI.*ASUS.*EAH29.* 3 1 0 0 +ATI ASUS EAH34xx .*ATI.*ASUS.*EAH34.* 1 1 0 0 +ATI ASUS EAH36xx .*ATI.*ASUS.*EAH36.* 2 1 0 0 +ATI ASUS EAH38xx .*ATI.*ASUS.*EAH38.* 2 1 1 3.3 +ATI ASUS EAH43xx .*ATI.*ASUS.*EAH43.* 2 1 1 3.3 +ATI ASUS EAH45xx .*ATI.*ASUS.*EAH45.* 2 1 0 0 +ATI ASUS EAH48xx .*ATI.*ASUS.*EAH48.* 3 1 1 3.3 +ATI ASUS EAH57xx .*ATI.*ASUS.*EAH57.* 3 1 1 4.1 +ATI ASUS EAH58xx .*ATI.*ASUS.*EAH58.* 5 1 1 4.1 +ATI ASUS EAH62xx .*ATI.*ASUS.*EAH62.* 2 1 0 0 +ATI ASUS EAH63xx .*ATI.*ASUS.*EAH63.* 2 1 0 0 +ATI ASUS EAH64xx .*ATI.*ASUS.*EAH64.* 2 1 0 0 +ATI ASUS EAH65xx .*ATI.*ASUS.*EAH65.* 2 1 0 4.1 +ATI ASUS EAH66xx .*ATI.*ASUS.*EAH66.* 3 1 0 4.1 +ATI ASUS EAH67xx .*ATI.*ASUS.*EAH67.* 3 1 0 0 +ATI ASUS EAH68xx .*ATI.*ASUS.*EAH68.* 5 1 0 4 +ATI ASUS EAH69xx .*ATI.*ASUS.*EAH69.* 5 1 0 4.1 +ATI ASUS Radeon X1xxx .*ATI.*ASUS.*X1.* 2 1 1 2.1 +ATI Radeon X7xx .*ATI.*ASUS.*X7.* 1 1 0 0 +ATI Radeon X19xx .*ATI.*(Radeon|Diamond) X19.* ?.* 2 1 1 2.1 +ATI Radeon X18xx .*ATI.*(Radeon|Diamond) X18.* ?.* 3 1 1 2.1 +ATI Radeon X17xx .*ATI.*(Radeon|Diamond) X17.* ?.* 1 1 1 2.1 +ATI Radeon X16xx .*ATI.*(Radeon|Diamond) X16.* ?.* 1 1 1 2.1 +ATI Radeon X15xx .*ATI.*(Radeon|Diamond) X15.* ?.* 1 1 1 2.1 +ATI Radeon X13xx .*ATI.*(Radeon|Diamond) X13.* ?.* 1 1 1 2.1 +ATI Radeon X1xxx .*ATI.*(Radeon|Diamond) X1.. ?.* 0 1 1 2.1 +ATI Radeon X2xxx .*ATI.*(Radeon|Diamond) X2.. ?.* 1 1 1 2.1 +ATI Display Adapter .*ATI.*display adapter.* 1 1 1 4.1 +ATI FireGL 5200 .*ATI.*FireGL V52.* 1 1 1 2.1 +ATI FireGL 5xxx .*ATI.*FireGL V5.* 2 1 1 3.3 +ATI FireGL .*ATI.*Fire.*GL.* 4 1 1 4.2 +ATI FirePro M3900 .*ATI.*FirePro.*M39.* 2 1 0 0 +ATI FirePro M5800 .*ATI.*FirePro.*M58.* 3 1 0 0 +ATI FirePro M7740 .*ATI.*FirePro.*M77.* 3 1 0 0 +ATI FirePro M7820 .*ATI.*FirePro.*M78.* 5 1 1 4.2 +ATI FireMV .*ATI.*FireMV.* 0 1 1 1.3 +ATI Generic .*ATI.*Generic.* 0 0 0 0 +ATI Hercules 9800 .*ATI.*Hercules.*9800.* 1 1 0 0 +ATI IGP 340M .*ATI.*IGP.*340M.* 0 0 0 0 +ATI M52 .*ATI.*M52.* 1 1 0 0 +ATI M54 .*ATI.*M54.* 1 1 0 0 +ATI M56 .*ATI.*M56.* 1 1 0 0 +ATI M71 .*ATI.*M71.* 1 1 0 0 +ATI M72 .*ATI.*M72.* 1 1 0 0 +ATI M76 .*ATI.*M76.* 3 1 0 0 +ATI Radeon HD 64xx .*ATI.*AMD Radeon.* HD [67]4..[MG] 2 1 1 4.2 +ATI Radeon HD 65xx .*ATI.*AMD Radeon.* HD [67]5..[MG] 2 1 1 4.2 +ATI Radeon HD 66xx .*ATI.*AMD Radeon.* HD [67]6..[MG] 3 1 1 4.2 +ATI Radeon HD 7100 .*ATI.*AMD Radeon.* HD 71.* 2 1 0 0 +ATI Radeon HD 7200 .*ATI.*AMD Radeon.* HD 72.* 2 1 0 0 +ATI Radeon HD 7300 .*ATI.*AMD Radeon.* HD 73.* 2 1 0 4.2 +ATI Radeon HD 7400 .*ATI.*AMD Radeon.* HD 74.* 2 1 0 4.2 +ATI Radeon HD 7500 .*ATI.*AMD Radeon.* HD 75.* 3 1 1 4.2 +ATI Radeon HD 7600 .*ATI.*AMD Radeon.* HD 76.* 3 1 0 4.2 +ATI Radeon HD 7700 .*ATI.*AMD Radeon.* HD 77.* 4 1 1 4.2 +ATI Radeon HD 7800 .*ATI.*AMD Radeon.* HD 78.* 5 1 1 4.2 +ATI Radeon HD 7900 .*ATI.*AMD Radeon.* HD 79.* 5 1 1 4.2 +ATI ASUS HD7100 .*ATI.*ASUS.* HD71.* 2 1 0 0 +ATI ASUS HD7200 .*ATI.*ASUS.* HD72.* 2 1 0 0 +ATI ASUS HD7300 .*ATI.*ASUS.* HD73.* 2 1 0 0 +ATI ASUS HD7400 .*ATI.*ASUS.* HD74.* 2 1 0 0 +ATI ASUS HD7500 .*ATI.*ASUS.* HD75.* 3 1 1 4.2 +ATI ASUS HD7600 .*ATI.*ASUS.* HD76.* 3 1 0 0 +ATI ASUS HD7700 .*ATI.*ASUS.* HD77.* 4 1 1 4.2 +ATI ASUS HD7800 .*ATI.*ASUS.* HD78.* 5 1 1 4.2 +ATI ASUS HD7900 .*ATI.*ASUS.* HD79.* 5 1 1 4.2 +ATI Mobility Radeon 4100 .*ATI.*Mobility.*41.. 1 1 1 3.3 +ATI Mobility Radeon 7xxx .*ATI.*Mobility.*Radeon 7.* 0 1 1 1.3 +ATI Mobility Radeon 8xxx .*ATI.*Mobility.*Radeon 8.* 0 1 0 0 +ATI Mobility Radeon 9800 .*ATI.*Mobility.*98.* 1 1 0 0 +ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 0 1 1 2.1 +ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 1 1 1 2.1 +ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD *530v.* 1 1 1 3.3 +ATI Mobility Radeon HD 540v .*ATI.*Mobility.*HD *540v.* 1 1 1 3.3 +ATI Mobility Radeon HD 545v .*ATI.*Mobility.*HD *545v.* 2 1 1 4 +ATI Mobility Radeon HD 550v .*ATI.*Mobility.*HD *550v.* 3 1 1 4 +ATI Mobility Radeon HD 560v .*ATI.*Mobility.*HD *560v.* 3 1 1 3.2 +ATI Mobility Radeon HD 565v .*ATI.*Mobility.*HD *565v.* 3 1 1 3.3 +ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD *23.* 0 1 1 2.1 +ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD *24.* 1 1 1 3.3 +ATI Mobility Radeon HD 2600 .*ATI.*Mobility.*HD *26.* 1 1 1 3.3 +ATI Mobility Radeon HD 2700 .*ATI.*Mobility.*HD *27.* 3 1 0 0 +ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD *31.* 0 1 0 0 +ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD *32.* 0 1 0 0 +ATI Mobility Radeon HD 3400 .*ATI.*Mobility.*HD *34.* 1 1 1 3.3 +ATI Mobility Radeon HD 3600 .*ATI.*Mobility.*HD *36.* 1 1 1 4 +ATI Mobility Radeon HD 3800 .*ATI.*Mobility.*HD *38.* 3 1 1 3.3 +ATI Mobility Radeon HD 4200 .*ATI.*Mobility.*HD *42.* 1 1 1 4 +ATI Mobility Radeon HD 4300 .*ATI.*Mobility.*HD *43.* 1 1 1 4 +ATI Mobility Radeon HD 4500 .*ATI.*Mobility.*HD *45.* 1 1 1 4 +ATI Mobility Radeon HD 4600 .*ATI.*Mobility.*HD *46.* 2 1 1 3.3 +ATI Mobility Radeon HD 4800 .*ATI.*Mobility.*HD *48.* 3 1 1 3.3 +ATI Mobility Radeon HD 5100 .*ATI.*Mobility.*HD *51.* 3 1 1 3.2 +ATI Mobility Radeon HD 5300 .*ATI.*Mobility.*HD *53.* 3 1 0 0 +ATI Mobility Radeon HD 5400 .*ATI.*Mobility.*HD *54.* 2 1 1 4.2 +ATI Mobility Radeon HD 5500 .*ATI.*Mobility.*HD *55.* 3 1 0 0 +ATI Mobility Radeon HD 5600 .*ATI.*Mobility.*HD *56.* 3 1 1 4.2 +ATI Mobility Radeon HD 5700 .*ATI.*Mobility.*HD *57.* 3 1 1 4.1 +ATI Mobility Radeon HD 6200 .*ATI.*Mobility.*HD *62.* 3 1 0 0 +ATI Mobility Radeon HD 6300 .*ATI.*Mobility.*HD *63.* 3 1 1 4.2 +ATI Mobility Radeon HD 6400M .*ATI.*Mobility.*HD *64.* 3 1 0 0 +ATI Mobility Radeon HD 6500M .*ATI.*Mobility.*HD *65.* 5 1 1 4.2 +ATI Mobility Radeon HD 6600M .*ATI.*Mobility.*HD *66.* 5 1 0 0 +ATI Mobility Radeon HD 6700M .*ATI.*Mobility.*HD *67.* 5 1 0 0 +ATI Mobility Radeon HD 6800M .*ATI.*Mobility.*HD *68.* 5 1 0 0 +ATI Mobility Radeon HD 6900M .*ATI.*Mobility.*HD *69.* 5 1 0 0 +ATI Radeon HD 2300 .*ATI.*Radeon HD *23.. 0 1 1 3.3 +ATI Radeon HD 2400 .*ATI.*Radeon HD *24.. 1 1 1 4 +ATI Radeon HD 2600 .*ATI.*Radeon HD *26.. 2 1 1 3.3 +ATI Radeon HD 2900 .*ATI.*Radeon HD *29.. 3 1 1 3.3 +ATI Radeon HD 3000 .*ATI.*Radeon HD *30.. 0 1 0 0 +ATI Radeon HD 3100 .*ATI.*Radeon HD *31.. 1 1 0 0 +ATI Radeon HD 3200 .*ATI.*Radeon HD *32.. 1 1 1 4 +ATI Radeon HD 3300 .*ATI.*Radeon HD *33.. 1 1 1 3.3 +ATI Radeon HD 3400 .*ATI.*Radeon HD *34.. 1 1 1 4 +ATI Radeon HD 3500 .*ATI.*Radeon HD *35.. 2 1 0 0 +ATI Radeon HD 3600 .*ATI.*Radeon HD *36.. 3 1 1 3.3 +ATI Radeon HD 3700 .*ATI.*Radeon HD *37.. 3 1 0 0 +ATI HD3700 .*ATI.* HD37.. 3 1 0 3.3 +ATI Radeon HD 3800 .*ATI.*Radeon HD *38.. 3 1 1 4 +ATI Radeon HD 4100 .*ATI.*Radeon HD *41.. 1 1 0 0 +ATI Radeon HD 4200 .*ATI.*Radeon HD *42.. 1 1 1 4 +ATI Radeon HD 4300 .*ATI.*Radeon HD *43.. 2 1 1 4 +ATI Radeon HD 4400 .*ATI.*Radeon HD *44.. 2 1 0 0 +ATI Radeon HD 4500 .*ATI.*Radeon HD *45.. 2 1 1 3.3 +ATI Radeon HD 4600 .*ATI.*Radeon HD *46.. 3 1 1 4 +ATI Radeon HD 4700 .*ATI.*Radeon HD *47.. 3 1 1 3.3 +ATI Radeon HD 4800 .*ATI.*Radeon HD *48.. 3 1 1 4 +ATI ASUS EAH5400 .*ATI.*ASUS EAH54.. 3 1 1 4.2 +ATI Radeon HD 5400 .*ATI.*Radeon HD *54.. 3 1 1 4.2 +ATI Radeon HD 5500 .*ATI.*Radeon HD *55.. 3 1 1 4.2 +ATI ASUS EAH5500 .*ATI.*ASUS EAH55.. 3 1 1 4.2 +ATI Radeon HD 5600 .*ATI.*Radeon HD *56.. 3 1 1 4.2 +ATI Radeon HD 5700 .*ATI.*Radeon HD *57.. 3 1 1 4.2 +ATI Radeon HD 5800 .*ATI.*Radeon HD *58.. 4 1 1 4.2 +ATI Radeon HD 5900 .*ATI.*Radeon HD *59.. 4 1 1 4.2 +ATI Radeon HD 6200 .*ATI.*Radeon HD *62.. 0 1 1 4.2 +ATI Radeon HD 6300 .*ATI.*Radeon HD *63.. 1 1 1 4.2 +ATI Radeon HD 6400 .*ATI.*Radeon HD *64.. 3 1 1 4.2 +ATI Radeon HD 6500 .*ATI.*Radeon HD *65.. 3 1 1 4.2 +ATI Radeon HD 6600 .*ATI.*Radeon HD *66.. 3 1 1 4.2 +ATI Radeon HD 6700 .*ATI.*Radeon HD *67.. 3 1 1 4.2 +ATI Radeon HD 6800 .*ATI.*Radeon HD *68.. 4 1 1 4.2 +ATI Radeon HD 6900 .*ATI.*Radeon HD *69.. 5 1 1 4.2 +ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 0 0 0 0 +ATI Radeon 2100 .*ATI.*Radeon 21.. 0 1 1 2.1 +ATI Radeon 3000 .*ATI.*Radeon 30.. 1 1 1 4 +ATI Radeon 3100 .*ATI.*Radeon 31.. 0 1 1 3.3 +ATI Radeon 5xxx .*ATI.*Radeon 5... 3 1 0 0 +ATI Radeon 7xxx .*ATI.*Radeon 7... 0 1 1 2 +ATI Radeon 8xxx .*ATI.*Radeon 8... 0 1 0 0 +ATI Radeon 9000 .*ATI.*Radeon 90.. 0 1 1 1.3 +ATI Radeon 9100 .*ATI.*Radeon 91.. 0 1 0 0 +ATI Radeon 9200 .*ATI.*Radeon 92.. 0 1 1 1.3 +ATI Radeon 9500 .*ATI.*Radeon 95.. 0 1 1 2.1 +ATI Radeon 9600 .*ATI.*Radeon 96.. 0 1 1 2.1 +ATI Radeon 9700 .*ATI.*Radeon 97.. 1 1 0 0 +ATI Radeon 9800 .*ATI.*Radeon 98.. 1 1 1 2.1 +ATI Radeon RV250 .*ATI.*RV250.* 0 1 0 0 +ATI Radeon RV600 .*ATI.*RV6.* 1 1 0 0 +ATI Radeon RX700 .*ATI.*RX70.* 1 1 0 0 +ATI Radeon RX800 .*ATI.*Radeon *RX80.* 2 1 0 0 +ATI RS880M .*ATI.*RS880M 1 1 0 0 +ATI Radeon RX9550 .*ATI.*RX9550.* 1 1 0 0 +ATI Radeon VE .*ATI.*Radeon.*VE.* 0 0 0 0 +ATI Radeon X300 .*ATI.*Radeon *X3.* 1 1 1 2.1 +ATI Radeon X400 .*ATI.*Radeon ?X4.* 0 1 0 0 +ATI Radeon X500 .*ATI.*Radeon ?X5.* 1 1 1 2.1 +ATI Radeon X600 .*ATI.*Radeon ?X6.* 1 1 1 2.1 +ATI Radeon X700 .*ATI.*Radeon ?X7.* 2 1 1 2.1 +ATI Radeon X800 .*ATI.*Radeon ?X8.* 1 1 1 2.1 +ATI Radeon X900 .*ATI.*Radeon ?X9.* 2 1 0 0 +ATI Radeon Xpress .*ATI.*Radeon Xpress.* 0 1 1 2.1 +ATI Rage 128 .*ATI.*Rage 128.* 0 1 0 0 +ATI R300 (9700) .*R300.* 0 1 1 2.1 +ATI R350 (9800) .*R350.* 1 1 0 0 +ATI R580 (X1900) .*R580.* 3 1 0 0 +ATI RC410 (Xpress 200) .*RC410.* 0 0 0 0 +ATI RS48x (Xpress 200x) .*RS48.* 0 0 0 0 +ATI RS600 (Xpress 3200) .*RS600.* 0 0 0 0 +ATI RV350 (9600) .*RV350.* 0 1 0 0 +ATI RV370 (X300) .*RV370.* 0 1 0 0 +ATI RV410 (X700) .*RV410.* 1 1 0 0 +ATI RV515 .*RV515.* 1 1 0 0 +ATI RV570 (X1900 GT/PRO) .*RV570.* 3 1 0 0 +ATI RV380 .*RV380.* 0 1 0 0 +ATI RV530 .*RV530.* 1 1 0 0 +ATI RX480 (Xpress 200P) .*RX480.* 0 1 0 0 +ATI RX700 .*RX700.* 1 1 0 0 +AMD ANTILLES (HD 6990) .*(AMD|ATI).*Antilles.* 3 1 0 0 +AMD BARTS (HD 6800) .*(AMD|ATI).*Barts.* 3 1 1 2.1 +AMD CAICOS (HD 6400) .*(AMD|ATI).*Caicos.* 3 1 0 0 +AMD CAYMAN (HD 6900) .*(AMD|ATI).*(Cayman|CAYMAM).* 3 1 0 0 +AMD CEDAR (HD 5450) .*(AMD|ATI).*Cedar.* 2 1 0 0 +AMD CYPRESS (HD 5800) .*(AMD|ATI).*Cypress.* 3 1 0 0 +AMD HEMLOCK (HD 5970) .*(AMD|ATI).*Hemlock.* 3 1 0 0 +AMD JUNIPER (HD 5700) .*(AMD|ATI).*Juniper.* 3 1 0 0 +AMD PARK .*(AMD|ATI).*Park.* 3 1 0 0 +AMD REDWOOD (HD 5500/5600) .*(AMD|ATI).*Redwood.* 3 1 0 0 +AMD TURKS (HD 6500/6600) .*(AMD|ATI).*Turks.* 3 1 0 0 +AMD RS780 (HD 3200) .*RS780.* 0 1 1 2.1 +AMD RS880 (HD 4200) .*RS880.* 0 1 1 3.2 +AMD RV610 (HD 2400) .*RV610.* 1 1 0 0 +AMD RV620 (HD 3400) .*RV620.* 1 1 0 0 +AMD RV630 (HD 2600) .*RV630.* 2 1 0 0 +AMD RV635 (HD 3600) .*RV635.* 3 1 0 0 +AMD RV670 (HD 3800) .*RV670.* 3 1 0 0 +AMD R680 (HD 3870 X2) .*R680.* 3 1 0 0 +AMD R700 (HD 4800 X2) .*R700.* 3 1 0 0 +AMD RV710 (HD 4300) .*RV710.* 0 1 1 1.4 +AMD RV730 (HD 4600) .*RV730.* 3 1 0 0 +AMD RV740 (HD 4700) .*RV740.* 3 1 0 0 +AMD RV770 (HD 4800) .*RV770.* 3 1 0 0 +AMD RV790 (HD 4800) .*RV790.* 3 1 0 0 +ATI 760G/Radeon 3000 .*ATI.*AMD 760G.* 1 1 1 3.3 +ATI 780L/Radeon 3000 .*ATI.*AMD 780L.* 1 1 0 0 +ATI Radeon DDR .*ATI.*Radeon ?DDR.* 0 1 0 0 +ATI FirePro 2000 .*ATI.*FirePro 2.* 2 1 1 4.1 +ATI FirePro 3000 .*ATI.*FirePro V3.* 2 1 0 0 +ATI FirePro 4000 .*ATI.*FirePro V4.* 2 1 0 0 +ATI FirePro 5000 .*ATI.*FirePro V5.* 3 1 0 0 +ATI FirePro 7000 .*ATI.*FirePro V7.* 3 1 0 0 +ATI FirePro M .*ATI.*FirePro M.* 3 1 1 4.2 +ATI R300 (9700) .*R300.* 0 1 1 2.1 +ATI Radeon .*ATI.*(Diamond|Radeon).* 0 1 0 4.2 +Intel X3100 .*Intel.*X3100.* 1 1 1 2.1 +Intel GMA 3600 .*Intel.* 3600.* 0 1 1 3 +Intel 830M .*Intel.*830M 0 0 0 0 +Intel 845G .*Intel.*845G 0 0 1 1.4 +Intel 855GM .*Intel.*855GM 0 0 1 1.4 +Intel 865G .*Intel.*865G 0 0 1 1.4 +Intel 900 .*Intel.*900.*900 0 0 0 0 +Intel 915GM .*Intel.*915GM 0 0 1 1.4 +Intel 915G .*Intel.*915G 0 0 1 1.4 +Intel 945GM .*Intel.*945GM.* 0 1 1 1.4 +Intel 945G .*Intel.*945G.* 0 1 1 1.4 +Intel 950 .*Intel.*950.* 0 1 1 1.4 +Intel 965 .*Intel.*965.* 0 1 1 2.1 +Intel G33 .*Intel.*G33.* 1 0 1 1.4 +Intel G41 .*Intel.*G41.* 1 1 1 2.1 +Intel G45 .*Intel.*G45.* 1 1 1 2.1 +Intel Bear Lake .*Intel.*Bear Lake.* 1 0 1 1.4 +Intel Broadwater .*Intel.*Broadwater.* 0 0 1 1.4 +Intel Brookdale .*Intel.*Brookdale.* 0 0 1 1.3 +Intel Cantiga .*Intel.*Cantiga.* 0 0 1 2 +Intel Eaglelake .*Intel.*Eaglelake.* 1 1 1 2 +Intel Graphics Media HD .*Intel.*Graphics Media.*HD.* 1 1 1 2.1 +Intel HD Graphics 2000 .*Intel.*HD Graphics 2.* 2 1 0 4 +Intel HD Graphics 3000 .*Intel.*HD Graphics 3.* 3 1 1 3.1 +Intel HD Graphics 4000 .*Intel.*HD Graphics 4.* 3 1 1 4 +Intel HD2000 .*Intel.*HD2000.* 2 1 0 0 +Intel HD3000 .*Intel.*HD3000.* 3 1 0 0 +Intel HD Graphics .*Intel.*HD Graphics.* 2 1 1 4 +Intel Mobile 4 Series .*Intel.*Mobile.* 4 Series.* 0 1 1 2.1 +Intel 4 Series Internal .*Intel.* 4 Series Internal.* 1 1 1 2.1 +Intel Media Graphics HD .*Intel.*Media Graphics HD.* 0 1 0 0 +Intel Montara .*Intel.*Montara.* 0 0 1 1.3 +Intel Pineview .*Intel.*Pineview.* 0 1 1 1.4 +Intel Springdale .*Intel.*Springdale.* 0 0 1 1.3 +Intel Grantsdale .*Intel.*Grantsdale.* 1 1 0 0 +Intel Q45/Q43 .*Intel.*Q4.* 1 1 1 2.1 +Intel B45/B43 .*Intel.*B4.* 1 1 1 2.1 +Intel 3D-Analyze .*Intel.*3D-Analyze.* 2 1 0 0 +Matrox .*Matrox.* 0 0 0 0 +Mesa .*Mesa.* 1 0 1 2.1 +Gallium .*Gallium.* 1 1 1 2.1 +NVIDIA G100M .*NVIDIA .*100M.* 4 1 1 3.3 +NVIDIA G102M .*NVIDIA .*102M.* 1 1 1 3.3 +NVIDIA G103M .*NVIDIA .*103M.* 2 1 1 3.3 +NVIDIA G105M .*NVIDIA .*105M.* 2 1 1 3.3 +NVIDIA G 110M .*NVIDIA .*110M.* 1 1 1 3.3 +NVIDIA G 120M .*NVIDIA .*120M.* 1 1 1 3.3 +NVIDIA G 205M .*NVIDIA .*205M.* 1 1 0 0 +NVIDIA G 410M .*NVIDIA .*410M.* 3 1 1 4.2 +NVIDIA GT 120M .*NVIDIA .*GT *12*M.* 3 1 1 3.3 +NVIDIA GT 130M .*NVIDIA .*GT *13*M.* 3 1 1 3.3 +NVIDIA GT 140M .*NVIDIA .*GT *14*M.* 3 1 1 3.3 +NVIDIA GT 150M .*NVIDIA .*GTS *15*M.* 2 1 0 0 +NVIDIA GTS 160M .*NVIDIA .*GTS *16*M.* 2 1 0 0 +NVIDIA G210M .*NVIDIA .*G21*M.* 3 1 0 0 +NVIDIA GT 220M .*NVIDIA .*GT *22*M.* 3 1 1 3.3 +NVIDIA GT 230M .*NVIDIA .*GT *23*M.* 3 1 1 3.3 +NVIDIA GT 240M .*NVIDIA .*GT *24*M.* 3 1 1 3.3 +NVIDIA GTS 250M .*NVIDIA .*GTS *25*M.* 3 1 0 0 +NVIDIA GTS 260M .*NVIDIA .*GTS *26*M.* 3 1 0 0 +NVIDIA GTX 260M .*NVIDIA .*GTX *26*M.* 3 1 0 0 +NVIDIA GTX 270M .*NVIDIA .*GTX *27*M.* 3 1 0 0 +NVIDIA GTX 280M .*NVIDIA .*GTX *28*M.* 3 1 0 0 +NVIDIA 300M .*NVIDIA .*30*M.* 3 1 1 4.2 +NVIDIA G 310M .*NVIDIA .*31*M.* 2 1 0 0 +NVIDIA GT 320M .*NVIDIA .*GT *32*M.* 3 1 0 0 +NVIDIA GT 325M .*NVIDIA .*GT *32*M.* 3 1 1 3.3 +NVIDIA GT 330M .*NVIDIA .*GT *33*M.* 3 1 1 3.3 +NVIDIA GT 340M .*NVIDIA .*GT *34*M.* 4 1 1 3.3 +NVIDIA GTS 350M .*NVIDIA .*GTS *35*M.* 4 1 1 3.3 +NVIDIA GTS 360M .*NVIDIA .*GTS *360M.* 5 1 1 3.3 +NVIDIA 405M .*NVIDIA .* 40*M.* 2 1 0 4.2 +NVIDIA 410M .*NVIDIA .* 41*M.* 3 1 0 0 +NVIDIA GT 415M .*NVIDIA .*GT *41*M.* 3 1 1 4.2 +NVIDIA GT 420M .*NVIDIA .*GT *42*M.* 3 1 1 4.2 +NVIDIA GT 430M .*NVIDIA .*GT *43*M.* 3 1 1 4.2 +NVIDIA GT 440M .*NVIDIA .*GT *44*M.* 3 1 1 4.2 +NVIDIA GT 450M .*NVIDIA .*GT *45*M.* 3 1 0 0 +NVIDIA GTX 460M .*NVIDIA .*GTX *46*M.* 4 1 1 4.2 +NVIDIA GTX 470M .*NVIDIA .*GTX *47*M.* 3 1 0 0 +NVIDIA GTX 480M .*NVIDIA .*GTX *48*M.* 3 1 1 4.2 +NVIDIA GT 520M .*NVIDIA .*GT *52*M.* 3 1 1 4.2 +NVIDIA GT 530M .*NVIDIA .*GT *53*M.* 3 1 1 4.2 +NVIDIA GT 540M .*NVIDIA .*GT *54*M.* 3 1 1 4.2 +NVIDIA GT 550M .*NVIDIA .*GT *55*M.* 3 1 1 4.2 +NVIDIA GTX 560M .*NVIDIA .*GTX *56*M.* 3 1 0 0 +NVIDIA GTX 570M .*NVIDIA .*GTX *57*M.* 5 1 0 0 +NVIDIA GTX 580M .*NVIDIA .*GTX *58*M.* 5 1 1 4.2 +NVIDIA 610M .*NVIDIA.* 61*M.* 3 1 1 4.2 +NVIDIA GT 620M .*NVIDIA .*GT *62*M.* 3 1 0 0 +NVIDIA GT 630M .*NVIDIA .*GT *63*M.* 3 1 0 0 +NVIDIA GT 640M .*NVIDIA .*GT *64*M.* 3 1 0 0 +NVIDIA GT 650M .*NVIDIA .*GT *65*M.* 3 1 0 0 +NVIDIA GTX 660M .*NVIDIA .*GTX *66*M.* 5 1 0 0 +NVIDIA GTX 670M .*NVIDIA .*GTX *67*M.* 5 1 1 4.2 +NVIDIA GTX 680M .*NVIDIA .*GTX *68*M.* 5 1 0 0 +NVIDIA GTX 690M .*NVIDIA .*GTX *69*M.* 5 1 0 0 +NVIDIA G100 .*NVIDIA .*G10.* 3 1 1 4.2 +NVIDIA GT 120 .*NVIDIA .*GT *12.* 2 1 0 3 +NVIDIA GT 130 .*NVIDIA .*GT *13.* 2 1 0 3.3 +NVIDIA GTS 150 .*NVIDIA .*GTS *15.* 2 1 0 0 +NVIDIA 200 .*NVIDIA .*GeForce 20.* 2 1 1 3.3 +NVIDIA G200 .*NVIDIA .*GeForce G20.* 2 1 1 3.3 +NVIDIA G210 .*NVIDIA .*GeForce G210.* 3 1 1 3.3 +NVIDIA 210 .*NVIDIA .*GeForce 210.* 3 1 1 3.3 +NVIDIA GT 220 .*NVIDIA .*GT *22.* 2 1 1 3.3 +NVIDIA GT 230 .*NVIDIA .*GT *23.* 2 1 1 3.3 +NVIDIA GT 240 .*NVIDIA .*GT *24.* 4 1 1 3.3 +NVIDIA GTS 240 .*NVIDIA .*GTS *24.* 4 1 1 3.3 +NVIDIA GTS 250 .*NVIDIA .*GTS *25.* 4 1 1 3.3 +NVIDIA GTX 260 .*NVIDIA .*GTX *26.* 4 1 1 3.3 +NVIDIA GTX 270 .*NVIDIA .*GTX *27.* 4 1 0 3.3 +NVIDIA GTX 280 .*NVIDIA .*GTX *28.* 4 1 1 3.3 +NVIDIA GTX 290 .*NVIDIA .*GTX *29.* 5 1 0 3.3 +NVIDIA 310 .*NVIDIA .*GeForce 310.* 3 1 1 3.3 +NVIDIA 315 .*NVIDIA .*GeForce 315.* 3 1 1 3.3 +NVIDIA GT 320 .*NVIDIA .*GT *32.* 3 1 0 3.3 +NVIDIA GT 330 .*NVIDIA .*GT *33.* 3 1 0 3.3 +NVIDIA GT 340 .*NVIDIA .*GT *34.* 3 1 0 0 +NVIDIA 405 .*NVIDIA .* 405.* 3 1 0 3.3 +NVIDIA GT 420 .*NVIDIA .*GT *42.* 3 1 1 4.2 +NVIDIA GT 430 .*NVIDIA .*GT *43.* 3 1 1 4.2 +NVIDIA GT 440 .*NVIDIA .*GT *44.* 4 1 0 4.2 +NVIDIA GTS 450 .*NVIDIA .*GTS *45.* 4 1 1 4.2 +NVIDIA GTX 460 .*NVIDIA .*GTX *46.* 5 1 1 4.3 +NVIDIA GTX 470 .*NVIDIA .*GTX *47.* 5 1 1 4.2 +NVIDIA GTX 480 .*NVIDIA .*GTX *48.* 5 1 1 4.2 +NVIDIA 510 .*NVIDIA .* 510.* 3 1 0 0 +NVIDIA GT 520 .*NVIDIA .*GT *52.* 3 1 1 4.2 +NVIDIA GT 530 .*NVIDIA .*GT *53.* 3 1 1 4.2 +NVIDIA GT 540 .*NVIDIA .*GT *54.* 3 1 1 4.2 +NVIDIA GTX 550 .*NVIDIA .*GTX *55.* 5 1 1 4.3 +NVIDIA GTX 560 .*NVIDIA .*GTX *56.* 5 1 1 4.2 +NVIDIA GTX 570 .*NVIDIA .*GTX *57.* 5 1 1 4.2 +NVIDIA GTX 580 .*NVIDIA .*GTX *58.* 5 1 1 4.3 +NVIDIA GTX 590 .*NVIDIA .*GTX *59.* 5 1 1 4.2 +NVIDIA GT 610 .*NVIDIA .*GT *61.* 3 1 1 4.2 +NVIDIA GT 620 .*NVIDIA .*GT *62.* 3 1 0 4.2 +NVIDIA GT 630 .*NVIDIA .*GT *63.* 3 1 0 4.2 +NVIDIA GT 640 .*NVIDIA .*GT *64.* 3 1 0 4.3 +NVIDIA GT 650 .*NVIDIA .*GT *65.* 3 1 1 4.2 +NVIDIA GTX 650 .*NVIDIA .*GTX *65.* 3 1 1 4.2 +NVIDIA GTX 660 .*NVIDIA .*GTX *66.* 5 1 0 4.3 +NVIDIA GTX 670 .*NVIDIA .*GTX *67.* 5 1 1 4.2 +NVIDIA GTX 680 .*NVIDIA .*GTX *68.* 5 1 1 4.2 +NVIDIA GTX 690 .*NVIDIA .*GTX *69.* 5 1 1 4.2 +NVIDIA C51 .*NVIDIA .*C51.* 0 1 1 2 +NVIDIA G72 .*NVIDIA .*G72.* 1 1 0 0 +NVIDIA G73 .*NVIDIA .*G73.* 1 1 0 0 +NVIDIA G84 .*NVIDIA .*G84.* 2 1 0 0 +NVIDIA G86 .*NVIDIA .*G86.* 3 1 0 0 +NVIDIA G92 .*NVIDIA .*G92.* 3 1 0 0 +NVIDIA GeForce .*GeForce 256.* 0 0 0 0 +NVIDIA GeForce 2 .*GeForce ?2 ?.* 0 1 1 1.5 +NVIDIA GeForce 3 .*GeForce ?3 ?.* 2 1 1 2.1 +NVIDIA GeForce 3 Ti .*GeForce ?3 Ti.* 0 1 0 0 +NVIDIA GeForce 4 .*NVIDIA .*GeForce ?4.* 0 1 1 1.5 +NVIDIA GeForce 4 Go .*NVIDIA .*GeForce ?4.*Go.* 0 1 0 0 +NVIDIA GeForce 4 MX .*NVIDIA .*GeForce ?4 MX.* 0 1 0 0 +NVIDIA GeForce 4 PCX .*NVIDIA .*GeForce ?4 PCX.* 0 1 0 0 +NVIDIA GeForce 4 Ti .*NVIDIA .*GeForce ?4 Ti.* 0 1 0 0 +NVIDIA GeForce 6100 .*NVIDIA .*GeForce 61.* 3 1 1 4.2 +NVIDIA GeForce 6200 .*NVIDIA .*GeForce 62.* 0 1 1 2.1 +NVIDIA GeForce 6500 .*NVIDIA .*GeForce 65.* 1 1 1 2.1 +NVIDIA GeForce 6600 .*NVIDIA .*GeForce 66.* 2 1 1 2.1 +NVIDIA GeForce 6700 .*NVIDIA .*GeForce 67.* 2 1 1 2.1 +NVIDIA GeForce 6800 .*NVIDIA .*GeForce 68.* 1 1 1 2.1 +NVIDIA GeForce 7000 .*NVIDIA .*GeForce 70.* 1 1 1 2.1 +NVIDIA GeForce 7100 .*NVIDIA .*GeForce 71.* 1 1 1 2.1 +NVIDIA GeForce 7200 .*NVIDIA .*GeForce 72.* 1 1 0 0 +NVIDIA GeForce 7300 .*NVIDIA .*GeForce 73.* 1 1 1 2.1 +NVIDIA GeForce 7500 .*NVIDIA .*GeForce 75.* 2 1 1 2.1 +NVIDIA GeForce 7600 .*NVIDIA .*GeForce 76.* 2 1 1 2.1 +NVIDIA GeForce 7800 .*NVIDIA .*GeForce 78.* 2 1 1 2.1 +NVIDIA GeForce 7900 .*NVIDIA .*GeForce 79.* 3 1 1 2.1 +NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 1 1 0 0 +NVIDIA GeForce 8200M .*NVIDIA .*GeForce 8200M.* 1 1 0 3.3 +NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 1 1 0 2.1 +NVIDIA GeForce 8300 .*NVIDIA .*GeForce 83.* 3 1 1 3.3 +NVIDIA GeForce 8400M .*NVIDIA .*GeForce 8400M.* 1 1 1 3.3 +NVIDIA GeForce 8400 .*NVIDIA .*GeForce 84.* 2 1 1 3.3 +NVIDIA GeForce 8500 .*NVIDIA .*GeForce 85.* 2 1 1 3.3 +NVIDIA GeForce 8600M .*NVIDIA .*GeForce 8600M.* 2 1 1 3.3 +NVIDIA GeForce 8600 .*NVIDIA .*GeForce 86.* 3 1 1 3.3 +NVIDIA GeForce 8700M .*NVIDIA .*GeForce 8700M.* 2 1 1 3.3 +NVIDIA GeForce 8700 .*NVIDIA .*GeForce 87.* 3 1 0 0 +NVIDIA GeForce 8800M .*NVIDIA .*GeForce 8800M.* 2 1 1 3.3 +NVIDIA GeForce 8800 .*NVIDIA .*GeForce 88.* 3 1 1 3.3 +NVIDIA GeForce 9100M .*NVIDIA .*GeForce 9100M.* 0 1 0 0 +NVIDIA GeForce 9100 .*NVIDIA .*GeForce 91.* 0 1 0 3.3 +NVIDIA GeForce 9200M .*NVIDIA .*GeForce 9200M.* 1 1 0 3.1 +NVIDIA GeForce 9200 .*NVIDIA .*GeForce 92.* 1 1 0 3.3 +NVIDIA GeForce 9300M .*NVIDIA .*GeForce 9300M.* 1 1 1 3.3 +NVIDIA GeForce 9300 .*NVIDIA .*GeForce 93.* 1 1 1 3.3 +NVIDIA GeForce 9400M .*NVIDIA .*GeForce 9400M.* 2 1 1 3.3 +NVIDIA GeForce 9400 .*NVIDIA .*GeForce 94.* 3 1 1 3.3 +NVIDIA GeForce 9500M .*NVIDIA .*GeForce 9500M.* 1 1 1 3.3 +NVIDIA GeForce 9500 .*NVIDIA .*GeForce 95.* 3 1 1 3.3 +NVIDIA GeForce 9600M .*NVIDIA .*GeForce 9600M.* 2 1 1 3.3 +NVIDIA GeForce 9600 .*NVIDIA .*GeForce 96.* 3 1 1 3.3 +NVIDIA GeForce 9700M .*NVIDIA .*GeForce 9700M.* 0 1 1 3.3 +NVIDIA GeForce 9800M .*NVIDIA .*GeForce 9800M.* 2 1 1 3.3 +NVIDIA GeForce 9800 .*NVIDIA .*GeForce 98.* 3 1 1 3.3 +NVIDIA GeForce FX 5100 .*NVIDIA .*GeForce FX 51.* 0 1 0 0 +NVIDIA GeForce FX 5200 .*NVIDIA .*GeForce FX 52.* 0 1 0 2.1 +NVIDIA GeForce FX 5300 .*NVIDIA .*GeForce FX 53.* 0 1 0 0 +NVIDIA GeForce FX 5500 .*NVIDIA .*GeForce FX 55.* 0 1 1 2.1 +NVIDIA GeForce FX 5600 .*NVIDIA .*GeForce FX 56.* 1 1 1 2.1 +NVIDIA GeForce FX 5700 .*NVIDIA .*GeForce FX 57.* 0 1 1 2.1 +NVIDIA GeForce FX 5800 .*NVIDIA .*GeForce FX 58.* 1 1 0 0 +NVIDIA GeForce FX 5900 .*NVIDIA .*GeForce FX 59.* 1 1 1 2.1 +NVIDIA GeForce FX Go5100 .*NVIDIA .*GeForce FX Go51.* 0 1 0 0 +NVIDIA GeForce FX Go5200 .*NVIDIA .*GeForce FX Go52.* 0 1 0 0 +NVIDIA GeForce FX Go5300 .*NVIDIA .*GeForce FX Go53.* 0 1 0 0 +NVIDIA GeForce FX Go5500 .*NVIDIA .*GeForce FX Go55.* 0 1 0 0 +NVIDIA GeForce FX Go5600 .*NVIDIA .*GeForce FX Go56.* 0 1 1 2.1 +NVIDIA GeForce FX Go5700 .*NVIDIA .*GeForce FX Go57.* 1 1 1 1.5 +NVIDIA GeForce FX Go5800 .*NVIDIA .*GeForce FX Go58.* 1 1 0 0 +NVIDIA GeForce FX Go5900 .*NVIDIA .*GeForce FX Go59.* 1 1 0 0 +NVIDIA GeForce FX Go5xxx .*NVIDIA .*GeForce FX Go.* 0 1 0 0 +NVIDIA GeForce Go 6100 .*NVIDIA .*GeForce Go 61.* 0 1 1 2.1 +NVIDIA GeForce Go 6200 .*NVIDIA .*GeForce Go 62.* 0 1 0 0 +NVIDIA GeForce Go 6400 .*NVIDIA .*GeForce Go 64.* 1 1 1 2 +NVIDIA GeForce Go 6500 .*NVIDIA .*GeForce Go 65.* 1 1 0 0 +NVIDIA GeForce Go 6600 .*NVIDIA .*GeForce Go 66.* 0 1 1 2.1 +NVIDIA GeForce Go 6700 .*NVIDIA .*GeForce Go 67.* 1 1 0 0 +NVIDIA GeForce Go 6800 .*NVIDIA .*GeForce Go 68.* 0 1 1 2.1 +NVIDIA GeForce Go 7200 .*NVIDIA .*GeForce Go 72.* 1 1 0 0 +NVIDIA GeForce Go 7300 LE .*NVIDIA .*GeForce Go 73.*LE.* 1 1 0 0 +NVIDIA GeForce Go 7300 .*NVIDIA .*GeForce Go 73.* 1 1 1 2.1 +NVIDIA GeForce Go 7400 .*NVIDIA .*GeForce Go 74.* 1 1 1 2.1 +NVIDIA GeForce Go 7600 .*NVIDIA .*GeForce Go 76.* 1 1 1 2.1 +NVIDIA GeForce Go 7700 .*NVIDIA .*GeForce Go 77.* 0 1 1 2.1 +NVIDIA GeForce Go 7800 .*NVIDIA .*GeForce Go 78.* 2 1 0 0 +NVIDIA GeForce Go 7900 .*NVIDIA .*GeForce Go 79.* 1 1 1 2.1 +NVIDIA D9M .*NVIDIA .*D9M.* 1 1 0 0 +NVIDIA G94 .*NVIDIA .*G94.* 3 1 0 0 +NVIDIA GeForce Go 6 .*GeForce Go 6.* 1 1 0 0 +NVIDIA ION 2 .*NVIDIA .*ION 2.* 2 1 0 0 +NVIDIA ION .*NVIDIA Corporation.*ION.* 2 1 1 3.3 +NVIDIA NB8M .*NVIDIA .*NB8M.* 1 1 0 0 +NVIDIA NB8P .*NVIDIA .*NB8P.* 2 1 0 0 +NVIDIA NB9E .*NVIDIA .*NB9E.* 3 1 0 0 +NVIDIA NB9M .*NVIDIA .*NB9M.* 1 1 0 0 +NVIDIA NB9P .*NVIDIA .*NB9P.* 2 1 0 0 +NVIDIA N10 .*NVIDIA .*N10.* 1 1 0 0 +NVIDIA GeForce PCX .*GeForce PCX.* 0 1 0 0 +NVIDIA Generic .*NVIDIA .*Unknown.* 0 0 0 3 +NVIDIA NV17 .*NVIDIA .*NV17.* 0 1 0 0 +NVIDIA NV34 .*NVIDIA .*NV34.* 0 1 0 0 +NVIDIA NV35 .*NVIDIA .*NV35.* 0 1 0 0 +NVIDIA NV36 .*NVIDIA .*NV36.* 1 1 0 0 +NVIDIA NV41 .*NVIDIA .*NV41.* 1 1 0 0 +NVIDIA NV43 .*NVIDIA .*NV43.* 1 1 0 0 +NVIDIA NV44 .*NVIDIA .*NV44.* 1 1 0 0 +NVIDIA nForce .*NVIDIA .*nForce.* 0 0 0 3.3 +NVIDIA MCP51 .*NVIDIA .*MCP51.* 1 1 0 0 +NVIDIA MCP61 .*NVIDIA .*MCP61.* 1 1 0 0 +NVIDIA MCP67 .*NVIDIA .*MCP67.* 1 1 0 0 +NVIDIA MCP68 .*NVIDIA .*MCP68.* 1 1 0 0 +NVIDIA MCP73 .*NVIDIA .*MCP73.* 1 1 0 0 +NVIDIA MCP77 .*NVIDIA .*MCP77.* 1 1 0 0 +NVIDIA MCP78 .*NVIDIA .*MCP78.* 1 1 0 0 +NVIDIA MCP79 .*NVIDIA .*MCP79.* 1 1 0 0 +NVIDIA MCP7A .*NVIDIA .*MCP7A.* 1 1 0 0 +NVIDIA Quadro2 .*Quadro2.* 0 1 0 0 +NVIDIA Quadro 1000M .*Quadro.*1000M.* 2 1 0 4.2 +NVIDIA Quadro 2000 M/D .*Quadro.*2000.* 3 1 0 4.2 +NVIDIA Quadro 3000M .*Quadro.*3000M.* 3 1 0 0 +NVIDIA Quadro 4000M .*Quadro.*4000M.* 3 1 0 0 +NVIDIA Quadro 4000 .*Quadro *4000.* 3 1 0 4.2 +NVIDIA Quadro 50x0 M .*Quadro.*50.0.* 3 1 0 0 +NVIDIA Quadro 6000 .*Quadro.*6000.* 3 1 0 0 +NVIDIA Quadro 400 .*Quadro.*400.* 2 1 0 3.3 +NVIDIA Quadro 600 .*Quadro.*600.* 2 1 0 3.3 +NVIDIA Quadro4 .*Quadro4.* 0 1 0 0 +NVIDIA Quadro DCC .*Quadro DCC.* 0 1 0 0 +NVIDIA Quadro CX .*Quadro.*CX.* 3 1 0 0 +NVIDIA Quadro FX 770M .*Quadro.*FX *770M.* 2 1 0 0 +NVIDIA Quadro FX 1500M .*Quadro.*FX *1500M.* 1 1 0 2.1 +NVIDIA Quadro FX 1600M .*Quadro.*FX *1600M.* 2 1 0 0 +NVIDIA Quadro FX 2500M .*Quadro.*FX *2500M.* 2 1 0 0 +NVIDIA Quadro FX 2700M .*Quadro.*FX *2700M.* 3 1 0 0 +NVIDIA Quadro FX 2800M .*Quadro.*FX *2800M.* 3 1 0 3.3 +NVIDIA Quadro FX 3500 .*Quadro.*FX *3500.* 2 1 0 2.1 +NVIDIA Quadro FX 3600 .*Quadro.*FX *3600.* 3 1 0 0 +NVIDIA Quadro FX 3700 .*Quadro.*FX *3700.* 3 1 0 3.3 +NVIDIA Quadro FX 3800 .*Quadro.*FX *3800.* 3 1 0 3.2 +NVIDIA Quadro FX 4500 .*Quadro.*FX *45.* 3 1 0 0 +NVIDIA Quadro FX 880M .*Quadro.*FX *880M.* 3 1 0 3.3 +NVIDIA Quadro FX 4800 .*NVIDIA .*Quadro *FX *4800.* 3 1 0 0 +NVIDIA Quadro FX .*Quadro FX.* 1 1 0 3.3 +NVIDIA Quadro NVS 1xxM .*Quadro NVS *1.[05]M.* 0 1 1 3.3 +NVIDIA Quadro NVS 300M .*NVIDIA .*NVS *300M.* 2 1 0 0 +NVIDIA Quadro NVS 320M .*NVIDIA .*NVS *320M.* 2 1 0 0 +NVIDIA Quadro NVS 2100M .*NVIDIA .*NVS *2100M.* 2 1 0 0 +NVIDIA Quadro NVS 3100M .*NVIDIA .*NVS *3100M.* 2 1 0 0 +NVIDIA Quadro NVS 4200M .*NVIDIA .*NVS *4200M.* 2 1 0 4.1 +NVIDIA Quadro NVS 5100M .*NVIDIA .*NVS *5100M.* 2 1 0 0 +NVIDIA Quadro NVS .*NVIDIA .*NVS 0 1 0 3.2 +NVIDIA Corporation N12P .*NVIDIA .*N12P.* 1 1 1 4.1 +NVIDIA Corporation N11M .*NVIDIA .*N11M.* 2 1 0 0 +NVIDIA RIVA TNT .*RIVA TNT.* 0 0 0 0 +S3 .*S3 Graphics.* 0 0 1 1.4 +SiS SiS.* 0 0 1 1.5 +Trident Trident.* 0 0 0 0 +Tungsten Graphics Tungsten.* 0 0 0 0 +XGI XGI.* 0 0 0 0 +VIA VIA.* 0 0 0 0 +Apple Generic Apple.*Generic.* 0 0 0 0 +Apple Software Renderer Apple.*Software Renderer.* 0 0 0 0 +Humper Humper.* 0 1 1 2.1 +PowerVR SGX545 .*PowerVR SGX.* 1 1 1 3 diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 447836910d..094d502078 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -41,6 +41,7 @@ #include "llchannelmanager.h" #include "llchicletbar.h" #include "llconsole.h" +#include "lldonotdisturbnotificationstorage.h" #include "llenvmanager.h" #include "llfirstuse.h" #include "llfloatercamera.h" @@ -54,9 +55,8 @@ #include "llmorphview.h" #include "llmoveview.h" #include "llnavigationbar.h" // to show/hide navigation bar when changing mouse look state -#include "llnearbychatbar.h" +#include "llfloaterimnearbychat.h" #include "llnotificationsutil.h" -#include "llpanelpathfindingrebakenavmesh.h" #include "llpaneltopinfobar.h" #include "llparcel.h" #include "llrendersphere.h" @@ -376,7 +376,7 @@ LLAgent::LLAgent() : mShowAvatar(TRUE), mFrameAgent(), - mIsBusy(FALSE), + mIsDoNotDisturb(false), mControlFlags(0x00000000), mbFlagsDirty(FALSE), @@ -1356,12 +1356,7 @@ void LLAgent::setAFK() { sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_START); setControlFlags(AGENT_CONTROL_AWAY | AGENT_CONTROL_STOP); - LL_INFOS("AFK") << "Setting Away" << LL_ENDL; gAwayTimer.start(); - if (gAFKMenu) - { - gAFKMenu->setLabel(LLTrans::getString("AvatarSetNotAway")); - } } } @@ -1380,11 +1375,6 @@ void LLAgent::clearAFK() { sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_STOP); clearControlFlags(AGENT_CONTROL_AWAY); - LL_INFOS("AFK") << "Clearing Away" << LL_ENDL; - if (gAFKMenu) - { - gAFKMenu->setLabel(LLTrans::getString("AvatarSetAway")); - } } } @@ -1397,39 +1387,26 @@ BOOL LLAgent::getAFK() const } //----------------------------------------------------------------------------- -// setBusy() -//----------------------------------------------------------------------------- -void LLAgent::setBusy() -{ - sendAnimationRequest(ANIM_AGENT_BUSY, ANIM_REQUEST_START); - mIsBusy = TRUE; - if (gBusyMenu) - { - gBusyMenu->setLabel(LLTrans::getString("AvatarSetNotBusy")); - } - LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(true); -} - -//----------------------------------------------------------------------------- -// clearBusy() +// setDoNotDisturb() //----------------------------------------------------------------------------- -void LLAgent::clearBusy() +void LLAgent::setDoNotDisturb(bool pIsDoNotDisturb) { - mIsBusy = FALSE; - sendAnimationRequest(ANIM_AGENT_BUSY, ANIM_REQUEST_STOP); - if (gBusyMenu) + bool isDoNotDisturbSwitchedOff = (mIsDoNotDisturb && !pIsDoNotDisturb); + mIsDoNotDisturb = pIsDoNotDisturb; + sendAnimationRequest(ANIM_AGENT_DO_NOT_DISTURB, (pIsDoNotDisturb ? ANIM_REQUEST_START : ANIM_REQUEST_STOP)); + LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(pIsDoNotDisturb); + if (isDoNotDisturbSwitchedOff) { - gBusyMenu->setLabel(LLTrans::getString("AvatarSetBusy")); + LLDoNotDisturbNotificationStorage::getInstance()->updateNotifications(); } - LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(false); } //----------------------------------------------------------------------------- -// getBusy() +// isDoNotDisturb() //----------------------------------------------------------------------------- -BOOL LLAgent::getBusy() const +bool LLAgent::isDoNotDisturb() const { - return mIsBusy; + return mIsDoNotDisturb; } @@ -1911,7 +1888,8 @@ void LLAgent::startTyping() { sendAnimationRequest(ANIM_AGENT_TYPE, ANIM_REQUEST_START); } - LLNearbyChatBar::getInstance()->sendChatFromViewer("", CHAT_TYPE_START, FALSE); + (LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))-> + sendChatFromViewer("", CHAT_TYPE_START, FALSE); } //----------------------------------------------------------------------------- @@ -1923,7 +1901,8 @@ void LLAgent::stopTyping() { clearRenderState(AGENT_STATE_TYPING); sendAnimationRequest(ANIM_AGENT_TYPE, ANIM_REQUEST_STOP); - LLNearbyChatBar::getInstance()->sendChatFromViewer("", CHAT_TYPE_STOP, FALSE); + (LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))-> + sendChatFromViewer("", CHAT_TYPE_STOP, FALSE); } } @@ -2002,7 +1981,6 @@ void LLAgent::endAnimationUpdateUI() LLChicletBar::getInstance()->setVisible(TRUE); LLPanelStandStopFlying::getInstance()->setVisible(TRUE); - LLPanelPathfindingRebakeNavmesh::getInstance()->setVisible(TRUE); LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); @@ -2112,7 +2090,6 @@ void LLAgent::endAnimationUpdateUI() LLChicletBar::getInstance()->setVisible(FALSE); LLPanelStandStopFlying::getInstance()->setVisible(FALSE); - LLPanelPathfindingRebakeNavmesh::getInstance()->setVisible(FALSE); // clear out camera lag effect gAgentCamera.clearCameraLag(); @@ -2567,51 +2544,21 @@ void LLMaturityPreferencesResponder::error(U32 pStatus, const std::string& pReas U8 LLMaturityPreferencesResponder::parseMaturityFromServerResponse(const LLSD &pContent) { - // stinson 05/24/2012 Pathfinding regions have re-defined the response behavior. In the old server code, - // if you attempted to change the preferred maturity to the same value, the response content would be an - // undefined LLSD block. In the new server code with pathfinding, the response content should always be - // defined. Thus, the check for isUndefined() can be replaced with an assert after pathfinding is merged - // into server trunk and fully deployed. U8 maturity = SIM_ACCESS_MIN; - if (pContent.isUndefined()) + + llassert(!pContent.isUndefined()); + llassert(pContent.isMap()); + llassert(pContent.has("access_prefs")); + llassert(pContent.get("access_prefs").isMap()); + llassert(pContent.get("access_prefs").has("max")); + llassert(pContent.get("access_prefs").get("max").isString()); + if (!pContent.isUndefined() && pContent.isMap() && pContent.has("access_prefs") + && pContent.get("access_prefs").isMap() && pContent.get("access_prefs").has("max") + && pContent.get("access_prefs").get("max").isString()) { - maturity = mPreferredMaturity; - } - else - { - llassert(!pContent.isUndefined()); - llassert(pContent.isMap()); - - if (!pContent.isUndefined() && pContent.isMap()) - { - // stinson 05/24/2012 Pathfinding regions have re-defined the response syntax. The if statement catches - // the new syntax, and the else statement catches the old syntax. After pathfinding is merged into - // server trunk and fully deployed, we can remove the else statement. - if (pContent.has("access_prefs")) - { - llassert(pContent.has("access_prefs")); - llassert(pContent.get("access_prefs").isMap()); - llassert(pContent.get("access_prefs").has("max")); - llassert(pContent.get("access_prefs").get("max").isString()); - if (pContent.get("access_prefs").isMap() && pContent.get("access_prefs").has("max") && - pContent.get("access_prefs").get("max").isString()) - { - LLSD::String actualPreference = pContent.get("access_prefs").get("max").asString(); - LLStringUtil::trim(actualPreference); - maturity = LLViewerRegion::shortStringToAccess(actualPreference); - } - } - else if (pContent.has("max")) - { - llassert(pContent.get("max").isString()); - if (pContent.get("max").isString()) - { - LLSD::String actualPreference = pContent.get("max").asString(); - LLStringUtil::trim(actualPreference); - maturity = LLViewerRegion::shortStringToAccess(actualPreference); - } - } - } + LLSD::String actualPreference = pContent.get("access_prefs").get("max").asString(); + LLStringUtil::trim(actualPreference); + maturity = LLViewerRegion::shortStringToAccess(actualPreference); } return maturity; @@ -4045,6 +3992,12 @@ void LLAgent::teleportViaLocation(const LLVector3d& pos_global) void LLAgent::doTeleportViaLocation(const LLVector3d& pos_global) { LLViewerRegion* regionp = getRegion(); + + if (!regionp) + { + return; + } + U64 handle = to_region_handle(pos_global); LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromHandle(handle); if(regionp && info) diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 99904e118c..daa15b0c1a 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -378,14 +378,13 @@ public: void sitDown(); //-------------------------------------------------------------------- - // Busy + // Do Not Disturb //-------------------------------------------------------------------- public: - void setBusy(); - void clearBusy(); - BOOL getBusy() const; + void setDoNotDisturb(bool pIsDoNotDisturb); + bool isDoNotDisturb() const; private: - BOOL mIsBusy; + bool mIsDoNotDisturb; //-------------------------------------------------------------------- // Grab diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 751b73e1eb..9025c7af8b 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -35,6 +35,7 @@ #include "llfloaterreg.h" #include "llhudmanager.h" #include "lljoystickbutton.h" +#include "llmoveview.h" #include "llselectmgr.h" #include "llsmoothstep.h" #include "lltoolmgr.h" @@ -2113,6 +2114,11 @@ void LLAgentCamera::changeCameraToDefault() { changeCameraToThirdPerson(); } + if (gSavedSettings.getBOOL("HideUIControls")) + { + gViewerWindow->setUIVisibility(false); + LLPanelStandStopFlying::getInstance()->setVisible(false); + } } diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index e2417cdddb..e31e39dca2 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -342,7 +342,7 @@ void LLLibraryOutfitsFetch::folderDone() } mClothingID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); - mLibraryClothingID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING, false, true); + mLibraryClothingID = gInventory.findLibraryCategoryUUIDForType(LLFolderType::FT_CLOTHING, false); // If Library->Clothing->Initial Outfits exists, use that. LLNameCategoryCollector matchFolderFunctor("Initial Outfits"); diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp new file mode 100644 index 0000000000..0d7d41304d --- /dev/null +++ b/indra/newview/llappcorehttp.cpp @@ -0,0 +1,192 @@ +/** + * @file llappcorehttp.cpp + * @brief + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llappcorehttp.h" + +#include "llviewercontrol.h" + + +const F64 LLAppCoreHttp::MAX_THREAD_WAIT_TIME(10.0); + +LLAppCoreHttp::LLAppCoreHttp() + : mRequest(NULL), + mStopHandle(LLCORE_HTTP_HANDLE_INVALID), + mStopRequested(0.0), + mStopped(false), + mPolicyDefault(-1) +{} + + +LLAppCoreHttp::~LLAppCoreHttp() +{ + delete mRequest; + mRequest = NULL; +} + + +void LLAppCoreHttp::init() +{ + LLCore::HttpStatus status = LLCore::HttpRequest::createService(); + if (! status) + { + LL_ERRS("Init") << "Failed to initialize HTTP services. Reason: " + << status.toString() + << LL_ENDL; + } + + // Point to our certs or SSH/https: will fail on connect + status = LLCore::HttpRequest::setPolicyGlobalOption(LLCore::HttpRequest::GP_CA_FILE, + gDirUtilp->getCAFile()); + if (! status) + { + LL_ERRS("Init") << "Failed to set CA File for HTTP services. Reason: " + << status.toString() + << LL_ENDL; + } + + // Establish HTTP Proxy. "LLProxy" is a special string which directs + // the code to use LLProxy::applyProxySettings() to establish any + // HTTP or SOCKS proxy for http operations. + status = LLCore::HttpRequest::setPolicyGlobalOption(LLCore::HttpRequest::GP_LLPROXY, 1); + if (! status) + { + LL_ERRS("Init") << "Failed to set HTTP proxy for HTTP services. Reason: " + << status.toString() + << LL_ENDL; + } + + // Tracing levels for library & libcurl (note that 2 & 3 are beyond spammy): + // 0 - None + // 1 - Basic start, stop simple transitions + // 2 - libcurl CURLOPT_VERBOSE mode with brief lines + // 3 - with partial data content + static const std::string http_trace("QAModeHttpTrace"); + if (gSavedSettings.controlExists(http_trace)) + { + long trace_level(0L); + trace_level = long(gSavedSettings.getU32(http_trace)); + status = LLCore::HttpRequest::setPolicyGlobalOption(LLCore::HttpRequest::GP_TRACE, trace_level); + } + + // Setup default policy and constrain if directed to + mPolicyDefault = LLCore::HttpRequest::DEFAULT_POLICY_ID; + static const std::string texture_concur("TextureFetchConcurrency"); + if (gSavedSettings.controlExists(texture_concur)) + { + U32 concur(llmin(gSavedSettings.getU32(texture_concur), U32(12))); + + if (concur > 0) + { + LLCore::HttpStatus status; + status = LLCore::HttpRequest::setPolicyClassOption(mPolicyDefault, + LLCore::HttpRequest::CP_CONNECTION_LIMIT, + concur); + if (! status) + { + LL_WARNS("Init") << "Unable to set texture fetch concurrency. Reason: " + << status.toString() + << LL_ENDL; + } + else + { + LL_INFOS("Init") << "Application settings overriding default texture fetch concurrency. New value: " + << concur + << LL_ENDL; + } + } + } + + // Kick the thread + status = LLCore::HttpRequest::startThread(); + if (! status) + { + LL_ERRS("Init") << "Failed to start HTTP servicing thread. Reason: " + << status.toString() + << LL_ENDL; + } + + mRequest = new LLCore::HttpRequest; +} + + +void LLAppCoreHttp::requestStop() +{ + llassert_always(mRequest); + + mStopHandle = mRequest->requestStopThread(this); + if (LLCORE_HTTP_HANDLE_INVALID != mStopHandle) + { + mStopRequested = LLTimer::getTotalSeconds(); + } +} + + +void LLAppCoreHttp::cleanup() +{ + if (LLCORE_HTTP_HANDLE_INVALID == mStopHandle) + { + // Should have been started already... + requestStop(); + } + + if (LLCORE_HTTP_HANDLE_INVALID == mStopHandle) + { + LL_WARNS("Cleanup") << "Attempting to cleanup HTTP services without thread shutdown" + << LL_ENDL; + } + else + { + while (! mStopped && LLTimer::getTotalSeconds() < (mStopRequested + MAX_THREAD_WAIT_TIME)) + { + mRequest->update(200000); + ms_sleep(50); + } + if (! mStopped) + { + LL_WARNS("Cleanup") << "Attempting to cleanup HTTP services with thread shutdown incomplete" + << LL_ENDL; + } + } + + delete mRequest; + mRequest = NULL; + + LLCore::HttpStatus status = LLCore::HttpRequest::destroyService(); + if (! status) + { + LL_WARNS("Cleanup") << "Failed to shutdown HTTP services, continuing. Reason: " + << status.toString() + << LL_ENDL; + } +} + + +void LLAppCoreHttp::onCompleted(LLCore::HttpHandle, LLCore::HttpResponse *) +{ + mStopped = true; +} diff --git a/indra/newview/llappcorehttp.h b/indra/newview/llappcorehttp.h new file mode 100644 index 0000000000..241d73ad52 --- /dev/null +++ b/indra/newview/llappcorehttp.h @@ -0,0 +1,86 @@ +/** + * @file llappcorehttp.h + * @brief Singleton initialization/shutdown class for llcorehttp library + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef _LL_APP_COREHTTP_H_ +#define _LL_APP_COREHTTP_H_ + + +#include "httprequest.h" +#include "httphandler.h" +#include "httpresponse.h" + + +// This class manages the lifecyle of the core http library. +// Slightly different style than traditional code but reflects +// the use of handler classes and light-weight interface +// object instances of the new libraries. To be used +// as a singleton and static construction is fine. +class LLAppCoreHttp : public LLCore::HttpHandler +{ +public: + LLAppCoreHttp(); + ~LLAppCoreHttp(); + + // Initialize the LLCore::HTTP library creating service classes + // and starting the servicing thread. Caller is expected to do + // other initializations (SSL mutex, thread hash function) appropriate + // for the application. + void init(); + + // Request that the servicing thread stop servicing requests, + // release resource references and stop. Request is asynchronous + // and @see cleanup() will perform a limited wait loop for this + // request to stop the thread. + void requestStop(); + + // Terminate LLCore::HTTP library services. Caller is expected + // to have made a best-effort to shutdown the servicing thread + // by issuing a requestThreadStop() and waiting for completion + // notification that the stop has completed. + void cleanup(); + + // Notification when the stop request is complete. + virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response); + + // Retrieve the policy class for default operations. + int getPolicyDefault() const + { + return mPolicyDefault; + } + +private: + static const F64 MAX_THREAD_WAIT_TIME; + +private: + LLCore::HttpRequest * mRequest; + LLCore::HttpHandle mStopHandle; + F64 mStopRequested; + bool mStopped; + int mPolicyDefault; +}; + + +#endif // _LL_APP_COREHTTP_H_ diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 6d67e098a6..769b4eafe1 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -52,7 +52,8 @@ std::string self_av_string() { - return gAgentAvatarp->avString(); + // On logout gAgentAvatarp can already be invalid + return isAgentAvatarValid() ? gAgentAvatarp->avString() : ""; } // RAII thingy to guarantee that a variable gets reset when the Setter @@ -1602,8 +1603,6 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo { gAgentWearables.setWearableOutfit(items, wearables, !append); } - -// dec_busy_count(); } static void remove_non_link_items(LLInventoryModel::item_array_t &items) @@ -2004,7 +2003,6 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego void LLAppearanceMgr::wearOutfitByName(const std::string& name) { LL_INFOS("Avatar") << self_av_string() << "Wearing category " << name << LL_ENDL; - //inc_busy_count(); LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; @@ -2044,8 +2042,6 @@ void LLAppearanceMgr::wearOutfitByName(const std::string& name) llwarns << "Couldn't find outfit " <<name<< " in wearOutfitByName()" << llendl; } - - //dec_busy_count(); } bool areMatchingWearables(const LLViewerInventoryItem *a, const LLViewerInventoryItem *b) @@ -2330,7 +2326,7 @@ void LLAppearanceMgr::copyLibraryGestures() // Copy gestures LLUUID lib_gesture_cat_id = - gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE,false,true); + gInventory.findLibraryCategoryUUIDForType(LLFolderType::FT_GESTURE,false); if (lib_gesture_cat_id.isNull()) { llwarns << "Unable to copy gestures, source category not found" << llendl; @@ -2967,7 +2963,6 @@ public: { llwarns << "Nothing fetched in category " << mComplete.front() << llendl; - //dec_busy_count(); gInventory.removeObserver(this); // lets notify observers that loading is finished. diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e8934d9a9e..1c6f099185 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2007&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2012, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -42,6 +42,7 @@ #include "llagentcamera.h" #include "llagentlanguage.h" #include "llagentwearables.h" +#include "llfloaterimcontainer.h" #include "llwindow.h" #include "llviewerstats.h" #include "llviewerstatsrecorder.h" @@ -59,6 +60,7 @@ #include "llares.h" #include "llcurl.h" #include "llcalc.h" +#include "llconversationlog.h" #include "lltexturestats.h" #include "lltexturestats.h" #include "llviewerwindow.h" @@ -89,10 +91,10 @@ #include "lllogininstance.h" #include "llprogressview.h" #include "llvocache.h" +#include "llvopartgroup.h" #include "llweb.h" #include "llsecondlifeurls.h" #include "llupdaterservice.h" -#include "llcallfloater.h" #include "llfloatertexturefetchdebugger.h" #include "llspellcheck.h" @@ -115,6 +117,7 @@ #include "llnotificationsutil.h" #include "llleap.h" +#include "stringize.h" // Third party library includes #include <boost/bind.hpp> @@ -122,7 +125,6 @@ #include <boost/algorithm/string.hpp> - #if LL_WINDOWS # include <share.h> // For _SH_DENYWR in initMarkerFile #else @@ -199,6 +201,7 @@ #include "llviewercontrol.h" #include "lleventnotifier.h" #include "llcallbacklist.h" +#include "lldeferredsounds.h" #include "pipeline.h" #include "llgesturemgr.h" #include "llsky.h" @@ -321,7 +324,7 @@ BOOL gLogoutInProgress = FALSE; //////////////////////////////////////////////////////////// // Internal globals... that should be removed. static std::string gArgs; - +const int MAX_MARKER_LENGTH = 1024; const std::string MARKER_FILE_NAME("SecondLife.exec_marker"); const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker"); const std::string LLERROR_MARKER_FILE_NAME("SecondLife.llerror_marker"); @@ -378,6 +381,9 @@ void init_default_trans_args() default_trans_args.insert("CAPITALIZED_APP_NAME"); default_trans_args.insert("SECOND_LIFE_GRID"); default_trans_args.insert("SUPPORT_SITE"); + // This URL shows up in a surprising number of places in various skin + // files. We really only want to have to maintain a single copy of it. + default_trans_args.insert("create_account_url"); } //---------------------------------------------------------------------------- @@ -454,7 +460,18 @@ static void ui_audio_callback(const LLUUID& uuid) { if (gAudiop) { - gAudiop->triggerSound(uuid, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI); + SoundData soundData(uuid, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI); + gAudiop->triggerSound(soundData); + } +} + +// A callback set in LLAppViewer::init() +static void deferred_ui_audio_callback(const LLUUID& uuid) +{ + if (gAudiop) + { + SoundData soundData(uuid, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI); + LLDeferredSounds::instance().deferSound(soundData); } } @@ -621,7 +638,7 @@ LLTextureFetch* LLAppViewer::sTextureFetch = NULL; LLAppViewer::LLAppViewer() : mMarkerFile(), - mLogoutMarkerFile(NULL), + mLogoutMarkerFile(), mReportedCrash(false), mNumSessions(0), mPurgeCache(false), @@ -679,12 +696,15 @@ bool LLAppViewer::init() // initialize SSE options LLVector4a::initClass(); + //initialize particle index pool + LLVOPartGroup::initClass(); + // Need to do this initialization before we do anything else, since anything // that touches files should really go through the lldir API gDirUtilp->initAppDirs("SecondLife"); // set skin search path to default, will be overridden later // this allows simple skinned file lookups to work - gDirUtilp->setSkinFolder("default"); + gDirUtilp->setSkinFolder("default", "en"); initLogging(); @@ -702,7 +722,7 @@ bool LLAppViewer::init() //set the max heap size. initMaxHeapSize() ; - LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")) ; + LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ; // write Google Breakpad minidump files to our log directory std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); @@ -723,10 +743,10 @@ bool LLAppViewer::init() mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling")); -#if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::initClass(); -#endif - + // Initialize the non-LLCurl libcurl library. Should be called + // before consumers (LLTextureFetch). + mAppCoreHttp.init(); + // *NOTE:Mani - LLCurl::initClass is not thread safe. // Called before threads are created. LLCurl::initClass(gSavedSettings.getF32("CurlRequestTimeOut"), @@ -765,15 +785,19 @@ bool LLAppViewer::init() LLUI::initClass(settings_map, LLUIImageList::getInstance(), ui_audio_callback, + deferred_ui_audio_callback, &LLUI::sGLScaleFactor); LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ; - // Setup paths and LLTrans after LLUI::initClass has been called. - LLUI::setupPaths(); - LLTransUtil::parseStrings("strings.xml", default_trans_args); - LLTransUtil::parseLanguageStrings("language_settings.xml"); + // NOW LLUI::getLanguage() should work. gDirUtilp must know the language + // for this session ASAP so all the file-loading commands that follow, + // that use findSkinnedFilenames(), will include the localized files. + gDirUtilp->setSkinFolder(gDirUtilp->getSkinFolder(), LLUI::getLanguage()); - // Setup notifications after LLUI::setupPaths() has been called. + // Setup LLTrans after LLUI::initClass has been called. + initStrings(); + + // Setup notifications after LLUI::initClass() has been called. LLNotifications::instance(); LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ; @@ -793,9 +817,6 @@ bool LLAppViewer::init() ////////////////////////////////////////////////////////////////////////////// // *FIX: The following code isn't grouped into functions yet. - // Statistics / debug timer initialization - init_statistics(); - // // Various introspection concerning the libs we're using - particularly // the libs involved in getting to a full login screen. @@ -1022,11 +1043,20 @@ bool LLAppViewer::init() } #if LL_WINDOWS - if (gGLManager.mIsIntel && - LLFeatureManager::getInstance()->getGPUClass() > 0 && - gGLManager.mGLVersion <= 3.f) + if (gGLManager.mGLVersion < LLFeatureManager::getInstance()->getExpectedGLVersion()) { - LLNotificationsUtil::add("IntelOldDriver"); + if (gGLManager.mIsIntel) + { + LLNotificationsUtil::add("IntelOldDriver"); + } + else if (gGLManager.mIsNVIDIA) + { + LLNotificationsUtil::add("NVIDIAOldDriver"); + } + else if (gGLManager.mIsATI) + { + LLNotificationsUtil::add("AMDOldDriver"); + } } #endif @@ -1181,9 +1211,10 @@ static LLFastTimer::DeclareTimer FTM_SERVICE_CALLBACK("Callback"); static LLFastTimer::DeclareTimer FTM_AGENT_AUTOPILOT("Autopilot"); static LLFastTimer::DeclareTimer FTM_AGENT_UPDATE("Update"); +LLFastTimer::DeclareTimer FTM_FRAME("Frame", true); + bool LLAppViewer::mainLoop() { - LLMemType mt1(LLMemType::MTYPE_MAIN); mMainloopTimeout = new LLWatchdogTimeout(); //------------------------------------------- @@ -1199,7 +1230,7 @@ bool LLAppViewer::mainLoop() LLVoiceChannel::initClass(); LLVoiceClient::getInstance()->init(gServicePump); - LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1), true); + LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLFloaterIMContainer::onCurrentChannelChanged, _1), true); LLTimer frameTimer,idleTimer; LLTimer debugTime; LLViewerJoystick* joystick(LLViewerJoystick::getInstance()); @@ -1219,7 +1250,8 @@ bool LLAppViewer::mainLoop() // Handle messages while (!LLApp::isExiting()) { - LLFastTimer::nextFrame(); // Should be outside of any timer instances + LLFastTimer _(FTM_FRAME); + LLFastTimer::nextFrame(); //clear call stack records llclearcallstacks; @@ -1283,7 +1315,6 @@ bool LLAppViewer::mainLoop() && (gHeadlessClient || !gViewerWindow->getShowProgress()) && !gFocusMgr.focusLocked()) { - LLMemType mjk(LLMemType::MTYPE_JOY_KEY); joystick->scanJoystick(); gKeyboard->scanKeyboard(); } @@ -1297,7 +1328,6 @@ bool LLAppViewer::mainLoop() if (gAres != NULL && gAres->isInitialized()) { - LLMemType mt_ip(LLMemType::MTYPE_IDLE_PUMP); pingMainloopTimeout("Main:ServicePump"); LLFastTimer t4(FTM_PUMP); { @@ -1347,7 +1377,6 @@ bool LLAppViewer::mainLoop() // Sleep and run background threads { - LLMemType mt_sleep(LLMemType::MTYPE_SLEEP); LLFastTimer t2(FTM_SLEEP); // yield some time to the os based on command line option @@ -1828,6 +1857,9 @@ bool LLAppViewer::cleanup() // save mute list. gMuteList used to also be deleted here too. LLMuteList::getInstance()->cache(gAgent.getID()); + //save call log list + LLConversationLog::instance().cache(); + if (mPurgeOnExit) { llinfos << "Purging all cache files on exit" << llendflush; @@ -1877,6 +1909,7 @@ bool LLAppViewer::cleanup() // Delete workers first // shotdown all worker threads before deleting them in case of co-dependencies + mAppCoreHttp.requestStop(); sTextureFetch->shutdown(); sTextureCache->shutdown(); sImageDecodeThread->shutdown(); @@ -1884,8 +1917,20 @@ bool LLAppViewer::cleanup() sTextureFetch->shutDownTextureCacheThread() ; sTextureFetch->shutDownImageDecodeThread() ; + llinfos << "Shutting down message system" << llendflush; + end_messaging_system(); + + // *NOTE:Mani - The following call is not thread safe. + LL_CHECK_MEMORY + LLCurl::cleanupClass(); + LL_CHECK_MEMORY + + // Non-LLCurl libcurl library + mAppCoreHttp.cleanup(); + LLFilePickerThread::cleanupClass(); + //MUST happen AFTER LLCurl::cleanupClass delete sTextureCache; sTextureCache = NULL; delete sTextureFetch; @@ -1911,10 +1956,6 @@ bool LLAppViewer::cleanup() LLMetricPerformanceTesterBasic::cleanClass() ; -#if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::cleanupClass(); -#endif - llinfos << "Cleaning up Media and Textures" << llendflush; //Note: @@ -1954,12 +1995,6 @@ bool LLAppViewer::cleanup() LLViewerAssetStatsFF::cleanup(); - llinfos << "Shutting down message system" << llendflush; - end_messaging_system(); - - // *NOTE:Mani - The following call is not thread safe. - LLCurl::cleanupClass(); - // If we're exiting to launch an URL, do that here so the screen // is at the right resolution before we launch IE. if (!gLaunchFileOnQuit.empty()) @@ -2242,10 +2277,8 @@ bool LLAppViewer::initConfiguration() OSMessageBox(msg.str(),LLStringUtil::null,OSMB_OK); return false; } - - LLUI::setupPaths(); // setup paths for LLTrans based on settings files only - LLTransUtil::parseStrings("strings.xml", default_trans_args); - LLTransUtil::parseLanguageStrings("language_settings.xml"); + + initStrings(); // setup paths for LLTrans based on settings files only // - set procedural settings // Note: can't use LL_PATH_PER_SL_ACCOUNT for any of these since we haven't logged in yet gSavedSettings.setString("ClientSettingsFile", @@ -2559,13 +2592,15 @@ bool LLAppViewer::initConfiguration() LLStartUp::setStartSLURL(start_slurl); } - const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent"); - if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString()) - { - // hack to force the skin to default. - gDirUtilp->setSkinFolder(skinfolder->getValue().asString()); - //gDirUtilp->setSkinFolder("default"); - } + const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent"); + if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString()) + { + // Examining "Language" may not suffice -- see LLUI::getLanguage() + // logic. Unfortunately LLUI::getLanguage() doesn't yet do us much + // good because we haven't yet called LLUI::initClass(). + gDirUtilp->setSkinFolder(skinfolder->getValue().asString(), + gSavedSettings.getString("Language")); + } if (gSavedSettings.getBOOL("SpellCheck")) { @@ -2737,6 +2772,52 @@ bool LLAppViewer::initConfiguration() return true; // Config was successful. } +// The following logic is replicated in initConfiguration() (to be able to get +// some initial strings before we've finished initializing enough to know the +// current language) and also in init() (to initialize for real). Somehow it +// keeps growing, necessitating a method all its own. +void LLAppViewer::initStrings() +{ + LLTransUtil::parseStrings("strings.xml", default_trans_args); + LLTransUtil::parseLanguageStrings("language_settings.xml"); + + // parseStrings() sets up the LLTrans substitution table. Add this one item. + LLTrans::setDefaultArg("[sourceid]", gSavedSettings.getString("sourceid")); + + // Now that we've set "[sourceid]", have to go back through + // default_trans_args and reinitialize all those other keys because some + // of them, in turn, reference "[sourceid]". + BOOST_FOREACH(std::string key, default_trans_args) + { + std::string brackets(key), nobrackets(key); + // Invalid to inspect key[0] if key is empty(). But then, the entire + // body of this loop is pointless if key is empty(). + if (key.empty()) + continue; + + if (key[0] != '[') + { + // key was passed without brackets. That means that 'nobrackets' + // is correct but 'brackets' is not. + brackets = STRINGIZE('[' << brackets << ']'); + } + else + { + // key was passed with brackets. That means that 'brackets' is + // correct but 'nobrackets' is not. Erase the left bracket. + nobrackets.erase(0, 1); + std::string::size_type length(nobrackets.length()); + if (length && nobrackets[length - 1] == ']') + { + nobrackets.erase(length - 1); + } + } + // Calling LLTrans::getString() is what embeds the other default + // translation strings into this one. + LLTrans::setDefaultArg(brackets, LLTrans::getString(nobrackets)); + } +} + namespace { // *TODO - decide if there's a better place for these functions. // do we need a file llupdaterui.cpp or something? -brad @@ -3138,8 +3219,8 @@ void LLAppViewer::writeSystemInfo() } // Dump some debugging info - LL_INFOS("SystemInfo") << LLTrans::getString("APP_NAME") - << " version " << LLVersionInfo::getShortVersion() << LL_ENDL; + LL_INFOS("SystemInfo") << "Application: " << LLTrans::getString("APP_NAME") << LL_ENDL; + LL_INFOS("SystemInfo") << "Version: " << LLVersionInfo::getChannelAndVersion() << LL_ENDL; // Dump the local time and time zone time_t now; @@ -3154,8 +3235,6 @@ void LLAppViewer::writeSystemInfo() LL_INFOS("SystemInfo") << "OS: " << getOSInfo().getOSStringSimple() << LL_ENDL; LL_INFOS("SystemInfo") << "OS info: " << getOSInfo() << LL_ENDL; - LL_INFOS("SystemInfo") << "Timers: " << LLFastTimer::sClockType << LL_ENDL; - writeDebugInfo(); // Save out debug_info.log early, in case of crash. } @@ -3267,22 +3346,27 @@ void LLAppViewer::handleViewerCrash() //we're already in a crash situation if (gDirUtilp) { - std::string crash_file_name; - if(gLLErrorActivated) crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LLERROR_MARKER_FILE_NAME); - else crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME); - llinfos << "Creating crash marker file " << crash_file_name << llendl; + std::string crash_file_name = ( gLLErrorActivated ) + ? gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LLERROR_MARKER_FILE_NAME) + : gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME); + LL_INFOS("MarkerFile") << "Creating crash marker file " << crash_file_name << LL_ENDL; LLAPRFile crash_file ; crash_file.open(crash_file_name, LL_APR_W); if (crash_file.getFileHandle()) { LL_INFOS("MarkerFile") << "Created crash marker file " << crash_file_name << LL_ENDL; + recordMarkerVersion(crash_file); } else { LL_WARNS("MarkerFile") << "Cannot create error marker file " << crash_file_name << LL_ENDL; } } + else + { + LL_WARNS("MarkerFile") << "No gDirUtilp with which to create error marker file name" << LL_ENDL; + } if (gMessageSystem && gDirUtilp) { @@ -3334,7 +3418,7 @@ bool LLAppViewer::anotherInstanceRunning() // If the file is currently locked, that means another process is already running. std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, MARKER_FILE_NAME); - LL_DEBUGS("MarkerFile") << "Checking marker file for lock..." << LL_ENDL; + LL_DEBUGS("MarkerFile") << "Checking marker file '"<< marker_file << "' for lock..." << LL_ENDL; //Freeze case checks if (LLAPRFile::isExist(marker_file, NULL, LL_APR_RB)) @@ -3360,6 +3444,46 @@ bool LLAppViewer::anotherInstanceRunning() return false; } +// static +void LLAppViewer::recordMarkerVersion(LLAPRFile& marker_file) +{ + std::string marker_version(LLVersionInfo::getChannelAndVersion()); + if ( marker_version.length() > MAX_MARKER_LENGTH ) + { + LL_WARNS_ONCE("MarkerFile") << "Version length ("<< marker_version.length()<< ") greater than maximum: marker matching may be incorrect" << LL_ENDL; + } + + // record the viewer version in the marker file + marker_file.write(marker_version.data(), marker_version.length()); +} + +bool LLAppViewer::markerIsSameVersion(const std::string& marker_name) const +{ + bool sameVersion = false; + + std::string my_version(LLVersionInfo::getChannelAndVersion()); + char marker_version[MAX_MARKER_LENGTH]; + S32 marker_version_length; + + LLAPRFile marker_file; + marker_file.open(marker_name, LL_APR_RB); + if (marker_file.getFileHandle()) + { + marker_version_length = marker_file.read(marker_version, sizeof(marker_version)); + LL_DEBUGS("MarkerFile") << "Compare markers: "; + std::string marker_string(marker_version, marker_version_length); + LL_CONT << "\n mine '" << my_version << "'" + << "\n marker '" << marker_string << "'" + << LL_ENDL; + if ( 0 == my_version.compare( 0, my_version.length(), marker_version, 0, marker_version_length ) ) + { + sameVersion = true; + } + marker_file.close(); + } + return sameVersion; +} + void LLAppViewer::initMarkerFile() { //First, check for the existence of other files. @@ -3382,27 +3506,55 @@ void LLAppViewer::initMarkerFile() if (LLAPRFile::isExist(mMarkerFileName, NULL, LL_APR_RB) && !anotherInstanceRunning()) { - gLastExecEvent = LAST_EXEC_FROZE; - LL_INFOS("MarkerFile") << "Exec marker found: program froze on previous execution" << LL_ENDL; + if ( markerIsSameVersion(mMarkerFileName) ) + { + LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found" << LL_ENDL; + gLastExecEvent = LAST_EXEC_FROZE; + } + else + { + LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found, but versions did not match" << LL_ENDL; + } } if(LLAPRFile::isExist(logout_marker_file, NULL, LL_APR_RB)) { - gLastExecEvent = LAST_EXEC_LOGOUT_FROZE; - LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + if (markerIsSameVersion(logout_marker_file)) + { + gLastExecEvent = LAST_EXEC_LOGOUT_FROZE; + LL_INFOS("MarkerFile") << "Logout crashed '"<< logout_marker_file << "', setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + } + else + { + LL_INFOS("MarkerFile") << "Logout crash marker '"<< logout_marker_file << "' found, but versions did not match" << LL_ENDL; + } LLAPRFile::remove(logout_marker_file); } if(LLAPRFile::isExist(llerror_marker_file, NULL, LL_APR_RB)) { - if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; - else gLastExecEvent = LAST_EXEC_LLERROR_CRASH; - LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + if (markerIsSameVersion(llerror_marker_file)) + { + gLastExecEvent = ( gLastExecEvent == LAST_EXEC_LOGOUT_FROZE ) + ? LAST_EXEC_LOGOUT_CRASH : LAST_EXEC_LLERROR_CRASH; + LL_INFOS("MarkerFile") << "Last exec LLError '"<< llerror_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + } + else + { + LL_INFOS("MarkerFile") << "Last exec LLError marker '"<< llerror_marker_file << "' found, but versions did not match" << LL_ENDL; + } LLAPRFile::remove(llerror_marker_file); } if(LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB)) { - if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; - else gLastExecEvent = LAST_EXEC_OTHER_CRASH; - LL_INFOS("MarkerFile") << "Last exec crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + if (markerIsSameVersion(error_marker_file)) + { + gLastExecEvent = (gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) + ? LAST_EXEC_LOGOUT_CRASH : LAST_EXEC_OTHER_CRASH; + LL_INFOS("MarkerFile") << "Last exec '"<< error_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + } + else + { + LL_INFOS("MarkerFile") << "Last exec '"<< error_marker_file << "' marker found, but versions did not match" << LL_ENDL; + } LLAPRFile::remove(error_marker_file); } @@ -3418,35 +3570,48 @@ void LLAppViewer::initMarkerFile() if (s == APR_SUCCESS && mMarkerFile.getFileHandle()) { - LL_DEBUGS("MarkerFile") << "Marker file created." << LL_ENDL; + LL_DEBUGS("MarkerFile") << "Marker file '"<< mMarkerFileName << "' created." << LL_ENDL; + if (APR_SUCCESS == apr_file_lock(mMarkerFile.getFileHandle(), APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE)) + { + recordMarkerVersion(mMarkerFile); + LL_DEBUGS("MarkerFile") << "Marker file locked." << LL_ENDL; + } + else + { + LL_INFOS("MarkerFile") << "Marker file cannot be locked." << LL_ENDL; + } } else { - LL_INFOS("MarkerFile") << "Failed to create marker file." << LL_ENDL; - return; - } - if (apr_file_lock(mMarkerFile.getFileHandle(), APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS) - { - mMarkerFile.close() ; - LL_INFOS("MarkerFile") << "Marker file cannot be locked." << LL_ENDL; - return; + LL_INFOS("MarkerFile") << "Failed to create marker file '"<< mMarkerFileName << "'." << LL_ENDL; } - - LL_DEBUGS("MarkerFile") << "Marker file locked." << LL_ENDL; } void LLAppViewer::removeMarkerFile(bool leave_logout_marker) { - LL_DEBUGS("MarkerFile") << "removeMarkerFile()" << LL_ENDL; + LL_DEBUGS("MarkerFile") << "removeMarkerFile("<<leave_logout_marker<<")" << LL_ENDL; if (mMarkerFile.getFileHandle()) { - mMarkerFile.close() ; + LL_DEBUGS("MarkerFile") << "removeMarkerFile marker '"<<mMarkerFileName<<"'"<< LL_ENDL; + mMarkerFile.close(); LLAPRFile::remove( mMarkerFileName ); } - if (mLogoutMarkerFile != NULL && !leave_logout_marker) + else + { + LL_WARNS("MarkerFile") << "removeMarkerFile marker '"<<mMarkerFileName<<"' not open"<< LL_ENDL; + } + if (!leave_logout_marker) { + if (mLogoutMarkerFile.getFileHandle()) + { + LL_DEBUGS("MarkerFile") << "removeMarkerFile marker '"<<mLogoutMarkerFileName<<"'"<< LL_ENDL; + mLogoutMarkerFile.close(); + } + else + { + LL_WARNS("MarkerFile") << "removeMarkerFile marker '"<<mLogoutMarkerFileName<<"' not open"<< LL_ENDL; + } LLAPRFile::remove( mLogoutMarkerFileName ); - mLogoutMarkerFile = NULL; } } @@ -3589,8 +3754,7 @@ void LLAppViewer::migrateCacheDirectory() { gSavedSettings.setBOOL("MigrateCacheDirectory", FALSE); - std::string delimiter = gDirUtilp->getDirDelimiter(); - std::string old_cache_dir = gDirUtilp->getOSUserAppDir() + delimiter + "cache"; + std::string old_cache_dir = gDirUtilp->add(gDirUtilp->getOSUserAppDir(), "cache"); std::string new_cache_dir = gDirUtilp->getCacheDir(true); if (gDirUtilp->fileExists(old_cache_dir)) @@ -3606,8 +3770,8 @@ void LLAppViewer::migrateCacheDirectory() while (iter.next(file_name)) { if (file_name == "." || file_name == "..") continue; - std::string source_path = old_cache_dir + delimiter + file_name; - std::string dest_path = new_cache_dir + delimiter + file_name; + std::string source_path = gDirUtilp->add(old_cache_dir, file_name); + std::string dest_path = gDirUtilp->add(new_cache_dir, file_name); if (!LLFile::rename(source_path, dest_path)) { file_count++; @@ -3838,7 +4002,7 @@ bool LLAppViewer::initCache() LLDirIterator iter(dir, mask); if (iter.next(found_file)) { - old_vfs_data_file = dir + gDirUtilp->getDirDelimiter() + found_file; + old_vfs_data_file = gDirUtilp->add(dir, found_file); S32 start_pos = found_file.find_last_of('.'); if (start_pos > 0) @@ -4140,7 +4304,6 @@ static LLFastTimer::DeclareTimer FTM_VLMANAGER("VL Manager"); /////////////////////////////////////////////////////// void LLAppViewer::idle() { - LLMemType mt_idle(LLMemType::MTYPE_IDLE); pingMainloopTimeout("Main:Idle"); // Update frame timers @@ -4253,7 +4416,6 @@ void LLAppViewer::idle() // of SEND_STATS_PERIOD so that the initial stats report will // be sent immediately. static LLFrameStatsTimer viewer_stats_timer(SEND_STATS_PERIOD); - reset_statistics(); // Update session stats every large chunk of time // *FIX: (???) SAMANTHA @@ -4313,7 +4475,7 @@ void LLAppViewer::idle() idle_afk_check(); // Update statistics for this frame - update_statistics(gFrameCount); + update_statistics(); } //////////////////////////////////////// @@ -4349,6 +4511,10 @@ void LLAppViewer::idle() { return; } + if (gTeleportDisplay) + { + return; + } gViewerWindow->updateUI(); @@ -4647,16 +4813,15 @@ void LLAppViewer::sendLogoutRequest() mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME); LLAPRFile outfile ; - outfile.open(mLogoutMarkerFileName, LL_APR_W); - mLogoutMarkerFile = outfile.getFileHandle() ; - if (mLogoutMarkerFile) + mLogoutMarkerFile.open(mLogoutMarkerFileName, LL_APR_W); + if (mLogoutMarkerFile.getFileHandle()) { - llinfos << "Created logout marker file " << mLogoutMarkerFileName << llendl; - apr_file_close(mLogoutMarkerFile); + LL_INFOS("MarkerFile") << "Created logout marker file '"<< mLogoutMarkerFileName << "' " << mLogoutMarkerFileName << LL_ENDL; + recordMarkerVersion(outfile); } else { - llwarns << "Cannot create logout marker file " << mLogoutMarkerFileName << llendl; + LL_WARNS("MarkerFile") << "Cannot create logout marker file " << mLogoutMarkerFileName << LL_ENDL; } } } @@ -4735,7 +4900,6 @@ static LLFastTimer::DeclareTimer FTM_CHECK_REGION_CIRCUIT("Check Region Circuit" void LLAppViewer::idleNetwork() { - LLMemType mt_in(LLMemType::MTYPE_IDLE_NETWORK); pingMainloopTimeout("idleNetwork"); gObjectList.mNumNewObjects = 0; @@ -5149,20 +5313,20 @@ void LLAppViewer::launchUpdater() // we tell the updater where to find the xml containing string // translations which it can use for its own UI std::string xml_strings_file = "strings.xml"; - std::vector<std::string> xui_path_vec = LLUI::getXUIPaths(); + std::vector<std::string> xui_path_vec = + gDirUtilp->findSkinnedFilenames(LLDir::XUI, xml_strings_file); std::string xml_search_paths; - std::vector<std::string>::const_iterator iter; + const char* delim = ""; // build comma-delimited list of xml paths to pass to updater - for (iter = xui_path_vec.begin(); iter != xui_path_vec.end(); ) - { - std::string this_skin_dir = gDirUtilp->getDefaultSkinDir() - + gDirUtilp->getDirDelimiter() - + (*iter); - llinfos << "Got a XUI path: " << this_skin_dir << llendl; - xml_search_paths.append(this_skin_dir); - ++iter; - if (iter != xui_path_vec.end()) - xml_search_paths.append(","); // comma-delimit + BOOST_FOREACH(std::string this_skin_path, xui_path_vec) + { + // Although we already have the full set of paths with the filename + // appended, the linux-updater.bin command-line switches require us to + // snip the filename OFF and pass it as a separate switch argument. :-P + llinfos << "Got a XUI path: " << this_skin_path << llendl; + xml_search_paths.append(delim); + xml_search_paths.append(gDirUtilp->getDirName(this_skin_path)); + delim = ","; } // build the overall command-line to run the updater correctly LLAppViewer::sUpdaterInfo->mUpdateExePath = diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index ae3c795d1e..0cc02b14e6 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -31,6 +31,7 @@ #include "llcontrol.h" #include "llsys.h" // for LLOSInfo #include "lltimer.h" +#include "llappcorehttp.h" class LLCommandLineParser; class LLFrameTimer; @@ -41,6 +42,9 @@ class LLTextureFetch; class LLWatchdogTimeout; class LLUpdaterService; +extern LLFastTimer::DeclareTimer FTM_FRAME; + + class LLAppViewer : public LLApp { public: @@ -173,6 +177,9 @@ public: // Metrics policy helper statics. static void metricsUpdateRegion(U64 region_handle); static void metricsSend(bool enable_reporting); + + // llcorehttp init/shutdown/config information. + LLAppCoreHttp & getAppCoreHttp() { return mAppCoreHttp; } protected: virtual bool initWindow(); // Initialize the viewer's window. @@ -194,6 +201,7 @@ private: void initMaxHeapSize(); bool initThreads(); // Initialize viewer threads, return false on failure. bool initConfiguration(); // Initialize settings from the command line/config file. + void initStrings(); // Initialize LLTrans machinery void initUpdater(); // Initialize the updater service. bool initCache(); // Initialize local client cache. void checkMemory() ; @@ -209,7 +217,9 @@ private: bool anotherInstanceRunning(); void initMarkerFile(); - + static void recordMarkerVersion(LLAPRFile& marker_file); + bool markerIsSameVersion(const std::string& marker_name) const; + void idle(); void idleShutdown(); // update avatar SLID and display name caches @@ -229,7 +239,7 @@ private: LLAPRFile mMarkerFile; // A file created to indicate the app is running. std::string mLogoutMarkerFileName; - apr_file_t* mLogoutMarkerFile; // A file created to indicate the app is running. + LLAPRFile mLogoutMarkerFile; // A file created to indicate the app is running. LLOSInfo mSysOSInfo; @@ -271,6 +281,9 @@ private: boost::scoped_ptr<LLUpdaterService> mUpdater; + // llcorehttp library init/shutdown helper + LLAppCoreHttp mAppCoreHttp; + //--------------------------------------------- //*NOTE: Mani - legacy updater stuff // Still useable? diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index e8d8efdc0a..8695652168 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -31,7 +31,6 @@ #include "llcommandlineparser.h" #include "lldiriterator.h" -#include "llmemtype.h" #include "llurldispatcher.h" // SLURL from other app instance #include "llviewernetwork.h" #include "llviewercontrol.h" @@ -71,8 +70,6 @@ static void exceptionTerminateHandler() int main( int argc, char **argv ) { - LLMemType mt1(LLMemType::MTYPE_STARTUP); - #if LL_SOLARIS && defined(__sparc) asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC #endif diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index c2916717bd..4d340cafa9 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -33,8 +33,6 @@ #include "llappviewermacosx.h" #include "llcommandlineparser.h" -#include "llmemtype.h" - #include "llviewernetwork.h" #include "llviewercontrol.h" #include "llmd5.h" @@ -67,8 +65,6 @@ namespace int main( int argc, char **argv ) { - LLMemType mt1(LLMemType::MTYPE_STARTUP); - #if LL_SOLARIS && defined(__sparc) asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC #endif diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index bad60a9757..8326be433e 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -32,7 +32,6 @@ #include "llappviewerwin32.h" -#include "llmemtype.h" #include "llwindowwin32.h" // *FIX: for setting gIconResource. #include "llgl.h" @@ -47,6 +46,11 @@ #include "llviewercontrol.h" #include "lldxhardware.h" +#include "nvapi/nvapi.h" +#include "nvapi/NvApiDriverSettings.h" + +#include <stdlib.h> + #include "llweb.h" #include "llsecondlifeurls.h" @@ -61,6 +65,7 @@ #include "llwindebug.h" #endif + // *FIX:Mani - This hack is to fix a linker issue with libndofdev.lib // The lib was compiled under VS2005 - in VS2003 we need to remap assert #ifdef LL_DEBUG @@ -76,6 +81,20 @@ extern "C" { const std::string LLAppViewerWin32::sWindowClass = "Second Life"; +/* + This function is used to print to the command line a text message + describing the nvapi error and quits +*/ +void nvapi_error(NvAPI_Status status) +{ + NvAPI_ShortString szDesc = {0}; + NvAPI_GetErrorMessage(status, szDesc); + llwarns << szDesc << llendl; + + //should always trigger when asserts are enabled + llassert(status == NVAPI_OK); +} + // Create app mutex creates a unique global windows object. // If the object can be created it returns true, otherwise // it returns false. The false result can be used to determine @@ -97,6 +116,79 @@ bool create_app_mutex() return result; } +void ll_nvapi_init(NvDRSSessionHandle hSession) +{ + // (2) load all the system settings into the session + NvAPI_Status status = NvAPI_DRS_LoadSettings(hSession); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + + NvAPI_UnicodeString profile_name; + std::string app_name = LLTrans::getString("APP_NAME"); + llutf16string w_app_name = utf8str_to_utf16str(app_name); + wsprintf(profile_name, L"%s", w_app_name.c_str()); + status = NvAPI_DRS_SetCurrentGlobalProfile(hSession, profile_name); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + + // (3) Obtain the current profile. + NvDRSProfileHandle hProfile = 0; + status = NvAPI_DRS_GetCurrentGlobalProfile(hSession, &hProfile); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + + // load settings for querying + status = NvAPI_DRS_LoadSettings(hSession); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + + //get the preferred power management mode for Second Life + NVDRS_SETTING drsSetting = {0}; + drsSetting.version = NVDRS_SETTING_VER; + status = NvAPI_DRS_GetSetting(hSession, hProfile, PREFERRED_PSTATE_ID, &drsSetting); + if (status == NVAPI_SETTING_NOT_FOUND) + { //only override if the user hasn't specifically set this setting + // (4) Specify that we want the VSYNC disabled setting + // first we fill the NVDRS_SETTING struct, then we call the function + drsSetting.version = NVDRS_SETTING_VER; + drsSetting.settingId = PREFERRED_PSTATE_ID; + drsSetting.settingType = NVDRS_DWORD_TYPE; + drsSetting.u32CurrentValue = PREFERRED_PSTATE_PREFER_MAX; + status = NvAPI_DRS_SetSetting(hSession, hProfile, &drsSetting); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + } + else if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + + + + // (5) Now we apply (or save) our changes to the system + status = NvAPI_DRS_SaveSettings(hSession); + if (status != NVAPI_OK) + { + nvapi_error(status); + } +} + //#define DEBUGGING_SEH_FILTER 1 #if DEBUGGING_SEH_FILTER # define WINMAIN DebuggingWinMain @@ -117,19 +209,21 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, #endif // _DEBUG #endif // INCLUDE_VLD - LLMemType mt1(LLMemType::MTYPE_STARTUP); - const S32 MAX_HEAPS = 255; DWORD heap_enable_lfh_error[MAX_HEAPS]; S32 num_heaps = 0; #if WINDOWS_CRT_MEM_CHECKS && !INCLUDE_VLD _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); // dump memory leaks on exit -#elif 1 +#elif 0 // Experimental - enable the low fragmentation heap // This results in a 2-3x improvement in opening a new Inventory window (which uses a large numebr of allocations) // Note: This won't work when running from the debugger unless the _NO_DEBUG_HEAP environment variable is set to 1 + // Enable to get mem debugging within visual studio. +#if LL_DEBUG + _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); +#else _CrtSetDbgFlag(0); // default, just making explicit ULONG ulEnableLFH = 2; @@ -144,6 +238,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, heap_enable_lfh_error[i] = GetLastError(); } #endif +#endif // *FIX: global gIconResource = MAKEINTRESOURCE(IDI_LL_ICON); @@ -163,6 +258,27 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, return -1; } + NvAPI_Status status; + + // Initialize NVAPI + status = NvAPI_Initialize(); + NvDRSSessionHandle hSession = 0; + + if (status == NVAPI_OK) + { + // Create the session handle to access driver settings + status = NvAPI_DRS_CreateSession(&hSession); + if (status != NVAPI_OK) + { + nvapi_error(status); + } + else + { + //override driver setting as needed + ll_nvapi_init(hSession); + } + } + // Have to wait until after logging is initialized to display LFH info if (num_heaps > 0) { @@ -230,6 +346,15 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, LLAppViewer::sUpdaterInfo = NULL ; } + + + // (NVAPI) (6) We clean up. This is analogous to doing a free() + if (hSession) + { + NvAPI_DRS_DestroySession(hSession); + hSession = 0; + } + return 0; } diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 65bfc990d1..7b2c536f5a 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -919,7 +919,7 @@ public: bool uploadConfirmationCallback( const LLSD& notification, const LLSD& response, - boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder> responder) + LLPointer<LLNewAgentInventoryVariablePriceResponder> responder) { S32 option; std::string confirmation_url; @@ -949,7 +949,7 @@ public: void confirmUpload( const std::string& confirmation_url, - boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder> responder) + LLPointer<LLNewAgentInventoryVariablePriceResponder> responder) { if ( getFilename().empty() ) { @@ -1124,7 +1124,7 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog( // and cause sadness. mImpl->confirmUpload( confirmation_url, - boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this)); + LLPointer<LLNewAgentInventoryVariablePriceResponder>(this)); } else { @@ -1157,7 +1157,7 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog( mImpl, _1, _2, - boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this))); + LLPointer<LLNewAgentInventoryVariablePriceResponder>(this))); } } diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index c9543988a6..ea0b8f00a4 100644 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -62,6 +62,12 @@ void LLAttachmentsMgr::onIdle(void *) void LLAttachmentsMgr::onIdle() { + // Make sure we got a region before trying anything else + if( !gAgent.getRegion() ) + { + return; + } + S32 obj_count = mPendingAttachments.size(); if (obj_count == 0) { diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp index 0f1ce2bcd0..1d72397cbc 100644 --- a/indra/newview/llautoreplace.cpp +++ b/indra/newview/llautoreplace.cpp @@ -30,68 +30,60 @@ #include "llviewercontrol.h" #include "llnotificationsutil.h" -LLAutoReplace* LLAutoReplace::sInstance; - const char* LLAutoReplace::SETTINGS_FILE_NAME = "autoreplace.xml"; -LLAutoReplace::LLAutoReplace() -{ -} - -LLAutoReplace::~LLAutoReplace() +void LLAutoReplace::autoreplaceCallback(S32& replacement_start, S32& replacement_length, LLWString& replacement_string, S32& cursor_pos, const LLWString& input_text) { - sInstance = NULL; -} + // make sure these returned values are cleared in case there is no replacement + replacement_start = 0; + replacement_length = 0; + replacement_string.clear(); -void LLAutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos) -{ static LLCachedControl<bool> perform_autoreplace(gSavedSettings, "AutoReplace"); - if(perform_autoreplace) + if (perform_autoreplace) { - S32 wordEnd = cursorPos-1; - LLWString text = inputText.getWString(); + S32 word_end = cursor_pos - 1; - bool atSpace = (text[wordEnd] == ' '); - bool haveWord = (LLWStringUtil::isPartOfWord(text[wordEnd])); + bool at_space = (input_text[word_end] == ' '); + bool have_word = (LLWStringUtil::isPartOfWord(input_text[word_end])); - if (atSpace || haveWord) + if (at_space || have_word) { - if (atSpace && wordEnd > 0) + if (at_space && word_end > 0) { // find out if this space immediately follows a word - wordEnd--; - haveWord = (LLWStringUtil::isPartOfWord(text[wordEnd])); + word_end--; + have_word = (LLWStringUtil::isPartOfWord(input_text[word_end])); } - if (haveWord) + if (have_word) { - // wordEnd points to the end of a word, now find the start of the word + // word_end points to the end of a word, now find the start of the word std::string word; - S32 wordStart = wordEnd; - for ( S32 backOne = wordStart - 1; - backOne >= 0 && LLWStringUtil::isPartOfWord(text[backOne]); - backOne-- - ) + S32 word_start = word_end; + for (S32 back_one = word_start - 1; + back_one >= 0 && LLWStringUtil::isPartOfWord(input_text[back_one]); + back_one-- + ) { - wordStart--; // walk wordStart back to the beginning of the word + word_start--; // walk word_start back to the beginning of the word } - LL_DEBUGS("AutoReplace")<<"wordStart: "<<wordStart<<" wordEnd: "<<wordEnd<<LL_ENDL; - std::string strText = std::string(text.begin(), text.end()); - std::string lastWord = strText.substr(wordStart, wordEnd-wordStart+1); - std::string replacementWord( mSettings.replaceWord( lastWord ) ); + LL_DEBUGS("AutoReplace") << "word_start: " << word_start << " word_end: " << word_end << LL_ENDL; + std::string str_text = std::string(input_text.begin(), input_text.end()); + std::string last_word = str_text.substr(word_start, word_end - word_start + 1); + std::string replacement_word(mSettings.replaceWord(last_word)); - if ( replacementWord != lastWord ) + if (replacement_word != last_word) { // The last word is one for which we have a replacement - if (atSpace) + if (at_space) { - // replace the last word in the input - LLWString strNew = utf8str_to_wstring(replacementWord); - LLWString strOld = utf8str_to_wstring(lastWord); - int size_change = strNew.size() - strOld.size(); - - text.replace(wordStart,lastWord.length(),strNew); - inputText = wstring_to_utf8str(text); - cursorPos+=size_change; + // return the replacement string + replacement_start = word_start; + replacement_length = last_word.length(); + replacement_string = utf8str_to_wstring(replacement_word); + LLWString old_string = utf8str_to_wstring(last_word); + S32 size_change = replacement_string.size() - old_string.size(); + cursor_pos += size_change; } } } @@ -99,16 +91,6 @@ void LLAutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos) } } -LLAutoReplace* LLAutoReplace::getInstance() -{ - if(!sInstance) - { - sInstance = new LLAutoReplace(); - sInstance->loadFromSettings(); - } - return sInstance; -} - std::string LLAutoReplace::getUserSettingsFileName() { std::string path=gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); @@ -147,6 +129,15 @@ void LLAutoReplace::setSettings(const LLAutoReplaceSettings& newSettings) saveToUserSettings(); } +LLAutoReplace::LLAutoReplace() +{ +} + +void LLAutoReplace::initSingleton() +{ + loadFromSettings(); +} + void LLAutoReplace::loadFromSettings() { std::string filename=getUserSettingsFileName(); @@ -220,7 +211,7 @@ void LLAutoReplace::saveToUserSettings() std::string filename=getUserSettingsFileName(); llofstream file; file.open(filename.c_str()); - LLSDSerialize::toPrettyXML(mSettings.getAsLLSD(), file); + LLSDSerialize::toPrettyXML(mSettings.asLLSD(), file); file.close(); LL_INFOS("AutoReplace") << "settings saved to '" << filename << "'" << LL_ENDL; } @@ -536,6 +527,46 @@ LLAutoReplaceSettings::AddListResult LLAutoReplaceSettings::addList(const LLSD& return result; } +LLAutoReplaceSettings::AddListResult LLAutoReplaceSettings::replaceList(const LLSD& newList) +{ + AddListResult result = AddListInvalidList; + if ( listIsValid( newList ) ) + { + std::string listName = newList[AUTOREPLACE_LIST_NAME].asString(); + bool listFound = false; + S32 search_index; + LLSD targetList; + // The following is working around the fact that LLSD arrays containing maps also seem to have undefined entries... see LLSD-30 + for ( search_index = 0, targetList = mLists[0]; + !listFound && search_index < mLists.size(); + search_index += 1, targetList = mLists[search_index] + ) + { + if ( targetList.isMap() ) + { + if ( listNameMatches( targetList, listName) ) + { + LL_DEBUGS("AutoReplace")<<"list to replace found at "<<search_index<<LL_ENDL; + mLists.erase(search_index); + mLists.insert(search_index, newList); + listFound = true; + result = AddListOk; + } + } + } + + if ( ! listFound ) + { + LL_WARNS("AutoReplace") << "attempt to replace unconfigured list" << LL_ENDL; + } + } + else + { + LL_WARNS("AutoReplace") << "attempt to add invalid list" << LL_ENDL; + } + return result; +} + bool LLAutoReplaceSettings::removeReplacementList(std::string listName) { bool found = false; @@ -761,7 +792,7 @@ LLSD LLAutoReplaceSettings::getExampleLLSD() return example; } -const LLSD& LLAutoReplaceSettings::getAsLLSD() +const LLSD& LLAutoReplaceSettings::asLLSD() { return mLists; } diff --git a/indra/newview/llautoreplace.h b/indra/newview/llautoreplace.h index 30b1fd2c65..9eecc2d981 100644 --- a/indra/newview/llautoreplace.h +++ b/indra/newview/llautoreplace.h @@ -67,6 +67,9 @@ class LLAutoReplaceSettings /// Inserts a new list at the end of the priority order AddListResult addList(const LLSD& newList); + /// Inserts a list in place of an existing list of the same name + AddListResult replaceList(const LLSD& newList); + /// Removes the named list, @returns false if not found bool removeReplacementList(std::string listName); @@ -129,7 +132,7 @@ class LLAutoReplaceSettings LLSD getExampleLLSD(); /// Get the actual settings as LLSD - const LLSD& getAsLLSD(); + const LLSD& asLLSD(); ///< @note for use only in AutoReplace::saveToUserSettings private: @@ -180,49 +183,45 @@ class LLAutoReplaceSettings * When the end of a word is detected (defined as any punctuation character, * or any whitespace except newline or return), the preceding word is used * as a lookup key in an ordered list of maps. If a match is found in any - * map, the keyword is replaced by the associated value from the map. + * map, the replacement start index and length are returned along with the + * new replacement string. * * See the autoreplaceCallback method for how to add autoreplace functionality * to a text entry tool. */ class LLAutoReplace : public LLSingleton<LLAutoReplace> { - public: - LLAutoReplace(); - ~LLAutoReplace(); - - /// @return a pointer to the active instance - static LLAutoReplace* getInstance(); +public: + /// Callback that provides the hook for use in text entry methods + void autoreplaceCallback(S32& replacement_start, S32& replacement_length, LLWString& replacement_string, S32& cursor_pos, const LLWString& input_text); - /// Callback that provides the hook for use in text entry methods - void autoreplaceCallback(LLUIString& inputText, S32& cursorPos); + /// Get a copy of the current settings + LLAutoReplaceSettings getSettings(); - /// Get a copy of the current settings - LLAutoReplaceSettings getSettings(); + /// Commit new settings after making changes + void setSettings(const LLAutoReplaceSettings& settings); - /// Commit new settings after making changes - void setSettings(const LLAutoReplaceSettings& settings); - - private: - friend class LLSingleton<LLAutoReplace>; - static LLAutoReplace* sInstance; ///< the active settings instance +private: + friend class LLSingleton<LLAutoReplace>; + LLAutoReplace(); + /*virtual*/ void initSingleton(); - LLAutoReplaceSettings mSettings; ///< configuration information + LLAutoReplaceSettings mSettings; ///< configuration information - /// Read settings from persistent storage - void loadFromSettings(); + /// Read settings from persistent storage + void loadFromSettings(); - /// Make the newSettings active and write them to user storage - void saveToUserSettings(); + /// Make the newSettings active and write them to user storage + void saveToUserSettings(); - /// Compute the user settings file name - std::string getUserSettingsFileName(); + /// Compute the user settings file name + std::string getUserSettingsFileName(); - /// Compute the (read-ony) application settings file name - std::string getAppSettingsFileName(); + /// Compute the (read-ony) application settings file name + std::string getAppSettingsFileName(); - /// basename for the settings files - static const char* SETTINGS_FILE_NAME; + /// basename for the settings files + static const char* SETTINGS_FILE_NAME; }; #endif /* LLAUTOREPLACE_H */ diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index fdd4565e50..b513a52ff7 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -42,7 +42,9 @@ #include "llappviewer.h" // for gLastVersionChannel #include "llcachename.h" #include "llcallingcard.h" // for LLAvatarTracker +#include "llconversationlog.h" #include "llfloateravatarpicker.h" // for LLFloaterAvatarPicker +#include "llfloaterconversationpreview.h" #include "llfloatergroupinvite.h" #include "llfloatergroups.h" #include "llfloaterreg.h" @@ -55,6 +57,7 @@ #include "llinventorybridge.h" #include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType #include "llinventorypanel.h" +#include "llfloaterimcontainer.h" #include "llimview.h" // for gIMMgr #include "llmutelist.h" #include "llnotificationsutil.h" // for LLNotificationsUtil @@ -66,7 +69,6 @@ #include "llviewerobjectlist.h" #include "llviewermessage.h" // for handle_lure #include "llviewerregion.h" -#include "llimfloater.h" #include "lltrans.h" #include "llcallingcard.h" #include "llslurl.h" // IDEVO @@ -93,7 +95,7 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::strin LLRecentPeople::instance().add(id); } -void on_avatar_name_friendship(const LLUUID& id, const LLAvatarName av_name) +static void on_avatar_name_friendship(const LLUUID& id, const LLAvatarName av_name) { LLAvatarActions::requestFriendshipDialog(id, av_name.getCompleteName()); } @@ -134,7 +136,7 @@ void LLAvatarActions::removeFriendsDialog(const uuid_vec_t& ids) LLAvatarName av_name; if(LLAvatarNameCache::get(agent_id, &av_name)) { - args["NAME"] = av_name.mDisplayName; + args["NAME"] = av_name.getDisplayName(); } msgType = "RemoveFromFriends"; @@ -179,11 +181,11 @@ void LLAvatarActions::offerTeleport(const uuid_vec_t& ids) static void on_avatar_name_cache_start_im(const LLUUID& agent_id, const LLAvatarName& av_name) { - std::string name = av_name.getCompleteName(); + std::string name = av_name.getDisplayName(); LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, agent_id); if (session_id != LLUUID::null) { - LLIMFloater::show(session_id); + LLFloaterIMContainer::getInstance()->showConversation(session_id); } make_ui_sound("UISndStartIM"); } @@ -191,11 +193,10 @@ static void on_avatar_name_cache_start_im(const LLUUID& agent_id, // static void LLAvatarActions::startIM(const LLUUID& id) { - if (id.isNull()) + if (id.isNull() || gAgent.getID() == id) return; - LLAvatarNameCache::get(id, - boost::bind(&on_avatar_name_cache_start_im, _1, _2)); + LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_im, _1, _2)); } // static @@ -214,7 +215,7 @@ void LLAvatarActions::endIM(const LLUUID& id) static void on_avatar_name_cache_start_call(const LLUUID& agent_id, const LLAvatarName& av_name) { - std::string name = av_name.getCompleteName(); + std::string name = av_name.getDisplayName(); LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, agent_id, true); if (session_id != LLUUID::null) { @@ -230,12 +231,11 @@ void LLAvatarActions::startCall(const LLUUID& id) { return; } - LLAvatarNameCache::get(id, - boost::bind(&on_avatar_name_cache_start_call, _1, _2)); + LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_call, _1, _2)); } // static -void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids) +void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids, const LLUUID& floater_id) { if (ids.size() == 0) { @@ -252,7 +252,7 @@ void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids) // create the new ad hoc voice session const std::string title = LLTrans::getString("conference-title"); LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, - ids[0], id_array, true); + ids[0], id_array, true, floater_id); if (session_id == LLUUID::null) { return; @@ -285,7 +285,7 @@ bool LLAvatarActions::canCall() } // static -void LLAvatarActions::startConference(const uuid_vec_t& ids) +void LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUID& floater_id) { // *HACK: Copy into dynamic array LLDynamicArray<LLUUID> id_array; @@ -294,11 +294,15 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids) id_array.push_back(*it); } const std::string title = LLTrans::getString("conference-title"); - LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, ids[0], id_array); - if (session_id != LLUUID::null) + LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, ids[0], id_array, false, floater_id); + + if (session_id == LLUUID::null) { - LLIMFloater::show(session_id); + return; } + + LLFloaterIMContainer::getInstance()->showConversation(session_id); + make_ui_sound("UISndStartIM"); } @@ -310,19 +314,11 @@ static const char* get_profile_floater_name(const LLUUID& avatar_id) static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name) { - std::string username = av_name.mUsername; - if (username.empty()) - { - username = LLCacheName::buildUsername(av_name.mDisplayName); - } - - llinfos << "opening web profile for " << username << llendl; - std::string url = getProfileURL(username); + std::string url = getProfileURL(av_name.getAccountName()); // PROFILES: open in webkit window LLFloaterWebContent::Params p; - p.url(url). - id(agent_id.asString()); + p.url(url).id(agent_id.asString()); LLFloaterReg::showInstance(get_profile_floater_name(agent_id), p); } @@ -374,19 +370,19 @@ void LLAvatarActions::showOnMap(const LLUUID& id) return; } - gFloaterWorldMap->trackAvatar(id, av_name.mDisplayName); + gFloaterWorldMap->trackAvatar(id, av_name.getDisplayName()); LLFloaterReg::showInstance("world_map"); } // static void LLAvatarActions::pay(const LLUUID& id) { - LLNotification::Params params("BusyModePay"); + LLNotification::Params params("DoNotDisturbModePay"); params.functor.function(boost::bind(&LLAvatarActions::handlePay, _1, _2, id)); - if (gAgent.getBusy()) + if (gAgent.isDoNotDisturb()) { - // warn users of being in busy mode during a transaction + // warn users of being in do not disturb mode during a transaction LLNotifications::instance().add(params); } else @@ -448,6 +444,7 @@ void LLAvatarActions::share(const LLUUID& id) { LLSD key; LLFloaterSidePanelContainer::showPanel("inventory", key); + LLFloaterReg::showInstance("im_container"); LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL,id); @@ -529,23 +526,6 @@ namespace action_give_inventory return acceptable; } - static void build_residents_string(const std::vector<LLAvatarName> avatar_names, std::string& residents_string) - { - llassert(avatar_names.size() > 0); - - const std::string& separator = LLTrans::getString("words_separator"); - for (std::vector<LLAvatarName>::const_iterator it = avatar_names.begin(); ; ) - { - LLAvatarName av_name = *it; - residents_string.append(av_name.mDisplayName); - if (++it == avatar_names.end()) - { - break; - } - residents_string.append(separator); - } - } - static void build_items_string(const std::set<LLUUID>& inventory_selected_uuids , std::string& items_string) { llassert(inventory_selected_uuids.size() > 0); @@ -681,7 +661,7 @@ namespace action_give_inventory } std::string residents; - build_residents_string(avatar_names, residents); + LLAvatarActions::buildResidentsString(avatar_names, residents); std::string items; build_items_string(inventory_selected_uuids, items); @@ -712,38 +692,84 @@ namespace action_give_inventory } } +// static +void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string) +{ + llassert(avatar_names.size() > 0); + + std::sort(avatar_names.begin(), avatar_names.end()); + const std::string& separator = LLTrans::getString("words_separator"); + for (std::vector<LLAvatarName>::const_iterator it = avatar_names.begin(); ; ) + { + residents_string.append((*it).getDisplayName()); + if (++it == avatar_names.end()) + { + break; + } + residents_string.append(separator); + } +} +// static +void LLAvatarActions::buildResidentsString(const uuid_vec_t& avatar_uuids, std::string& residents_string) +{ + std::vector<LLAvatarName> avatar_names; + uuid_vec_t::const_iterator it = avatar_uuids.begin(); + for (; it != avatar_uuids.end(); ++it) + { + LLAvatarName av_name; + if (LLAvatarNameCache::get(*it, &av_name)) + { + avatar_names.push_back(av_name); + } + } + + // We should check whether the vector is not empty to pass the assertion + // that avatar_names.size() > 0 in LLAvatarActions::buildResidentsString. + if (!avatar_names.empty()) + { + LLAvatarActions::buildResidentsString(avatar_names, residents_string); + } +} //static std::set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs() { - std::set<LLUUID> inventory_selected_uuids; + std::set<LLFolderViewItem*> inventory_selected; LLInventoryPanel* active_panel = action_give_inventory::get_active_inventory_panel(); if (active_panel) { - inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList(); + inventory_selected= active_panel->getRootFolder()->getSelectionList(); } - if (inventory_selected_uuids.empty()) + if (inventory_selected.empty()) { LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); if (sidepanel_inventory) { - inventory_selected_uuids = sidepanel_inventory->getInboxSelectionList(); + inventory_selected= sidepanel_inventory->getInboxSelectionList(); } } + std::set<LLUUID> inventory_selected_uuids; + for (std::set<LLFolderViewItem*>::iterator it = inventory_selected.begin(), end_it = inventory_selected.end(); + it != end_it; + ++it) + { + inventory_selected_uuids.insert(static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID()); + } return inventory_selected_uuids; } //static -void LLAvatarActions::shareWithAvatars() +void LLAvatarActions::shareWithAvatars(LLView * panel) { using namespace action_give_inventory; + LLFloater* root_floater = gFloaterView->getParentFloater(panel); LLFloaterAvatarPicker* picker = - LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2), TRUE, FALSE); + LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2), TRUE, FALSE, FALSE, root_floater->getName()); if (!picker) { return; @@ -751,6 +777,11 @@ void LLAvatarActions::shareWithAvatars() picker->setOkBtnEnableCb(boost::bind(is_give_inventory_acceptable)); picker->openFriendsTab(); + + if (root_floater) + { + root_floater->addDependentFloater(picker); + } LLNotificationsUtil::add("ShareNotification"); } @@ -769,15 +800,15 @@ bool LLAvatarActions::canShareSelectedItems(LLInventoryPanel* inv_panel /* = NUL // check selection in the panel LLFolderView* root_folder = inv_panel->getRootFolder(); - const std::set<LLUUID> inventory_selected_uuids = root_folder->getSelectionList(); - if (inventory_selected_uuids.empty()) return false; // nothing selected + const std::set<LLFolderViewItem*> inventory_selected = root_folder->getSelectionList(); + if (inventory_selected.empty()) return false; // nothing selected bool can_share = true; - std::set<LLUUID>::const_iterator it = inventory_selected_uuids.begin(); - const std::set<LLUUID>::const_iterator it_end = inventory_selected_uuids.end(); + std::set<LLFolderViewItem*>::const_iterator it = inventory_selected.begin(); + const std::set<LLFolderViewItem*>::const_iterator it_end = inventory_selected.end(); for (; it != it_end; ++it) { - LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it); + LLViewerInventoryCategory* inv_cat = gInventory.getCategory(static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID()); // any category can be offered. if (inv_cat) { @@ -785,9 +816,9 @@ bool LLAvatarActions::canShareSelectedItems(LLInventoryPanel* inv_panel /* = NUL } // check if inventory item can be given - LLFolderViewItem* item = root_folder->getItemByID(*it); + LLFolderViewItem* item = *it; if (!item) return false; - LLInvFVBridge* bridge = dynamic_cast<LLInvFVBridge*>(item->getListener()); + LLInvFVBridge* bridge = dynamic_cast<LLInvFVBridge*>(item->getViewModelItem()); if (bridge && bridge->canShare()) { continue; @@ -820,6 +851,26 @@ void LLAvatarActions::toggleBlock(const LLUUID& id) } // static +void LLAvatarActions::toggleMuteVoice(const LLUUID& id) +{ + std::string name; + gCacheName->getFullName(id, name); // needed for mute + + LLMuteList* mute_list = LLMuteList::getInstance(); + bool is_muted = mute_list->isMuted(id, LLMute::flagVoiceChat); + + LLMute mute(id, name, LLMute::AGENT); + if (!is_muted) + { + mute_list->add(mute, LLMute::flagVoiceChat); + } + else + { + mute_list->remove(mute, LLMute::flagVoiceChat); + } +} + +// static bool LLAvatarActions::canOfferTeleport(const LLUUID& id) { // First use LLAvatarTracker::isBuddy() @@ -865,6 +916,33 @@ void LLAvatarActions::inviteToGroup(const LLUUID& id) } } +// static +void LLAvatarActions::viewChatHistory(const LLUUID& id) +{ + const std::vector<LLConversation>& conversations = LLConversationLog::instance().getConversations(); + std::vector<LLConversation>::const_iterator iter = conversations.begin(); + + for (; iter != conversations.end(); ++iter) + { + if (iter->getParticipantID() == id) + { + LLFloaterReg::showInstance("preview_conversation", iter->getSessionID(), true); + return; + } + } + + if (LLLogChat::isTranscriptExist(id)) + { + LLAvatarName avatar_name; + LLSD extended_id(id); + + LLAvatarNameCache::get(id, &avatar_name); + extended_id[LL_FCP_COMPLETE_NAME] = avatar_name.getCompleteName(); + extended_id[LL_FCP_ACCOUNT_NAME] = avatar_name.getAccountName(); + LLFloaterReg::showInstance("preview_conversation", extended_id, true); + } +} + //== private methods ======================================================================================== // static @@ -907,7 +985,7 @@ bool LLAvatarActions::handlePay(const LLSD& notification, const LLSD& response, S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { - gAgent.clearBusy(); + gAgent.setDoNotDisturb(false); } LLFloaterPayUtil::payDirectly(&give_money, avatar_id, /*is_group=*/false); @@ -1015,7 +1093,6 @@ void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::stri LLSD payload; payload["from_id"] = target_id; - payload["SUPPRESS_TOAST"] = true; LLNotificationsUtil::add("FriendshipOffered", args, payload); } @@ -1034,6 +1111,12 @@ bool LLAvatarActions::isBlocked(const LLUUID& id) } // static +bool LLAvatarActions::isVoiceMuted(const LLUUID& id) +{ + return LLMuteList::getInstance()->isMuted(id, LLMute::flagVoiceChat); +} + +// static bool LLAvatarActions::canBlock(const LLUUID& id) { std::string full_name; diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 748b7cb3d1..6e1198cd09 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -34,8 +34,10 @@ #include <string> #include <vector> +class LLAvatarName; class LLInventoryPanel; class LLFloater; +class LLView; /** * Friend-related actions (add, remove, offer teleport, etc) @@ -81,14 +83,14 @@ public: static void startCall(const LLUUID& id); /** - * Start an ad-hoc conference voice call with multiple users + * Start an ad-hoc conference voice call with multiple users in a specific IM floater. */ - static void startAdhocCall(const uuid_vec_t& ids); + static void startAdhocCall(const uuid_vec_t& ids, const LLUUID& floater_id = LLUUID::null); /** - * Start conference chat with the given avatars. + * Start conference chat with the given avatars in a specific IM floater. */ - static void startConference(const uuid_vec_t& ids); + static void startConference(const uuid_vec_t& ids, const LLUUID& floater_id = LLUUID::null); /** * Show avatar profile. @@ -116,7 +118,7 @@ public: /** * Share items with the picked avatars. */ - static void shareWithAvatars(); + static void shareWithAvatars(LLView * panel); /** * Block/unblock the avatar. @@ -124,6 +126,11 @@ public: static void toggleBlock(const LLUUID& id); /** + * Block/unblock the avatar voice. + */ + static void toggleMuteVoice(const LLUUID& id); + + /** * Return true if avatar with "id" is a friend */ static bool isFriend(const LLUUID& id); @@ -134,6 +141,11 @@ public: static bool isBlocked(const LLUUID& id); /** + * @return true if the avatar voice is blocked + */ + static bool isVoiceMuted(const LLUUID& id); + + /** * @return true if you can block the avatar */ static bool canBlock(const LLUUID& id); @@ -198,6 +210,27 @@ public: */ static bool canShareSelectedItems(LLInventoryPanel* inv_panel = NULL); + /** + * Builds a string of residents' display names separated by "words_separator" string. + * + * @param avatar_names - a vector of given avatar names from which resulting string is built + * @param residents_string - the resulting string + */ + static void buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string); + + /** + * Builds a string of residents' display names separated by "words_separator" string. + * + * @param avatar_uuids - a vector of given avatar uuids from which resulting string is built + * @param residents_string - the resulting string + */ + static void buildResidentsString(const uuid_vec_t& avatar_uuids, std::string& residents_string); + + /** + * Opens the chat history for avatar + */ + static void viewChatHistory(const LLUUID& id); + static std::set<LLUUID> getInventorySelectedUUIDs(); private: diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index b539ac38ed..714bde6f37 100644..100755 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -28,6 +28,8 @@ #include "llavatariconctrl.h" +#include <boost/signals2.hpp> + // viewer includes #include "llagent.h" #include "llavatarconstants.h" @@ -36,7 +38,7 @@ #include "llmenugl.h" #include "lluictrlfactory.h" #include "llagentdata.h" -#include "llimfloater.h" +#include "llfloaterimsession.h" // library includes #include "llavatarnamecache.h" @@ -148,9 +150,13 @@ LLAvatarIconCtrl::Params::Params() LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p) -: LLIconCtrl(p), + : LLIconCtrl(p), + LLAvatarPropertiesObserver(), + mAvatarId(), + mFullName(), mDrawTooltip(p.draw_tooltip), - mDefaultIconName(p.default_icon_name) + mDefaultIconName(p.default_icon_name), + mAvatarNameCacheConnection() { mPriority = LLViewerFetchedTexture::BOOST_ICON; @@ -203,6 +209,11 @@ LLAvatarIconCtrl::~LLAvatarIconCtrl() LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarId, this); // Name callbacks will be automatically disconnected since LLUICtrl is trackable } + + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } } //virtual @@ -245,9 +256,19 @@ void LLAvatarIconCtrl::setValue(const LLSD& value) LLIconCtrl::setValue(value); } - LLAvatarNameCache::get(mAvatarId, - boost::bind(&LLAvatarIconCtrl::onAvatarNameCache, - this, _1, _2)); + fetchAvatarName(); +} + +void LLAvatarIconCtrl::fetchAvatarName() +{ + if (mAvatarId.notNull()) + { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(mAvatarId, boost::bind(&LLAvatarIconCtrl::onAvatarNameCache, this, _1, _2)); + } } bool LLAvatarIconCtrl::updateFromCache() @@ -292,11 +313,13 @@ void LLAvatarIconCtrl::processProperties(void* data, EAvatarProcessorType type) void LLAvatarIconCtrl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) { + mAvatarNameCacheConnection.disconnect(); + if (agent_id == mAvatarId) { // Most avatar icon controls are next to a UI element that shows // a display name, so only show username. - mFullName = av_name.mUsername; + mFullName = av_name.getUserName(); if (mDrawTooltip) { diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h index 7f568fc5b8..4929efb7d0 100644 --- a/indra/newview/llavatariconctrl.h +++ b/indra/newview/llavatariconctrl.h @@ -27,7 +27,9 @@ #ifndef LL_LLAVATARICONCTRL_H #define LL_LLAVATARICONCTRL_H -#include "lliconctrl.h" +#include <boost/signals2.hpp> + +#include "../llui/lliconctrl.h" #include "llavatarpropertiesprocessor.h" #include "llviewermenu.h" @@ -86,20 +88,24 @@ public: // LLAvatarPropertiesProcessor observer trigger virtual void processProperties(void* data, EAvatarProcessorType type); - void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); - const LLUUID& getAvatarId() const { return mAvatarId; } const std::string& getFullName() const { return mFullName; } void setDrawTooltip(bool value) { mDrawTooltip = value;} protected: - LLUUID mAvatarId; - std::string mFullName; - bool mDrawTooltip; - std::string mDefaultIconName; + LLUUID mAvatarId; + std::string mFullName; + bool mDrawTooltip; + std::string mDefaultIconName; bool updateFromCache(); + +private: + void fetchAvatarName(); + void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); + + boost::signals2::connection mAvatarNameCacheConnection; }; #endif // LL_LLAVATARICONCTRL_H diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 771419f60a..9f02f301a1 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -46,6 +46,7 @@ #include "lluuid.h" #include "llvoiceclient.h" #include "llviewercontrol.h" // for gSavedSettings +#include "lltooldraganddrop.h" static LLDefaultChildRegistry::Register<LLAvatarList> r("avatar_list"); @@ -278,7 +279,7 @@ void LLAvatarList::refresh() LLAvatarName av_name; have_names &= LLAvatarNameCache::get(buddy_id, &av_name); - if (!have_filter || findInsensitive(av_name.mDisplayName, mNameFilter)) + if (!have_filter || findInsensitive(av_name.getDisplayName(), mNameFilter)) { if (nadded >= ADD_LIMIT) { @@ -296,8 +297,9 @@ void LLAvatarList::refresh() } else { + std::string display_name = av_name.getDisplayName(); addNewItem(buddy_id, - av_name.mDisplayName.empty() ? waiting_str : av_name.mDisplayName, + display_name.empty() ? waiting_str : display_name, LLAvatarTracker::instance().isBuddyOnline(buddy_id)); } @@ -325,7 +327,7 @@ void LLAvatarList::refresh() const LLUUID& buddy_id = it->asUUID(); LLAvatarName av_name; have_names &= LLAvatarNameCache::get(buddy_id, &av_name); - if (!findInsensitive(av_name.mDisplayName, mNameFilter)) + if (!findInsensitive(av_name.getDisplayName(), mNameFilter)) { removeItemByUUID(buddy_id); modified = true; @@ -398,7 +400,7 @@ bool LLAvatarList::filterHasMatches() // If name has not been loaded yet we consider it as a match. // When the name will be loaded the filter will be applied again(in refresh()). - if (have_name && !findInsensitive(av_name.mDisplayName, mNameFilter)) + if (have_name && !findInsensitive(av_name.getDisplayName(), mNameFilter)) { continue; } @@ -461,6 +463,57 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask) return handled; } +BOOL LLAvatarList::handleMouseDown(S32 x, S32 y, MASK mask) +{ + gFocusMgr.setMouseCapture(this); + + S32 screen_x; + S32 screen_y; + localPointToScreen(x, y, &screen_x, &screen_y); + LLToolDragAndDrop::getInstance()->setDragStart(screen_x, screen_y); + + return LLFlatListViewEx::handleMouseDown(x, y, mask); +} + +BOOL LLAvatarList::handleMouseUp( S32 x, S32 y, MASK mask ) +{ + if(hasMouseCapture()) + { + gFocusMgr.setMouseCapture(NULL); + } + + return LLFlatListViewEx::handleMouseUp(x, y, mask); +} + +BOOL LLAvatarList::handleHover(S32 x, S32 y, MASK mask) +{ + bool handled = hasMouseCapture(); + if(handled) + { + S32 screen_x; + S32 screen_y; + localPointToScreen(x, y, &screen_x, &screen_y); + + if(LLToolDragAndDrop::getInstance()->isOverThreshold(screen_x, screen_y)) + { + // First, create the global drag and drop object + std::vector<EDragAndDropType> types; + uuid_vec_t cargo_ids; + getSelectedUUIDs(cargo_ids); + types.resize(cargo_ids.size(), DAD_PERSON); + LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_PEOPLE; + LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, src); + } + } + + if(!handled) + { + handled = LLFlatListViewEx::handleHover(x, y, mask); + } + + return handled; +} + bool LLAvatarList::isAvalineItemSelected() { std::vector<LLPanel*> selected_items; diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 4814a88a79..3542577ae3 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -84,6 +84,9 @@ public: bool getIconsVisible() const { return mShowIcons; } const std::string getIconParamName() const{return mIconParamName;} virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); + /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); // Return true if filter has at least one match. bool filterHasMatches(); diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 30eecfe323..3e6c817dd6 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -27,6 +27,8 @@ #include "llviewerprecompiledheaders.h" +#include <boost/signals2.hpp> + #include "llavataractions.h" #include "llavatarlistitem.h" @@ -38,6 +40,7 @@ #include "llavatarnamecache.h" #include "llavatariconctrl.h" #include "lloutputmonitorctrl.h" +#include "lltooldraganddrop.h" bool LLAvatarListItem::sStaticInitialized = false; S32 LLAvatarListItem::sLeftPadding = 0; @@ -58,7 +61,8 @@ LLAvatarListItem::Params::Params() LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/) -: LLPanel(), + : LLPanel(), + LLFriendObserver(), mAvatarIcon(NULL), mAvatarName(NULL), mLastInteractionTime(NULL), @@ -73,7 +77,8 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/) mShowInfoBtn(true), mShowProfileBtn(true), mShowPermissions(false), - mHovered(false) + mHovered(false), + mAvatarNameCacheConnection() { if (not_from_ui_factory) { @@ -86,7 +91,14 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/) LLAvatarListItem::~LLAvatarListItem() { if (mAvatarId.notNull()) + { LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarId, this); + } + + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } } BOOL LLAvatarListItem::postBuild() @@ -129,6 +141,29 @@ BOOL LLAvatarListItem::postBuild() return TRUE; } +void LLAvatarListItem::handleVisibilityChange ( BOOL new_visibility ) +{ + //Adjust positions of icons (info button etc) when + //speaking indicator visibility was changed/toggled while panel was closed (not visible) + if(new_visibility && mSpeakingIndicator->getIndicatorToggled()) + { + updateChildren(); + mSpeakingIndicator->setIndicatorToggled(false); + } +} + +void LLAvatarListItem::fetchAvatarName() +{ + if (mAvatarId.notNull()) + { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLAvatarListItem::onAvatarNameCache, this, _2)); + } +} + S32 LLAvatarListItem::notifyParent(const LLSD& info) { if (info.has("visibility_changed")) @@ -259,8 +294,7 @@ void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, b mAvatarIcon->setValue(id); // Set avatar name. - LLAvatarNameCache::get(id, - boost::bind(&LLAvatarListItem::onAvatarNameCache, this, _2)); + fetchAvatarName(); } } @@ -358,8 +392,7 @@ std::string LLAvatarListItem::getAvatarToolTip() const void LLAvatarListItem::updateAvatarName() { - LLAvatarNameCache::get(getAvatarId(), - boost::bind(&LLAvatarListItem::onAvatarNameCache, this, _2)); + fetchAvatarName(); } //== PRIVATE SECITON ========================================================== @@ -371,8 +404,10 @@ void LLAvatarListItem::setNameInternal(const std::string& name, const std::strin void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name) { - setAvatarName(av_name.mDisplayName); - setAvatarToolTip(av_name.mUsername); + mAvatarNameCacheConnection.disconnect(); + + setAvatarName(av_name.getDisplayName()); + setAvatarToolTip(av_name.getUserName()); //requesting the list to resort notifyParent(LLSD().with("sort", LLSD())); diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index c95ac39696..7ef35a746e 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -27,6 +27,8 @@ #ifndef LL_LLAVATARLISTITEM_H #define LL_LLAVATARLISTITEM_H +#include <boost/signals2.hpp> + #include "llpanel.h" #include "lloutputmonitorctrl.h" #include "llbutton.h" @@ -82,6 +84,7 @@ public: /** * Processes notification from speaker indicator to update children when indicator's visibility is changed. */ + virtual void handleVisibilityChange ( BOOL new_visibility ); virtual S32 notifyParent(const LLSD& info); virtual void onMouseLeave(S32 x, S32 y, MASK mask); virtual void onMouseEnter(S32 x, S32 y, MASK mask); @@ -214,6 +217,9 @@ private: /// true when the mouse pointer is hovering over this item bool mHovered; + + void fetchAvatarName(); + boost::signals2::connection mAvatarNameCacheConnection; static bool sStaticInitialized; // this variable is introduced to improve code readability static S32 sLeftPadding; // padding to first left visible child (icon or name) diff --git a/indra/newview/llblockedlistitem.cpp b/indra/newview/llblockedlistitem.cpp new file mode 100644 index 0000000000..d9afd2b629 --- /dev/null +++ b/indra/newview/llblockedlistitem.cpp @@ -0,0 +1,114 @@ +/** + * @file llviewerobjectlistitem.cpp + * @brief viewer object list item implementation + * + * Class LLPanelInventoryListItemBase displays inventory item as an element + * of LLInventoryItemsList. + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llblockedlistitem.h" + +// llui +#include "lliconctrl.h" +#include "lltextbox.h" +#include "lltextutil.h" + +// newview +#include "llavatariconctrl.h" +#include "llgroupiconctrl.h" +#include "llinventoryicon.h" +#include "llviewerobject.h" + +LLBlockedListItem::LLBlockedListItem(const LLMute* item) +: LLPanel(), + mItemID(item->mID), + mItemName(item->mName), + mMuteType(item->mType) +{ + buildFromFile("panel_blocked_list_item.xml"); +} + +BOOL LLBlockedListItem::postBuild() +{ + mTitleCtrl = getChild<LLTextBox>("item_name"); + mTitleCtrl->setValue(mItemName); + + switch (mMuteType) + { + case LLMute::AGENT: + case LLMute::EXTERNAL: + { + LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon"); + avatar_icon->setVisible(TRUE); + avatar_icon->setValue(mItemID); + } + break; + case LLMute::GROUP: + { + LLGroupIconCtrl* group_icon = getChild<LLGroupIconCtrl>("group_icon"); + group_icon->setVisible(TRUE); + group_icon->setValue(mItemID); + } + break; + case LLMute::OBJECT: + case LLMute::BY_NAME: + getChild<LLUICtrl>("object_icon")->setVisible(TRUE); + break; + + default: + break; + } + + return TRUE; +} + +void LLBlockedListItem::onMouseEnter(S32 x, S32 y, MASK mask) +{ + getChildView("hovered_icon")->setVisible(true); + LLPanel::onMouseEnter(x, y, mask); +} + +void LLBlockedListItem::onMouseLeave(S32 x, S32 y, MASK mask) +{ + getChildView("hovered_icon")->setVisible(false); + LLPanel::onMouseLeave(x, y, mask); +} + +void LLBlockedListItem::setValue(const LLSD& value) +{ + if (!value.isMap() || !value.has("selected")) + { + return; + } + + getChildView("selected_icon")->setVisible(value["selected"]); +} + +void LLBlockedListItem::highlightName(const std::string& highlited_text) +{ + LLStyle::Params params; + LLTextUtil::textboxSetHighlightedVal(mTitleCtrl, params, mItemName, highlited_text); +} diff --git a/indra/newview/llblockedlistitem.h b/indra/newview/llblockedlistitem.h new file mode 100644 index 0000000000..05409e8a3b --- /dev/null +++ b/indra/newview/llblockedlistitem.h @@ -0,0 +1,73 @@ +/** + * @file llviewerobjectlistitem.h + * @brief viewer object list item header file + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#ifndef LLVIEWEROBJECTLISTITEM_H_ +#define LLVIEWEROBJECTLISTITEM_H_ + +#include "llmutelist.h" +#include "llpanel.h" +#include "llstyle.h" +#include "lltextbox.h" +#include "lliconctrl.h" + +/** + * This class represents items of LLBlockList, which represents + * contents of LLMuteList. LLMuteList "consists" of LLMute items. + * Each LLMute represents either blocked avatar or object and + * stores info about mute type (avatar or object) + * + * Each item consists if object/avatar icon and object/avatar name + * + * To create a blocked list item just need to pass LLMute pointer + * and appropriate block list item will be created depending on + * LLMute type (LLMute::EType) and other LLMute's info + */ +class LLBlockedListItem : public LLPanel +{ +public: + + LLBlockedListItem(const LLMute* item); + virtual BOOL postBuild(); + + void onMouseEnter(S32 x, S32 y, MASK mask); + void onMouseLeave(S32 x, S32 y, MASK mask); + + virtual void setValue(const LLSD& value); + + void highlightName(const std::string& highlited_text); + const std::string& getName() const { return mItemName; } + const LLMute::EType& getType() const { return mMuteType; } + const LLUUID& getUUID() const { return mItemID; } + +private: + + LLTextBox* mTitleCtrl; + const LLUUID mItemID; + std::string mItemName; + LLMute::EType mMuteType; + +}; + +#endif /* LLVIEWEROBJECTLISTITEM_H_ */ diff --git a/indra/newview/llblocklist.cpp b/indra/newview/llblocklist.cpp new file mode 100644 index 0000000000..066cb71677 --- /dev/null +++ b/indra/newview/llblocklist.cpp @@ -0,0 +1,284 @@ +/** + * @file llblocklist.cpp + * @brief List of the blocked avatars and objects. + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llblocklist.h" + +#include "llavataractions.h" +#include "llblockedlistitem.h" +#include "llfloatersidepanelcontainer.h" +#include "llviewermenu.h" + +static LLDefaultChildRegistry::Register<LLBlockList> r("block_list"); + +static const LLBlockListNameComparator NAME_COMPARATOR; +static const LLBlockListNameTypeComparator NAME_TYPE_COMPARATOR; + +LLBlockList::LLBlockList(const Params& p) +: LLFlatListViewEx(p), + mSelectedItem(NULL), + mDirty(true) +{ + + LLMuteList::getInstance()->addObserver(this); + + // Set up context menu. + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; + + registrar.add ("Block.Action", boost::bind(&LLBlockList::onCustomAction, this, _2)); + enable_registrar.add("Block.Enable", boost::bind(&LLBlockList::isActionEnabled, this, _2)); + + LLToggleableMenu* context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>( + "menu_people_blocked_gear.xml", + gMenuHolder, + LLViewerMenuHolderGL::child_registry_t::instance()); + if(context_menu) + { + mContextMenu = context_menu->getHandle(); + } +} + +LLBlockList::~LLBlockList() +{ + if (mContextMenu.get()) + { + mContextMenu.get()->die(); + } + + LLMuteList::getInstance()->removeObserver(this); +} + +BOOL LLBlockList::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask); + + LLToggleableMenu* context_menu = mContextMenu.get(); + if (context_menu && size()) + { + context_menu->buildDrawLabels(); + context_menu->updateParent(LLMenuGL::sMenuContainer); + LLMenuGL::showPopup(this, context_menu, x, y); + } + + return handled; +} + +void LLBlockList::setNameFilter(const std::string& filter) +{ + std::string filter_upper = filter; + LLStringUtil::toUpper(filter_upper); + if (mNameFilter != filter_upper) + { + mNameFilter = filter_upper; + setDirty(); + } +} + +void LLBlockList::sortByName() +{ + setComparator(&NAME_COMPARATOR); + sort(); +} + +void LLBlockList::sortByType() +{ + setComparator(&NAME_TYPE_COMPARATOR); + sort(); +} + +void LLBlockList::draw() +{ + if (mDirty) + { + refresh(); + } + + LLFlatListView::draw(); +} + +void LLBlockList::addNewItem(const LLMute* mute) +{ + LLBlockedListItem* item = new LLBlockedListItem(mute); + if (!mNameFilter.empty()) + { + item->highlightName(mNameFilter); + } + addItem(item, item->getUUID(), ADD_BOTTOM); +} + +void LLBlockList::refresh() +{ + bool have_filter = !mNameFilter.empty(); + + // save selection to restore it after list rebuilt + LLUUID selected = getSelectedUUID(); + + // calling refresh may be initiated by removing currently selected item + // so select next item and save the selection to restore it after list rebuilt + if (!selectNextItemPair(false, true)) + { + selectNextItemPair(true, true); + } + LLUUID next_selected = getSelectedUUID(); + + clear(); + + std::vector<LLMute> mutes = LLMuteList::instance().getMutes(); + std::vector<LLMute>::const_iterator mute_it = mutes.begin(); + + for (; mute_it != mutes.end(); ++mute_it) + { + if (have_filter && !findInsensitive(mute_it->mName, mNameFilter)) + continue; + + addNewItem(&*mute_it); + } + + if (getItemPair(selected)) + { + // restore previously selected item + selectItemPair(getItemPair(selected), true); + } + else if (getItemPair(next_selected)) + { + // previously selected item was removed, so select next item + selectItemPair(getItemPair(next_selected), true); + } + + // Sort the list. + sort(); + + setDirty(false); +} + +bool LLBlockList::findInsensitive(std::string haystack, const std::string& needle_upper) +{ + LLStringUtil::toUpper(haystack); + return haystack.find(needle_upper) != std::string::npos; +} + +LLBlockedListItem* LLBlockList::getBlockedItem() const +{ + LLPanel* panel = LLFlatListView::getSelectedItem(); + LLBlockedListItem* item = dynamic_cast<LLBlockedListItem*>(panel); + return item; +} + +bool LLBlockList::isActionEnabled(const LLSD& userdata) +{ + bool action_enabled = true; + + const std::string command_name = userdata.asString(); + + if ("profile_item" == command_name) + { + LLBlockedListItem* item = getBlockedItem(); + action_enabled = item && (LLMute::AGENT == item->getType()); + } + + if ("unblock_item" == command_name) + { + action_enabled = getSelectedItem() != NULL; + } + + return action_enabled; +} + +void LLBlockList::onCustomAction(const LLSD& userdata) +{ + if (!isActionEnabled(userdata)) + { + return; + } + + LLBlockedListItem* item = getBlockedItem(); + const std::string command_name = userdata.asString(); + + if ("unblock_item" == command_name) + { + LLMute mute(item->getUUID(), item->getName()); + LLMuteList::getInstance()->remove(mute); + } + else if ("profile_item" == command_name) + { + switch(item->getType()) + { + + case LLMute::AGENT: + LLAvatarActions::showProfile(item->getUUID()); + break; + + default: + break; + } + } +} + +bool LLBlockListItemComparator::compare(const LLPanel* item1, const LLPanel* item2) const +{ + const LLBlockedListItem* blocked_item1 = dynamic_cast<const LLBlockedListItem*>(item1); + const LLBlockedListItem* blocked_item2 = dynamic_cast<const LLBlockedListItem*>(item2); + + if (!blocked_item1 || !blocked_item2) + { + llerror("blocked_item1 and blocked_item2 cannot be null", 0); + return true; + } + + return doCompare(blocked_item1, blocked_item2); +} + +bool LLBlockListNameComparator::doCompare(const LLBlockedListItem* blocked_item1, const LLBlockedListItem* blocked_item2) const +{ + std::string name1 = blocked_item1->getName(); + std::string name2 = blocked_item2->getName(); + + LLStringUtil::toUpper(name1); + LLStringUtil::toUpper(name2); + + return name1 < name2; +} + +bool LLBlockListNameTypeComparator::doCompare(const LLBlockedListItem* blocked_item1, const LLBlockedListItem* blocked_item2) const +{ + LLMute::EType type1 = blocked_item1->getType(); + LLMute::EType type2 = blocked_item2->getType(); + + // if mute type is LLMute::BY_NAME or LLMute::OBJECT it means that this mute is an object + bool both_mutes_are_objects = (LLMute::OBJECT == type1 || LLMute::BY_NAME == type1) && (LLMute::OBJECT == type2 || LLMute::BY_NAME == type2); + + // mute types may be different, but since both LLMute::BY_NAME and LLMute::OBJECT types represent objects + // it's needed to perform additional checking of both_mutes_are_objects variable + if (type1 != type2 && !both_mutes_are_objects) + { + // objects in block list go first, so return true if mute type is not an avatar + return LLMute::AGENT != type1; + } + + return NAME_COMPARATOR.compare(blocked_item1, blocked_item2); +} diff --git a/indra/newview/llblocklist.h b/indra/newview/llblocklist.h new file mode 100644 index 0000000000..1a215710f4 --- /dev/null +++ b/indra/newview/llblocklist.h @@ -0,0 +1,138 @@ +/** + * @file llblocklist.h + * @brief List of the blocked avatars and objects. + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#ifndef LLBLOCKLIST_H_ +#define LLBLOCKLIST_H_ + +#include "llflatlistview.h" +#include "lllistcontextmenu.h" +#include "llmutelist.h" +#include "lltoggleablemenu.h" + +class LLBlockedListItem; +class LLMute; + +/** + * List of blocked avatars and objects. + * This list represents contents of the LLMuteList. + * Each change in LLMuteList leads to rebuilding this list, so + * it's always in actual state. + */ +class LLBlockList: public LLFlatListViewEx, public LLMuteListObserver +{ + LOG_CLASS(LLBlockList); +public: + struct Params : public LLInitParam::Block<Params, LLFlatListViewEx::Params> + { + Params(){}; + }; + + LLBlockList(const Params& p); + virtual ~LLBlockList(); + + virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + LLToggleableMenu* getContextMenu() const { return mContextMenu.get(); } + LLBlockedListItem* getBlockedItem() const; + + virtual void onChange() { refresh(); } + virtual void draw(); + + void setNameFilter(const std::string& filter); + void sortByName(); + void sortByType(); + void refresh(); + +private: + + void addNewItem(const LLMute* mute); + void setDirty(bool dirty = true) { mDirty = dirty; } + bool findInsensitive(std::string haystack, const std::string& needle_upper); + + bool isActionEnabled(const LLSD& userdata); + void onCustomAction (const LLSD& userdata); + + + LLHandle<LLToggleableMenu> mContextMenu; + + LLBlockedListItem* mSelectedItem; + std::string mNameFilter; + bool mDirty; + +}; + + +/* + * Abstract comparator for blocked items + */ +class LLBlockListItemComparator : public LLFlatListView::ItemComparator +{ + LOG_CLASS(LLBlockListItemComparator); + +public: + LLBlockListItemComparator() {}; + virtual ~LLBlockListItemComparator() {}; + + virtual bool compare(const LLPanel* item1, const LLPanel* item2) const; + +protected: + + virtual bool doCompare(const LLBlockedListItem* blocked_item1, const LLBlockedListItem* blocked_item2) const = 0; +}; + + +/* + * Compares items by name + */ +class LLBlockListNameComparator : public LLBlockListItemComparator +{ + LOG_CLASS(LLBlockListNameComparator); + +public: + LLBlockListNameComparator() {}; + virtual ~LLBlockListNameComparator() {}; + +protected: + + virtual bool doCompare(const LLBlockedListItem* blocked_item1, const LLBlockedListItem* blocked_item2) const; +}; + +/* + * Compares items by type and then by name within type + * Objects come first then avatars + */ +class LLBlockListNameTypeComparator : public LLBlockListItemComparator +{ + LOG_CLASS(LLBlockListNameTypeComparator); + +public: + LLBlockListNameTypeComparator() {}; + virtual ~LLBlockListNameTypeComparator() {}; + +protected: + + virtual bool doCompare(const LLBlockedListItem* blocked_item1, const LLBlockedListItem* blocked_item2) const; +}; + +#endif /* LLBLOCKLIST_H_ */ diff --git a/indra/newview/llbrowsernotification.cpp b/indra/newview/llbrowsernotification.cpp index 6e77d1e336..19747757db 100644 --- a/indra/newview/llbrowsernotification.cpp +++ b/indra/newview/llbrowsernotification.cpp @@ -35,11 +35,13 @@ using namespace LLNotificationsUI; -bool LLBrowserNotification::processNotification(const LLSD& notify) +LLBrowserNotification::LLBrowserNotification() + : LLSystemNotificationHandler("Browser", "browser") { - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - if (!notification) return false; +} +bool LLBrowserNotification::processNotification(const LLNotificationPtr& notification) +{ LLUUID media_id = notification->getPayload()["media_id"].asUUID(); LLMediaCtrl* media_instance = LLMediaCtrl::getInstance(media_id); if (media_instance) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp deleted file mode 100644 index f2375bfa4f..0000000000 --- a/indra/newview/llcallfloater.cpp +++ /dev/null @@ -1,821 +0,0 @@ -/** - * @file llcallfloater.cpp - * @author Mike Antipov - * @brief Voice Control Panel in a Voice Chats (P2P, Group, Nearby...). - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llcallfloater.h" - -#include "llnotificationsutil.h" -#include "lltrans.h" - -#include "llagent.h" -#include "llagentdata.h" // for gAgentID -#include "llavatarnamecache.h" -#include "llavatariconctrl.h" -#include "llavatarlist.h" -#include "lldraghandle.h" -#include "llimfloater.h" -#include "llimview.h" -#include "llfloaterreg.h" -#include "llparticipantlist.h" -#include "llspeakers.h" -#include "lltextutil.h" -#include "lltransientfloatermgr.h" -#include "llviewercontrol.h" -#include "llviewerdisplayname.h" -#include "llviewerwindow.h" -#include "llvoicechannel.h" -#include "llviewerparcelmgr.h" -#include "llfirstuse.h" - -static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids); -void reshape_floater(LLCallFloater* floater, S32 delta_height); - -class LLNonAvatarCaller : public LLAvatarListItem -{ -public: - LLNonAvatarCaller() : LLAvatarListItem(false) - { - - } - BOOL postBuild() - { - BOOL rv = LLAvatarListItem::postBuild(); - - if (rv) - { - setOnline(true); - showLastInteractionTime(false); - setShowProfileBtn(false); - setShowInfoBtn(false); - mAvatarIcon->setValue("Avaline_Icon"); - mAvatarIcon->setToolTip(std::string("")); - } - return rv; - } - - void setName(const std::string& name) - { - const std::string& formatted_phone = LLTextUtil::formatPhoneNumber(name); - LLAvatarListItem::setAvatarName(formatted_phone); - LLAvatarListItem::setAvatarToolTip(formatted_phone); - } - - void setSpeakerId(const LLUUID& id) { mSpeakingIndicator->setSpeakerId(id); } -}; - - -static void* create_non_avatar_caller(void*) -{ - return new LLNonAvatarCaller; -} - -LLVoiceChannel* LLCallFloater::sCurrentVoiceChannel = NULL; - -LLCallFloater::LLCallFloater(const LLSD& key) -: LLTransientDockableFloater(NULL, false, key) -, mSpeakerManager(NULL) -, mParticipants(NULL) -, mAvatarList(NULL) -, mNonAvatarCaller(NULL) -, mVoiceType(VC_LOCAL_CHAT) -, mAgentPanel(NULL) -, mSpeakingIndicator(NULL) -, mIsModeratorMutedVoice(false) -, mInitParticipantsVoiceState(false) -{ - static LLUICachedControl<S32> voice_left_remove_delay ("VoiceParticipantLeftRemoveDelay", 10); - mSpeakerDelayRemover = new LLSpeakersDelayActionsStorage(boost::bind(&LLCallFloater::removeVoiceLeftParticipant, this, _1), voice_left_remove_delay); - - mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); - LLVoiceClient::instance().addObserver(this); - LLTransientFloaterMgr::getInstance()->addControlView(this); - - // update the agent's name if display name setting change - LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLCallFloater::updateAgentModeratorState, this)); - LLViewerDisplayName::addNameChangedCallback(boost::bind(&LLCallFloater::updateAgentModeratorState, this)); - -} - -LLCallFloater::~LLCallFloater() -{ - resetVoiceRemoveTimers(); - delete mSpeakerDelayRemover; - - delete mParticipants; - mParticipants = NULL; - - mAvatarListRefreshConnection.disconnect(); - mVoiceChannelStateChangeConnection.disconnect(); - - if(LLVoiceClient::instanceExists()) - { - LLVoiceClient::getInstance()->removeObserver(this); - } - LLTransientFloaterMgr::getInstance()->removeControlView(this); -} - -// virtual -BOOL LLCallFloater::postBuild() -{ - mAvatarList = getChild<LLAvatarList>("speakers_list"); - mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLCallFloater::onAvatarListRefreshed, this)); - - childSetAction("leave_call_btn", boost::bind(&LLCallFloater::leaveCall, this)); - - mNonAvatarCaller = findChild<LLNonAvatarCaller>("non_avatar_caller"); - mNonAvatarCaller->setVisible(FALSE); - - initAgentData(); - - connectToChannel(LLVoiceChannel::getCurrentVoiceChannel()); - - updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) - - updateSession(); - return TRUE; -} - -// virtual -void LLCallFloater::onOpen(const LLSD& /*key*/) -{ - LLFirstUse::speak(false); -} - -// virtual -void LLCallFloater::draw() -{ - // we have to refresh participants to display ones not in voice as disabled. - // It should be done only when she joins or leaves voice chat. - // But seems that LLVoiceClientParticipantObserver is not enough to satisfy this requirement. - // *TODO: mantipov: remove from draw() - - // NOTE: it looks like calling onChange() here is not necessary, - // but sometime it is not called properly from the observable object. - // Seems this is a problem somewhere in Voice Client (LLVoiceClient::participantAddedEvent) -// onChange(); - - bool is_moderator_muted = LLVoiceClient::getInstance()->getIsModeratorMuted(gAgentID); - - if (mIsModeratorMutedVoice != is_moderator_muted) - { - setModeratorMutedVoice(is_moderator_muted); - } - - // Need to resort the participant list if it's in sort by recent speaker order. - if (mParticipants) - mParticipants->update(); - - LLFloater::draw(); -} - -// virtual -void LLCallFloater::setFocus( BOOL b ) -{ - LLFloater::setFocus(b); - - // Force using active floater transparency (STORM-730). - // We have to override setFocus() for LLCallFloater because selecting an item - // of the voice morphing combobox causes the floater to lose focus and thus become transparent. - updateTransparency(TT_ACTIVE); -} - -// virtual -void LLCallFloater::onParticipantsChanged() -{ - if (NULL == mParticipants) return; - updateParticipantsVoiceState(); - - // Add newly joined participants. - uuid_vec_t speakers_uuids; - get_voice_participants_uuids(speakers_uuids); - for (uuid_vec_t::const_iterator it = speakers_uuids.begin(); it != speakers_uuids.end(); it++) - { - mParticipants->addAvatarIDExceptAgent(*it); - } -} - -////////////////////////////////////////////////////////////////////////// -/// PRIVATE SECTION -////////////////////////////////////////////////////////////////////////// - -void LLCallFloater::leaveCall() -{ - LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); - if (voice_channel) - { - gIMMgr->endCall(voice_channel->getSessionID()); - } -} - -void LLCallFloater::updateSession() -{ - LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); - if (voice_channel) - { - LL_DEBUGS("Voice") << "Current voice channel: " << voice_channel->getSessionID() << LL_ENDL; - - if (mSpeakerManager && voice_channel->getSessionID() == mSpeakerManager->getSessionID()) - { - LL_DEBUGS("Voice") << "Speaker manager is already set for session: " << voice_channel->getSessionID() << LL_ENDL; - return; - } - else - { - mSpeakerManager = NULL; - } - } - - const LLUUID& session_id = voice_channel ? voice_channel->getSessionID() : LLUUID::null; - - LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); - if (im_session) - { - mSpeakerManager = LLIMModel::getInstance()->getSpeakerManager(session_id); - switch (im_session->mType) - { - case IM_NOTHING_SPECIAL: - case IM_SESSION_P2P_INVITE: - mVoiceType = VC_PEER_TO_PEER; - - if (!im_session->mOtherParticipantIsAvatar) - { - mVoiceType = VC_PEER_TO_PEER_AVALINE; - } - break; - case IM_SESSION_CONFERENCE_START: - case IM_SESSION_GROUP_START: - case IM_SESSION_INVITE: - if (gAgent.isInGroup(session_id)) - { - mVoiceType = VC_GROUP_CHAT; - } - else - { - mVoiceType = VC_AD_HOC_CHAT; - } - break; - default: - llwarning("Failed to determine voice call IM type", 0); - mVoiceType = VC_GROUP_CHAT; - break; - } - } - - if (NULL == mSpeakerManager) - { - // By default show nearby chat participants - mSpeakerManager = LLLocalSpeakerMgr::getInstance(); - LL_DEBUGS("Voice") << "Set DEFAULT speaker manager" << LL_ENDL; - mVoiceType = VC_LOCAL_CHAT; - } - - updateTitle(); - - // Hide "Leave Call" button for nearby chat - bool is_local_chat = mVoiceType == VC_LOCAL_CHAT; - getChildView("leave_call_btn_panel")->setVisible( !is_local_chat); - - refreshParticipantList(); - updateAgentModeratorState(); - - // Show floater for voice calls & only in CONNECTED to voice channel state - if (!is_local_chat && - voice_channel && - LLVoiceChannel::STATE_CONNECTED == voice_channel->getState()) - { - LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); - bool show_me = !(im_floater && im_floater->getVisible()); - if (show_me) - { - setVisible(true); - } - } -} - -void LLCallFloater::refreshParticipantList() -{ - bool non_avatar_caller = VC_PEER_TO_PEER_AVALINE == mVoiceType; - - if (non_avatar_caller) - { - LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSpeakerManager->getSessionID()); - mNonAvatarCaller->setSpeakerId(session->mOtherParticipantID); - mNonAvatarCaller->setName(session->mName); - } - - mNonAvatarCaller->setVisible(non_avatar_caller); - mAvatarList->setVisible(!non_avatar_caller); - - if (!non_avatar_caller) - { - llassert(mParticipants == NULL); // check for possible memory leak - mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT, false); - mParticipants->setValidateSpeakerCallback(boost::bind(&LLCallFloater::validateSpeaker, this, _1)); - const U32 speaker_sort_order = gSavedSettings.getU32("SpeakerParticipantDefaultOrder"); - mParticipants->setSortOrder(LLParticipantList::EParticipantSortOrder(speaker_sort_order)); - - if (LLLocalSpeakerMgr::getInstance() == mSpeakerManager) - { - mAvatarList->setNoItemsCommentText(getString("no_one_near")); - } - - // we have to made delayed initialization of voice state of participant list. - // it will be performed after first LLAvatarList refreshing in the onAvatarListRefreshed(). - mInitParticipantsVoiceState = true; - } -} - -void LLCallFloater::onAvatarListRefreshed() -{ - if (mInitParticipantsVoiceState) - { - initParticipantsVoiceState(); - mInitParticipantsVoiceState = false; - } - else - { - updateParticipantsVoiceState(); - } -} - -// static -void LLCallFloater::sOnCurrentChannelChanged(const LLUUID& /*session_id*/) -{ - LLVoiceChannel* channel = LLVoiceChannel::getCurrentVoiceChannel(); - - // *NOTE: if signal was sent for voice channel with LLVoiceChannel::STATE_NO_CHANNEL_INFO - // it sill be sent for the same channel again (when state is changed). - // So, lets ignore this call. - if (channel == sCurrentVoiceChannel) return; - - LLCallFloater* call_floater = LLFloaterReg::getTypedInstance<LLCallFloater>("voice_controls"); - - call_floater->connectToChannel(channel); -} - -void LLCallFloater::onAvatarNameCache(const LLUUID& agent_id, - const LLAvatarName& av_name) -{ - LLStringUtil::format_map_t args; - args["[NAME]"] = av_name.getCompleteName(); - std::string title = getString("title_peer_2_peer", args); - setTitle(title); -} - -void LLCallFloater::updateTitle() -{ - LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); - if (mVoiceType == VC_PEER_TO_PEER) - { - LLUUID session_id = voice_channel->getSessionID(); - LLIMModel::LLIMSession* im_session = - LLIMModel::getInstance()->findIMSession(session_id); - if (im_session) - { - LLAvatarNameCache::get(im_session->mOtherParticipantID, - boost::bind(&LLCallFloater::onAvatarNameCache, - this, _1, _2)); - return; - } - } - std::string title; - switch (mVoiceType) - { - case VC_LOCAL_CHAT: - title = getString("title_nearby"); - break; - case VC_PEER_TO_PEER: - case VC_PEER_TO_PEER_AVALINE: - { - title = voice_channel->getSessionName(); - - if (VC_PEER_TO_PEER_AVALINE == mVoiceType) - { - title = LLTextUtil::formatPhoneNumber(title); - } - - LLStringUtil::format_map_t args; - args["[NAME]"] = title; - title = getString("title_peer_2_peer", args); - } - break; - case VC_AD_HOC_CHAT: - title = getString("title_adhoc"); - break; - case VC_GROUP_CHAT: - { - LLStringUtil::format_map_t args; - args["[GROUP]"] = voice_channel->getSessionName(); - title = getString("title_group", args); - } - break; - } - - setTitle(title); -} - -void LLCallFloater::initAgentData() -{ - mAgentPanel = getChild<LLPanel> ("my_panel"); - - if ( mAgentPanel ) - { - mAgentPanel->getChild<LLUICtrl>("user_icon")->setValue(gAgentID); - - // Just use display name, because it's you - LLAvatarName av_name; - LLAvatarNameCache::get( gAgentID, &av_name ); - mAgentPanel->getChild<LLUICtrl>("user_text")->setValue(av_name.mDisplayName); - - mSpeakingIndicator = mAgentPanel->getChild<LLOutputMonitorCtrl>("speaking_indicator"); - mSpeakingIndicator->setSpeakerId(gAgentID); - } -} - -void LLCallFloater::setModeratorMutedVoice(bool moderator_muted) -{ - mIsModeratorMutedVoice = moderator_muted; - - if (moderator_muted) - { - LLNotificationsUtil::add("VoiceIsMutedByModerator"); - } - mSpeakingIndicator->setIsMuted(moderator_muted); -} - -void LLCallFloater::onModeratorNameCache(const LLAvatarName& av_name) -{ - std::string name; - name = av_name.mDisplayName; - - if(mSpeakerManager && gAgent.isInGroup(mSpeakerManager->getSessionID())) - { - // This method can be called when LLVoiceChannel.mState == STATE_NO_CHANNEL_INFO - // in this case there are not any speakers yet. - if (mSpeakerManager->findSpeaker(gAgentID)) - { - // Agent is Moderator - if (mSpeakerManager->findSpeaker(gAgentID)->mIsModerator) - - { - const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); - name += " " + moderator_indicator; - } - } - } - mAgentPanel->getChild<LLUICtrl>("user_text")->setValue(name); -} - -void LLCallFloater::updateAgentModeratorState() -{ - LLAvatarNameCache::get(gAgentID, boost::bind(&LLCallFloater::onModeratorNameCache, this, _2)); -} - -static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids) -{ - // Get a list of participants from VoiceClient - std::set<LLUUID> participants; - LLVoiceClient::getInstance()->getParticipantList(participants); - - for (std::set<LLUUID>::const_iterator iter = participants.begin(); - iter != participants.end(); ++iter) - { - speakers_uuids.push_back(*iter); - } - -} - -void LLCallFloater::initParticipantsVoiceState() -{ - // Set initial status for each participant in the list. - std::vector<LLPanel*> items; - mAvatarList->getItems(items); - std::vector<LLPanel*>::const_iterator - it = items.begin(), - it_end = items.end(); - - - uuid_vec_t speakers_uuids; - get_voice_participants_uuids(speakers_uuids); - - for(; it != it_end; ++it) - { - LLAvatarListItem *item = dynamic_cast<LLAvatarListItem*>(*it); - - if (!item) continue; - - LLUUID speaker_id = item->getAvatarId(); - - uuid_vec_t::const_iterator speaker_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), speaker_id); - - // If an avatarID assigned to a panel is found in a speakers list - // obtained from VoiceClient we assign the JOINED status to the owner - // of this avatarID. - if (speaker_iter != speakers_uuids.end()) - { - setState(item, STATE_JOINED); - } - else - { - LLPointer<LLSpeaker> speakerp = mSpeakerManager->findSpeaker(speaker_id); - // If someone has already left the call before, we create his - // avatar row panel with HAS_LEFT status and remove it after - // the timeout, otherwise we create a panel with INVITED status - if (speakerp.notNull() && speakerp.get()->mHasLeftCurrentCall) - { - setState(item, STATE_LEFT); - } - else - { - setState(item, STATE_INVITED); - } - } - } -} - -void LLCallFloater::updateParticipantsVoiceState() -{ - uuid_vec_t speakers_list; - - // Get a list of participants from VoiceClient - uuid_vec_t speakers_uuids; - get_voice_participants_uuids(speakers_uuids); - - // Updating the status for each participant already in list. - std::vector<LLPanel*> items; - mAvatarList->getItems(items); - std::vector<LLPanel*>::const_iterator - it = items.begin(), - it_end = items.end(); - - for(; it != it_end; ++it) - { - LLAvatarListItem *item = dynamic_cast<LLAvatarListItem*>(*it); - if (!item) continue; - - const LLUUID participant_id = item->getAvatarId(); - bool found = false; - - uuid_vec_t::iterator speakers_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), participant_id); - - 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 - // of this avatarID. - if (speakers_iter != speakers_uuids.end()) - { - setState(item, STATE_JOINED); - - LLPointer<LLSpeaker> speaker = mSpeakerManager->findSpeaker(participant_id); - if (speaker.isNull()) - continue; - speaker->mHasLeftCurrentCall = FALSE; - - speakers_uuids.erase(speakers_iter); - found = true; - } - - if (!found) - { - updateNotInVoiceParticipantState(item); - } - } -} - -void LLCallFloater::updateNotInVoiceParticipantState(LLAvatarListItem* item) -{ - LLUUID participant_id = item->getAvatarId(); - ESpeakerState current_state = getState(participant_id); - - switch (current_state) - { - case STATE_JOINED: - // If an avatarID is not found in a speakers list from VoiceClient and - // a panel with this ID has a JOINED status this means that this person - // HAS LEFT the call. - setState(item, STATE_LEFT); - - { - LLPointer<LLSpeaker> speaker = mSpeakerManager->findSpeaker(participant_id); - if (speaker.notNull()) - { - speaker->mHasLeftCurrentCall = TRUE; - } - } - break; - case STATE_LEFT: - // nothing to do. These states should not be changed. - break; - case STATE_INVITED: - // If avatar was invited into group chat and went offline it is still exists in mSpeakerStateMap - // If it goes online it will be rendered as JOINED via LAvatarListItem. - // Lets update its visual representation. See EXT-6660 - case STATE_UNKNOWN: - // If an avatarID is not found in a speakers list from VoiceClient and - // a panel with this ID has an UNKNOWN status this means that this person - // HAS ENTERED session but it is not in voice chat yet. So, set INVITED status - setState(item, STATE_INVITED); - break; - default: - // for possible new future states. - llwarns << "Unsupported (" << getState(participant_id) << ") state for: " << item->getAvatarName() << llendl; - break; - } -} - -void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) -{ - // *HACK: mantipov: sometimes such situation is possible while switching to voice channel: -/* - - voice channel is switched to the one user is joining - - participant list is initialized with voice states: agent is in voice - - than such log messages were found (with agent UUID) - - LLVivoxProtocolParser::process_impl: parsing: <Response requestId="22" action="Session.MediaDisconnect.1"><ReturnCode>0</ReturnCode><Results><StatusCode>0</StatusCode><StatusString /></Results><InputXml><Request requestId="22" action="Session.MediaDisconnect.1"><SessionGroupHandle>9</SessionGroupHandle><SessionHandle>12</SessionHandle><Media>Audio</Media></Request></InputXml></Response> - - LLVoiceClient::sessionState::removeParticipant: participant "sip:x2pwNkMbpR_mK4rtB_awASA==@bhr.vivox.com" (da9c0d90-c6e9-47f9-8ae2-bb41fdac0048) removed. - - and than while updating participants voice states agent is marked as HAS LEFT - - next updating of LLVoiceClient state makes agent JOINED - So, lets skip HAS LEFT state for agent's avatar -*/ - if (STATE_LEFT == state && item->getAvatarId() == gAgentID) return; - - setState(item->getAvatarId(), state); - - switch (state) - { - case STATE_INVITED: - item->setState(LLAvatarListItem::IS_VOICE_INVITED); - break; - case STATE_JOINED: - removeVoiceRemoveTimer(item->getAvatarId()); - item->setState(LLAvatarListItem::IS_VOICE_JOINED); - break; - case STATE_LEFT: - { - setVoiceRemoveTimer(item->getAvatarId()); - item->setState(LLAvatarListItem::IS_VOICE_LEFT); - } - break; - default: - llwarns << "Unrecognized avatar panel state (" << state << ")" << llendl; - break; - } -} - -void LLCallFloater::setVoiceRemoveTimer(const LLUUID& voice_speaker_id) -{ - mSpeakerDelayRemover->setActionTimer(voice_speaker_id); -} - -bool LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) -{ - uuid_vec_t& speaker_uuids = mAvatarList->getIDs(); - uuid_vec_t::iterator pos = std::find(speaker_uuids.begin(), speaker_uuids.end(), voice_speaker_id); - if(pos != speaker_uuids.end()) - { - speaker_uuids.erase(pos); - mAvatarList->setDirty(); - } - - return false; -} - - -void LLCallFloater::resetVoiceRemoveTimers() -{ - mSpeakerDelayRemover->removeAllTimers(); -} - -void LLCallFloater::removeVoiceRemoveTimer(const LLUUID& voice_speaker_id) -{ - mSpeakerDelayRemover->unsetActionTimer(voice_speaker_id); -} - -bool LLCallFloater::validateSpeaker(const LLUUID& speaker_id) -{ - bool is_valid = true; - switch (mVoiceType) - { - case VC_LOCAL_CHAT: - { - // A nearby chat speaker is considered valid it it's known to LLVoiceClient (i.e. has enabled voice). - uuid_vec_t speakers; - get_voice_participants_uuids(speakers); - is_valid = std::find(speakers.begin(), speakers.end(), speaker_id) != speakers.end(); - } - break; - case VC_GROUP_CHAT: - // if participant had left this call before do not allow add her again. See EXT-4216. - // but if she Join she will be added into the list from the LLCallFloater::onChange() - is_valid = STATE_LEFT != getState(speaker_id); - break; - default: - // do nothing. required for Linux build - break; - } - - return is_valid; -} - -void LLCallFloater::connectToChannel(LLVoiceChannel* channel) -{ - mVoiceChannelStateChangeConnection.disconnect(); - - sCurrentVoiceChannel = channel; - - mVoiceChannelStateChangeConnection = sCurrentVoiceChannel->setStateChangedCallback(boost::bind(&LLCallFloater::onVoiceChannelStateChanged, this, _1, _2)); - - updateState(channel->getState()); -} - -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::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()) - { - updateState(new_state); - } - else - { - closeFloater(); - } -} - -void LLCallFloater::updateState(const LLVoiceChannel::EState& new_state) -{ - LL_DEBUGS("Voice") << "Updating state: " << new_state << ", session name: " << sCurrentVoiceChannel->getSessionName() << LL_ENDL; - if (LLVoiceChannel::STATE_CONNECTED == new_state) - { - updateSession(); - } - else - { - reset(new_state); - } -} - -void LLCallFloater::reset(const LLVoiceChannel::EState& new_state) -{ - // lets forget states from the previous session - // for timers... - resetVoiceRemoveTimers(); - - // ...and for speaker state - mSpeakerStateMap.clear(); - - delete mParticipants; - mParticipants = NULL; - mAvatarList->clear(); - - // These ifs were added instead of simply showing "loading" to make VCP work correctly in parcels - // with disabled voice (EXT-4648 and EXT-4649) - if (!LLViewerParcelMgr::getInstance()->allowAgentVoice() && LLVoiceChannel::STATE_HUNG_UP == new_state) - { - // hides "Leave Call" when call is ended in parcel with disabled voice- hiding usually happens in - // updateSession() which won't be called here because connect to nearby voice never happens - getChildView("leave_call_btn_panel")->setVisible( false); - // setting title to nearby chat an "no one near..." text- because in region with disabled - // voice we won't have chance to really connect to nearby, so VCP is changed here manually - setTitle(getString("title_nearby")); - mAvatarList->setNoItemsCommentText(getString("no_one_near")); - } - // "loading" is shown only when state is "ringing" to avoid showing it in nearby chat vcp - // of parcels with disabled voice all the time- "no_one_near" is now shown there (EXT-4648) - else if (new_state == LLVoiceChannel::STATE_RINGING) - { - // update floater to show Loading while waiting for data. - mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData")); - } - - mAvatarList->setVisible(TRUE); - mNonAvatarCaller->setVisible(FALSE); - - mSpeakerManager = NULL; -} - -//EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h deleted file mode 100644 index 00a3f76e56..0000000000 --- a/indra/newview/llcallfloater.h +++ /dev/null @@ -1,273 +0,0 @@ -/** - * @file llcallfloater.h - * @author Mike Antipov - * @brief Voice Control Panel in a Voice Chats (P2P, Group, Nearby...). - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLCALLFLOATER_H -#define LL_LLCALLFLOATER_H - -#include "lltransientdockablefloater.h" -#include "llvoicechannel.h" -#include "llvoiceclient.h" - -class LLAvatarList; -class LLAvatarListItem; -class LLAvatarName; -class LLNonAvatarCaller; -class LLOutputMonitorCtrl; -class LLParticipantList; -class LLSpeakerMgr; -class LLSpeakersDelayActionsStorage; - -/** - * The Voice Control Panel is an ambient window summoned by clicking the flyout chevron - * on the Speak button. It can be torn-off and freely positioned onscreen. - * - * When the Resident is engaged in Voice Chat, the Voice Control Panel provides control - * over the audible volume of each of the other participants, the Resident's own Voice - * Morphing settings (if she has subscribed to enable the feature), and Voice Recording. - * - * When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel - * also provides a 'Leave Call' button to allow the Resident to leave that voice channel. - */ -class LLCallFloater : public LLTransientDockableFloater, LLVoiceClientParticipantObserver -{ -public: - - LOG_CLASS(LLCallFloater); - - LLCallFloater(const LLSD& key); - ~LLCallFloater(); - - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void draw(); - /*virtual*/ void setFocus( BOOL b ); - - /** - * Is called by LLVoiceClient::notifyParticipantObservers when voice participant list is changed. - * - * Refreshes list to display participants not in voice as disabled. - */ - /*virtual*/ void onParticipantsChanged(); - - static void sOnCurrentChannelChanged(const LLUUID& session_id); - -private: - typedef enum e_voice_controls_type - { - VC_LOCAL_CHAT, - VC_GROUP_CHAT, - VC_AD_HOC_CHAT, - VC_PEER_TO_PEER, - VC_PEER_TO_PEER_AVALINE - }EVoiceControls; - - typedef enum e_speaker_state - { - STATE_UNKNOWN, - STATE_INVITED, - STATE_JOINED, - STATE_LEFT, - } ESpeakerState; - - typedef std::map<LLUUID, ESpeakerState> speaker_state_map_t; - - void leaveCall(); - - /** - * Updates mSpeakerManager and list according to current Voice Channel - * - * It compares mSpeakerManager & current Voice Channel session IDs. - * If they are different gets Speaker manager related to current channel and updates channel participant list. - */ - void updateSession(); - - /** - * Refreshes participant list according to current Voice Channel - */ - void refreshParticipantList(); - - /** - * Handles event on avatar list is refreshed after it was marked dirty. - * - * It sets initial participants voice states (once after the first refreshing) - * and updates voice states each time anybody is joined/left voice chat in session. - */ - void onAvatarListRefreshed(); - - /** - * Updates window title with an avatar name - */ - void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); - - void updateTitle(); - void initAgentData(); - void setModeratorMutedVoice(bool moderator_muted); - void updateAgentModeratorState(); - void onModeratorNameCache(const LLAvatarName& av_name); - - /** - * Sets initial participants voice states in avatar list (Invited, Joined, Has Left). - * - * @see refreshParticipantList() - * @see onAvatarListRefreshed() - * @see mInitParticipantsVoiceState - */ - void initParticipantsVoiceState(); - - /** - * Updates participants voice states in avatar list (Invited, Joined, Has Left). - * - * @see onAvatarListRefreshed() - * @see onChanged() - */ - void updateParticipantsVoiceState(); - - /** - * Updates voice state of participant not in current voice channel depend on its current state. - */ - void updateNotInVoiceParticipantState(LLAvatarListItem* item); - void setState(LLAvatarListItem* item, ESpeakerState state); - void setState(const LLUUID& speaker_id, ESpeakerState state) - { - lldebugs << "Storing state: " << speaker_id << ", " << state << llendl; - mSpeakerStateMap[speaker_id] = state; - } - - ESpeakerState getState(const LLUUID& speaker_id) - { - lldebugs << "Getting state: " << speaker_id << ", " << mSpeakerStateMap[speaker_id] << llendl; - - return mSpeakerStateMap[speaker_id]; - } - - /** - * Instantiates new LLAvatarListItemRemoveTimer and adds it into the map if it is not already created. - * - * @param voice_speaker_id LLUUID of Avatar List item to be removed from the list when timer expires. - */ - void setVoiceRemoveTimer(const LLUUID& voice_speaker_id); - - /** - * Removes specified by UUID Avatar List item. - * - * @param voice_speaker_id LLUUID of Avatar List item to be removed from the list. - */ - bool removeVoiceLeftParticipant(const LLUUID& voice_speaker_id); - - /** - * Deletes all timers from the list to prevent started timers from ticking after destruction - * and after switching on another voice channel. - */ - void resetVoiceRemoveTimers(); - - /** - * Removes specified by UUID timer from the map. - * - * @param voice_speaker_id LLUUID of Avatar List item whose timer should be removed from the map. - */ - void removeVoiceRemoveTimer(const LLUUID& voice_speaker_id); - - /** - * Called by LLParticipantList before adding a speaker to the participant list. - * - * If false is returned, the speaker will not be added to the list. - * - * @param speaker_id Speaker to validate. - * @return true if this is a valid speaker, false otherwise. - */ - bool validateSpeaker(const LLUUID& speaker_id); - - /** - * Connects to passed channel to be updated according to channel's voice states. - */ - void connectToChannel(LLVoiceChannel* channel); - - /** - * Callback to process changing of voice channel's states. - */ - void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); - - /** - * Updates floater according to passed channel's voice state. - */ - void updateState(const LLVoiceChannel::EState& new_state); - - /** - * Resets floater to be ready to show voice participants. - * - * Clears all data from the latest voice session. - */ - void reset(const LLVoiceChannel::EState& new_state); - -private: - speaker_state_map_t mSpeakerStateMap; - LLSpeakerMgr* mSpeakerManager; - LLParticipantList* mParticipants; - LLAvatarList* mAvatarList; - LLNonAvatarCaller* mNonAvatarCaller; - EVoiceControls mVoiceType; - LLPanel* mAgentPanel; - LLOutputMonitorCtrl* mSpeakingIndicator; - bool mIsModeratorMutedVoice; - - /** - * Flag indicated that participants voice states should be initialized. - * - * It is used due to Avatar List has delayed refreshing after it content is changed. - * Real initializing is performed when Avatar List is first time refreshed. - * - * @see onAvatarListRefreshed() - * @see initParticipantsVoiceState() - */ - bool mInitParticipantsVoiceState; - - boost::signals2::connection mAvatarListRefreshConnection; - - - /** - * time out speakers when they are not part of current session - */ - LLSpeakersDelayActionsStorage* mSpeakerDelayRemover; - - /** - * Stores reference to current voice channel. - * - * Is used to ignore voice channel changed callback for the same channel. - * - * @see sOnCurrentChannelChanged() - */ - static LLVoiceChannel* sCurrentVoiceChannel; - - /* virtual */ - LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; } - - boost::signals2::connection mVoiceChannelStateChangeConnection; -}; - - -#endif //LL_LLCALLFLOATER_H - diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 0d55c4429a..30306b230f 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -54,6 +54,7 @@ #include "llresmgr.h" #include "llslurl.h" #include "llimview.h" +#include "lltrans.h" #include "llviewercontrol.h" #include "llviewernetwork.h" #include "llviewerobjectlist.h" @@ -703,9 +704,7 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) if(chat_notify) { // Look up the name of this agent for the notification - LLAvatarNameCache::get(agent_id, - boost::bind(&on_avatar_name_cache_notify, - _1, _2, online, payload)); + LLAvatarNameCache::get(agent_id,boost::bind(&on_avatar_name_cache_notify,_1, _2, online, payload)); } mModifyMask |= LLFriendObserver::ONLINE; @@ -722,13 +721,14 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id, // Popup a notify box with online status of this agent // Use display name only because this user is your friend LLSD args; - args["NAME"] = av_name.mDisplayName; + args["NAME"] = av_name.getDisplayName(); + args["STATUS"] = online ? LLTrans::getString("OnlineStatus") : LLTrans::getString("OfflineStatus"); LLNotificationPtr notification; if (online) { notification = - LLNotificationsUtil::add("FriendOnline", + LLNotificationsUtil::add("FriendOnlineOffline", args, payload.with("respond_on_mousedown", TRUE), boost::bind(&LLAvatarActions::startIM, agent_id)); @@ -736,7 +736,7 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id, else { notification = - LLNotificationsUtil::add("FriendOffline", args, payload); + LLNotificationsUtil::add("FriendOnlineOffline", args, payload); } // If there's an open IM session with this agent, send a notification there too. @@ -867,7 +867,7 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship { LLAvatarName av_name; LLAvatarNameCache::get( buddy_id, &av_name); - buddy_map_t::value_type value(av_name.mDisplayName, buddy_id); + buddy_map_t::value_type value(av_name.getDisplayName(), buddy_id); if(buddy->isOnline() && buddy->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION)) { mMappable.insert(value); @@ -890,7 +890,7 @@ bool LLCollectAllBuddies::operator()(const LLUUID& buddy_id, LLRelationship* bud { LLAvatarName av_name; LLAvatarNameCache::get(buddy_id, &av_name); - mFullName = av_name.mDisplayName; + mFullName = av_name.getDisplayName(); buddy_map_t::value_type value(mFullName, buddy_id); if(buddy->isOnline()) { diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 987651fc80..43757d0174 100644 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -29,7 +29,8 @@ #include "llchannelmanager.h" #include "llappviewer.h" -#include "llnotificationstorage.h" +#include "lldonotdisturbnotificationstorage.h" +#include "llpersistentnotificationstorage.h" #include "llviewercontrol.h" #include "llviewerwindow.h" #include "llrootview.h" @@ -138,6 +139,9 @@ void LLChannelManager::onLoginCompleted() } LLPersistentNotificationStorage::getInstance()->loadNotifications(); + + LLDoNotDisturbNotificationStorage::getInstance()->initialize(); + LLDoNotDisturbNotificationStorage::getInstance()->loadNotifications(); } //-------------------------------------------------------------------------- diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index d6095cce07..7d0331757b 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -669,47 +669,3 @@ void LLChatBar::onCommitGesture(LLUICtrl* ctrl) mGestureCombo->setFocus(FALSE); } } - - -/* Cruft - global gChatHandler declared below has been commented out, - so this class is never used. See similar code in llnearbychatbar.cpp -class LLChatHandler : public LLCommandHandler -{ -public: - // not allowed from outside the app - LLChatHandler() : LLCommandHandler("chat", UNTRUSTED_BLOCK) { } - - // Your code here - bool handle(const LLSD& tokens, const LLSD& query_map, - LLMediaCtrl* web) - { - bool retval = false; - // Need at least 2 tokens to have a valid message. - if (tokens.size() < 2) - { - retval = false; - } - else - { - S32 channel = tokens[0].asInteger(); - // VWR-19499 Restrict function to chat channels greater than 0. - if ((channel > 0) && (channel < CHAT_CHANNEL_DEBUG)) - { - retval = true; - // Say mesg on channel - std::string mesg = tokens[1].asString(); - send_chat_from_viewer(mesg, CHAT_TYPE_NORMAL, channel); - } - else - { - retval = false; - // Tell us this is an unsupported SLurl. - } - } - return retval; - } -}; - -// Creating the object registers with the dispatcher. -//LLChatHandler gChatHandler; -cruft */ diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 84e73e96fa..53926c1fef 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -28,6 +28,8 @@ #include "llchathistory.h" +#include <boost/signals2.hpp> + #include "llavatarnamecache.h" #include "llinstantmessage.h" @@ -56,7 +58,7 @@ #include "llworld.h" #include "lluiconstants.h" #include "llstring.h" - +#include "llurlaction.h" #include "llviewercontrol.h" static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history"); @@ -110,7 +112,10 @@ public: mFrom(), mSessionID(), mMinUserNameWidth(0), - mUserNameFont(NULL) + mUserNameFont(NULL), + mUserNameTextBox(NULL), + mTimeBoxTextBox(NULL), + mAvatarNameCacheConnection() {} static LLChatHistoryHeader* createInstance(const std::string& file_name) @@ -124,6 +129,11 @@ public: { // Detach the info button so that it doesn't get destroyed (EXT-8463). hideInfoCtrl(); + + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } } BOOL handleMouseUp(S32 x, S32 y, MASK mask) @@ -143,8 +153,20 @@ public: { LLMuteList::getInstance()->add(LLMute(getAvatarId(), mFrom, LLMute::OBJECT)); - LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD().with("blocked_to_select", getAvatarId())); + LLFloaterSidePanelContainer::showPanel("people", "panel_people", + LLSD().with("people_panel_tab_name", "blocked_panel").with("blocked_to_select", getAvatarId())); + } + else if (level == "map") + { + std::string url = "secondlife://" + mObjectData["slurl"].asString(); + LLUrlAction::showLocationOnMap(url); + } + else if (level == "teleport") + { + std::string url = "secondlife://" + mObjectData["slurl"].asString(); + LLUrlAction::teleportToLocation(url); } + } void onAvatarIconContextMenuItemClicked(const LLSD& userdata) @@ -187,6 +209,9 @@ public: setMouseEnterCallback(boost::bind(&LLChatHistoryHeader::showInfoCtrl, this)); setMouseLeaveCallback(boost::bind(&LLChatHistoryHeader::hideInfoCtrl, this)); + mUserNameTextBox = getChild<LLTextBox>("user_name"); + mTimeBoxTextBox = getChild<LLTextBox>("time_box"); + return LLPanel::postBuild(); } @@ -282,8 +307,7 @@ public: // Start with blank so sample data from XUI XML doesn't // flash on the screen user_name->setValue( LLSD() ); - LLAvatarNameCache::get(mAvatarID, - boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2)); + fetchAvatarName(); } else if (chat.mChatStyle == CHAT_STYLE_HISTORY || mSourceType == CHAT_SOURCE_AGENT) @@ -377,8 +401,8 @@ public: /*virtual*/ void draw() { - LLTextBox* user_name = getChild<LLTextBox>("user_name"); - LLTextBox* time_box = getChild<LLTextBox>("time_box"); + LLTextBox* user_name = mUserNameTextBox; //getChild<LLTextBox>("user_name"); + LLTextBox* time_box = mTimeBoxTextBox; //getChild<LLTextBox>("time_box"); LLRect user_name_rect = user_name->getRect(); S32 user_name_width = user_name_rect.getWidth(); @@ -415,31 +439,6 @@ public: } } - void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) - { - mFrom = av_name.mDisplayName; - - LLTextBox* user_name = getChild<LLTextBox>("user_name"); - user_name->setValue( LLSD(av_name.mDisplayName ) ); - user_name->setToolTip( av_name.mUsername ); - - if (gSavedSettings.getBOOL("NameTagShowUsernames") && - LLAvatarNameCache::useDisplayNames() && - !av_name.mIsDisplayNameDefault) - { - LLStyle::Params style_params_name; - LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor"); - style_params_name.color(userNameColor); - style_params_name.font.name("SansSerifSmall"); - style_params_name.font.style("NORMAL"); - style_params_name.readonly_color(userNameColor); - user_name->appendText(" - " + av_name.mUsername, FALSE, style_params_name); - } - setToolTip( av_name.mUsername ); - // name might have changed, update width - updateMinUserNameWidth(); - } - protected: static const S32 PADDING = 20; @@ -554,6 +553,46 @@ private: user_name->reshape(user_rect.getWidth() + delta_pos_x, user_rect.getHeight()); } + void fetchAvatarName() + { + if (mAvatarID.notNull()) + { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(mAvatarID, + boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2)); + } + } + + void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) + { + mAvatarNameCacheConnection.disconnect(); + + mFrom = av_name.getDisplayName(); + + LLTextBox* user_name = getChild<LLTextBox>("user_name"); + user_name->setValue( LLSD(av_name.getDisplayName() ) ); + user_name->setToolTip( av_name.getUserName() ); + + if (gSavedSettings.getBOOL("NameTagShowUsernames") && + av_name.useDisplayNames() && + !av_name.isDisplayNameDefault()) + { + LLStyle::Params style_params_name; + LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor"); + style_params_name.color(userNameColor); + style_params_name.font.name("SansSerifSmall"); + style_params_name.font.style("NORMAL"); + style_params_name.readonly_color(userNameColor); + user_name->appendText(" - " + av_name.getUserName(), FALSE, style_params_name); + } + setToolTip( av_name.getUserName() ); + // name might have changed, update width + updateMinUserNameWidth(); + } + protected: LLHandle<LLView> mPopupMenuHandleAvatar; LLHandle<LLView> mPopupMenuHandleObject; @@ -568,6 +607,11 @@ protected: S32 mMinUserNameWidth; const LLFontGL* mUserNameFont; + LLTextBox* mUserNameTextBox; + LLTextBox* mTimeBoxTextBox; + +private: + boost::signals2::connection mAvatarNameCacheConnection; }; LLUICtrl* LLChatHistoryHeader::sInfoCtrl = NULL; @@ -584,7 +628,8 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p) mBottomSeparatorPad(p.bottom_separator_pad), mTopHeaderPad(p.top_header_pad), mBottomHeaderPad(p.bottom_header_pad), - mIsLastMessageFromLog(false) + mIsLastMessageFromLog(false), + mNotifyAboutUnreadMsg(p.notify_unread_msg) { LLTextEditor::Params editor_params(p); editor_params.rect = getLocalRect(); @@ -594,6 +639,14 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p) mEditor = LLUICtrlFactory::create<LLTextEditor>(editor_params, this); } +LLSD LLChatHistory::getValue() const +{ + LLSD* text=new LLSD(); + text->assign(mEditor->getText()); + return *text; + +} + LLChatHistory::~LLChatHistory() { this->clear(); @@ -695,6 +748,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL { LLFastTimer _(FTM_APPEND_MESSAGE); bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean(); + bool square_brackets = false; // square brackets necessary for a system messages llassert(mEditor); if (!mEditor) @@ -702,9 +756,10 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL return; } + bool from_me = chat.mFromID == gAgent.getID(); mEditor->setPlainText(use_plain_text_chat_history); - if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty()) + if (mNotifyAboutUnreadMsg && !mEditor->scrolledToEnd() && !from_me && !chat.mFromName.empty()) { mUnreadChatSources.insert(chat.mFromName); mMoreChatPanel->setVisible(TRUE); @@ -734,16 +789,23 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL } LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); + LLColor4 name_color(txt_color); + LLViewerChat::getChatColor(chat,txt_color); LLFontGL* fontp = LLViewerChat::getChatFont(); std::string font_name = LLFontGL::nameFromFont(fontp); std::string font_size = LLFontGL::sizeFromFont(fontp); - LLStyle::Params style_params; - style_params.color(txt_color); - style_params.readonly_color(txt_color); - style_params.font.name(font_name); - style_params.font.size(font_size); - style_params.font.style(input_append_params.font.style); + + LLStyle::Params body_message_params; + body_message_params.color(txt_color); + body_message_params.readonly_color(txt_color); + body_message_params.font.name(font_name); + body_message_params.font.size(font_size); + body_message_params.font.style(input_append_params.font.style); + + LLStyle::Params name_params(body_message_params); + name_params.color(name_color); + name_params.readonly_color(name_color); std::string prefix = chat.mText.substr(0, 4); @@ -766,29 +828,60 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if (irc_me || chat.mChatStyle == CHAT_STYLE_IRC) { delimiter = LLStringUtil::null; - style_params.font.style = "ITALIC"; + body_message_params.font.style = "ITALIC"; + } + + if(chat.mChatType == CHAT_TYPE_WHISPER) + { + body_message_params.font.style = "ITALIC"; + } + else if(chat.mChatType == CHAT_TYPE_SHOUT) + { + body_message_params.font.style = "BOLD"; } bool message_from_log = chat.mChatStyle == CHAT_STYLE_HISTORY; // We graying out chat history by graying out messages that contains full date in a time string if (message_from_log) { - style_params.color(LLColor4::grey); - style_params.readonly_color(LLColor4::grey); + txt_color = LLColor4::grey; + body_message_params.color(txt_color); + body_message_params.readonly_color(txt_color); + name_params.color(txt_color); + name_params.readonly_color(txt_color); } + bool prependNewLineState = mEditor->getText().size() != 0; + + // compact mode: show a timestamp and name if (use_plain_text_chat_history) { - LLStyle::Params timestamp_style(style_params); + square_brackets = chat.mFromName == SYSTEM_FROM; + + LLStyle::Params timestamp_style(body_message_params); + + // out of the timestamp + if (args["show_time"].asBoolean()) + { if (!message_from_log) { LLColor4 timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor"); timestamp_style.color(timestamp_color); timestamp_style.readonly_color(timestamp_color); } - mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getLength() != 0, timestamp_style); + mEditor->appendText("[" + chat.mTimeStr + "] ", prependNewLineState, timestamp_style); + prependNewLineState = false; + } + + // out the opening square bracket (if need) + if (square_brackets) + { + mEditor->appendText("[", prependNewLineState, body_message_params); + prependNewLineState = false; + } - if (utf8str_trim(chat.mFromName).size() != 0) + // names showing + if (args["show_names_for_p2p_conv"].asBoolean() && utf8str_trim(chat.mFromName).size() != 0) { // Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text. if ( chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mFromID.notNull()) @@ -798,32 +891,47 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL // set the link for the object name to be the objectim SLapp // (don't let object names with hyperlinks override our objectim Url) - LLStyle::Params link_params(style_params); + LLStyle::Params link_params(body_message_params); LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor"); link_params.color = link_color; link_params.readonly_color = link_color; link_params.is_link = true; link_params.link_href = url; - mEditor->appendText(chat.mFromName + delimiter, - false, link_params); + mEditor->appendText(chat.mFromName + delimiter, prependNewLineState, link_params); + prependNewLineState = false; } else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log) { - LLStyle::Params link_params(style_params); + LLStyle::Params link_params(body_message_params); link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID)); + if (from_me) + { std::string localized_name; + bool is_localized = LLTrans::findString(localized_name, "AgentNameSubst"); + mEditor->appendText((is_localized? localized_name:"(You)") + delimiter, + prependNewLineState, link_params); + prependNewLineState = false; + } + else + { // Add link to avatar's inspector and delimiter to message. - mEditor->appendText(std::string(link_params.link_href) + delimiter, false, link_params); + mEditor->appendText(std::string(link_params.link_href) + delimiter, + prependNewLineState, link_params); + prependNewLineState = false; + } } else { - mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter, false, style_params); + mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter, + prependNewLineState, body_message_params); + prependNewLineState = false; } } } - else + else // showing timestamp and name in the expanded mode { + prependNewLineState = false; LLView* view = NULL; LLInlineViewSegment::Params p; p.force_newline = true; @@ -844,7 +952,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL } else { - view = getHeader(chat, style_params, args); + view = getHeader(chat, name_params, args); if (mEditor->getLength() == 0) p.top_pad = 0; else @@ -873,41 +981,16 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL mIsLastMessageFromLog = message_from_log; } + // body of the message processing + + // notify processing if (chat.mNotifId.notNull()) { LLNotificationPtr notification = LLNotificationsUtil::find(chat.mNotifId); if (notification != NULL) { LLIMToastNotifyPanel* notify_box = new LLIMToastNotifyPanel( - notification, chat.mSessionID, LLRect::null, !use_plain_text_chat_history); - //we can't set follows in xml since it broke toasts behavior - notify_box->setFollowsLeft(); - notify_box->setFollowsRight(); - notify_box->setFollowsTop(); - - ctrl_list_t ctrls = notify_box->getControlPanel()->getCtrlList(); - S32 offset = 0; - // Children were added by addChild() which uses push_front to insert them into list, - // so to get buttons in correct order reverse iterator is used (EXT-5906) - for (ctrl_list_t::reverse_iterator it = ctrls.rbegin(); it != ctrls.rend(); it++) - { - LLButton * button = dynamic_cast<LLButton*> (*it); - if (button != NULL) - { - button->setOrigin( offset, - button->getRect().mBottom); - button->setLeftHPad(2 * HPAD); - button->setRightHPad(2 * HPAD); - // set zero width before perform autoResize() - button->setRect(LLRect(button->getRect().mLeft, - button->getRect().mTop, button->getRect().mLeft, - button->getRect().mBottom)); - button->setAutoResize(true); - button->autoResize(); - offset += HPAD + button->getRect().getWidth(); - button->setFollowsNone(); - } - } + notification, chat.mSessionID, LLRect::null, !use_plain_text_chat_history, mEditor); //Prepare the rect for the view LLRect target_rect = mEditor->getDocumentView()->getRect(); @@ -924,6 +1007,8 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL mEditor->appendWidget(params, "\n", false); } } + + // usual messages showing else { std::string message = irc_me ? chat.mText.substr(3) : chat.mText; @@ -931,7 +1016,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL //MESSAGE TEXT PROCESSING //*HACK getting rid of redundant sender names in system notifications sent using sender name (see EXT-5010) - if (use_plain_text_chat_history && gAgentID != chat.mFromID && chat.mFromID.notNull()) + if (use_plain_text_chat_history && !from_me && chat.mFromID.notNull()) { std::string slurl_about = SLURL_APP_AGENT + chat.mFromID.asString() + SLURL_ABOUT; if (message.length() > slurl_about.length() && @@ -946,13 +1031,19 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL message = chat.mFromName + message; } - mEditor->appendText(message, FALSE, style_params); + if (square_brackets) + { + message += "]"; + } + + mEditor->appendText(message, prependNewLineState, body_message_params); + prependNewLineState = false; } mEditor->blockUndo(); // automatically scroll to end when receiving chat from myself - if (chat.mFromID == gAgentID) + if (from_me) { mEditor->setCursorAndScrollToEnd(); } diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index 28344e6a10..bb6d4fb59c 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -60,6 +60,8 @@ class LLChatHistory : public LLUICtrl Optional<LLTextBox::Params> more_chat_text; + Optional<bool> notify_unread_msg; + Params() : message_header("message_header"), message_separator("message_separator"), @@ -71,7 +73,8 @@ class LLChatHistory : public LLUICtrl bottom_separator_pad("bottom_separator_pad"), top_header_pad("top_header_pad"), bottom_header_pad("bottom_header_pad"), - more_chat_text("more_chat_text") + more_chat_text("more_chat_text"), + notify_unread_msg("notify_unread_msg", true) {} }; @@ -100,7 +103,7 @@ class LLChatHistory : public LLUICtrl public: ~LLChatHistory(); - + LLSD getValue() const; void initFromParams(const Params&); /** @@ -122,6 +125,7 @@ class LLChatHistory : public LLUICtrl LLUUID mLastFromID; LLDate mLastMessageTime; bool mIsLastMessageFromLog; + bool mNotifyAboutUnreadMsg; //std::string mLastMessageTimeStr; std::string mMessageHeaderFilename; diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 9a84280f25..a1a9463d43 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -35,7 +35,7 @@ #include "llfloaterreg.h" #include "lllocalcliprect.h" #include "lltrans.h" -#include "llnearbychatbar.h" +#include "llfloaterimnearbychat.h" #include "llviewercontrol.h" #include "llagentdata.h" @@ -81,23 +81,30 @@ public: LLObjectHandler gObjectHandler; //******************************************************************************************************************* -//LLNearbyChatToastPanel +//LLFloaterIMNearbyChatToastPanel //******************************************************************************************************************* -LLNearbyChatToastPanel* LLNearbyChatToastPanel::createInstance() +LLFloaterIMNearbyChatToastPanel* LLFloaterIMNearbyChatToastPanel::createInstance() { - LLNearbyChatToastPanel* item = new LLNearbyChatToastPanel(); + LLFloaterIMNearbyChatToastPanel* item = new LLFloaterIMNearbyChatToastPanel(); item->buildFromFile("panel_chat_item.xml"); item->setFollows(FOLLOWS_NONE); return item; } -void LLNearbyChatToastPanel::reshape (S32 width, S32 height, BOOL called_from_parent ) +void LLFloaterIMNearbyChatToastPanel::reshape (S32 width, S32 height, BOOL called_from_parent ) { LLPanel::reshape(width, height,called_from_parent); - LLUICtrl* msg_text = getChild<LLUICtrl>("msg_text", false); - LLUICtrl* icon = getChild<LLUICtrl>("avatar_icon", false); + // reshape() may be called from LLView::initFromParams() before the children are created. + // We call findChild() instead of getChild() here to avoid creating dummy controls. + LLUICtrl* msg_text = findChild<LLUICtrl>("msg_text", false); + LLUICtrl* icon = findChild<LLUICtrl>("avatar_icon", false); + + if (!msg_text || !icon) + { + return; + } LLRect msg_text_rect = msg_text->getRect(); LLRect avatar_rect = icon->getRect(); @@ -114,12 +121,12 @@ void LLNearbyChatToastPanel::reshape (S32 width, S32 height, BOOL called_from_p msg_text->setRect(msg_text_rect); } -BOOL LLNearbyChatToastPanel::postBuild() +BOOL LLFloaterIMNearbyChatToastPanel::postBuild() { return LLPanel::postBuild(); } -void LLNearbyChatToastPanel::addMessage(LLSD& notification) +void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification) { std::string messageText = notification["message"].asString(); // UTF-8 line of text @@ -171,7 +178,7 @@ void LLNearbyChatToastPanel::addMessage(LLSD& notification) } -void LLNearbyChatToastPanel::init(LLSD& notification) +void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification) { std::string messageText = notification["message"].asString(); // UTF-8 line of text std::string fromName = notification["from"].asString(); // agent or object name @@ -266,7 +273,7 @@ void LLNearbyChatToastPanel::init(LLSD& notification) mIsDirty = true;//will set Avatar Icon in draw } -void LLNearbyChatToastPanel::snapToMessageHeight () +void LLFloaterIMNearbyChatToastPanel::snapToMessageHeight () { LLChatMsgBox* text_box = getChild<LLChatMsgBox>("msg_text", false); S32 new_height = llmax (text_box->getTextPixelHeight() + 2*text_box->getVPad() + 2*msg_height_pad, 25); @@ -281,22 +288,22 @@ void LLNearbyChatToastPanel::snapToMessageHeight () } -void LLNearbyChatToastPanel::onMouseLeave (S32 x, S32 y, MASK mask) +void LLFloaterIMNearbyChatToastPanel::onMouseLeave (S32 x, S32 y, MASK mask) { } -void LLNearbyChatToastPanel::onMouseEnter (S32 x, S32 y, MASK mask) +void LLFloaterIMNearbyChatToastPanel::onMouseEnter (S32 x, S32 y, MASK mask) { if(mSourceType != CHAT_SOURCE_AGENT) return; } -BOOL LLNearbyChatToastPanel::handleMouseDown (S32 x, S32 y, MASK mask) +BOOL LLFloaterIMNearbyChatToastPanel::handleMouseDown (S32 x, S32 y, MASK mask) { return LLPanel::handleMouseDown(x,y,mask); } -BOOL LLNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask) +BOOL LLFloaterIMNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask) { /* fix for request EXT-4780 @@ -316,16 +323,16 @@ BOOL LLNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask) return TRUE; else { - LLNearbyChatBar::getInstance()->showHistory(); + (LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))->showHistory(); return FALSE; } } - LLNearbyChatBar::getInstance()->showHistory(); + (LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))->showHistory(); return LLPanel::handleMouseUp(x,y,mask); } -void LLNearbyChatToastPanel::setHeaderVisibility(EShowItemHeader e) +void LLFloaterIMNearbyChatToastPanel::setHeaderVisibility(EShowItemHeader e) { LLUICtrl* icon = getChild<LLUICtrl>("avatar_icon", false); if(icon) @@ -333,7 +340,7 @@ void LLNearbyChatToastPanel::setHeaderVisibility(EShowItemHeader e) } -bool LLNearbyChatToastPanel::canAddText () +bool LLFloaterIMNearbyChatToastPanel::canAddText () { LLChatMsgBox* msg_text = findChild<LLChatMsgBox>("msg_text"); if(!msg_text) @@ -341,7 +348,7 @@ bool LLNearbyChatToastPanel::canAddText () return msg_text->getLineCount()<10; } -BOOL LLNearbyChatToastPanel::handleRightMouseDown(S32 x, S32 y, MASK mask) +BOOL LLFloaterIMNearbyChatToastPanel::handleRightMouseDown(S32 x, S32 y, MASK mask) { LLUICtrl* avatar_icon = getChild<LLUICtrl>("avatar_icon", false); @@ -353,8 +360,10 @@ BOOL LLNearbyChatToastPanel::handleRightMouseDown(S32 x, S32 y, MASK mask) return TRUE; return LLPanel::handleRightMouseDown(x,y,mask); } -void LLNearbyChatToastPanel::draw() +void LLFloaterIMNearbyChatToastPanel::draw() { + LLPanel::draw(); + if(mIsDirty) { LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon", false); @@ -372,7 +381,6 @@ void LLNearbyChatToastPanel::draw() } mIsDirty = false; } - LLToastPanelBase::draw(); } diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h index 1d700dcede..54b6499d52 100644 --- a/indra/newview/llchatitemscontainerctrl.h +++ b/indra/newview/llchatitemscontainerctrl.h @@ -40,18 +40,18 @@ typedef enum e_show_item_header CHATITEMHEADER_SHOW_BOTH } EShowItemHeader; -class LLNearbyChatToastPanel: public LLToastPanelBase +class LLFloaterIMNearbyChatToastPanel : public LLPanel { protected: - LLNearbyChatToastPanel() + LLFloaterIMNearbyChatToastPanel() : mIsDirty(false), mSourceType(CHAT_SOURCE_OBJECT) {}; public: - ~LLNearbyChatToastPanel(){} + ~LLFloaterIMNearbyChatToastPanel(){} - static LLNearbyChatToastPanel* createInstance(); + static LLFloaterIMNearbyChatToastPanel* createInstance(); const LLUUID& getFromID() const { return mFromID;} const std::string& getFromName() const { return mFromName; } diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index a661808d1f..b221daf936 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -27,35 +27,17 @@ #include "llviewerprecompiledheaders.h" // must be first include #include "llchiclet.h" -#include "llagent.h" -#include "llavataractions.h" #include "llchicletbar.h" -#include "lleventtimer.h" -#include "llgroupactions.h" -#include "lliconctrl.h" -#include "llimfloater.h" -#include "llimview.h" +#include "llfloaterimsession.h" +#include "llfloaterimcontainer.h" #include "llfloaterreg.h" #include "lllocalcliprect.h" -#include "llmenugl.h" -#include "llnotifications.h" -#include "llnotificationsutil.h" -#include "lloutputmonitorctrl.h" #include "llscriptfloater.h" -#include "llspeakers.h" -#include "lltextbox.h" -#include "llvoiceclient.h" -#include "llgroupmgr.h" -#include "llnotificationmanager.h" -#include "lltransientfloatermgr.h" +#include "llsingleton.h" #include "llsyswellwindow.h" static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel"); -static LLDefaultChildRegistry::Register<LLIMWellChiclet> t2_0("chiclet_im_well"); static LLDefaultChildRegistry::Register<LLNotificationChiclet> t2("chiclet_notification"); -static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t3("chiclet_im_p2p"); -static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t4("chiclet_im_group"); -static LLDefaultChildRegistry::Register<LLAdHocChiclet> t5("chiclet_im_adhoc"); static LLDefaultChildRegistry::Register<LLScriptChiclet> t6("chiclet_script"); static LLDefaultChildRegistry::Register<LLInvOfferChiclet> t7("chiclet_offer"); @@ -66,65 +48,10 @@ boost::signals2::signal<LLChiclet* (const LLUUID&), ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -/** - * Updates the Well's 'Lit' state to flash it when "new messages" are come. - * - * It gets callback which will be called 2*N times with passed period. See EXT-3147 - */ -class LLSysWellChiclet::FlashToLitTimer : public LLEventTimer -{ -public: - typedef boost::function<void()> callback_t; - - /** - * Constructor. - * - * @param count - how many times callback should be called (twice to not change original state) - * @param period - how frequently callback should be called - * @param cb - callback to be called each tick - */ - FlashToLitTimer(S32 count, F32 period, callback_t cb) - : LLEventTimer(period) - , mCallback(cb) - , mFlashCount(2 * count) - , mCurrentFlashCount(0) - { - mEventTimer.stop(); - } - - BOOL tick() - { - mCallback(); - - if (++mCurrentFlashCount == mFlashCount) mEventTimer.stop(); - return FALSE; - } - - void flash() - { - mCurrentFlashCount = 0; - mEventTimer.start(); - } - - void stopFlashing() - { - mEventTimer.stop(); - } - -private: - callback_t mCallback; - - /** - * How many times Well will blink. - */ - S32 mFlashCount; - S32 mCurrentFlashCount; -}; - LLSysWellChiclet::Params::Params() -: button("button") -, unread_notifications("unread_notifications") -, max_displayed_count("max_displayed_count", 99) + : button("button") + , unread_notifications("unread_notifications") + , max_displayed_count("max_displayed_count", 99) { button.name = "button"; button.tab_stop = FALSE; @@ -132,30 +59,24 @@ LLSysWellChiclet::Params::Params() } LLSysWellChiclet::LLSysWellChiclet(const Params& p) -: LLChiclet(p) -, mButton(NULL) -, mCounter(0) -, mMaxDisplayedCount(p.max_displayed_count) -, mIsNewMessagesState(false) -, mFlashToLitTimer(NULL) -, mContextMenu(NULL) + : LLChiclet(p) + , mButton(NULL) + , mCounter(0) + , mMaxDisplayedCount(p.max_displayed_count) + , mIsNewMessagesState(false) + , mFlashToLitTimer(NULL) + , mContextMenu(NULL) { LLButton::Params button_params = p.button; mButton = LLUICtrlFactory::create<LLButton>(button_params); addChild(mButton); - // use settings from settings.xml to be able change them via Debug settings. See EXT-5973. - // Due to Timer is implemented as derived class from EventTimer it is impossible to change period - // in runtime. So, both settings are made as required restart. - static S32 flash_to_lit_count = gSavedSettings.getS32("WellIconFlashCount"); - static F32 flash_period = gSavedSettings.getF32("WellIconFlashPeriod"); - - mFlashToLitTimer = new FlashToLitTimer(flash_to_lit_count, flash_period, boost::bind(&LLSysWellChiclet::changeLitState, this)); + mFlashToLitTimer = new LLFlashTimer(boost::bind(&LLSysWellChiclet::changeLitState, this, _1)); } LLSysWellChiclet::~LLSysWellChiclet() { - delete mFlashToLitTimer; + mFlashToLitTimer->unset(); } void LLSysWellChiclet::setCounter(S32 counter) @@ -190,7 +111,7 @@ void LLSysWellChiclet::setToggleState(BOOL toggled) { mButton->setToggleState(toggled); } -void LLSysWellChiclet::changeLitState() +void LLSysWellChiclet::changeLitState(bool blink) { setNewMessagesState(!mIsNewMessagesState); } @@ -235,130 +156,18 @@ BOOL LLSysWellChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) } /************************************************************************/ -/* LLIMWellChiclet implementation */ -/************************************************************************/ -LLIMWellChiclet::LLIMWellChiclet(const Params& p) -: LLSysWellChiclet(p) -{ - LLIMModel::instance().addNewMsgCallback(boost::bind(&LLIMWellChiclet::messageCountChanged, this, _1)); - LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(&LLIMWellChiclet::messageCountChanged, this, _1)); - - LLIMMgr::getInstance()->addSessionObserver(this); - - LLIMWellWindow::getInstance()->setSysWellChiclet(this); -} - -LLIMWellChiclet::~LLIMWellChiclet() -{ - LLIMWellWindow* im_well_window = LLIMWellWindow::findInstance(); - if (im_well_window) - { - im_well_window->setSysWellChiclet(NULL); - } - - LLIMMgr::getInstance()->removeSessionObserver(this); -} - -void LLIMWellChiclet::onMenuItemClicked(const LLSD& user_data) -{ - std::string action = user_data.asString(); - if("close all" == action) - { - LLIMWellWindow::getInstance()->closeAll(); - } -} - -bool LLIMWellChiclet::enableMenuItem(const LLSD& user_data) -{ - std::string item = user_data.asString(); - if (item == "can close all") - { - return !LLIMWellWindow::getInstance()->isWindowEmpty(); - } - return true; -} - -void LLIMWellChiclet::createMenu() -{ - if(mContextMenu) - { - llwarns << "Menu already exists" << llendl; - return; - } - - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - registrar.add("IMWellChicletMenu.Action", - boost::bind(&LLIMWellChiclet::onMenuItemClicked, this, _2)); - - LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; - enable_registrar.add("IMWellChicletMenu.EnableItem", - boost::bind(&LLIMWellChiclet::enableMenuItem, this, _2)); - - mContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu> - ("menu_im_well_button.xml", - LLMenuGL::sMenuContainer, - LLViewerMenuHolderGL::child_registry_t::instance()); -} - -void LLIMWellChiclet::messageCountChanged(const LLSD& session_data) -{ - // The singleton class LLChicletBar instance might be already deleted - // so don't create a new one. - if (!LLChicletBar::instanceExists()) - { - return; - } - - const LLUUID& session_id = session_data["session_id"]; - const S32 counter = LLChicletBar::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); -} - -/************************************************************************/ /* LLNotificationChiclet implementation */ /************************************************************************/ LLNotificationChiclet::LLNotificationChiclet(const Params& p) -: LLSysWellChiclet(p) -, mUreadSystemNotifications(0) +: LLSysWellChiclet(p), + mUreadSystemNotifications(0) { - // connect counter handlers to the signals - connectCounterUpdatersToSignal("notify"); - connectCounterUpdatersToSignal("groupnotify"); - connectCounterUpdatersToSignal("offer"); - + mNotificationChannel.reset(new ChicletNotificationChannel(this)); // ensure that notification well window exists, to synchronously // handle toast add/delete events. LLNotificationWellWindow::getInstance()->setSysWellChiclet(this); } -void LLNotificationChiclet::connectCounterUpdatersToSignal(const std::string& notification_type) -{ - LLNotificationsUI::LLNotificationManager* manager = LLNotificationsUI::LLNotificationManager::getInstance(); - LLNotificationsUI::LLEventHandler* n_handler = manager->getHandlerForNotification(notification_type); - if(n_handler) - { - n_handler->setNewNotificationCallback(boost::bind(&LLNotificationChiclet::incUreadSystemNotifications, this)); - n_handler->setDelNotification(boost::bind(&LLNotificationChiclet::decUreadSystemNotifications, this)); - } -} - void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data) { std::string action = user_data.asString(); @@ -407,6 +216,23 @@ void LLNotificationChiclet::setCounter(S32 counter) updateWidget(getCounter() == 0); } + +bool LLNotificationChiclet::ChicletNotificationChannel::filterNotification( LLNotificationPtr notification ) +{ + if (notification->getName() == "ScriptDialog") + { + return false; + } + + if( !(notification->canLogToIM() && notification->hasFormElements()) + && (!notification->getPayload().has("give_inventory_notification") + || notification->getPayload()["give_inventory_notification"])) + { + return true; + } + return false; +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -422,12 +248,6 @@ LLChiclet::LLChiclet(const Params& p) , mSessionId(LLUUID::null) , mShowCounter(p.show_counter) { - -} - -LLChiclet::~LLChiclet() -{ - } boost::signals2::connection LLChiclet::setLeftButtonClickCallback( @@ -462,7 +282,9 @@ LLSD LLChiclet::getValue() const void LLChiclet::setValue(const LLSD& value) { if(value.isUUID()) + { setSessionId(value.asUUID()); + } } ////////////////////////////////////////////////////////////////////////// @@ -474,12 +296,9 @@ LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p) , mShowSpeaker(false) , mDefaultWidth(p.rect().getWidth()) , mNewMessagesIcon(NULL) -, mSpeakerCtrl(NULL) -, mCounterCtrl(NULL) , mChicletButton(NULL) , mPopupMenu(NULL) { - enableCounterControl(p.enable_counter); } /* virtual*/ @@ -490,16 +309,6 @@ BOOL LLIMChiclet::postBuild() mChicletButton->setDoubleClickCallback(boost::bind(&LLIMChiclet::onMouseDown, this)); return TRUE; } -void LLIMChiclet::setShowSpeaker(bool show) -{ - bool needs_resize = getShowSpeaker() != show; - if(needs_resize) - { - mShowSpeaker = show; - } - - toggleSpeakerControl(); -} void LLIMChiclet::enableCounterControl(bool enable) { @@ -510,87 +319,13 @@ void LLIMChiclet::enableCounterControl(bool enable) } } -void LLIMChiclet::setShowCounter(bool show) -{ - if(!mCounterEnabled) - { - return; - } - - bool needs_resize = getShowCounter() != show; - if(needs_resize) - { - LLChiclet::setShowCounter(show); - toggleCounterControl(); - } -} - -void LLIMChiclet::initSpeakerControl() -{ - // virtual -} - void LLIMChiclet::setRequiredWidth() { - bool show_speaker = getShowSpeaker(); - bool show_counter = getShowCounter(); S32 required_width = mDefaultWidth; - - if (show_counter) - { - required_width += mCounterCtrl->getRect().getWidth(); - } - if (show_speaker) - { - required_width += mSpeakerCtrl->getRect().getWidth(); - } - reshape(required_width, getRect().getHeight()); - onChicletSizeChanged(); } -void LLIMChiclet::toggleSpeakerControl() -{ - if(getShowSpeaker()) - { - // move speaker to the right of chiclet icon - LLRect speaker_rc = mSpeakerCtrl->getRect(); - speaker_rc.setLeftTopAndSize(mDefaultWidth, speaker_rc.mTop, speaker_rc.getWidth(), speaker_rc.getHeight()); - mSpeakerCtrl->setRect(speaker_rc); - - if(getShowCounter()) - { - // move speaker to the right of counter - mSpeakerCtrl->translate(mCounterCtrl->getRect().getWidth(), 0); - } - - initSpeakerControl(); - } - - setRequiredWidth(); - mSpeakerCtrl->setSpeakerId(LLUUID::null); - mSpeakerCtrl->setVisible(getShowSpeaker()); -} - -void LLIMChiclet::setCounter(S32 counter) -{ - if (mCounterCtrl->getCounter() == counter) - { - return; - } - - mCounterCtrl->setCounter(counter); - setShowCounter(counter); - setShowNewMessagesIcon(counter); -} - -void LLIMChiclet::toggleCounterControl() -{ - setRequiredWidth(); - mCounterCtrl->setVisible(getShowCounter()); -} - void LLIMChiclet::setShowNewMessagesIcon(bool show) { if(mNewMessagesIcon) @@ -607,8 +342,7 @@ bool LLIMChiclet::getShowNewMessagesIcon() void LLIMChiclet::onMouseDown() { - LLIMFloater::toggle(getSessionId()); - setCounter(0); + LLFloaterIMSession::toggle(getSessionId()); } void LLIMChiclet::setToggleState(bool toggle) @@ -616,52 +350,6 @@ void LLIMChiclet::setToggleState(bool toggle) mChicletButton->setToggleState(toggle); } -void LLIMChiclet::draw() -{ - LLUICtrl::draw(); -} - -// static -LLIMChiclet::EType LLIMChiclet::getIMSessionType(const LLUUID& session_id) -{ - EType type = TYPE_UNKNOWN; - - if(session_id.isNull()) - return type; - - EInstantMessage im_type = LLIMModel::getInstance()->getType(session_id); - if (IM_COUNT == im_type) - { - llassert_always(0 && "IM session not found"); // should never happen - return type; - } - - switch(im_type) - { - case IM_NOTHING_SPECIAL: - case IM_SESSION_P2P_INVITE: - type = TYPE_IM; - break; - case IM_SESSION_GROUP_START: - case IM_SESSION_INVITE: - if (gAgent.isInGroup(session_id)) - { - type = TYPE_GROUP; - } - else - { - type = TYPE_AD_HOC; - } - break; - case IM_SESSION_CONFERENCE_START: - type = TYPE_AD_HOC; - default: - break; - } - - return type; -} - BOOL LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) { if(!mPopupMenu) @@ -697,382 +385,6 @@ bool LLIMChiclet::canCreateMenu() ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -LLIMP2PChiclet::Params::Params() -: avatar_icon("avatar_icon") -, chiclet_button("chiclet_button") -, unread_notifications("unread_notifications") -, speaker("speaker") -, new_message_icon("new_message_icon") -, show_speaker("show_speaker") -{ -} - -LLIMP2PChiclet::LLIMP2PChiclet(const Params& p) -: LLIMChiclet(p) -, mChicletIconCtrl(NULL) -{ - LLButton::Params button_params = p.chiclet_button; - mChicletButton = LLUICtrlFactory::create<LLButton>(button_params); - addChild(mChicletButton); - - LLIconCtrl::Params new_msg_params = p.new_message_icon; - mNewMessagesIcon = LLUICtrlFactory::create<LLIconCtrl>(new_msg_params); - addChild(mNewMessagesIcon); - - LLChicletAvatarIconCtrl::Params avatar_params = p.avatar_icon; - mChicletIconCtrl = LLUICtrlFactory::create<LLChicletAvatarIconCtrl>(avatar_params); - addChild(mChicletIconCtrl); - - LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications; - mCounterCtrl = LLUICtrlFactory::create<LLChicletNotificationCounterCtrl>(unread_params); - addChild(mCounterCtrl); - - setCounter(getCounter()); - setShowCounter(getShowCounter()); - - LLChicletSpeakerCtrl::Params speaker_params = p.speaker; - mSpeakerCtrl = LLUICtrlFactory::create<LLChicletSpeakerCtrl>(speaker_params); - addChild(mSpeakerCtrl); - - sendChildToFront(mNewMessagesIcon); - setShowSpeaker(p.show_speaker); -} - -void LLIMP2PChiclet::initSpeakerControl() -{ - mSpeakerCtrl->setSpeakerId(getOtherParticipantId()); -} - -void LLIMP2PChiclet::setOtherParticipantId(const LLUUID& other_participant_id) -{ - LLIMChiclet::setOtherParticipantId(other_participant_id); - mChicletIconCtrl->setValue(getOtherParticipantId()); -} - -void LLIMP2PChiclet::updateMenuItems() -{ - if(!mPopupMenu) - return; - if(getSessionId().isNull()) - return; - - LLIMFloater* open_im_floater = LLIMFloater::findInstance(getSessionId()); - bool open_window_exists = open_im_floater && open_im_floater->getVisible(); - mPopupMenu->getChild<LLUICtrl>("Send IM")->setEnabled(!open_window_exists); - - bool is_friend = LLAvatarActions::isFriend(getOtherParticipantId()); - mPopupMenu->getChild<LLUICtrl>("Add Friend")->setEnabled(!is_friend); -} - -void LLIMP2PChiclet::createPopupMenu() -{ - if(!canCreateMenu()) - return; - - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - registrar.add("IMChicletMenu.Action", boost::bind(&LLIMP2PChiclet::onMenuItemClicked, this, _2)); - - mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL> - ("menu_imchiclet_p2p.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); -} - -void LLIMP2PChiclet::onMenuItemClicked(const LLSD& user_data) -{ - std::string level = user_data.asString(); - LLUUID other_participant_id = getOtherParticipantId(); - - if("profile" == level) - { - LLAvatarActions::showProfile(other_participant_id); - } - else if("im" == level) - { - LLAvatarActions::startIM(other_participant_id); - } - else if("add" == level) - { - LLAvatarActions::requestFriendshipDialog(other_participant_id); - } - else if("end" == level) - { - LLAvatarActions::endIM(other_participant_id); - } -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - -LLAdHocChiclet::Params::Params() -: avatar_icon("avatar_icon") -, chiclet_button("chiclet_button") -, unread_notifications("unread_notifications") -, speaker("speaker") -, new_message_icon("new_message_icon") -, show_speaker("show_speaker") -, avatar_icon_color("avatar_icon_color", LLColor4::green) -{ -} - -LLAdHocChiclet::LLAdHocChiclet(const Params& p) -: LLIMChiclet(p) -, mChicletIconCtrl(NULL) -{ - LLButton::Params button_params = p.chiclet_button; - mChicletButton = LLUICtrlFactory::create<LLButton>(button_params); - addChild(mChicletButton); - - LLIconCtrl::Params new_msg_params = p.new_message_icon; - mNewMessagesIcon = LLUICtrlFactory::create<LLIconCtrl>(new_msg_params); - addChild(mNewMessagesIcon); - - LLChicletAvatarIconCtrl::Params avatar_params = p.avatar_icon; - mChicletIconCtrl = LLUICtrlFactory::create<LLChicletAvatarIconCtrl>(avatar_params); - //Make the avatar modified - mChicletIconCtrl->setColor(p.avatar_icon_color); - addChild(mChicletIconCtrl); - - LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications; - mCounterCtrl = LLUICtrlFactory::create<LLChicletNotificationCounterCtrl>(unread_params); - addChild(mCounterCtrl); - - setCounter(getCounter()); - setShowCounter(getShowCounter()); - - LLChicletSpeakerCtrl::Params speaker_params = p.speaker; - mSpeakerCtrl = LLUICtrlFactory::create<LLChicletSpeakerCtrl>(speaker_params); - addChild(mSpeakerCtrl); - - sendChildToFront(mNewMessagesIcon); - setShowSpeaker(p.show_speaker); -} - -void LLAdHocChiclet::setSessionId(const LLUUID& session_id) -{ - LLChiclet::setSessionId(session_id); - LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); - mChicletIconCtrl->setValue(im_session->mOtherParticipantID); -} - -void LLAdHocChiclet::draw() -{ - switchToCurrentSpeaker(); - LLIMChiclet::draw(); -} - -void LLAdHocChiclet::initSpeakerControl() -{ - switchToCurrentSpeaker(); -} - -void LLAdHocChiclet::switchToCurrentSpeaker() -{ - LLUUID speaker_id; - LLSpeakerMgr::speaker_list_t speaker_list; - - LLIMModel::getInstance()->findIMSession(getSessionId())->mSpeakers->getSpeakerList(&speaker_list, FALSE); - for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i) - { - LLPointer<LLSpeaker> s = *i; - if (s->mSpeechVolume > 0 || s->mStatus == LLSpeaker::STATUS_SPEAKING) - { - speaker_id = s->mID; - break; - } - } - - mSpeakerCtrl->setSpeakerId(speaker_id); -} - -void LLAdHocChiclet::createPopupMenu() -{ - if(!canCreateMenu()) - return; - - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - registrar.add("IMChicletMenu.Action", boost::bind(&LLAdHocChiclet::onMenuItemClicked, this, _2)); - - mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL> - ("menu_imchiclet_adhoc.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); -} - -void LLAdHocChiclet::onMenuItemClicked(const LLSD& user_data) -{ - std::string level = user_data.asString(); - LLUUID group_id = getSessionId(); - - if("end" == level) - { - LLGroupActions::endIM(group_id); - } -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - -LLIMGroupChiclet::Params::Params() -: group_icon("group_icon") -, chiclet_button("chiclet_button") -, unread_notifications("unread_notifications") -, speaker("speaker") -, new_message_icon("new_message_icon") -, show_speaker("show_speaker") -{ -} - -LLIMGroupChiclet::LLIMGroupChiclet(const Params& p) -: LLIMChiclet(p) -, LLGroupMgrObserver(LLUUID::null) -, mChicletIconCtrl(NULL) -{ - LLButton::Params button_params = p.chiclet_button; - mChicletButton = LLUICtrlFactory::create<LLButton>(button_params); - addChild(mChicletButton); - - LLIconCtrl::Params new_msg_params = p.new_message_icon; - mNewMessagesIcon = LLUICtrlFactory::create<LLIconCtrl>(new_msg_params); - addChild(mNewMessagesIcon); - - LLChicletGroupIconCtrl::Params avatar_params = p.group_icon; - mChicletIconCtrl = LLUICtrlFactory::create<LLChicletGroupIconCtrl>(avatar_params); - addChild(mChicletIconCtrl); - - LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications; - mCounterCtrl = LLUICtrlFactory::create<LLChicletNotificationCounterCtrl>(unread_params); - addChild(mCounterCtrl); - - setCounter(getCounter()); - setShowCounter(getShowCounter()); - - LLChicletSpeakerCtrl::Params speaker_params = p.speaker; - mSpeakerCtrl = LLUICtrlFactory::create<LLChicletSpeakerCtrl>(speaker_params); - addChild(mSpeakerCtrl); - - sendChildToFront(mNewMessagesIcon); - setShowSpeaker(p.show_speaker); -} - -LLIMGroupChiclet::~LLIMGroupChiclet() -{ - LLGroupMgr::getInstance()->removeObserver(this); -} - -void LLIMGroupChiclet::draw() -{ - if(getShowSpeaker()) - { - switchToCurrentSpeaker(); - } - LLIMChiclet::draw(); -} - -void LLIMGroupChiclet::initSpeakerControl() -{ - switchToCurrentSpeaker(); -} - -void LLIMGroupChiclet::switchToCurrentSpeaker() -{ - LLUUID speaker_id; - LLSpeakerMgr::speaker_list_t speaker_list; - - LLIMModel::getInstance()->findIMSession(getSessionId())->mSpeakers->getSpeakerList(&speaker_list, FALSE); - for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i) - { - LLPointer<LLSpeaker> s = *i; - if (s->mSpeechVolume > 0 || s->mStatus == LLSpeaker::STATUS_SPEAKING) - { - speaker_id = s->mID; - break; - } - } - - mSpeakerCtrl->setSpeakerId(speaker_id); -} - -void LLIMGroupChiclet::setSessionId(const LLUUID& session_id) -{ - LLChiclet::setSessionId(session_id); - - LLGroupMgr* grp_mgr = LLGroupMgr::getInstance(); - LLGroupMgrGroupData* group_data = grp_mgr->getGroupData(session_id); - if (group_data && group_data->mInsigniaID.notNull()) - { - mChicletIconCtrl->setValue(group_data->mInsigniaID); - } - else - { - if(getSessionId() != mID) - { - grp_mgr->removeObserver(this); - mID = getSessionId(); - grp_mgr->addObserver(this); - } - grp_mgr->sendGroupPropertiesRequest(session_id); - } -} - -void LLIMGroupChiclet::changed(LLGroupChange gc) -{ - if (GC_PROPERTIES == gc) - { - LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(getSessionId()); - if (group_data) - { - mChicletIconCtrl->setValue(group_data->mInsigniaID); - } - } -} - -void LLIMGroupChiclet::updateMenuItems() -{ - if(!mPopupMenu) - return; - if(getSessionId().isNull()) - return; - - LLIMFloater* open_im_floater = LLIMFloater::findInstance(getSessionId()); - bool open_window_exists = open_im_floater && open_im_floater->getVisible(); - mPopupMenu->getChild<LLUICtrl>("Chat")->setEnabled(!open_window_exists); -} - -void LLIMGroupChiclet::createPopupMenu() -{ - if(!canCreateMenu()) - return; - - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - registrar.add("IMChicletMenu.Action", boost::bind(&LLIMGroupChiclet::onMenuItemClicked, this, _2)); - - mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL> - ("menu_imchiclet_group.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); -} - -void LLIMGroupChiclet::onMenuItemClicked(const LLSD& user_data) -{ - std::string level = user_data.asString(); - LLUUID group_id = getSessionId(); - - if("group chat" == level) - { - LLGroupActions::startIM(group_id); - } - else if("info" == level) - { - LLGroupActions::show(group_id); - } - else if("end" == level) - { - LLGroupActions::endIM(group_id); - } -} - - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - LLChicletPanel::Params::Params() : chiclet_padding("chiclet_padding") , scrolling_offset("scrolling_offset") @@ -1115,28 +427,17 @@ LLChicletPanel::~LLChicletPanel() void LLChicletPanel::onMessageCountChanged(const LLSD& data) { + // *TODO : we either suppress this method or return a value. Right now, it servers no purpose. + /* LLUUID session_id = data["session_id"].asUUID(); S32 unread = data["participant_unread"].asInteger(); - LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id); if (im_floater && im_floater->getVisible() && im_floater->hasFocus()) { unread = 0; } - - std::list<LLChiclet*> chiclets = LLIMChiclet::sFindChicletsSignal(session_id); - std::list<LLChiclet *>::iterator iter; - for (iter = chiclets.begin(); iter != chiclets.end(); iter++) { - LLChiclet* chiclet = *iter; - if (chiclet != NULL) - { - chiclet->setCounter(unread); - } - else - { - llwarns << "Unable to set counter for chiclet " << session_id << llendl; - } - } + */ } void LLChicletPanel::objectChicletCallback(const LLSD& data) @@ -1151,10 +452,6 @@ void LLChicletPanel::objectChicletCallback(const LLSD& data) LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*iter); if (chiclet != NULL) { - if(data.has("unread")) - { - chiclet->setCounter(data["unread"]); - } chiclet->setShowNewMessagesIcon(new_message); } } @@ -1196,28 +493,13 @@ void LLChicletPanel::onCurrentVoiceChannelChanged(const LLUUID& session_id) LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it); if(chiclet) { - chiclet->setShowSpeaker(true); if (gSavedSettings.getBOOL("OpenIMOnVoice")) { - LLIMFloater::show(chiclet->getSessionId()); + LLFloaterIMContainer::getInstance()->showConversation(session_id); } } } - if(!s_previous_active_voice_session_id.isNull() && s_previous_active_voice_session_id != session_id) - { - chiclets = LLIMChiclet::sFindChicletsSignal(s_previous_active_voice_session_id); - - for(std::list<LLChiclet *>::iterator it = chiclets.begin(); it != chiclets.end(); ++it) - { - LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it); - if(chiclet) - { - chiclet->setShowSpeaker(false); - } - } - } - s_previous_active_voice_session_id = session_id; } @@ -1690,7 +972,7 @@ bool LLChicletPanel::isAnyIMFloaterDoked() for (chiclet_list_t::iterator it = mChicletList.begin(); it != mChicletList.end(); it++) { - LLIMFloater* im_floater = LLFloaterReg::findTypedInstance<LLIMFloater>( + LLFloaterIMSession* im_floater = LLFloaterReg::findTypedInstance<LLFloaterIMSession>( "impanel", (*it)->getSessionId()); if (im_floater != NULL && im_floater->getVisible() && !im_floater->isMinimized() && im_floater->isDocked()) @@ -1703,89 +985,17 @@ bool LLChicletPanel::isAnyIMFloaterDoked() return res; } -S32 LLChicletPanel::getTotalUnreadIMCount() -{ - S32 count = 0; - chiclet_list_t::const_iterator it = mChicletList.begin(); - for( ; mChicletList.end() != it; ++it) - { - LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it); - if(chiclet) - { - count += chiclet->getCounter(); - } - } - return count; -} - ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// LLChicletNotificationCounterCtrl::Params::Params() -: max_displayed_count("max_displayed_count", 99) -{ -} - -LLChicletNotificationCounterCtrl::LLChicletNotificationCounterCtrl(const Params& p) - : LLTextBox(p) - , mCounter(0) - , mInitialWidth(0) - , mMaxDisplayedCount(p.max_displayed_count) -{ - mInitialWidth = getRect().getWidth(); -} - -void LLChicletNotificationCounterCtrl::setCounter(S32 counter) -{ - mCounter = counter; - - // note same code in LLSysWellChiclet::setCounter(S32 counter) - std::string s_count; - if(counter != 0) - { - static std::string more_messages_exist("+"); - std::string more_messages(counter > mMaxDisplayedCount ? more_messages_exist : ""); - s_count = llformat("%d%s" - , llmin(counter, mMaxDisplayedCount) - , more_messages.c_str() - ); - } - - if(mCounter != 0) - { - setText(s_count); - } - else - { - setText(std::string("")); - } -} - -LLRect LLChicletNotificationCounterCtrl::getRequiredRect() -{ - LLRect rc; - S32 text_width = getTextPixelWidth(); - - rc.mRight = rc.mLeft + llmax(text_width, mInitialWidth); - - return rc; -} - -void LLChicletNotificationCounterCtrl::setValue(const LLSD& value) + : max_displayed_count("max_displayed_count", 99) { - if(value.isInteger()) - setCounter(value.asInteger()); -} - -LLSD LLChicletNotificationCounterCtrl::getValue() const -{ - return LLSD(getCounter()); } ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// - LLChicletAvatarIconCtrl::LLChicletAvatarIconCtrl(const Params& p) : LLAvatarIconCtrl(p) { @@ -1795,29 +1005,6 @@ LLChicletAvatarIconCtrl::LLChicletAvatarIconCtrl(const Params& p) ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -LLChicletGroupIconCtrl::LLChicletGroupIconCtrl(const Params& p) -: LLIconCtrl(p) -, mDefaultIcon(p.default_icon) -{ - setValue(LLUUID::null); -} - -void LLChicletGroupIconCtrl::setValue(const LLSD& value ) -{ - if(value.asUUID().isNull()) - { - LLIconCtrl::setValue(mDefaultIcon); - } - else - { - LLIconCtrl::setValue(value); - } -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - LLChicletInvOfferIconCtrl::LLChicletInvOfferIconCtrl(const Params& p) : LLChicletAvatarIconCtrl(p) , mDefaultIcon(p.default_icon) @@ -1840,15 +1027,6 @@ void LLChicletInvOfferIconCtrl::setValue(const LLSD& value ) ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -LLChicletSpeakerCtrl::LLChicletSpeakerCtrl(const Params&p) - : LLOutputMonitorCtrl(p) -{ -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - LLScriptChiclet::Params::Params() : icon("icon") , chiclet_button("chiclet_button") @@ -1884,11 +1062,6 @@ void LLScriptChiclet::setSessionId(const LLUUID& session_id) setToolTip(LLScriptFloaterManager::getObjectName(session_id)); } -void LLScriptChiclet::setCounter(S32 counter) -{ - setShowNewMessagesIcon( counter > 0 ); -} - void LLScriptChiclet::onMouseDown() { LLScriptFloaterManager::getInstance()->toggleScriptFloater(getSessionId()); @@ -1967,11 +1140,6 @@ void LLInvOfferChiclet::setSessionId(const LLUUID& session_id) } } -void LLInvOfferChiclet::setCounter(S32 counter) -{ - setShowNewMessagesIcon( counter > 0 ); -} - void LLInvOfferChiclet::onMouseDown() { LLScriptFloaterManager::instance().toggleScriptFloater(getSessionId()); diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 19683492c2..efaf03384a 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -29,14 +29,11 @@ #include "llavatariconctrl.h" #include "llbutton.h" -#include "llpanel.h" +#include "llnotifications.h" #include "lltextbox.h" -#include "lloutputmonitorctrl.h" -#include "llgroupmgr.h" -#include "llimview.h" class LLMenuGL; -class LLIMFloater; +class LLFloaterIMSession; /** * Class for displaying amount of messages/notifications(unread). @@ -48,11 +45,11 @@ public: struct Params : public LLInitParam::Block<Params, LLTextBox::Params> { /** - * Contains maximum displayed count of unread messages. Default value is 9. - * - * If count is less than "max_unread_count" will be displayed as is. - * Otherwise 9+ will be shown (for default value). - */ + * Contains maximum displayed count of unread messages. Default value is 9. + * + * If count is less than "max_unread_count" will be displayed as is. + * Otherwise 9+ will be shown (for default value). + */ Optional<S32> max_displayed_count; Params(); @@ -120,35 +117,6 @@ protected: }; /** - * Class for displaying group's icon in Group chiclet. - */ -class LLChicletGroupIconCtrl : public LLIconCtrl -{ -public: - - struct Params : public LLInitParam::Block<Params, LLIconCtrl::Params> - { - Optional<std::string> default_icon; - - Params() - : default_icon("default_icon", "Generic_Group") - {} - }; - - /** - * Sets icon, if value is LLUUID::null - default icon will be set. - */ - virtual void setValue(const LLSD& value ); - -protected: - - LLChicletGroupIconCtrl(const Params& p); - friend class LLUICtrlFactory; - - std::string mDefaultIcon; -}; - -/** * Class for displaying icon in inventory offer chiclet. */ class LLChicletInvOfferIconCtrl : public LLChicletAvatarIconCtrl @@ -182,23 +150,6 @@ private: }; /** - * Class for displaying of speaker's voice indicator - */ -class LLChicletSpeakerCtrl : public LLOutputMonitorCtrl -{ -public: - - struct Params : public LLInitParam::Block<Params, LLOutputMonitorCtrl::Params> - { - Params(){}; - }; -protected: - - LLChicletSpeakerCtrl(const Params&p); - friend class LLUICtrlFactory; -}; - -/** * Base class for all chiclets. */ class LLChiclet : public LLUICtrl @@ -213,7 +164,7 @@ public: Params(); }; - /*virtual*/ ~LLChiclet(); + virtual ~LLChiclet() {} /** * Associates chat session id with chiclet. @@ -226,26 +177,11 @@ public: virtual const LLUUID& getSessionId() const { return mSessionId; } /** - * Sets number of unread notifications. - */ - virtual void setCounter(S32 counter) = 0; - - /** - * Returns number of unread notifications. - */ - virtual S32 getCounter() = 0; - - /** * Sets show counter state. */ virtual void setShowCounter(bool show) { mShowCounter = show; } /** - * Returns show counter state. - */ - virtual bool getShowCounter() {return mShowCounter;}; - - /** * Connects chiclet clicked event with callback. */ /*virtual*/ boost::signals2::connection setLeftButtonClickCallback( @@ -322,6 +258,7 @@ public: * It is used for default setting up of chicklet:click handler, etc. */ BOOL postBuild(); + /** * Sets IM session name. This name will be displayed in chiclet tooltip. */ @@ -334,52 +271,11 @@ public: virtual void setOtherParticipantId(const LLUUID& other_participant_id) { mOtherParticipantId = other_participant_id; } /** - * Gets id of person/group user is chatting with. + * Enables/disables the counter control for a chiclet. */ - virtual LLUUID getOtherParticipantId() { return mOtherParticipantId; } - - /** - * Init Speaker Control with speaker's ID - */ - virtual void initSpeakerControl(); - - /** - * set status (Shows/Hide) for voice control. - */ - virtual void setShowSpeaker(bool show); - - /** - * Returns voice chat status control visibility. - */ - virtual bool getShowSpeaker() {return mShowSpeaker;}; - - /** - * Shows/Hides for voice control for a chiclet. - */ - virtual void toggleSpeakerControl(); - - /** - * Sets number of unread messages. Will update chiclet's width if number text - * exceeds size of counter and notify it's parent about size change. - */ - virtual void setCounter(S32); - - /** - * Enables/disables the counter control for a chiclet. - */ virtual void enableCounterControl(bool enable); /** - * Sets show counter state. - */ - virtual void setShowCounter(bool show); - - /** - * Shows/Hides for counter control for a chiclet. - */ - virtual void toggleCounterControl(); - - /** * Sets required width for a chiclet according to visible controls. */ virtual void setRequiredWidth(); @@ -394,21 +290,6 @@ public: */ virtual bool getShowNewMessagesIcon(); - virtual void draw(); - - /** - * Determine whether given ID refers to a group or an IM chat session. - * - * This is used when we need to chose what IM chiclet (P2P/group) - * class to instantiate. - * - * @param session_id session ID. - * @return TYPE_GROUP in case of group chat session, - * TYPE_IM in case of P2P session, - * TYPE_UNKNOWN otherwise. - */ - static EType getIMSessionType(const LLUUID& session_id); - /** * The action taken on mouse down event. * @@ -450,8 +331,6 @@ protected: S32 mDefaultWidth; LLIconCtrl* mNewMessagesIcon; - LLChicletNotificationCounterCtrl* mCounterCtrl; - LLChicletSpeakerCtrl* mSpeakerCtrl; LLButton* mChicletButton; /** the id of another participant, either an avatar id or a group id*/ @@ -479,137 +358,6 @@ public: sFindChicletsSignal; }; -/** - * Implements P2P chiclet. - */ -class LLIMP2PChiclet : public LLIMChiclet -{ -public: - struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params> - { - Optional<LLButton::Params> chiclet_button; - - Optional<LLChicletAvatarIconCtrl::Params> avatar_icon; - - Optional<LLChicletNotificationCounterCtrl::Params> unread_notifications; - - Optional<LLChicletSpeakerCtrl::Params> speaker; - - Optional<LLIconCtrl::Params> new_message_icon; - - Optional<bool> show_speaker; - - Params(); - }; - - /* virtual */ void setOtherParticipantId(const LLUUID& other_participant_id); - - /** - * Init Speaker Control with speaker's ID - */ - /*virtual*/ void initSpeakerControl(); - - /** - * Returns number of unread messages. - */ - /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } - -protected: - LLIMP2PChiclet(const Params& p); - friend class LLUICtrlFactory; - - /** - * Creates chiclet popup menu. Will create P2P or Group IM Chat menu - * based on other participant's id. - */ - virtual void createPopupMenu(); - - /** - * Processes clicks on chiclet popup menu. - */ - virtual void onMenuItemClicked(const LLSD& user_data); - - /** - * Enables/disables menus based on relationship with other participant. - * Enables/disables "show session" menu item depending on visible IM floater existence. - */ - virtual void updateMenuItems(); - -private: - - LLChicletAvatarIconCtrl* mChicletIconCtrl; -}; - -/** - * Implements AD-HOC chiclet. - */ -class LLAdHocChiclet : public LLIMChiclet -{ -public: - struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params> - { - Optional<LLButton::Params> chiclet_button; - - Optional<LLChicletAvatarIconCtrl::Params> avatar_icon; - - Optional<LLChicletNotificationCounterCtrl::Params> unread_notifications; - - Optional<LLChicletSpeakerCtrl::Params> speaker; - - Optional<LLIconCtrl::Params> new_message_icon; - - Optional<bool> show_speaker; - - Optional<LLColor4> avatar_icon_color; - - Params(); - }; - - /** - * Sets session id. - * Session ID for group chat is actually Group ID. - */ - /*virtual*/ void setSessionId(const LLUUID& session_id); - - /** - * Keep Speaker Control with actual speaker's ID - */ - /*virtual*/ void draw(); - - /** - * Init Speaker Control with speaker's ID - */ - /*virtual*/ void initSpeakerControl(); - - /** - * Returns number of unread messages. - */ - /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } - -protected: - LLAdHocChiclet(const Params& p); - friend class LLUICtrlFactory; - - /** - * Creates chiclet popup menu. Will create AdHoc Chat menu - * based on other participant's id. - */ - virtual void createPopupMenu(); - - /** - * Processes clicks on chiclet popup menu. - */ - virtual void onMenuItemClicked(const LLSD& user_data); - - /** - * Finds a current speaker and resets the SpeakerControl with speaker's ID - */ - /*virtual*/ void switchToCurrentSpeaker(); - -private: - - LLChicletAvatarIconCtrl* mChicletIconCtrl; -}; /** * Chiclet for script floaters. @@ -631,10 +379,6 @@ public: /*virtual*/ void setSessionId(const LLUUID& session_id); - /*virtual*/ void setCounter(S32 counter); - - /*virtual*/ S32 getCounter() { return 0; } - /** * Toggle script floater */ @@ -680,10 +424,6 @@ public: /*virtual*/ void setSessionId(const LLUUID& session_id); - /*virtual*/ void setCounter(S32 counter); - - /*virtual*/ S32 getCounter() { return 0; } - /** * Toggle script floater */ @@ -708,96 +448,13 @@ private: }; /** - * Implements Group chat chiclet. - */ -class LLIMGroupChiclet : public LLIMChiclet, public LLGroupMgrObserver -{ -public: - - struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params> - { - Optional<LLButton::Params> chiclet_button; - - Optional<LLChicletGroupIconCtrl::Params> group_icon; - - Optional<LLChicletNotificationCounterCtrl::Params> unread_notifications; - - Optional<LLChicletSpeakerCtrl::Params> speaker; - - Optional<LLIconCtrl::Params> new_message_icon; - - Optional<bool> show_speaker; - - Params(); - }; - - /** - * Sets session id. - * Session ID for group chat is actually Group ID. - */ - /*virtual*/ void setSessionId(const LLUUID& session_id); - - /** - * Keep Speaker Control with actual speaker's ID - */ - /*virtual*/ void draw(); - - /** - * Callback for LLGroupMgrObserver, we get this when group data is available or changed. - * Sets group icon. - */ - /*virtual*/ void changed(LLGroupChange gc); - - /** - * Init Speaker Control with speaker's ID - */ - /*virtual*/ void initSpeakerControl(); - - /** - * Returns number of unread messages. - */ - /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } - - ~LLIMGroupChiclet(); - -protected: - LLIMGroupChiclet(const Params& p); - friend class LLUICtrlFactory; - - /** - * Finds a current speaker and resets the SpeakerControl with speaker's ID - */ - /*virtual*/ void switchToCurrentSpeaker(); - - /** - * Creates chiclet popup menu. Will create P2P or Group IM Chat menu - * based on other participant's id. - */ - virtual void createPopupMenu(); - - /** - * Processes clicks on chiclet popup menu. - */ - virtual void onMenuItemClicked(const LLSD& user_data); - - /** - * Enables/disables "show session" menu item depending on visible IM floater existence. - */ - virtual void updateMenuItems(); - -private: - - LLChicletGroupIconCtrl* mChicletIconCtrl; -}; - -/** * Implements notification chiclet. Used to display total amount of unread messages * across all IM sessions, total amount of system notifications. See EXT-3147 for details */ class LLSysWellChiclet : public LLChiclet { public: - + struct Params : public LLInitParam::Block<Params, LLChiclet::Params> { Optional<LLButton::Params> button; @@ -843,7 +500,7 @@ protected: * There is an assumption that it will be called 2*N times to do not change its start state. * @see FlashToLitTimer */ - void changeLitState(); + void changeLitState(bool blink); /** * Displays menu. @@ -859,86 +516,58 @@ protected: S32 mMaxDisplayedCount; bool mIsNewMessagesState; - FlashToLitTimer* mFlashToLitTimer; + LLFlashTimer* mFlashToLitTimer; LLContextMenu* mContextMenu; }; -/** - * Class represented a chiclet for IM Well Icon. - * - * It displays a count of unread messages from other participants in all IM sessions. - */ -class LLIMWellChiclet : public LLSysWellChiclet, LLIMSessionObserver -{ - friend class LLUICtrlFactory; -public: - virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {} - virtual void sessionRemoved(const LLUUID& session_id) { messageCountChanged(LLSD()); } - virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) {} - - ~LLIMWellChiclet(); -protected: - LLIMWellChiclet(const Params& p); - - /** - * Processes clicks on chiclet popup menu. - */ - virtual void onMenuItemClicked(const LLSD& user_data); - - /** - * Enables chiclet menu items. - */ - bool enableMenuItem(const LLSD& user_data); - - /** - * Creates menu. - */ - /*virtual*/ void createMenu(); - - /** - * Handles changes in a session (message was added, messages were read, etc.) - * - * It get total count of unread messages from a LLIMMgr in all opened sessions and display it. - * - * @param[in] session_data contains session related data, is not used now - * ["session_id"] - id of an appropriate session - * ["participant_unread"] - count of unread messages from "real" participants. - * - * @see LLIMMgr::getNumberOfUnreadParticipantMessages() - */ - void messageCountChanged(const LLSD& session_data); -}; - class LLNotificationChiclet : public LLSysWellChiclet { + LOG_CLASS(LLNotificationChiclet); + friend class LLUICtrlFactory; public: struct Params : public LLInitParam::Block<Params, LLSysWellChiclet::Params>{}; - + protected: + struct ChicletNotificationChannel : public LLNotificationChannel + { + ChicletNotificationChannel(LLNotificationChiclet* chiclet) + : LLNotificationChannel(LLNotificationChannel::Params().filter(filterNotification).name(chiclet->getSessionId().asString())) + , mChiclet(chiclet) + { + // connect counter handlers to the signals + connectToChannel("Group Notifications"); + connectToChannel("Offer"); + connectToChannel("Notifications"); + } + + static bool filterNotification(LLNotificationPtr notify); + // connect counter updaters to the corresponding signals + /*virtual*/ void onAdd(LLNotificationPtr p) { mChiclet->setCounter(++mChiclet->mUreadSystemNotifications); } + /*virtual*/ void onDelete(LLNotificationPtr p) { mChiclet->setCounter(--mChiclet->mUreadSystemNotifications); } + + LLNotificationChiclet* const mChiclet; + }; + + boost::scoped_ptr<ChicletNotificationChannel> mNotificationChannel; + LLNotificationChiclet(const Params& p); - + /** * Processes clicks on chiclet menu. */ void onMenuItemClicked(const LLSD& user_data); - + /** * Enables chiclet menu items. */ bool enableMenuItem(const LLSD& user_data); - + /** * Creates menu. */ /*virtual*/ void createMenu(); - // connect counter updaters to the corresponding signals - void connectCounterUpdatersToSignal(const std::string& notification_type); - - // methods for updating a number of unread System notifications - void incUreadSystemNotifications() { setCounter(++mUreadSystemNotifications); } - void decUreadSystemNotifications() { setCounter(--mUreadSystemNotifications); } /*virtual*/ void setCounter(S32 counter); S32 mUreadSystemNotifications; }; @@ -1044,9 +673,7 @@ public: S32 getMinWidth() const { return mMinWidth; } - S32 getTotalUnreadIMCount(); - - S32 notifyParent(const LLSD& info); + /*virtual*/ S32 notifyParent(const LLSD& info); /** * Toggle chiclet by session id ON and toggle OFF all other chiclets. diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp index f1bc51fbe7..a51c844775 100644 --- a/indra/newview/llchicletbar.cpp +++ b/indra/newview/llchicletbar.cpp @@ -25,16 +25,10 @@ */ #include "llviewerprecompiledheaders.h" // must be first include - #include "llchicletbar.h" -// library includes -#include "llfloaterreg.h" -#include "lllayoutstack.h" - -// newview includes #include "llchiclet.h" -#include "llimfloater.h" // for LLIMFloater +#include "lllayoutstack.h" #include "llpaneltopinfobar.h" #include "llsyswellwindow.h" @@ -57,107 +51,14 @@ LLChicletBar::LLChicletBar(const LLSD&) : mChicletPanel(NULL), mToolbarStack(NULL) { - // Firstly add our self to IMSession observers, so we catch session events - // before chiclets do that. - LLIMMgr::getInstance()->addSessionObserver(this); - buildFromFile("panel_chiclet_bar.xml"); } -LLChicletBar::~LLChicletBar() -{ - if (!LLSingleton<LLIMMgr>::destroyed()) - { - LLIMMgr::getInstance()->removeSessionObserver(this); - } -} - -LLIMChiclet* LLChicletBar::createIMChiclet(const LLUUID& session_id) -{ - LLIMChiclet::EType im_chiclet_type = LLIMChiclet::getIMSessionType(session_id); - - switch (im_chiclet_type) - { - case LLIMChiclet::TYPE_IM: - return getChicletPanel()->createChiclet<LLIMP2PChiclet>(session_id); - case LLIMChiclet::TYPE_GROUP: - return getChicletPanel()->createChiclet<LLIMGroupChiclet>(session_id); - case LLIMChiclet::TYPE_AD_HOC: - return getChicletPanel()->createChiclet<LLAdHocChiclet>(session_id); - case LLIMChiclet::TYPE_UNKNOWN: - break; - } - - return NULL; -} - -//virtual -void LLChicletBar::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) -{ - if (!getChicletPanel()) return; - - LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); - if (!session) return; - - // no need to spawn chiclets for participants in P2P calls called through Avaline - if (session->isP2P() && session->isOtherParticipantAvaline()) return; - - if (getChicletPanel()->findChiclet<LLChiclet>(session_id)) return; - - LLIMChiclet* chiclet = createIMChiclet(session_id); - if(chiclet) - { - chiclet->setIMSessionName(name); - chiclet->setOtherParticipantId(other_participant_id); - - LLIMFloater::onIMChicletCreated(session_id); - - } - else - { - llwarns << "Could not create chiclet" << llendl; - } -} - -//virtual -void LLChicletBar::sessionRemoved(const LLUUID& session_id) -{ - if(getChicletPanel()) - { - // IM floater should be closed when session removed and associated chiclet closed - LLIMFloater* iMfloater = LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id); - if (iMfloater != NULL) - { - iMfloater->closeFloater(); - } - - getChicletPanel()->removeChiclet(session_id); - } -} - -void LLChicletBar::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) -{ - //this is only needed in case of outgoing ad-hoc/group chat sessions - LLChicletPanel* chiclet_panel = getChicletPanel(); - if (chiclet_panel) - { - //it should be ad-hoc im chiclet or group im chiclet - LLChiclet* chiclet = chiclet_panel->findChiclet<LLChiclet>(old_session_id); - if (chiclet) chiclet->setSessionId(new_session_id); - } -} - -S32 LLChicletBar::getTotalUnreadIMCount() -{ - return getChicletPanel()->getTotalUnreadIMCount(); -} - BOOL LLChicletBar::postBuild() { mToolbarStack = getChild<LLLayoutStack>("toolbar_stack"); mChicletPanel = getChild<LLChicletPanel>("chiclet_list"); - showWellButton("im_well", !LLIMWellWindow::getInstance()->isWindowEmpty()); showWellButton("notification_well", !LLNotificationWellWindow::getInstance()->isWindowEmpty()); LLPanelTopInfoBar::instance().setResizeCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this)); diff --git a/indra/newview/llchicletbar.h b/indra/newview/llchicletbar.h index 1427bf95e0..956c82cb77 100644 --- a/indra/newview/llchicletbar.h +++ b/indra/newview/llchicletbar.h @@ -28,7 +28,6 @@ #define LL_LLCHICLETBAR_H #include "llpanel.h" -#include "llimview.h" class LLChicletPanel; class LLIMChiclet; @@ -38,30 +37,17 @@ class LLLayoutStack; class LLChicletBar : public LLSingleton<LLChicletBar> , public LLPanel - , public LLIMSessionObserver { LOG_CLASS(LLChicletBar); friend class LLSingleton<LLChicletBar>; public: - ~LLChicletBar(); BOOL postBuild(); LLChicletPanel* getChicletPanel() { return mChicletPanel; } - // LLIMSessionObserver observe triggers - virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id); - virtual void sessionRemoved(const LLUUID& session_id); - void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); - - S32 getTotalUnreadIMCount(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); - /** - * Creates IM Chiclet based on session type (IM chat or Group chat) - */ - LLIMChiclet* createIMChiclet(const LLUUID& session_id); /** * Shows/hides panel with specified well button (IM or Notification) diff --git a/indra/newview/llcommunicationchannel.cpp b/indra/newview/llcommunicationchannel.cpp new file mode 100644 index 0000000000..0821510645 --- /dev/null +++ b/indra/newview/llcommunicationchannel.cpp @@ -0,0 +1,113 @@ +/** +* @file llcommunicationchannel.cpp +* @brief Implementation of llcommunicationchannel +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + +#include "llviewerprecompiledheaders.h" // must be first include + +#include "llcommunicationchannel.h" + +#include <string> +#include <map> + +#include "llagent.h" +#include "lldate.h" +#include "llnotifications.h" + + +LLCommunicationChannel::LLCommunicationChannel(const std::string& pName, const std::string& pParentName) + : LLNotificationChannel(pName, pParentName, filterByDoNotDisturbStatus) + , mHistory() +{ +} + +LLCommunicationChannel::~LLCommunicationChannel() +{ +} + +bool LLCommunicationChannel::filterByDoNotDisturbStatus(LLNotificationPtr) +{ + return !gAgent.isDoNotDisturb(); +} + +S32 LLCommunicationChannel::getHistorySize() const +{ + return mHistory.size(); +} + +LLCommunicationChannel::history_list_t::const_iterator LLCommunicationChannel::beginHistory() const +{ + return mHistory.begin(); +} + +LLCommunicationChannel::history_list_t::const_iterator LLCommunicationChannel::endHistory() const +{ + return mHistory.end(); +} + +LLCommunicationChannel::history_list_t::iterator LLCommunicationChannel::beginHistory() +{ + return mHistory.begin(); +} + +LLCommunicationChannel::history_list_t::iterator LLCommunicationChannel::endHistory() +{ + return mHistory.end(); +} + +void LLCommunicationChannel::clearHistory() +{ + mHistory.clear(); +} + +void LLCommunicationChannel::removeItemFromHistory(LLNotificationPtr p) +{ + //Find the notification and removes it from mHistory + for(history_list_t::iterator it = beginHistory(); it != endHistory(); ++it) + { + if(it->second == p) + { + mHistory.erase(it); + break; + } + } +} + +void LLCommunicationChannel::onDelete(LLNotificationPtr p) +{ + removeItemFromHistory(p); +} + +void LLCommunicationChannel::onFilterFail(LLNotificationPtr pNotificationPtr) +{ + std::string notificationType = pNotificationPtr->getType(); + if ((notificationType == "groupnotify") + || (notificationType == "offer") + || (notificationType == "notifytoast") + && !pNotificationPtr->isCancelled()) + { + mHistory.insert(std::make_pair<LLDate, LLNotificationPtr>(pNotificationPtr->getDate(), pNotificationPtr)); + } +} diff --git a/indra/newview/llcommunicationchannel.h b/indra/newview/llcommunicationchannel.h new file mode 100644 index 0000000000..0d8f7f4387 --- /dev/null +++ b/indra/newview/llcommunicationchannel.h @@ -0,0 +1,66 @@ +/** +* @file llcommunicationchannel.h +* @brief Header file for llcommunicationchannel +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ +#ifndef LL_LLCOMMUNICATIONCHANNEL_H +#define LL_LLCOMMUNICATIONCHANNEL_H + +#include <string> +#include <map> + +#include "lldate.h" +#include "llerror.h" +#include "llnotifications.h" + +class LLCommunicationChannel : public LLNotificationChannel +{ + LOG_CLASS(LLCommunicationChannel); +public: + LLCommunicationChannel(const std::string& pName, const std::string& pParentName); + virtual ~LLCommunicationChannel(); + + static bool filterByDoNotDisturbStatus(LLNotificationPtr); + + typedef std::multimap<LLDate, LLNotificationPtr> history_list_t; + S32 getHistorySize() const; + history_list_t::const_iterator beginHistory() const; + history_list_t::const_iterator endHistory() const; + history_list_t::iterator beginHistory(); + history_list_t::iterator endHistory(); + + void clearHistory(); + void removeItemFromHistory(LLNotificationPtr p); + +protected: + virtual void onDelete(LLNotificationPtr p); + virtual void onFilterFail(LLNotificationPtr pNotificationPtr); + +private: + + history_list_t mHistory; +}; + +#endif // LL_LLCOMMUNICATIONCHANNEL_H + diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp new file mode 100644 index 0000000000..7883e4cb89 --- /dev/null +++ b/indra/newview/llconversationlog.cpp @@ -0,0 +1,615 @@ +/** + * @file llconversationlog.h + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llagent.h" +#include "llavatarnamecache.h" +#include "llconversationlog.h" +#include "lldiriterator.h" +#include "llnotificationsutil.h" +#include "lltrans.h" + +#include <boost/foreach.hpp> +#include "boost/lexical_cast.hpp" + +const int CONVERSATION_LIFETIME = 30; // lifetime of LLConversation is 30 days by spec + +struct ConversationParams +{ + ConversationParams(time_t time) + : mTime(time), + mTimestamp(LLConversation::createTimestamp(time)) + {} + + time_t mTime; + std::string mTimestamp; + SessionType mConversationType; + std::string mConversationName; + std::string mHistoryFileName; + LLUUID mSessionID; + LLUUID mParticipantID; + bool mHasOfflineIMs; +}; + +/************************************************************************/ +/* LLConversation implementation */ +/************************************************************************/ + +LLConversation::LLConversation(const ConversationParams& params) +: mTime(params.mTime), + mTimestamp(params.mTimestamp), + mConversationType(params.mConversationType), + mConversationName(params.mConversationName), + mHistoryFileName(params.mHistoryFileName), + mSessionID(params.mSessionID), + mParticipantID(params.mParticipantID), + mHasOfflineIMs(params.mHasOfflineIMs) +{ + setListenIMFloaterOpened(); +} + +LLConversation::LLConversation(const LLIMModel::LLIMSession& session) +: mTime(time_corrected()), + mTimestamp(createTimestamp(mTime)), + mConversationType(session.mSessionType), + mConversationName(session.mName), + mHistoryFileName(session.mHistoryFileName), + mSessionID(session.isOutgoingAdHoc() ? session.generateOutgouigAdHocHash() : session.mSessionID), + mParticipantID(session.mOtherParticipantID), + mHasOfflineIMs(session.mHasOfflineMessage) +{ + setListenIMFloaterOpened(); +} + +LLConversation::LLConversation(const LLConversation& conversation) +{ + mTime = conversation.getTime(); + mTimestamp = conversation.getTimestamp(); + mConversationType = conversation.getConversationType(); + mConversationName = conversation.getConversationName(); + mHistoryFileName = conversation.getHistoryFileName(); + mSessionID = conversation.getSessionID(); + mParticipantID = conversation.getParticipantID(); + mHasOfflineIMs = conversation.hasOfflineMessages(); + + setListenIMFloaterOpened(); +} + +LLConversation::~LLConversation() +{ + mIMFloaterShowedConnection.disconnect(); +} + +void LLConversation::updateTimestamp() +{ + mTime = time_corrected(); + mTimestamp = createTimestamp(mTime); +} + +void LLConversation::onIMFloaterShown(const LLUUID& session_id) +{ + if (mSessionID == session_id) + { + mHasOfflineIMs = false; + } +} + +// static +const std::string LLConversation::createTimestamp(const time_t& utc_time) +{ + std::string timeStr; + LLSD substitution; + substitution["datetime"] = (S32) utc_time; + + timeStr = "["+LLTrans::getString ("TimeMonth")+"]/[" + +LLTrans::getString ("TimeDay")+"]/[" + +LLTrans::getString ("TimeYear")+"] [" + +LLTrans::getString ("TimeHour")+"]:[" + +LLTrans::getString ("TimeMin")+"]"; + + + LLStringUtil::format (timeStr, substitution); + return timeStr; +} + +bool LLConversation::isOlderThan(U32 days) const +{ + time_t now = time_corrected(); + U32 age = (U32)((now - mTime) / SEC_PER_DAY); // age of conversation in days + + return age > days; +} + +void LLConversation::setListenIMFloaterOpened() +{ + LLFloaterIMSession* floater = LLFloaterIMSession::findInstance(mSessionID); + + bool offline_ims_visible = LLFloaterIMSession::isVisible(floater) && floater->hasFocus(); + + // we don't need to listen for im floater with this conversation is opened + // if floater is already opened or this conversation doesn't have unread offline messages + if (mHasOfflineIMs && !offline_ims_visible) + { + mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback(boost::bind(&LLConversation::onIMFloaterShown, this, _1)); + } + else + { + mHasOfflineIMs = false; + } +} + +/************************************************************************/ +/* LLConversationLogFriendObserver implementation */ +/************************************************************************/ + +// Note : An LLSingleton like LLConversationLog cannot be an LLFriendObserver +// at the same time. +// This is because avatar observers are deleted by the observed object which +// conflicts with the way LLSingleton are deleted. + +class LLConversationLogFriendObserver : public LLFriendObserver +{ +public: + LLConversationLogFriendObserver() {} + virtual ~LLConversationLogFriendObserver() {} + virtual void changed(U32 mask); +}; + +void LLConversationLogFriendObserver::changed(U32 mask) +{ + if (mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE)) + { + LLConversationLog::instance().notifyObservers(); + } +} + +/************************************************************************/ +/* LLConversationLog implementation */ +/************************************************************************/ + +LLConversationLog::LLConversationLog() : + mAvatarNameCacheConnection(), + mLoggingEnabled(false) +{ + if(gSavedPerAccountSettings.controlExists("KeepConversationLogTranscripts")) + { + LLControlVariable * keep_log_ctrlp = gSavedPerAccountSettings.getControl("KeepConversationLogTranscripts").get(); + S32 log_mode = keep_log_ctrlp->getValue(); + keep_log_ctrlp->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2)); + if (log_mode > 0) + { + loadFromFile(getFileName()); + + enableLogging(log_mode); + } + } +} + +void LLConversationLog::enableLogging(S32 log_mode) +{ + mLoggingEnabled = log_mode > 0; + if (log_mode > 0) + { + mConversations.clear(); + loadFromFile(getFileName()); + LLIMMgr::instance().addSessionObserver(this); + mNewMessageSignalConnection = LLIMModel::instance().addNewMsgCallback(boost::bind(&LLConversationLog::onNewMessageReceived, this, _1)); + + mFriendObserver = new LLConversationLogFriendObserver; + LLAvatarTracker::instance().addObserver(mFriendObserver); + } + else + { + saveToFile(getFileName()); + + LLIMMgr::instance().removeSessionObserver(this); + mNewMessageSignalConnection.disconnect(); + LLAvatarTracker::instance().removeObserver(mFriendObserver); + } + + notifyObservers(); +} + +void LLConversationLog::logConversation(const LLUUID& session_id, BOOL has_offline_msg) +{ + const LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id); + LLConversation* conversation = findConversation(session); + + if (session && session->mOtherParticipantID != gAgentID) + { + if (conversation) + { + if(has_offline_msg) + { + updateOfflineIMs(session, has_offline_msg); + } + updateConversationTimestamp(conversation); + } + else + { + createConversation(session); + } + } +} + +void LLConversationLog::createConversation(const LLIMModel::LLIMSession* session) +{ + if (session) + { + LLConversation conversation(*session); + mConversations.push_back(conversation); + + if (LLIMModel::LLIMSession::P2P_SESSION == session->mSessionType) + { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(session->mOtherParticipantID, boost::bind(&LLConversationLog::onAvatarNameCache, this, _1, _2, session)); + } + + notifyObservers(); + } +} + +void LLConversationLog::updateConversationName(const LLIMModel::LLIMSession* session, const std::string& name) +{ + if (!session) + { + return; + } + + LLConversation* conversation = findConversation(session); + if (conversation) + { + conversation->setConversationName(name); + notifyParticularConversationObservers(conversation->getSessionID(), LLConversationLogObserver::CHANGED_NAME); + } +} + +void LLConversationLog::updateOfflineIMs(const LLIMModel::LLIMSession* session, BOOL new_messages) +{ + if (!session) + { + return; + } + + LLConversation* conversation = findConversation(session); + if (conversation) + { + conversation->setOfflineMessages(new_messages); + notifyParticularConversationObservers(conversation->getSessionID(), LLConversationLogObserver::CHANGED_OfflineIMs); + } +} + +void LLConversationLog::updateConversationTimestamp(LLConversation* conversation) +{ + if (conversation) + { + conversation->updateTimestamp(); + notifyParticularConversationObservers(conversation->getSessionID(), LLConversationLogObserver::CHANGED_TIME); + } +} + +LLConversation* LLConversationLog::findConversation(const LLIMModel::LLIMSession* session) +{ + if (session) + { + const LLUUID session_id = session->isOutgoingAdHoc() ? session->generateOutgouigAdHocHash() : session->mSessionID; + + conversations_vec_t::iterator conv_it = mConversations.begin(); + for(; conv_it != mConversations.end(); ++conv_it) + { + if (conv_it->getSessionID() == session_id) + { + return &*conv_it; + } + } + } + + return NULL; +} + +void LLConversationLog::removeConversation(const LLConversation& conversation) +{ + conversations_vec_t::iterator conv_it = mConversations.begin(); + for(; conv_it != mConversations.end(); ++conv_it) + { + if (conv_it->getSessionID() == conversation.getSessionID() && conv_it->getTime() == conversation.getTime()) + { + mConversations.erase(conv_it); + notifyObservers(); + cache(); + return; + } + } +} + +const LLConversation* LLConversationLog::getConversation(const LLUUID& session_id) +{ + conversations_vec_t::const_iterator conv_it = mConversations.begin(); + for(; conv_it != mConversations.end(); ++conv_it) + { + if (conv_it->getSessionID() == session_id) + { + return &*conv_it; + } + } + + return NULL; +} + +void LLConversationLog::addObserver(LLConversationLogObserver* observer) +{ + mObservers.insert(observer); +} + +void LLConversationLog::removeObserver(LLConversationLogObserver* observer) +{ + mObservers.erase(observer); +} + +void LLConversationLog::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) +{ + logConversation(session_id, has_offline_msg); +} + +void LLConversationLog::cache() +{ + if (gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0) + { + saveToFile(getFileName()); + } +} + +void LLConversationLog::getListOfBackupLogs(std::vector<std::string>& list_of_backup_logs) +{ + // get Users log directory + std::string dirname = gDirUtilp->getPerAccountChatLogsDir(); + + // add final OS dependent delimiter + dirname += gDirUtilp->getDirDelimiter(); + + // create search pattern + std::string pattern = "conversation.log.backup*"; + + LLDirIterator iter(dirname, pattern); + std::string filename; + while (iter.next(filename)) + { + list_of_backup_logs.push_back(gDirUtilp->add(dirname, filename)); + } +} + +void LLConversationLog::deleteBackupLogs() +{ + std::vector<std::string> backup_logs; + getListOfBackupLogs(backup_logs); + + BOOST_FOREACH(const std::string& fullpath, backup_logs) + { + LLFile::remove(fullpath); + } +} + +bool LLConversationLog::moveLog(const std::string &originDirectory, const std::string &targetDirectory) +{ + + std::string backupFileName; + unsigned backupFileCount = 0; + + //Does the file exist in the current path, if it does lets move it + if(LLFile::isfile(originDirectory)) + { + //The target directory contains that file already, so lets store it + if(LLFile::isfile(targetDirectory)) + { + backupFileName = targetDirectory + ".backup"; + + //If needed store backup file as .backup1 etc. + while(LLFile::isfile(backupFileName)) + { + ++backupFileCount; + backupFileName = targetDirectory + ".backup" + boost::lexical_cast<std::string>(backupFileCount); + } + + //Rename the file to its backup name so it is not overwritten + LLFile::rename(targetDirectory, backupFileName); + } + + //Move the file from the current path to target path + if(LLFile::rename(originDirectory, targetDirectory) != 0) + { + return false; + } + } + + return true; +} + +std::string LLConversationLog::getFileName() +{ + std::string filename = "conversation"; + return gDirUtilp->getExpandedFilename(LL_PATH_PER_ACCOUNT_CHAT_LOGS, filename) + ".log"; +} + +bool LLConversationLog::saveToFile(const std::string& filename) +{ + if (!filename.size()) + { + llwarns << "Call log list filename is empty!" << llendl; + return false; + } + + LLFILE* fp = LLFile::fopen(filename, "wb"); + if (!fp) + { + llwarns << "Couldn't open call log list" << filename << llendl; + return false; + } + + std::string participant_id; + std::string conversation_id; + + conversations_vec_t::const_iterator conv_it = mConversations.begin(); + for (; conv_it != mConversations.end(); ++conv_it) + { + conv_it->getSessionID().toString(conversation_id); + conv_it->getParticipantID().toString(participant_id); + + // examples of two file entries + // [1343221177] 0 1 0 John Doe| 7e4ec5be-783f-49f5-71dz-16c58c64c145 4ec62a74-c246-0d25-2af6-846beac2aa55 john.doe| + // [1343222639] 2 0 0 Ad-hoc Conference| c3g67c89-c479-4c97-b21d-32869bcfe8rc 68f1c33e-4135-3e3e-a897-8c9b23115c09 Ad-hoc Conference hash597394a0-9982-766d-27b8-c75560213b9a| + + fprintf(fp, "[%lld] %d %d %d %s| %s %s %s|\n", + (S64)conv_it->getTime(), + (S32)conv_it->getConversationType(), + (S32)0, + (S32)conv_it->hasOfflineMessages(), + conv_it->getConversationName().c_str(), + participant_id.c_str(), + conversation_id.c_str(), + conv_it->getHistoryFileName().c_str()); + } + fclose(fp); + return true; +} +bool LLConversationLog::loadFromFile(const std::string& filename) +{ + if(!filename.size()) + { + llwarns << "Call log list filename is empty!" << llendl; + return false; + } + + LLFILE* fp = LLFile::fopen(filename, "rb"); + if (!fp) + { + llwarns << "Couldn't open call log list" << filename << llendl; + return false; + } + + char buffer[MAX_STRING]; + char conv_name_buffer[MAX_STRING]; + char part_id_buffer[MAX_STRING]; + char conv_id_buffer[MAX_STRING]; + char history_file_name[MAX_STRING]; + S32 has_offline_ims; + S32 stype; + S64 time; + // before CHUI-348 it was a flag of conversation voice state + int prereserved_unused; + + while (!feof(fp) && fgets(buffer, MAX_STRING, fp)) + { + conv_name_buffer[0] = '\0'; + part_id_buffer[0] = '\0'; + conv_id_buffer[0] = '\0'; + + sscanf(buffer, "[%lld] %d %d %d %[^|]| %s %s %[^|]|", + &time, + &stype, + &prereserved_unused, + &has_offline_ims, + conv_name_buffer, + part_id_buffer, + conv_id_buffer, + history_file_name); + + ConversationParams params((time_t)time); + params.mConversationType = (SessionType)stype; + params.mHasOfflineIMs = has_offline_ims; + params.mConversationName = std::string(conv_name_buffer); + params.mParticipantID = LLUUID(part_id_buffer); + params.mSessionID = LLUUID(conv_id_buffer); + params.mHistoryFileName = std::string(history_file_name); + + LLConversation conversation(params); + + // CHUI-325 + // The conversation log should be capped to the last 30 days. Conversations with the last utterance + // being over 30 days old should be purged from the conversation log text file on login. + if (conversation.isOlderThan(CONVERSATION_LIFETIME)) + { + continue; + } + + mConversations.push_back(conversation); + } + fclose(fp); + + LLFile::remove(filename); + cache(); + + notifyObservers(); + return true; +} + +void LLConversationLog::notifyObservers() +{ + std::set<LLConversationLogObserver*>::const_iterator iter = mObservers.begin(); + for (; iter != mObservers.end(); ++iter) + { + (*iter)->changed(); + } +} + +void LLConversationLog::notifyParticularConversationObservers(const LLUUID& session_id, U32 mask) +{ + std::set<LLConversationLogObserver*>::const_iterator iter = mObservers.begin(); + for (; iter != mObservers.end(); ++iter) + { + (*iter)->changed(session_id, mask); + } +} + +void LLConversationLog::onNewMessageReceived(const LLSD& data) +{ + const LLUUID session_id = data["session_id"].asUUID(); + logConversation(session_id, false); +} + +void LLConversationLog::onAvatarNameCache(const LLUUID& participant_id, const LLAvatarName& av_name, const LLIMModel::LLIMSession* session) +{ + mAvatarNameCacheConnection.disconnect(); + updateConversationName(session, av_name.getCompleteName()); +} + +void LLConversationLog::onClearLog() +{ + LLNotificationsUtil::add("PreferenceChatClearLog", LLSD(), LLSD(), boost::bind(&LLConversationLog::onClearLogResponse, this, _1, _2)); +} + +void LLConversationLog::onClearLogResponse(const LLSD& notification, const LLSD& response) +{ + if (0 == LLNotificationsUtil::getSelectedOption(notification, response)) + { + mConversations.clear(); + notifyObservers(); + cache(); + deleteBackupLogs(); + } +} diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h new file mode 100644 index 0000000000..265b1f0ef0 --- /dev/null +++ b/indra/newview/llconversationlog.h @@ -0,0 +1,216 @@ +/** + * @file llconversationlog.h + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLCONVERSATIONLOG_H_ +#define LLCONVERSATIONLOG_H_ + +#include "llcallingcard.h" +#include "llfloaterimsession.h" +#include "llimview.h" + +class LLConversationLogObserver; +struct ConversationParams; + +typedef LLIMModel::LLIMSession::SType SessionType; + +/* + * This class represents a particular session(conversation) of any type(im/voice/p2p/group/...) by storing some of session's data. + * Each LLConversation object has a corresponding visual representation in a form of LLConversationLogListItem. + */ +class LLConversation +{ +public: + + LLConversation(const ConversationParams& params); + LLConversation(const LLIMModel::LLIMSession& session); + LLConversation(const LLConversation& conversation); + + ~LLConversation(); + + const SessionType& getConversationType() const { return mConversationType; } + const std::string& getConversationName() const { return mConversationName; } + const std::string& getHistoryFileName() const { return mHistoryFileName; } + const LLUUID& getSessionID() const { return mSessionID; } + const LLUUID& getParticipantID() const { return mParticipantID; } + const std::string& getTimestamp() const { return mTimestamp; } + const time_t& getTime() const { return mTime; } + bool hasOfflineMessages() const { return mHasOfflineIMs; } + + void setConversationName(std::string conv_name) { mConversationName = conv_name; } + void setOfflineMessages(bool new_messages) { mHasOfflineIMs = new_messages; } + bool isOlderThan(U32 days) const; + + /* + * updates last interaction time + */ + void updateTimestamp(); + + /* + * Resets flag of unread offline message to false when im floater with this conversation is opened. + */ + void onIMFloaterShown(const LLUUID& session_id); + + /* + * returns string representation(in form of: mm/dd/yyyy hh:mm) of time when conversation was started + */ + static const std::string createTimestamp(const time_t& utc_time); + +private: + + /* + * If conversation has unread offline messages sets callback for opening LLFloaterIMSession + * with this conversation. + */ + void setListenIMFloaterOpened(); + + boost::signals2::connection mIMFloaterShowedConnection; + + time_t mTime; // last interaction time + SessionType mConversationType; + std::string mConversationName; + std::string mHistoryFileName; + LLUUID mSessionID; + LLUUID mParticipantID; + bool mHasOfflineIMs; + std::string mTimestamp; // last interaction time in form of: mm/dd/yyyy hh:mm +}; + +/** + * LLConversationLog stores all agent's conversations. + * This class is responsible for creating and storing LLConversation objects when im or voice session starts. + * Also this class saves/retrieves conversations to/from file. + * + * Also please note that it may be several conversations with the same sessionID stored in the conversation log. + * To distinguish two conversations with the same sessionID it's also needed to compare their creation date. + */ + +class LLConversationLog : public LLSingleton<LLConversationLog>, LLIMSessionObserver +{ + friend class LLSingleton<LLConversationLog>; +public: + + void removeConversation(const LLConversation& conversation); + + /** + * Returns first conversation with matched session_id + */ + const LLConversation* getConversation(const LLUUID& session_id); + const std::vector<LLConversation>& getConversations() { return mConversations; } + + void addObserver(LLConversationLogObserver* observer); + void removeObserver(LLConversationLogObserver* observer); + + // LLIMSessionObserver triggers + virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg); + virtual void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}; // Stub + virtual void sessionRemoved(const LLUUID& session_id){} // Stub + virtual void sessionVoiceOrIMStarted(const LLUUID& session_id){}; // Stub + virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id){}; // Stub + + void notifyObservers(); + + void onNewMessageReceived(const LLSD& data); + + /** + * public method which is called on viewer exit to save conversation log + */ + void cache(); + bool moveLog(const std::string &originDirectory, const std::string &targetDirectory); + void getListOfBackupLogs(std::vector<std::string>& list_of_backup_logs); + void deleteBackupLogs(); + + void onClearLog(); + void onClearLogResponse(const LLSD& notification, const LLSD& response); + + bool getIsLoggingEnabled() { return mLoggingEnabled; } + bool isLogEmpty() { return mConversations.empty(); } + + /** + * constructs file name in which conversations log will be saved + * file name is conversation.log + */ + std::string getFileName(); + +private: + + LLConversationLog(); + virtual ~LLConversationLog() + { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + } + + void enableLogging(S32 log_mode); + + /** + * adds conversation to the conversation list and notifies observers + */ + void logConversation(const LLUUID& session_id, BOOL has_offline_msg); + + void notifyParticularConversationObservers(const LLUUID& session_id, U32 mask); + + bool saveToFile(const std::string& filename); + bool loadFromFile(const std::string& filename); + + void onAvatarNameCache(const LLUUID& participant_id, const LLAvatarName& av_name, const LLIMModel::LLIMSession* session); + + void createConversation(const LLIMModel::LLIMSession* session); + void updateConversationTimestamp(LLConversation* conversation); + void updateConversationName(const LLIMModel::LLIMSession* session, const std::string& name); + void updateOfflineIMs(const LLIMModel::LLIMSession* session, BOOL new_messages); + + LLConversation* findConversation(const LLIMModel::LLIMSession* session); + + typedef std::vector<LLConversation> conversations_vec_t; + std::vector<LLConversation> mConversations; + std::set<LLConversationLogObserver*> mObservers; + + LLFriendObserver* mFriendObserver; // Observer of the LLAvatarTracker instance + + boost::signals2::connection mNewMessageSignalConnection; + boost::signals2::connection mAvatarNameCacheConnection; + + bool mLoggingEnabled; +}; + +class LLConversationLogObserver +{ +public: + + enum EConversationChange + { + CHANGED_TIME = 1, // last interaction time changed + CHANGED_NAME = 2, // conversation name changed + CHANGED_OfflineIMs = 3 + }; + + virtual ~LLConversationLogObserver(){} + virtual void changed() = 0; + virtual void changed(const LLUUID& session_id, U32 mask){}; +}; + +#endif /* LLCONVERSATIONLOG_H_ */ diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp new file mode 100644 index 0000000000..5ab108b39f --- /dev/null +++ b/indra/newview/llconversationloglist.cpp @@ -0,0 +1,533 @@ +/** + * @file llconversationloglist.cpp + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llavataractions.h" +#include "llagent.h" +#include "llfloaterreg.h" +#include "llfloaterconversationpreview.h" +#include "llgroupactions.h" +#include "llconversationloglist.h" +#include "llconversationloglistitem.h" +#include "llviewermenu.h" +#include "lltrans.h" + +static LLDefaultChildRegistry::Register<LLConversationLogList> r("conversation_log_list"); + +static LLConversationLogListNameComparator NAME_COMPARATOR; +static LLConversationLogListDateComparator DATE_COMPARATOR; + +LLConversationLogList::LLConversationLogList(const Params& p) +: LLFlatListViewEx(p), + mIsDirty(true) +{ + LLConversationLog::instance().addObserver(this); + + // Set up context menu. + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar check_registrar; + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; + + registrar.add ("Calllog.Action", boost::bind(&LLConversationLogList::onCustomAction, this, _2)); + check_registrar.add ("Calllog.Check", boost::bind(&LLConversationLogList::isActionChecked,this, _2)); + enable_registrar.add("Calllog.Enable", boost::bind(&LLConversationLogList::isActionEnabled,this, _2)); + + LLToggleableMenu* context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>( + "menu_conversation_log_gear.xml", + gMenuHolder, + LLViewerMenuHolderGL::child_registry_t::instance()); + if(context_menu) + { + mContextMenu = context_menu->getHandle(); + } + + mIsFriendsOnTop = gSavedSettings.getBOOL("SortFriendsFirst"); +} + +LLConversationLogList::~LLConversationLogList() +{ + if (mContextMenu.get()) + { + mContextMenu.get()->die(); + } + + LLConversationLog::instance().removeObserver(this); +} + +void LLConversationLogList::draw() +{ + if (mIsDirty) + { + refresh(); + } + LLFlatListViewEx::draw(); +} + +BOOL LLConversationLogList::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask); + + LLToggleableMenu* context_menu = mContextMenu.get(); + { + context_menu->buildDrawLabels(); + if (context_menu && size()) + context_menu->updateParent(LLMenuGL::sMenuContainer); + LLMenuGL::showPopup(this, context_menu, x, y); + } + + return handled; +} + +void LLConversationLogList::setNameFilter(const std::string& filter) +{ + std::string filter_upper = filter; + LLStringUtil::toUpper(filter_upper); + if (mNameFilter != filter_upper) + { + mNameFilter = filter_upper; + setDirty(); + } +} + +bool LLConversationLogList::findInsensitive(std::string haystack, const std::string& needle_upper) +{ + LLStringUtil::toUpper(haystack); + return haystack.find(needle_upper) != std::string::npos; +} + +void LLConversationLogList::sortByName() +{ + setComparator(&NAME_COMPARATOR); + sort(); +} + +void LLConversationLogList::sortByDate() +{ + setComparator(&DATE_COMPARATOR); + sort(); +} + +void LLConversationLogList::toggleSortFriendsOnTop() +{ + mIsFriendsOnTop = !mIsFriendsOnTop; + gSavedSettings.setBOOL("SortFriendsFirst", mIsFriendsOnTop); + sort(); +} + +void LLConversationLogList::changed() +{ + refresh(); +} + +void LLConversationLogList::changed(const LLUUID& session_id, U32 mask) +{ + LLConversationLogListItem* item = getConversationLogListItem(session_id); + + if (!item) + { + return; + } + + if (mask & LLConversationLogObserver::CHANGED_TIME) + { + item->updateTimestamp(); + + // if list is sorted by date and a date of some item has changed, + // than the whole list should be rebuilt + if (E_SORT_BY_DATE == getSortOrder()) + { + mIsDirty = true; + } + } + else if (mask & LLConversationLogObserver::CHANGED_NAME) + { + item->updateName(); + // if list is sorted by name and a name of some item has changed, + // than the whole list should be rebuilt + if (E_SORT_BY_DATE == getSortOrder()) + { + mIsDirty = true; + } + } + else if (mask & LLConversationLogObserver::CHANGED_OfflineIMs) + { + item->updateOfflineIMs(); + } +} + +void LLConversationLogList::addNewItem(const LLConversation* conversation) +{ + LLConversationLogListItem* item = new LLConversationLogListItem(&*conversation); + if (!mNameFilter.empty()) + { + item->highlightNameDate(mNameFilter); + } + addItem(item, conversation->getSessionID(), ADD_TOP); +} + +void LLConversationLogList::refresh() +{ + rebuildList(); + sort(); + + mIsDirty = false; +} + +void LLConversationLogList::rebuildList() +{ + const LLConversation * selected_conversationp = getSelectedConversation(); + + clear(); + + bool have_filter = !mNameFilter.empty(); + LLConversationLog &log_instance = LLConversationLog::instance(); + + const std::vector<LLConversation>& conversations = log_instance.getConversations(); + std::vector<LLConversation>::const_iterator iter = conversations.begin(); + + for (; iter != conversations.end(); ++iter) + { + bool not_found = have_filter && !findInsensitive(iter->getConversationName(), mNameFilter) && !findInsensitive(iter->getTimestamp(), mNameFilter); + if (not_found) + continue; + + addNewItem(&*iter); + } + + // try to restore selection of item + if (NULL != selected_conversationp) + { + selectItemByUUID(selected_conversationp->getSessionID()); + } + + bool logging_enabled = log_instance.getIsLoggingEnabled(); + bool log_empty = log_instance.isLogEmpty(); + if (!logging_enabled && log_empty) + { + setNoItemsCommentText(LLTrans::getString("logging_calls_disabled_log_empty")); + } + else if (!logging_enabled && !log_empty) + { + setNoItemsCommentText(LLTrans::getString("logging_calls_disabled_log_not_empty")); + } + else if (logging_enabled && log_empty) + { + setNoItemsCommentText(LLTrans::getString("logging_calls_enabled_log_empty")); + } + else if (logging_enabled && !log_empty) + { + setNoItemsCommentText(""); + } +} + +void LLConversationLogList::onCustomAction(const LLSD& userdata) +{ + const LLConversation * selected_conversationp = getSelectedConversation(); + + if (NULL == selected_conversationp) + { + return; + } + + const std::string command_name = userdata.asString(); + const LLUUID& selected_conversation_participant_id = selected_conversationp->getParticipantID(); + const LLUUID& selected_conversation_session_id = selected_conversationp->getSessionID(); + LLIMModel::LLIMSession::SType stype = getSelectedSessionType(); + + if ("im" == command_name) + { + switch (stype) + { + case LLIMModel::LLIMSession::P2P_SESSION: + LLAvatarActions::startIM(selected_conversation_participant_id); + break; + + case LLIMModel::LLIMSession::GROUP_SESSION: + LLGroupActions::startIM(selected_conversation_session_id); + break; + + default: + break; + } + } + else if ("call" == command_name) + { + switch (stype) + { + case LLIMModel::LLIMSession::P2P_SESSION: + LLAvatarActions::startCall(selected_conversation_participant_id); + break; + + case LLIMModel::LLIMSession::GROUP_SESSION: + LLGroupActions::startCall(selected_conversation_session_id); + break; + + default: + break; + } + } + else if ("view_profile" == command_name) + { + switch (stype) + { + case LLIMModel::LLIMSession::P2P_SESSION: + LLAvatarActions::showProfile(selected_conversation_participant_id); + break; + + case LLIMModel::LLIMSession::GROUP_SESSION: + LLGroupActions::show(selected_conversation_session_id); + break; + + default: + break; + } + } + else if ("chat_history" == command_name) + { + LLFloaterReg::showInstance("preview_conversation", selected_conversation_session_id, true); + } + else if ("offer_teleport" == command_name) + { + LLAvatarActions::offerTeleport(selected_conversation_participant_id); + } + else if("add_friend" == command_name) + { + if (!LLAvatarActions::isFriend(selected_conversation_participant_id)) + { + LLAvatarActions::requestFriendshipDialog(selected_conversation_participant_id); + } + } + else if("remove_friend" == command_name) + { + if (LLAvatarActions::isFriend(selected_conversation_participant_id)) + { + LLAvatarActions::removeFriendDialog(selected_conversation_participant_id); + } + } + else if ("invite_to_group" == command_name) + { + LLAvatarActions::inviteToGroup(selected_conversation_participant_id); + } + else if ("show_on_map" == command_name) + { + LLAvatarActions::showOnMap(selected_conversation_participant_id); + } + else if ("share" == command_name) + { + LLAvatarActions::share(selected_conversation_participant_id); + } + else if ("pay" == command_name) + { + LLAvatarActions::pay(selected_conversation_participant_id); + } + else if ("block" == command_name) + { + LLAvatarActions::toggleBlock(selected_conversation_participant_id); + } +} + +bool LLConversationLogList::isActionEnabled(const LLSD& userdata) +{ + const LLConversation * selected_conversationp = getSelectedConversation(); + + if (NULL == selected_conversationp || numSelected() > 1) + { + return false; + } + + const std::string command_name = userdata.asString(); + + LLIMModel::LLIMSession::SType stype = getSelectedSessionType(); + const LLUUID& selected_id = selected_conversationp->getParticipantID(); + + bool is_p2p = LLIMModel::LLIMSession::P2P_SESSION == stype; + bool is_group = LLIMModel::LLIMSession::GROUP_SESSION == stype; + + if ("can_im" == command_name || "can_view_profile" == command_name) + { + return is_p2p || is_group; + } + else if ("can_view_chat_history" == command_name) + { + return true; + } + else if ("can_call" == command_name) + { + return (is_p2p || is_group) && LLAvatarActions::canCall(); + } + else if ("add_rem_friend" == command_name || + "can_invite_to_group" == command_name || + "can_share" == command_name || + "can_block" == command_name || + "can_pay" == command_name) + { + return is_p2p; + } + else if("can_offer_teleport" == command_name) + { + return is_p2p && LLAvatarActions::canOfferTeleport(selected_id); + } + else if ("can_show_on_map" == command_name) + { + return is_p2p && ((LLAvatarTracker::instance().isBuddyOnline(selected_id) && is_agent_mappable(selected_id)) || gAgent.isGodlike()); + } + + return false; +} + +bool LLConversationLogList::isActionChecked(const LLSD& userdata) +{ + const LLConversation * selected_conversationp = getSelectedConversation(); + + if (NULL == selected_conversationp) + { + return false; + } + + const std::string command_name = userdata.asString(); + + const LLUUID& selected_id = selected_conversationp->getParticipantID(); + bool is_p2p = LLIMModel::LLIMSession::P2P_SESSION == getSelectedSessionType(); + + if ("is_blocked" == command_name) + { + return is_p2p && LLAvatarActions::isBlocked(selected_id); + } + else if ("is_friend" == command_name) + { + return is_p2p && LLAvatarActions::isFriend(selected_id); + } + else if ("is_not_friend" == command_name) + { + return is_p2p && !LLAvatarActions::isFriend(selected_id); + } + + return false; +} + +LLIMModel::LLIMSession::SType LLConversationLogList::getSelectedSessionType() +{ + const LLConversationLogListItem* item = getSelectedConversationPanel(); + + if (item) + { + return item->getConversation()->getConversationType(); + } + + return LLIMModel::LLIMSession::NONE_SESSION; +} + +const LLConversationLogListItem* LLConversationLogList::getSelectedConversationPanel() +{ + LLPanel* panel = LLFlatListViewEx::getSelectedItem(); + LLConversationLogListItem* conv_panel = dynamic_cast<LLConversationLogListItem*>(panel); + + return conv_panel; +} + +const LLConversation* LLConversationLogList::getSelectedConversation() +{ + const LLConversationLogListItem* panel = getSelectedConversationPanel(); + + if (panel) + { + return panel->getConversation(); + } + + return NULL; +} + +LLConversationLogListItem* LLConversationLogList::getConversationLogListItem(const LLUUID& session_id) +{ + std::vector<LLPanel*> panels; + LLFlatListViewEx::getItems(panels); + std::vector<LLPanel*>::iterator iter = panels.begin(); + + for (; iter != panels.end(); ++iter) + { + LLConversationLogListItem* item = dynamic_cast<LLConversationLogListItem*>(*iter); + if (item && session_id == item->getConversation()->getSessionID()) + { + return item; + } + } + + return NULL; +} + +LLConversationLogList::ESortOrder LLConversationLogList::getSortOrder() +{ + return static_cast<ESortOrder>(gSavedSettings.getU32("CallLogSortOrder")); +} + +bool LLConversationLogListItemComparator::compare(const LLPanel* item1, const LLPanel* item2) const +{ + const LLConversationLogListItem* conversation_item1 = dynamic_cast<const LLConversationLogListItem*>(item1); + const LLConversationLogListItem* conversation_item2 = dynamic_cast<const LLConversationLogListItem*>(item2); + + if (!conversation_item1 || !conversation_item2) + { + llerror("conversation_item1 and conversation_item2 cannot be null", 0); + return true; + } + + return doCompare(conversation_item1, conversation_item2); +} + +bool LLConversationLogListNameComparator::doCompare(const LLConversationLogListItem* conversation1, const LLConversationLogListItem* conversation2) const +{ + std::string name1 = conversation1->getConversation()->getConversationName(); + std::string name2 = conversation2->getConversation()->getConversationName(); + const LLUUID& id1 = conversation1->getConversation()->getParticipantID(); + const LLUUID& id2 = conversation2->getConversation()->getParticipantID(); + + LLStringUtil::toUpper(name1); + LLStringUtil::toUpper(name2); + + bool friends_first = gSavedSettings.getBOOL("SortFriendsFirst"); + if (friends_first && (LLAvatarActions::isFriend(id1) ^ LLAvatarActions::isFriend(id2))) + { + return LLAvatarActions::isFriend(id1); + } + + return name1 < name2; +} + +bool LLConversationLogListDateComparator::doCompare(const LLConversationLogListItem* conversation1, const LLConversationLogListItem* conversation2) const +{ + time_t date1 = conversation1->getConversation()->getTime(); + time_t date2 = conversation2->getConversation()->getTime(); + const LLUUID& id1 = conversation1->getConversation()->getParticipantID(); + const LLUUID& id2 = conversation2->getConversation()->getParticipantID(); + + bool friends_first = gSavedSettings.getBOOL("SortFriendsFirst"); + if (friends_first && (LLAvatarActions::isFriend(id1) ^ LLAvatarActions::isFriend(id2))) + { + return LLAvatarActions::isFriend(id1); + } + + return date1 > date2; +} diff --git a/indra/newview/llconversationloglist.h b/indra/newview/llconversationloglist.h new file mode 100644 index 0000000000..62ec57e09e --- /dev/null +++ b/indra/newview/llconversationloglist.h @@ -0,0 +1,153 @@ +/** + * @file llconversationloglist.h + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLCONVERSATIONLOGLIST_H_ +#define LLCONVERSATIONLOGLIST_H_ + +#include "llconversationlog.h" +#include "llflatlistview.h" +#include "lltoggleablemenu.h" + +class LLConversationLogListItem; + +/** + * List of all agent's conversations. I.e. history of conversations. + * This list represents contents of the LLConversationLog. + * Each change in LLConversationLog leads to rebuilding this list, so + * it's always in actual state. + */ + +class LLConversationLogList: public LLFlatListViewEx, public LLConversationLogObserver +{ + LOG_CLASS(LLConversationLogList); +public: + + typedef enum e_sort_oder{ + E_SORT_BY_NAME = 0, + E_SORT_BY_DATE = 1, + } ESortOrder; + + struct Params : public LLInitParam::Block<Params, LLFlatListViewEx::Params> + { + Params(){}; + }; + + LLConversationLogList(const Params& p); + virtual ~LLConversationLogList(); + + virtual void draw(); + + virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + + LLToggleableMenu* getContextMenu() const { return mContextMenu.get(); } + + void addNewItem(const LLConversation* conversation); + void setNameFilter(const std::string& filter); + void sortByName(); + void sortByDate(); + void toggleSortFriendsOnTop(); + bool getSortFriendsOnTop() const { return mIsFriendsOnTop; } + + /** + * Changes from LLConversationLogObserver + */ + virtual void changed(); + virtual void changed(const LLUUID& session_id, U32 mask); + +private: + + void setDirty(bool dirty = true) { mIsDirty = dirty; } + void refresh(); + + /** + * Clears list and re-adds items from LLConverstationLog + * If filter is not empty re-adds items which match the filter + */ + void rebuildList(); + + bool findInsensitive(std::string haystack, const std::string& needle_upper); + + void onCustomAction (const LLSD& userdata); + bool isActionEnabled(const LLSD& userdata); + bool isActionChecked(const LLSD& userdata); + + LLIMModel::LLIMSession::SType getSelectedSessionType(); + const LLConversationLogListItem* getSelectedConversationPanel(); + const LLConversation* getSelectedConversation(); + LLConversationLogListItem* getConversationLogListItem(const LLUUID& session_id); + + ESortOrder getSortOrder(); + + LLHandle<LLToggleableMenu> mContextMenu; + bool mIsDirty; + bool mIsFriendsOnTop; + std::string mNameFilter; +}; + +/** + * Abstract comparator for ConversationLogList items + */ +class LLConversationLogListItemComparator : public LLFlatListView::ItemComparator +{ + LOG_CLASS(LLConversationLogListItemComparator); + +public: + LLConversationLogListItemComparator() {}; + virtual ~LLConversationLogListItemComparator() {}; + + virtual bool compare(const LLPanel* item1, const LLPanel* item2) const; + +protected: + + virtual bool doCompare(const LLConversationLogListItem* conversation1, const LLConversationLogListItem* conversation2) const = 0; +}; + +class LLConversationLogListNameComparator : public LLConversationLogListItemComparator +{ + LOG_CLASS(LLConversationLogListNameComparator); + +public: + LLConversationLogListNameComparator() {}; + virtual ~LLConversationLogListNameComparator() {}; + +protected: + + virtual bool doCompare(const LLConversationLogListItem* conversation1, const LLConversationLogListItem* conversation2) const; +}; + +class LLConversationLogListDateComparator : public LLConversationLogListItemComparator +{ + LOG_CLASS(LLConversationLogListDateComparator); + +public: + LLConversationLogListDateComparator() {}; + virtual ~LLConversationLogListDateComparator() {}; + +protected: + + virtual bool doCompare(const LLConversationLogListItem* conversation1, const LLConversationLogListItem* conversation2) const; +}; + +#endif /* LLCONVERSATIONLOGLIST_H_ */ diff --git a/indra/newview/llconversationloglistitem.cpp b/indra/newview/llconversationloglistitem.cpp new file mode 100644 index 0000000000..4e984d603b --- /dev/null +++ b/indra/newview/llconversationloglistitem.cpp @@ -0,0 +1,184 @@ +/** + * @file llconversationloglistitem.cpp + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +// llui +#include "lliconctrl.h" +#include "lltextbox.h" +#include "lltextutil.h" + +// newview +#include "llavataractions.h" +#include "llavatariconctrl.h" +#include "llconversationlog.h" +#include "llconversationloglistitem.h" +#include "llgroupactions.h" +#include "llgroupiconctrl.h" +#include "llinventoryicon.h" + +LLConversationLogListItem::LLConversationLogListItem(const LLConversation* conversation) +: LLPanel(), + mConversation(conversation), + mConversationName(NULL), + mConversationDate(NULL) +{ + buildFromFile("panel_conversation_log_list_item.xml"); + + LLFloaterIMSession* floater = LLFloaterIMSession::findInstance(mConversation->getSessionID()); + + bool ims_are_read = LLFloaterIMSession::isVisible(floater) && floater->hasFocus(); + + if (mConversation->hasOfflineMessages() && !ims_are_read) + { + mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback(boost::bind(&LLConversationLogListItem::onIMFloaterShown, this, _1)); + } +} + +LLConversationLogListItem::~LLConversationLogListItem() +{ + mIMFloaterShowedConnection.disconnect(); +} + +BOOL LLConversationLogListItem::postBuild() +{ + initIcons(); + + // set conversation name + mConversationName = getChild<LLTextBox>("conversation_name"); + mConversationName->setValue(mConversation->getConversationName()); + + // set conversation date and time + mConversationDate = getChild<LLTextBox>("date_time"); + mConversationDate->setValue(mConversation->getTimestamp()); + + getChild<LLButton>("delete_btn")->setClickedCallback(boost::bind(&LLConversationLogListItem::onRemoveBtnClicked, this)); + setDoubleClickCallback(boost::bind(&LLConversationLogListItem::onDoubleClick, this)); + + return TRUE; +} + +void LLConversationLogListItem::initIcons() +{ + switch (mConversation->getConversationType()) + { + case LLIMModel::LLIMSession::P2P_SESSION: + case LLIMModel::LLIMSession::ADHOC_SESSION: + { + LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon"); + avatar_icon->setVisible(TRUE); + avatar_icon->setValue(mConversation->getParticipantID()); + break; + } + case LLIMModel::LLIMSession::GROUP_SESSION: + { + LLGroupIconCtrl* group_icon = getChild<LLGroupIconCtrl>("group_icon"); + group_icon->setVisible(TRUE); + group_icon->setValue(mConversation->getSessionID()); + break; + } + default: + break; + } + + if (mConversation->hasOfflineMessages()) + { + getChild<LLIconCtrl>("unread_ims_icon")->setVisible(TRUE); + } +} + +void LLConversationLogListItem::updateTimestamp() +{ + mConversationDate->setValue(mConversation->getTimestamp()); +} + +void LLConversationLogListItem::updateName() +{ + mConversationName->setValue(mConversation->getConversationName()); +} + +void LLConversationLogListItem::updateOfflineIMs() +{ + getChild<LLIconCtrl>("unread_ims_icon")->setVisible(mConversation->hasOfflineMessages()); +} + +void LLConversationLogListItem::onMouseEnter(S32 x, S32 y, MASK mask) +{ + getChildView("hovered_icon")->setVisible(true); + LLPanel::onMouseEnter(x, y, mask); +} + +void LLConversationLogListItem::onMouseLeave(S32 x, S32 y, MASK mask) +{ + getChildView("hovered_icon")->setVisible(false); + LLPanel::onMouseLeave(x, y, mask); +} + +void LLConversationLogListItem::setValue(const LLSD& value) +{ + if (!value.isMap() || !value.has("selected")) + { + return; + } + + getChildView("selected_icon")->setVisible(value["selected"]); +} + +void LLConversationLogListItem::onIMFloaterShown(const LLUUID& session_id) +{ + if (mConversation->getSessionID() == session_id) + { + getChild<LLIconCtrl>("unread_ims_icon")->setVisible(FALSE); + } +} + +void LLConversationLogListItem::onRemoveBtnClicked() +{ + LLConversationLog::instance().removeConversation(*mConversation); +} + +void LLConversationLogListItem::highlightNameDate(const std::string& highlited_text) +{ + LLStyle::Params params; + LLTextUtil::textboxSetHighlightedVal(mConversationName, params, mConversation->getConversationName(), highlited_text); + LLTextUtil::textboxSetHighlightedVal(mConversationDate, params, mConversation->getTimestamp(), highlited_text); +} + +void LLConversationLogListItem::onDoubleClick() +{ + switch (mConversation->getConversationType()) + { + case LLIMModel::LLIMSession::P2P_SESSION: + LLAvatarActions::startIM(mConversation->getParticipantID()); + break; + + case LLIMModel::LLIMSession::GROUP_SESSION: + LLGroupActions::startIM(mConversation->getSessionID()); + break; + + default: + break; + } +} diff --git a/indra/newview/llconversationloglistitem.h b/indra/newview/llconversationloglistitem.h new file mode 100644 index 0000000000..ee28456bbb --- /dev/null +++ b/indra/newview/llconversationloglistitem.h @@ -0,0 +1,86 @@ +/** + * @file llconversationloglistitem.h + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLCONVERSATIONLOGLISTITEM_H_ +#define LLCONVERSATIONLOGLISTITEM_H_ + +#include "llfloaterimsession.h" +#include "llpanel.h" + +class LLTextBox; +class LLConversation; + +/** + * This class is a visual representation of LLConversation, each of which is LLConversationLog entry. + * LLConversationLogList consists of these LLConversationLogListItems. + * LLConversationLogListItem consists of: + * conversaion_type_icon + * conversaion_name + * conversaion_date + * Also LLConversationLogListItem holds pointer to its LLConversationLog. + */ + +class LLConversationLogListItem : public LLPanel +{ +public: + LLConversationLogListItem(const LLConversation* conversation); + virtual ~LLConversationLogListItem(); + + void onMouseEnter(S32 x, S32 y, MASK mask); + void onMouseLeave(S32 x, S32 y, MASK mask); + + virtual void setValue(const LLSD& value); + + virtual BOOL postBuild(); + + void onIMFloaterShown(const LLUUID& session_id); + void onRemoveBtnClicked(); + + const LLConversation* getConversation() const { return mConversation; } + + void highlightNameDate(const std::string& highlited_text); + + void onDoubleClick(); + + /** + * updates string value of last interaction time from conversation + */ + void updateTimestamp(); + void updateName(); + void updateOfflineIMs(); + +private: + + void initIcons(); + + const LLConversation* mConversation; + + LLTextBox* mConversationName; + LLTextBox* mConversationDate; + + boost::signals2::connection mIMFloaterShowedConnection; +}; + +#endif /* LLCONVERSATIONLOGITEM_H_ */ diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp new file mode 100644 index 0000000000..c74ce24872 --- /dev/null +++ b/indra/newview/llconversationmodel.cpp @@ -0,0 +1,702 @@ +/** + * @file llconversationmodel.cpp + * @brief Implementation of conversations list + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + + +#include "llviewerprecompiledheaders.h" + +#include "llagent.h" +#include "llavatarnamecache.h" +#include "llavataractions.h" +#include "llevents.h" +#include "llfloaterimsession.h" +#include "llsdutil.h" +#include "llconversationmodel.h" +#include "llimview.h" //For LLIMModel +#include "lltrans.h" + +#include <boost/foreach.hpp> + +// +// Conversation items : common behaviors +// + +LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : + LLFolderViewModelItemCommon(root_view_model), + mName(display_name), + mUUID(uuid), + mNeedsRefresh(true), + mConvType(CONV_UNKNOWN), + mLastActiveTime(0.0), + mDisplayModeratorOptions(false), + mAvatarNameCacheConnection() +{ +} + +LLConversationItem::LLConversationItem(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : + LLFolderViewModelItemCommon(root_view_model), + mName(""), + mUUID(uuid), + mNeedsRefresh(true), + mConvType(CONV_UNKNOWN), + mLastActiveTime(0.0), + mDisplayModeratorOptions(false), + mAvatarNameCacheConnection() +{ +} + +LLConversationItem::LLConversationItem(LLFolderViewModelInterface& root_view_model) : + LLFolderViewModelItemCommon(root_view_model), + mName(""), + mUUID(), + mNeedsRefresh(true), + mConvType(CONV_UNKNOWN), + mLastActiveTime(0.0), + mDisplayModeratorOptions(false), + mAvatarNameCacheConnection() +{ +} + +LLConversationItem::~LLConversationItem() +{ + // Disconnect any previous avatar name cache connection to ensure + // that the callback method is not called after destruction + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } +} + +void LLConversationItem::postEvent(const std::string& event_type, LLConversationItemSession* session, LLConversationItemParticipant* participant) +{ + LLUUID session_id = (session ? session->getUUID() : LLUUID()); + LLUUID participant_id = (participant ? participant->getUUID() : LLUUID()); + LLSD event(LLSDMap("type", event_type)("session_uuid", session_id)("participant_uuid", participant_id)); + LLEventPumps::instance().obtain("ConversationsEvents").post(event); +} + +// Virtual action callbacks +void LLConversationItem::performAction(LLInventoryModel* model, std::string action) +{ +} + +void LLConversationItem::openItem( void ) +{ +} + +void LLConversationItem::closeItem( void ) +{ +} + +void LLConversationItem::previewItem( void ) +{ +} + +void LLConversationItem::showProperties(void) +{ +} + +void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32 flags) +{ + if (flags & ITEM_IN_MULTI_SELECTION) + { + items.push_back(std::string("im")); + items.push_back(std::string("offer_teleport")); + items.push_back(std::string("voice_call")); + items.push_back(std::string("remove_friends")); + } + else + { + items.push_back(std::string("view_profile")); + items.push_back(std::string("im")); + items.push_back(std::string("offer_teleport")); + items.push_back(std::string("voice_call")); + items.push_back(std::string("chat_history")); + items.push_back(std::string("separator_chat_history")); + items.push_back(std::string("add_friend")); + items.push_back(std::string("remove_friend")); + items.push_back(std::string("invite_to_group")); + items.push_back(std::string("separator_invite_to_group")); + if (static_cast<LLConversationItem*>(mParent)->getType() == CONV_SESSION_NEARBY) + items.push_back(std::string("zoom_in")); + items.push_back(std::string("map")); + items.push_back(std::string("share")); + items.push_back(std::string("pay")); + items.push_back(std::string("block_unblock")); + items.push_back(std::string("MuteText")); + + if ((getType() != CONV_SESSION_1_ON_1) && mDisplayModeratorOptions) + { + items.push_back(std::string("Moderator Options Separator")); + items.push_back(std::string("Moderator Options")); + items.push_back(std::string("AllowTextChat")); + items.push_back(std::string("moderate_voice_separator")); + items.push_back(std::string("ModerateVoiceMuteSelected")); + items.push_back(std::string("ModerateVoiceUnMuteSelected")); + items.push_back(std::string("ModerateVoiceMute")); + items.push_back(std::string("ModerateVoiceUnmute")); + } + } +} + +// method does subscription to changes in avatar name cache for current session/participant conversation item. +void LLConversationItem::fetchAvatarName(bool isParticipant /*= true*/) +{ + LLUUID item_id = getUUID(); + + // item should not be null for participants + if (isParticipant) + { + llassert(item_id.notNull()); + } + + // disconnect any previous avatar name cache connection + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + + // exclude nearby chat item + if (item_id.notNull()) + { + // for P2P session item, override it as item of called agent + if (CONV_SESSION_1_ON_1 == getType()) + { + item_id = LLIMModel::getInstance()->getOtherParticipantID(item_id); + } + + // subscribe on avatar name cache changes for participant and session items + mAvatarNameCacheConnection = LLAvatarNameCache::get(item_id, boost::bind(&LLConversationItem::onAvatarNameCache, this, _2)); + } +} + +// +// LLConversationItemSession +// + +LLConversationItemSession::LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : + LLConversationItem(display_name,uuid,root_view_model), + mIsLoaded(false) +{ + mConvType = CONV_SESSION_UNKNOWN; +} + +LLConversationItemSession::LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : + LLConversationItem(uuid,root_view_model) +{ + mConvType = CONV_SESSION_UNKNOWN; +} + +bool LLConversationItemSession::hasChildren() const +{ + return getChildrenCount() > 0; +} + +void LLConversationItemSession::addParticipant(LLConversationItemParticipant* participant) +{ + addChild(participant); + mIsLoaded = true; + mNeedsRefresh = true; + updateName(participant); + postEvent("add_participant", this, participant); +} + +void LLConversationItemSession::updateName(LLConversationItemParticipant* participant) +{ + EConversationType conversation_type = getType(); + // We modify the session name only in the case of an ad-hoc session or P2P session, exit otherwise (nothing to do) + if ((conversation_type != CONV_SESSION_AD_HOC) && (conversation_type != CONV_SESSION_1_ON_1)) + { + return; + } + + // Avoid changing the default name if no participant present yet + if (mChildren.size() == 0) + { + return; + } + + uuid_vec_t temp_uuids; // uuids vector for building the added participants' names string + if (conversation_type == CONV_SESSION_AD_HOC || conversation_type == CONV_SESSION_1_ON_1) + { + // Build a string containing the participants UUIDs (minus own agent) and check if ready for display (we don't want "(waiting)" in there) + // Note: we don't bind ourselves to the LLAvatarNameCache event as updateParticipantName() is called by + // onAvatarNameCache() which is itself attached to the same event. + + // In the case of a P2P conversation, we need to grab the name of the other participant in the session instance itself + // as we do not create participants for such a session. + + LLFolderViewModelItem * itemp; + BOOST_FOREACH(itemp, mChildren) + { + LLConversationItem* current_participant = dynamic_cast<LLConversationItem*>(itemp); + // Add the avatar uuid to the list (except if it's the own agent uuid) + if (current_participant->getUUID() != gAgentID) + { + LLAvatarName av_name; + if (LLAvatarNameCache::get(current_participant->getUUID(), &av_name)) + { + temp_uuids.push_back(current_participant->getUUID()); + + if (conversation_type == CONV_SESSION_1_ON_1) + { + break; + } + } + } + } + } + + if (temp_uuids.size() != 0) + { + std::string new_session_name; + LLAvatarActions::buildResidentsString(temp_uuids, new_session_name); + renameItem(new_session_name); + postEvent("update_session", this, NULL); + } +} + +void LLConversationItemSession::removeParticipant(LLConversationItemParticipant* participant) +{ + removeChild(participant); + mNeedsRefresh = true; + updateName(participant); + postEvent("remove_participant", this, participant); +} + +void LLConversationItemSession::removeParticipant(const LLUUID& participant_id) +{ + LLConversationItemParticipant* participant = findParticipant(participant_id); + if (participant) + { + removeParticipant(participant); + } +} + +void LLConversationItemSession::clearParticipants() +{ + clearChildren(); + mIsLoaded = false; + mNeedsRefresh = true; +} + +LLConversationItemParticipant* LLConversationItemSession::findParticipant(const LLUUID& participant_id) +{ + // This is *not* a general tree parsing algorithm. It assumes that a session contains only + // items (LLConversationItemParticipant) that have themselve no children. + LLConversationItemParticipant* participant = NULL; + child_list_t::iterator iter; + for (iter = mChildren.begin(); iter != mChildren.end(); iter++) + { + participant = dynamic_cast<LLConversationItemParticipant*>(*iter); + if (participant->hasSameValue(participant_id)) + { + break; + } + } + return (iter == mChildren.end() ? NULL : participant); +} + +void LLConversationItemSession::setParticipantIsMuted(const LLUUID& participant_id, bool is_muted) +{ + LLConversationItemParticipant* participant = findParticipant(participant_id); + if (participant) + { + participant->muteVoice(is_muted); + } +} + +void LLConversationItemSession::setParticipantIsModerator(const LLUUID& participant_id, bool is_moderator) +{ + LLConversationItemParticipant* participant = findParticipant(participant_id); + if (participant) + { + participant->setIsModerator(is_moderator); + } +} + +void LLConversationItemSession::setTimeNow(const LLUUID& participant_id) +{ + mLastActiveTime = LLFrameTimer::getElapsedSeconds(); + mNeedsRefresh = true; + LLConversationItemParticipant* participant = findParticipant(participant_id); + if (participant) + { + participant->setTimeNow(); + } +} + +void LLConversationItemSession::setDistance(const LLUUID& participant_id, F64 dist) +{ + LLConversationItemParticipant* participant = findParticipant(participant_id); + if (participant) + { + participant->setDistance(dist); + mNeedsRefresh = true; + } +} + +void LLConversationItemSession::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + lldebugs << "LLConversationItemParticipant::buildContextMenu()" << llendl; + menuentry_vec_t items; + menuentry_vec_t disabled_items; + + if(this->getType() == CONV_SESSION_1_ON_1) + { + items.push_back(std::string("close_conversation")); + items.push_back(std::string("separator_disconnect_from_voice")); + buildParticipantMenuOptions(items, flags); + } + else if(this->getType() == CONV_SESSION_GROUP) + { + items.push_back(std::string("close_conversation")); + addVoiceOptions(items); + items.push_back(std::string("chat_history")); + items.push_back(std::string("separator_chat_history")); + items.push_back(std::string("group_profile")); + items.push_back(std::string("activate_group")); + items.push_back(std::string("leave_group")); + } + else if(this->getType() == CONV_SESSION_AD_HOC) + { + items.push_back(std::string("close_conversation")); + addVoiceOptions(items); + items.push_back(std::string("chat_history")); + } + + hide_context_entries(menu, items, disabled_items); +} + +void LLConversationItemSession::addVoiceOptions(menuentry_vec_t& items) +{ + LLVoiceChannel* voice_channel = LLIMModel::getInstance() ? LLIMModel::getInstance()->getVoiceChannel(this->getUUID()) : NULL; + + if(voice_channel != LLVoiceChannel::getCurrentVoiceChannel()) + { + items.push_back(std::string("open_voice_conversation")); + } + else + { + items.push_back(std::string("disconnect_from_voice")); + } +} + +// The time of activity of a session is the time of the most recent activity, session and participants included +const bool LLConversationItemSession::getTime(F64& time) const +{ + F64 most_recent_time = mLastActiveTime; + bool has_time = (most_recent_time > 0.1); + LLConversationItemParticipant* participant = NULL; + child_list_t::const_iterator iter; + for (iter = mChildren.begin(); iter != mChildren.end(); iter++) + { + participant = dynamic_cast<LLConversationItemParticipant*>(*iter); + F64 participant_time; + if (participant->getTime(participant_time)) + { + has_time = true; + most_recent_time = llmax(most_recent_time,participant_time); + } + } + if (has_time) + { + time = most_recent_time; + } + return has_time; +} + +void LLConversationItemSession::dumpDebugData(bool dump_children) +{ + // Session info + llinfos << "Merov debug : session " << this << ", uuid = " << mUUID << ", name = " << mName << ", is loaded = " << mIsLoaded << llendl; + // Children info + if (dump_children) + { + for (child_list_t::iterator iter = mChildren.begin(); iter != mChildren.end(); iter++) + { + LLConversationItemParticipant* participant = dynamic_cast<LLConversationItemParticipant*>(*iter); + if (participant) + { + participant->dumpDebugData(); + } + } + } +} + +// should be invoked only for P2P sessions +void LLConversationItemSession::onAvatarNameCache(const LLAvatarName& av_name) +{ + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + + renameItem(av_name.getDisplayName()); + postEvent("update_session", this, NULL); +} + +// +// LLConversationItemParticipant +// + +LLConversationItemParticipant::LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : + LLConversationItem(display_name,uuid,root_view_model), + mIsModerator(false), + mDisplayModeratorLabel(false), + mDistToAgent(-1.0) +{ + mDisplayName = display_name; + mConvType = CONV_PARTICIPANT; +} + +LLConversationItemParticipant::LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : + LLConversationItem(uuid,root_view_model), + mIsModerator(false), + mDisplayModeratorLabel(false), + mDistToAgent(-1.0) +{ + mConvType = CONV_PARTICIPANT; +} + +void LLConversationItemParticipant::updateName() +{ + llassert(getUUID().notNull()); + if (getUUID().notNull()) + { + LLAvatarName av_name; + if (LLAvatarNameCache::get(getUUID(),&av_name)) + { + updateName(av_name); + } + } +} + +void LLConversationItemParticipant::onAvatarNameCache(const LLAvatarName& av_name) +{ + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + + updateName(av_name); +} + +void LLConversationItemParticipant::updateName(const LLAvatarName& av_name) +{ + mName = av_name.getUserName(); + mDisplayName = av_name.getDisplayName(); + + if (mDisplayModeratorLabel) + { + mDisplayName += " " + LLTrans::getString("IM_moderator_label"); + } + + renameItem(mDisplayName); + if (mParent != NULL) + { + LLConversationItemSession* parent_session = dynamic_cast<LLConversationItemSession*>(mParent); + if (parent_session != NULL) + { + parent_session->requestSort(); + parent_session->updateName(this); + postEvent("update_participant", parent_session, this); + } + } +} + +void LLConversationItemParticipant::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + menuentry_vec_t items; + menuentry_vec_t disabled_items; + + buildParticipantMenuOptions(items, flags); + + hide_context_entries(menu, items, disabled_items); +} + +LLConversationItemSession* LLConversationItemParticipant::getParentSession() +{ + LLConversationItemSession* parent_session = NULL; + if (hasParent()) + { + parent_session = dynamic_cast<LLConversationItemSession*>(mParent); + } + return parent_session; +} + +void LLConversationItemParticipant::dumpDebugData() +{ + llinfos << "Merov debug : participant, uuid = " << mUUID << ", name = " << mName << ", display name = " << mDisplayName << ", muted = " << isVoiceMuted() << ", moderator = " << mIsModerator << llendl; +} + +void LLConversationItemParticipant::setDisplayModeratorRole(bool displayRole) +{ + if (displayRole != mDisplayModeratorLabel) + { + mDisplayModeratorLabel = displayRole; + updateName(); + } +} + +bool LLConversationItemParticipant::isVoiceMuted() +{ + return LLMuteList::getInstance()->isMuted(mUUID, LLMute::flagVoiceChat); +} + +void LLConversationItemParticipant::muteVoice(bool mute_voice) +{ + std::string name; + gCacheName->getFullName(mUUID, name); + LLMuteList * mute_listp = LLMuteList::getInstance(); + bool voice_already_muted = mute_listp->isMuted(mUUID, name); + + LLMute mute(mUUID, name, LLMute::AGENT); + if (voice_already_muted && !mute_voice) + { + mute_listp->remove(mute); + } + else if (!voice_already_muted && mute_voice) + { + mute_listp->add(mute); + } +} + +// +// LLConversationSort +// + +// Comparison operator: returns "true" is a comes before b, "false" otherwise +bool LLConversationSort::operator()(const LLConversationItem* const& a, const LLConversationItem* const& b) const +{ + LLConversationItem::EConversationType type_a = a->getType(); + LLConversationItem::EConversationType type_b = b->getType(); + + if ((type_a == LLConversationItem::CONV_PARTICIPANT) && (type_b == LLConversationItem::CONV_PARTICIPANT)) + { + // If both items are participants + U32 sort_order = getSortOrderParticipants(); + if (sort_order == LLConversationFilter::SO_DATE) + { + F64 time_a = 0.0; + F64 time_b = 0.0; + bool has_time_a = a->getTime(time_a); + bool has_time_b = b->getTime(time_b); + if (has_time_a && has_time_b) + { + // Most recent comes first + return (time_a > time_b); + } + else if (has_time_a || has_time_b) + { + // If we have only one time available, the element with time must come first + return has_time_a; + } + // If no time available, we'll default to sort by name at the end of this method + } + else if (sort_order == LLConversationFilter::SO_DISTANCE) + { + F64 dist_a = 0.0; + F64 dist_b = 0.0; + bool has_dist_a = a->getDistanceToAgent(dist_a); + bool has_dist_b = b->getDistanceToAgent(dist_b); + if (has_dist_a && has_dist_b) + { + // Closest comes first + return (dist_a < dist_b); + } + else if (has_dist_a || has_dist_b) + { + // If we have only one distance available, the element with it must come first + return has_dist_a; + } + // If no distance available, we'll default to sort by name at the end of this method + } + } + else if ((type_a > LLConversationItem::CONV_PARTICIPANT) && (type_b > LLConversationItem::CONV_PARTICIPANT)) + { + // If both are sessions + U32 sort_order = getSortOrderSessions(); + + if (sort_order == LLConversationFilter::SO_DATE) + { + // Sort by time + F64 time_a = 0.0; + F64 time_b = 0.0; + bool has_time_a = a->getTime(time_a); + bool has_time_b = b->getTime(time_b); + if (has_time_a && has_time_b) + { + // Most recent comes first + return (time_a > time_b); + } + else if (has_time_a || has_time_b) + { + // If we have only one time available, the element with time must come first + return has_time_a; + } + // If no time available, we'll default to sort by name at the end of this method + } + else + { + if ((type_a == LLConversationItem::CONV_SESSION_NEARBY) || (type_b == LLConversationItem::CONV_SESSION_NEARBY)) + { + // If one is the nearby session, put nearby session *always* last + return (type_b == LLConversationItem::CONV_SESSION_NEARBY); + } + else if (sort_order == LLConversationFilter::SO_SESSION_TYPE) + { + if (type_a != type_b) + { + // Lowest types come first. See LLConversationItem definition of types + return (type_a < type_b); + } + // If types are identical, we'll default to sort by name at the end of this method + } + } + } + else + { + // If one item is a participant and the other a session, the session comes before the participant + // so we simply compare the type + // Notes: as a consequence, CONV_UNKNOWN (which should never get created...) always come first + return (type_a > type_b); + } + // By default, in all other possible cases (including sort order type LLConversationFilter::SO_NAME of course), + // we sort by name + S32 compare = LLStringUtil::compareDict(a->getName(), b->getName()); + return (compare < 0); +} + +// +// LLConversationViewModel +// + +void LLConversationViewModel::sort(LLFolderViewFolder* folder) +{ + base_t::sort(folder); +} + +// EOF diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h new file mode 100755 index 0000000000..8766585049 --- /dev/null +++ b/indra/newview/llconversationmodel.h @@ -0,0 +1,314 @@ +/** + * @file llconversationmodel.h + * @brief Implementation of conversations list + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLCONVERSATIONMODEL_H +#define LL_LLCONVERSATIONMODEL_H + +#include <boost/signals2.hpp> + +#include "llavatarname.h" +#include "../llui/llfolderviewitem.h" +#include "../llui/llfolderviewmodel.h" +#include "llviewerfoldertype.h" + +// Implementation of conversations list + +class LLConversationItem; +class LLConversationItemSession; +class LLConversationItemParticipant; + +typedef std::map<LLUUID, LLConversationItem*> conversations_items_map; +typedef std::map<LLUUID, LLFolderViewItem*> conversations_widgets_map; + +typedef std::vector<std::string> menuentry_vec_t; + +// Conversation items: we hold a list of those and create an LLFolderViewItem widget for each +// that we tuck into the mConversationsListPanel. +class LLConversationItem : public LLFolderViewModelItemCommon +{ +public: + enum EConversationType + { + CONV_UNKNOWN = 0, + CONV_PARTICIPANT = 1, + CONV_SESSION_NEARBY = 2, // The order counts here as it is used to sort sessions by type + CONV_SESSION_1_ON_1 = 3, + CONV_SESSION_AD_HOC = 4, + CONV_SESSION_GROUP = 5, + CONV_SESSION_UNKNOWN = 6 + }; + + LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + LLConversationItem(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + LLConversationItem(LLFolderViewModelInterface& root_view_model); + virtual ~LLConversationItem(); + + // Stub those things we won't really be using in this conversation context + virtual const std::string& getName() const { return mName; } + virtual const std::string& getDisplayName() const { return mName; } + virtual const std::string& getSearchableName() const { return mName; } + virtual const LLUUID& getUUID() const { return mUUID; } + virtual time_t getCreationDate() const { return 0; } + virtual LLPointer<LLUIImage> getIcon() const { return NULL; } + virtual LLPointer<LLUIImage> getOpenIcon() const { return getIcon(); } + virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } + virtual std::string getLabelSuffix() const { return LLStringUtil::null; } + virtual BOOL isItemRenameable() const { return TRUE; } + virtual BOOL renameItem(const std::string& new_name) { mName = new_name; mNeedsRefresh = true; return TRUE; } + virtual BOOL isItemMovable( void ) const { return FALSE; } + virtual BOOL isItemRemovable( void ) const { return FALSE; } + virtual BOOL isItemInTrash( void) const { return FALSE; } + virtual BOOL removeItem() { return FALSE; } + virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch) { } + virtual void move( LLFolderViewModelItem* parent_listener ) { } + virtual BOOL isItemCopyable() const { return FALSE; } + virtual BOOL copyToClipboard() const { return FALSE; } + virtual BOOL cutToClipboard() const { return FALSE; } + virtual BOOL isClipboardPasteable() const { return FALSE; } + virtual void pasteFromClipboard() { } + virtual void pasteLinkFromClipboard() { } + virtual void buildContextMenu(LLMenuGL& menu, U32 flags) { } + virtual BOOL isUpToDate() const { return TRUE; } + virtual bool hasChildren() const { return FALSE; } + + virtual bool potentiallyVisible() { return true; } + virtual bool filter( LLFolderViewFilter& filter) { return false; } + virtual bool descendantsPassedFilter(S32 filter_generation = -1) { return true; } + virtual void setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset = std::string::npos, std::string::size_type string_size = 0) { } + virtual bool passedFilter(S32 filter_generation = -1) { return true; } + + // The action callbacks + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void openItem( void ); + virtual void closeItem( void ); + virtual void previewItem( void ); + virtual void selectItem(void) { } + virtual void showProperties(void); + + // Methods used in sorting (see LLConversationSort::operator()) + EConversationType const getType() const { return mConvType; } + virtual const bool getTime(F64& time) const { time = mLastActiveTime; return (time > 0.1); } + virtual const bool getDistanceToAgent(F64& distance) const { return false; } + + // This method will be called to determine if a drop can be + // performed, and will set drop to TRUE if a drop is + // requested. + // Returns TRUE if a drop is possible/happened, FALSE otherwise. + virtual BOOL dragOrDrop(MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + std::string& tooltip_msg) { return FALSE; } + +// bool hasSameValues(std::string name, const LLUUID& uuid) { return ((name == mName) && (uuid == mUUID)); } + bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); } + + void resetRefresh() { mNeedsRefresh = false; } + bool needsRefresh() { return mNeedsRefresh; } + + void postEvent(const std::string& event_type, LLConversationItemSession* session, LLConversationItemParticipant* participant); + + void buildParticipantMenuOptions(menuentry_vec_t& items, U32 flags); + + void fetchAvatarName(bool isParticipant = true); // fetch and update the avatar name + +protected: + virtual void onAvatarNameCache(const LLAvatarName& av_name) {} + + std::string mName; // Name of the session or the participant + LLUUID mUUID; // UUID of the session or the participant + EConversationType mConvType; // Type of conversation item + bool mNeedsRefresh; // Flag signaling to the view that something changed for this item + F64 mLastActiveTime; + bool mDisplayModeratorOptions; + boost::signals2::connection mAvatarNameCacheConnection; +}; + +class LLConversationItemSession : public LLConversationItem +{ +public: + LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + + /*virtual*/ bool hasChildren() const; + LLPointer<LLUIImage> getIcon() const { return NULL; } + void setSessionID(const LLUUID& session_id) { mUUID = session_id; mNeedsRefresh = true; } + void addParticipant(LLConversationItemParticipant* participant); + void updateName(LLConversationItemParticipant* participant); + void removeParticipant(LLConversationItemParticipant* participant); + void removeParticipant(const LLUUID& participant_id); + void clearParticipants(); + LLConversationItemParticipant* findParticipant(const LLUUID& participant_id); + + void setParticipantIsMuted(const LLUUID& participant_id, bool is_muted); + void setParticipantIsModerator(const LLUUID& participant_id, bool is_moderator); + void setTimeNow(const LLUUID& participant_id); + void setDistance(const LLUUID& participant_id, F64 dist); + + bool isLoaded() { return mIsLoaded; } + + void buildContextMenu(LLMenuGL& menu, U32 flags); + void addVoiceOptions(menuentry_vec_t& items); + virtual const bool getTime(F64& time) const; + + void dumpDebugData(bool dump_children = false); + +private: + /*virtual*/ void onAvatarNameCache(const LLAvatarName& av_name); + + bool mIsLoaded; // true if at least one participant has been added to the session, false otherwise +}; + +class LLConversationItemParticipant : public LLConversationItem +{ +public: + LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + + virtual const std::string& getDisplayName() const { return mDisplayName; } + + bool isVoiceMuted(); + bool isModerator() const { return mIsModerator; } + void muteVoice(bool mute_voice); + void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; mNeedsRefresh = true; } + void setTimeNow() { mLastActiveTime = LLFrameTimer::getElapsedSeconds(); mNeedsRefresh = true; } + void setDistance(F64 dist) { mDistToAgent = dist; mNeedsRefresh = true; } + + void buildContextMenu(LLMenuGL& menu, U32 flags); + + virtual const bool getDistanceToAgent(F64& dist) const { dist = mDistToAgent; return (dist >= 0.0); } + + void updateName(); // get from the cache (do *not* fetch) and update the avatar name + LLConversationItemSession* getParentSession(); + + void dumpDebugData(); + void setModeratorOptionsVisible(bool visible) { mDisplayModeratorOptions = visible; } + void setDisplayModeratorRole(bool displayRole); + +private: + void onAvatarNameCache(const LLAvatarName& av_name); // callback used by fetchAvatarName + void updateName(const LLAvatarName& av_name); + + bool mIsMuted; // default is false + bool mIsModerator; // default is false + bool mDisplayModeratorLabel; // default is false + std::string mDisplayName; + F64 mDistToAgent; // Distance to the agent. A negative (meaningless) value means the distance has not been set. + boost::signals2::connection mAvatarNameCacheConnection; +}; + +// We don't want to ever filter conversations but we need to declare that class to create a conversation view model. +// We just stubb everything for the moment. +class LLConversationFilter : public LLFolderViewFilter +{ +public: + + enum ESortOrderType + { + SO_NAME = 0, // Sort by name + SO_DATE = 0x1, // Sort by date (most recent) + SO_SESSION_TYPE = 0x2, // Sort by type (valid only for sessions) + SO_DISTANCE = 0x3, // Sort by distance (valid only for participants in nearby chat) + }; + // Default sort order is by type for sessions and by date for participants + static const U32 SO_DEFAULT = (SO_SESSION_TYPE << 16) | (SO_DATE); + + LLConversationFilter() { mEmpty = ""; } + ~LLConversationFilter() {} + + bool check(const LLFolderViewModelItem* item) { return true; } + bool checkFolder(const LLFolderViewModelItem* folder) const { return true; } + void setEmptyLookupMessage(const std::string& message) { } + std::string getEmptyLookupMessage() const { return mEmpty; } + bool showAllResults() const { return true; } + std::string::size_type getStringMatchOffset(LLFolderViewModelItem* item) const { return std::string::npos; } + std::string::size_type getFilterStringSize() const { return 0; } + + bool isActive() const { return false; } + bool isModified() const { return false; } + void clearModified() { } + const std::string& getName() const { return mEmpty; } + const std::string& getFilterText() { return mEmpty; } + void setModified(EFilterModified behavior = FILTER_RESTART) { } + + void setFilterCount(S32 count) { } + S32 getFilterCount() const { return 0; } + void decrementFilterCount() { } + + bool isDefault() const { return true; } + bool isNotDefault() const { return false; } + void markDefault() { } + void resetDefault() { } + + S32 getCurrentGeneration() const { return 0; } + S32 getFirstSuccessGeneration() const { return 0; } + S32 getFirstRequiredGeneration() const { return 0; } +private: + std::string mEmpty; +}; + +class LLConversationSort +{ +public: + LLConversationSort(U32 order = LLConversationFilter::SO_DEFAULT) : mSortOrder(order) { } + + // 16 LSB bits used for participants, 16 MSB bits for sessions + U32 getSortOrderSessions() const { return ((mSortOrder >> 16) & 0xFFFF); } + U32 getSortOrderParticipants() const { return (mSortOrder & 0xFFFF); } + void setSortOrderSessions(LLConversationFilter::ESortOrderType session) { mSortOrder = ((session & 0xFFFF) << 16) | (mSortOrder & 0xFFFF); } + void setSortOrderParticipants(LLConversationFilter::ESortOrderType participant) { mSortOrder = (mSortOrder & 0xFFFF0000) | (participant & 0xFFFF); } + + bool operator()(const LLConversationItem* const& a, const LLConversationItem* const& b) const; + operator U32() const { return mSortOrder; } +private: + // Note: we're treating this value as a sort order bitmask as done in other places in the code (e.g. inventory) + U32 mSortOrder; +}; + +class LLConversationViewModel +: public LLFolderViewModel<LLConversationSort, LLConversationItem, LLConversationItem, LLConversationFilter> +{ +public: + typedef LLFolderViewModel<LLConversationSort, LLConversationItem, LLConversationItem, LLConversationFilter> base_t; + + void sort(LLFolderViewFolder* folder); + bool contentsReady() { return true; } // *TODO : we need to check that participants names are available somewhat + bool startDrag(std::vector<LLFolderViewModelItem*>& items) { return false; } // We do not allow drag of conversation items + +private: +}; + +// Utility function to hide all entries except those in the list +// Can be called multiple times on the same menu (e.g. if multiple items +// are selected). If "append" is false, then only common enabled items +// are set as enabled. + +//(defined in inventorybridge.cpp) +//TODO: Gilbert Linden - Refactor to make this function non-global +void hide_context_entries(LLMenuGL& menu, + const menuentry_vec_t &entries_to_show, + const menuentry_vec_t &disabled_entries); + +#endif // LL_LLCONVERSATIONMODEL_H diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp new file mode 100755 index 0000000000..956abcd586 --- /dev/null +++ b/indra/newview/llconversationview.cpp @@ -0,0 +1,696 @@ +/** + * @file llconversationview.cpp + * @brief Implementation of conversations list widgets and views + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + + +#include "llviewerprecompiledheaders.h" + +#include "llconversationview.h" + +#include <boost/bind.hpp> +#include "llagentdata.h" +#include "llconversationmodel.h" +#include "llfloaterimsession.h" +#include "llfloaterimnearbychat.h" +#include "llfloaterimsessiontab.h" +#include "llfloaterimcontainer.h" +#include "llfloaterreg.h" +#include "llgroupiconctrl.h" +#include "lluictrlfactory.h" +#include "lltoolbarview.h" + +// +// Implementation of conversations list session widgets +// +static LLDefaultChildRegistry::Register<LLConversationViewSession> r_conversation_view_session("conversation_view_session"); + +const LLColor4U DEFAULT_WHITE(255, 255, 255); + +class LLNearbyVoiceClientStatusObserver : public LLVoiceClientStatusObserver +{ +public: + + LLNearbyVoiceClientStatusObserver(LLConversationViewSession* conv) + : conversation(conv) + {} + + virtual void onChange(EStatusType status, const std::string &channelURI, bool proximal) + { + conversation->showVoiceIndicator(conversation + && status != STATUS_JOINING + && status != STATUS_LEFT_CHANNEL + && LLVoiceClient::getInstance()->voiceEnabled() + && LLVoiceClient::getInstance()->isVoiceWorking()); + } + +private: + LLConversationViewSession* conversation; +}; + +LLConversationViewSession::Params::Params() : + container() +{} + +LLConversationViewSession::LLConversationViewSession(const LLConversationViewSession::Params& p): + LLFolderViewFolder(p), + mContainer(p.container), + mItemPanel(NULL), + mCallIconLayoutPanel(NULL), + mSessionTitle(NULL), + mSpeakingIndicator(NULL), + mVoiceClientObserver(NULL), + mCollapsedMode(false), + mHasArrow(true), + mIsInActiveVoiceChannel(false), + mFlashStateOn(false), + mFlashStarted(false) +{ + mFlashTimer = new LLFlashTimer(); +} + +LLConversationViewSession::~LLConversationViewSession() +{ + mActiveVoiceChannelConnection.disconnect(); + + if(LLVoiceClient::instanceExists() && mVoiceClientObserver) + { + LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver); + } + + mFlashTimer->unset(); +} + +void LLConversationViewSession::setFlashState(bool flash_state) +{ + if (flash_state && !mFlashStateOn) + { + // flash chat toolbar button if scrolled out of sight (because flashing will not be visible) + if (mContainer->isScrolledOutOfSight(this)) + { + gToolBarView->flashCommand(LLCommandId("chat"), true); + } + } + + mFlashStateOn = flash_state; + mFlashStarted = false; + mFlashTimer->stopFlashing(); +} + +void LLConversationViewSession::startFlashing() +{ + if (mFlashStateOn && !mFlashStarted) + { + mFlashStarted = true; + mFlashTimer->startFlashing(); + } +} + +bool LLConversationViewSession::isHighlightAllowed() +{ + return mFlashStateOn || mIsSelected; +} + +bool LLConversationViewSession::isHighlightActive() +{ + return (mFlashStateOn ? (mFlashTimer->isFlashingInProgress() ? mFlashTimer->isCurrentlyHighlighted() : true) : mIsCurSelection); +} + +BOOL LLConversationViewSession::postBuild() +{ + LLFolderViewItem::postBuild(); + + mItemPanel = LLUICtrlFactory::getInstance()->createFromFile<LLPanel>("panel_conversation_list_item.xml", NULL, LLPanel::child_registry_t::instance()); + addChild(mItemPanel); + + mCallIconLayoutPanel = mItemPanel->getChild<LLPanel>("call_icon_panel"); + mSessionTitle = mItemPanel->getChild<LLTextBox>("conversation_title"); + + mActiveVoiceChannelConnection = LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLConversationViewSession::onCurrentVoiceSessionChanged, this, _1)); + mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator"); + + LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(getViewModelItem()); + if (vmi) + { + switch(vmi->getType()) + { + case LLConversationItem::CONV_PARTICIPANT: + case LLConversationItem::CONV_SESSION_1_ON_1: + { + LLIMModel::LLIMSession* session= LLIMModel::instance().findIMSession(vmi->getUUID()); + if (session) + { + LLAvatarIconCtrl* icon = mItemPanel->getChild<LLAvatarIconCtrl>("avatar_icon"); + icon->setVisible(true); + icon->setValue(session->mOtherParticipantID); + mSpeakingIndicator->setSpeakerId(gAgentID, session->mSessionID, true); + mHasArrow = false; + } + break; + } + case LLConversationItem::CONV_SESSION_AD_HOC: + { + LLGroupIconCtrl* icon = mItemPanel->getChild<LLGroupIconCtrl>("group_icon"); + icon->setVisible(true); + mSpeakingIndicator->setSpeakerId(gAgentID, vmi->getUUID(), true); + break; + } + case LLConversationItem::CONV_SESSION_GROUP: + { + LLGroupIconCtrl* icon = mItemPanel->getChild<LLGroupIconCtrl>("group_icon"); + icon->setVisible(true); + icon->setValue(vmi->getUUID()); + mSpeakingIndicator->setSpeakerId(gAgentID, vmi->getUUID(), true); + break; + } + case LLConversationItem::CONV_SESSION_NEARBY: + { + LLIconCtrl* icon = mItemPanel->getChild<LLIconCtrl>("nearby_chat_icon"); + icon->setVisible(true); + mSpeakingIndicator->setSpeakerId(gAgentID, LLUUID::null, true); + mIsInActiveVoiceChannel = true; + if(LLVoiceClient::instanceExists()) + { + LLNearbyVoiceClientStatusObserver* mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this); + LLVoiceClient::getInstance()->addObserver(mVoiceClientObserver); + } + break; + } + default: + break; + } + } + + refresh(); + + return TRUE; +} + +void LLConversationViewSession::draw() +{ + getViewModelItem()->update(); + + const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>(); + const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE); + + // Indicate that flash can start (moot operation if already started, done or not flashing) + startFlashing(); + + // draw highlight for selected items + drawHighlight(show_context, true, sHighlightBgColor, sFlashBgColor, sFocusOutlineColor, sMouseOverColor); + + // Draw children if root folder, or any other folder that is open. Do not draw children when animating to closed state or you get rendering overlap. + bool draw_children = getRoot() == static_cast<LLFolderViewFolder*>(this) || isOpen(); + + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end();) + { + folders_t::iterator fit = iter++; + (*fit)->setVisible(draw_children); + } + for (items_t::iterator iter = mItems.begin(); + iter != mItems.end();) + { + items_t::iterator iit = iter++; + (*iit)->setVisible(draw_children); + } + + // we don't draw the open folder arrow in minimized mode + if (mHasArrow && !mCollapsedMode) + { + // update the rotation angle of open folder arrow + updateLabelRotation(); + drawOpenFolderArrow(default_params, sFgColor); + } + + refresh(); + + LLView::draw(); +} + +BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask ) +{ + //Will try to select a child node and then itself (if a child was not selected) + BOOL result = LLFolderViewFolder::handleMouseDown(x, y, mask); + + //This node (conversation) was selected and a child (participant) was not + if(result && getRoot()) + { + selectConversationItem(); + } + + return result; +} + +BOOL LLConversationViewSession::handleRightMouseDown( S32 x, S32 y, MASK mask ) +{ + BOOL result = LLFolderViewFolder::handleRightMouseDown(x, y, mask); + + if(result) + { + selectConversationItem(); + } + + return result; +} + +void LLConversationViewSession::selectConversationItem() +{ + if(getRoot()->getCurSelectedItem() == this) + { + LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem()); + LLUUID session_id = item? item->getUUID() : LLUUID(); + + LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); + im_container->flashConversationItemWidget(session_id,false); + im_container->selectConversationPair(session_id, false); + im_container->collapseMessagesPane(false); + } +} + +// virtual +S32 LLConversationViewSession::arrange(S32* width, S32* height) +{ + //LLFolderViewFolder::arrange computes value for getIndentation() function below + S32 arranged = LLFolderViewFolder::arrange(width, height); + + S32 h_pad = mHasArrow ? getIndentation() + mArrowSize : getIndentation(); + + LLRect rect(mCollapsedMode ? getLocalRect().mLeft : h_pad, + getLocalRect().mTop, + getLocalRect().mRight, + getLocalRect().mTop - getItemHeight()); + mItemPanel->setShape(rect); + + return arranged; +} + +// virtual +void LLConversationViewSession::toggleOpen() +{ + // conversations should not be opened while in minimized mode + if (!mCollapsedMode) + { + LLFolderViewFolder::toggleOpen(); + + // do item's selection when opened + if (LLFolderViewFolder::isOpen()) + { + getParentFolder()->setSelection(this, true); + } + mContainer->reSelectConversation(); + } +} + +void LLConversationViewSession::toggleCollapsedMode(bool is_collapsed) +{ + mCollapsedMode = is_collapsed; + + // hide the layout stack which contains all item's child widgets + // except for the icon which we display in minimized mode + getChild<LLView>("conversation_item_stack")->setVisible(!mCollapsedMode); + + S32 h_pad = mHasArrow ? getIndentation() + mArrowSize : getIndentation(); + + mItemPanel->translate(mCollapsedMode ? -h_pad : h_pad, 0); +} + +void LLConversationViewSession::setVisibleIfDetached(BOOL visible) +{ + // Do this only if the conversation floater has been torn off (i.e. no multi floater host) and is not minimized + // Note: minimized dockable floaters are brought to front hence unminimized when made visible and we don't want that here + LLFolderViewModelItem* item = mViewModelItem; + LLUUID session_uuid = dynamic_cast<LLConversationItem*>(item)->getUUID(); + LLFloater* session_floater = LLFloaterIMSessionTab::getConversation(session_uuid); + + if (session_floater && !session_floater->getHost() && !session_floater->isMinimized()) + { + session_floater->setVisible(visible); + } +} + +LLConversationViewParticipant* LLConversationViewSession::findParticipant(const LLUUID& participant_id) +{ + // This is *not* a general tree parsing algorithm. We search only in the mItems list + // assuming there is no mFolders which makes sense for sessions (sessions don't contain + // sessions). + LLConversationViewParticipant* participant = NULL; + items_t::const_iterator iter; + for (iter = getItemsBegin(); iter != getItemsEnd(); iter++) + { + participant = dynamic_cast<LLConversationViewParticipant*>(*iter); + if (participant->hasSameValue(participant_id)) + { + break; + } + } + return (iter == getItemsEnd() ? NULL : participant); +} + +void LLConversationViewSession::showVoiceIndicator(bool visible) +{ + mCallIconLayoutPanel->setVisible(visible && LLVoiceChannel::getCurrentVoiceChannel()->getSessionID().isNull()); + requestArrange(); +} + +void LLConversationViewSession::refresh() +{ + // Refresh the session view from its model data + LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(getViewModelItem()); + vmi->resetRefresh(); + + if (mSessionTitle) + { + mSessionTitle->setText(vmi->getDisplayName()); + } + + // Update all speaking indicators + LLSpeakingIndicatorManager::updateSpeakingIndicators(); + + // we should show indicator for specified voice session only if this is current channel. EXT-5562. + if (!mIsInActiveVoiceChannel) + { + if (mSpeakingIndicator) + { + mSpeakingIndicator->setVisible(false); + } + LLConversationViewParticipant* participant = NULL; + items_t::const_iterator iter; + for (iter = getItemsBegin(); iter != getItemsEnd(); iter++) + { + participant = dynamic_cast<LLConversationViewParticipant*>(*iter); + if (participant) + { + participant->hideSpeakingIndicator(); + } + } + } + requestArrange(); + // Do the regular upstream refresh + LLFolderViewFolder::refresh(); +} + +void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& session_id) +{ + LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(getViewModelItem()); + + if (vmi) + { + mIsInActiveVoiceChannel = vmi->getUUID() == session_id; + mCallIconLayoutPanel->setVisible(mIsInActiveVoiceChannel); + } +} + +// +// Implementation of conversations list participant (avatar) widgets +// + +static LLDefaultChildRegistry::Register<LLConversationViewParticipant> r("conversation_view_participant"); +bool LLConversationViewParticipant::sStaticInitialized = false; +S32 LLConversationViewParticipant::sChildrenWidths[LLConversationViewParticipant::ALIC_COUNT]; + +LLConversationViewParticipant::Params::Params() : +container(), +participant_id(), +avatar_icon("avatar_icon"), +info_button("info_button"), +output_monitor("output_monitor") +{} + +LLConversationViewParticipant::LLConversationViewParticipant( const LLConversationViewParticipant::Params& p ): + LLFolderViewItem(p), + mAvatarIcon(NULL), + mInfoBtn(NULL), + mSpeakingIndicator(NULL), + mUUID(p.participant_id) +{ +} + +LLConversationViewParticipant::~LLConversationViewParticipant() +{ + mActiveVoiceChannelConnection.disconnect(); +} + +void LLConversationViewParticipant::initFromParams(const LLConversationViewParticipant::Params& params) +{ + LLAvatarIconCtrl::Params avatar_icon_params(params.avatar_icon()); + applyXUILayout(avatar_icon_params, this); + LLAvatarIconCtrl * avatarIcon = LLUICtrlFactory::create<LLAvatarIconCtrl>(avatar_icon_params); + addChild(avatarIcon); + + LLButton::Params info_button_params(params.info_button()); + applyXUILayout(info_button_params, this); + LLButton * button = LLUICtrlFactory::create<LLButton>(info_button_params); + addChild(button); + + LLOutputMonitorCtrl::Params output_monitor_params(params.output_monitor()); + applyXUILayout(output_monitor_params, this); + LLOutputMonitorCtrl * outputMonitor = LLUICtrlFactory::create<LLOutputMonitorCtrl>(output_monitor_params); + addChild(outputMonitor); +} + +BOOL LLConversationViewParticipant::postBuild() +{ + mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon"); + + mInfoBtn = getChild<LLButton>("info_btn"); + mInfoBtn->setClickedCallback(boost::bind(&LLConversationViewParticipant::onInfoBtnClick, this)); + mInfoBtn->setVisible(false); + + mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator"); + + if (!sStaticInitialized) + { + // Remember children widths including their padding from the next sibling, + // so that we can hide and show them again later. + initChildrenWidths(this); + sStaticInitialized = true; + } + + updateChildren(); + return LLFolderViewItem::postBuild(); +} + +void LLConversationViewParticipant::draw() +{ + static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + static LLUIColor sFgDisabledColor = LLUIColorTable::instance().getColor("MenuItemDisabledColor", DEFAULT_WHITE); + static LLUIColor sHighlightFgColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE); + static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); + static LLUIColor sFlashBgColor = LLUIColorTable::instance().getColor("MenuItemFlashBgColor", DEFAULT_WHITE); + static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE); + static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE); + + const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE); + + const LLFontGL* font = getLabelFontForStyle(mLabelStyle); + F32 right_x = 0; + + F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad; + F32 text_left = (F32)getLabelXPos(); + + LLColor4 color; + LLLocalSpeakerMgr *speakerMgr = LLLocalSpeakerMgr::getInstance(); + + if (speakerMgr && speakerMgr->isSpeakerToBeRemoved(mUUID)) + { + color = sFgDisabledColor; + } + else + { + color = mIsSelected ? sHighlightFgColor : sFgColor; + } + + drawHighlight(show_context, mIsSelected, sHighlightBgColor, sFlashBgColor, sFocusOutlineColor, sMouseOverColor); + drawLabel(font, text_left, y, color, right_x); + refresh(); + + LLView::draw(); +} + +// virtual +S32 LLConversationViewParticipant::arrange(S32* width, S32* height) +{ + //Need to call arrange first since it computes value used in getIndentation() + S32 arranged = LLFolderViewItem::arrange(width, height); + + //Adjusts the avatar icon based upon the indentation + LLRect avatarRect(getIndentation(), + mAvatarIcon->getRect().mTop, + getIndentation() + mAvatarIcon->getRect().getWidth(), + mAvatarIcon->getRect().mBottom); + mAvatarIcon->setShape(avatarRect); + + //Since dimensions changed, adjust the children (info button, speaker indicator) + updateChildren(); + + return arranged; +} + +void LLConversationViewParticipant::addToFolder(LLFolderViewFolder* folder) +{ + // Add the item to the folder (conversation) + LLFolderViewItem::addToFolder(folder); + + // Retrieve the folder (conversation) UUID, which is also the speaker session UUID + LLConversationItem* vmi = getParentFolder() ? dynamic_cast<LLConversationItem*>(getParentFolder()->getViewModelItem()) : NULL; + if (vmi) + { + addToSession(vmi->getUUID()); + } +} + +void LLConversationViewParticipant::addToSession(const LLUUID& session_id) +{ + //Allows speaking icon image to be loaded based on mUUID + mAvatarIcon->setValue(mUUID); + + //Allows the speaker indicator to be activated based on the user and conversation + mSpeakingIndicator->setSpeakerId(mUUID, session_id); +} + +void LLConversationViewParticipant::onInfoBtnClick() +{ + LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mUUID)); +} + +BOOL LLConversationViewParticipant::handleMouseDown( S32 x, S32 y, MASK mask ) +{ + BOOL result = LLFolderViewItem::handleMouseDown(x, y, mask); + + if(result && getRoot()) + { + if(getRoot()->getCurSelectedItem() == this) + { + LLConversationItem* vmi = getParentFolder() ? dynamic_cast<LLConversationItem*>(getParentFolder()->getViewModelItem()) : NULL; + LLUUID session_id = vmi? vmi->getUUID() : LLUUID(); + + LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); + im_container->setSelectedSession(session_id); + im_container->flashConversationItemWidget(session_id,false); + im_container->selectFloater(session_floater); + im_container->collapseMessagesPane(false); + } + } + return result; +} + +void LLConversationViewParticipant::onMouseEnter(S32 x, S32 y, MASK mask) +{ + mInfoBtn->setVisible(true); + updateChildren(); + LLFolderViewItem::onMouseEnter(x, y, mask); +} + +void LLConversationViewParticipant::onMouseLeave(S32 x, S32 y, MASK mask) +{ + mInfoBtn->setVisible(false); + updateChildren(); + LLFolderViewItem::onMouseLeave(x, y, mask); +} + +S32 LLConversationViewParticipant::getLabelXPos() +{ + return getIndentation() + mAvatarIcon->getRect().getWidth() + mIconPad; +} + +// static +void LLConversationViewParticipant::initChildrenWidths(LLConversationViewParticipant* self) +{ + //speaking indicator width + padding + S32 speaking_indicator_width = self->getRect().getWidth() - self->mSpeakingIndicator->getRect().mLeft; + + //info btn width + padding + S32 info_btn_width = self->mSpeakingIndicator->getRect().mLeft - self->mInfoBtn->getRect().mLeft; + + S32 index = ALIC_COUNT; + sChildrenWidths[--index] = info_btn_width; + sChildrenWidths[--index] = speaking_indicator_width; + llassert(index == 0); +} + +void LLConversationViewParticipant::updateChildren() +{ + mLabelPaddingRight = DEFAULT_LABEL_PADDING_RIGHT; + LLView* control; + S32 ctrl_width; + LLRect controlRect; + + //Cycles through controls starting from right to left + for (S32 i = 0; i < ALIC_COUNT; ++i) + { + control = getItemChildView((EAvatarListItemChildIndex)i); + + // skip invisible views + if (!control->getVisible()) continue; + + //Get current pos/dimensions + controlRect = control->getRect(); + + ctrl_width = sChildrenWidths[i]; // including space between current & left controls + // accumulate the amount of space taken by the controls + mLabelPaddingRight += ctrl_width; + + //Reposition visible controls in case adjacent controls to the right are hidden. + controlRect.setLeftTopAndSize( + getLocalRect().getWidth() - mLabelPaddingRight, + controlRect.mTop, + controlRect.getWidth(), + controlRect.getHeight()); + + //Sets the new position + control->setShape(controlRect); + } +} + +LLView* LLConversationViewParticipant::getItemChildView(EAvatarListItemChildIndex child_view_index) +{ + LLView* child_view = NULL; + + switch (child_view_index) + { + case ALIC_SPEAKER_INDICATOR: + child_view = mSpeakingIndicator; + break; + case ALIC_INFO_BUTTON: + child_view = mInfoBtn; + break; + default: + LL_WARNS("AvatarItemReshape") << "Unexpected child view index is passed: " << child_view_index << LL_ENDL; + llassert(0); + break; + // leave child_view untouched + } + + return child_view; +} + +void LLConversationViewParticipant::hideSpeakingIndicator() +{ + mSpeakingIndicator->setVisible(false); +} + +// EOF + diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h new file mode 100755 index 0000000000..3eb2e63792 --- /dev/null +++ b/indra/newview/llconversationview.h @@ -0,0 +1,177 @@ +/** + * @file llconversationview.h + * @brief Implementation of conversations list widgets and views + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLCONVERSATIONVIEW_H +#define LL_LLCONVERSATIONVIEW_H + +#include "../llui/llfolderviewitem.h" + +#include "llavatariconctrl.h" +#include "../llui/llbutton.h" +#include "lloutputmonitorctrl.h" + +class LLTextBox; +class LLFloaterIMContainer; +class LLConversationViewSession; +class LLConversationViewParticipant; + +class LLVoiceClientStatusObserver; + +// Implementation of conversations list session widgets + +class LLConversationViewSession : public LLFolderViewFolder +{ +public: + struct Params : public LLInitParam::Block<Params, LLFolderViewItem::Params> + { + Optional<LLFloaterIMContainer*> container; + + Params(); + }; + +protected: + friend class LLUICtrlFactory; + LLConversationViewSession( const Params& p ); + + /*virtual*/ bool isHighlightAllowed(); + /*virtual*/ bool isHighlightActive(); + /*virtual*/ bool isFlashing() { return mFlashStateOn; } + + LLFloaterIMContainer* mContainer; + +public: + virtual ~LLConversationViewSession(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void draw(); + /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); + /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); + + /*virtual*/ S32 arrange(S32* width, S32* height); + + /*virtual*/ void toggleOpen(); + + /*virtual*/ bool isCollapsed() { return mCollapsedMode; } + + void toggleCollapsedMode(bool is_collapsed); + + void setVisibleIfDetached(BOOL visible); + LLConversationViewParticipant* findParticipant(const LLUUID& participant_id); + + void showVoiceIndicator(bool visible); + + virtual void refresh(); + + /*virtual*/ void setFlashState(bool flash_state); + +private: + + void onCurrentVoiceSessionChanged(const LLUUID& session_id); + void startFlashing(); + void selectConversationItem(); + + LLPanel* mItemPanel; + LLPanel* mCallIconLayoutPanel; + LLTextBox* mSessionTitle; + LLOutputMonitorCtrl* mSpeakingIndicator; + LLFlashTimer* mFlashTimer; + bool mFlashStateOn; + bool mFlashStarted; + + bool mCollapsedMode; + bool mHasArrow; + + bool mIsInActiveVoiceChannel; + + LLVoiceClientStatusObserver* mVoiceClientObserver; + + boost::signals2::connection mActiveVoiceChannelConnection; +}; + +// Implementation of conversations list participant (avatar) widgets + +class LLConversationViewParticipant : public LLFolderViewItem +{ + +public: + + struct Params : public LLInitParam::Block<Params, LLFolderViewItem::Params> + { + Optional<LLFloaterIMContainer*> container; + Optional<LLUUID> participant_id; + Optional<LLAvatarIconCtrl::Params> avatar_icon; + Optional<LLButton::Params> info_button; + Optional<LLOutputMonitorCtrl::Params> output_monitor; + + Params(); + }; + + virtual ~LLConversationViewParticipant( void ); + + bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); } + void addToFolder(LLFolderViewFolder* folder); + void addToSession(const LLUUID& session_id); + + void onMouseEnter(S32 x, S32 y, MASK mask); + void onMouseLeave(S32 x, S32 y, MASK mask); + + /*virtual*/ S32 getLabelXPos(); + /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); + void hideSpeakingIndicator(); + +protected: + friend class LLUICtrlFactory; + LLConversationViewParticipant( const Params& p ); + void initFromParams(const Params& params); + BOOL postBuild(); + /*virtual*/ void draw(); + /*virtual*/ S32 arrange(S32* width, S32* height); + + void onInfoBtnClick(); + +private: + + LLAvatarIconCtrl* mAvatarIcon; + LLButton * mInfoBtn; + LLOutputMonitorCtrl* mSpeakingIndicator; + LLUUID mUUID; // UUID of the participant + + typedef enum e_avatar_item_child { + ALIC_SPEAKER_INDICATOR, + ALIC_INFO_BUTTON, + ALIC_COUNT, + } EAvatarListItemChildIndex; + + static bool sStaticInitialized; // this variable is introduced to improve code readability + static S32 sChildrenWidths[ALIC_COUNT]; + static void initChildrenWidths(LLConversationViewParticipant* self); + void updateChildren(); + LLView* getItemChildView(EAvatarListItemChildIndex child_view_index); + + boost::signals2::connection mActiveVoiceChannelConnection; +}; + +#endif // LL_LLCONVERSATIONVIEW_H diff --git a/indra/newview/lldaycyclemanager.cpp b/indra/newview/lldaycyclemanager.cpp index 347a467a8b..8af2f4ea33 100644 --- a/indra/newview/lldaycyclemanager.cpp +++ b/indra/newview/lldaycyclemanager.cpp @@ -184,7 +184,7 @@ void LLDayCycleManager::loadPresets(const std::string& dir) { std::string file; if (!dir_iter.next(file)) break; // no more files - loadPreset(dir + file); + loadPreset(gDirUtilp->add(dir, file)); } } diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index 29b1d23d7d..aeecf054b8 100644 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -30,7 +30,6 @@ // library includes #include "llfasttimerview.h" -#include "llmemoryview.h" #include "llconsole.h" #include "lltextureview.h" #include "llresmgr.h" @@ -38,7 +37,6 @@ #include "llviewercontrol.h" #include "llviewerwindow.h" #include "llappviewer.h" -#include "llmemoryview.h" #include "llsceneview.h" #include "llviewertexture.h" #include "llfloaterreg.h" @@ -103,13 +101,6 @@ void LLDebugView::init() r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f), (S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f)); - LLMemoryView::Params mp; - mp.name("memory"); - mp.rect(r); - mp.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT); - mp.visible(false); - mMemoryView = LLUICtrlFactory::create<LLMemoryView>(mp); - addChild(mMemoryView); r.set(150, rect.getHeight() - 50, 820, 100); LLTextureView::Params tvp; diff --git a/indra/newview/lldeferredsounds.cpp b/indra/newview/lldeferredsounds.cpp new file mode 100644 index 0000000000..9416e7cd29 --- /dev/null +++ b/indra/newview/lldeferredsounds.cpp @@ -0,0 +1,45 @@ +/** +* @file lldeferredsounds.cpp +* @brief Implementation of lldeferredsounds +* @author Gilbert@lindenlab.com +* +* $LicenseInfo:firstyear=2013&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2013, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + +#include "llviewerprecompiledheaders.h" + +#include "lldeferredsounds.h" + +#include "llaudioengine.h" + +void LLDeferredSounds::deferSound(SoundData& sound) +{ + soundVector.push_back(sound); +} +void LLDeferredSounds::playdeferredSounds() +{ + while(soundVector.size()) + { + gAudiop->triggerSound(soundVector.back()); + soundVector.pop_back(); + } +} diff --git a/indra/newview/lldeferredsounds.h b/indra/newview/lldeferredsounds.h new file mode 100644 index 0000000000..bf1eb62957 --- /dev/null +++ b/indra/newview/lldeferredsounds.h @@ -0,0 +1,46 @@ +/** +* @file lldeferredsounds.h +* @brief Header file for lldeferredsounds +* @author Gilbert@lindenlab.com +* +* $LicenseInfo:firstyear=2013&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2013, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ +#ifndef LL_LLDEFERREDSOUNDS_H +#define LL_LLDEFERREDSOUNDS_H + +#include "llsingleton.h" + +struct SoundData; + +class LLDeferredSounds : public LLSingleton<LLDeferredSounds> +{ +private: + std::vector<SoundData> soundVector; +public: + //Add sounds to be played once progress bar is hidden (such as after teleport or loading screen) + void deferSound(SoundData& sound); + + void playdeferredSounds(); +}; + +#endif // LL_LLDEFERREDSOUNDS_H + diff --git a/indra/newview/lldelayedgestureerror.cpp b/indra/newview/lldelayedgestureerror.cpp index 80e7c9f1b2..ef1b644ad4 100644 --- a/indra/newview/lldelayedgestureerror.cpp +++ b/indra/newview/lldelayedgestureerror.cpp @@ -113,9 +113,11 @@ bool LLDelayedGestureError::doDialog(const LLErrorEntry &ent, bool uuid_ok) } } - - LLNotificationsUtil::add(ent.mNotifyName, args); - + if(!LLApp::isQuitting()) + { + LLNotificationsUtil::add(ent.mNotifyName, args); + } + return true; } diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h index 2188b7edd0..682f9d6476 100644 --- a/indra/newview/lldirpicker.h +++ b/indra/newview/lldirpicker.h @@ -37,8 +37,8 @@ #include <Carbon/Carbon.h> // AssertMacros.h does bad things. +#include "fix_macros.h" #undef verify -#undef check #undef require #include <vector> diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp new file mode 100644 index 0000000000..be20adeb8a --- /dev/null +++ b/indra/newview/lldonotdisturbnotificationstorage.cpp @@ -0,0 +1,346 @@ +/** +* @file lldonotdisturbnotificationstorage.cpp +* @brief Implementation of lldonotdisturbnotificationstorage +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + +#include "llviewerprecompiledheaders.h" + +#include "lldonotdisturbnotificationstorage.h" + +#include "llcommunicationchannel.h" +#include "lldir.h" +#include "llerror.h" +#include "llfloaterreg.h" +#include "llimview.h" +#include "llnotifications.h" +#include "llnotificationhandler.h" +#include "llnotificationstorage.h" +#include "llscriptfloater.h" +#include "llsd.h" +#include "llsingleton.h" +#include "lluuid.h" + +static const F32 DND_TIMER = 3.0; +const char * LLDoNotDisturbNotificationStorage::toastName = "IMToast"; +const char * LLDoNotDisturbNotificationStorage::offerName = "UserGiveItem"; + +LLDoNotDisturbNotificationStorageTimer::LLDoNotDisturbNotificationStorageTimer() : LLEventTimer(DND_TIMER) +{ + +} + +LLDoNotDisturbNotificationStorageTimer::~LLDoNotDisturbNotificationStorageTimer() +{ + +} + +BOOL LLDoNotDisturbNotificationStorageTimer::tick() +{ + LLDoNotDisturbNotificationStorage * doNotDisturbNotificationStorage = LLDoNotDisturbNotificationStorage::getInstance(); + + if(doNotDisturbNotificationStorage + && doNotDisturbNotificationStorage->getDirty()) + { + doNotDisturbNotificationStorage->saveNotifications(); + } + return FALSE; +} + +LLDoNotDisturbNotificationStorage::LLDoNotDisturbNotificationStorage() + : LLSingleton<LLDoNotDisturbNotificationStorage>() + , LLNotificationStorage(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "dnd_notifications.xml")) + , mDirty(false) +{ + nameToPayloadParameterMap[toastName] = "SESSION_ID"; + nameToPayloadParameterMap[offerName] = "object_id"; +} + +LLDoNotDisturbNotificationStorage::~LLDoNotDisturbNotificationStorage() +{ +} + +void LLDoNotDisturbNotificationStorage::initialize() +{ + getCommunicationChannel()->connectFailedFilter(boost::bind(&LLDoNotDisturbNotificationStorage::onChannelChanged, this, _1)); +} + +bool LLDoNotDisturbNotificationStorage::getDirty() +{ + return mDirty; +} + +void LLDoNotDisturbNotificationStorage::resetDirty() +{ + mDirty = false; +} + +static LLFastTimer::DeclareTimer FTM_SAVE_DND_NOTIFICATIONS("Save DND Notifications"); + +void LLDoNotDisturbNotificationStorage::saveNotifications() +{ + LLFastTimer _(FTM_SAVE_DND_NOTIFICATIONS); + + LLNotificationChannelPtr channelPtr = getCommunicationChannel(); + const LLCommunicationChannel *commChannel = dynamic_cast<LLCommunicationChannel*>(channelPtr.get()); + llassert(commChannel != NULL); + + LLSD output = LLSD::emptyMap(); + LLSD& data = output["data"]; + data = LLSD::emptyArray(); + + for (LLCommunicationChannel::history_list_t::const_iterator historyIter = commChannel->beginHistory(); + historyIter != commChannel->endHistory(); ++historyIter) + { + LLNotificationPtr notificationPtr = historyIter->second; + + if (!notificationPtr->isRespondedTo() && !notificationPtr->isCancelled() && !notificationPtr->isExpired()) + { + data.append(notificationPtr->asLLSD(true)); + } + } + + writeNotifications(output); + + resetDirty(); +} + +static LLFastTimer::DeclareTimer FTM_LOAD_DND_NOTIFICATIONS("Load DND Notifications"); + +void LLDoNotDisturbNotificationStorage::loadNotifications() +{ + LLFastTimer _(FTM_LOAD_DND_NOTIFICATIONS); + + LLSD input; + if (!readNotifications(input) ||input.isUndefined()) + { + return; + } + + LLSD& data = input["data"]; + if (data.isUndefined()) + { + return; + } + + LLNotifications& instance = LLNotifications::instance(); + bool imToastExists = false; + bool group_ad_hoc_toast_exists = false; + S32 toastSessionType; + bool offerExists = false; + + for (LLSD::array_const_iterator notification_it = data.beginArray(); + notification_it != data.endArray(); + ++notification_it) + { + LLSD notification_params = *notification_it; + const LLUUID& notificationID = notification_params["id"]; + std::string notificationName = notification_params["name"]; + LLNotificationPtr notification = instance.find(notificationID); + + if(notificationName == toastName) + { + toastSessionType = notification_params["payload"]["SESSION_TYPE"]; + if(toastSessionType == LLIMModel::LLIMSession::P2P_SESSION) + { + imToastExists = true; + } + //Don't add group/ad-hoc messages to the notification system because + //this means the group/ad-hoc session has to be re-created + else if(toastSessionType == LLIMModel::LLIMSession::GROUP_SESSION + || toastSessionType == LLIMModel::LLIMSession::ADHOC_SESSION) + { + //Just allows opening the conversation log for group/ad-hoc messages upon startup + group_ad_hoc_toast_exists = true; + continue; + } + } + else if(notificationName == offerName) + { + offerExists = true; + } + + //Notification already exists due to persistent storage adding it first into the notification system + if(notification) + { + notification->setDND(true); + instance.update(instance.find(notificationID)); + } + //New notification needs to be added + else + { + notification = (LLNotificationPtr) new LLNotification(notification_params.with("is_dnd", true)); + LLNotificationResponderInterface* responder = createResponder(notification_params["responder_sd"]["responder_type"], notification_params["responder_sd"]); + if (responder == NULL) + { + LL_WARNS("LLDoNotDisturbNotificationStorage") << "cannot create responder for notification of type '" + << notification->getType() << "'" << LL_ENDL; + } + else + { + LLNotificationResponderPtr responderPtr(responder); + notification->setResponseFunctor(responderPtr); + } + + instance.add(notification); + } + + } + + if(imToastExists) + { + LLFloaterReg::showInstance("im_container"); + } + + if(group_ad_hoc_toast_exists) + { + LLFloaterReg::showInstance("conversation"); + } + + if(imToastExists || group_ad_hoc_toast_exists || offerExists) + { + make_ui_sound_deferred("UISndNewIncomingIMSession"); + } + + //writes out empty .xml file (since LLCommunicationChannel::mHistory is empty) + saveNotifications(); +} + +void LLDoNotDisturbNotificationStorage::updateNotifications() +{ + + LLNotificationChannelPtr channelPtr = getCommunicationChannel(); + LLCommunicationChannel *commChannel = dynamic_cast<LLCommunicationChannel*>(channelPtr.get()); + llassert(commChannel != NULL); + + LLNotifications& instance = LLNotifications::instance(); + bool imToastExists = false; + bool offerExists = false; + + for (LLCommunicationChannel::history_list_t::const_iterator it = commChannel->beginHistory(); + it != commChannel->endHistory(); + ++it) + { + LLNotificationPtr notification = it->second; + std::string notificationName = notification->getName(); + + if(notificationName == toastName) + { + imToastExists = true; + } + else if(notificationName == offerName) + { + offerExists = true; + } + + //Notification already exists in notification pipeline (same instance of app running) + if (notification) + { + notification->setDND(true); + instance.update(notification); + } + } + + if(imToastExists) + { + LLFloaterReg::showInstance("im_container"); + } + + if(imToastExists || offerExists) + { + make_ui_sound("UISndNewIncomingIMSession"); + } + + //When exit DND mode, write empty notifications file + if(commChannel->getHistorySize()) + { + commChannel->clearHistory(); + saveNotifications(); + } +} + +LLNotificationChannelPtr LLDoNotDisturbNotificationStorage::getCommunicationChannel() const +{ + LLNotificationChannelPtr channelPtr = LLNotifications::getInstance()->getChannel("Communication"); + llassert(channelPtr); + return channelPtr; +} + +void LLDoNotDisturbNotificationStorage::removeNotification(const char * name, const LLUUID& id) +{ + LLNotifications& instance = LLNotifications::instance(); + LLNotificationChannelPtr channelPtr = getCommunicationChannel(); + LLCommunicationChannel *commChannel = dynamic_cast<LLCommunicationChannel*>(channelPtr.get()); + LLNotificationPtr notification; + LLSD payload; + LLUUID notificationObjectID; + std::string notificationName; + std::string payloadVariable = nameToPayloadParameterMap[name]; + LLCommunicationChannel::history_list_t::iterator it; + std::vector<LLCommunicationChannel::history_list_t::iterator> itemsToRemove; + + //Find notification with the matching session id + for (it = commChannel->beginHistory(); + it != commChannel->endHistory(); + ++it) + { + notification = it->second; + payload = notification->getPayload(); + notificationObjectID = payload[payloadVariable].asUUID(); + notificationName = notification->getName(); + + if((notificationName == name) + && id == notificationObjectID) + { + itemsToRemove.push_back(it); + } + } + + + //Remove the notifications + if(itemsToRemove.size()) + { + while(itemsToRemove.size()) + { + it = itemsToRemove.back(); + notification = it->second; + commChannel->removeItemFromHistory(notification); + instance.cancel(notification); + itemsToRemove.pop_back(); + } + //Trigger saving of notifications to xml once all have been removed + saveNotifications(); + } +} + + +bool LLDoNotDisturbNotificationStorage::onChannelChanged(const LLSD& pPayload) +{ + if (pPayload["sigtype"].asString() != "load") + { + mDirty = true; + } + + return false; +} diff --git a/indra/newview/lldonotdisturbnotificationstorage.h b/indra/newview/lldonotdisturbnotificationstorage.h new file mode 100644 index 0000000000..6e68b0d1be --- /dev/null +++ b/indra/newview/lldonotdisturbnotificationstorage.h @@ -0,0 +1,78 @@ +/** +* @file lldonotdisturbnotificationstorage.h +* @brief Header file for lldonotdisturbnotificationstorage +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ +#ifndef LL_LLDONOTDISTURBNOTIFICATIONSTORAGE_H +#define LL_LLDONOTDISTURBNOTIFICATIONSTORAGE_H + +#include "llerror.h" +#include "lleventtimer.h" +#include "llnotifications.h" +#include "llnotificationstorage.h" +#include "llsingleton.h" + +class LLSD; + +class LLDoNotDisturbNotificationStorageTimer : public LLEventTimer +{ +public: + LLDoNotDisturbNotificationStorageTimer(); + ~LLDoNotDisturbNotificationStorageTimer(); + +public: + BOOL tick(); +}; + +class LLDoNotDisturbNotificationStorage : public LLSingleton<LLDoNotDisturbNotificationStorage>, public LLNotificationStorage +{ + LOG_CLASS(LLDoNotDisturbNotificationStorage); +public: + static const char * toastName; + static const char * offerName; + + LLDoNotDisturbNotificationStorage(); + ~LLDoNotDisturbNotificationStorage(); + + void initialize(); + bool getDirty(); + void resetDirty(); + void saveNotifications(); + void loadNotifications(); + void updateNotifications(); + void removeNotification(const char * name, const LLUUID& id); + +protected: + +private: + bool mDirty; + LLDoNotDisturbNotificationStorageTimer mTimer; + + LLNotificationChannelPtr getCommunicationChannel() const; + bool onChannelChanged(const LLSD& pPayload); + std::map<std::string, std::string> nameToPayloadParameterMap; +}; + +#endif // LL_LLDONOTDISTURBNOTIFICATIONSTORAGE_H + diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 108ec92f6d..4b0d3b361d 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -57,6 +57,8 @@ const F32 MIN_SHADOW_CASTER_RADIUS = 2.0f; static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); +extern bool gShiftFrame; + //////////////////////// // @@ -97,7 +99,6 @@ void LLDrawable::init() mPositionGroup.clear(); mExtents[0].clear(); mExtents[1].clear(); - mQuietCount = 0; mState = 0; mVObjp = NULL; @@ -108,6 +109,8 @@ void LLDrawable::init() mGeneration = -1; mBinRadius = 1.f; + mBinIndex = -1; + mSpatialBridge = NULL; } @@ -251,11 +254,17 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep) return count; } +static LLFastTimer::DeclareTimer FTM_ALLOCATE_FACE("Allocate Face", true); + LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep) { - LLMemType mt(LLMemType::MTYPE_DRAWABLE); - LLFace *face = new LLFace(this, mVObjp); + LLFace *face; + { + LLFastTimer t(FTM_ALLOCATE_FACE); + face = new LLFace(this, mVObjp); + } + if (!face) llerrs << "Allocating new Face: " << mFaces.size() << llendl; if (face) @@ -277,10 +286,12 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep) LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep) { - LLMemType mt(LLMemType::MTYPE_DRAWABLE); - LLFace *face; - face = new LLFace(this, mVObjp); + + { + LLFastTimer t(FTM_ALLOCATE_FACE); + face = new LLFace(this, mVObjp); + } face->setTEOffset(mFaces.size()); face->setTexture(texturep); @@ -403,6 +414,8 @@ void LLDrawable::makeActive() if (!isRoot() && !mParent->isActive()) { mParent->makeActive(); + //NOTE: linked set will now NEVER become static + mParent->setState(LLDrawable::ACTIVE_CHILD); } //all child objects must also be active @@ -422,40 +435,26 @@ void LLDrawable::makeActive() if (mVObjp->getPCode() == LL_PCODE_VOLUME) { - if (mVObjp->isFlexible()) - { - return; - } - } - - if (mVObjp->getPCode() == LL_PCODE_VOLUME) - { gPipeline.markRebuild(this, LLDrawable::REBUILD_VOLUME, TRUE); } updatePartition(); } - if (isRoot()) - { - mQuietCount = 0; - } - else - { - getParent()->mQuietCount = 0; + llassert(isAvatar() || isRoot() || mParent->isActive()); } -} void LLDrawable::makeStatic(BOOL warning_enabled) { - if (isState(ACTIVE)) + if (isState(ACTIVE) && + !isState(ACTIVE_CHILD) && + !mVObjp->isAttachment() && + !mVObjp->isFlexible()) { clearState(ACTIVE | ANIMATED_CHILD); - if (mParent.notNull() && mParent->isActive() && warning_enabled) - { - LL_WARNS_ONCE("Drawable") << "Drawable becomes static with active parent!" << LL_ENDL; - } + //drawable became static with active parent, not acceptable + llassert(mParent.isNull() || !mParent->isActive() || !warning_enabled); LLViewerObject::const_child_list_t& child_list = mVObjp->getChildren(); for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); @@ -483,8 +482,8 @@ void LLDrawable::makeStatic(BOOL warning_enabled) mSpatialBridge->markDead(); setSpatialBridge(NULL); } + updatePartition(); } - updatePartition(); } // Returns "distance" between target destination and resulting xfrom @@ -525,6 +524,7 @@ F32 LLDrawable::updateXform(BOOL undamped) dist_squared = dist_vec_squared(new_pos, target_pos); LLQuaternion new_rot = nlerp(lerp_amt, old_rot, target_rot); + // FIXME: This can be negative! It is be possible for some rots to 'cancel out' pos or size changes. dist_squared += (1.f - dot(new_rot, target_rot)) * 10.f; LLVector3 new_scale = lerp(old_scale, target_scale, lerp_amt); @@ -548,6 +548,15 @@ F32 LLDrawable::updateXform(BOOL undamped) } } } + else + { + // The following fixes MAINT-1742 but breaks vehicles similar to MAINT-2275 + // dist_squared = dist_vec_squared(old_pos, target_pos); + + // The following fixes MAINT-2247 but causes MAINT-2275 + //dist_squared += (1.f - dot(old_rot, target_rot)) * 10.f; + //dist_squared += dist_vec_squared(old_scale, target_scale); + } LLVector3 vec = mCurrentScale-target_scale; @@ -568,6 +577,12 @@ F32 LLDrawable::updateXform(BOOL undamped) mVObjp->dirtySpatialGroup(); } } + else if (!isRoot() && + ((dist_vec_squared(old_pos, target_pos) > 0.f) + || (1.f - dot(old_rot, target_rot)) > 0.f)) + { //fix for BUG-840, MAINT-2275, MAINT-1742, MAINT-2247 + gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); + } else if (!getVOVolume() && !isAvatar()) { movePartition(); @@ -635,18 +650,8 @@ BOOL LLDrawable::updateMove() } makeActive(); - - BOOL done; - if (isState(MOVE_UNDAMPED)) - { - done = updateMoveUndamped(); - } - else - { - done = updateMoveDamped(); - } - return done; + return isState(MOVE_UNDAMPED) ? updateMoveUndamped() : updateMoveDamped(); } BOOL LLDrawable::updateMoveUndamped() @@ -714,6 +719,11 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) return; } + if (gShiftFrame) + { + return; + } + //switch LOD with the spatial group to avoid artifacts //LLSpatialGroup* sg = getSpatialGroup(); @@ -768,8 +778,6 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) void LLDrawable::updateTexture() { - LLMemType mt(LLMemType::MTYPE_DRAWABLE); - if (isDead()) { llwarns << "Dead drawable updating texture!" << llendl; @@ -811,14 +819,19 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector) mXform.setPosition(mVObjp->getPositionAgent()); } - mXform.setRotation(mVObjp->getRotation()); - mXform.setScale(1,1,1); mXform.updateMatrix(); if (isStatic()) { LLVOVolume* volume = getVOVolume(); - if (!volume) + + bool rebuild = (!volume && + getRenderType() != LLPipeline::RENDER_TYPE_TREE && + getRenderType() != LLPipeline::RENDER_TYPE_TERRAIN && + getRenderType() != LLPipeline::RENDER_TYPE_SKY && + getRenderType() != LLPipeline::RENDER_TYPE_GROUND); + + if (rebuild) { gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL, TRUE); } @@ -832,7 +845,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector) facep->mExtents[0].add(shift_vector); facep->mExtents[1].add(shift_vector); - if (!volume && facep->hasGeometry()) + if (rebuild && facep->hasGeometry()) { facep->clearVertexBuffer(); } @@ -943,8 +956,20 @@ void LLDrawable::updateUVMinMax() { } +LLSpatialGroup* LLDrawable::getSpatialGroup() const +{ + llassert((mSpatialGroupp == NULL) ? getBinIndex() == -1 : getBinIndex() != -1); + return mSpatialGroupp; +} + void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp) { + //precondition: mSpatialGroupp MUST be null or DEAD or mSpatialGroupp MUST NOT contain this + llassert(!mSpatialGroupp || mSpatialGroupp->isDead() || !mSpatialGroupp->hasElement(this)); + + //precondition: groupp MUST be null or groupp MUST contain this + llassert(!groupp || groupp->hasElement(this)); + /*if (mSpatialGroupp && (groupp != mSpatialGroupp)) { mSpatialGroupp->setState(LLSpatialGroup::GEOM_DIRTY); @@ -964,6 +989,11 @@ void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp) } } + //postcondition: if next group is NULL, previous group must be dead OR NULL OR binIndex must be -1 + //postcondition: if next group is NOT NULL, binIndex must not be -1 + llassert(groupp == NULL ? (mSpatialGroupp == NULL || mSpatialGroupp->isDead()) || getBinIndex() == -1 : + getBinIndex() != -1); + mSpatialGroupp = groupp; } @@ -1087,6 +1117,8 @@ LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 dat mDrawable = root; root->setSpatialBridge(this); + mBinIndex = -1; + mRenderType = mDrawable->mRenderType; mDrawableType = mDrawable->mRenderType; @@ -1391,6 +1423,11 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update) return; } + if (gShiftFrame) + { + return; + } + if (mDrawable->getVObj()) { if (mDrawable->getVObj()->isAttachment()) @@ -1468,6 +1505,10 @@ void LLSpatialBridge::cleanupReferences() LLDrawable::cleanupReferences(); if (mDrawable) { + /* + + DON'T DO THIS -- this should happen through octree destruction + mDrawable->setSpatialGroup(NULL); if (mDrawable->getVObj()) { @@ -1482,7 +1523,7 @@ void LLSpatialBridge::cleanupReferences() drawable->setSpatialGroup(NULL); } } - } + }*/ LLDrawable* drawablep = mDrawable; mDrawable = NULL; diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index e2064b79f8..4608d16fec 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -38,7 +38,6 @@ #include "llvector4a.h" #include "llquaternion.h" #include "xform.h" -#include "llmemtype.h" #include "lldarray.h" #include "llviewerobject.h" #include "llrect.h" @@ -59,6 +58,7 @@ class LLViewerTexture; const U32 SILHOUETTE_HIGHLIGHT = 0; // All data for new renderer goes into this class. +LL_ALIGN_PREFIX(16) class LLDrawable : public LLRefCount { public: @@ -75,8 +75,17 @@ public: static void initClass(); + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + LLDrawable() { init(); } - MEM_TYPE_NEW(LLMemType::MTYPE_DRAWABLE); void markDead(); // Mark this drawable as dead BOOL isDead() const { return isState(DEAD); } @@ -109,6 +118,9 @@ public: F32 getIntensity() const { return llmin(mXform.getScale().mV[0], 4.f); } S32 getLOD() const { return mVObjp ? mVObjp->getLOD() : 1; } F32 getBinRadius() const { return mBinRadius; } + S32 getBinIndex() const { return mBinIndex; } + void setBinIndex(S32 index) const { mBinIndex = index; } + void getMinMax(LLVector3& min,LLVector3& max) const { mXform.getMinMax(min,max); } LLXformMatrix* getXform() { return &mXform; } @@ -194,7 +206,7 @@ public: S32 findReferences(LLDrawable *drawablep); // Not const because of @#$! iterators... void setSpatialGroup(LLSpatialGroup *groupp); - LLSpatialGroup *getSpatialGroup() const { return mSpatialGroupp; } + LLSpatialGroup *getSpatialGroup() const; LLSpatialPartition* getSpatialPartition(); // Statics @@ -278,11 +290,12 @@ public: RIGGED = 0x08000000, PARTITION_MOVE = 0x10000000, ANIMATED_CHILD = 0x20000000, + ACTIVE_CHILD = 0x40000000, } EDrawableFlags; private: //aligned members - LLVector4a mExtents[2]; - LLVector4a mPositionGroup; + LL_ALIGN_16(LLVector4a mExtents[2]); + LL_ALIGN_16(LLVector4a mPositionGroup); public: LLXformMatrix mXform; @@ -291,8 +304,6 @@ public: LLPointer<LLDrawable> mParent; F32 mDistanceWRTCamera; - - S32 mQuietCount; static S32 getCurrentFrame() { return sCurVisible; } static S32 getMinVisFrameRange(); @@ -315,6 +326,7 @@ private: mutable U32 mVisible; F32 mRadius; F32 mBinRadius; + mutable S32 mBinIndex; S32 mGeneration; LLVector3 mCurrentScale; @@ -323,7 +335,7 @@ private: static U32 sNumZombieDrawables; static LLDynamicArrayPtr<LLPointer<LLDrawable> > sDeadList; -}; +} LL_ALIGN_POSTFIX(16); inline LLFace* LLDrawable::getFace(const S32 i) const diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 81f4e3d48f..94dd927d26 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -254,48 +254,6 @@ void LLFacePool::dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures { } -// static -S32 LLFacePool::drawLoop(face_array_t& face_list) -{ - S32 res = 0; - if (!face_list.empty()) - { - for (std::vector<LLFace*>::iterator iter = face_list.begin(); - iter != face_list.end(); iter++) - { - LLFace *facep = *iter; - res += facep->renderIndexed(); - } - } - return res; -} - -// static -S32 LLFacePool::drawLoopSetTex(face_array_t& face_list, S32 stage) -{ - S32 res = 0; - if (!face_list.empty()) - { - for (std::vector<LLFace*>::iterator iter = face_list.begin(); - iter != face_list.end(); iter++) - { - LLFace *facep = *iter; - gGL.getTexUnit(stage)->bind(facep->getTexture(), TRUE) ; - gGL.getTexUnit(0)->activate(); - res += facep->renderIndexed(); - } - } - return res; -} - -void LLFacePool::drawLoop() -{ - if (!mDrawFace.empty()) - { - drawLoop(mDrawFace); - } -} - void LLFacePool::enqueue(LLFace* facep) { mDrawFace.push_back(facep); @@ -443,7 +401,7 @@ void LLRenderPass::renderTexture(U32 type, U32 mask) void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture, BOOL batch_textures) { - for (LLCullResult::drawinfo_list_t::iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i) + for (LLCullResult::drawinfo_iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i) { LLDrawInfo* pparams = *i; if (pparams) @@ -461,6 +419,7 @@ void LLRenderPass::applyModelMatrix(LLDrawInfo& params) gGL.loadMatrix(gGLModelView); if (params.mModelMatrix) { + llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW); gGL.multMatrix((GLfloat*) params.mModelMatrix->mMatrix); } gPipeline.mMatrixOpCount++; diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h index 977acf7aec..ab9bb9e611 100644 --- a/indra/newview/lldrawpool.h +++ b/indra/newview/lldrawpool.h @@ -190,10 +190,6 @@ public: void buildEdges(); - static S32 drawLoop(face_array_t& face_list); - static S32 drawLoopSetTex(face_array_t& face_list, S32 stage); - void drawLoop(); - void addFaceReference(LLFace *facep); void removeFaceReference(LLFace *facep); diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 5f2a982ed3..313b310e1e 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -348,7 +348,7 @@ void LLDrawPoolAlpha::render(S32 pass) void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask) { - for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i) + for (LLCullResult::sg_iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i) { LLSpatialGroup* group = *i; if (group->mSpatialPartition->mRenderByGroup && @@ -385,7 +385,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask) BOOL use_shaders = gPipeline.canUseVertexShaders(); - for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i) + for (LLCullResult::sg_iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i) { LLSpatialGroup* group = *i; llassert(group); diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index ace3a20bbb..294cecc703 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1036,9 +1036,13 @@ void LLDrawPoolAvatar::endDeferredSkinned() gGL.getTexUnit(0)->activate(); } +static LLFastTimer::DeclareTimer FTM_RENDER_AVATARS("renderAvatars"); + void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) { + LLFastTimer t(FTM_RENDER_AVATARS); + if (pass == -1) { for (S32 i = 1; i < getNumPasses(); i++) @@ -1195,15 +1199,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) if (pass >= 7 && pass < 9) { - LLGLEnable blend(GL_BLEND); - - gGL.setColorMask(true, true); - gGL.blendFunc(LLRender::BF_SOURCE_ALPHA, - LLRender::BF_ONE_MINUS_SOURCE_ALPHA, - LLRender::BF_ZERO, - LLRender::BF_ONE_MINUS_SOURCE_ALPHA); - - if (pass == 7) { renderRiggedAlpha(avatarp); @@ -1219,20 +1214,8 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) if (pass == 9) { - LLGLEnable blend(GL_BLEND); - LLGLDisable test(GL_ALPHA_TEST); - gGL.flush(); - - LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL); - glPolygonOffset(-1.0f, -1.0f); - gGL.setSceneBlendType(LLRender::BT_ADD); - - LLGLDepthTest depth(GL_TRUE, GL_FALSE); - gGL.setColorMask(false, true); - renderRiggedGlow(avatarp); - gGL.setColorMask(true, false); - gGL.setSceneBlendType(LLRender::BT_ALPHA); + return; } @@ -1289,6 +1272,9 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* face->setGeomIndex(0); face->setIndicesIndex(0); + //rigged faces do not batch textures + face->setTextureIndex(255); + if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable()) { //make a new buffer if (sShaderLevel > 0) @@ -1430,7 +1416,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) { - if (avatar->isSelf() && !gAgent.needsRenderAvatar() || !gMeshRepo.meshRezEnabled()) + if (avatar->isSelf() && !gAgent.needsRenderAvatar()) { return; } @@ -1559,8 +1545,12 @@ void LLDrawPoolAvatar::renderDeferredRiggedBump(LLVOAvatar* avatar) renderRigged(avatar, RIGGED_DEFERRED_BUMP); } +static LLFastTimer::DeclareTimer FTM_RIGGED_VBO("Rigged VBO"); + void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar) { + LLFastTimer t(FTM_RIGGED_VBO); + //update rigged vertex buffers for (U32 type = 0; type < NUM_RIGGED_PASSES; ++type) { @@ -1632,17 +1622,58 @@ void LLDrawPoolAvatar::renderRiggedFullbrightShiny(LLVOAvatar* avatar) void LLDrawPoolAvatar::renderRiggedAlpha(LLVOAvatar* avatar) { - renderRigged(avatar, RIGGED_ALPHA); + if (!mRiggedFace[RIGGED_ALPHA].empty()) + { + LLGLEnable blend(GL_BLEND); + + gGL.setColorMask(true, true); + gGL.blendFunc(LLRender::BF_SOURCE_ALPHA, + LLRender::BF_ONE_MINUS_SOURCE_ALPHA, + LLRender::BF_ZERO, + LLRender::BF_ONE_MINUS_SOURCE_ALPHA); + + renderRigged(avatar, RIGGED_ALPHA); + gGL.setColorMask(true, false); + } } void LLDrawPoolAvatar::renderRiggedFullbrightAlpha(LLVOAvatar* avatar) { - renderRigged(avatar, RIGGED_FULLBRIGHT_ALPHA); + if (!mRiggedFace[RIGGED_FULLBRIGHT_ALPHA].empty()) + { + LLGLEnable blend(GL_BLEND); + + gGL.setColorMask(true, true); + gGL.blendFunc(LLRender::BF_SOURCE_ALPHA, + LLRender::BF_ONE_MINUS_SOURCE_ALPHA, + LLRender::BF_ZERO, + LLRender::BF_ONE_MINUS_SOURCE_ALPHA); + + renderRigged(avatar, RIGGED_FULLBRIGHT_ALPHA); + gGL.setColorMask(true, false); + } } void LLDrawPoolAvatar::renderRiggedGlow(LLVOAvatar* avatar) { - renderRigged(avatar, RIGGED_GLOW, true); + if (!mRiggedFace[RIGGED_GLOW].empty()) + { + LLGLEnable blend(GL_BLEND); + LLGLDisable test(GL_ALPHA_TEST); + gGL.flush(); + + LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL); + glPolygonOffset(-1.0f, -1.0f); + gGL.setSceneBlendType(LLRender::BT_ADD); + + LLGLDepthTest depth(GL_TRUE, GL_FALSE); + gGL.setColorMask(false, true); + + renderRigged(avatar, RIGGED_GLOW, true); + + gGL.setColorMask(true, false); + gGL.setSceneBlendType(LLRender::BT_ALPHA); + } } diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 6f71e6ebc8..1b0b11298c 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -847,12 +847,12 @@ void LLDrawPoolBump::renderDeferred(S32 pass) LLFastTimer ftm(FTM_RENDER_BUMP); U32 type = LLRenderPass::PASS_BUMP; - LLCullResult::drawinfo_list_t::iterator begin = gPipeline.beginRenderMap(type); - LLCullResult::drawinfo_list_t::iterator end = gPipeline.endRenderMap(type); + LLCullResult::drawinfo_iterator begin = gPipeline.beginRenderMap(type); + LLCullResult::drawinfo_iterator end = gPipeline.endRenderMap(type); U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_BINORMAL | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_COLOR; - for (LLCullResult::drawinfo_list_t::iterator i = begin; i != end; ++i) + for (LLCullResult::drawinfo_iterator i = begin; i != end; ++i) { LLDrawInfo& params = **i; @@ -1192,7 +1192,7 @@ static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_MIN_MAX("Min/Max"); static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance"); static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RESCALE("Rescale"); static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal"); -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Create"); +static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Bump Source Create"); // static void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code ) @@ -1448,10 +1448,10 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI void LLDrawPoolBump::renderBump(U32 type, U32 mask) { - LLCullResult::drawinfo_list_t::iterator begin = gPipeline.beginRenderMap(type); - LLCullResult::drawinfo_list_t::iterator end = gPipeline.endRenderMap(type); + LLCullResult::drawinfo_iterator begin = gPipeline.beginRenderMap(type); + LLCullResult::drawinfo_iterator end = gPipeline.endRenderMap(type); - for (LLCullResult::drawinfo_list_t::iterator i = begin; i != end; ++i) + for (LLCullResult::drawinfo_iterator i = begin; i != end; ++i) { LLDrawInfo& params = **i; diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index b95d8296fa..9bc32fddbd 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -294,6 +294,35 @@ void LLDrawPoolTerrain::renderShadow(S32 pass) //glCullFace(GL_BACK); } + +void LLDrawPoolTerrain::drawLoop() +{ + if (!mDrawFace.empty()) + { + for (std::vector<LLFace*>::iterator iter = mDrawFace.begin(); + iter != mDrawFace.end(); iter++) + { + LLFace *facep = *iter; + + LLMatrix4* model_matrix = &(facep->getDrawable()->getRegion()->mRenderMatrix); + + if (model_matrix != gGLLastMatrix) + { + llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW); + gGLLastMatrix = model_matrix; + gGL.loadMatrix(gGLModelView); + if (model_matrix) + { + gGL.multMatrix((GLfloat*) model_matrix->mMatrix); + } + gPipeline.mMatrixOpCount++; + } + + facep->renderIndexed(); + } + } +} + void LLDrawPoolTerrain::renderFullShader() { // Hack! Get the region that this draw pool is rendering from! @@ -566,7 +595,8 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadIdentity(); gGL.translatef(-1.f, 0.f, 0.f); - + gGL.matrixMode(LLRender::MM_MODELVIEW); + // Set alpha texture and do lighting modulation gGL.getTexUnit(3)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_PREV_COLOR, LLTexUnit::TBS_VERT_COLOR); gGL.getTexUnit(3)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA); @@ -714,6 +744,7 @@ void LLDrawPoolTerrain::renderFull2TU() gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadIdentity(); gGL.translatef(-1.f, 0.f, 0.f); + gGL.matrixMode(LLRender::MM_MODELVIEW); // Care about alpha only gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); @@ -753,6 +784,7 @@ void LLDrawPoolTerrain::renderFull2TU() gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadIdentity(); gGL.translatef(-2.f, 0.f, 0.f); + gGL.matrixMode(LLRender::MM_MODELVIEW); // Care about alpha only gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); diff --git a/indra/newview/lldrawpoolterrain.h b/indra/newview/lldrawpoolterrain.h index 283ed87f1a..2163d087e1 100644 --- a/indra/newview/lldrawpoolterrain.h +++ b/indra/newview/lldrawpoolterrain.h @@ -83,6 +83,7 @@ protected: void renderFull2TU(); void renderFull4TU(); void renderFullShader(); + void drawLoop(); }; #endif // LL_LLDRAWPOOLSIMPLE_H diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index 3165a3516c..fedbd782dc 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -37,6 +37,7 @@ #include "llviewershadermgr.h" #include "llrender.h" #include "llviewercontrol.h" +#include "llviewerregion.h" S32 LLDrawPoolTree::sDiffTex = 0; static LLGLSLShader* shader = NULL; @@ -104,8 +105,23 @@ void LLDrawPoolTree::render(S32 pass) { LLFace *face = *iter; LLVertexBuffer* buff = face->getVertexBuffer(); + if(buff) { + LLMatrix4* model_matrix = &(face->getDrawable()->getRegion()->mRenderMatrix); + + if (model_matrix != gGLLastMatrix) + { + gGLLastMatrix = model_matrix; + gGL.loadMatrix(gGLModelView); + if (model_matrix) + { + llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW); + gGL.multMatrix((GLfloat*) model_matrix->mMatrix); + } + gPipeline.mMatrixOpCount++; + } + buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK); buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0); gPipeline.addTrianglesDrawn(buff->getNumIndices()); diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index caf15fe1cb..b5faff7968 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -192,14 +192,18 @@ void LLDrawPoolWLSky::renderStars(void) const bool error; LLColor4 star_alpha(LLColor4::black); star_alpha.mV[3] = LLWLParamManager::getInstance()->mCurParams.getFloat("star_brightness", error) / 2.f; - llassert_always(!error); + + // If start_brightness is not set, exit + if( error ) + { + llwarns << "star_brightness missing in mCurParams" << llendl; + return; + } gGL.getTexUnit(0)->bind(gSky.mVOSkyp->getBloomTex()); gGL.pushMatrix(); gGL.rotatef(gFrameTimeSeconds*0.01f, 0.f, 0.f, 1.f); - // gl_FragColor.rgb = gl_Color.rgb; - // gl_FragColor.a = gl_Color.a * star_alpha.a; if (LLGLSLShader::sNoFixedFunction) { gCustomAlphaProgram.bind(); diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp index 64eb11fc9b..885cae1737 100644 --- a/indra/newview/lldriverparam.cpp +++ b/indra/newview/lldriverparam.cpp @@ -155,6 +155,7 @@ LLDriverParam::LLDriverParam(LLVOAvatar *avatarp) : mAvatarp(avatarp), mWearablep(NULL) { + mDefaultVec.clear(); } LLDriverParam::LLDriverParam(LLWearable *wearablep) : @@ -162,6 +163,7 @@ LLDriverParam::LLDriverParam(LLWearable *wearablep) : mAvatarp(NULL), mWearablep(wearablep) { + mDefaultVec.clear(); } LLDriverParam::~LLDriverParam() @@ -341,18 +343,19 @@ F32 LLDriverParam::getTotalDistortion() return sum; } -const LLVector3 &LLDriverParam::getAvgDistortion() +const LLVector4a &LLDriverParam::getAvgDistortion() { // It's not actually correct to take the average of averages, but it good enough here. - LLVector3 sum; + LLVector4a sum; + sum.clear(); S32 count = 0; for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ ) { LLDrivenEntry* driven = &(*iter); - sum += driven->mParam->getAvgDistortion(); + sum.add(driven->mParam->getAvgDistortion()); count++; } - sum /= (F32)count; + sum.mul( 1.f/(F32)count); mDefaultVec = sum; return mDefaultVec; @@ -375,21 +378,22 @@ F32 LLDriverParam::getMaxDistortion() } -LLVector3 LLDriverParam::getVertexDistortion(S32 index, LLPolyMesh *poly_mesh) +LLVector4a LLDriverParam::getVertexDistortion(S32 index, LLPolyMesh *poly_mesh) { - LLVector3 sum; + LLVector4a sum; + sum.clear(); for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ ) { LLDrivenEntry* driven = &(*iter); - sum += driven->mParam->getVertexDistortion( index, poly_mesh ); + sum.add(driven->mParam->getVertexDistortion( index, poly_mesh )); } return sum; } -const LLVector3* LLDriverParam::getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) +const LLVector4a* LLDriverParam::getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) { mCurrentDistortionParam = NULL; - const LLVector3* v = NULL; + const LLVector4a* v = NULL; for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ ) { LLDrivenEntry* driven = &(*iter); @@ -404,7 +408,7 @@ const LLVector3* LLDriverParam::getFirstDistortion(U32 *index, LLPolyMesh **poly return v; }; -const LLVector3* LLDriverParam::getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) +const LLVector4a* LLDriverParam::getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) { llassert( mCurrentDistortionParam ); if( !mCurrentDistortionParam ) @@ -432,7 +436,7 @@ const LLVector3* LLDriverParam::getNextDistortion(U32 *index, LLPolyMesh **poly_ } // We're already in the middle of a param's distortions, so get the next one. - const LLVector3* v = driven->mParam->getNextDistortion( index, poly_mesh ); + const LLVector4a* v = driven->mParam->getNextDistortion( index, poly_mesh ); if( (!v) && (iter != mDriven.end()) ) { // This param is finished, so start the next param. It might not have any diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h index fb1b44458c..216cf003e1 100644 --- a/indra/newview/lldriverparam.h +++ b/indra/newview/lldriverparam.h @@ -75,6 +75,7 @@ protected: //----------------------------------------------------------------------------- +LL_ALIGN_PREFIX(16) class LLDriverParam : public LLViewerVisualParam { friend class LLPhysicsMotion; // physics motion needs to access driven params directly. @@ -83,6 +84,16 @@ public: LLDriverParam(LLWearable *wearablep); ~LLDriverParam(); + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + // Special: These functions are overridden by child classes LLDriverParamInfo* getInfo() const { return (LLDriverParamInfo*)mInfo; } // This sets mInfo and calls initialization functions @@ -105,24 +116,24 @@ public: // LLViewerVisualParam Virtual functions /*virtual*/ F32 getTotalDistortion(); - /*virtual*/ const LLVector3& getAvgDistortion(); + /*virtual*/ const LLVector4a& getAvgDistortion(); /*virtual*/ F32 getMaxDistortion(); - /*virtual*/ LLVector3 getVertexDistortion(S32 index, LLPolyMesh *poly_mesh); - /*virtual*/ const LLVector3* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh); - /*virtual*/ const LLVector3* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh); + /*virtual*/ LLVector4a getVertexDistortion(S32 index, LLPolyMesh *poly_mesh); + /*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh); + /*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh); protected: F32 getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight); void setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake); - LLVector3 mDefaultVec; // temp holder + LL_ALIGN_16(LLVector4a mDefaultVec); // temp holder typedef std::vector<LLDrivenEntry> entry_list_t; entry_list_t mDriven; LLViewerVisualParam* mCurrentDistortionParam; // Backlink only; don't make this an LLPointer. LLVOAvatar* mAvatarp; LLWearable* mWearablep; -}; +} LL_ALIGN_POSTFIX(16); #endif // LL_LLDRIVERPARAM_H diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index bf8338e5f2..fa42b157a7 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -129,7 +129,7 @@ void LLViewerDynamicTexture::preRender(BOOL clear_depth) llassert(mFullHeight <= 512); llassert(mFullWidth <= 512); - if (gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete()) + if (gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete() && !gGLManager.mIsATI) { //using offscreen render target, just use the bottom left corner mOrigin.set(0, 0); } @@ -216,14 +216,12 @@ BOOL LLViewerDynamicTexture::updateAllInstances() return TRUE; } -#if 0 //THIS CAUSES MAINT-1092 - bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete(); + bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete() && !gGLManager.mIsATI; if (use_fbo) { gPipeline.mWaterDis.bindTarget(); } -#endif LLGLSLShader::bindNoShader(); LLVertexBuffer::unbind(); @@ -258,12 +256,10 @@ BOOL LLViewerDynamicTexture::updateAllInstances() } } -#if 0 if (use_fbo) { gPipeline.mWaterDis.flush(); } -#endif return ret; } diff --git a/indra/newview/lldynamictexture.h b/indra/newview/lldynamictexture.h index e18090545d..c51e7d1e1a 100644 --- a/indra/newview/lldynamictexture.h +++ b/indra/newview/lldynamictexture.h @@ -36,6 +36,16 @@ class LLViewerDynamicTexture : public LLViewerTexture { public: + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + enum { LL_VIEWER_DYNAMIC_TEXTURE = LLViewerTexture::DYNAMIC_TEXTURE, @@ -85,7 +95,7 @@ protected: protected: BOOL mClamp; LLCoordGL mOrigin; - LLCamera mCamera; + LL_ALIGN_16(LLCamera mCamera); typedef std::set<LLViewerDynamicTexture*> instance_list_t; static instance_list_t sInstances[ LLViewerDynamicTexture::ORDER_COUNT ]; diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 4f4d9a40b4..2c786b7f8b 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -86,7 +86,7 @@ namespace class LLEventPollEventTimer : public LLEventTimer { - typedef boost::intrusive_ptr<LLEventPollResponder> EventPollResponderPtr; + typedef LLPointer<LLEventPollResponder> EventPollResponderPtr; public: LLEventPollEventTimer(F32 period, EventPollResponderPtr responder) diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 935dcb74b0..a50184460b 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -150,7 +150,7 @@ void LLExpandableTextBox::LLTextBoxEx::showExpandText() std::pair<S32, S32> visible_lines = getVisibleLines(true); S32 last_line = visible_lines.second - 1; - LLStyle::Params expander_style(getDefaultStyleParams()); + LLStyle::Params expander_style(getStyleParams()); expander_style.font.style = "UNDERLINE"; expander_style.color = LLUIColorTable::instance().getColor("HTMLLinkColor"); LLExpanderSegment* expanderp = new LLExpanderSegment(new LLStyle(expander_style), getLineStart(last_line), getLength() + 1, mExpanderLabel, *this); @@ -166,7 +166,7 @@ void LLExpandableTextBox::LLTextBoxEx::hideExpandText() if (mExpanderVisible) { // this will overwrite the expander segment and all text styling with a single style - LLStyleConstSP sp(new LLStyle(getDefaultStyleParams())); + LLStyleConstSP sp(new LLStyle(getStyleParams())); LLNormalTextSegment* segmentp = new LLNormalTextSegment(sp, 0, getLength() + 1, *this); insertSegment(segmentp); diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 373b1930f5..28e4b32793 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -163,15 +163,10 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) mGeomCount = 0; mGeomIndex = 0; mIndicesCount = 0; - if (drawablep->getRenderType() == LLPipeline::RENDER_TYPE_PARTICLES || - drawablep->getRenderType() == LLPipeline::RENDER_TYPE_HUD_PARTICLES) - { //indicate to LLParticlePartition that this particle is uninitialized - mIndicesIndex = 0xFFFFFFFF; - } - else - { - mIndicesIndex = 0; - } + + //special value to indicate uninitialized position + mIndicesIndex = 0xFFFFFFFF; + mIndexInTex = 0; mTexture = NULL; mTEOffset = -1; @@ -207,13 +202,10 @@ void LLFace::destroy() mTexture->removeFace(this) ; } - if (mDrawablep.notNull() && - (mDrawablep->getRenderType() == LLPipeline::RENDER_TYPE_PARTICLES || - mDrawablep->getRenderType() == LLPipeline::RENDER_TYPE_HUD_PARTICLES) && - mIndicesIndex != 0xFFFFFFFF) + if (isState(LLFace::PARTICLE)) { LLVOPartGroup::freeVBSlot(getGeomIndex()/4); - mIndicesIndex = 0xFFFFFFFF; + clearState(LLFace::PARTICLE); } if (mDrawPoolp) @@ -271,8 +263,6 @@ void LLFace::setPool(LLFacePool* pool) void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep) { - LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - if (!new_pool) { llerrs << "Setting pool to null!" << llendl; @@ -450,8 +440,6 @@ U16 LLFace::getGeometryAvatar( LLStrider<F32> &vertex_weights, LLStrider<LLVector4> &clothing_weights) { - LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - if (mVertexBuffer.notNull()) { mVertexBuffer->getVertexStrider (vertices, mGeomIndex, mGeomCount); @@ -467,8 +455,6 @@ U16 LLFace::getGeometryAvatar( U16 LLFace::getGeometry(LLStrider<LLVector3> &vertices, LLStrider<LLVector3> &normals, LLStrider<LLVector2> &tex_coords, LLStrider<U16> &indicesp) { - LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - if (mVertexBuffer.notNull()) { mVertexBuffer->getVertexStrider(vertices, mGeomIndex, mGeomCount); @@ -778,8 +764,6 @@ bool less_than_max_mag(const LLVector4a& vec) BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, const LLMatrix4& mat_vert_in, const LLMatrix3& mat_normal_in, BOOL global_volume) { - LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - //get bounding box if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED)) { @@ -1070,7 +1054,11 @@ bool LLFace::canRenderAsMask() } const LLTextureEntry* te = getTextureEntry(); - + if( !te || !getViewerObject() || !getTexture() ) + { + return false; + } + if ((te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha (te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask getTexture()->getIsAlphaMask()) // texture actually qualifies for masking (lazily recalculated but expensive) @@ -1207,19 +1195,25 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { if (num_indices + (S32) mIndicesIndex > mVertexBuffer->getNumIndices()) { - llwarns << "Index buffer overflow!" << llendl; - llwarns << "Indices Count: " << mIndicesCount - << " VF Num Indices: " << num_indices - << " Indices Index: " << mIndicesIndex - << " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl; - llwarns << " Face Index: " << f - << " Pool Type: " << mPoolType << llendl; + if (gDebugGL) + { + llwarns << "Index buffer overflow!" << llendl; + llwarns << "Indices Count: " << mIndicesCount + << " VF Num Indices: " << num_indices + << " Indices Index: " << mIndicesIndex + << " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl; + llwarns << " Face Index: " << f + << " Pool Type: " << mPoolType << llendl; + } return FALSE; } if (num_vertices + mGeomIndex > mVertexBuffer->getNumVerts()) { - llwarns << "Vertex buffer overflow!" << llendl; + if (gDebugGL) + { + llwarns << "Vertex buffer overflow!" << llendl; + } return FALSE; } } @@ -1651,7 +1645,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (!do_xform) { LLFastTimer t(FTM_FACE_TEX_QUICK_NO_XFORM); - LLVector4a::memcpyNonAliased16((F32*) tex_coords.get(), (F32*) vf.mTexCoords, num_vertices*2*sizeof(F32)); + S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF; + LLVector4a::memcpyNonAliased16((F32*) tex_coords.get(), (F32*) vf.mTexCoords, tc_size); } else { @@ -2169,6 +2164,12 @@ BOOL LLFace::hasMedia() const const F32 LEAST_IMPORTANCE = 0.05f ; const F32 LEAST_IMPORTANCE_FOR_LARGE_IMAGE = 0.3f ; +void LLFace::resetVirtualSize() +{ + setVirtualSize(0.f); + mImportanceToCamera = 0.f; +} + F32 LLFace::getTextureVirtualSize() { F32 radius; @@ -2234,8 +2235,17 @@ BOOL LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) LLVector4a t; t.load3(camera->getOrigin().mV); lookAt.setSub(center, t); + F32 dist = lookAt.getLength3().getF32(); - dist = llmax(dist-size.getLength3().getF32(), 0.f); + dist = llmax(dist-size.getLength3().getF32(), 0.001f); + //ramp down distance for nearby objects + if (dist < 16.f) + { + dist /= 16.f; + dist *= dist; + dist *= 16.f; + } + lookAt.normalize3fast() ; //get area of circle around node diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 76ea5c853a..de4d03351c 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -59,6 +59,17 @@ class LLFace { public: + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + + LLFace(const LLFace& rhs) { *this = rhs; @@ -79,6 +90,7 @@ public: USE_FACE_COLOR = 0x0010, TEXTURE_ANIM = 0x0020, RIGGED = 0x0040, + PARTICLE = 0x0080, }; static void initClass(); @@ -206,6 +218,7 @@ public: F32 getTextureVirtualSize() ; F32 getImportanceToCamera()const {return mImportanceToCamera ;} + void resetVirtualSize(); void setHasMedia(bool has_media) { mHasMedia = has_media ;} BOOL hasMedia() const ; diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 9664aa7dbe..4dfb93f1bc 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -95,7 +95,6 @@ LLFastTimerView::LLFastTimerView(const LLSD& key) mHoverBarIndex = -1; FTV_NUM_TIMERS = LLFastTimer::NamedTimer::instanceCount(); mPrintStats = -1; - mAverageCyclesPerTimer = 0; } void LLFastTimerView::onPause() @@ -161,7 +160,7 @@ LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y) BOOL LLFastTimerView::handleDoubleClick(S32 x, S32 y, MASK mask) { - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != end_timer_tree(); ++it) { @@ -258,7 +257,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) } S32 i = 0; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != end_timer_tree(); ++it, ++i) { @@ -379,12 +378,6 @@ void LLFastTimerView::draw() S32 xleft = margin; S32 ytop = margin; - mAverageCyclesPerTimer = LLFastTimer::sTimerCalls == 0 - ? 0 - : llround(lerp((F32)mAverageCyclesPerTimer, (F32)(LLFastTimer::sTimerCycles / (U64)LLFastTimer::sTimerCalls), 0.1f)); - LLFastTimer::sTimerCycles = 0; - LLFastTimer::sTimerCalls = 0; - // Draw some help { @@ -392,10 +385,6 @@ void LLFastTimerView::draw() y = height - ytop; texth = (S32)LLFontGL::getFontMonospace()->getLineHeight(); -#if TIME_FAST_TIMERS - tdesc = llformat("Cycles per timer call: %d", mAverageCyclesPerTimer); - LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); -#else char modedesc[][32] = { "2 x Average ", "Max ", @@ -419,7 +408,6 @@ void LLFastTimerView::draw() LLFontGL::getFontMonospace()->renderUTF8(std::string("[Right-Click log selected] [ALT-Click toggle counts] [ALT-SHIFT-Click sub hidden]"), 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); -#endif y -= (texth + 2); } @@ -431,11 +419,11 @@ void LLFastTimerView::draw() y -= (texth + 2); - sTimerColors[&LLFastTimer::NamedTimer::getRootNamedTimer()] = LLColor4::grey; + sTimerColors[&getFrameTimer()] = LLColor4::grey; F32 hue = 0.f; - for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for (timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != timer_tree_iterator_t(); ++it) { @@ -460,7 +448,7 @@ void LLFastTimerView::draw() S32 cur_line = 0; ft_display_idx.clear(); std::map<LLFastTimer::NamedTimer*, S32> display_line; - for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for (timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != timer_tree_iterator_t(); ++it) { @@ -526,6 +514,7 @@ void LLFastTimerView::draw() while(!is_child_of_hover_item && next_parent) { is_child_of_hover_item = (mHoverID == next_parent); + if (next_parent->getParent() == next_parent) break; next_parent = next_parent->getParent(); } @@ -570,7 +559,7 @@ void LLFastTimerView::draw() U64 totalticks; if (!LLFastTimer::sPauseHistory) { - U64 ticks = LLFastTimer::NamedTimer::getRootNamedTimer().getHistoricalCount(mScrollIndex); + U64 ticks = getFrameTimer().getHistoricalCount(mScrollIndex); if (LLFastTimer::getCurFrameIndex() >= 10) { @@ -610,7 +599,7 @@ void LLFastTimerView::draw() totalticks = 0; for (S32 j=0; j<histmax; j++) { - U64 ticks = LLFastTimer::NamedTimer::getRootNamedTimer().getHistoricalCount(j); + U64 ticks = getFrameTimer().getHistoricalCount(j); if (ticks > totalticks) totalticks = ticks; @@ -716,7 +705,7 @@ void LLFastTimerView::draw() LLFastTimer::NamedTimer* prev_id = NULL; S32 i = 0; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != end_timer_tree(); ++it, ++i) { @@ -793,6 +782,7 @@ void LLFastTimerView::draw() while(!is_child_of_hover_item && next_parent) { is_child_of_hover_item = (mHoverID == next_parent); + if (next_parent->getParent() == next_parent) break; next_parent = next_parent->getParent(); } @@ -879,7 +869,7 @@ void LLFastTimerView::draw() } U64 cur_max = 0; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != end_timer_tree(); ++it) { @@ -980,7 +970,7 @@ void LLFastTimerView::draw() { std::string legend_stat; bool first = true; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != end_timer_tree(); ++it) { @@ -1002,7 +992,7 @@ void LLFastTimerView::draw() std::string timer_stat; first = true; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != end_timer_tree(); ++it) { @@ -1563,3 +1553,9 @@ void LLFastTimerView::onClickCloseBtn() setVisible(false); } +LLFastTimer::NamedTimer& LLFastTimerView::getFrameTimer() +{ + return FTM_FRAME.getNamedTimer(); +} + + diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index a349e7ad4c..5766cfa0b0 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -46,6 +46,7 @@ private: static LLSD analyzePerformanceLogDefault(std::istream& is) ; static void exportCharts(const std::string& base, const std::string& target); void onPause(); + LLFastTimer::NamedTimer& getFrameTimer(); public: @@ -90,7 +91,6 @@ private: S32 mHoverBarIndex; LLFrameTimer mHighlightTimer; S32 mPrintStats; - S32 mAverageCyclesPerTimer; LLRect mGraphRect; }; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 4cbc9cab4a..e30dd51acb 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -38,6 +38,7 @@ #include "lltooltip.h" #include "llagent.h" +#include "llavatarnamecache.h" #include "llclipboard.h" #include "llclipboard.h" #include "llinventorybridge.h" @@ -45,12 +46,14 @@ #include "llfloatersidepanelcontainer.h" #include "llfloaterworldmap.h" #include "lllandmarkactions.h" +#include "lllogininstance.h" #include "llnotificationsutil.h" #include "lltoggleablemenu.h" #include "llviewerinventory.h" #include "llviewermenu.h" #include "llviewermenu.h" #include "lltooldraganddrop.h" +#include "llsdserialize.h" static LLDefaultChildRegistry::Register<LLFavoritesBarCtrl> r("favorites_bar"); @@ -317,7 +320,8 @@ public: if (item) { - item->setSortField(mSortField); + LLFavoritesOrderStorage::instance().setSortIndex(item, mSortField); + item->setComplete(TRUE); item->updateServer(FALSE); @@ -339,8 +343,8 @@ struct LLFavoritesSort // TODO - made it customizible using gSavedSettings bool operator()(const LLViewerInventoryItem* const& a, const LLViewerInventoryItem* const& b) { - S32 sortField1 = a->getSortField(); - S32 sortField2 = b->getSortField(); + S32 sortField1 = LLFavoritesOrderStorage::instance().getSortIndex(a->getUUID()); + S32 sortField2 = LLFavoritesOrderStorage::instance().getSortIndex(b->getUUID()); if (!(sortField1 < 0 && sortField2 < 0)) { @@ -528,7 +532,7 @@ void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y) mItems.push_back(gInventory.getItem(mDragItemId)); } - gInventory.saveItemsOrder(mItems); + LLFavoritesOrderStorage::instance().saveItemsOrder(mItems); LLToggleableMenu* menu = (LLToggleableMenu*) mOverflowMenuHandle.get(); @@ -587,7 +591,8 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con } else { - currItem->setSortField(++sortField); + LLFavoritesOrderStorage::instance().setSortIndex(currItem, ++sortField); + currItem->setComplete(TRUE); currItem->updateServer(FALSE); @@ -640,7 +645,7 @@ void LLFavoritesBarCtrl::changed(U32 mask) for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i) { - (*i)->getSLURL(); + LLFavoritesOrderStorage::instance().getSLURL((*i)->getAssetUUID()); } updateButtons(); } @@ -909,7 +914,7 @@ BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &it S32 sortField = 0; for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i) { - (*i)->setSortField(++sortField); + LLFavoritesOrderStorage::instance().setSortIndex((*i), ++sortField); } } @@ -1355,7 +1360,7 @@ BOOL LLFavoritesBarCtrl::needToSaveItemsOrder(const LLInventoryModel::item_array // if there is an item without sort order field set, we need to save items order for (LLInventoryModel::item_array_t::const_iterator i = items.begin(); i != items.end(); ++i) { - if ((*i)->getSortField() < 0) + if (LLFavoritesOrderStorage::instance().getSortIndex((*i)->getUUID()) < 0) { result = TRUE; break; @@ -1390,4 +1395,295 @@ void LLFavoritesBarCtrl::insertItem(LLInventoryModel::item_array_t& items, const } } +const std::string LLFavoritesOrderStorage::SORTING_DATA_FILE_NAME = "landmarks_sorting.xml"; +const S32 LLFavoritesOrderStorage::NO_INDEX = -1; + +void LLFavoritesOrderStorage::setSortIndex(const LLViewerInventoryItem* inv_item, S32 sort_index) +{ + mSortIndexes[inv_item->getUUID()] = sort_index; + mIsDirty = true; + getSLURL(inv_item->getAssetUUID()); +} + +S32 LLFavoritesOrderStorage::getSortIndex(const LLUUID& inv_item_id) +{ + sort_index_map_t::const_iterator it = mSortIndexes.find(inv_item_id); + if (it != mSortIndexes.end()) + { + return it->second; + } + return NO_INDEX; +} + +void LLFavoritesOrderStorage::removeSortIndex(const LLUUID& inv_item_id) +{ + mSortIndexes.erase(inv_item_id); + mIsDirty = true; +} + +void LLFavoritesOrderStorage::getSLURL(const LLUUID& asset_id) +{ + slurls_map_t::iterator slurl_iter = mSLURLs.find(asset_id); + if (slurl_iter != mSLURLs.end()) return; // SLURL for current landmark is already cached + + LLLandmark* lm = gLandmarkList.getAsset(asset_id, + boost::bind(&LLFavoritesOrderStorage::onLandmarkLoaded, this, asset_id, _1)); + if (lm) + { + onLandmarkLoaded(asset_id, lm); + } +} + +// static +void LLFavoritesOrderStorage::destroyClass() +{ + LLFavoritesOrderStorage::instance().cleanup(); + if (gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin")) + { + LLFavoritesOrderStorage::instance().saveFavoritesSLURLs(); + } + else + { + LLFavoritesOrderStorage::instance().removeFavoritesRecordOfUser(); + } +} + +void LLFavoritesOrderStorage::load() +{ + // load per-resident sorting information + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); + + 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) + { + mSortIndexes.insert(std::make_pair(LLUUID(iter->first), (S32)iter->second.asInteger())); + } +} + +void LLFavoritesOrderStorage::saveFavoritesSLURLs() +{ + // Do not change the file if we are not logged in yet. + if (!LLLoginInstance::getInstance()->authSuccess()) + { + llwarns << "Cannot save favorites: not logged in" << llendl; + return; + } + + std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); + if (user_dir.empty()) + { + llwarns << "Cannot save favorites: empty user dir name" << llendl; + return; + } + + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); + llifstream in_file; + in_file.open(filename); + LLSD fav_llsd; + if (in_file.is_open()) + { + LLSDSerialize::fromXML(fav_llsd, in_file); + } + + const LLUUID fav_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); + + LLSD user_llsd; + for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++) + { + LLSD value; + value["name"] = (*it)->getName(); + value["asset_id"] = (*it)->getAssetUUID(); + + slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]); + if (slurl_iter != mSLURLs.end()) + { + lldebugs << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << llendl; + value["slurl"] = slurl_iter->second; + user_llsd[LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID())] = value; + } + else + { + llwarns << "Not saving favorite " << value["name"] << ": no matching SLURL" << llendl; + } + } + + LLAvatarName av_name; + LLAvatarNameCache::get( gAgentID, &av_name ); + // Note : use the "John Doe" and not the "john.doe" version of the name + // as we'll compare it with the stored credentials in the login panel. + lldebugs << "Saved favorites for " << av_name.getUserName() << llendl; + fav_llsd[av_name.getUserName()] = user_llsd; + + llofstream file; + file.open(filename); + LLSDSerialize::toPrettyXML(fav_llsd, file); +} + +void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() +{ + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); + LLSD fav_llsd; + llifstream file; + file.open(filename); + if (!file.is_open()) return; + LLSDSerialize::fromXML(fav_llsd, file); + + LLAvatarName av_name; + LLAvatarNameCache::get( gAgentID, &av_name ); + // Note : use the "John Doe" and not the "john.doe" version of the name. + // See saveFavoritesSLURLs() here above for the reason why. + lldebugs << "Removed favorites for " << av_name.getUserName() << llendl; + if (fav_llsd.has(av_name.getUserName())) + { + fav_llsd.erase(av_name.getUserName()); + } + + llofstream out_file; + out_file.open(filename); + LLSDSerialize::toPrettyXML(fav_llsd, out_file); + +} + +void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmark* landmark) +{ + if (!landmark) return; + + LLVector3d pos_global; + if (!landmark->getGlobalPos(pos_global)) + { + // If global position was unknown on first getGlobalPos() call + // it should be set for the subsequent calls. + landmark->getGlobalPos(pos_global); + } + + if (!pos_global.isExactlyZero()) + { + LLLandmarkActions::getSLURLfromPosGlobal(pos_global, + boost::bind(&LLFavoritesOrderStorage::storeFavoriteSLURL, this, asset_id, _1)); + } +} + +void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl) +{ + lldebugs << "Saving landmark SLURL: " << slurl << llendl; + mSLURLs[asset_id] = slurl; +} + +void LLFavoritesOrderStorage::save() +{ + // nothing to save if clean + if (!mIsDirty) return; + + // If we quit from the login screen we will not have an SL account + // name. Don't try to save, otherwise we'll dump a file in + // C:\Program Files\SecondLife\ or similar. JC + std::string user_dir = gDirUtilp->getLindenUserDir(); + if (!user_dir.empty()) + { + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); + LLSD settings_llsd; + + for(sort_index_map_t::const_iterator iter = mSortIndexes.begin(); iter != mSortIndexes.end(); ++iter) + { + settings_llsd[iter->first.asString()] = iter->second; + } + + llofstream file; + file.open(filename); + LLSDSerialize::toPrettyXML(settings_llsd, file); + } +} + +void LLFavoritesOrderStorage::cleanup() +{ + // nothing to clean + if (!mIsDirty) return; + + const LLUUID fav_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); + + IsNotInFavorites is_not_in_fav(items); + + sort_index_map_t aTempMap; + //copy unremoved values from mSortIndexes to aTempMap + std::remove_copy_if(mSortIndexes.begin(), mSortIndexes.end(), + inserter(aTempMap, aTempMap.begin()), + is_not_in_fav); + + //Swap the contents of mSortIndexes and aTempMap + mSortIndexes.swap(aTempMap); +} + +void LLFavoritesOrderStorage::saveItemsOrder( const LLInventoryModel::item_array_t& items ) +{ + int sortField = 0; + + // current order is saved by setting incremental values (1, 2, 3, ...) for the sort field + for (LLInventoryModel::item_array_t::const_iterator i = items.begin(); i != items.end(); ++i) + { + LLViewerInventoryItem* item = *i; + + setSortIndex(item, ++sortField); + + item->setComplete(TRUE); + item->updateServer(FALSE); + + gInventory.updateItem(item); + + // Tell the parent folder to refresh its sort order. + gInventory.addChangedMask(LLInventoryObserver::SORT, item->getParentUUID()); + } + + gInventory.notifyObservers(); +} + +// See also LLInventorySort where landmarks in the Favorites folder are sorted. +class LLViewerInventoryItemSort +{ +public: + bool operator()(const LLPointer<LLViewerInventoryItem>& a, const LLPointer<LLViewerInventoryItem>& b) + { + return LLFavoritesOrderStorage::instance().getSortIndex(a->getUUID()) + < LLFavoritesOrderStorage::instance().getSortIndex(b->getUUID()); + } +}; + +// * @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 LLFavoritesOrderStorage::rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id) +{ + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLIsType is_type(LLAssetType::AT_LANDMARK); + LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + gInventory.collectDescendentsIf(favorites_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type); + + // ensure items are sorted properly before changing order. EXT-3498 + std::sort(items.begin(), items.end(), LLViewerInventoryItemSort()); + + // update order + gInventory.updateItemsOrder(items, source_item_id, target_item_id); + + saveItemsOrder(items); +} + +void AddFavoriteLandmarkCallback::fire(const LLUUID& inv_item_id) +{ + if (mTargetLandmarkId.isNull()) return; + + LLFavoritesOrderStorage::instance().rearrangeFavoriteLandmarks(inv_item_id, mTargetLandmarkId); +} // EOF diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index 447d30f1f4..e000adc4aa 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -33,6 +33,7 @@ #include "llinventoryobserver.h" #include "llinventorymodel.h" +#include "llviewerinventory.h" class LLMenuItemCallGL; class LLToggleableMenu; @@ -161,5 +162,115 @@ private: boost::signals2::connection mEndDragConnection; }; +class AddFavoriteLandmarkCallback : public LLInventoryCallback +{ +public: + AddFavoriteLandmarkCallback() : mTargetLandmarkId(LLUUID::null) {} + void setTargetLandmarkId(const LLUUID& target_uuid) { mTargetLandmarkId = target_uuid; } + +private: + void fire(const LLUUID& inv_item); + + LLUUID mTargetLandmarkId; +}; + +/** + * Class to store sorting order of favorites landmarks in a local file. EXT-3985. + * It replaced previously implemented solution to store sort index in landmark's name as a "<N>@" prefix. + * Data are stored in user home directory. + */ +class LLFavoritesOrderStorage : public LLSingleton<LLFavoritesOrderStorage> + , public LLDestroyClass<LLFavoritesOrderStorage> +{ + LOG_CLASS(LLFavoritesOrderStorage); +public: + /** + * Sets sort index for specified with LLUUID favorite landmark + */ + void setSortIndex(const LLViewerInventoryItem* inv_item, S32 sort_index); + + /** + * Gets sort index for specified with LLUUID favorite landmark + */ + S32 getSortIndex(const LLUUID& inv_item_id); + void removeSortIndex(const LLUUID& inv_item_id); + + void getSLURL(const LLUUID& asset_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); + + void rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id); + + /** + * Implementation of LLDestroyClass. Calls cleanup() instance method. + * + * It is important this callback is called before gInventory is cleaned. + * For now it is called from LLAppViewer::cleanup() -> LLAppViewer::disconnectViewer(), + * Inventory is cleaned later from LLAppViewer::cleanup() after LLAppViewer::disconnectViewer() is called. + * @see cleanup() + */ + static void destroyClass(); + + const static S32 NO_INDEX; +private: + friend class LLSingleton<LLFavoritesOrderStorage>; + LLFavoritesOrderStorage() : mIsDirty(false) { load(); } + ~LLFavoritesOrderStorage() { save(); } + + /** + * Removes sort indexes for items which are not in Favorites bar for now. + */ + void cleanup(); + + const static std::string SORTING_DATA_FILE_NAME; + + void load(); + void save(); + + void saveFavoritesSLURLs(); + + // Remove record of current user's favorites from file on disk. + void removeFavoritesRecordOfUser(); + + void onLandmarkLoaded(const LLUUID& asset_id, class LLLandmark* landmark); + void storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl); + + typedef std::map<LLUUID, S32> sort_index_map_t; + sort_index_map_t mSortIndexes; + + typedef std::map<LLUUID, std::string> slurls_map_t; + slurls_map_t mSLURLs; + + bool mIsDirty; + + struct IsNotInFavorites + { + IsNotInFavorites(const LLInventoryModel::item_array_t& items) + : mFavoriteItems(items) + { + + } + + /** + * Returns true if specified item is not found among inventory items + */ + bool operator()(const sort_index_map_t::value_type& id_index_pair) const + { + LLPointer<LLViewerInventoryItem> item = gInventory.getItem(id_index_pair.first); + if (item.isNull()) return true; + + LLInventoryModel::item_array_t::const_iterator found_it = + std::find(mFavoriteItems.begin(), mFavoriteItems.end(), item); + + return found_it == mFavoriteItems.end(); + } + private: + LLInventoryModel::item_array_t mFavoriteItems; + }; + +}; #endif // LL_LLFAVORITESBARCTRL_H diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 393f8b9d46..a4cadcd5dc 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -57,6 +57,7 @@ #include "lldxhardware.h" #endif +#define LL_EXPORT_GPU_TABLE 0 #if LL_DARWIN const char FEATURE_TABLE_FILENAME[] = "featuretable_mac.txt"; @@ -386,6 +387,13 @@ void LLFeatureManager::parseGPUTable(std::string filename) *i = tolower(*i); } +#if LL_EXPORT_GPU_TABLE + llofstream json; + json.open("gpu_table.json"); + + json << "var gpu_table = [" << std::endl; +#endif + bool gpuFound; U32 lineNumber; for (gpuFound = false, lineNumber = 0; !gpuFound && !file.eof(); lineNumber++) @@ -411,7 +419,7 @@ void LLFeatureManager::parseGPUTable(std::string filename) // setup the tokenizer std::string buf(buffer); - std::string cls, label, expr, supported; + std::string cls, label, expr, supported, stats_based, expected_gl_version; boost_tokenizer tokens(buf, boost::char_separator<char>("\t\n")); boost_tokenizer::iterator token_iter = tokens.begin(); @@ -432,13 +440,29 @@ void LLFeatureManager::parseGPUTable(std::string filename) { supported = *token_iter++; } + if (token_iter != tokens.end()) + { + stats_based = *token_iter++; + } + if (token_iter != tokens.end()) + { + expected_gl_version = *token_iter++; + } if (label.empty() || expr.empty() || cls.empty() || supported.empty()) { LL_WARNS("RenderInit") << "invald gpu_table.txt:" << lineNumber << ": '" << buffer << "'" << LL_ENDL; continue; } - +#if LL_EXPORT_GPU_TABLE + json << "{'label' : '" << label << "',\n" << + "'regexp' : '" << expr << "',\n" << + "'class' : '" << cls << "',\n" << + "'supported' : '" << supported << "',\n" << + "'stats_based' : " << stats_based << ",\n" << + "'gl_version' : " << expected_gl_version << "\n},\n"; +#endif + for (U32 i = 0; i < expr.length(); i++) /*Flawfinder: ignore*/ { expr[i] = tolower(expr[i]); @@ -449,12 +473,19 @@ void LLFeatureManager::parseGPUTable(std::string filename) if(boost::regex_search(renderer, re)) { // if we found it, stop! +#if !LL_EXPORT_GPU_TABLE gpuFound = true; +#endif mGPUString = label; mGPUClass = (EGPUClass) strtol(cls.c_str(), NULL, 10); mGPUSupported = (BOOL) strtol(supported.c_str(), NULL, 10); + sscanf(expected_gl_version.c_str(), "%f", &mExpectedGLVersion); } } +#if LL_EXPORT_GPU_TABLE + json << "];\n\n"; + json.close(); +#endif file.close(); if ( gpuFound ) @@ -469,6 +500,10 @@ void LLFeatureManager::parseGPUTable(std::string filename) { LL_WARNS("RenderInit") << "GPU '" << rawRenderer << "' not recognized" << LL_ENDL; } + +#if LL_DARWIN // never go over "Mid" settings by default on OS X + mGPUClass = llmin(mGPUClass, GPU_CLASS_2); +#endif } // responder saves table into file @@ -585,7 +620,7 @@ void LLFeatureManager::applyRecommendedSettings() { // apply saved settings // cap the level at 2 (high) - S32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_2)); + S32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5)); llinfos << "Applying Recommended Features" << llendl; @@ -680,12 +715,21 @@ void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures) } break; case 1: - maskFeatures("Mid"); + maskFeatures("LowMid"); break; case 2: - maskFeatures("High"); + maskFeatures("Mid"); break; case 3: + maskFeatures("MidHigh"); + break; + case 4: + maskFeatures("High"); + break; + case 5: + maskFeatures("HighUltra"); + break; + case 6: maskFeatures("Ultra"); break; default: @@ -715,14 +759,16 @@ void LLFeatureManager::applyBaseMasks() mFeatures = maskp->getFeatures(); // mask class - if (mGPUClass >= 0 && mGPUClass < 4) + if (mGPUClass >= 0 && mGPUClass < 6) { const char* class_table[] = { "Class0", "Class1", "Class2", - "Class3" + "Class3", + "Class4", + "Class5", }; LL_INFOS("RenderInit") << "Setting GPU Class to " << class_table[mGPUClass] << LL_ENDL; diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h index c9cb397fcc..ad72c16743 100644 --- a/indra/newview/llfeaturemanager.h +++ b/indra/newview/llfeaturemanager.h @@ -39,7 +39,9 @@ typedef enum EGPUClass GPU_CLASS_0 = 0, GPU_CLASS_1 = 1, GPU_CLASS_2 = 2, - GPU_CLASS_3 = 3 + GPU_CLASS_3 = 3, + GPU_CLASS_4 = 4, + GPU_CLASS_5 = 5 } EGPUClass; @@ -101,7 +103,8 @@ public: mTableVersion(0), mSafe(FALSE), mGPUClass(GPU_CLASS_UNKNOWN), - mGPUSupported(FALSE) + mExpectedGLVersion(0.f), + mGPUSupported(FALSE) { } ~LLFeatureManager() {cleanupFeatureTables();} @@ -116,6 +119,7 @@ public: EGPUClass getGPUClass() { return mGPUClass; } std::string& getGPUString() { return mGPUString; } BOOL isGPUSupported() { return mGPUSupported; } + F32 getExpectedGLVersion() { return mExpectedGLVersion; } void cleanupFeatureTables(); @@ -155,6 +159,7 @@ protected: S32 mTableVersion; BOOL mSafe; // Reinitialize everything to the "safe" mask EGPUClass mGPUClass; + F32 mExpectedGLVersion; //expected GL version according to gpu table std::string mGPUString; BOOL mGPUSupported; }; diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h index 55c665b9c7..4f602f63f1 100644 --- a/indra/newview/llfilepicker.h +++ b/indra/newview/llfilepicker.h @@ -39,8 +39,8 @@ #include <Carbon/Carbon.h> // AssertMacros.h does bad things. +#include "fix_macros.h" #undef verify -#undef check #undef require #include <vector> diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index a9f52282a5..e2850f5181 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -74,7 +74,7 @@ void LLFirstUse::resetFirstUse() // static void LLFirstUse::otherAvatarChatFirst(bool enable) { - firstUseNotification("FirstOtherChatBeforeUser", enable, "HintChat", LLSD(), LLSD().with("target", "chat_bar").with("direction", "top_right").with("distance", 24)); + firstUseNotification("FirstOtherChatBeforeUser", enable, "HintChat", LLSD(), LLSD().with("target", "nearby_chat").with("direction", "top_right").with("distance", 24)); } // static diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 3d64ceb71d..a5ee4607a1 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -44,9 +44,11 @@ #include "llvoavatar.h" /*static*/ F32 LLVolumeImplFlexible::sUpdateFactor = 1.0f; +std::vector<LLVolumeImplFlexible*> LLVolumeImplFlexible::sInstanceList; +std::vector<S32> LLVolumeImplFlexible::sUpdateDelay; static LLFastTimer::DeclareTimer FTM_FLEXIBLE_REBUILD("Rebuild"); -static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Update"); +static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Flexible Update"); // LLFlexibleObjectData::pack/unpack now in llprimitive.cpp @@ -64,14 +66,51 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD mSimulateRes = 0; mFrameNum = 0; mCollisionSphereRadius = 0.f; - mRenderRes = 1; - + mRenderRes = -1; + if(mVO->mDrawable.notNull()) { mVO->mDrawable->makeActive() ; } + + mInstanceIndex = sInstanceList.size(); + sInstanceList.push_back(this); + sUpdateDelay.push_back(0); }//----------------------------------------------- +LLVolumeImplFlexible::~LLVolumeImplFlexible() +{ + S32 end_idx = sInstanceList.size()-1; + + if (end_idx != mInstanceIndex) + { + sInstanceList[mInstanceIndex] = sInstanceList[end_idx]; + sInstanceList[mInstanceIndex]->mInstanceIndex = mInstanceIndex; + sUpdateDelay[mInstanceIndex] = sUpdateDelay[end_idx]; + } + + sInstanceList.pop_back(); + sUpdateDelay.pop_back(); +} + +//static +void LLVolumeImplFlexible::updateClass() +{ + std::vector<S32>::iterator delay_iter = sUpdateDelay.begin(); + + for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin(); + iter != sInstanceList.end(); + ++iter) + { + --(*delay_iter); + if (*delay_iter <= 0) + { + (*iter)->doIdleUpdate(); + } + ++delay_iter; + } +} + LLVector3 LLVolumeImplFlexible::getFramePosition() const { return mVO->getRenderPosition(); @@ -255,50 +294,28 @@ void LLVolumeImplFlexible::onSetVolume(const LLVolumeParams &volume_params, cons { } -//--------------------------------------------------------------------------------- -// This calculates the physics of the flexible object. Note that it has to be 0 -// updated every time step. In the future, perhaps there could be an -// optimization similar to what Havok does for objects that are stationary. -//--------------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies"); -BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) -{ - if (mVO->mDrawable.isNull()) - { - // Don't do anything until we have a drawable - return FALSE; // (we are not initialized or updated) - } - - BOOL force_update = mSimulateRes == 0 ? TRUE : FALSE; - //flexible objects never go static - mVO->mDrawable->mQuietCount = 0; - if (!mVO->mDrawable->isRoot()) - { - LLViewerObject* parent = (LLViewerObject*) mVO->getParent(); - parent->mDrawable->mQuietCount = 0; - } +void LLVolumeImplFlexible::updateRenderRes() +{ + LLDrawable* drawablep = mVO->mDrawable; - LLFastTimer ftm(FTM_FLEXIBLE_UPDATE); - S32 new_res = mAttributes->getSimulateLOD(); - //number of segments only cares about z axis - F32 app_angle = llround((F32) atan2( mVO->getScale().mV[2]*2.f, mVO->mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f); +#if 1 //optimal approximation of previous behavior that doesn't rely on atan2 + F32 app_angle = mVO->getScale().mV[2]/drawablep->mDistanceWRTCamera; // Rendering sections increases with visible angle on the screen - mRenderRes = (S32)(FLEXIBLE_OBJECT_MAX_SECTIONS*4*app_angle*DEG_TO_RAD/LLViewerCamera::getInstance()->getView()); - if (mRenderRes > FLEXIBLE_OBJECT_MAX_SECTIONS) - { - mRenderRes = FLEXIBLE_OBJECT_MAX_SECTIONS; - } - + mRenderRes = (S32) (12.f*app_angle); +#else //legacy behavior + //number of segments only cares about z axis + F32 app_angle = llround((F32) atan2( mVO->getScale().mV[2]*2.f, drawablep->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f); - // Bottom cap at 1/4 the original number of sections - if (mRenderRes < mAttributes->getSimulateLOD()-1) - { - mRenderRes = mAttributes->getSimulateLOD()-1; - } + // Rendering sections increases with visible angle on the screen + mRenderRes = (S32)(FLEXIBLE_OBJECT_MAX_SECTIONS*4*app_angle*DEG_TO_RAD/LLViewerCamera::getInstance()->getView()); +#endif + + mRenderRes = llclamp(mRenderRes, new_res-1, (S32) FLEXIBLE_OBJECT_MAX_SECTIONS); + // Throttle back simulation of segments we're not rendering if (mRenderRes < new_res) { @@ -311,43 +328,87 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 setAttributesOfAllSections(); mInitialized = TRUE; } - if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) - { - return FALSE; // (we are not initialized or updated) - } - - bool visible = mVO->mDrawable->isVisible(); +} +//--------------------------------------------------------------------------------- +// This calculates the physics of the flexible object. Note that it has to be 0 +// updated every time step. In the future, perhaps there could be an +// optimization similar to what Havok does for objects that are stationary. +//--------------------------------------------------------------------------------- +static LLFastTimer::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies"); +void LLVolumeImplFlexible::doIdleUpdate() +{ + LLDrawable* drawablep = mVO->mDrawable; - if (force_update && visible) - { - gPipeline.markRebuild(mVO->mDrawable, LLDrawable::REBUILD_POSITION, FALSE); - } - else if (visible && - !mVO->mDrawable->isState(LLDrawable::IN_REBUILD_Q1) && - mVO->getPixelArea() > 256.f) + if (drawablep) { - U32 id; - F32 pixel_area = mVO->getPixelArea(); + //LLFastTimer ftm(FTM_FLEXIBLE_UPDATE); - if (mVO->isRootEdit()) - { - id = mID; - } - else + //ensure drawable is active + drawablep->makeActive(); + + if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) { - LLVOVolume* parent = (LLVOVolume*) mVO->getParent(); - id = parent->getVolumeInterfaceID(); - } + bool visible = drawablep->isVisible(); - U32 update_period = (U32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f)))+1; + if (mRenderRes == -1) + { + updateRenderRes(); + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE); + sUpdateDelay[mInstanceIndex] = 0; + } + else + { + F32 pixel_area = mVO->getPixelArea(); + + U32 update_period = (U32) (llmax((S32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f))),0)+1); + // MAINT-1890 Clamp the update period to ensure that the update_period is no greater than 32 frames + update_period = llclamp(update_period, 0U, 32U); + + if (visible) + { + if (!drawablep->isState(LLDrawable::IN_REBUILD_Q1) && + pixel_area > 256.f) + { + U32 id; + + if (mVO->isRootEdit()) + { + id = mID; + } + else + { + LLVOVolume* parent = (LLVOVolume*) mVO->getParent(); + id = parent->getVolumeInterfaceID(); + } + + if (mVO->isRootEdit()) + { + id = mID; + } + else + { + LLVOVolume* parent = (LLVOVolume*) mVO->getParent(); + id = parent->getVolumeInterfaceID(); + } + + if ((LLDrawable::getCurrentFrame()+id)%update_period == 0) + { + sUpdateDelay[mInstanceIndex] = (S32) update_period-1; + + updateRenderRes(); + + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE); + } + } + } + else + { + sUpdateDelay[mInstanceIndex] = (S32) update_period; + } +} - if ((LLDrawable::getCurrentFrame()+id)%update_period == 0) - { - gPipeline.markRebuild(mVO->mDrawable, LLDrawable::REBUILD_POSITION, FALSE); } } - - return force_update; } inline S32 log2(S32 x) @@ -369,8 +430,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate() if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible()) { BOOL force_update = mSimulateRes == 0 ? TRUE : FALSE; - - doIdleUpdate(gAgent, *LLWorld::getInstance(), 0.0); + doIdleUpdate(); if (!force_update || !gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) { @@ -383,6 +443,15 @@ void LLVolumeImplFlexible::doFlexibleUpdate() //the object is not visible return ; } + + // Fix for MAINT-1894 + // Skipping the flexible update if render res is negative. If we were to continue with a negative value, + // the subsequent S32 num_render_sections = 1<<mRenderRes; code will specify a really large number of + // render sections which will then create a length exception in the std::vector::resize() method. + if (mRenderRes < 0) + { + return; + } S32 num_sections = 1 << mSimulateRes; @@ -591,6 +660,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate() mSection[i].mdPosition = (mSection[i].mPosition - mSection[i-1].mPosition) * inv_section_length; // Create points + llassert(mRenderRes > -1) S32 num_render_sections = 1<<mRenderRes; if (path->getPathLength() != num_render_sections+1) { diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h index 371d6a0773..beb281a906 100644 --- a/indra/newview/llflexibleobject.h +++ b/indra/newview/llflexibleobject.h @@ -70,15 +70,24 @@ struct LLFlexibleObjectSection //--------------------------------------------------------- class LLVolumeImplFlexible : public LLVolumeInterface { +private: + static std::vector<LLVolumeImplFlexible*> sInstanceList; + static std::vector<S32> sUpdateDelay; + S32 mInstanceIndex; + public: + static void updateClass(); + LLVolumeImplFlexible(LLViewerObject* volume, LLFlexibleObjectData* attributes); + ~LLVolumeImplFlexible(); // Implements LLVolumeInterface U32 getID() const { return mID; } LLVector3 getFramePosition() const; LLQuaternion getFrameRotation() const; LLVolumeInterfaceType getInterfaceType() const { return INTERFACE_FLEXIBLE; } - BOOL doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + void updateRenderRes(); + void doIdleUpdate(); BOOL doUpdateGeometry(LLDrawable *drawable); LLVector3 getPivotPosition() const; void onSetVolume(const LLVolumeParams &volume_params, const S32 detail); @@ -128,7 +137,7 @@ class LLVolumeImplFlexible : public LLVolumeInterface LLVector3 mCollisionSpherePosition; F32 mCollisionSphereRadius; U32 mID; - + //-------------------------------------- // private methods //-------------------------------------- diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp index 7d1bcba978..6e56e929df 100644 --- a/indra/newview/llfloaterautoreplacesettings.cpp +++ b/indra/newview/llfloaterautoreplacesettings.cpp @@ -478,14 +478,25 @@ bool LLFloaterAutoReplaceSettings::callbackNewListName(const LLSD& notification, bool LLFloaterAutoReplaceSettings::callbackListNameConflict(const LLSD& notification, const LLSD& response) { LLSD newList = notification["payload"]["list"]; - + std::string listName = LLAutoReplaceSettings::getListName(newList); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch ( option ) { case 0: // Replace current list - LL_INFOS("AutoReplace")<<"option 'replace current list' selected"<<LL_ENDL; - + if ( LLAutoReplaceSettings::AddListOk == mSettings.replaceList(newList) ) + { + LL_INFOS("AutoReplace") << "replaced list '"<<listName<<"'"<<LL_ENDL; + mSelectedListName = listName; + updateListNames(); + updateListNamesControls(); + updateReplacementsList(); + } + else + { + LL_WARNS("AutoReplace")<<"failed to replace list '"<<listName<<"'"<<LL_ENDL; + } break; case 1: @@ -503,14 +514,27 @@ bool LLFloaterAutoReplaceSettings::callbackListNameConflict(const LLSD& notifica void LLFloaterAutoReplaceSettings::onDeleteList() { - std::string listName= mListNames->getFirstSelected()->getColumn(0)->getValue().asString(); - mSettings.removeReplacementList(listName); // remove from the copy of settings - mReplacementsList->deleteSelectedItems(); // remove from the scrolling list - - mSelectedListName.clear(); - updateListNames(); - updateListNamesControls(); - updateReplacementsList(); + std::string listName = mListNames->getSelectedValue().asString(); + if ( ! listName.empty() ) + { + if ( mSettings.removeReplacementList(listName) ) + { + LL_INFOS("AutoReplace")<<"deleted list '"<<listName<<"'"<<LL_ENDL; + mReplacementsList->deleteSelectedItems(); // remove from the scrolling list + mSelectedListName.clear(); + updateListNames(); + updateListNamesControls(); + updateReplacementsList(); + } + else + { + LL_WARNS("AutoReplace")<<"failed to delete list '"<<listName<<"'"<<LL_ENDL; + } + } + else + { + LL_DEBUGS("AutoReplace")<<"no list selected for delete"<<LL_ENDL; + } } void LLFloaterAutoReplaceSettings::onExportList() diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 0290e7cdf0..f7dd4a4a6b 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -49,6 +49,8 @@ #include "llscrolllistcell.h" #include "lltabcontainer.h" #include "lluictrlfactory.h" +#include "llfocusmgr.h" +#include "lldraghandle.h" #include "message.h" //#include "llsdserialize.h" @@ -58,11 +60,14 @@ static std::map<LLUUID, LLAvatarName> sAvatarNameMap; LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback, BOOL allow_multiple, - BOOL closeOnSelect) + BOOL closeOnSelect, + BOOL skip_agent, + const std::string& name, + LLView * frustumOrigin) { // *TODO: Use a key to allow this not to be an effective singleton LLFloaterAvatarPicker* floater = - LLFloaterReg::showTypedInstance<LLFloaterAvatarPicker>("avatar_picker"); + LLFloaterReg::showTypedInstance<LLFloaterAvatarPicker>("avatar_picker", LLSD(name)); if (!floater) { llwarns << "Cannot instantiate avatar picker" << llendl; @@ -73,6 +78,7 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback, floater->setAllowMultiple(allow_multiple); floater->mNearMeListComplete = FALSE; floater->mCloseOnSelect = closeOnSelect; + floater->mExcludeAgentFromSearchResults = skip_agent; if (!closeOnSelect) { @@ -83,6 +89,11 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback, floater->getChild<LLButton>("cancel_btn")->setLabel(close_string); } + if(frustumOrigin) + { + floater->mFrustumOrigin = frustumOrigin->getHandle(); + } + return floater; } @@ -91,9 +102,17 @@ LLFloaterAvatarPicker::LLFloaterAvatarPicker(const LLSD& key) : LLFloater(key), mNumResultsReturned(0), mNearMeListComplete(FALSE), - mCloseOnSelect(FALSE) + mCloseOnSelect(FALSE), + mContextConeOpacity (0.f), + mContextConeInAlpha(0.f), + mContextConeOutAlpha(0.f), + mContextConeFadeTime(0.f) { mCommitCallbackRegistrar.add("Refresh.FriendList", boost::bind(&LLFloaterAvatarPicker::populateFriend, this)); + + mContextConeInAlpha = gSavedSettings.getF32("ContextConeInAlpha"); + mContextConeOutAlpha = gSavedSettings.getF32("ContextConeOutAlpha"); + mContextConeFadeTime = gSavedSettings.getF32("ContextConeFadeTime"); } BOOL LLFloaterAvatarPicker::postBuild() @@ -288,9 +307,9 @@ void LLFloaterAvatarPicker::populateNearMe() else { element["columns"][0]["column"] = "name"; - element["columns"][0]["value"] = av_name.mDisplayName; + element["columns"][0]["value"] = av_name.getDisplayName(); element["columns"][1]["column"] = "username"; - element["columns"][1]["value"] = av_name.mUsername; + element["columns"][1]["value"] = av_name.getUserName(); sAvatarNameMap[av] = av_name; } @@ -338,8 +357,67 @@ void LLFloaterAvatarPicker::populateFriend() friends_scroller->sortByColumnIndex(0, TRUE); } +void LLFloaterAvatarPicker::drawFrustum() +{ + if(mFrustumOrigin.get()) + { + LLView * frustumOrigin = mFrustumOrigin.get(); + LLRect origin_rect; + frustumOrigin->localRectToOtherView(frustumOrigin->getLocalRect(), &origin_rect, this); + // draw context cone connecting color picker with color swatch in parent floater + LLRect local_rect = getLocalRect(); + if (hasFocus() && frustumOrigin->isInVisibleChain() && mContextConeOpacity > 0.001f) + { + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + LLGLEnable(GL_CULL_FACE); + gGL.begin(LLRender::QUADS); + { + gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity); + gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop); + gGL.vertex2i(origin_rect.mRight, origin_rect.mTop); + gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity); + gGL.vertex2i(local_rect.mRight, local_rect.mTop); + gGL.vertex2i(local_rect.mLeft, local_rect.mTop); + + gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity); + gGL.vertex2i(local_rect.mLeft, local_rect.mTop); + gGL.vertex2i(local_rect.mLeft, local_rect.mBottom); + gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity); + gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom); + gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop); + + gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity); + gGL.vertex2i(local_rect.mRight, local_rect.mBottom); + gGL.vertex2i(local_rect.mRight, local_rect.mTop); + gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity); + gGL.vertex2i(origin_rect.mRight, origin_rect.mTop); + gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom); + + gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity); + gGL.vertex2i(local_rect.mLeft, local_rect.mBottom); + gGL.vertex2i(local_rect.mRight, local_rect.mBottom); + gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity); + gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom); + gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom); + } + gGL.end(); + } + + if (gFocusMgr.childHasMouseCapture(getDragHandle())) + { + mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLCriticalDamp::getInterpolant(mContextConeFadeTime)); + } + else + { + mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(mContextConeFadeTime)); + } + } +} + void LLFloaterAvatarPicker::draw() { + drawFrustum(); + // sometimes it is hard to determine when Select/Ok button should be disabled (see LLAvatarActions::shareWithAvatars). // lets check this via mOkButtonValidateSignal callback periodically. static LLFrameTimer timer; @@ -382,8 +460,9 @@ class LLAvatarPickerResponder : public LLHTTPClient::Responder { public: LLUUID mQueryID; + std::string mName; - LLAvatarPickerResponder(const LLUUID& id) : mQueryID(id) { } + LLAvatarPickerResponder(const LLUUID& id, const std::string& name) : mQueryID(id), mName(name) { } /*virtual*/ void completed(U32 status, const std::string& reason, const LLSD& content) { @@ -396,7 +475,7 @@ public: if (isGoodStatus(status) || status == 400) { LLFloaterAvatarPicker* floater = - LLFloaterReg::findTypedInstance<LLFloaterAvatarPicker>("avatar_picker"); + LLFloaterReg::findTypedInstance<LLFloaterAvatarPicker>("avatar_picker", mName); if (floater) { floater->processResponse(mQueryID, content); @@ -426,9 +505,7 @@ void LLFloaterAvatarPicker::find() LLViewerRegion* region = gAgent.getRegion(); url = region->getCapability("AvatarPickerSearch"); // Prefer use of capabilities to search on both SLID and display name - // but allow display name search to be manually turned off for test - if (!url.empty() - && LLAvatarNameCache::useDisplayNames()) + if (!url.empty()) { // capability urls don't end in '/', but we need one to parse // query parameters correctly @@ -439,7 +516,7 @@ void LLFloaterAvatarPicker::find() url += "?page_size=100&names="; url += LLURI::escape(text); llinfos << "avatar picker " << url << llendl; - LLHTTPClient::get(url, new LLAvatarPickerResponder(mQueryID)); + LLHTTPClient::get(url, new LLAvatarPickerResponder(mQueryID, getKey().asString())); } else { @@ -581,35 +658,36 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* msg->getUUIDFast( _PREHASH_Data,_PREHASH_AvatarID, avatar_id, i); msg->getStringFast(_PREHASH_Data,_PREHASH_FirstName, first_name, i); msg->getStringFast(_PREHASH_Data,_PREHASH_LastName, last_name, i); - - std::string avatar_name; - if (avatar_id.isNull()) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = floater->getChild<LLUICtrl>("Edit")->getValue().asString(); - avatar_name = floater->getString("not_found", map); - search_results->setEnabled(FALSE); - floater->getChildView("ok_btn")->setEnabled(FALSE); - } - else + + if (avatar_id != agent_id || !floater->isExcludeAgentFromSearchResults()) // exclude agent from search results? { - avatar_name = LLCacheName::buildFullName(first_name, last_name); - search_results->setEnabled(TRUE); - found_one = TRUE; + std::string avatar_name; + if (avatar_id.isNull()) + { + LLStringUtil::format_map_t map; + map["[TEXT]"] = floater->getChild<LLUICtrl>("Edit")->getValue().asString(); + avatar_name = floater->getString("not_found", map); + search_results->setEnabled(FALSE); + floater->getChildView("ok_btn")->setEnabled(FALSE); + } + else + { + avatar_name = LLCacheName::buildFullName(first_name, last_name); + search_results->setEnabled(TRUE); + found_one = TRUE; - LLAvatarName av_name; - av_name.mLegacyFirstName = first_name; - av_name.mLegacyLastName = last_name; - av_name.mDisplayName = avatar_name; - const LLUUID& agent_id = avatar_id; - sAvatarNameMap[agent_id] = av_name; + LLAvatarName av_name; + av_name.fromString(avatar_name); + const LLUUID& agent_id = avatar_id; + sAvatarNameMap[agent_id] = av_name; + } + LLSD element; + element["id"] = avatar_id; // value + element["columns"][0]["column"] = "name"; + element["columns"][0]["value"] = avatar_name; + search_results->addElement(element); } - LLSD element; - element["id"] = avatar_id; // value - element["columns"][0]["column"] = "name"; - element["columns"][0]["value"] = avatar_name; - search_results->addElement(element); } if (found_one) @@ -624,52 +702,58 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD& content) { // Check for out-of-date query - if (query_id != mQueryID) return; + if (query_id == mQueryID) + { + LLScrollListCtrl* search_results = getChild<LLScrollListCtrl>("SearchResults"); - LLScrollListCtrl* search_results = getChild<LLScrollListCtrl>("SearchResults"); + LLSD agents = content["agents"]; + + // clear "Searching" label on first results + search_results->deleteAllItems(); - LLSD agents = content["agents"]; - if (agents.size() == 0) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = childGetText("Edit"); LLSD item; - item["id"] = LLUUID::null; - item["columns"][0]["column"] = "name"; - item["columns"][0]["value"] = getString("not_found", map); - search_results->addElement(item); - search_results->setEnabled(false); - getChildView("ok_btn")->setEnabled(false); - return; - } + LLSD::array_const_iterator it = agents.beginArray(); + for ( ; it != agents.endArray(); ++it) + { + const LLSD& row = *it; + if (row["id"].asUUID() != gAgent.getID() || !mExcludeAgentFromSearchResults) + { + item["id"] = row["id"]; + LLSD& columns = item["columns"]; + columns[0]["column"] = "name"; + columns[0]["value"] = row["display_name"]; + columns[1]["column"] = "username"; + columns[1]["value"] = row["username"]; + search_results->addElement(item); + + // add the avatar name to our list + LLAvatarName avatar_name; + avatar_name.fromLLSD(row); + sAvatarNameMap[row["id"].asUUID()] = avatar_name; + } + } - // clear "Searching" label on first results - search_results->deleteAllItems(); - - LLSD item; - LLSD::array_const_iterator it = agents.beginArray(); - for ( ; it != agents.endArray(); ++it) - { - const LLSD& row = *it; - item["id"] = row["id"]; - LLSD& columns = item["columns"]; - columns[0]["column"] = "name"; - columns[0]["value"] = row["display_name"]; - columns[1]["column"] = "username"; - columns[1]["value"] = row["username"]; - search_results->addElement(item); - - // add the avatar name to our list - LLAvatarName avatar_name; - avatar_name.fromLLSD(row); - sAvatarNameMap[row["id"].asUUID()] = avatar_name; - } - - getChildView("ok_btn")->setEnabled(true); - search_results->setEnabled(true); - search_results->selectFirstItem(); - onList(); - search_results->setFocus(TRUE); + if (search_results->isEmpty()) + { + LLStringUtil::format_map_t map; + map["[TEXT]"] = childGetText("Edit"); + LLSD item; + item["id"] = LLUUID::null; + item["columns"][0]["column"] = "name"; + item["columns"][0]["value"] = getString("not_found", map); + search_results->addElement(item); + search_results->setEnabled(false); + getChildView("ok_btn")->setEnabled(false); + } + else + { + getChildView("ok_btn")->setEnabled(true); + search_results->setEnabled(true); + search_results->selectFirstItem(); + onList(); + search_results->setFocus(TRUE); + } + } } //static diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index 96c039443a..ed3e51c56f 100644 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -34,7 +34,7 @@ class LLAvatarName; class LLScrollListCtrl; -class LLFloaterAvatarPicker : public LLFloater +class LLFloaterAvatarPicker :public LLFloater { public: typedef boost::signals2::signal<bool(const uuid_vec_t&), boost_boolean_combiner> validate_signal_t; @@ -45,7 +45,10 @@ public: // Call this to select an avatar. static LLFloaterAvatarPicker* show(select_callback_t callback, BOOL allow_multiple = FALSE, - BOOL closeOnSelect = FALSE); + BOOL closeOnSelect = FALSE, + BOOL skip_agent = FALSE, + const std::string& name = "", + LLView * frustumOrigin = NULL); LLFloaterAvatarPicker(const LLSD& key); virtual ~LLFloaterAvatarPicker(); @@ -63,6 +66,7 @@ public: std::string& tooltip_msg); void openFriendsTab(); + BOOL isExcludeAgentFromSearchResults() {return mExcludeAgentFromSearchResults;} private: void editKeystroke(class LLLineEditor* caller, void* user_data); @@ -84,13 +88,20 @@ private: void setAllowMultiple(BOOL allow_multiple); LLScrollListCtrl* getActiveList(); + void drawFrustum(); virtual void draw(); virtual BOOL handleKeyHere(KEY key, MASK mask); LLUUID mQueryID; - int mNumResultsReturned; + int mNumResultsReturned; BOOL mNearMeListComplete; BOOL mCloseOnSelect; + BOOL mExcludeAgentFromSearchResults; + LLHandle <LLView> mFrustumOrigin; + F32 mContextConeOpacity; + F32 mContextConeInAlpha; + F32 mContextConeOutAlpha; + F32 mContextConeFadeTime; validate_signal_t mOkButtonValidateSignal; select_callback_t mSelectionCallback; diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 90f40628a8..76f62a7880 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -57,6 +57,7 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed) mDone(FALSE) { mID.generate(); + mCommitCallbackRegistrar.add("BulkPermission.Ok", boost::bind(&LLFloaterBulkPermission::onOkBtn, this)); mCommitCallbackRegistrar.add("BulkPermission.Apply", boost::bind(&LLFloaterBulkPermission::onApplyBtn, this)); mCommitCallbackRegistrar.add("BulkPermission.Close", boost::bind(&LLFloaterBulkPermission::onCloseBtn, this)); mCommitCallbackRegistrar.add("BulkPermission.CheckAll", boost::bind(&LLFloaterBulkPermission::onCheckAll, this)); @@ -66,6 +67,21 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed) BOOL LLFloaterBulkPermission::postBuild() { + mBulkChangeIncludeAnimations = gSavedSettings.getBOOL("BulkChangeIncludeAnimations"); + mBulkChangeIncludeBodyParts = gSavedSettings.getBOOL("BulkChangeIncludeBodyParts"); + mBulkChangeIncludeClothing = gSavedSettings.getBOOL("BulkChangeIncludeClothing"); + mBulkChangeIncludeGestures = gSavedSettings.getBOOL("BulkChangeIncludeGestures"); + mBulkChangeIncludeNotecards = gSavedSettings.getBOOL("BulkChangeIncludeNotecards"); + mBulkChangeIncludeObjects = gSavedSettings.getBOOL("BulkChangeIncludeObjects"); + mBulkChangeIncludeScripts = gSavedSettings.getBOOL("BulkChangeIncludeScripts"); + mBulkChangeIncludeSounds = gSavedSettings.getBOOL("BulkChangeIncludeSounds"); + mBulkChangeIncludeTextures = gSavedSettings.getBOOL("BulkChangeIncludeTextures"); + mBulkChangeShareWithGroup = gSavedSettings.getBOOL("BulkChangeShareWithGroup"); + mBulkChangeEveryoneCopy = gSavedSettings.getBOOL("BulkChangeEveryoneCopy"); + mBulkChangeNextOwnerModify = gSavedSettings.getBOOL("BulkChangeNextOwnerModify"); + mBulkChangeNextOwnerCopy = gSavedSettings.getBOOL("BulkChangeNextOwnerCopy"); + mBulkChangeNextOwnerTransfer = gSavedSettings.getBOOL("BulkChangeNextOwnerTransfer"); + return TRUE; } @@ -144,6 +160,12 @@ void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object, } } +void LLFloaterBulkPermission::onOkBtn() +{ + doApply(); + closeFloater(); +} + void LLFloaterBulkPermission::onApplyBtn() { doApply(); @@ -151,6 +173,20 @@ void LLFloaterBulkPermission::onApplyBtn() void LLFloaterBulkPermission::onCloseBtn() { + gSavedSettings.setBOOL("BulkChangeIncludeAnimations", mBulkChangeIncludeAnimations); + gSavedSettings.setBOOL("BulkChangeIncludeBodyParts", mBulkChangeIncludeBodyParts); + gSavedSettings.setBOOL("BulkChangeIncludeClothing", mBulkChangeIncludeClothing); + gSavedSettings.setBOOL("BulkChangeIncludeGestures", mBulkChangeIncludeGestures); + gSavedSettings.setBOOL("BulkChangeIncludeNotecards", mBulkChangeIncludeNotecards); + gSavedSettings.setBOOL("BulkChangeIncludeObjects", mBulkChangeIncludeObjects); + gSavedSettings.setBOOL("BulkChangeIncludeScripts", mBulkChangeIncludeScripts); + gSavedSettings.setBOOL("BulkChangeIncludeSounds", mBulkChangeIncludeSounds); + gSavedSettings.setBOOL("BulkChangeIncludeTextures", mBulkChangeIncludeTextures); + gSavedSettings.setBOOL("BulkChangeShareWithGroup", mBulkChangeShareWithGroup); + gSavedSettings.setBOOL("BulkChangeEveryoneCopy", mBulkChangeEveryoneCopy); + gSavedSettings.setBOOL("BulkChangeNextOwnerModify", mBulkChangeNextOwnerModify); + gSavedSettings.setBOOL("BulkChangeNextOwnerCopy", mBulkChangeNextOwnerCopy); + gSavedSettings.setBOOL("BulkChangeNextOwnerTransfer", mBulkChangeNextOwnerTransfer); closeFloater(); } @@ -336,8 +372,6 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInve void LLFloaterBulkPermission::updateInventory(LLViewerObject* object, LLViewerInventoryItem* item, U8 key, bool is_new) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - // This slices the object into what we're concerned about on the viewer. // The simulator will take the permissions and transfer ownership. LLPointer<LLViewerInventoryItem> task_item = diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h index 7dd05df7ee..25e76eca65 100644 --- a/indra/newview/llfloaterbulkpermission.h +++ b/indra/newview/llfloaterbulkpermission.h @@ -72,6 +72,7 @@ private: bool is_new); void onCloseBtn(); + void onOkBtn(); void onApplyBtn(); void onCommitCopy(); void onCheckAll() { doCheckUncheckAll(TRUE); } @@ -94,6 +95,21 @@ private: LLUUID mCurrentObjectID; BOOL mDone; + bool mBulkChangeIncludeAnimations; + bool mBulkChangeIncludeBodyParts; + bool mBulkChangeIncludeClothing; + bool mBulkChangeIncludeGestures; + bool mBulkChangeIncludeNotecards; + bool mBulkChangeIncludeObjects; + bool mBulkChangeIncludeScripts; + bool mBulkChangeIncludeSounds; + bool mBulkChangeIncludeTextures; + bool mBulkChangeShareWithGroup; + bool mBulkChangeEveryoneCopy; + bool mBulkChangeNextOwnerModify; + bool mBulkChangeNextOwnerCopy; + bool mBulkChangeNextOwnerTransfer; + LLUUID mID; const char* mStartString; diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index bca4b5e447..fffd724b22 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -80,6 +80,7 @@ BOOL LLFloaterBuyContents::postBuild() LLFloaterBuyContents::~LLFloaterBuyContents() { + removeVOInventoryListener(); } @@ -147,23 +148,26 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, return; } - if (!inv) + LLScrollListCtrl* item_list = getChild<LLScrollListCtrl>("item_list"); + if (!item_list) { - llwarns << "No inventory in LLFloaterBuyContents::inventoryChanged" - << llendl; removeVOInventoryListener(); return; } - LLCtrlListInterface *item_list = childGetListInterface("item_list"); - if (!item_list) + item_list->deleteAllItems(); + + if (!inv) { - removeVOInventoryListener(); + llwarns << "No inventory in LLFloaterBuyContents::inventoryChanged" + << llendl; + return; } // default to turning off the buy button. - getChildView("buy_btn")->setEnabled(FALSE); + LLView* buy_btn = getChildView("buy_btn"); + buy_btn->setEnabled(FALSE); LLUUID owner_id; BOOL is_group_owned; @@ -204,7 +208,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, // There will be at least one item shown in the display, so go // ahead and enable the buy button. - getChildView("buy_btn")->setEnabled(TRUE); + buy_btn->setEnabled(TRUE); // Create the line in the list LLSD row; @@ -255,8 +259,6 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, getChildView("wear_check")->setEnabled(TRUE); getChild<LLUICtrl>("wear_check")->setValue(LLSD(false) ); } - - removeVOInventoryListener(); } diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index fa0ad20fdb..62848586cd 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -422,13 +422,14 @@ void LLFloaterBvhPreview::resetMotion() LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); BOOL paused = avatarp->areAnimationsPaused(); - // *TODO: Fix awful casting hack - LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID); - - // Set emotion - std::string emote = getChild<LLUICtrl>("emote_combo")->getValue().asString(); - motionp->setEmote(mIDList[emote]); - + LLKeyframeMotion* motionp = dynamic_cast<LLKeyframeMotion*>(avatarp->findMotion(mMotionID)); + if( motionp ) + { + // Set emotion + std::string emote = getChild<LLUICtrl>("emote_combo")->getValue().asString(); + motionp->setEmote(mIDList[emote]); + } + LLUUID base_id = mIDList[getChild<LLUICtrl>("preview_base_anim")->getValue().asString()]; avatarp->deactivateAllMotions(); avatarp->startMotion(mMotionID, 0.0f); @@ -438,8 +439,12 @@ void LLFloaterBvhPreview::resetMotion() // Set pose std::string handpose = getChild<LLUICtrl>("hand_pose_combo")->getValue().asString(); avatarp->startMotion( ANIM_AGENT_HAND_MOTION, 0.0f ); - motionp->setHandPose(LLHandMotion::getHandPose(handpose)); + if( motionp ) + { + motionp->setHandPose(LLHandMotion::getHandPose(handpose)); + } + if (paused) { mPauseRequest = avatarp->requestPause(); diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 21b58d3e3d..c85d048c5a 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -330,6 +330,10 @@ void LLFloaterCamera::onClose(bool app_quitting) //We don't care of camera mode if app is quitting if(app_quitting) return; + // It is necessary to reset mCurrMode to CAMERA_CTRL_MODE_PAN so + // to avoid seeing an empty floater when reopening the control. + if (mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA) + mCurrMode = CAMERA_CTRL_MODE_PAN; // When mCurrMode is in CAMERA_CTRL_MODE_PAN // switchMode won't modify mPrevMode, so force it here. // It is needed to correctly return to previous mode on open, see EXT-2727. diff --git a/indra/newview/llfloaterchatvoicevolume.cpp b/indra/newview/llfloaterchatvoicevolume.cpp new file mode 100644 index 0000000000..3c76a3a43c --- /dev/null +++ b/indra/newview/llfloaterchatvoicevolume.cpp @@ -0,0 +1,44 @@ +/** + * @file llfloaterchatvoicevolume.cpp + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterchatvoicevolume.h" + +LLFloaterChatVoiceVolume::LLFloaterChatVoiceVolume(const LLSD& key) +: LLInspect(key) +{ +} + +void LLFloaterChatVoiceVolume::onOpen(const LLSD& key) +{ + LLInspect::onOpen(key); + LLUI::positionViewNearMouse(this); +} + +LLFloaterChatVoiceVolume::~LLFloaterChatVoiceVolume() +{ + LLTransientFloaterMgr::getInstance()->removeControlView(this); +}; diff --git a/indra/newview/llfloaterchatvoicevolume.h b/indra/newview/llfloaterchatvoicevolume.h new file mode 100644 index 0000000000..61ad92b6da --- /dev/null +++ b/indra/newview/llfloaterchatvoicevolume.h @@ -0,0 +1,44 @@ +/** + * @file llfloaterchatvoicevolume.h + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLFLOATERCHATVOICEVOLUME_H_ +#define LLFLOATERCHATVOICEVOLUME_H_ + +#include "llinspect.h" +#include "lltransientfloatermgr.h" + +class LLFloaterChatVoiceVolume : public LLInspect, LLTransientFloater +{ +public: + + LLFloaterChatVoiceVolume(const LLSD& key); + virtual ~LLFloaterChatVoiceVolume(); + + virtual void onOpen(const LLSD& key); + + /*virtual*/ LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::GLOBAL; } +}; + +#endif /* LLFLOATERCHATVOICEVOLUME_H_ */ diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 05d73c2416..a03425649f 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -62,10 +62,6 @@ #include <sstream> #include <iomanip> -const F32 CONTEXT_CONE_IN_ALPHA = 0.0f; -const F32 CONTEXT_CONE_OUT_ALPHA = 1.f; -const F32 CONTEXT_FADE_TIME = 0.08f; - ////////////////////////////////////////////////////////////////////////////// // // Class LLFloaterColorPicker @@ -105,7 +101,10 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show mSwatch ( swatch ), mActive ( TRUE ), mCanApplyImmediately ( show_apply_immediate ), - mContextConeOpacity ( 0.f ) + mContextConeOpacity ( 0.f ), + mContextConeInAlpha ( 0.f ), + mContextConeOutAlpha ( 0.f ), + mContextConeFadeTime ( 0.f ) { buildFromFile ( "floater_color_picker.xml"); @@ -117,6 +116,10 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show mApplyImmediateCheck->setEnabled(FALSE); mApplyImmediateCheck->set(FALSE); } + + mContextConeInAlpha = gSavedSettings.getF32("ContextConeInAlpha"); + mContextConeOutAlpha = gSavedSettings.getF32("ContextConeOutAlpha"); + mContextConeFadeTime = gSavedSettings.getF32("ContextConeFadeTime"); } LLFloaterColorPicker::~LLFloaterColorPicker() @@ -172,9 +175,9 @@ void LLFloaterColorPicker::createUI () // void LLFloaterColorPicker::showUI () { + openFloater(getKey()); setVisible ( TRUE ); setFocus ( TRUE ); - openFloater(getKey()); // HACK: if system color picker is required - close the SL one we made and use default system dialog if ( gSavedSettings.getBOOL ( "UseDefaultColorPicker" ) ) @@ -486,37 +489,37 @@ void LLFloaterColorPicker::draw() mSwatch->localRectToOtherView(mSwatch->getLocalRect(), &swatch_rect, this); // draw context cone connecting color picker with color swatch in parent floater LLRect local_rect = getLocalRect(); - if (gFocusMgr.childHasKeyboardFocus(this) && mSwatch->isInVisibleChain() && mContextConeOpacity > 0.001f) + if (hasFocus() && mSwatch->isInVisibleChain() && mContextConeOpacity > 0.001f) { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLGLEnable(GL_CULL_FACE); gGL.begin(LLRender::QUADS); { - gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); + gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity); gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop); gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop); - gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity); + gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity); gGL.vertex2i(local_rect.mRight, local_rect.mTop); gGL.vertex2i(local_rect.mLeft, local_rect.mTop); - gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity); + gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity); gGL.vertex2i(local_rect.mLeft, local_rect.mTop); gGL.vertex2i(local_rect.mLeft, local_rect.mBottom); - gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); + gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity); gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom); gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop); - gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity); + gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity); gGL.vertex2i(local_rect.mRight, local_rect.mBottom); gGL.vertex2i(local_rect.mRight, local_rect.mTop); - gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); + gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity); gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop); gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom); - gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity); + gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity); gGL.vertex2i(local_rect.mLeft, local_rect.mBottom); gGL.vertex2i(local_rect.mRight, local_rect.mBottom); - gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); + gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity); gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom); gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom); } @@ -525,11 +528,12 @@ void LLFloaterColorPicker::draw() if (gFocusMgr.childHasMouseCapture(getDragHandle())) { - mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME)); + mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), + LLCriticalDamp::getInterpolant(mContextConeFadeTime)); } else { - mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME)); + mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(mContextConeFadeTime)); } mPipetteBtn->setToggleState(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance()); diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h index 8e387c4f7c..bab0617712 100644 --- a/indra/newview/llfloatercolorpicker.h +++ b/indra/newview/llfloatercolorpicker.h @@ -189,6 +189,10 @@ class LLFloaterColorPicker LLButton* mPipetteBtn; F32 mContextConeOpacity; + F32 mContextConeInAlpha; + F32 mContextConeOutAlpha; + F32 mContextConeFadeTime; + }; #endif // LL_LLFLOATERCOLORPICKER_H diff --git a/indra/newview/llfloaterconversationlog.cpp b/indra/newview/llfloaterconversationlog.cpp new file mode 100644 index 0000000000..4c910c5655 --- /dev/null +++ b/indra/newview/llfloaterconversationlog.cpp @@ -0,0 +1,134 @@ +/** + * @file llfloaterconversationlog.cpp + * @brief Functionality of the "conversation log" floater + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#include "llviewerprecompiledheaders.h" + +#include "llconversationloglist.h" +#include "llfiltereditor.h" +#include "llfloaterconversationlog.h" +#include "llfloaterreg.h" +#include "llmenubutton.h" + +LLFloaterConversationLog::LLFloaterConversationLog(const LLSD& key) +: LLFloater(key), + mConversationLogList(NULL) +{ + mCommitCallbackRegistrar.add("CallLog.Action", boost::bind(&LLFloaterConversationLog::onCustomAction, this, _2)); + mEnableCallbackRegistrar.add("CallLog.Check", boost::bind(&LLFloaterConversationLog::isActionChecked, this, _2)); +} + +BOOL LLFloaterConversationLog::postBuild() +{ + mConversationLogList = getChild<LLConversationLogList>("conversation_log_list"); + + switch (gSavedSettings.getU32("CallLogSortOrder")) + { + case LLConversationLogList::E_SORT_BY_NAME: + mConversationLogList->sortByName(); + break; + + case LLConversationLogList::E_SORT_BY_DATE: + mConversationLogList->sortByDate(); + break; + } + + // Use the context menu of the Conversation list for the Conversation tab gear menu. + LLToggleableMenu* conversations_gear_menu = mConversationLogList->getContextMenu(); + if (conversations_gear_menu) + { + getChild<LLMenuButton>("conversations_gear_btn")->setMenu(conversations_gear_menu, LLMenuButton::MP_BOTTOM_LEFT); + } + + getChild<LLFilterEditor>("people_filter_input")->setCommitCallback(boost::bind(&LLFloaterConversationLog::onFilterEdit, this, _2)); + + return LLFloater::postBuild(); +} + +void LLFloaterConversationLog::draw() +{ + getChild<LLMenuButton>("conversations_gear_btn")->setEnabled(mConversationLogList->getSelectedItem() != NULL); + LLFloater::draw(); +} + +void LLFloaterConversationLog::onFilterEdit(const std::string& search_string) +{ + std::string filter = search_string; + LLStringUtil::trimHead(filter); + + mConversationLogList->setNameFilter(filter); +} + + +void LLFloaterConversationLog::onCustomAction (const LLSD& userdata) +{ + const std::string command_name = userdata.asString(); + + if ("sort_by_name" == command_name) + { + mConversationLogList->sortByName(); + gSavedSettings.setU32("CallLogSortOrder", LLConversationLogList::E_SORT_BY_NAME); + } + else if ("sort_by_date" == command_name) + { + mConversationLogList->sortByDate(); + gSavedSettings.setU32("CallLogSortOrder", LLConversationLogList::E_SORT_BY_DATE); + } + else if ("sort_friends_on_top" == command_name) + { + mConversationLogList->toggleSortFriendsOnTop(); + } + else if ("view_nearby_chat_history" == command_name) + { + LLFloaterReg::showInstance("preview_conversation", LLSD(LLUUID::null), true); + } +} + +bool LLFloaterConversationLog::isActionEnabled(const LLSD& userdata) +{ + return true; +} + +bool LLFloaterConversationLog::isActionChecked(const LLSD& userdata) +{ + const std::string command_name = userdata.asString(); + + U32 sort_order = gSavedSettings.getU32("CallLogSortOrder"); + + if ("sort_by_name" == command_name) + { + return sort_order == LLConversationLogList::E_SORT_BY_NAME; + } + else if ("sort_by_date" == command_name) + { + return sort_order == LLConversationLogList::E_SORT_BY_DATE; + } + else if ("sort_friends_on_top" == command_name) + { + return gSavedSettings.getBOOL("SortFriendsFirst"); + } + + return false; +} + diff --git a/indra/newview/llfloaterconversationlog.h b/indra/newview/llfloaterconversationlog.h new file mode 100644 index 0000000000..e971330f3d --- /dev/null +++ b/indra/newview/llfloaterconversationlog.h @@ -0,0 +1,56 @@ +/** + * @file llfloaterconversationlog.h + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERCONVERSATIONLOG_H_ +#define LL_LLFLOATERCONVERSATIONLOG_H_ + +#include "llfloater.h" + +class LLConversationLogList; + +class LLFloaterConversationLog : public LLFloater +{ +public: + + LLFloaterConversationLog(const LLSD& key); + virtual ~LLFloaterConversationLog(){}; + + virtual BOOL postBuild(); + + virtual void draw(); + + void onFilterEdit(const std::string& search_string); + +private: + + void onCustomAction (const LLSD& userdata); + bool isActionEnabled(const LLSD& userdata); + bool isActionChecked(const LLSD& userdata); + + LLConversationLogList* mConversationLogList; +}; + + +#endif /* LLFLOATERCONVERSATIONLOG_H_ */ diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp new file mode 100644 index 0000000000..a3d715530d --- /dev/null +++ b/indra/newview/llfloaterconversationpreview.cpp @@ -0,0 +1,186 @@ +/** + * @file llfloaterconversationpreview.cpp + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llconversationlog.h" +#include "llfloaterconversationpreview.h" +#include "llimview.h" +#include "lllineeditor.h" +#include "llfloaterimnearbychat.h" +#include "llspinctrl.h" +#include "lltrans.h" + +const std::string LL_FCP_COMPLETE_NAME("complete_name"); +const std::string LL_FCP_ACCOUNT_NAME("user_name"); + +LLFloaterConversationPreview::LLFloaterConversationPreview(const LLSD& session_id) +: LLFloater(session_id), + mChatHistory(NULL), + mSessionID(session_id.asUUID()), + mCurrentPage(0), + mPageSize(gSavedSettings.getS32("ConversationHistoryPageSize")), + mAccountName(session_id[LL_FCP_ACCOUNT_NAME]), + mCompleteName(session_id[LL_FCP_COMPLETE_NAME]) +{ +} + +BOOL LLFloaterConversationPreview::postBuild() +{ + mChatHistory = getChild<LLChatHistory>("chat_history"); + + const LLConversation* conv = LLConversationLog::instance().getConversation(mSessionID); + std::string name; + std::string file; + + if (mAccountName != "") + { + name = mCompleteName; + file = mAccountName; + } + else if (mSessionID != LLUUID::null && conv) + { + name = conv->getConversationName(); + file = conv->getHistoryFileName(); + } + else + { + name = LLTrans::getString("NearbyChatTitle"); + file = "chat"; + } + + LLStringUtil::format_map_t args; + args["[NAME]"] = name; + std::string title = getString("Title", args); + setTitle(title); + + LLSD load_params; + load_params["load_all_history"] = true; + load_params["cut_off_todays_date"] = false; + + LLLogChat::loadChatHistory(file, mMessages, load_params); + mCurrentPage = mMessages.size() / mPageSize; + + mPageSpinner = getChild<LLSpinCtrl>("history_page_spin"); + mPageSpinner->setCommitCallback(boost::bind(&LLFloaterConversationPreview::onMoreHistoryBtnClick, this)); + mPageSpinner->setMinValue(1); + mPageSpinner->setMaxValue(mCurrentPage + 1); + mPageSpinner->set(mCurrentPage + 1); + + std::string total_page_num = llformat("/ %d", mCurrentPage + 1); + getChild<LLTextBox>("page_num_label")->setValue(total_page_num); + + return LLFloater::postBuild(); +} + +void LLFloaterConversationPreview::draw() +{ + LLFloater::draw(); +} + +void LLFloaterConversationPreview::onOpen(const LLSD& key) +{ + showHistory(); +} + +void LLFloaterConversationPreview::showHistory() +{ + if (!mMessages.size()) + { + return; + } + + mChatHistory->clear(); + + std::ostringstream message; + std::list<LLSD>::const_iterator iter = mMessages.begin(); + + int delta = 0; + if (mCurrentPage) + { + int remainder = mMessages.size() % mPageSize; + delta = (remainder == 0) ? 0 : (mPageSize - remainder); + } + + std::advance(iter, (mCurrentPage * mPageSize) - delta); + + for (int msg_num = 0; (iter != mMessages.end() && msg_num < mPageSize); ++iter, ++msg_num) + { + LLSD msg = *iter; + + LLUUID from_id = LLUUID::null; + std::string time = msg["time"].asString(); + std::string from = msg["from"].asString(); + std::string message = msg["message"].asString(); + + if (msg["from_id"].isDefined()) + { + from_id = msg["from_id"].asUUID(); + } + else + { + std::string legacy_name = gCacheName->buildLegacyName(from); + gCacheName->getUUID(legacy_name, from_id); + } + + LLChat chat; + chat.mFromID = from_id; + chat.mSessionID = mSessionID; + chat.mFromName = from; + chat.mTimeStr = time; + chat.mChatStyle = CHAT_STYLE_HISTORY; + chat.mText = message; + + if (from_id.isNull() && SYSTEM_FROM == from) + { + chat.mSourceType = CHAT_SOURCE_SYSTEM; + + } + else if (from_id.isNull()) + { + chat.mSourceType = LLFloaterIMNearbyChat::isWordsName(from) ? CHAT_SOURCE_UNKNOWN : CHAT_SOURCE_OBJECT; + } + + LLSD chat_args; + chat_args["use_plain_text_chat_history"] = + gSavedSettings.getBOOL("PlainTextChatHistory"); + chat_args["show_time"] = gSavedSettings.getBOOL("IMShowTime"); + chat_args["show_names_for_p2p_conv"] = gSavedSettings.getBOOL("IMShowNamesForP2PConv"); + + mChatHistory->appendMessage(chat,chat_args); + } + +} + +void LLFloaterConversationPreview::onMoreHistoryBtnClick() +{ + mCurrentPage = (int)(mPageSpinner->getValueF32()); + if (--mCurrentPage < 0) + { + return; + } + + showHistory(); +} diff --git a/indra/newview/llfloaterconversationpreview.h b/indra/newview/llfloaterconversationpreview.h new file mode 100644 index 0000000000..b17ae84b63 --- /dev/null +++ b/indra/newview/llfloaterconversationpreview.h @@ -0,0 +1,64 @@ +/** + * @file llfloaterconversationpreview.h + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLFLOATERCONVERSATIONPREVIEW_H_ +#define LLFLOATERCONVERSATIONPREVIEW_H_ + +#include "llchathistory.h" +#include "llfloater.h" + +extern const std::string LL_FCP_COMPLETE_NAME; //"complete_name" +extern const std::string LL_FCP_ACCOUNT_NAME; //"user_name" + +class LLSpinCtrl; + +class LLFloaterConversationPreview : public LLFloater +{ +public: + + LLFloaterConversationPreview(const LLSD& session_id); + virtual ~LLFloaterConversationPreview(){}; + + virtual BOOL postBuild(); + + virtual void draw(); + virtual void onOpen(const LLSD& key); + +private: + void onMoreHistoryBtnClick(); + void showHistory(); + + LLSpinCtrl* mPageSpinner; + LLChatHistory* mChatHistory; + LLUUID mSessionID; + int mCurrentPage; + int mPageSize; + + std::list<LLSD> mMessages; + std::string mAccountName; + std::string mCompleteName; +}; + +#endif /* LLFLOATERCONVERSATIONPREVIEW_H_ */ diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index ac8f107928..e2cef5630b 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -44,7 +44,7 @@ class LLFloaterDisplayName : public LLFloater { public: LLFloaterDisplayName(const LLSD& key); - virtual ~LLFloaterDisplayName() {}; + virtual ~LLFloaterDisplayName() { } /*virtual*/ BOOL postBuild(); void onSave(); void onReset(); @@ -58,8 +58,8 @@ private: const LLSD& content); }; -LLFloaterDisplayName::LLFloaterDisplayName(const LLSD& key) - : LLFloater(key) +LLFloaterDisplayName::LLFloaterDisplayName(const LLSD& key) : + LLFloater(key) { } @@ -122,10 +122,6 @@ void LLFloaterDisplayName::onCacheSetName(bool success, LLSD args; args["DISPLAY_NAME"] = content["display_name"]; LLNotificationsUtil::add("SetDisplayNameSuccess", args); - - // Re-fetch my name, as it may have been sanitized by the service - //LLAvatarNameCache::get(getAvatarId(), - // boost::bind(&LLPanelMyProfileEdit::onNameCache, this, _1, _2)); return; } @@ -164,10 +160,9 @@ void LLFloaterDisplayName::onCancel() void LLFloaterDisplayName::onReset() { - if (LLAvatarNameCache::useDisplayNames()) + if (LLAvatarNameCache::hasNameLookupURL()) { - LLViewerDisplayName::set("", - boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3)); + LLViewerDisplayName::set("",boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3)); } else { @@ -199,10 +194,9 @@ void LLFloaterDisplayName::onSave() return; } - if (LLAvatarNameCache::useDisplayNames()) + if (LLAvatarNameCache::hasNameLookupURL()) { - LLViewerDisplayName::set(display_name_utf8, - boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3)); + LLViewerDisplayName::set(display_name_utf8,boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3)); } else { diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index fb905eae11..38abdcc830 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -1123,11 +1123,13 @@ bool LLPanelObjectTools::callbackSimWideDeletes( const LLSD& notification, const void LLPanelObjectTools::onClickSet() { - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelObjectTools::callbackAvatarID, this, _1,_2)); + LLView * button = findChild<LLButton>("Set Target"); + LLFloater * root_floater = gFloaterView->getParentFloater(this); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelObjectTools::callbackAvatarID, this, _1,_2), FALSE, FALSE, FALSE, root_floater->getName(), button); // grandparent is a floater, which can have a dependent if (picker) { - gFloaterView->getParentFloater(this)->addDependentFloater(picker); + root_floater->addDependentFloater(picker); } } diff --git a/indra/newview/llfloaterhelpbrowser.cpp b/indra/newview/llfloaterhelpbrowser.cpp index fd9c37ae73..4cb632bd6a 100644 --- a/indra/newview/llfloaterhelpbrowser.cpp +++ b/indra/newview/llfloaterhelpbrowser.cpp @@ -77,15 +77,7 @@ void LLFloaterHelpBrowser::onOpen(const LLSD& key) gSavedSettings.setBOOL("HelpFloaterOpen", TRUE); std::string topic = key.asString(); - - if (topic == "__local") - { - mBrowser->navigateToLocalPage( "help-offline" , "index.html" ); - } - else - { - mBrowser->navigateTo(LLViewerHelp::instance().getURL(topic)); - } + mBrowser->navigateTo(LLViewerHelp::instance().getURL(topic)); } //virtual diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 6b2492d927..2575f6f817 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -901,11 +901,13 @@ BOOL LLImagePreviewSculpted::render() { gObjectPreviewProgram.bind(); } + gPipeline.enableLightsPreview(); + gGL.pushMatrix(); const F32 SCALE = 1.25f; gGL.scalef(SCALE, SCALE, SCALE); const F32 BRIGHTNESS = 0.9f; - gGL.color3f(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS); + gGL.diffuseColor3f(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS); mVertexBuffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0); mVertexBuffer->draw(LLRender::TRIANGLES, num_indices, 0); diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp new file mode 100644 index 0000000000..5e0cd8ef78 --- /dev/null +++ b/indra/newview/llfloaterimcontainer.cpp @@ -0,0 +1,1982 @@ +/** + * @file llfloaterimcontainer.cpp + * @brief Multifloater containing active IM sessions in separate tab container tabs + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterimsession.h" +#include "llfloaterimcontainer.h" + +#include "llfloaterreg.h" +#include "lllayoutstack.h" +#include "llfloaterimnearbychat.h" + +#include "llagent.h" +#include "llavataractions.h" +#include "llavatariconctrl.h" +#include "llavatarnamecache.h" +#include "llcallbacklist.h" +#include "lldonotdisturbnotificationstorage.h" +#include "llgroupactions.h" +#include "llgroupiconctrl.h" +#include "llflashtimer.h" +#include "llfloateravatarpicker.h" +#include "llfloaterpreference.h" +#include "llimview.h" +#include "llnotificationsutil.h" +#include "lltransientfloatermgr.h" +#include "llviewercontrol.h" +#include "llconversationview.h" +#include "llcallbacklist.h" +#include "llworld.h" +#include "llsdserialize.h" +#include "llviewerobjectlist.h" + +// +// LLFloaterIMContainer +// +LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& params /*= getDefaultParams()*/) +: LLMultiFloater(seed, params), + mExpandCollapseBtn(NULL), + mConversationsRoot(NULL), + mConversationsEventStream("ConversationsEvents"), + mInitialized(false) +{ + mEnableCallbackRegistrar.add("IMFloaterContainer.Check", boost::bind(&LLFloaterIMContainer::isActionChecked, this, _2)); + mCommitCallbackRegistrar.add("IMFloaterContainer.Action", boost::bind(&LLFloaterIMContainer::onCustomAction, this, _2)); + + mEnableCallbackRegistrar.add("Avatar.CheckItem", boost::bind(&LLFloaterIMContainer::checkContextMenuItem, this, _2)); + mEnableCallbackRegistrar.add("Avatar.EnableItem", boost::bind(&LLFloaterIMContainer::enableContextMenuItem, this, _2)); + mEnableCallbackRegistrar.add("Avatar.VisibleItem", boost::bind(&LLFloaterIMContainer::visibleContextMenuItem, this, _2)); + mCommitCallbackRegistrar.add("Avatar.DoToSelected", boost::bind(&LLFloaterIMContainer::doToSelected, this, _2)); + + mCommitCallbackRegistrar.add("Group.DoToSelected", boost::bind(&LLFloaterIMContainer::doToSelectedGroup, this, _2)); + + // Firstly add our self to IMSession observers, so we catch session events + LLIMMgr::getInstance()->addSessionObserver(this); + + mAutoResize = FALSE; + LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this); +} + +LLFloaterIMContainer::~LLFloaterIMContainer() +{ + mConversationsEventStream.stopListening("ConversationsRefresh"); + + gIdleCallbacks.deleteFunction(idle, this); + + mNewMessageConnection.disconnect(); + LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this); + + if (mMicroChangedSignal.connected()) + { + mMicroChangedSignal.disconnect(); + } + + gSavedPerAccountSettings.setBOOL("ConversationsListPaneCollapsed", mConversationsPane->isCollapsed()); + gSavedPerAccountSettings.setBOOL("ConversationsMessagePaneCollapsed", mMessagesPane->isCollapsed()); + + if (!LLSingleton<LLIMMgr>::destroyed()) + { + LLIMMgr::getInstance()->removeSessionObserver(this); + } +} + +void LLFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) +{ + addConversationListItem(session_id); + LLFloaterIMSessionTab::addToHost(session_id); +} + +void LLFloaterIMContainer::sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) +{ + selectConversationPair(session_id, true); + collapseMessagesPane(false); +} + +void LLFloaterIMContainer::sessionVoiceOrIMStarted(const LLUUID& session_id) +{ + addConversationListItem(session_id); + LLFloaterIMSessionTab::addToHost(session_id); +} + +void LLFloaterIMContainer::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) +{ + // The general strategy when a session id is modified is to delete all related objects and create them anew. + + // Note however that the LLFloaterIMSession has its session id updated through a call to sessionInitReplyReceived() + // and do not need to be deleted and recreated (trying this creates loads of problems). We do need however to suppress + // its related mSessions record as it's indexed with the wrong id. + // Grabbing the updated LLFloaterIMSession and readding it in mSessions will eventually be done by addConversationListItem(). + mSessions.erase(old_session_id); + + // Delete the model and participants related to the old session + bool change_focus = removeConversationListItem(old_session_id); + + // Create a new conversation with the new id + addConversationListItem(new_session_id, change_focus); + LLFloaterIMSessionTab::addToHost(new_session_id); +} + +void LLFloaterIMContainer::sessionRemoved(const LLUUID& session_id) +{ + removeConversationListItem(session_id); +} + +// static +void LLFloaterIMContainer::onCurrentChannelChanged(const LLUUID& session_id) +{ + if (session_id != LLUUID::null) + { + LLFloaterIMContainer::getInstance()->showConversation(session_id); + } +} + +BOOL LLFloaterIMContainer::postBuild() +{ + mOrigMinWidth = getMinWidth(); + mOrigMinHeight = getMinHeight(); + + mNewMessageConnection = LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLFloaterIMContainer::onNewMessageReceived, this, _1)); + // Do not call base postBuild to not connect to mCloseSignal to not close all floaters via Close button + // mTabContainer will be initialized in LLMultiFloater::addChild() + + setTabContainer(getChild<LLTabContainer>("im_box_tab_container")); + mStubPanel = getChild<LLPanel>("stub_panel"); + mStubTextBox = getChild<LLTextBox>("stub_textbox"); + mStubTextBox->setURLClickedCallback(boost::bind(&LLFloaterIMContainer::returnFloaterToHost, this)); + + mConversationsStack = getChild<LLLayoutStack>("conversations_stack"); + mConversationsPane = getChild<LLLayoutPanel>("conversations_layout_panel"); + mMessagesPane = getChild<LLLayoutPanel>("messages_layout_panel"); + + mConversationsListPanel = getChild<LLPanel>("conversations_list_panel"); + + // Open IM session with selected participant on double click event + mConversationsListPanel->setDoubleClickCallback(boost::bind(&LLFloaterIMContainer::doToSelected, this, LLSD("im"))); + + // The resize limits for LLFloaterIMContainer should be updated, based on current values of width of conversation and message panels + mConversationsPane->getResizeBar()->setResizeListener(boost::bind(&LLFloaterIMContainer::assignResizeLimits, this)); + + // Create the root model and view for all conversation sessions + LLConversationItem* base_item = new LLConversationItem(getRootViewModel()); + + LLFolderView::Params p(LLUICtrlFactory::getDefaultParams<LLFolderView>()); + p.name = getName(); + p.title = getLabel(); + p.rect = LLRect(0, 0, getRect().getWidth(), 0); + p.parent_panel = mConversationsListPanel; + p.tool_tip = p.name; + p.listener = base_item; + p.view_model = &mConversationViewModel; + p.root = NULL; + p.use_ellipses = true; + p.options_menu = "menu_conversation.xml"; + mConversationsRoot = LLUICtrlFactory::create<LLFolderView>(p); + mConversationsRoot->setCallbackRegistrar(&mCommitCallbackRegistrar); + + // Add listener to conversation model events + mConversationsEventStream.listen("ConversationsRefresh", boost::bind(&LLFloaterIMContainer::onConversationModelEvent, this, _1)); + + // a scroller for folder view + LLRect scroller_view_rect = mConversationsListPanel->getRect(); + scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); + LLScrollContainer::Params scroller_params(LLUICtrlFactory::getDefaultParams<LLFolderViewScrollContainer>()); + scroller_params.rect(scroller_view_rect); + + LLScrollContainer* scroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroller_params); + scroller->setFollowsAll(); + mConversationsListPanel->addChild(scroller); + scroller->addChild(mConversationsRoot); + mConversationsRoot->setScrollContainer(scroller); + mConversationsRoot->setFollowsAll(); + mConversationsRoot->addChild(mConversationsRoot->mStatusTextBox); + + addConversationListItem(LLUUID()); // manually add nearby chat + + mExpandCollapseBtn = getChild<LLButton>("expand_collapse_btn"); + mExpandCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onExpandCollapseButtonClicked, this)); + mStubCollapseBtn = getChild<LLButton>("stub_collapse_btn"); + mStubCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onStubCollapseButtonClicked, this)); + getChild<LLButton>("speak_btn")->setClickedCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonClicked, this)); + + childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this)); + + collapseMessagesPane(gSavedPerAccountSettings.getBOOL("ConversationsMessagePaneCollapsed")); + collapseConversationsPane(gSavedPerAccountSettings.getBOOL("ConversationsListPaneCollapsed"), false); + LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate, false)); + mMicroChangedSignal = LLVoiceClient::getInstance()->MicroChangedCallback(boost::bind(&LLFloaterIMContainer::updateSpeakBtnState, this)); + + if (! mMessagesPane->isCollapsed() && ! mConversationsPane->isCollapsed()) + { + S32 conversations_panel_width = gSavedPerAccountSettings.getS32("ConversationsListPaneWidth"); + LLRect conversations_panel_rect = mConversationsPane->getRect(); + conversations_panel_rect.mRight = conversations_panel_rect.mLeft + conversations_panel_width; + mConversationsPane->handleReshape(conversations_panel_rect, TRUE); + } + + // Init the sort order now that the root had been created + setSortOrder(LLConversationSort(gSavedSettings.getU32("ConversationSortOrder"))); + + // Keep the xml set title around for when we have to overwrite it + mGeneralTitle = getTitle(); + + mInitialized = true; + + // Add callbacks: + // We'll take care of view updates on idle + gIdleCallbacks.addFunction(idle, this); + // When display name option change, we need to reload all participant names + LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLFloaterIMContainer::processParticipantsStyleUpdate, this)); + + return TRUE; +} + +void LLFloaterIMContainer::onOpen(const LLSD& key) +{ + LLMultiFloater::onOpen(key); + openNearbyChat(); + reSelectConversation(); + assignResizeLimits(); +} + +// virtual +void LLFloaterIMContainer::addFloater(LLFloater* floaterp, + BOOL select_added_floater, + LLTabContainer::eInsertionPoint insertion_point) +{ + if(!floaterp) return; + + // already here + if (floaterp->getHost() == this) + { + openFloater(floaterp->getKey()); + return; + } + + LLUUID session_id = floaterp->getKey(); + + // Add the floater + LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point); + + + + LLIconCtrl* icon = 0; + + if(gAgent.isInGroup(session_id, TRUE)) + { + LLGroupIconCtrl::Params icon_params; + icon_params.group_id = session_id; + icon = LLUICtrlFactory::instance().create<LLGroupIconCtrl>(icon_params); + + mSessions[session_id] = floaterp; + floaterp->mCloseSignal.connect(boost::bind(&LLFloaterIMContainer::onCloseFloater, this, session_id)); + } + else + { LLUUID avatar_id = session_id.notNull()? + LLIMModel::getInstance()->getOtherParticipantID(session_id) : LLUUID(); + + LLAvatarIconCtrl::Params icon_params; + icon_params.avatar_id = avatar_id; + icon = LLUICtrlFactory::instance().create<LLAvatarIconCtrl>(icon_params); + + mSessions[session_id] = floaterp; + floaterp->mCloseSignal.connect(boost::bind(&LLFloaterIMContainer::onCloseFloater, this, session_id)); + } + + // forced resize of the floater + LLRect wrapper_rect = this->mTabContainer->getLocalRect(); + floaterp->setRect(wrapper_rect); + + mTabContainer->setTabImage(floaterp, icon); +} + + +void LLFloaterIMContainer::onCloseFloater(LLUUID& id) +{ + mSessions.erase(id); + setFocus(TRUE); +} + +void LLFloaterIMContainer::onNewMessageReceived(const LLSD& data) +{ + LLUUID session_id = data["session_id"].asUUID(); + LLFloater* floaterp = get_ptr_in_map(mSessions, session_id); + LLFloater* current_floater = LLMultiFloater::getActiveFloater(); + + if(floaterp && current_floater && floaterp != current_floater) + { + if(LLMultiFloater::isFloaterFlashing(floaterp)) + LLMultiFloater::setFloaterFlashing(floaterp, FALSE); + LLMultiFloater::setFloaterFlashing(floaterp, TRUE); + } +} + +void LLFloaterIMContainer::onStubCollapseButtonClicked() +{ + collapseMessagesPane(true); +} + +void LLFloaterIMContainer::onSpeakButtonClicked() +{ + LLAgent::toggleMicrophone("speak"); + updateSpeakBtnState(); +} +void LLFloaterIMContainer::onExpandCollapseButtonClicked() +{ + if (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed() + && gSavedPerAccountSettings.getBOOL("ConversationsExpandMessagePaneFirst")) + { + // Expand the messages pane from ultra minimized state + // if it was collapsed last in order. + collapseMessagesPane(false); + } + else + { + collapseConversationsPane(!mConversationsPane->isCollapsed()); + } + reSelectConversation(); +} + +LLFloaterIMContainer* LLFloaterIMContainer::findInstance() +{ + return LLFloaterReg::findTypedInstance<LLFloaterIMContainer>("im_container"); +} + +LLFloaterIMContainer* LLFloaterIMContainer::getInstance() +{ + return LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); +} + +// Update all participants in the conversation lists +void LLFloaterIMContainer::processParticipantsStyleUpdate() +{ + // On each session in mConversationsItems + for (conversations_items_map::iterator it_session = mConversationsItems.begin(); it_session != mConversationsItems.end(); it_session++) + { + // Get the current session descriptors + LLConversationItem* session_model = it_session->second; + // Iterate through each model participant child + LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = session_model->getChildrenBegin(); + LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = session_model->getChildrenEnd(); + while (current_participant_model != end_participant_model) + { + LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(*current_participant_model); + // Get the avatar name for this participant id from the cache and update the model + participant_model->updateName(); + // Next participant + current_participant_model++; + } + } +} + +// static +void LLFloaterIMContainer::idle(void* user_data) +{ + LLFloaterIMContainer* self = static_cast<LLFloaterIMContainer*>(user_data); + + // Update the distance to agent in the nearby chat session if required + // Note: it makes no sense of course to update the distance in other session + if (self->mConversationViewModel.getSorter().getSortOrderParticipants() == LLConversationFilter::SO_DISTANCE) + { + self->setNearbyDistances(); + } + self->mConversationsRoot->update(); +} + +bool LLFloaterIMContainer::onConversationModelEvent(const LLSD& event) +{ + // For debug only + //std::ostringstream llsd_value; + //llsd_value << LLSDOStreamer<LLSDNotationFormatter>(event) << std::endl; + //llinfos << "LLFloaterIMContainer::onConversationModelEvent, event = " << llsd_value.str() << llendl; + // end debug + + // Note: In conversations, the model is not responsible for creating the view, which is a good thing. This means that + // the model could change substantially and the view could echo only a portion of this model (though currently the + // conversation view does echo the conversation model 1 to 1). + // Consequently, the participant views need to be created either by the session view or by the container panel. + // For the moment, we create them here, at the container level, to conform to the pattern implemented in llinventorypanel.cpp + // (see LLInventoryPanel::buildNewViews()). + + std::string type = event.get("type").asString(); + LLUUID session_id = event.get("session_uuid").asUUID(); + LLUUID participant_id = event.get("participant_uuid").asUUID(); + + LLConversationViewSession* session_view = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,session_id)); + if (!session_view) + { + // We skip events that are not associated with a session + return false; + } + LLConversationViewParticipant* participant_view = session_view->findParticipant(participant_id); + LLFloaterIMSessionTab *conversation_floater = (session_id.isNull() ? + (LLFloaterIMSessionTab*)(LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")) + : (LLFloaterIMSessionTab*)(LLFloaterIMSession::findInstance(session_id))); + + if (type == "remove_participant") + { + // Remove a participant view from the hierarchical conversation list + if (participant_view) + { + session_view->extractItem(participant_view); + delete participant_view; + session_view->refresh(); + mConversationsRoot->arrangeAll(); + } + // Remove a participant view from the conversation floater + if (conversation_floater) + { + conversation_floater->removeConversationViewParticipant(participant_id); + } + } + else if (type == "add_participant") + { + LLConversationItemSession* session_model = dynamic_cast<LLConversationItemSession*>(mConversationsItems[session_id]); + LLConversationItemParticipant* participant_model = (session_model ? session_model->findParticipant(participant_id) : NULL); + if (!participant_view && session_model && participant_model) + { + LLIMModel::LLIMSession * im_sessionp = LLIMModel::getInstance()->findIMSession(session_id); + if (session_id.isNull() || (im_sessionp && !im_sessionp->isP2PSessionType())) + { + participant_view = createConversationViewParticipant(participant_model); + participant_view->addToFolder(session_view); + participant_view->setVisible(TRUE); + } + } + // Add a participant view to the conversation floater + if (conversation_floater && participant_model) + { + conversation_floater->addConversationViewParticipant(participant_model); + } + } + else if (type == "update_participant") + { + // Update the participant view in the hierarchical conversation list + if (participant_view) + { + participant_view->refresh(); + } + // Update the participant view in the conversation floater + if (conversation_floater) + { + conversation_floater->updateConversationViewParticipant(participant_id); + } + } + else if (type == "update_session") + { + session_view->refresh(); + } + + mConversationViewModel.requestSortAll(); + mConversationsRoot->arrangeAll(); + if (conversation_floater) + { + conversation_floater->refreshConversation(); + } + + return false; +} + +void LLFloaterIMContainer::draw() +{ + if (mTabContainer->getTabCount() == 0) + { + // Do not close the container when every conversation is torn off because the user + // still needs the conversation list. Simply collapse the message pane in that case. + collapseMessagesPane(true); + } + + const LLConversationItem *current_session = getCurSelectedViewModelItem(); + if (current_session) + { + // Update moderator options visibility + LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = current_session->getChildrenBegin(); + LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = current_session->getChildrenEnd(); + while (current_participant_model != end_participant_model) + { + LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(*current_participant_model); + participant_model->setModeratorOptionsVisible(isGroupModerator() && participant_model->getUUID() != gAgentID); + + current_participant_model++; + } + // Update floater's title as required by the currently selected session or use the default title + LLFloaterIMSession * conversation_floaterp = LLFloaterIMSession::findInstance(current_session->getUUID()); + setTitle(conversation_floaterp && conversation_floaterp->needsTitleOverwrite() ? conversation_floaterp->getTitle() : mGeneralTitle); + } + + // "Manually" resize of mConversationsPane: same as temporarity cancellation of the flag "auto_resize=false" for it + if (!mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed()) + { + LLRect stack_rect = mConversationsStack->getRect(); + mConversationsPane->reshape(stack_rect.getWidth(), stack_rect.getHeight(), true); + } + + LLFloater::draw(); +} + +void LLFloaterIMContainer::tabClose() +{ + if (mTabContainer->getTabCount() == 0) + { + // Do not close the container when every conversation is torn off because the user + // still needs the conversation list. Simply collapse the message pane in that case. + collapseMessagesPane(true); + } +} + +//Shows/hides the stub panel when a conversation floater is torn off +void LLFloaterIMContainer::showStub(bool stub_is_visible) +{ + S32 tabCount = 0; + LLPanel * tabPanel = NULL; + + if(stub_is_visible) + { + tabCount = mTabContainer->getTabCount(); + + //Hide all tabs even stub + for(S32 i = 0; i < tabCount; ++i) + { + tabPanel = mTabContainer->getPanelByIndex(i); + + if(tabPanel) + { + tabPanel->setVisible(false); + } + } + + //Set the index to the stub panel since we will be showing the stub + mTabContainer->setCurrentPanelIndex(0); + } + + //Now show/hide the stub + mStubPanel->setVisible(stub_is_visible); +} + +// listener for click on mStubTextBox2 +void LLFloaterIMContainer::returnFloaterToHost() +{ + LLUUID session_id = this->getSelectedSession(); + LLFloaterIMSessionTab* floater = LLFloaterIMSessionTab::getConversation(session_id); + floater->onTearOffClicked(); +} + +void LLFloaterIMContainer::setVisible(BOOL visible) +{ LLFloaterIMNearbyChat* nearby_chat; + if (visible) + { + // Make sure we have the Nearby Chat present when showing the conversation container + nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + if (nearby_chat == NULL) + { + // If not found, force the creation of the nearby chat conversation panel + // *TODO: find a way to move this to XML as a default panel or something like that + LLSD name("nearby_chat"); + LLFloaterReg::toggleInstanceOrBringToFront(name); + setSelectedSession(LLUUID(NULL)); + } + openNearbyChat(); + selectConversationPair(getSelectedSession(), false, false); + } + + nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + if (nearby_chat) + { + LLFloaterIMSessionTab::addToHost(LLUUID()); + } + + // We need to show/hide all the associated conversations that have been torn off + // (and therefore, are not longer managed by the multifloater), + // so that they show/hide with the conversations manager. + conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); + for (;widget_it != mConversationsWidgets.end(); ++widget_it) + { + LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second); + if (widget) + { + widget->setVisibleIfDetached(visible); + } + } + + // Now, do the normal multifloater show/hide + LLMultiFloater::setVisible(visible); +} + +void LLFloaterIMContainer::updateResizeLimits() +{ + LLMultiFloater::updateResizeLimits(); + assignResizeLimits(); +} + +void LLFloaterIMContainer::collapseMessagesPane(bool collapse) +{ + if (mMessagesPane->isCollapsed() == collapse) + { + return; + } + + // Save current width of panels before collapsing/expanding right pane. + S32 conv_pane_width = mConversationsPane->getRect().getWidth(); + S32 msg_pane_width = mMessagesPane->getRect().getWidth(); + + if (collapse) + { + // Save the messages pane width before collapsing it. + gSavedPerAccountSettings.setS32("ConversationsMessagePaneWidth", msg_pane_width); + + // Save the order in which the panels are closed to reverse user's last action. + gSavedPerAccountSettings.setBOOL("ConversationsExpandMessagePaneFirst", mConversationsPane->isCollapsed()); + } + + mConversationsPane->setIgnoreReshape(collapse); + + // Show/hide the messages pane. + mConversationsStack->collapsePanel(mMessagesPane, collapse); + + // Make sure layout is updated before resizing conversation pane. + mConversationsStack->updateLayout(); + + reshapeFloaterAndSetResizeLimits(collapse, gSavedPerAccountSettings.getS32("ConversationsMessagePaneWidth")); + + if (!collapse) + { + // Restore conversation's pane previous width after expanding messages pane. + mConversationsPane->setTargetDim(conv_pane_width); + } +} + +void LLFloaterIMContainer::collapseConversationsPane(bool collapse, bool save_is_allowed /*=true*/) +{ + if (mConversationsPane->isCollapsed() == collapse) + { + return; + } + + LLView* button_panel = getChild<LLView>("conversations_pane_buttons_expanded"); + button_panel->setVisible(!collapse); + mExpandCollapseBtn->setImageOverlay(getString(collapse ? "expand_icon" : "collapse_icon")); + + // Save current width of Conversation panel before collapsing/expanding right pane. + S32 conv_pane_width = mConversationsPane->getRect().getWidth(); + + if (collapse && save_is_allowed) + { + // Save the conversations pane width before collapsing it. + gSavedPerAccountSettings.setS32("ConversationsListPaneWidth", conv_pane_width); + + // Save the order in which the panels are closed to reverse user's last action. + gSavedPerAccountSettings.setBOOL("ConversationsExpandMessagePaneFirst", !mMessagesPane->isCollapsed()); + } + + mConversationsStack->collapsePanel(mConversationsPane, collapse); + if (!collapse) + { + // Make sure layout is updated before resizing conversation pane. + mConversationsStack->updateLayout(); + // Restore conversation's pane previous width. + mConversationsPane->setTargetDim(gSavedPerAccountSettings.getS32("ConversationsListPaneWidth")); + } + + S32 delta_width = + gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") - mConversationsPane->getMinDim(); + + reshapeFloaterAndSetResizeLimits(collapse, delta_width); + + for (conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); + widget_it != mConversationsWidgets.end(); ++widget_it) + { + LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second); + if (widget) + { + widget->toggleCollapsedMode(collapse); + + // force closing all open conversations when collapsing to minimized state + if (collapse) + { + widget->setOpen(false); + } + widget->requestArrange(); + } + } +} + +void LLFloaterIMContainer::reshapeFloaterAndSetResizeLimits(bool collapse, S32 delta_width) +{ + LLRect floater_rect = getRect(); + floater_rect.mRight += ((collapse ? -1 : 1) * delta_width); + + // Set by_user = true so that reshaped rect is saved in user_settings. + setShape(floater_rect, true); + updateResizeLimits(); + + bool at_least_one_panel_is_expanded = + ! (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed()); + + setCanResize(at_least_one_panel_is_expanded); + setCanMinimize(at_least_one_panel_is_expanded); + + assignResizeLimits(); + + // force set correct size for the title after show/hide minimize button + LLRect cur_rect = getRect(); + LLRect force_rect = cur_rect; + force_rect.mRight = cur_rect.mRight + 1; + setRect(force_rect); + setRect(cur_rect); +} + +void LLFloaterIMContainer::assignResizeLimits() +{ + bool is_conv_pane_expanded = !mConversationsPane->isCollapsed(); + bool is_msg_pane_expanded = !mMessagesPane->isCollapsed(); + + // With two panels visible number of borders is three, because the borders + // between the panels are merged into one + S32 number_of_visible_borders = llmin((is_conv_pane_expanded? 2 : 0) + (is_msg_pane_expanded? 2 : 0), 3); + S32 summary_width_of_visible_borders = number_of_visible_borders * LLPANEL_BORDER_WIDTH; + S32 conv_pane_target_width = is_conv_pane_expanded? + (is_msg_pane_expanded? + mConversationsPane->getRect().getWidth() + : mConversationsPane->getExpandedMinDim()) + : mConversationsPane->getMinDim(); + S32 msg_pane_min_width = is_msg_pane_expanded ? mMessagesPane->getExpandedMinDim() : 0; + S32 new_min_width = conv_pane_target_width + msg_pane_min_width + summary_width_of_visible_borders; + + setResizeLimits(new_min_width, getMinHeight()); + + mConversationsStack->updateLayout(); +} + +void LLFloaterIMContainer::onAddButtonClicked() +{ + LLView * button = findChild<LLView>("conversations_pane_buttons_expanded")->findChild<LLButton>("add_btn"); + LLFloater* root_floater = gFloaterView->getParentFloater(this); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), TRUE, TRUE, TRUE, root_floater->getName(), button); + + if (picker && root_floater) + { + root_floater->addDependentFloater(picker); + } +} + +void LLFloaterIMContainer::onAvatarPicked(const uuid_vec_t& ids) +{ + if (ids.size() == 1) + { + LLAvatarActions::startIM(ids.back()); + } + else + { + LLAvatarActions::startConference(ids); + } +} + +void LLFloaterIMContainer::onCustomAction(const LLSD& userdata) +{ + std::string command = userdata.asString(); + + if ("sort_sessions_by_type" == command) + { + setSortOrderSessions(LLConversationFilter::SO_SESSION_TYPE); + } + if ("sort_sessions_by_name" == command) + { + setSortOrderSessions(LLConversationFilter::SO_NAME); + } + if ("sort_sessions_by_recent" == command) + { + setSortOrderSessions(LLConversationFilter::SO_DATE); + } + if ("sort_participants_by_name" == command) + { + setSortOrderParticipants(LLConversationFilter::SO_NAME); + } + if ("sort_participants_by_recent" == command) + { + setSortOrderParticipants(LLConversationFilter::SO_DATE); + } + if ("sort_participants_by_distance" == command) + { + setSortOrderParticipants(LLConversationFilter::SO_DISTANCE); + } + if ("chat_preferences" == command) + { + LLFloaterPreference * floater_prefp = LLFloaterReg::showTypedInstance<LLFloaterPreference>("preferences"); + if (floater_prefp) + { + floater_prefp->selectChatPanel(); + } + } + if ("privacy_preferences" == command) + { + LLFloaterPreference * floater_prefp = LLFloaterReg::showTypedInstance<LLFloaterPreference>("preferences"); + if (floater_prefp) + { + floater_prefp->selectPrivacyPanel(); + } + } + if ("Translating.Toggle" == command) + { + gSavedSettings.setBOOL("TranslateChat", !gSavedSettings.getBOOL("TranslateChat")); + } +} + +BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata) +{ + LLConversationSort order = mConversationViewModel.getSorter(); + std::string command = userdata.asString(); + if ("sort_sessions_by_type" == command) + { + return (order.getSortOrderSessions() == LLConversationFilter::SO_SESSION_TYPE); + } + if ("sort_sessions_by_name" == command) + { + return (order.getSortOrderSessions() == LLConversationFilter::SO_NAME); + } + if ("sort_sessions_by_recent" == command) + { + return (order.getSortOrderSessions() == LLConversationFilter::SO_DATE); + } + if ("sort_participants_by_name" == command) + { + return (order.getSortOrderParticipants() == LLConversationFilter::SO_NAME); + } + if ("sort_participants_by_recent" == command) + { + return (order.getSortOrderParticipants() == LLConversationFilter::SO_DATE); + } + if ("sort_participants_by_distance" == command) + { + return (order.getSortOrderParticipants() == LLConversationFilter::SO_DISTANCE); + } + if ("Translating.Enabled" == command) + { + return gSavedPerAccountSettings.getBOOL("TranslatingEnabled"); + } + if ("Translating.On" == command) + { + return gSavedSettings.getBOOL("TranslateChat"); + } + return FALSE; +} + +void LLFloaterIMContainer::setSortOrderSessions(const LLConversationFilter::ESortOrderType order) +{ + LLConversationSort old_order = mConversationViewModel.getSorter(); + if (order != old_order.getSortOrderSessions()) + { + old_order.setSortOrderSessions(order); + setSortOrder(old_order); + } +} + +void LLFloaterIMContainer::setSortOrderParticipants(const LLConversationFilter::ESortOrderType order) +{ + LLConversationSort old_order = mConversationViewModel.getSorter(); + if (order != old_order.getSortOrderParticipants()) + { + old_order.setSortOrderParticipants(order); + setSortOrder(old_order); + } +} + +void LLFloaterIMContainer::setSortOrder(const LLConversationSort& order) +{ + mConversationViewModel.setSorter(order); + mConversationsRoot->arrangeAll(); + // try to keep selection onscreen, even if it wasn't to start with + mConversationsRoot->scrollToShowSelection(); + + // Notify all conversation (torn off or not) of the change to the sort order + // Note: For the moment, the sort order is *unique* across all conversations. That might change in the future. + for (conversations_items_map::iterator it_session = mConversationsItems.begin(); it_session != mConversationsItems.end(); it_session++) + { + LLUUID session_id = it_session->first; + LLFloaterIMSessionTab *conversation_floater = (session_id.isNull() ? (LLFloaterIMSessionTab*)(LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")) : (LLFloaterIMSessionTab*)(LLFloaterIMSession::findInstance(session_id))); + if (conversation_floater) + { + conversation_floater->setSortOrder(order); + } + } + + gSavedSettings.setU32("ConversationSortOrder", (U32)order); +} + +void LLFloaterIMContainer::getSelectedUUIDs(uuid_vec_t& selected_uuids) +{ + const std::set<LLFolderViewItem*> selectedItems = mConversationsRoot->getSelectionList(); + + std::set<LLFolderViewItem*>::const_iterator it = selectedItems.begin(); + const std::set<LLFolderViewItem*>::const_iterator it_end = selectedItems.end(); + LLConversationItem * conversationItem; + + for (; it != it_end; ++it) + { + conversationItem = static_cast<LLConversationItem *>((*it)->getViewModelItem()); + + //When a one-on-one conversation exists, retrieve the participant id from the conversation floater + if(conversationItem->getType() == LLConversationItem::CONV_SESSION_1_ON_1) + { + LLFloaterIMSession * conversation_floaterp = LLFloaterIMSession::findInstance(conversationItem->getUUID()); + LLUUID participant_id = conversation_floaterp->getOtherParticipantUUID(); + selected_uuids.push_back(participant_id); + } + else + { + selected_uuids.push_back(conversationItem->getUUID()); + } + } +} + +const LLConversationItem * LLFloaterIMContainer::getCurSelectedViewModelItem() +{ + LLConversationItem * conversation_item = NULL; + + if(mConversationsRoot && + mConversationsRoot->getCurSelectedItem() && + mConversationsRoot->getCurSelectedItem()->getViewModelItem()) + { + LLFloaterIMSessionTab *selected_session_floater = LLFloaterIMSessionTab::getConversation(mSelectedSession); + if (selected_session_floater && !selected_session_floater->getHost() && selected_session_floater->getCurSelectedViewModelItem()) + { + conversation_item = selected_session_floater->getCurSelectedViewModelItem(); + } + else + { + conversation_item = static_cast<LLConversationItem *>(mConversationsRoot->getCurSelectedItem()->getViewModelItem()); + } + } + + return conversation_item; +} + +void LLFloaterIMContainer::getParticipantUUIDs(uuid_vec_t& selected_uuids) +{ + //Find the conversation floater associated with the selected id + const LLConversationItem * conversation_item = getCurSelectedViewModelItem(); + + if (NULL == conversation_item) + { + return; + } + + getSelectedUUIDs(selected_uuids); +} + +void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec_t& selectedIDS) +{ + if (selectedIDS.size() == 1) + { + const LLUUID& userID = selectedIDS.front(); + if ("view_profile" == command) + { + LLAvatarActions::showProfile(userID); + } + else if ("im" == command) + { + if (gAgent.getID() != userID) + { + LLAvatarActions::startIM(userID); + } + } + else if ("offer_teleport" == command) + { + LLAvatarActions::offerTeleport(selectedIDS); + } + else if ("voice_call" == command) + { + LLAvatarActions::startCall(userID); + } + else if ("chat_history" == command) + { + LLAvatarActions::viewChatHistory(userID); + } + else if ("add_friend" == command) + { + LLAvatarActions::requestFriendshipDialog(userID); + } + else if ("remove_friend" == command) + { + LLAvatarActions::removeFriendDialog(userID); + } + else if ("invite_to_group" == command) + { + LLAvatarActions::inviteToGroup(userID); + } + else if ("zoom_in" == command) + { + handle_zoom_to_object(userID); + } + else if ("map" == command) + { + LLAvatarActions::showOnMap(userID); + } + else if ("share" == command) + { + LLAvatarActions::share(userID); + } + else if ("pay" == command) + { + LLAvatarActions::pay(userID); + } + else if ("block_unblock" == command) + { + toggleMute(userID, LLMute::flagVoiceChat); + } + else if ("mute_unmute" == command) + { + toggleMute(userID, LLMute::flagTextChat); + } + else if ("selected" == command || "mute_all" == command || "unmute_all" == command) + { + moderateVoice(command, userID); + } + else if ("toggle_allow_text_chat" == command) + { + toggleAllowTextChat(userID); + } + } + else if (selectedIDS.size() > 1) + { + if ("im" == command) + { + LLAvatarActions::startConference(selectedIDS); + } + else if ("offer_teleport" == command) + { + LLAvatarActions::offerTeleport(selectedIDS); + } + else if ("voice_call" == command) + { + LLAvatarActions::startAdhocCall(selectedIDS); + } + else if ("remove_friend" == command) + { + LLAvatarActions::removeFriendsDialog(selectedIDS); + } + } +} + +void LLFloaterIMContainer::doToSelectedConversation(const std::string& command, uuid_vec_t& selectedIDS) +{ + //Find the conversation floater associated with the selected id + const LLConversationItem * conversationItem = getCurSelectedViewModelItem(); + LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(conversationItem->getUUID()); + + if(conversationFloater) + { + //Close the selected conversation + if("close_conversation" == command) + { + LLFloater::onClickClose(conversationFloater); + } + else if("open_voice_conversation" == command) + { + gIMMgr->startCall(conversationItem->getUUID()); + } + else if("disconnect_from_voice" == command) + { + gIMMgr->endCall(conversationItem->getUUID()); + } + else if("chat_history" == command) + { + if (selectedIDS.size() > 0) + { + LLAvatarActions::viewChatHistory(selectedIDS.front()); + } + } + else + { + if(conversationItem->getType() == LLConversationItem::CONV_SESSION_1_ON_1) + { + doToParticipants(command, selectedIDS); + } + } + } +} + +void LLFloaterIMContainer::doToSelected(const LLSD& userdata) +{ + std::string command = userdata.asString(); + const LLConversationItem * conversationItem = getCurSelectedViewModelItem(); + uuid_vec_t selected_uuids; + + if(conversationItem != NULL) + { + getParticipantUUIDs(selected_uuids); + + if(conversationItem->getType() == LLConversationItem::CONV_PARTICIPANT) + { + doToParticipants(command, selected_uuids); + } + else + { + doToSelectedConversation(command, selected_uuids); + } + } +} + +void LLFloaterIMContainer::doToSelectedGroup(const LLSD& userdata) +{ + std::string action = userdata.asString(); + + if (action == "group_profile") + { + LLGroupActions::show(mSelectedSession); + } + else if (action == "activate_group") + { + LLGroupActions::activate(mSelectedSession); + } + else if (action == "leave_group") + { + LLGroupActions::leave(mSelectedSession); + } +} + +bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) +{ + const std::string& item = userdata.asString(); + uuid_vec_t uuids; + getParticipantUUIDs(uuids); + + if ("conversation_log" == item) + { + return gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0; + } + + //Enable Chat history item for ad-hoc and group conversations + if ("can_chat_history" == item && uuids.size() > 0) + { + return LLLogChat::isTranscriptExist(uuids.front()); + } + + // If nothing is selected(and selected item is not group chat), everything needs to be disabled + if (uuids.size() <= 0) + { + if(getCurSelectedViewModelItem()) + { + return getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP; + } + return false; + } + + if("can_activate_group" == item) + { + LLUUID selected_group_id = getCurSelectedViewModelItem()->getUUID(); + return gAgent.getGroupID() != selected_group_id; + } + + return enableContextMenuItem(item, uuids); +} + +bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_vec_t& uuids) +{ + // Extract the single select info + bool is_single_select = (uuids.size() == 1); + const LLUUID& single_id = uuids.front(); + + // Handle options that are applicable to all including the user agent + if ("can_view_profile" == item) + { + return is_single_select; + } + + // Beyond that point, if only the user agent is selected, everything is disabled + if (is_single_select && (single_id == gAgentID)) + { + return false; + } + + // If the user agent is selected with others, everything is disabled + for (uuid_vec_t::const_iterator id = uuids.begin(); id != uuids.end(); ++id) + { + if (gAgent.getID() == *id) + { + return false; + } + } + + // Handle all other options + if (("can_invite" == item) || ("can_chat_history" == item) || ("can_share" == item) || ("can_pay" == item)) + { + // Those menu items are enable only if a single avatar is selected + return is_single_select; + } + else if ("can_block" == item) + { + return (is_single_select ? LLAvatarActions::canBlock(single_id) : false); + } + else if ("can_add" == item) + { + // We can add friends if: + // - there is only 1 selected avatar (EXT-7389) + // - this avatar is not already a friend + return (is_single_select ? !LLAvatarActions::isFriend(single_id) : false); + } + else if ("can_delete" == item) + { + // We can remove friends if there are only friends among the selection + bool result = true; + for (uuid_vec_t::const_iterator id = uuids.begin(); id != uuids.end(); ++id) + { + result &= LLAvatarActions::isFriend(*id); + } + return result; + } + else if ("can_call" == item) + { + return LLAvatarActions::canCall(); + } + else if ("can_zoom_in" == item) + { + return is_single_select && gObjectList.findObject(single_id); + } + else if ("can_show_on_map" == item) + { + return (is_single_select ? (LLAvatarTracker::instance().isBuddyOnline(single_id) && is_agent_mappable(single_id)) || gAgent.isGodlike() : false); + } + else if ("can_offer_teleport" == item) + { + return LLAvatarActions::canOfferTeleport(uuids); + } + else if (("can_moderate_voice" == item) || ("can_allow_text_chat" == item) || ("can_mute" == item) || ("can_unmute" == item)) + { + // *TODO : get that out of here... + return enableModerateContextMenuItem(item); + } + + // By default, options that not explicitely disabled are enabled + return true; +} + +bool LLFloaterIMContainer::checkContextMenuItem(const LLSD& userdata) +{ + std::string item = userdata.asString(); + uuid_vec_t uuids; + getParticipantUUIDs(uuids); + + return checkContextMenuItem(item, uuids); +} + +bool LLFloaterIMContainer::checkContextMenuItem(const std::string& item, uuid_vec_t& uuids) +{ + if (uuids.size() == 1) + { + if ("is_blocked" == item) + { + return LLMuteList::getInstance()->isMuted(uuids.front(), LLMute::flagVoiceChat); + } + else if (item == "is_muted") + { + return LLMuteList::getInstance()->isMuted(uuids.front(), LLMute::flagTextChat); + } + else if ("is_allowed_text_chat" == item) + { + const LLSpeaker * speakerp = getSpeakerOfSelectedParticipant(getSpeakerMgrForSelectedParticipant()); + + if (NULL != speakerp) + { + return !speakerp->mModeratorMutedText; + } + } + } + + return false; +} + +bool LLFloaterIMContainer::visibleContextMenuItem(const LLSD& userdata) +{ + const std::string& item = userdata.asString(); + + if ("show_mute" == item) + { + return !isMuted(getCurSelectedViewModelItem()->getUUID()); + } + else if ("show_unmute" == item) + { + return isMuted(getCurSelectedViewModelItem()->getUUID()); + } + + return true; +} + +void LLFloaterIMContainer::showConversation(const LLUUID& session_id) +{ + setVisibleAndFrontmost(false); + selectConversationPair(session_id, true); + + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); + session_floater->restoreFloater(); +} + +void LLFloaterIMContainer::clearAllFlashStates() +{ + conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); + for (;widget_it != mConversationsWidgets.end(); ++widget_it) + { + LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second); + if (widget) + { + widget->setFlashState(false); + } + } +} + +void LLFloaterIMContainer::selectConversation(const LLUUID& session_id) +{ + selectConversationPair(session_id, true); +} + +// Select the conversation *after* (or before if none after) the passed uuid conversation +// Used to change the selection on key hits +void LLFloaterIMContainer::selectNextConversationByID(const LLUUID& uuid) +{ + bool new_selection = false; + selectConversation(uuid); + new_selection = selectNextorPreviousConversation(true); + if (!new_selection) + { + selectNextorPreviousConversation(false); + } +} + +// Synchronous select the conversation item and the conversation floater +BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater/*=true*/) +{ + BOOL handled = TRUE; + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); + + /* widget processing */ + if (select_widget && mConversationsRoot->getSelectedCount() <= 1) + { + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,session_id); + if (widget && widget->getParentFolder()) + { + widget->getParentFolder()->setSelection(widget, FALSE, FALSE); + mConversationsRoot->scrollToShowSelection(); + } + + //When in DND mode, remove stored IM notifications + //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal + if(gAgent.isDoNotDisturb() && session_id.notNull()) + { + LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, session_id); + } + } + + /* floater processing */ + + if (NULL != session_floater) + { + if (session_id != getSelectedSession()) + { + // Store the active session + setSelectedSession(session_id); + + + + if (session_floater->getHost()) + { + // Always expand the message pane if the panel is hosted by the container + collapseMessagesPane(false); + // Switch to the conversation floater that is being selected + selectFloater(session_floater); + } + else + { + showStub(true); + } + } + + // Set the focus on the selected floater + if (!session_floater->hasFocus()) + { + BOOL is_minimized = session_floater->isMinimized(); + session_floater->setFocus(focus_floater); + session_floater->setMinimized(is_minimized); + } + } + flashConversationItemWidget(session_id,false); + return handled; +} + +void LLFloaterIMContainer::setTimeNow(const LLUUID& session_id, const LLUUID& participant_id) +{ + LLConversationItemSession* item = dynamic_cast<LLConversationItemSession*>(get_ptr_in_map(mConversationsItems,session_id)); + if (item) + { + item->setTimeNow(participant_id); + mConversationViewModel.requestSortAll(); + mConversationsRoot->arrangeAll(); + } +} + +void LLFloaterIMContainer::setNearbyDistances() +{ + // Get the nearby chat session: that's the one with uuid nul + LLConversationItemSession* item = dynamic_cast<LLConversationItemSession*>(get_ptr_in_map(mConversationsItems,LLUUID())); + if (item) + { + // Get the positions of the nearby avatars and their ids + std::vector<LLVector3d> positions; + uuid_vec_t avatar_ids; + LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange")); + // Get the position of the agent + const LLVector3d& me_pos = gAgent.getPositionGlobal(); + // For each nearby avatar, compute and update the distance + int avatar_count = positions.size(); + for (int i = 0; i < avatar_count; i++) + { + F64 dist = dist_vec_squared(positions[i], me_pos); + item->setDistance(avatar_ids[i],dist); + } + // Also does it for the agent itself + item->setDistance(gAgent.getID(),0.0f); + // Request resort + mConversationViewModel.requestSortAll(); + mConversationsRoot->arrangeAll(); + } +} + +LLConversationItem* LLFloaterIMContainer::addConversationListItem(const LLUUID& uuid, bool isWidgetSelected /*= false*/) +{ + bool is_nearby_chat = uuid.isNull(); + + // Stores the display name for the conversation line item + std::string display_name = is_nearby_chat ? LLTrans::getString("NearbyChatLabel") : LLIMModel::instance().getName(uuid); + + // Check if the item is not already in the list, exit (nothing to do) + // Note: this happens often, when reattaching a torn off conversation for instance + conversations_items_map::iterator item_it = mConversationsItems.find(uuid); + if (item_it != mConversationsItems.end()) + { + return item_it->second; + } + + // Create a conversation session model + LLConversationItemSession* item = NULL; + LLSpeakerMgr* speaker_manager = (is_nearby_chat ? (LLSpeakerMgr*)(LLLocalSpeakerMgr::getInstance()) : LLIMModel::getInstance()->getSpeakerManager(uuid)); + if (speaker_manager) + { + item = new LLParticipantList(speaker_manager, getRootViewModel()); + } + if (!item) + { + llwarns << "Couldn't create conversation session item : " << display_name << llendl; + return NULL; + } + item->renameItem(display_name); + item->updateName(NULL); + + mConversationsItems[uuid] = item; + + // Create a widget from it + LLConversationViewSession* widget = createConversationItemWidget(item); + mConversationsWidgets[uuid] = widget; + + // Add a new conversation widget to the root folder of the folder view + widget->addToFolder(mConversationsRoot); + widget->requestArrange(); + + LLIMModel::LLIMSession * im_sessionp = LLIMModel::getInstance()->findIMSession(uuid); + + // Create the participants widgets now + // Note: usually, we do not get an updated avatar list at that point + if (uuid.isNull() || im_sessionp && !im_sessionp->isP2PSessionType()) + { + LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = item->getChildrenBegin(); + LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = item->getChildrenEnd(); + while (current_participant_model != end_participant_model) + { + LLConversationItem* participant_model = dynamic_cast<LLConversationItem*>(*current_participant_model); + LLConversationViewParticipant* participant_view = createConversationViewParticipant(participant_model); + participant_view->addToFolder(widget); + current_participant_model++; + } + } + + if (uuid.notNull() && im_sessionp->isP2PSessionType()) + { + item->fetchAvatarName(false); + } + + // Do that too for the conversation dialog + LLFloaterIMSessionTab *conversation_floater = (uuid.isNull() ? (LLFloaterIMSessionTab*)(LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")) : (LLFloaterIMSessionTab*)(LLFloaterIMSession::findInstance(uuid))); + if (conversation_floater) + { + conversation_floater->buildConversationViewParticipant(); + } + + // set the widget to minimized mode if conversations pane is collapsed + widget->toggleCollapsedMode(mConversationsPane->isCollapsed()); + + if (isWidgetSelected || 0 == mConversationsRoot->getSelectedCount()) + { + selectConversationPair(uuid, true); + widget->requestArrange(); + + // scroll to newly added item + mConversationsRoot->scrollToShowSelection(); + } + + return item; +} + +bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool change_focus) +{ + // Delete the widget and the associated conversation item + // Note : since the mConversationsItems is also the listener to the widget, deleting + // the widget will also delete its listener + bool is_widget_selected = false; + LLFolderViewItem* new_selection = NULL; + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,uuid); + if (widget) + { + is_widget_selected = widget->isSelected(); + new_selection = mConversationsRoot->getNextFromChild(widget, FALSE); + if (!new_selection) + { + new_selection = mConversationsRoot->getPreviousFromChild(widget, FALSE); + } + widget->destroyView(); + } + + // Suppress the conversation items and widgets from their respective maps + mConversationsItems.erase(uuid); + mConversationsWidgets.erase(uuid); + + // Don't let the focus fall IW, select and refocus on the first conversation in the list + if (change_focus) + { + setFocus(TRUE); + if (new_selection) + { + if (mConversationsWidgets.size() == 1) + { + // If only one widget is left, it has to be the Nearby Chat. Select it directly. + selectConversationPair(LLUUID(NULL), true); + } + else + { + LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem()); + if (vmi) + { + selectConversationPair(vmi->getUUID(), true); + } + } + } + } + return is_widget_selected; +} + +LLConversationViewSession* LLFloaterIMContainer::createConversationItemWidget(LLConversationItem* item) +{ + LLConversationViewSession::Params params; + + params.name = item->getDisplayName(); + params.root = mConversationsRoot; + params.listener = item; + params.tool_tip = params.name; + params.container = this; + + //Indentation for aligning the p2p converstation image with the nearby chat arrow + if(item->getType() == LLConversationItem::CONV_SESSION_1_ON_1) + { + params.folder_indentation = 3; + } + + return LLUICtrlFactory::create<LLConversationViewSession>(params); +} + +LLConversationViewParticipant* LLFloaterIMContainer::createConversationViewParticipant(LLConversationItem* item) +{ + LLConversationViewParticipant::Params params; + LLRect panel_rect = mConversationsListPanel->getRect(); + + params.name = item->getDisplayName(); + params.root = mConversationsRoot; + params.listener = item; + + //24 is the the current hight of an item (itemHeight) loaded from conversation_view_participant.xml. + params.rect = LLRect (0, 24, panel_rect.getWidth(), 0); + params.tool_tip = params.name; + params.participant_id = item->getUUID(); + params.folder_indentation = 27; + + return LLUICtrlFactory::create<LLConversationViewParticipant>(params); +} + +bool LLFloaterIMContainer::enableModerateContextMenuItem(const std::string& userdata) +{ + // only group moderators can perform actions related to this "enable callback" + if (!isGroupModerator()) + { + return false; + } + + LLSpeaker * speakerp = getSpeakerOfSelectedParticipant(getSpeakerMgrForSelectedParticipant()); + if (NULL == speakerp) + { + return false; + } + + bool voice_channel = speakerp->isInVoiceChannel(); + + if ("can_moderate_voice" == userdata) + { + return voice_channel; + } + else if ("can_mute" == userdata) + { + return voice_channel && !isMuted(getCurSelectedViewModelItem()->getUUID()); + } + else if ("can_unmute" == userdata) + { + return voice_channel && isMuted(getCurSelectedViewModelItem()->getUUID()); + } + + // The last invoke is used to check whether the "can_allow_text_chat" will enabled + return LLVoiceClient::getInstance()->isParticipantAvatar(getCurSelectedViewModelItem()->getUUID()); +} + +bool LLFloaterIMContainer::isGroupModerator() +{ + LLSpeakerMgr * speaker_manager = getSpeakerMgrForSelectedParticipant(); + if (NULL == speaker_manager) + { + llwarns << "Speaker manager is missing" << llendl; + return false; + } + + // Is session a group call/chat? + if(gAgent.isInGroup(speaker_manager->getSessionID())) + { + LLSpeaker * speaker = speaker_manager->findSpeaker(gAgentID).get(); + + // Is agent a moderator? + return speaker && speaker->mIsModerator; + } + + return false; +} + +void LLFloaterIMContainer::moderateVoice(const std::string& command, const LLUUID& userID) +{ + if (!gAgent.getRegion()) return; + + if (command.compare("selected")) + { + moderateVoiceAllParticipants(command.compare("mute_all")); + } + else + { + moderateVoiceParticipant(userID, isMuted(userID)); + } +} + +bool LLFloaterIMContainer::isMuted(const LLUUID& avatar_id) +{ + const LLSpeaker * speakerp = getSpeakerOfSelectedParticipant(getSpeakerMgrForSelectedParticipant()); + return NULL == speakerp ? true : speakerp->mStatus == LLSpeaker::STATUS_MUTED; +} + +void LLFloaterIMContainer::moderateVoiceAllParticipants(bool unmute) +{ + LLIMSpeakerMgr * speaker_managerp = dynamic_cast<LLIMSpeakerMgr*>(getSpeakerMgrForSelectedParticipant()); + + if (NULL != speaker_managerp) + { + if (!unmute) + { + LLSD payload; + payload["session_id"] = speaker_managerp->getSessionID(); + LLNotificationsUtil::add("ConfirmMuteAll", LLSD(), payload, confirmMuteAllCallback); + return; + } + + speaker_managerp->moderateVoiceAllParticipants(unmute); + } +} + +// static +void LLFloaterIMContainer::confirmMuteAllCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + // if Cancel pressed + if (option == 1) + { + return; + } + + const LLSD& payload = notification["payload"]; + const LLUUID& session_id = payload["session_id"]; + + LLIMSpeakerMgr * speaker_manager = dynamic_cast<LLIMSpeakerMgr*> ( + LLIMModel::getInstance()->getSpeakerManager(session_id)); + if (speaker_manager) + { + speaker_manager->moderateVoiceAllParticipants(false); + } + + return; +} + +void LLFloaterIMContainer::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute) +{ + LLIMSpeakerMgr * speaker_managerp = dynamic_cast<LLIMSpeakerMgr *>(getSpeakerMgrForSelectedParticipant()); + + if (NULL != speaker_managerp) + { + speaker_managerp->moderateVoiceParticipant(avatar_id, unmute); + } +} + +LLSpeakerMgr * LLFloaterIMContainer::getSpeakerMgrForSelectedParticipant() +{ + LLFolderViewItem *selectedItem = mConversationsRoot->getCurSelectedItem(); + if (NULL == selectedItem) + { + llwarns << "Current selected item is null" << llendl; + return NULL; + } + + conversations_widgets_map::const_iterator iter = mConversationsWidgets.begin(); + conversations_widgets_map::const_iterator end = mConversationsWidgets.end(); + const LLUUID * conversation_uuidp = NULL; + while(iter != end) + { + if (iter->second == selectedItem || iter->second == selectedItem->getParentFolder()) + { + conversation_uuidp = &iter->first; + break; + } + ++iter; + } + if (NULL == conversation_uuidp) + { + llwarns << "Cannot find conversation item widget" << llendl; + return NULL; + } + + return conversation_uuidp->isNull() ? (LLSpeakerMgr *)LLLocalSpeakerMgr::getInstance() + : LLIMModel::getInstance()->getSpeakerManager(*conversation_uuidp); +} + +LLSpeaker * LLFloaterIMContainer::getSpeakerOfSelectedParticipant(LLSpeakerMgr * speaker_managerp) +{ + if (NULL == speaker_managerp) + { + llwarns << "Speaker manager is missing" << llendl; + return NULL; + } + + const LLConversationItem * participant_itemp = getCurSelectedViewModelItem(); + if (NULL == participant_itemp) + { + llwarns << "Cannot evaluate current selected view model item" << llendl; + return NULL; + } + + return speaker_managerp->findSpeaker(participant_itemp->getUUID()); +} + +void LLFloaterIMContainer::toggleAllowTextChat(const LLUUID& participant_uuid) +{ + LLIMSpeakerMgr * speaker_managerp = dynamic_cast<LLIMSpeakerMgr*>(getSpeakerMgrForSelectedParticipant()); + if (NULL != speaker_managerp) + { + speaker_managerp->toggleAllowTextChat(participant_uuid); + } +} + +void LLFloaterIMContainer::toggleMute(const LLUUID& participant_id, U32 flags) +{ + BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags); + std::string name; + gCacheName->getFullName(participant_id, name); + LLMute mute(participant_id, name, LLMute::AGENT); + + if (!is_muted) + { + LLMuteList::getInstance()->add(mute, flags); + } + else + { + LLMuteList::getInstance()->remove(mute, flags); + } +} + +void LLFloaterIMContainer::openNearbyChat() +{ + // If there's only one conversation in the container and that conversation is the nearby chat + //(which it should be...), open it so to make the list of participants visible. This happens to be the most common case when opening the Chat floater. + if((mConversationsItems.size() == 1)&&(!mConversationsPane->isCollapsed())) + { + LLConversationViewSession* nearby_chat = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,LLUUID())); + if (nearby_chat) + { + reSelectConversation(); + nearby_chat->setOpen(TRUE); + } + } +} + +void LLFloaterIMContainer::onNearbyChatClosed() +{ + // If nearby chat is the only remaining conversation and it is closed, close whole conversation floater as well + if (mConversationsItems.size() == 1) + closeFloater(); +} + +void LLFloaterIMContainer::reSelectConversation() +{ + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(mSelectedSession); + if (session_floater->getHost()) + { + selectFloater(session_floater); + } +} + +void LLFloaterIMContainer::updateSpeakBtnState() +{ + LLButton* mSpeakBtn = getChild<LLButton>("speak_btn"); + mSpeakBtn->setToggleState(LLVoiceClient::getInstance()->getUserPTTState()); + mSpeakBtn->setEnabled(LLAgent::isActionAllowed("speak")); +} + +bool LLFloaterIMContainer::isConversationLoggingAllowed() +{ + return gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0; +} + +void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id, bool is_flashes) +{ + //Finds the conversation line item to flash using the session_id + LLConversationViewSession * widget = dynamic_cast<LLConversationViewSession *>(get_ptr_in_map(mConversationsWidgets,session_id)); + + if (widget) + { + widget->setFlashState(is_flashes); + } +} + +bool LLFloaterIMContainer::isScrolledOutOfSight(LLConversationViewSession* conversation_item_widget) +{ + llassert(conversation_item_widget != NULL); + + // make sure the widget is actually in the right spot first + mConversationsRoot->arrange(NULL, NULL); + + // check whether the widget is in the visible portion of the scroll container + LLRect widget_rect; + conversation_item_widget->localRectToOtherView(conversation_item_widget->getLocalRect(), &widget_rect, mConversationsRoot); + return !mConversationsRoot->getVisibleRect().overlaps(widget_rect); +} + +BOOL LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask ) +{ + if(mask == MASK_ALT) + { + if (KEY_RETURN == key ) + { + expandConversation(); + } + + if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) + { + selectNextorPreviousConversation(true); + } + if ((KEY_UP == key) || (KEY_LEFT == key)) + { + selectNextorPreviousConversation(false); + } + } + return TRUE; +} + +bool LLFloaterIMContainer::selectAdjacentConversation(bool focus_selected) +{ + bool selectedAdjacentConversation = selectNextorPreviousConversation(true, focus_selected); + + if(!selectedAdjacentConversation) + { + selectedAdjacentConversation = selectNextorPreviousConversation(false, focus_selected); + } + + return selectedAdjacentConversation; +} + +bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next, bool focus_selected) +{ + if (mConversationsWidgets.size() > 1) + { + LLFolderViewItem* new_selection = NULL; + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,getSelectedSession()); + if (widget) + { + if(select_next) + { + new_selection = mConversationsRoot->getNextFromChild(widget, FALSE); + } + else + { + new_selection = mConversationsRoot->getPreviousFromChild(widget, FALSE); + } + if (new_selection) + { + LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem()); + if (vmi) + { + selectConversationPair(vmi->getUUID(), true, focus_selected); + return true; + } + } + } + } + return false; +} + +void LLFloaterIMContainer::expandConversation() +{ + LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,getSelectedSession())); + if (widget) + { + widget->setOpen(!widget->isOpen()); + } +} + +void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) +{ + // Always unminimize before trying to close. + // Most of the time the user will never see this state. + setMinimized(FALSE); + + LLFloater::closeFloater(app_quitting); +} + +// EOF diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h new file mode 100644 index 0000000000..2cbc1e99f9 --- /dev/null +++ b/indra/newview/llfloaterimcontainer.h @@ -0,0 +1,209 @@ +/** + * @file llfloaterimcontainer.h + * @brief Multifloater containing active IM sessions in separate tab container tabs + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERIMCONTAINER_H +#define LL_LLFLOATERIMCONTAINER_H + +#include <map> +#include <vector> + +#include "llimview.h" +#include "llevents.h" +#include "../llui/llfloater.h" +#include "../llui/llmultifloater.h" +#include "llavatarpropertiesprocessor.h" +#include "llgroupmgr.h" +#include "../llui/lltrans.h" +#include "llconversationmodel.h" +#include "llconversationview.h" + +class LLButton; +class LLLayoutPanel; +class LLLayoutStack; +class LLTabContainer; +class LLFloaterIMContainer; +class LLSpeaker; +class LLSpeakerMgr; + +class LLFloaterIMContainer + : public LLMultiFloater + , public LLIMSessionObserver +{ +public: + LLFloaterIMContainer(const LLSD& seed, const Params& params = getDefaultParams()); + virtual ~LLFloaterIMContainer(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void draw(); + /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void updateResizeLimits(); + void onCloseFloater(LLUUID& id); + + /*virtual*/ void addFloater(LLFloater* floaterp, + BOOL select_added_floater, + LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); + void returnFloaterToHost(); + void showConversation(const LLUUID& session_id); + void selectConversation(const LLUUID& session_id); + void selectNextConversationByID(const LLUUID& session_id); + BOOL selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater = true); + void clearAllFlashStates(); + bool selectAdjacentConversation(bool focus_selected); + bool selectNextorPreviousConversation(bool select_next, bool focus_selected = true); + void expandConversation(); + + /*virtual*/ void tabClose(); + void showStub(bool visible); + + static LLFloater* getCurrentVoiceFloater(); + static LLFloaterIMContainer* findInstance(); + static LLFloaterIMContainer* getInstance(); + + static void onCurrentChannelChanged(const LLUUID& session_id); + + void collapseMessagesPane(bool collapse); + + // Callbacks + static void idle(void* user_data); + + // LLIMSessionObserver observe triggers + /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg); + /*virtual*/ void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id); + /*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id); + /*virtual*/ void sessionRemoved(const LLUUID& session_id); + /*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); + + LLConversationViewModel& getRootViewModel() { return mConversationViewModel; } + LLUUID getSelectedSession() { return mSelectedSession; } + void setSelectedSession(LLUUID sessionID) { mSelectedSession = sessionID; } + LLConversationItem* getSessionModel(const LLUUID& session_id) { return get_ptr_in_map(mConversationsItems,session_id); } + LLConversationSort& getSortOrder() { return mConversationViewModel.getSorter(); } + + void onNearbyChatClosed(); + + // Handling of lists of participants is public so to be common with llfloatersessiontab + // *TODO : Find a better place for this. + bool checkContextMenuItem(const std::string& item, uuid_vec_t& selectedIDS); + bool enableContextMenuItem(const std::string& item, uuid_vec_t& selectedIDS); + void doToParticipants(const std::string& item, uuid_vec_t& selectedIDS); + + void assignResizeLimits(); + virtual BOOL handleKeyHere(KEY key, MASK mask ); + /*virtual*/ void closeFloater(bool app_quitting = false); + +private: + typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t; + avatarID_panel_map_t mSessions; + boost::signals2::connection mNewMessageConnection; + + /*virtual*/ void computeResizeLimits(S32& new_min_width, S32& new_min_height) {} + + void onNewMessageReceived(const LLSD& data); + + void onExpandCollapseButtonClicked(); + void onStubCollapseButtonClicked(); + void processParticipantsStyleUpdate(); + void onSpeakButtonClicked(); + + void collapseConversationsPane(bool collapse, bool save_is_allowed=true); + + void reshapeFloaterAndSetResizeLimits(bool collapse, S32 delta_width); + + void onAddButtonClicked(); + void onAvatarPicked(const uuid_vec_t& ids); + + BOOL isActionChecked(const LLSD& userdata); + void onCustomAction (const LLSD& userdata); + void setSortOrderSessions(const LLConversationFilter::ESortOrderType order); + void setSortOrderParticipants(const LLConversationFilter::ESortOrderType order); + void setSortOrder(const LLConversationSort& order); + + void getSelectedUUIDs(uuid_vec_t& selected_uuids); + const LLConversationItem * getCurSelectedViewModelItem(); + void getParticipantUUIDs(uuid_vec_t& selected_uuids); + void doToSelected(const LLSD& userdata); + bool checkContextMenuItem(const LLSD& userdata); + bool enableContextMenuItem(const LLSD& userdata); + bool visibleContextMenuItem(const LLSD& userdata); + void doToSelectedConversation(const std::string& command, uuid_vec_t& selectedIDS); + void doToSelectedGroup(const LLSD& userdata); + + static void confirmMuteAllCallback(const LLSD& notification, const LLSD& response); + bool enableModerateContextMenuItem(const std::string& userdata); + LLSpeaker * getSpeakerOfSelectedParticipant(LLSpeakerMgr * speaker_managerp); + LLSpeakerMgr * getSpeakerMgrForSelectedParticipant(); + bool isGroupModerator(); + bool isMuted(const LLUUID& avatar_id); + void moderateVoice(const std::string& command, const LLUUID& userID); + void moderateVoiceAllParticipants(bool unmute); + void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); + void toggleAllowTextChat(const LLUUID& participant_uuid); + void toggleMute(const LLUUID& participant_id, U32 flags); + void openNearbyChat(); + + LLButton* mExpandCollapseBtn; + LLButton* mStubCollapseBtn; + LLPanel* mStubPanel; + LLTextBox* mStubTextBox; + LLLayoutPanel* mMessagesPane; + LLLayoutPanel* mConversationsPane; + LLLayoutStack* mConversationsStack; + + bool mInitialized; + + LLUUID mSelectedSession; + std::string mGeneralTitle; + + // Conversation list implementation +public: + bool removeConversationListItem(const LLUUID& uuid, bool change_focus = true); + LLConversationItem* addConversationListItem(const LLUUID& uuid, bool isWidgetSelected = false); + void setTimeNow(const LLUUID& session_id, const LLUUID& participant_id); + void setNearbyDistances(); + void reSelectConversation(); + void updateSpeakBtnState(); + static bool isConversationLoggingAllowed(); + void flashConversationItemWidget(const LLUUID& session_id, bool is_flashes); + bool isScrolledOutOfSight(LLConversationViewSession* conversation_item_widget); + boost::signals2::connection mMicroChangedSignal; + S32 getConversationListItemSize() { return mConversationsWidgets.size(); } + +private: + LLConversationViewSession* createConversationItemWidget(LLConversationItem* item); + LLConversationViewParticipant* createConversationViewParticipant(LLConversationItem* item); + bool onConversationModelEvent(const LLSD& event); + + // Conversation list data + LLPanel* mConversationsListPanel; // This is the main widget we add conversation widget to + conversations_items_map mConversationsItems; + conversations_widgets_map mConversationsWidgets; + LLConversationViewModel mConversationViewModel; + LLFolderView* mConversationsRoot; + LLEventStream mConversationsEventStream; +}; + +#endif // LL_LLFLOATERIMCONTAINER_H diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp new file mode 100644 index 0000000000..b287950c21 --- /dev/null +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -0,0 +1,881 @@ +/** + * @file LLFloaterIMNearbyChat.cpp + * @brief LLFloaterIMNearbyChat class implementation + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "message.h" + +#include "lliconctrl.h" +#include "llappviewer.h" +#include "llchatentry.h" +#include "llfloaterreg.h" +#include "lltrans.h" +#include "llfloaterimcontainer.h" +#include "llfloatersidepanelcontainer.h" +#include "llfocusmgr.h" +#include "lllogchat.h" +#include "llresizebar.h" +#include "llresizehandle.h" +#include "lldraghandle.h" +#include "llmenugl.h" +#include "llviewermenu.h" // for gMenuHolder +#include "llfloaterimnearbychathandler.h" +#include "llchannelmanager.h" +#include "llchathistory.h" +#include "llstylemap.h" +#include "llavatarnamecache.h" +#include "llfloaterreg.h" +#include "lltrans.h" + +#include "llfirstuse.h" +#include "llfloaterimnearbychat.h" +#include "llagent.h" // gAgent +#include "llgesturemgr.h" +#include "llmultigesture.h" +#include "llkeyboard.h" +#include "llanimationstates.h" +#include "llviewerstats.h" +#include "llcommandhandler.h" +#include "llviewercontrol.h" +#include "llnavigationbar.h" +#include "llwindow.h" +#include "llviewerwindow.h" +#include "llrootview.h" +#include "llviewerchat.h" +#include "lltranslate.h" +#include "llautoreplace.h" + +S32 LLFloaterIMNearbyChat::sLastSpecialChatChannel = 0; + +const S32 EXPANDED_HEIGHT = 266; +const S32 COLLAPSED_HEIGHT = 60; +const S32 EXPANDED_MIN_HEIGHT = 150; + +// legacy callback glue +void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); + +struct LLChatTypeTrigger { + std::string name; + EChatType type; +}; + +static LLChatTypeTrigger sChatTypeTriggers[] = { + { "/whisper" , CHAT_TYPE_WHISPER}, + { "/shout" , CHAT_TYPE_SHOUT} +}; + + +LLFloaterIMNearbyChat::LLFloaterIMNearbyChat(const LLSD& llsd) +: LLFloaterIMSessionTab(llsd), + //mOutputMonitor(NULL), + mSpeakerMgr(NULL), + mExpandedHeight(COLLAPSED_HEIGHT + EXPANDED_HEIGHT) +{ + mIsP2PChat = false; + mIsNearbyChat = true; + mSpeakerMgr = LLLocalSpeakerMgr::getInstance(); + mSessionID = LLUUID(); +} + +//static +LLFloaterIMNearbyChat* LLFloaterIMNearbyChat::buildFloater(const LLSD& key) +{ + LLFloaterReg::getInstance("im_container"); + return new LLFloaterIMNearbyChat(key); +} + +//virtual +BOOL LLFloaterIMNearbyChat::postBuild() +{ + setIsSingleInstance(TRUE); + BOOL result = LLFloaterIMSessionTab::postBuild(); + + mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5)); + mInputEditor->setCommitCallback(boost::bind(&LLFloaterIMNearbyChat::onChatBoxCommit, this)); + mInputEditor->setKeystrokeCallback(boost::bind(&LLFloaterIMNearbyChat::onChatBoxKeystroke, this)); + mInputEditor->setFocusLostCallback(boost::bind(&LLFloaterIMNearbyChat::onChatBoxFocusLost, this)); + mInputEditor->setFocusReceivedCallback(boost::bind(&LLFloaterIMNearbyChat::onChatBoxFocusReceived, this)); + mInputEditor->setLabel(LLTrans::getString("NearbyChatTitle")); + + // Title must be defined BEFORE call to addConversationListItem() because + // it is used to show the item's name in the conversations list + setTitle(LLTrans::getString("NearbyChatTitle")); + + // obsolete, but may be needed for backward compatibility? + gSavedSettings.declareS32("nearbychat_showicons_and_names", 2, "NearByChat header settings", true); + + if (gSavedPerAccountSettings.getBOOL("LogShowHistory")) + { + loadHistory(); + } + + return result; +} + +// virtual +void LLFloaterIMNearbyChat::closeHostedFloater() +{ + // Should check how many conversations are ongoing. Close all if 1 only (the Nearby Chat), select next one otherwise + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + if (floater_container->getConversationListItemSize() == 1) + { + floater_container->closeFloater(); + } + else + { + if (!getHost()) + { + setVisible(FALSE); + } + floater_container->selectNextConversationByID(LLUUID()); + } +} + +// virtual +void LLFloaterIMNearbyChat::refresh() +{ + displaySpeakingIndicator(); + updateCallBtnState(LLVoiceClient::getInstance()->getUserPTTState()); + + // *HACK: Update transparency type depending on whether our children have focus. + // This is needed because this floater is chrome and thus cannot accept focus, so + // the transparency type setting code from LLFloater::setFocus() isn't reached. + if (getTransparencyType() != TT_DEFAULT) + { + setTransparencyType(hasFocus() ? TT_ACTIVE : TT_INACTIVE); + } +} + +void LLFloaterIMNearbyChat::reloadMessages(bool clean_messages/* = false*/) +{ + if (clean_messages) + { + mMessageArchive.clear(); + loadHistory(); + } + + mChatHistory->clear(); + + LLSD do_not_log; + do_not_log["do_not_log"] = true; + for(std::vector<LLChat>::iterator it = mMessageArchive.begin();it!=mMessageArchive.end();++it) + { + // Update the messages without re-writing them to a log file. + addMessage(*it,false, do_not_log); + } +} + +void LLFloaterIMNearbyChat::loadHistory() +{ + LLSD do_not_log; + do_not_log["do_not_log"] = true; + + std::list<LLSD> history; + LLLogChat::loadChatHistory("chat", history); + + std::list<LLSD>::const_iterator it = history.begin(); + while (it != history.end()) + { + const LLSD& msg = *it; + + std::string from = msg[LL_IM_FROM]; + LLUUID from_id; + if (msg[LL_IM_FROM_ID].isDefined()) + { + from_id = msg[LL_IM_FROM_ID].asUUID(); + } + else + { + std::string legacy_name = gCacheName->buildLegacyName(from); + gCacheName->getUUID(legacy_name, from_id); + } + + LLChat chat; + chat.mFromName = from; + chat.mFromID = from_id; + chat.mText = msg[LL_IM_TEXT].asString(); + chat.mTimeStr = msg[LL_IM_TIME].asString(); + chat.mChatStyle = CHAT_STYLE_HISTORY; + + chat.mSourceType = CHAT_SOURCE_AGENT; + if (from_id.isNull() && SYSTEM_FROM == from) + { + chat.mSourceType = CHAT_SOURCE_SYSTEM; + + } + else if (from_id.isNull()) + { + chat.mSourceType = isWordsName(from) ? CHAT_SOURCE_UNKNOWN : CHAT_SOURCE_OBJECT; + } + + addMessage(chat, true, do_not_log); + + it++; + } +} + +void LLFloaterIMNearbyChat::removeScreenChat() +{ + LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID"))); + if(chat_channel) + { + chat_channel->removeToastsFromChannel(); + } +} + + +void LLFloaterIMNearbyChat::setVisible(BOOL visible) +{ + LLFloaterIMSessionTab::setVisible(visible); + + if(visible) + { + removeScreenChat(); + } +} + + +void LLFloaterIMNearbyChat::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key) +{ + LLFloaterIMSessionTab::setVisibleAndFrontmost(take_focus, key); + + if(!isTornOff() && matchesKey(key)) + { + LLFloaterIMContainer::getInstance()->selectConversationPair(mSessionID, true, false); + } +} + +// virtual +void LLFloaterIMNearbyChat::onTearOffClicked() +{ + LLFloaterIMSessionTab::onTearOffClicked(); + + // see CHUI-170: Save torn-off state of the nearby chat between sessions + BOOL in_the_multifloater = (BOOL)getHost(); + gSavedPerAccountSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater); +} + + +// virtual +void LLFloaterIMNearbyChat::onOpen(const LLSD& key) +{ + LLFloaterIMSessionTab::onOpen(key); + showTranslationCheckbox(LLTranslate::isTranslationConfigured()); +} + +// virtual +void LLFloaterIMNearbyChat::onClose(bool app_quitting) +{ + // Override LLFloaterIMSessionTab::onClose() so that Nearby Chat is not removed from the conversation floater + LLFloaterIMSessionTab::restoreFloater(); + onClickCloseBtn(); +} + +// virtual +void LLFloaterIMNearbyChat::onClickCloseBtn() +{ + if (!isTornOff()) + { + return; + } + LLFloaterIMSessionTab::onTearOffClicked(); + + LLFloaterIMContainer *im_box = LLFloaterIMContainer::findInstance(); + if (im_box) + { + im_box->onNearbyChatClosed(); + } +} + +void LLFloaterIMNearbyChat::onChatFontChange(LLFontGL* fontp) +{ + // Update things with the new font whohoo + if (mInputEditor) + { + mInputEditor->setFont(fontp); + } +} + + +void LLFloaterIMNearbyChat::show() +{ + if (isChatMultiTab()) + { + openFloater(getKey()); + } +} + +bool LLFloaterIMNearbyChat::isChatVisible() const +{ + bool isVisible = false; + LLFloaterIMContainer* im_box = LLFloaterIMContainer::getInstance(); + // Is the IM floater container ever null? + llassert(im_box != NULL); + if (im_box != NULL) + { + isVisible = + isChatMultiTab() && gSavedPerAccountSettings.getBOOL("NearbyChatIsNotTornOff")? + im_box->getVisible() && !im_box->isMinimized() : + getVisible() && !isMinimized(); + } + + return isVisible; +} + +void LLFloaterIMNearbyChat::showHistory() +{ + openFloater(); + if(!isMessagePaneExpanded()) + { + restoreFloater(); + setFocus(true); + } + setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); +} + +std::string LLFloaterIMNearbyChat::getCurrentChat() +{ + return mInputEditor ? mInputEditor->getText() : LLStringUtil::null; +} + +// virtual +BOOL LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask ) +{ + BOOL handled = FALSE; + + if( KEY_RETURN == key && mask == MASK_CONTROL) + { + // shout + sendChat(CHAT_TYPE_SHOUT); + handled = TRUE; + } + else if (KEY_RETURN == key && mask == MASK_SHIFT) + { + // whisper + sendChat(CHAT_TYPE_WHISPER); + handled = TRUE; + } + + + if((mask == MASK_ALT) && isTornOff()) + { + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + if ((KEY_UP == key) || (KEY_LEFT == key)) + { + floater_container->selectNextorPreviousConversation(false); + handled = TRUE; + } + if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) + { + floater_container->selectNextorPreviousConversation(true); + handled = TRUE; + } + } + + return handled; +} + +BOOL LLFloaterIMNearbyChat::matchChatTypeTrigger(const std::string& in_str, std::string* out_str) +{ + U32 in_len = in_str.length(); + S32 cnt = sizeof(sChatTypeTriggers) / sizeof(*sChatTypeTriggers); + + bool string_was_found = false; + + for (S32 n = 0; n < cnt && !string_was_found; n++) + { + if (in_len <= sChatTypeTriggers[n].name.length()) + { + std::string trigger_trunc = sChatTypeTriggers[n].name; + LLStringUtil::truncate(trigger_trunc, in_len); + + if (!LLStringUtil::compareInsensitive(in_str, trigger_trunc)) + { + *out_str = sChatTypeTriggers[n].name; + string_was_found = true; + } + } + } + + return string_was_found; +} + +void LLFloaterIMNearbyChat::onChatBoxKeystroke() +{ + LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance(); + if (im_box) + { + im_box->flashConversationItemWidget(mSessionID,false); + } + + LLFirstUse::otherAvatarChatFirst(false); + + LLWString raw_text = mInputEditor->getWText(); + + // Can't trim the end, because that will cause autocompletion + // to eat trailing spaces that might be part of a gesture. + LLWStringUtil::trimHead(raw_text); + + S32 length = raw_text.length(); + + if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences + { + gAgent.startTyping(); + } + else + { + gAgent.stopTyping(); + } + + /* Doesn't work -- can't tell the difference between a backspace + that killed the selection vs. backspace at the end of line. + if (length > 1 + && text[0] == '/' + && key == KEY_BACKSPACE) + { + // the selection will already be deleted, but we need to trim + // off the character before + std::string new_text = raw_text.substr(0, length-1); + mInputEditor->setText( new_text ); + mInputEditor->setCursorToEnd(); + length = length - 1; + } + */ + + KEY key = gKeyboard->currentKey(); + + // Ignore "special" keys, like backspace, arrows, etc. + if (length > 1 + && raw_text[0] == '/' + && key < KEY_SPECIAL) + { + // we're starting a gesture, attempt to autocomplete + + std::string utf8_trigger = wstring_to_utf8str(raw_text); + std::string utf8_out_str(utf8_trigger); + + if (LLGestureMgr::instance().matchPrefix(utf8_trigger, &utf8_out_str)) + { + std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size()); + mInputEditor->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part + + // Select to end of line, starting from the character + // after the last one the user typed. + mInputEditor->selectNext(rest_of_match, false); + } + else if (matchChatTypeTrigger(utf8_trigger, &utf8_out_str)) + { + std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size()); + mInputEditor->setText(utf8_trigger + rest_of_match + " "); // keep original capitalization for user-entered part + mInputEditor->endOfDoc(); + } + + //llinfos << "GESTUREDEBUG " << trigger + // << " len " << length + // << " outlen " << out_str.getLength() + // << llendl; + } +} + +// static +void LLFloaterIMNearbyChat::onChatBoxFocusLost() +{ + // stop typing animation + gAgent.stopTyping(); +} + +void LLFloaterIMNearbyChat::onChatBoxFocusReceived() +{ + mInputEditor->setEnabled(!gDisconnected); +} + +EChatType LLFloaterIMNearbyChat::processChatTypeTriggers(EChatType type, std::string &str) +{ + U32 length = str.length(); + S32 cnt = sizeof(sChatTypeTriggers) / sizeof(*sChatTypeTriggers); + + for (S32 n = 0; n < cnt; n++) + { + if (length >= sChatTypeTriggers[n].name.length()) + { + std::string trigger = str.substr(0, sChatTypeTriggers[n].name.length()); + + if (!LLStringUtil::compareInsensitive(trigger, sChatTypeTriggers[n].name)) + { + U32 trigger_length = sChatTypeTriggers[n].name.length(); + + // It's to remove space after trigger name + if (length > trigger_length && str[trigger_length] == ' ') + trigger_length++; + + str = str.substr(trigger_length, length); + + if (CHAT_TYPE_NORMAL == type) + return sChatTypeTriggers[n].type; + else + break; + } + } + } + + return type; +} + +void LLFloaterIMNearbyChat::sendChat( EChatType type ) +{ + if (mInputEditor) + { + LLWString text = mInputEditor->getWText(); + LLWStringUtil::trim(text); + LLWStringUtil::replaceChar(text,182,'\n'); // Convert paragraph symbols back into newlines. + if (!text.empty()) + { + // Check if this is destined for another channel + S32 channel = 0; + stripChannelNumber(text, &channel); + + std::string utf8text = wstring_to_utf8str(text); + // Try to trigger a gesture, if not chat to a script. + std::string utf8_revised_text; + if (0 == channel) + { + // discard returned "found" boolean + LLGestureMgr::instance().triggerAndReviseString(utf8text, &utf8_revised_text); + } + else + { + utf8_revised_text = utf8text; + } + + utf8_revised_text = utf8str_trim(utf8_revised_text); + + type = processChatTypeTriggers(type, utf8_revised_text); + + if (!utf8_revised_text.empty()) + { + // Chat with animation + sendChatFromViewer(utf8_revised_text, type, TRUE); + } + } + + mInputEditor->setText(LLStringExplicit("")); + } + + gAgent.stopTyping(); + + // If the user wants to stop chatting on hitting return, lose focus + // and go out of chat mode. + if (gSavedSettings.getBOOL("CloseChatOnReturn")) + { + stopChat(); + } +} + +void LLFloaterIMNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args) +{ + appendMessage(chat, args); + + if(archive) + { + mMessageArchive.push_back(chat); + if(mMessageArchive.size() > 200) + { + mMessageArchive.erase(mMessageArchive.begin()); + } + } + + // logging + if (!args["do_not_log"].asBoolean() && gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 1) + { + std::string from_name = chat.mFromName; + + if (chat.mSourceType == CHAT_SOURCE_AGENT) + { + // if the chat is coming from an agent, log the complete name + LLAvatarName av_name; + LLAvatarNameCache::get(chat.mFromID, &av_name); + + if (!av_name.isDisplayNameDefault()) + { + from_name = av_name.getCompleteName(); + } + } + + LLLogChat::saveHistory("chat", from_name, chat.mFromID, chat.mText); + } +} + + +void LLFloaterIMNearbyChat::onChatBoxCommit() +{ + if (mInputEditor->getText().length() > 0) + { + sendChat(CHAT_TYPE_NORMAL); + } + + gAgent.stopTyping(); +} + +void LLFloaterIMNearbyChat::displaySpeakingIndicator() +{ + LLSpeakerMgr::speaker_list_t speaker_list; + LLUUID id; + + id.setNull(); + mSpeakerMgr->update(FALSE); + mSpeakerMgr->getSpeakerList(&speaker_list, FALSE); + + for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i) + { + LLPointer<LLSpeaker> s = *i; + if (s->mSpeechVolume > 0 || s->mStatus == LLSpeaker::STATUS_SPEAKING) + { + id = s->mID; + break; + } + } +} + +void LLFloaterIMNearbyChat::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate) +{ + sendChatFromViewer(utf8str_to_wstring(utf8text), type, animate); +} + +void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) +{ + // Look for "/20 foo" channel chats. + S32 channel = 0; + LLWString out_text = stripChannelNumber(wtext, &channel); + std::string utf8_out_text = wstring_to_utf8str(out_text); + std::string utf8_text = wstring_to_utf8str(wtext); + + utf8_text = utf8str_trim(utf8_text); + if (!utf8_text.empty()) + { + utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1); + } + + // Don't animate for chats people can't hear (chat to scripts) + if (animate && (channel == 0)) + { + if (type == CHAT_TYPE_WHISPER) + { + lldebugs << "You whisper " << utf8_text << llendl; + gAgent.sendAnimationRequest(ANIM_AGENT_WHISPER, ANIM_REQUEST_START); + } + else if (type == CHAT_TYPE_NORMAL) + { + lldebugs << "You say " << utf8_text << llendl; + gAgent.sendAnimationRequest(ANIM_AGENT_TALK, ANIM_REQUEST_START); + } + else if (type == CHAT_TYPE_SHOUT) + { + lldebugs << "You shout " << utf8_text << llendl; + gAgent.sendAnimationRequest(ANIM_AGENT_SHOUT, ANIM_REQUEST_START); + } + else + { + llinfos << "send_chat_from_viewer() - invalid volume" << llendl; + return; + } + } + else + { + if (type != CHAT_TYPE_START && type != CHAT_TYPE_STOP) + { + lldebugs << "Channel chat: " << utf8_text << llendl; + } + } + + send_chat_from_viewer(utf8_out_text, type, channel); +} + +// static +bool LLFloaterIMNearbyChat::isWordsName(const std::string& name) +{ + // checking to see if it's display name plus username in parentheses + S32 open_paren = name.find(" (", 0); + S32 close_paren = name.find(')', 0); + + if (open_paren != std::string::npos && + close_paren == name.length()-1) + { + return true; + } + else + { + //checking for a single space + S32 pos = name.find(' ', 0); + return std::string::npos != pos && name.rfind(' ', name.length()) == pos && 0 != pos && name.length()-1 != pos; + } +} + +// static +void LLFloaterIMNearbyChat::startChat(const char* line) +{ + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + if (nearby_chat) + { + if(!nearby_chat->isTornOff()) + { + nearby_chat->show(); + } + if(nearby_chat->isMinimized()) + { + nearby_chat->setMinimized(false); + } + nearby_chat->setVisible(TRUE); + nearby_chat->setFocus(TRUE); + nearby_chat->mInputEditor->setFocus(TRUE); + + if (line) + { + std::string line_string(line); + nearby_chat->mInputEditor->setText(line_string); + } + + nearby_chat->mInputEditor->endOfDoc(); + } +} + +// Exit "chat mode" and do the appropriate focus changes +// static +void LLFloaterIMNearbyChat::stopChat() +{ + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + if (nearby_chat) + { + nearby_chat->mInputEditor->setFocus(FALSE); + gAgent.stopTyping(); + } +} + +// If input of the form "/20foo" or "/20 foo", returns "foo" and channel 20. +// Otherwise returns input and channel 0. +LLWString LLFloaterIMNearbyChat::stripChannelNumber(const LLWString &mesg, S32* channel) +{ + if (mesg[0] == '/' + && mesg[1] == '/') + { + // This is a "repeat channel send" + *channel = sLastSpecialChatChannel; + return mesg.substr(2, mesg.length() - 2); + } + else if (mesg[0] == '/' + && mesg[1] + && LLStringOps::isDigit(mesg[1])) + { + // This a special "/20" speak on a channel + S32 pos = 0; + + // Copy the channel number into a string + LLWString channel_string; + llwchar c; + do + { + c = mesg[pos+1]; + channel_string.push_back(c); + pos++; + } + while(c && pos < 64 && LLStringOps::isDigit(c)); + + // Move the pointer forward to the first non-whitespace char + // Check isspace before looping, so we can handle "/33foo" + // as well as "/33 foo" + while(c && iswspace(c)) + { + c = mesg[pos+1]; + pos++; + } + + sLastSpecialChatChannel = strtol(wstring_to_utf8str(channel_string).c_str(), NULL, 10); + *channel = sLastSpecialChatChannel; + return mesg.substr(pos, mesg.length() - pos); + } + else + { + // This is normal chat. + *channel = 0; + return mesg; + } +} + +void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel) +{ + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_ChatFromViewer); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_ChatData); + msg->addStringFast(_PREHASH_Message, utf8_out_text); + msg->addU8Fast(_PREHASH_Type, type); + msg->addS32("Channel", channel); + + gAgent.sendReliableMessage(); + + LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT); +} + +class LLChatCommandHandler : public LLCommandHandler +{ +public: + // not allowed from outside the app + LLChatCommandHandler() : LLCommandHandler("chat", UNTRUSTED_BLOCK) { } + + // Your code here + bool handle(const LLSD& tokens, const LLSD& query_map, + LLMediaCtrl* web) + { + bool retval = false; + // Need at least 2 tokens to have a valid message. + if (tokens.size() < 2) + { + retval = false; + } + else + { + S32 channel = tokens[0].asInteger(); + // VWR-19499 Restrict function to chat channels greater than 0. + if ((channel > 0) && (channel < CHAT_CHANNEL_DEBUG)) + { + retval = true; + // Send unescaped message, see EXT-6353. + std::string unescaped_mesg (LLURI::unescape(tokens[1].asString())); + send_chat_from_viewer(unescaped_mesg, CHAT_TYPE_NORMAL, channel); + } + else + { + retval = false; + // Tell us this is an unsupported SLurl. + } + } + return retval; + } +}; + +// Creating the object registers with the dispatcher. +LLChatCommandHandler gChatHandler; diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llfloaterimnearbychat.h index 662496d338..05b48cccb0 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llfloaterimnearbychat.h @@ -1,6 +1,6 @@ /** - * @file llnearbychatbar.h - * @brief LLNearbyChatBar class definition + * @file llfloaterimnearbychat.h + * @brief LLFloaterIMNearbyChat class definition * * $LicenseInfo:firstyear=2002&license=viewerlgpl$ * Second Life Viewer Source Code @@ -24,38 +24,54 @@ * $/LicenseInfo$ */ -#ifndef LL_LLNEARBYCHATBAR_H -#define LL_LLNEARBYCHATBAR_H +#ifndef LL_LLFLOATERIMNEARBYCHAT_H +#define LL_LLFLOATERIMNEARBYCHAT_H -#include "llfloater.h" +#include "llfloaterimsessiontab.h" #include "llcombobox.h" #include "llgesturemgr.h" #include "llchat.h" #include "llvoiceclient.h" #include "lloutputmonitorctrl.h" #include "llspeakers.h" +#include "llscrollbar.h" +#include "llviewerchat.h" +#include "llpanel.h" -class LLNearbyChatBarListener; +class LLResizeBar; -class LLNearbyChatBar : public LLFloater +class LLFloaterIMNearbyChat + : public LLFloaterIMSessionTab { - LOG_CLASS(LLNearbyChatBar); - public: // constructor for inline chat-bars (e.g. hosted in chat history window) - LLNearbyChatBar(const LLSD& key); - ~LLNearbyChatBar() {} + LLFloaterIMNearbyChat(const LLSD& key = LLSD(LLUUID())); + ~LLFloaterIMNearbyChat() {} + + static LLFloaterIMNearbyChat* buildFloater(const LLSD& key); - virtual BOOL postBuild(); + /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void onClose(bool app_quitting); + /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); + /*virtual*/ void closeHostedFloater(); - static LLNearbyChatBar* getInstance(); + void loadHistory(); + void reloadMessages(bool clean_messages = false); + void removeScreenChat(); - LLLineEditor* getChatBox() { return mChatBox; } + void show(); + bool isChatVisible() const; - virtual void draw(); + /** @param archive true - to save a message to the chat history log */ + void addMessage (const LLChat& message,bool archive = true, const LLSD &args = LLSD()); + + LLChatEntry* getChatBox() { return mInputEditor; } std::string getCurrentChat(); + S32 getMessageArchiveLength() {return mMessageArchive.size();} + virtual BOOL handleKeyHere( KEY key, MASK mask ); static void startChat(const char* line); @@ -64,24 +80,22 @@ public: static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); + static bool isWordsName(const std::string& name); + void showHistory(); - void showTranslationCheckbox(BOOL show); - /*virtual*/void setMinimized(BOOL b); protected: static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str); - static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata); - static void onChatBoxFocusLost(LLFocusableElement* caller, void* userdata); + void onChatBoxKeystroke(); + void onChatBoxFocusLost(); void onChatBoxFocusReceived(); void sendChat( EChatType type ); void onChatBoxCommit(); void onChatFontChange(LLFontGL* fontp); - /* virtual */ bool applyRectControl(); - - void showNearbyChatPanel(bool show); - void onToggleNearbyChatPanel(); + /*virtual*/ void onTearOffClicked(); + /*virtual*/ void onClickCloseBtn(); static LLWString stripChannelNumber(const LLWString &mesg, S32* channel); EChatType processChatTypeTriggers(EChatType type, std::string &str); @@ -91,14 +105,15 @@ protected: // Which non-zero channel did we last chat on? static S32 sLastSpecialChatChannel; - LLLineEditor* mChatBox; - LLView* mNearbyChat; LLOutputMonitorCtrl* mOutputMonitor; LLLocalSpeakerMgr* mSpeakerMgr; S32 mExpandedHeight; - boost::shared_ptr<LLNearbyChatBarListener> mListener; +private: + /*virtual*/ void refresh(); + + std::vector<LLChat> mMessageArchive; }; -#endif +#endif // LL_LLFLOATERIMNEARBYCHAT_H diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index 600fd395fb..7afcf288ce 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -1,6 +1,6 @@ /** - * @file LLNearbyChatHandler.cpp - * @brief Nearby chat notification managment + * @file LLFloaterIMNearbyChatHandler.cpp + * @brief Nearby chat chat managment * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code @@ -27,43 +27,46 @@ #include "llviewerprecompiledheaders.h" #include "llagentdata.h" // for gAgentID -#include "llnearbychathandler.h" +#include "llfloaterimnearbychathandler.h" #include "llchatitemscontainerctrl.h" #include "llfirstuse.h" #include "llfloaterscriptdebug.h" #include "llhints.h" -#include "llnearbychat.h" +#include "llfloaterimnearbychat.h" #include "llrecentpeople.h" #include "llviewercontrol.h" #include "llfloaterreg.h"//for LLFloaterReg::getTypedInstance #include "llviewerwindow.h"//for screen channel position -#include "llnearbychatbar.h" +#include "llfloaterimnearbychat.h" +#include "llfloaterimcontainer.h" #include "llrootview.h" #include "lllayoutstack.h" -//add LLNearbyChatHandler to LLNotificationsUI namespace +//add LLFloaterIMNearbyChatHandler to LLNotificationsUI namespace using namespace LLNotificationsUI; -//----------------------------------------------------------------------------------------------- -//LLNearbyChatScreenChannel -//----------------------------------------------------------------------------------------------- -LLToastPanelBase* createToastPanel() +static LLFloaterIMNearbyChatToastPanel* createToastPanel() { - LLNearbyChatToastPanel* item = LLNearbyChatToastPanel::createInstance(); + LLFloaterIMNearbyChatToastPanel* item = LLFloaterIMNearbyChatToastPanel::createInstance(); return item; } -class LLNearbyChatScreenChannel: public LLScreenChannelBase + +//----------------------------------------------------------------------------------------------- +//LLFloaterIMNearbyChatScreenChannel +//----------------------------------------------------------------------------------------------- + +class LLFloaterIMNearbyChatScreenChannel: public LLScreenChannelBase { - LOG_CLASS(LLNearbyChatScreenChannel); + LOG_CLASS(LLFloaterIMNearbyChatScreenChannel); public: typedef std::vector<LLHandle<LLToast> > toast_vec_t; typedef std::list<LLHandle<LLToast> > toast_list_t; - LLNearbyChatScreenChannel(const Params& p) + LLFloaterIMNearbyChatScreenChannel(const Params& p) : LLScreenChannelBase(p) { mStopProcessing = false; @@ -71,20 +74,20 @@ public: LLControlVariable* ctrl = gSavedSettings.getControl("NearbyToastLifeTime").get(); if (ctrl) { - ctrl->getSignal()->connect(boost::bind(&LLNearbyChatScreenChannel::updateToastsLifetime, this)); + ctrl->getSignal()->connect(boost::bind(&LLFloaterIMNearbyChatScreenChannel::updateToastsLifetime, this)); } ctrl = gSavedSettings.getControl("NearbyToastFadingTime").get(); if (ctrl) { - ctrl->getSignal()->connect(boost::bind(&LLNearbyChatScreenChannel::updateToastFadingTime, this)); + ctrl->getSignal()->connect(boost::bind(&LLFloaterIMNearbyChatScreenChannel::updateToastFadingTime, this)); } } - void addNotification (LLSD& notification); + void addChat (LLSD& chat); void arrangeToasts (); - typedef boost::function<LLToastPanelBase* (void )> create_toast_panel_callback_t; + typedef boost::function<LLFloaterIMNearbyChatToastPanel* (void )> create_toast_panel_callback_t; void setCreatePanelCallback(create_toast_panel_callback_t value) { m_create_toast_panel_callback_t = value;} void onToastDestroyed (LLToast* toast, bool app_quitting); @@ -152,17 +155,19 @@ protected: bool mChannelRect; }; + + //----------------------------------------------------------------------------------------------- -// LLNearbyChatToast +// LLFloaterIMNearbyChatToast //----------------------------------------------------------------------------------------------- // We're deriving from LLToast to be able to override onClose() // in order to handle closing nearby chat toasts properly. -class LLNearbyChatToast : public LLToast +class LLFloaterIMNearbyChatToast : public LLToast { - LOG_CLASS(LLNearbyChatToast); + LOG_CLASS(LLFloaterIMNearbyChatToast); public: - LLNearbyChatToast(const LLToast::Params& p, LLNearbyChatScreenChannel* nc_channelp) + LLFloaterIMNearbyChatToast(const LLToast::Params& p, LLFloaterIMNearbyChatScreenChannel* nc_channelp) : LLToast(p), mNearbyChatScreenChannelp(nc_channelp) { @@ -171,14 +176,14 @@ public: /*virtual*/ void onClose(bool app_quitting); private: - LLNearbyChatScreenChannel* mNearbyChatScreenChannelp; + LLFloaterIMNearbyChatScreenChannel* mNearbyChatScreenChannelp; }; //----------------------------------------------------------------------------------------------- -// LLNearbyChatScreenChannel +// LLFloaterIMNearbyChatScreenChannel //----------------------------------------------------------------------------------------------- -void LLNearbyChatScreenChannel::deactivateToast(LLToast* toast) +void LLFloaterIMNearbyChatScreenChannel::deactivateToast(LLToast* toast) { toast_vec_t::iterator pos = std::find(m_active_toasts.begin(), m_active_toasts.end(), toast->getHandle()); @@ -192,12 +197,12 @@ void LLNearbyChatScreenChannel::deactivateToast(LLToast* toast) m_active_toasts.erase(pos); } -void LLNearbyChatScreenChannel::createOverflowToast(S32 bottom, F32 timer) +void LLFloaterIMNearbyChatScreenChannel::createOverflowToast(S32 bottom, F32 timer) { //we don't need overflow toast in nearby chat } -void LLNearbyChatScreenChannel::onToastDestroyed(LLToast* toast, bool app_quitting) +void LLFloaterIMNearbyChatScreenChannel::onToastDestroyed(LLToast* toast, bool app_quitting) { LL_DEBUGS("NearbyChat") << "Toast destroyed (app_quitting=" << app_quitting << ")" << llendl; @@ -216,7 +221,7 @@ void LLNearbyChatScreenChannel::onToastDestroyed(LLToast* toast, bool app_quitti } } -void LLNearbyChatScreenChannel::onToastFade(LLToast* toast) +void LLFloaterIMNearbyChatScreenChannel::onToastFade(LLToast* toast) { LL_DEBUGS("NearbyChat") << "Toast fading" << llendl; @@ -231,7 +236,7 @@ void LLNearbyChatScreenChannel::onToastFade(LLToast* toast) arrangeToasts(); } -void LLNearbyChatScreenChannel::updateToastsLifetime() +void LLFloaterIMNearbyChatScreenChannel::updateToastsLifetime() { S32 seconds = gSavedSettings.getS32("NearbyToastLifeTime"); toast_list_t::iterator it; @@ -242,7 +247,7 @@ void LLNearbyChatScreenChannel::updateToastsLifetime() } } -void LLNearbyChatScreenChannel::updateToastFadingTime() +void LLFloaterIMNearbyChatScreenChannel::updateToastFadingTime() { S32 seconds = gSavedSettings.getS32("NearbyToastFadingTime"); toast_list_t::iterator it; @@ -253,9 +258,9 @@ void LLNearbyChatScreenChannel::updateToastFadingTime() } } -bool LLNearbyChatScreenChannel::createPoolToast() +bool LLFloaterIMNearbyChatScreenChannel::createPoolToast() { - LLToastPanelBase* panel= m_create_toast_panel_callback_t(); + LLFloaterIMNearbyChatToastPanel* panel= m_create_toast_panel_callback_t(); if(!panel) return false; @@ -264,20 +269,20 @@ bool LLNearbyChatScreenChannel::createPoolToast() p.lifetime_secs = gSavedSettings.getS32("NearbyToastLifeTime"); p.fading_time_secs = gSavedSettings.getS32("NearbyToastFadingTime"); - LLToast* toast = new LLNearbyChatToast(p, this); + LLToast* toast = new LLFloaterIMNearbyChatToast(p, this); - toast->setOnFadeCallback(boost::bind(&LLNearbyChatScreenChannel::onToastFade, this, _1)); + toast->setOnFadeCallback(boost::bind(&LLFloaterIMNearbyChatScreenChannel::onToastFade, this, _1)); // If the toast gets somehow prematurely destroyed, deactivate it to prevent crash (STORM-1352). - toast->setOnToastDestroyedCallback(boost::bind(&LLNearbyChatScreenChannel::onToastDestroyed, this, _1, false)); + toast->setOnToastDestroyedCallback(boost::bind(&LLFloaterIMNearbyChatScreenChannel::onToastDestroyed, this, _1, false)); LL_DEBUGS("NearbyChat") << "Creating and pooling toast" << llendl; m_toast_pool.push_back(toast->getHandle()); return true; } -void LLNearbyChatScreenChannel::addNotification(LLSD& notification) +void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) { //look in pool. if there is any message if(mStopProcessing) @@ -289,16 +294,16 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) if(m_active_toasts.size()) { - LLUUID fromID = notification["from_id"].asUUID(); // agent id or object id - std::string from = notification["from"].asString(); + LLUUID fromID = chat["from_id"].asUUID(); // agent id or object id + std::string from = chat["from"].asString(); LLToast* toast = m_active_toasts[0].get(); if (toast) { - LLNearbyChatToastPanel* panel = dynamic_cast<LLNearbyChatToastPanel*>(toast->getPanel()); + LLFloaterIMNearbyChatToastPanel* panel = dynamic_cast<LLFloaterIMNearbyChatToastPanel*>(toast->getPanel()); if(panel && panel->messageID() == fromID && panel->getFromName() == from && panel->canAddText()) { - panel->addMessage(notification); + panel->addMessage(chat); toast->reshapeToPanel(); toast->startTimer(); @@ -316,11 +321,11 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) LL_DEBUGS("NearbyChat") << "Empty pool" << llendl; if(!createPoolToast())//created toast will go to pool. so next call will find it return; - addNotification(notification); + addChat(chat); return; } - int chat_type = notification["chat_type"].asInteger(); + int chat_type = chat["chat_type"].asInteger(); if( ((EChatType)chat_type == CHAT_TYPE_DEBUG_MSG)) { @@ -339,10 +344,10 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) m_toast_pool.pop_back(); - LLToastPanelBase* panel = dynamic_cast<LLToastPanelBase*>(toast->getPanel()); + LLFloaterIMNearbyChatToastPanel* panel = dynamic_cast<LLFloaterIMNearbyChatToastPanel*>(toast->getPanel()); if(!panel) return; - panel->init(notification); + panel->init(chat); toast->reshapeToPanel(); toast->startTimer(); @@ -361,7 +366,7 @@ static bool sort_toasts_predicate(LLHandle<LLToast> first, LLHandle<LLToast> sec return v1 > v2; } -void LLNearbyChatScreenChannel::arrangeToasts() +void LLFloaterIMNearbyChatScreenChannel::arrangeToasts() { if(mStopProcessing || isHovering()) return; @@ -441,20 +446,18 @@ void LLNearbyChatScreenChannel::arrangeToasts() //----------------------------------------------------------------------------------------------- -//LLNearbyChatHandler +//LLFloaterIMNearbyChatHandler //----------------------------------------------------------------------------------------------- -boost::scoped_ptr<LLEventPump> LLNearbyChatHandler::sChatWatcher(new LLEventStream("LLChat")); +boost::scoped_ptr<LLEventPump> LLFloaterIMNearbyChatHandler::sChatWatcher(new LLEventStream("LLChat")); -LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& id) +LLFloaterIMNearbyChatHandler::LLFloaterIMNearbyChatHandler() { - mType = type; - // Getting a Channel for our notifications - LLNearbyChatScreenChannel::Params p; + LLFloaterIMNearbyChatScreenChannel::Params p; p.id = LLUUID(gSavedSettings.getString("NearByChatChannelUUID")); - LLNearbyChatScreenChannel* channel = new LLNearbyChatScreenChannel(p); + LLFloaterIMNearbyChatScreenChannel* channel = new LLFloaterIMNearbyChatScreenChannel(p); - LLNearbyChatScreenChannel::create_toast_panel_callback_t callback = createToastPanel; + LLFloaterIMNearbyChatScreenChannel::create_toast_panel_callback_t callback = createToastPanel; channel->setCreatePanelCallback(callback); @@ -463,12 +466,12 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i mChannel = channel->getHandle(); } -LLNearbyChatHandler::~LLNearbyChatHandler() +LLFloaterIMNearbyChatHandler::~LLFloaterIMNearbyChatHandler() { } -void LLNearbyChatHandler::initChannel() +void LLFloaterIMNearbyChatHandler::initChannel() { //LLRect snap_rect = gFloaterView->getSnapRect(); //mChannel->init(snap_rect.mLeft, snap_rect.mLeft + 200); @@ -476,7 +479,7 @@ void LLNearbyChatHandler::initChannel() -void LLNearbyChatHandler::processChat(const LLChat& chat_msg, +void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) { if(chat_msg.mMuted == TRUE) @@ -485,28 +488,27 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, if(chat_msg.mText.empty()) return;//don't process empty messages - LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar"); - - LLNearbyChat* nearby_chat = chat_bar->findChild<LLNearbyChat>("nearby_chat"); + LLFloaterReg::getInstance("im_container"); + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); // Build notification data - LLSD notification; - notification["message"] = chat_msg.mText; - notification["from"] = chat_msg.mFromName; - notification["from_id"] = chat_msg.mFromID; - notification["time"] = chat_msg.mTime; - notification["source"] = (S32)chat_msg.mSourceType; - notification["chat_type"] = (S32)chat_msg.mChatType; - notification["chat_style"] = (S32)chat_msg.mChatStyle; + LLSD chat; + chat["message"] = chat_msg.mText; + chat["from"] = chat_msg.mFromName; + chat["from_id"] = chat_msg.mFromID; + chat["time"] = chat_msg.mTime; + chat["source"] = (S32)chat_msg.mSourceType; + chat["chat_type"] = (S32)chat_msg.mChatType; + chat["chat_style"] = (S32)chat_msg.mChatStyle; // Pass sender info so that it can be rendered properly (STORM-1021). - notification["sender_slurl"] = LLViewerChat::getSenderSLURL(chat_msg, args); + chat["sender_slurl"] = LLViewerChat::getSenderSLURL(chat_msg, args); if (chat_msg.mChatType == CHAT_TYPE_DIRECT && chat_msg.mText.length() > 0 && chat_msg.mText[0] == '@') { // Send event on to LLEventStream and exit - sChatWatcher->post(notification); + sChatWatcher->post(chat); return; } @@ -553,15 +555,18 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, } // Send event on to LLEventStream - sChatWatcher->post(notification); + sChatWatcher->post(chat); + LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); - if( !chat_bar->isMinimized() - && nearby_chat->isInVisibleChain() + if(( nearby_chat->hasFocus() + || im_box->hasFocus() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT && gSavedSettings.getBOOL("UseChatBubbles") ) || mChannel.isDead() - || !mChannel.get()->getShowToasts() ) // to prevent toasts in Busy mode + || !mChannel.get()->getShowToasts() ) + && nearby_chat->isMessagePaneExpanded()) + // to prevent toasts in Do Not Disturb mode return;//no need in toast if chat is visible or if bubble chat is enabled // arrange a channel on a screen @@ -582,7 +587,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, } */ - LLNearbyChatScreenChannel* channel = dynamic_cast<LLNearbyChatScreenChannel*>(mChannel.get()); + LLFloaterIMNearbyChatScreenChannel* channel = dynamic_cast<LLFloaterIMNearbyChatScreenChannel*>(mChannel.get()); if(channel) { @@ -601,33 +606,43 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, toast_msg = chat_msg.mText; } - // Add a nearby chat toast. - LLUUID id; - id.generate(); - notification["id"] = id; - std::string r_color_name = "White"; - F32 r_color_alpha = 1.0f; - LLViewerChat::getChatColor( chat_msg, r_color_name, r_color_alpha); - - notification["text_color"] = r_color_name; - notification["color_alpha"] = r_color_alpha; - notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ; - notification["message"] = toast_msg; - channel->addNotification(notification); - } -} + //Don't show nearby toast, if conversation is visible but not focused + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(LLUUID()); + if (session_floater && session_floater->isMessagePaneExpanded() + && session_floater->isInVisibleChain() && !session_floater->isMinimized() + && !(session_floater->getHost() && session_floater->getHost()->isMinimized())) + { + return; + } -void LLNearbyChatHandler::onDeleteToast(LLToast* toast) -{ + //Will show toast when chat preference is set + if((gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") || !session_floater->isMessagePaneExpanded()) + { + // Add a nearby chat toast. + LLUUID id; + id.generate(); + chat["id"] = id; + std::string r_color_name = "White"; + F32 r_color_alpha = 1.0f; + LLViewerChat::getChatColor( chat_msg, r_color_name, r_color_alpha); + + chat["text_color"] = r_color_name; + chat["color_alpha"] = r_color_alpha; + chat["font_size"] = (S32)LLViewerChat::getChatFontSize() ; + chat["message"] = toast_msg; + channel->addChat(chat); + } + + } } //----------------------------------------------------------------------------------------------- -// LLNearbyChatToast +// LLFloaterIMNearbyChatToast //----------------------------------------------------------------------------------------------- // virtual -void LLNearbyChatToast::onClose(bool app_quitting) +void LLFloaterIMNearbyChatToast::onClose(bool app_quitting) { mNearbyChatScreenChannelp->onToastDestroyed(this, app_quitting); } diff --git a/indra/newview/llnearbychathandler.h b/indra/newview/llfloaterimnearbychathandler.h index b0e4f62d51..5e6f8cde30 100644 --- a/indra/newview/llnearbychathandler.h +++ b/indra/newview/llfloaterimnearbychathandler.h @@ -1,5 +1,5 @@ /** - * @file llnearbychathandler.h + * @file llfloaterimnearbychathandler.h * @brief nearby chat notify * * $LicenseInfo:firstyear=2004&license=viewerlgpl$ @@ -24,27 +24,26 @@ * $/LicenseInfo$ */ -#ifndef LL_LLNEARBYCHATHANDLER_H -#define LL_LLNEARBYCHATHANDLER_H +#ifndef LL_LLFLOATERIMNEARBYCHATHANDLER_H +#define LL_LLFLOATERIMNEARBYCHATHANDLER_H #include "llnotificationhandler.h" class LLEventPump; -//add LLNearbyChatHandler to LLNotificationsUI namespace +//add LLFloaterIMNearbyChatHandler to LLNotificationsUI namespace namespace LLNotificationsUI{ -class LLNearbyChatHandler : public LLChatHandler +class LLFloaterIMNearbyChatHandler : public LLChatHandler { public: - LLNearbyChatHandler(e_notification_type type,const LLSD& id); - virtual ~LLNearbyChatHandler(); + LLFloaterIMNearbyChatHandler(); + virtual ~LLFloaterIMNearbyChatHandler(); virtual void processChat(const LLChat& chat_msg, const LLSD &args); protected: - virtual void onDeleteToast(LLToast* toast); virtual void initChannel(); static boost::scoped_ptr<LLEventPump> sChatWatcher; @@ -52,4 +51,4 @@ protected: } -#endif /* LL_LLNEARBYCHATHANDLER_H */ +#endif /* LL_LLFLOATERIMNEARBYCHATHANDLER_H */ diff --git a/indra/newview/llnearbychatbarlistener.cpp b/indra/newview/llfloaterimnearbychatlistener.cpp index a63e1fb76e..14a22bcd84 100644 --- a/indra/newview/llnearbychatbarlistener.cpp +++ b/indra/newview/llfloaterimnearbychatlistener.cpp @@ -1,8 +1,8 @@ /** - * @file llnearbychatbarlistener.cpp + * @file llfloaterimnearbychatlistener.cpp * @author Dave Simmons * @date 2011-03-15 - * @brief Implementation for LLNearbyChatBarListener. + * @brief Implementation for LLFloaterIMNearbyChatListener. * * $LicenseInfo:firstyear=2011&license=viewerlgpl$ * Second Life Viewer Source Code @@ -28,15 +28,15 @@ #include "llviewerprecompiledheaders.h" -#include "llnearbychatbarlistener.h" -#include "llnearbychatbar.h" +#include "llfloaterimnearbychatlistener.h" +#include "llfloaterimnearbychat.h" #include "llagent.h" #include "llchat.h" -LLNearbyChatBarListener::LLNearbyChatBarListener(LLNearbyChatBar & chatbar) +LLFloaterIMNearbyChatListener::LLFloaterIMNearbyChatListener(LLFloaterIMNearbyChat & chatbar) : LLEventAPI("LLChatBar", "LLChatBar listener to (e.g.) sendChat, etc."), mChatbar(chatbar) @@ -46,12 +46,12 @@ LLNearbyChatBarListener::LLNearbyChatBarListener(LLNearbyChatBar & chatbar) "[\"message\"] chat message text [required]\n" "[\"channel\"] chat channel number [default = 0]\n" "[\"type\"] chat type \"whisper\", \"normal\", \"shout\" [default = \"normal\"]", - &LLNearbyChatBarListener::sendChat); + &LLFloaterIMNearbyChatListener::sendChat); } // "sendChat" command -void LLNearbyChatBarListener::sendChat(LLSD const & chat_data) const +void LLFloaterIMNearbyChatListener::sendChat(LLSD const & chat_data) const { // Extract the data std::string chat_text = chat_data["message"].asString(); diff --git a/indra/newview/llnearbychatbarlistener.h b/indra/newview/llfloaterimnearbychatlistener.h index 9af9bc1f7b..1470a6dc1e 100644 --- a/indra/newview/llnearbychatbarlistener.h +++ b/indra/newview/llfloaterimnearbychatlistener.h @@ -1,8 +1,8 @@ /** - * @file llnearbychatbarlistener.h + * @file llfloaterimnearbychatlistener.h * @author Dave Simmons * @date 2011-03-15 - * @brief Class definition for LLNearbyChatBarListener. + * @brief Class definition for LLFloaterIMNearbyChatListener. * * $LicenseInfo:firstyear=2011&license=viewerlgpl$ * Second Life Viewer Source Code @@ -27,24 +27,24 @@ */ -#ifndef LL_LLNEARBYCHATBARLISTENER_H -#define LL_LLNEARBYCHATBARLISTENER_H +#ifndef LL_LLFLOATERIMNEARBYCHATLISTENER_H +#define LL_LLFLOATERIMNEARBYCHATLISTENER_H #include "lleventapi.h" class LLSD; -class LLNearbyChatBar; +class LLFloaterIMNearbyChat; -class LLNearbyChatBarListener : public LLEventAPI +class LLFloaterIMNearbyChatListener : public LLEventAPI { public: - LLNearbyChatBarListener(LLNearbyChatBar & chatbar); + LLFloaterIMNearbyChatListener(LLFloaterIMNearbyChat & chatbar); private: void sendChat(LLSD const & chat_data) const; - LLNearbyChatBar & mChatbar; + LLFloaterIMNearbyChat & mChatbar; }; -#endif // LL_LLNEARBYCHATBARLISTENER_H +#endif // LL_LLFLOATERIMNEARBYCHATLISTENER_H diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp new file mode 100644 index 0000000000..73adfd0eda --- /dev/null +++ b/indra/newview/llfloaterimsession.cpp @@ -0,0 +1,1274 @@ +/** + * @file llfloaterimsession.cpp + * @brief LLFloaterIMSession class definition + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterimsession.h" + +#include "lldraghandle.h" +#include "llnotificationsutil.h" + +#include "llagent.h" +#include "llappviewer.h" +#include "llavataractions.h" +#include "llavatarnamecache.h" +#include "llbutton.h" +#include "llchannelmanager.h" +#include "llchiclet.h" +#include "llchicletbar.h" +#include "llfloaterreg.h" +#include "llfloateravatarpicker.h" +#include "llfloaterimcontainer.h" // to replace separate IM Floaters with multifloater container +#include "llinventoryfunctions.h" +//#include "lllayoutstack.h" +#include "llchatentry.h" +#include "lllogchat.h" +#include "llscreenchannel.h" +#include "llsyswellwindow.h" +#include "lltrans.h" +#include "llchathistory.h" +#include "llnotifications.h" +#include "llviewerwindow.h" +#include "lltransientfloatermgr.h" +#include "llinventorymodel.h" +#include "llrootview.h" +#include "llspeakers.h" +#include "llviewerchat.h" +#include "llnotificationmanager.h" +#include "llautoreplace.h" + +floater_showed_signal_t LLFloaterIMSession::sIMFloaterShowedSignal; + +LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id) + : LLFloaterIMSessionTab(session_id), + mLastMessageIndex(-1), + mDialog(IM_NOTHING_SPECIAL), + mTypingStart(), + mShouldSendTypingState(false), + mMeTyping(false), + mOtherTyping(false), + mSessionNameUpdatedForTyping(false), + mTypingTimer(), + mTypingTimeoutTimer(), + mPositioned(false), + mSessionInitialized(false) +{ + mIsNearbyChat = false; + + initIMSession(session_id); + + setOverlapsScreenChannel(true); + + LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this); + mEnableCallbackRegistrar.add("Avatar.EnableGearItem", boost::bind(&LLFloaterIMSession::enableGearMenuItem, this, _2)); + mCommitCallbackRegistrar.add("Avatar.GearDoToSelected", boost::bind(&LLFloaterIMSession::GearDoToSelected, this, _2)); + mEnableCallbackRegistrar.add("Avatar.CheckGearItem", boost::bind(&LLFloaterIMSession::checkGearMenuItem, this, _2)); + + setDocked(true); +} + + +// virtual +void LLFloaterIMSession::refresh() +{ + if (mMeTyping) +{ + // Time out if user hasn't typed for a while. + if (mTypingTimeoutTimer.getElapsedTimeF32() > LLAgent::TYPING_TIMEOUT_SECS) + { + setTyping(false); + } + } +} + +// virtual +void LLFloaterIMSession::onTearOffClicked() +{ + LLFloaterIMSessionTab::onTearOffClicked(); + + if(mIsP2PChat) + { + if(isTornOff()) + { + mSpeakingIndicator->setSpeakerId(mOtherParticipantUUID, mSessionID); + } + else + { + mSpeakingIndicator->setSpeakerId(LLUUID::null); + } + } +} + +// virtual +void LLFloaterIMSession::onClickCloseBtn() +{ + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSessionID); + + if (session != NULL) + { + 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; + } + } + else + { + llwarns << "Empty session with id: " << (mSessionID.asString()) << llendl; + return; + } + + LLFloaterIMSessionTab::onClickCloseBtn(); +} + +/* static */ +void LLFloaterIMSession::newIMCallback(const LLSD& data) +{ + if (data["num_unread"].asInteger() > 0 || data["from_id"].asUUID().isNull()) + { + LLUUID session_id = data["session_id"].asUUID(); + + LLFloaterIMSession* floater = LLFloaterReg::findTypedInstance<LLFloaterIMSession>("impanel", session_id); + + // update if visible, otherwise will be updated when opened + if (floater && floater->isInVisibleChain()) + { + floater->updateMessages(); + } + } +} + +void LLFloaterIMSession::onVisibilityChange(const LLSD& new_visibility) +{ + bool visible = new_visibility.asBoolean(); + + LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID); + + if (visible && voice_channel && + voice_channel->getState() == LLVoiceChannel::STATE_CONNECTED) + { + LLFloaterReg::showInstance("voice_call", mSessionID); + } + else + { + LLFloaterReg::hideInstance("voice_call", mSessionID); + } +} + +void LLFloaterIMSession::onSendMsg( LLUICtrl* ctrl, void* userdata ) +{ + LLFloaterIMSession* self = (LLFloaterIMSession*) userdata; + self->sendMsgFromInputEditor(); + self->setTyping(false); +} + +bool LLFloaterIMSession::enableGearMenuItem(const LLSD& userdata) +{ + std::string command = userdata.asString(); + uuid_vec_t selected_uuids; + selected_uuids.push_back(mOtherParticipantUUID); + + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + return floater_container->enableContextMenuItem(command, selected_uuids); +} + +void LLFloaterIMSession::GearDoToSelected(const LLSD& userdata) +{ + std::string command = userdata.asString(); + uuid_vec_t selected_uuids; + selected_uuids.push_back(mOtherParticipantUUID); + + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + floater_container->doToParticipants(command, selected_uuids); +} + +bool LLFloaterIMSession::checkGearMenuItem(const LLSD& userdata) +{ + std::string command = userdata.asString(); + uuid_vec_t selected_uuids; + selected_uuids.push_back(mOtherParticipantUUID); + + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + return floater_container->checkContextMenuItem(command, selected_uuids); +} + +void LLFloaterIMSession::sendMsgFromInputEditor() +{ + if (gAgent.isGodlike() + || (mDialog != IM_NOTHING_SPECIAL) + || !mOtherParticipantUUID.isNull()) + { + if (mInputEditor) + { + LLWString text = mInputEditor->getWText(); + LLWStringUtil::trim(text); + LLWStringUtil::replaceChar(text,182,'\n'); // Convert paragraph symbols back into newlines. + if(!text.empty()) + { + // Truncate and convert to UTF8 for transport + std::string utf8_text = wstring_to_utf8str(text); + + sendMsg(utf8_text); + + mInputEditor->setText(LLStringUtil::null); + } + } + } + else + { + llinfos << "Cannot send IM to everyone unless you're a god." << llendl; + } +} + +void LLFloaterIMSession::sendMsg(const std::string& msg) +{ + const std::string utf8_text = utf8str_truncate(msg, MAX_MSG_BUF_SIZE - 1); + + if (mSessionInitialized) + { + LLIMModel::sendMessage(utf8_text, mSessionID, mOtherParticipantUUID, mDialog); + } + else + { + //queue up the message to send once the session is initialized + mQueuedMsgsForInit.append(utf8_text); + } + + updateMessages(); +} + +LLFloaterIMSession::~LLFloaterIMSession() +{ + mVoiceChannelStateChangeConnection.disconnect(); + if(LLVoiceClient::instanceExists()) + { + LLVoiceClient::getInstance()->removeObserver(this); + } + + LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this); +} + + +void LLFloaterIMSession::initIMSession(const LLUUID& session_id) +{ + // Change the floater key to bind it to a new session. + setKey(session_id); + + mSessionID = session_id; + mSession = LLIMModel::getInstance()->findIMSession(mSessionID); + + if (mSession) + { + mIsP2PChat = mSession->isP2PSessionType(); + mSessionInitialized = mSession->mSessionInitialized; + mDialog = mSession->mType; + } +} + +void LLFloaterIMSession::initIMFloater() +{ + const LLUUID& other_party_id = + LLIMModel::getInstance()->getOtherParticipantID(mSessionID); + if (other_party_id.notNull()) + { + mOtherParticipantUUID = other_party_id; + } + + boundVoiceChannel(); + + mTypingStart = LLTrans::getString("IM_typing_start_string"); + + // Show control panel in torn off floaters only. + mParticipantListPanel->setVisible(!getHost() && gSavedSettings.getBOOL("IMShowControlPanel")); + + // Disable input editor if session cannot accept text + if ( mSession && !mSession->mTextIMPossible ) + { + mInputEditor->setEnabled(FALSE); + mInputEditor->setLabel(LLTrans::getString("IM_unavailable_text_label")); + } + + if (!mIsP2PChat) + { + std::string session_name(LLIMModel::instance().getName(mSessionID)); + updateSessionName(session_name); + } +} + +//virtual +BOOL LLFloaterIMSession::postBuild() +{ + BOOL result = LLFloaterIMSessionTab::postBuild(); + + mInputEditor->setMaxTextLength(1023); + mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5)); + mInputEditor->setFocusReceivedCallback( boost::bind(onInputEditorFocusReceived, _1, this) ); + mInputEditor->setFocusLostCallback( boost::bind(onInputEditorFocusLost, _1, this) ); + mInputEditor->setKeystrokeCallback( boost::bind(onInputEditorKeystroke, _1, this) ); + mInputEditor->setCommitCallback(boost::bind(onSendMsg, _1, this)); + + setDocked(true); + + LLButton* add_btn = getChild<LLButton>("add_btn"); + + // Allow to add chat participants depending on the session type + add_btn->setEnabled(isInviteAllowed()); + add_btn->setClickedCallback(boost::bind(&LLFloaterIMSession::onAddButtonClicked, this)); + + childSetAction("voice_call_btn", boost::bind(&LLFloaterIMSession::onCallButtonClicked, this)); + + LLVoiceClient::getInstance()->addObserver(this); + + //*TODO if session is not initialized yet, add some sort of a warning message like "starting session...blablabla" + //see LLFloaterIMPanel for how it is done (IB) + + initIMFloater(); + + return result; +} + +void LLFloaterIMSession::onAddButtonClicked() +{ + LLView * button = findChild<LLView>("toolbar_panel")->findChild<LLButton>("add_btn"); + LLFloater* root_floater = gFloaterView->getParentFloater(this); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMSession::addSessionParticipants, this, _1), TRUE, TRUE, FALSE, root_floater->getName(), button); + if (!picker) + { + return; + } + + // Need to disable 'ok' button when selected users are already in conversation. + picker->setOkBtnEnableCb(boost::bind(&LLFloaterIMSession::canAddSelectedToChat, this, _1)); + + if (root_floater) + { + root_floater->addDependentFloater(picker); + } +} + +bool LLFloaterIMSession::canAddSelectedToChat(const uuid_vec_t& uuids) +{ + if (!mSession + || mDialog == IM_SESSION_GROUP_START + || mDialog == IM_SESSION_INVITE && gAgent.isInGroup(mSessionID)) + { + return false; + } + + if (mIsP2PChat) + { + // For a P2P session just check if we are not adding the other participant. + + for (uuid_vec_t::const_iterator id = uuids.begin(); + id != uuids.end(); ++id) + { + if (*id == mOtherParticipantUUID) + { + return false; + } + } + } + else + { + // For a conference session we need to check against the list from LLSpeakerMgr, + // because this list may change when participants join or leave the session. + + LLSpeakerMgr::speaker_list_t speaker_list; + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + if (speaker_mgr) + { + speaker_mgr->getSpeakerList(&speaker_list, true); + } + + for (uuid_vec_t::const_iterator id = uuids.begin(); + id != uuids.end(); ++id) + { + for (LLSpeakerMgr::speaker_list_t::const_iterator it = speaker_list.begin(); + it != speaker_list.end(); ++it) + { + const LLPointer<LLSpeaker>& speaker = *it; + if (*id == speaker->mID) + { + return false; + } + } + } + } + + return true; +} + +void LLFloaterIMSession::addSessionParticipants(const uuid_vec_t& uuids) +{ + if (mIsP2PChat) + { + LLSD payload; + LLSD args; + + LLNotificationsUtil::add("ConfirmAddingChatParticipants", args, payload, + boost::bind(&LLFloaterIMSession::addP2PSessionParticipants, this, _1, _2, uuids)); + } + else + { + // remember whom we have invited, to notify others later, when the invited ones actually join + mInvitedParticipants.insert(mInvitedParticipants.end(), uuids.begin(), uuids.end()); + + inviteToSession(uuids); + } +} + +void LLFloaterIMSession::addP2PSessionParticipants(const LLSD& notification, const LLSD& response, const uuid_vec_t& uuids) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) + { + return; + } + + LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID); + + // first check whether this is a voice session + bool is_voice_call = voice_channel != NULL && voice_channel->isActive(); + + uuid_vec_t temp_ids; + + // Add the initial participant of a P2P session + temp_ids.push_back(mOtherParticipantUUID); + temp_ids.insert(temp_ids.end(), uuids.begin(), uuids.end()); + + // then we can close the current session + onClose(false); + + // we start a new session so reset the initialization flag + mSessionInitialized = false; + + // remember whom we have invited, to notify others later, when the invited ones actually join + mInvitedParticipants.insert(mInvitedParticipants.end(), uuids.begin(), uuids.end()); + + // Start a new ad hoc voice call if we invite new participants to a P2P call, + // or start a text chat otherwise. + if (is_voice_call) + { + LLAvatarActions::startAdhocCall(temp_ids, mSessionID); + } + else + { + LLAvatarActions::startConference(temp_ids, mSessionID); + } +} + +void LLFloaterIMSession::sendParticipantsAddedNotification(const uuid_vec_t& uuids) +{ + std::string names_string; + LLAvatarActions::buildResidentsString(uuids, names_string); + LLStringUtil::format_map_t args; + args["[NAME]"] = names_string; + + sendMsg(getString(uuids.size() > 1 ? "multiple_participants_added" : "participant_added", args)); +} + +void LLFloaterIMSession::boundVoiceChannel() +{ + LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID); + if(voice_channel) + { + mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback( + boost::bind(&LLFloaterIMSession::onVoiceChannelStateChanged, this, _1, _2)); + + //call (either p2p, group or ad-hoc) can be already in started state + bool callIsActive = voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED; + updateCallBtnState(callIsActive); + } +} + +void LLFloaterIMSession::onCallButtonClicked() +{ + LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID); + if (voice_channel) + { + bool is_call_active = voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED; + if (is_call_active) + { + gIMMgr->endCall(mSessionID); + } + else + { + gIMMgr->startCall(mSessionID); + } + } +} + +void LLFloaterIMSession::onChange(EStatusType status, const std::string &channelURI, bool proximal) +{ + if(status != STATUS_JOINING && status != STATUS_LEFT_CHANNEL) + { + enableDisableCallBtn(); + } +} + +void LLFloaterIMSession::onVoiceChannelStateChanged( + const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) +{ + bool callIsActive = new_state >= LLVoiceChannel::STATE_CALL_STARTED; + updateCallBtnState(callIsActive); +} + +void LLFloaterIMSession::updateSessionName(const std::string& name) +{ + if (!name.empty()) + { + LLFloaterIMSessionTab::updateSessionName(name); + mTypingStart.setArg("[NAME]", name); + setTitle (mOtherTyping ? mTypingStart.getString() : name); + mSessionNameUpdatedForTyping = mOtherTyping; + } +} + +//static +LLFloaterIMSession* LLFloaterIMSession::show(const LLUUID& session_id) +{ + closeHiddenIMToasts(); + + if (!gIMMgr->hasSession(session_id)) + return NULL; + + // Test the existence of the floater before we try to create it + bool exist = findInstance(session_id); + + // Get the floater: this will create the instance if it didn't exist + LLFloaterIMSession* floater = getInstance(session_id); + if (!floater) + return NULL; + + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + + // Do not add again existing floaters + if (!exist) + { + // LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END; + // TODO: mantipov: use LLTabContainer::RIGHT_OF_CURRENT if it exists + LLTabContainer::eInsertionPoint i_pt = LLTabContainer::END; + if (floater_container) + { + floater_container->addFloater(floater, TRUE, i_pt); + } + } + + floater->openFloater(floater->getKey()); + + floater->setVisible(TRUE); + + return floater; +} +//static +LLFloaterIMSession* LLFloaterIMSession::findInstance(const LLUUID& session_id) +{ + LLFloaterIMSession* conversation = + LLFloaterReg::findTypedInstance<LLFloaterIMSession>("impanel", session_id); + + return conversation; +} + +LLFloaterIMSession* LLFloaterIMSession::getInstance(const LLUUID& session_id) +{ + LLFloaterIMSession* conversation = + LLFloaterReg::getTypedInstance<LLFloaterIMSession>("impanel", session_id); + + return conversation; +} + +void LLFloaterIMSession::onClose(bool app_quitting) +{ + setTyping(false); + + // The source of much argument and design thrashing + // Should the window hide or the session close when the X is clicked? + // + // Last change: + // EXT-3516 X Button should end IM session, _ button should hide + gIMMgr->leaveSession(mSessionID); + LLFloaterIMSessionTab::restoreFloater(); + // Clean up the conversation *after* the session has been ended + LLFloaterIMSessionTab::onClose(app_quitting); +} + +void LLFloaterIMSession::setDocked(bool docked, bool pop_on_undock) +{ + // update notification channel state + LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*> + (LLNotificationsUI::LLChannelManager::getInstance()-> + findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); + + if(!isChatMultiTab()) + { + LLTransientDockableFloater::setDocked(docked, pop_on_undock); + } + + // update notification channel state + if(channel) + { + channel->updateShowToastsState(); + channel->redrawToasts(); + } +} + +void LLFloaterIMSession::setVisible(BOOL visible) +{ + LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*> + (LLNotificationsUI::LLChannelManager::getInstance()-> + findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); + + LLFloaterIMSessionTab::setVisible(visible); + + // update notification channel state + if(channel) + { + channel->updateShowToastsState(); + channel->redrawToasts(); + } + + if(!visible) + { + LLChicletPanel * chiclet_panelp = LLChicletBar::getInstance()->getChicletPanel(); + if (NULL != chiclet_panelp) + { + LLIMChiclet * chicletp = chiclet_panelp->findChiclet<LLIMChiclet>(mSessionID); + if(NULL != chicletp) + { + chicletp->setToggleState(false); + } + } + } + + if (visible && isInVisibleChain()) + { + sIMFloaterShowedSignal(mSessionID); + + } + +} + +BOOL LLFloaterIMSession::getVisible() +{ + bool visible; + + if(isChatMultiTab()) + { + LLFloaterIMContainer* im_container = + LLFloaterIMContainer::getInstance(); + + // Treat inactive floater as invisible. + bool is_active = im_container->getActiveFloater() == this; + + //torn off floater is always inactive + if (!is_active && getHost() != im_container) + { + visible = LLTransientDockableFloater::getVisible(); + } + else + { + // getVisible() returns TRUE when Tabbed IM window is minimized. + visible = is_active && !im_container->isMinimized() + && im_container->getVisible(); + } + } + else + { + visible = LLTransientDockableFloater::getVisible(); + } + + return visible; +} + +//static +bool LLFloaterIMSession::toggle(const LLUUID& session_id) +{ + if(!isChatMultiTab()) + { + LLFloaterIMSession* floater = LLFloaterReg::findTypedInstance<LLFloaterIMSession>( + "impanel", session_id); + if (floater && floater->getVisible() && floater->hasFocus()) + { + // clicking on chiclet to close floater just hides it to maintain existing + // scroll/text entry state + floater->setVisible(false); + return false; + } + else if(floater && (!floater->isDocked() || floater->getVisible() && !floater->hasFocus())) + { + floater->setVisible(TRUE); + floater->setFocus(TRUE); + return true; + } + } + + // ensure the list of messages is updated when floater is made visible + show(session_id); + return true; +} + +void LLFloaterIMSession::sessionInitReplyReceived(const LLUUID& im_session_id) +{ + mSessionInitialized = true; + + //will be different only for an ad-hoc im session + if (mSessionID != im_session_id) + { + initIMSession(im_session_id); + buildConversationViewParticipant(); + } + + initIMFloater(); + LLFloaterIMSessionTab::updateGearBtn(); + //*TODO here we should remove "starting session..." warning message if we added it in postBuild() (IB) + + //need to send delayed messages collected while waiting for session initialization + if (mQueuedMsgsForInit.size()) + { + LLSD::array_iterator iter; + for ( iter = mQueuedMsgsForInit.beginArray(); + iter != mQueuedMsgsForInit.endArray(); ++iter) + { + LLIMModel::sendMessage(iter->asString(), mSessionID, + mOtherParticipantUUID, mDialog); + } + + mQueuedMsgsForInit.clear(); + } +} + +void LLFloaterIMSession::updateMessages() +{ + std::list<LLSD> messages; + + // we shouldn't reset unread message counters if IM floater doesn't have focus + LLIMModel::instance().getMessages( + mSessionID, messages, mLastMessageIndex + 1, hasFocus()); + + if (messages.size()) + { + std::ostringstream message; + std::list<LLSD>::const_reverse_iterator iter = messages.rbegin(); + std::list<LLSD>::const_reverse_iterator iter_end = messages.rend(); + for (; iter != iter_end; ++iter) + { + LLSD msg = *iter; + + std::string time = msg["time"].asString(); + LLUUID from_id = msg["from_id"].asUUID(); + std::string from = msg["from"].asString(); + std::string message = msg["message"].asString(); + bool is_history = msg["is_history"].asBoolean(); + + LLChat chat; + chat.mFromID = from_id; + chat.mSessionID = mSessionID; + chat.mFromName = from; + chat.mTimeStr = time; + chat.mChatStyle = is_history ? CHAT_STYLE_HISTORY : chat.mChatStyle; + + // process offer notification + if (msg.has("notification_id")) + { + chat.mNotifId = msg["notification_id"].asUUID(); + // if notification exists - embed it + if (LLNotificationsUtil::find(chat.mNotifId) != NULL) + { + // remove embedded notification from channel + LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*> + (LLNotificationsUI::LLChannelManager::getInstance()-> + findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); + if (getVisible()) + { + // toast will be automatically closed since it is not storable toast + channel->hideToast(chat.mNotifId); + } + } + // if notification doesn't exist - try to use next message which should be log entry + else + { + continue; + } + } + //process text message + else + { + chat.mText = message; + } + + // Add the message to the chat log + appendMessage(chat); + mLastMessageIndex = msg["index"].asInteger(); + + // if it is a notification - next message is a notification history log, so skip it + if (chat.mNotifId.notNull() && LLNotificationsUtil::find(chat.mNotifId) != NULL) + { + if (++iter == iter_end) + { + break; + } + else + { + mLastMessageIndex++; + } + } + } + } +} + +void LLFloaterIMSession::reloadMessages(bool clean_messages/* = false*/) +{ + if (clean_messages) + { + LLIMModel::LLIMSession * sessionp = LLIMModel::instance().findIMSession(mSessionID); + + if (NULL != sessionp) + { + sessionp->loadHistory(); + } + } + + mChatHistory->clear(); + mLastMessageIndex = -1; + updateMessages(); + mInputEditor->setFont(LLViewerChat::getChatFont()); +} + +// static +void LLFloaterIMSession::onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata ) +{ + LLFloaterIMSession* self= (LLFloaterIMSession*) userdata; + + // Allow enabling the LLFloaterIMSession input editor only if session can accept text + LLIMModel::LLIMSession* im_session = + LLIMModel::instance().findIMSession(self->mSessionID); + //TODO: While disabled lllineeditor can receive focus we need to check if it is enabled (EK) + if( im_session && im_session->mTextIMPossible && self->mInputEditor->getEnabled()) + { + //in disconnected state IM input editor should be disabled + self->mInputEditor->setEnabled(!gDisconnected); + } +} + +// static +void LLFloaterIMSession::onInputEditorFocusLost(LLFocusableElement* caller, void* userdata) +{ + LLFloaterIMSession* self = (LLFloaterIMSession*) userdata; + self->setTyping(false); +} + +// static +void LLFloaterIMSession::onInputEditorKeystroke(LLTextEditor* caller, void* userdata) +{ + LLFloaterIMSession* self = (LLFloaterIMSession*)userdata; + LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance(); + if (im_box) + { + im_box->flashConversationItemWidget(self->mSessionID,false); + } + std::string text = self->mInputEditor->getText(); + + // Deleting all text counts as stopping typing. + self->setTyping(!text.empty()); +} + +void LLFloaterIMSession::setTyping(bool typing) +{ + if ( typing ) + { + // Started or proceeded typing, reset the typing timeout timer + mTypingTimeoutTimer.reset(); + } + + if ( mMeTyping != typing ) + { + // Typing state is changed + mMeTyping = typing; + // So, should send current state + mShouldSendTypingState = true; + // In case typing is started, send state after some delay + mTypingTimer.reset(); + } + + // Don't want to send typing indicators to multiple people, potentially too + // much network traffic. Only send in person-to-person IMs. + if ( mShouldSendTypingState && mDialog == IM_NOTHING_SPECIAL ) + { + // Still typing, send 'start typing' notification or + // send 'stop typing' notification immediately + if (!mMeTyping || mTypingTimer.getElapsedTimeF32() > 1.f) + { + LLIMModel::instance().sendTypingState(mSessionID, + mOtherParticipantUUID, mMeTyping); + mShouldSendTypingState = false; + } + } + + if (!mIsNearbyChat) + { + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + if (speaker_mgr) + { + speaker_mgr->setSpeakerTyping(gAgent.getID(), FALSE); + } + } +} + +void LLFloaterIMSession::processIMTyping(const LLIMInfo* im_info, BOOL typing) +{ + if ( typing ) + { + // other user started typing + addTypingIndicator(im_info); + } + else + { + // other user stopped typing + removeTypingIndicator(im_info); + } +} + +void LLFloaterIMSession::processAgentListUpdates(const LLSD& body) +{ + uuid_vec_t joined_uuids; + + if (body.isMap() && body.has("agent_updates") && body["agent_updates"].isMap()) + { + LLSD::map_const_iterator update_it; + for(update_it = body["agent_updates"].beginMap(); + update_it != body["agent_updates"].endMap(); + ++update_it) + { + LLUUID agent_id(update_it->first); + LLSD agent_data = update_it->second; + + if (agent_data.isMap()) + { + // store the new participants in joined_uuids + if (agent_data.has("transition") && agent_data["transition"].asString() == "ENTER") + { + joined_uuids.push_back(agent_id); + } + + // process the moderator mutes + if (agent_id == gAgentID && agent_data.has("info") && agent_data["info"].has("mutes")) + { + BOOL moderator_muted_text = agent_data["info"]["mutes"]["text"].asBoolean(); + mInputEditor->setEnabled(!moderator_muted_text); + std::string label; + if (moderator_muted_text) + label = LLTrans::getString("IM_muted_text_label"); + else + label = LLTrans::getString("IM_to_label") + " " + LLIMModel::instance().getName(mSessionID); + mInputEditor->setLabel(label); + + if (moderator_muted_text) + LLNotificationsUtil::add("TextChatIsMutedByModerator"); + } + } + } + } + + // the vectors need to be sorted for computing the intersection and difference + std::sort(mInvitedParticipants.begin(), mInvitedParticipants.end()); + std::sort(joined_uuids.begin(), joined_uuids.end()); + + uuid_vec_t intersection; // uuids of invited residents who have joined the conversation + std::set_intersection(mInvitedParticipants.begin(), mInvitedParticipants.end(), + joined_uuids.begin(), joined_uuids.end(), + std::back_inserter(intersection)); + + if (intersection.size() > 0) + { + sendParticipantsAddedNotification(intersection); + } + + // Remove all joined participants from invited array. + // The difference between the two vectors (the elements in mInvitedParticipants which are not in joined_uuids) + // is placed at the beginning of mInvitedParticipants, then all other elements are erased. + mInvitedParticipants.erase(std::set_difference(mInvitedParticipants.begin(), mInvitedParticipants.end(), + joined_uuids.begin(), joined_uuids.end(), + mInvitedParticipants.begin()), + mInvitedParticipants.end()); +} + +void LLFloaterIMSession::processSessionUpdate(const LLSD& session_update) +{ + // *TODO : verify following code when moderated mode will be implemented + if ( false && session_update.has("moderated_mode") && + session_update["moderated_mode"].has("voice") ) + { + BOOL voice_moderated = session_update["moderated_mode"]["voice"]; + const std::string session_label = LLIMModel::instance().getName(mSessionID); + + if (voice_moderated) + { + setTitle(session_label + std::string(" ") + + LLTrans::getString("IM_moderated_chat_label")); + } + else + { + setTitle(session_label); + } + + // *TODO : uncomment this when/if LLPanelActiveSpeakers panel will be added + //update the speakers dropdown too + //mSpeakerPanel->setVoiceModerationCtrlMode(voice_moderated); + } +} + +// virtual +void LLFloaterIMSession::draw() +{ + // add people who were added via dropPerson() + if (!mPendingParticipants.empty()) + { + addSessionParticipants(mPendingParticipants); + mPendingParticipants.clear(); + } + + LLFloaterIMSessionTab::draw(); +} + +// virtual +BOOL LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + if (cargo_type == DAD_PERSON) + { + if (dropPerson(static_cast<LLUUID*>(cargo_data), drop)) + { + *accept = ACCEPT_YES_MULTI; + } + else + { + *accept = ACCEPT_NO; + } + } + else if (mDialog == IM_NOTHING_SPECIAL) + { + LLToolDragAndDrop::handleGiveDragAndDrop(mOtherParticipantUUID, mSessionID, drop, + cargo_type, cargo_data, accept); + } + + return TRUE; +} + +bool LLFloaterIMSession::dropPerson(LLUUID* person_id, bool drop) +{ + bool res = person_id && person_id->notNull(); + if(res) + { + uuid_vec_t ids; + ids.push_back(*person_id); + + res = canAddSelectedToChat(ids); + if(res && drop) + { + // these people will be added during the next draw() call + // (so they can be added all at once) + mPendingParticipants.push_back(*person_id); + } + } + + return res; +} + +BOOL LLFloaterIMSession::isInviteAllowed() const +{ + return ( (IM_SESSION_CONFERENCE_START == mDialog) + || (IM_SESSION_INVITE == mDialog && !gAgent.isInGroup(mSessionID)) + || mIsP2PChat); +} + +class LLSessionInviteResponder : public LLHTTPClient::Responder +{ +public: + LLSessionInviteResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + void error(U32 statusNum, const std::string& reason) + { + llinfos << "Error inviting all agents to session" << llendl; + //throw something back to the viewer here? + } + +private: + LLUUID mSessionID; +}; + +BOOL LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids) +{ + LLViewerRegion* region = gAgent.getRegion(); + bool is_region_exist = region != NULL; + + if (is_region_exist) + { + S32 count = ids.size(); + + if( isInviteAllowed() && (count > 0) ) + { + llinfos << "LLFloaterIMSession::inviteToSession() - inviting participants" << llendl; + + std::string url = region->getCapability("ChatSessionRequest"); + + LLSD data; + data["params"] = LLSD::emptyArray(); + for (int i = 0; i < count; i++) + { + data["params"].append(ids[i]); + } + data["method"] = "invite"; + data["session-id"] = mSessionID; + LLHTTPClient::post(url, data,new LLSessionInviteResponder(mSessionID)); + } + else + { + llinfos << "LLFloaterIMSession::inviteToSession -" + << " no need to invite agents for " + << mDialog << llendl; + // successful add, because everyone that needed to get added + // was added. + } + } + + return is_region_exist; +} + +void LLFloaterIMSession::addTypingIndicator(const LLIMInfo* im_info) +{ + // We may have lost a "stop-typing" packet, don't add it twice + if (im_info && !mOtherTyping) + { + mOtherTyping = true; + + // Update speaker + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + if ( speaker_mgr ) + { + speaker_mgr->setSpeakerTyping(im_info->mFromID, TRUE); + } + } +} + +void LLFloaterIMSession::removeTypingIndicator(const LLIMInfo* im_info) +{ + if (mOtherTyping) + { + mOtherTyping = false; + + if (im_info) + { + // Update speaker + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + if (speaker_mgr) + { + speaker_mgr->setSpeakerTyping(im_info->mFromID, FALSE); + } + } + } +} + +// static +void LLFloaterIMSession::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 LLFloaterIMSession::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 = findInstance(session_id); + if (option == 0 && im_floater != NULL) + { + im_floater->closeFloater(); + } + + return; +} + +// static +void LLFloaterIMSession::sRemoveTypingIndicator(const LLSD& data) +{ + LLUUID session_id = data["session_id"]; + if (session_id.isNull()) + return; + + LLUUID from_id = data["from_id"]; + if (gAgentID == from_id || LLUUID::null == from_id) + return; + + LLFloaterIMSession* floater = LLFloaterIMSession::findInstance(session_id); + if (!floater) + return; + + if (IM_NOTHING_SPECIAL != floater->mDialog) + return; + + floater->removeTypingIndicator(); +} + +// static +void LLFloaterIMSession::onIMChicletCreated( const LLUUID& session_id ) +{ + LLFloaterIMSession::addToHost(session_id); +} + +boost::signals2::connection LLFloaterIMSession::setIMFloaterShowedCallback(const floater_showed_signal_t::slot_type& cb) +{ + return LLFloaterIMSession::sIMFloaterShowedSignal.connect(cb); +} diff --git a/indra/newview/llimfloater.h b/indra/newview/llfloaterimsession.h index f7cd35b5eb..cb330bca0f 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llfloaterimsession.h @@ -1,6 +1,6 @@ /** - * @file llimfloater.h - * @brief LLIMFloater class definition + * @file llfloaterimsession.h + * @brief LLFloaterIMSession class definition * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code @@ -24,62 +24,79 @@ * $/LicenseInfo$ */ -#ifndef LL_IMFLOATER_H -#define LL_IMFLOATER_H +#ifndef LL_FLOATERIMSESSION_H +#define LL_FLOATERIMSESSION_H +#include "llimview.h" +#include "llfloaterimsessiontab.h" #include "llinstantmessage.h" #include "lllogchat.h" #include "lltooldraganddrop.h" -#include "lltransientdockablefloater.h" +#include "llvoicechannel.h" +#include "llvoiceclient.h" class LLAvatarName; -class LLLineEditor; +class LLButton; +class LLChatEntry; +class LLTextEditor; class LLPanelChatControlPanel; class LLChatHistory; class LLInventoryItem; class LLInventoryCategory; +typedef boost::signals2::signal<void(const LLUUID& session_id)> floater_showed_signal_t; + /** * Individual IM window that appears at the bottom of the screen, * optionally "docked" to the bottom tray. */ -class LLIMFloater : public LLTransientDockableFloater +class LLFloaterIMSession + : public LLVoiceClientStatusObserver + , public LLFloaterIMSessionTab { - LOG_CLASS(LLIMFloater); + LOG_CLASS(LLFloaterIMSession); public: - LLIMFloater(const LLUUID& session_id); + LLFloaterIMSession(const LLUUID& session_id); + + virtual ~LLFloaterIMSession(); + + void initIMSession(const LLUUID& session_id); + void initIMFloater(); - virtual ~LLIMFloater(); - // LLView overrides /*virtual*/ BOOL postBuild(); /*virtual*/ void setVisible(BOOL visible); /*virtual*/ BOOL getVisible(); // Check typing timeout timer. + /*virtual*/ void draw(); + /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); + + static LLFloaterIMSession* findInstance(const LLUUID& session_id); + static LLFloaterIMSession* getInstance(const LLUUID& session_id); // LLFloater overrides /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); - // Make IM conversion visible and update the message history - static LLIMFloater* show(const LLUUID& session_id); + static LLFloaterIMSession* show(const LLUUID& session_id); // Toggle panel specified by session_id // Returns true iff panel became visible static bool toggle(const LLUUID& session_id); - static LLIMFloater* findInstance(const LLUUID& session_id); - - static LLIMFloater* getInstance(const LLUUID& session_id); - void sessionInitReplyReceived(const LLUUID& im_session_id); // get new messages from LLIMModel - void updateMessages(); - void reloadMessages(); - static void onSendMsg( LLUICtrl*, void*); - void sendMsg(); + /*virtual*/ void updateMessages(); + void reloadMessages(bool clean_messages = false); + static void onSendMsg(LLUICtrl*, void*); + void sendMsgFromInputEditor(); + void sendMsg(const std::string& msg); // callback for LLIMModel on new messages // route to specific floater if it is visible @@ -89,62 +106,61 @@ public: void setPositioned(bool b) { mPositioned = b; }; void onVisibilityChange(const LLSD& new_visibility); - void processIMTyping(const LLIMInfo* im_info, BOOL typing); - void processAgentListUpdates(const LLSD& body); - void processSessionUpdate(const LLSD& session_update); + bool enableGearMenuItem(const LLSD& userdata); + void GearDoToSelected(const LLSD& userdata); + bool checkGearMenuItem(const LLSD& userdata); - void updateChatHistoryStyle(); - static void processChatHistoryStyleUpdate(const LLSD& newvalue); + // Implements LLVoiceClientStatusObserver::onChange() to enable the call + // button when voice is available + void onChange(EStatusType status, const std::string &channelURI, + bool proximal); - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, - void *cargo_data, EAcceptance *accept, - std::string& tooltip_msg); - - /** - * Returns true if chat is displayed in multi tabbed floater - * false if chat is displayed in multiple windows - */ - static bool isChatMultiTab(); + virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; } + virtual void onVoiceChannelStateChanged( + const LLVoiceChannel::EState& old_state, + const LLVoiceChannel::EState& new_state); - static void initIMFloater(); + void processIMTyping(const LLIMInfo* im_info, BOOL typing); + void processAgentListUpdates(const LLSD& body); + void processSessionUpdate(const LLSD& session_update); //used as a callback on receiving new IM message static void sRemoveTypingIndicator(const LLSD& data); - static void onIMChicletCreated(const LLUUID& session_id); + const LLUUID& getOtherParticipantUUID() {return mOtherParticipantUUID;} - virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; } - -protected: - /* virtual */ - void onClickCloseBtn(); + static boost::signals2::connection setIMFloaterShowedCallback(const floater_showed_signal_t::slot_type& cb); + static floater_showed_signal_t sIMFloaterShowedSignal; + bool needsTitleOverwrite() { return mSessionNameUpdatedForTyping && mOtherTyping; } + S32 getLastChatMessageIndex() {return mLastMessageIndex;} private: - // process focus events to set a currently active session - /* virtual */ void onFocusLost(); - /* virtual */ void onFocusReceived(); - - // Update the window title, input field help text, etc. - void updateSessionName(const std::string& ui_title, const std::string& ui_label); - - // For display name lookups for IM window titles - void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); - - BOOL dropCallingCard(LLInventoryItem* item, BOOL drop); - BOOL dropCategory(LLInventoryCategory* category, BOOL drop); + + /*virtual*/ void refresh(); + + /*virtual*/ void onTearOffClicked(); + /*virtual*/ void onClickCloseBtn(); + + // Update the window title and input field help text + /*virtual*/ void updateSessionName(const std::string& name); + + bool dropPerson(LLUUID* person_id, bool drop); BOOL isInviteAllowed() const; BOOL inviteToSession(const uuid_vec_t& agent_ids); - - static void onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata ); - static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata); - static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata); - void setTyping(bool typing); - void onSlide(); - static void* createPanelIMControl(void* userdata); - static void* createPanelGroupControl(void* userdata); - static void* createPanelAdHocControl(void* userdata); + static void onInputEditorFocusReceived( LLFocusableElement* caller,void* userdata ); + static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata); + static void onInputEditorKeystroke(LLTextEditor* caller, void* userdata); + void setTyping(bool typing); + void onAddButtonClicked(); + void addSessionParticipants(const uuid_vec_t& uuids); + void addP2PSessionParticipants(const LLSD& notification, const LLSD& response, const uuid_vec_t& uuids); + void sendParticipantsAddedNotification(const uuid_vec_t& uuids); + bool canAddSelectedToChat(const uuid_vec_t& uuids); + + void onCallButtonClicked(); + + void boundVoiceChannel(); // Add the "User is typing..." indicator. void addTypingIndicator(const LLIMInfo* im_info); @@ -156,27 +172,28 @@ private: static void confirmLeaveCallCallback(const LLSD& notification, const LLSD& response); - LLPanelChatControlPanel* mControlPanel; - LLUUID mSessionID; S32 mLastMessageIndex; EInstantMessage mDialog; LLUUID mOtherParticipantUUID; - LLChatHistory* mChatHistory; - LLLineEditor* mInputEditor; bool mPositioned; - std::string mSavedTitle; LLUIString mTypingStart; bool mMeTyping; bool mOtherTyping; bool mShouldSendTypingState; LLFrameTimer mTypingTimer; LLFrameTimer mTypingTimeoutTimer; + bool mSessionNameUpdatedForTyping; bool mSessionInitialized; LLSD mQueuedMsgsForInit; -}; + uuid_vec_t mInvitedParticipants; + uuid_vec_t mPendingParticipants; + + // connection to voice channel state change signal + boost::signals2::connection mVoiceChannelStateChangeConnection; +}; -#endif // LL_IMFLOATER_H +#endif // LL_FLOATERIMSESSION_H diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp new file mode 100644 index 0000000000..eab2ce7798 --- /dev/null +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -0,0 +1,1082 @@ +/** + * @file llfloaterimsessiontab.cpp + * @brief LLFloaterIMSessionTab class implements the common behavior of LNearbyChatBar + * @brief and LLFloaterIMSession for hosting both in LLIMContainer + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterimsessiontab.h" + +#include "llagent.h" +#include "llagentcamera.h" +#include "llavataractions.h" +#include "llchatentry.h" +#include "llchathistory.h" +#include "llchiclet.h" +#include "llchicletbar.h" +#include "lldraghandle.h" +#include "llfloaterreg.h" +#include "llfloaterimsession.h" +#include "llfloaterimcontainer.h" // to replace separate IM Floaters with multifloater container +#include "lllayoutstack.h" +#include "lltoolbarview.h" +#include "llfloaterimnearbychat.h" + +const F32 REFRESH_INTERVAL = 1.0f; + +LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id) + : LLTransientDockableFloater(NULL, true, session_id) + , mIsP2PChat(false) + , mExpandCollapseBtn(NULL) + , mTearOffBtn(NULL) + , mCloseBtn(NULL) + , mSessionID(session_id.asUUID()) + , mConversationsRoot(NULL) + , mScroller(NULL) + , mSpeakingIndicator(NULL) + , mChatHistory(NULL) + , mInputEditor(NULL) + , mInputEditorPad(0) + , mRefreshTimer(new LLTimer()) + , mIsHostAttached(false) + , mHasVisibleBeenInitialized(false) + , mIsParticipantListExpanded(true) + , mChatLayoutPanel(NULL) +{ + setAutoFocus(FALSE); + mSession = LLIMModel::getInstance()->findIMSession(mSessionID); + + mCommitCallbackRegistrar.add("IMSession.Menu.Action", + boost::bind(&LLFloaterIMSessionTab::onIMSessionMenuItemClicked, this, _2)); + mEnableCallbackRegistrar.add("IMSession.Menu.CompactExpandedModes.CheckItem", + boost::bind(&LLFloaterIMSessionTab::onIMCompactExpandedMenuItemCheck, this, _2)); + mEnableCallbackRegistrar.add("IMSession.Menu.ShowModes.CheckItem", + boost::bind(&LLFloaterIMSessionTab::onIMShowModesMenuItemCheck, this, _2)); + mEnableCallbackRegistrar.add("IMSession.Menu.ShowModes.Enable", + boost::bind(&LLFloaterIMSessionTab::onIMShowModesMenuItemEnable, this, _2)); + + // Right click menu handling + mEnableCallbackRegistrar.add("Avatar.CheckItem", boost::bind(&LLFloaterIMSessionTab::checkContextMenuItem, this, _2)); + mEnableCallbackRegistrar.add("Avatar.EnableItem", boost::bind(&LLFloaterIMSessionTab::enableContextMenuItem, this, _2)); + mCommitCallbackRegistrar.add("Avatar.DoToSelected", boost::bind(&LLFloaterIMSessionTab::doToSelected, this, _2)); +} + +LLFloaterIMSessionTab::~LLFloaterIMSessionTab() +{ + delete mRefreshTimer; +} + +//static +LLFloaterIMSessionTab* LLFloaterIMSessionTab::findConversation(const LLUUID& uuid) +{ + LLFloaterIMSessionTab* conv; + + if (uuid.isNull()) + { + conv = LLFloaterReg::findTypedInstance<LLFloaterIMSessionTab>("nearby_chat"); + } + else + { + conv = LLFloaterReg::findTypedInstance<LLFloaterIMSessionTab>("impanel", LLSD(uuid)); + } + + return conv; +}; + +//static +LLFloaterIMSessionTab* LLFloaterIMSessionTab::getConversation(const LLUUID& uuid) +{ + LLFloaterIMSessionTab* conv; + + if (uuid.isNull()) + { + conv = LLFloaterReg::getTypedInstance<LLFloaterIMSessionTab>("nearby_chat"); + } + else + { + conv = LLFloaterReg::getTypedInstance<LLFloaterIMSessionTab>("impanel", LLSD(uuid)); + } + + return conv; +}; + +void LLFloaterIMSessionTab::setVisible(BOOL visible) +{ + if(visible && !mHasVisibleBeenInitialized) + { + mHasVisibleBeenInitialized = true; + if(!gAgentCamera.cameraMouselook()) + { + LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container")->setVisible(true); + } + LLFloaterIMSessionTab::addToHost(mSessionID); + mInputButtonPanel->setVisible(isTornOff()); + } + + LLTransientDockableFloater::setVisible(visible); +} + +/*virtual*/ +void LLFloaterIMSessionTab::setFocus(BOOL focus) +{ + LLTransientDockableFloater::setFocus(focus); + + //Redirect focus to input editor + if (focus) + { + updateMessages(); + + if (mInputEditor) + { + mInputEditor->setFocus(TRUE); + } + } +} + + +void LLFloaterIMSessionTab::addToHost(const LLUUID& session_id) +{ + if ((session_id.notNull() && !gIMMgr->hasSession(session_id)) + || !LLFloaterIMSessionTab::isChatMultiTab()) + { + return; + } + + // Get the floater: this will create the instance if it didn't exist + LLFloaterIMSessionTab* conversp = LLFloaterIMSessionTab::getConversation(session_id); + if (conversp) + { + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + + // Do not add again existing floaters + if (floater_container && !conversp->isHostAttached()) + { + conversp->setHostAttached(true); + + if (!conversp->isNearbyChat() + || gSavedPerAccountSettings.getBOOL("NearbyChatIsNotTornOff")) + { + floater_container->addFloater(conversp, false, LLTabContainer::RIGHT_OF_CURRENT); + } + else + { + // setting of the "potential" host for Nearby Chat: this sequence sets + // LLFloater::mHostHandle = NULL (a current host), but + // LLFloater::mLastHostHandle = floater_container (a "future" host) + conversp->setHost(floater_container); + conversp->setHost(NULL); + + conversp->forceReshape(); + } + // Added floaters share some state (like sort order) with their host + conversp->setSortOrder(floater_container->getSortOrder()); + } + } +} + +void LLFloaterIMSessionTab::assignResizeLimits() +{ + bool is_participants_pane_collapsed = mParticipantListPanel->isCollapsed(); + + // disable a layoutstack's functionality when participant list panel is collapsed + mRightPartPanel->setIgnoreReshape(is_participants_pane_collapsed); + + S32 participants_pane_target_width = is_participants_pane_collapsed? + 0 : (mParticipantListPanel->getRect().getWidth() + LLPANEL_BORDER_WIDTH); + + S32 new_min_width = participants_pane_target_width + mRightPartPanel->getExpandedMinDim() + mFloaterExtraWidth; + + setResizeLimits(new_min_width, getMinHeight()); + + this->mParticipantListAndHistoryStack->updateLayout(); +} + +BOOL LLFloaterIMSessionTab::postBuild() +{ + BOOL result; + + mBodyStack = getChild<LLLayoutStack>("main_stack"); + mParticipantListAndHistoryStack = getChild<LLLayoutStack>("im_panels"); + + mCloseBtn = getChild<LLButton>("close_btn"); + mCloseBtn->setCommitCallback(boost::bind(&LLFloater::onClickClose, this)); + + mExpandCollapseBtn = getChild<LLButton>("expand_collapse_btn"); + mExpandCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onSlide, this)); + + mExpandCollapseLineBtn = getChild<LLButton>("minz_btn"); + mExpandCollapseLineBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onCollapseToLine, this)); + + mTearOffBtn = getChild<LLButton>("tear_off_btn"); + mTearOffBtn->setCommitCallback(boost::bind(&LLFloaterIMSessionTab::onTearOffClicked, this)); + + mGearBtn = getChild<LLButton>("gear_btn"); + + mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel"); + mRightPartPanel = getChild<LLLayoutPanel>("right_part_holder"); + + mToolbarPanel = getChild<LLLayoutPanel>("toolbar_panel"); + mContentPanel = getChild<LLLayoutPanel>("body_panel"); + mInputButtonPanel = getChild<LLLayoutPanel>("input_button_layout_panel"); + mInputButtonPanel->setVisible(false); + // Add a scroller for the folder (participant) view + LLRect scroller_view_rect = mParticipantListPanel->getRect(); + scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); + LLScrollContainer::Params scroller_params(LLUICtrlFactory::getDefaultParams<LLFolderViewScrollContainer>()); + scroller_params.rect(scroller_view_rect); + mScroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroller_params); + mScroller->setFollowsAll(); + + mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator"); + + // Insert that scroller into the panel widgets hierarchy + mParticipantListPanel->addChild(mScroller); + + mChatHistory = getChild<LLChatHistory>("chat_history"); + + mInputEditor = getChild<LLChatEntry>("chat_editor"); + + mChatLayoutPanel = getChild<LLLayoutPanel>("chat_layout_panel"); + + mInputEditor->setTextExpandedCallback(boost::bind(&LLFloaterIMSessionTab::reshapeChatLayoutPanel, this)); + mInputEditor->setCommitOnFocusLost( FALSE ); + mInputEditor->setPassDelete(TRUE); + mInputEditor->setFont(LLViewerChat::getChatFont()); + + mInputEditorPad = mChatLayoutPanel->getRect().getHeight() - mInputEditor->getRect().getHeight(); + + setOpenPositioning(LLFloaterEnums::POSITIONING_RELATIVE); + + mSaveRect = isNearbyChat() + && !gSavedPerAccountSettings.getBOOL("NearbyChatIsNotTornOff"); + initRectControl(); + + if (isChatMultiTab()) + { + result = LLFloater::postBuild(); + } + else + { + result = LLDockableFloater::postBuild(); + } + + // Create the root using an ad-hoc base item + LLConversationItem* base_item = new LLConversationItem(mSessionID, mConversationViewModel); + LLFolderView::Params p(LLUICtrlFactory::getDefaultParams<LLFolderView>()); + p.rect = LLRect(0, 0, getRect().getWidth(), 0); + p.parent_panel = mParticipantListPanel; + p.listener = base_item; + p.view_model = &mConversationViewModel; + p.root = NULL; + p.use_ellipses = true; + p.options_menu = "menu_conversation.xml"; + p.name = "root"; + mConversationsRoot = LLUICtrlFactory::create<LLFolderView>(p); + mConversationsRoot->setCallbackRegistrar(&mCommitCallbackRegistrar); + // Attach that root to the scroller + mScroller->addChild(mConversationsRoot); + mConversationsRoot->setScrollContainer(mScroller); + mConversationsRoot->setFollowsAll(); + mConversationsRoot->addChild(mConversationsRoot->mStatusTextBox); + + setMessagePaneExpanded(true); + + buildConversationViewParticipant(); + refreshConversation(); + + // Zero expiry time is set only once to allow initial update. + mRefreshTimer->setTimerExpirySec(0); + mRefreshTimer->start(); + initBtns(); + + if (mIsParticipantListExpanded != (bool)gSavedSettings.getBOOL("IMShowControlPanel")) + { + LLFloaterIMSessionTab::onSlide(this); + } + + // The resize limits for LLFloaterIMSessionTab should be updated, based on current values of width of conversation and message panels + mParticipantListPanel->getResizeBar()->setResizeListener(boost::bind(&LLFloaterIMSessionTab::assignResizeLimits, this)); + mFloaterExtraWidth = + getRect().getWidth() + - mParticipantListAndHistoryStack->getRect().getWidth() + - (mParticipantListPanel->isCollapsed()? 0 : LLPANEL_BORDER_WIDTH); + + assignResizeLimits(); + + return result; +} + +LLParticipantList* LLFloaterIMSessionTab::getParticipantList() +{ + return dynamic_cast<LLParticipantList*>(LLFloaterIMContainer::getInstance()->getSessionModel(mSessionID)); +} + +void LLFloaterIMSessionTab::draw() +{ + if (mRefreshTimer->hasExpired()) + { + LLParticipantList* item = getParticipantList(); + if (item) + { + // Update all model items + item->update(); + // If the model and view list diverge in count, rebuild + // Note: this happens sometimes right around init (add participant events fire but get dropped) and is the cause + // of missing participants, often, the user agent itself. As there will be no other event fired, there's + // no other choice but get those inconsistencies regularly (and lightly) checked and scrubbed. + if (item->getChildrenCount() != mConversationsWidgets.size()) + { + buildConversationViewParticipant(); + } + refreshConversation(); + } + + // Restart the refresh timer + mRefreshTimer->setTimerExpirySec(REFRESH_INTERVAL); + } + + LLTransientDockableFloater::draw(); +} + +void LLFloaterIMSessionTab::enableDisableCallBtn() +{ + getChildView("voice_call_btn")->setEnabled( + mSessionID.notNull() + && mSession + && mSession->mSessionInitialized + && LLVoiceClient::getInstance()->voiceEnabled() + && LLVoiceClient::getInstance()->isVoiceWorking() + && mSession->mCallBackEnabled); +} + +void LLFloaterIMSessionTab::onFocusReceived() +{ + setBackgroundOpaque(true); + + if (mSessionID.notNull() && isInVisibleChain()) + { + LLIMModel::instance().sendNoUnreadMessages(mSessionID); + } + + LLTransientDockableFloater::onFocusReceived(); +} + +void LLFloaterIMSessionTab::onFocusLost() +{ + setBackgroundOpaque(false); + LLTransientDockableFloater::onFocusLost(); +} + +std::string LLFloaterIMSessionTab::appendTime() +{ + time_t utc_time; + utc_time = time_corrected(); + std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:[" + +LLTrans::getString("TimeMin")+"]"; + + LLSD substitution; + + substitution["datetime"] = (S32) utc_time; + LLStringUtil::format (timeStr, substitution); + + return timeStr; +} + +void LLFloaterIMSessionTab::appendMessage(const LLChat& chat, const LLSD &args) +{ + + // Update the participant activity time + LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance(); + if (im_box) + { + im_box->setTimeNow(mSessionID,chat.mFromID); + } + + + LLChat& tmp_chat = const_cast<LLChat&>(chat); + + if(tmp_chat.mTimeStr.empty()) + tmp_chat.mTimeStr = appendTime(); + + if (!chat.mMuted) + { + tmp_chat.mFromName = chat.mFromName; + LLSD chat_args; + if (args) chat_args = args; + chat_args["use_plain_text_chat_history"] = + gSavedSettings.getBOOL("PlainTextChatHistory"); + chat_args["show_time"] = gSavedSettings.getBOOL("IMShowTime"); + chat_args["show_names_for_p2p_conv"] = + !mIsP2PChat || gSavedSettings.getBOOL("IMShowNamesForP2PConv"); + + if (mChatHistory) + { + mChatHistory->appendMessage(chat, chat_args); + } + } +} + + +void LLFloaterIMSessionTab::buildConversationViewParticipant() +{ + // Clear the widget list since we are rebuilding afresh from the model + conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); + while (widget_it != mConversationsWidgets.end()) + { + removeConversationViewParticipant(widget_it->first); + // Iterators are invalidated by erase so we need to pick begin again + widget_it = mConversationsWidgets.begin(); + } + + // Get the model list + LLParticipantList* item = getParticipantList(); + if (!item) + { + // Nothing to do if the model list is inexistent + return; + } + + // Create the participants widgets now + LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = item->getChildrenBegin(); + LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = item->getChildrenEnd(); + while (current_participant_model != end_participant_model) + { + LLConversationItem* participant_model = dynamic_cast<LLConversationItem*>(*current_participant_model); + addConversationViewParticipant(participant_model); + current_participant_model++; + } +} + +void LLFloaterIMSessionTab::addConversationViewParticipant(LLConversationItem* participant_model) +{ + // Check if the model already has an associated view + LLUUID uuid = participant_model->getUUID(); + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,uuid); + + // If not already present, create the participant view and attach it to the root, otherwise, just refresh it + if (widget) + { + updateConversationViewParticipant(uuid); // overkill? + } + else + { + LLConversationViewParticipant* participant_view = createConversationViewParticipant(participant_model); + mConversationsWidgets[uuid] = participant_view; + participant_view->addToFolder(mConversationsRoot); + participant_view->addToSession(mSessionID); + participant_view->setVisible(TRUE); + } +} + +void LLFloaterIMSessionTab::removeConversationViewParticipant(const LLUUID& participant_id) +{ + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,participant_id); + if (widget) + { + mConversationsRoot->extractItem(widget); + delete widget; + mConversationsWidgets.erase(participant_id); + } +} + +void LLFloaterIMSessionTab::updateConversationViewParticipant(const LLUUID& participant_id) +{ + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,participant_id); + if (widget) + { + widget->refresh(); + } +} + +void LLFloaterIMSessionTab::refreshConversation() +{ + // Note: We collect participants names to change the session name only in the case of ad-hoc conversations + bool is_ad_hoc = (mSession ? mSession->isAdHocSessionType() : false); + uuid_vec_t participants_uuids; // uuids vector for building the added participants name string + // For P2P chat, we still need to update the session name who may have changed (switch display name for instance) + if (mIsP2PChat && mSession) + { + participants_uuids.push_back(mSession->mOtherParticipantID); + } + + conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); + while (widget_it != mConversationsWidgets.end()) + { + // Add the participant to the list except if it's the agent itself (redundant) + if (is_ad_hoc && (widget_it->first != gAgentID)) + { + participants_uuids.push_back(widget_it->first); + } + widget_it->second->refresh(); + widget_it->second->setVisible(TRUE); + ++widget_it; + } + if (is_ad_hoc || mIsP2PChat) + { + // Build the session name and update it + std::string session_name; + if (participants_uuids.size() != 0) + { + LLAvatarActions::buildResidentsString(participants_uuids, session_name); + } + else + { + session_name = LLIMModel::instance().getName(mSessionID); + } + updateSessionName(session_name); + } + + if (mSessionID.notNull()) + { + LLParticipantList* participant_list = getParticipantList(); + if (participant_list) + { + LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = participant_list->getChildrenBegin(); + LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = participant_list->getChildrenEnd(); + LLIMSpeakerMgr *speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + while (current_participant_model != end_participant_model) + { + LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(*current_participant_model); + if (speaker_mgr && participant_model) + { + LLSpeaker *participant_speaker = speaker_mgr->findSpeaker(participant_model->getUUID()); + LLSpeaker *agent_speaker = speaker_mgr->findSpeaker(gAgentID); + if (participant_speaker && agent_speaker) + { + participant_model->setDisplayModeratorRole(agent_speaker->mIsModerator && participant_speaker->mIsModerator); + } + } + current_participant_model++; + } + } + } + + mConversationViewModel.requestSortAll(); + if(mConversationsRoot != NULL) + { + mConversationsRoot->arrangeAll(); + mConversationsRoot->update(); + } + updateHeaderAndToolbar(); + refresh(); +} + +// Copied from LLFloaterIMContainer::createConversationViewParticipant(). Refactor opportunity! +LLConversationViewParticipant* LLFloaterIMSessionTab::createConversationViewParticipant(LLConversationItem* item) +{ + LLRect panel_rect = mParticipantListPanel->getRect(); + + LLConversationViewParticipant::Params params; + params.name = item->getDisplayName(); + params.root = mConversationsRoot; + params.listener = item; + params.rect = LLRect (0, 24, panel_rect.getWidth(), 0); // *TODO: use conversation_view_participant.xml itemHeight value in lieu of 24 + params.tool_tip = params.name; + params.participant_id = item->getUUID(); + + return LLUICtrlFactory::create<LLConversationViewParticipant>(params); +} + +void LLFloaterIMSessionTab::setSortOrder(const LLConversationSort& order) +{ + mConversationViewModel.setSorter(order); + mConversationsRoot->arrangeAll(); + refreshConversation(); +} + +void LLFloaterIMSessionTab::onIMSessionMenuItemClicked(const LLSD& userdata) +{ + std::string item = userdata.asString(); + + if (item == "compact_view" || item == "expanded_view") + { + gSavedSettings.setBOOL("PlainTextChatHistory", item == "compact_view"); + } + else + { + bool prev_value = gSavedSettings.getBOOL(item); + gSavedSettings.setBOOL(item, !prev_value); + } + + LLFloaterIMSessionTab::processChatHistoryStyleUpdate(); +} + +bool LLFloaterIMSessionTab::onIMCompactExpandedMenuItemCheck(const LLSD& userdata) +{ + std::string item = userdata.asString(); + bool is_plain_text_mode = gSavedSettings.getBOOL("PlainTextChatHistory"); + + return is_plain_text_mode? item == "compact_view" : item == "expanded_view"; +} + + +bool LLFloaterIMSessionTab::onIMShowModesMenuItemCheck(const LLSD& userdata) +{ + return gSavedSettings.getBOOL(userdata.asString()); +} + +// enable/disable states for the "show time" and "show names" items of the show-modes menu +bool LLFloaterIMSessionTab::onIMShowModesMenuItemEnable(const LLSD& userdata) +{ + std::string item = userdata.asString(); + bool plain_text = gSavedSettings.getBOOL("PlainTextChatHistory"); + bool is_not_names = (item != "IMShowNamesForP2PConv"); + return (plain_text && (is_not_names || mIsP2PChat)); +} + +void LLFloaterIMSessionTab::hideOrShowTitle() +{ + const LLFloater::Params& default_params = LLFloater::getDefaultParams(); + S32 floater_header_size = default_params.header_height; + LLView* floater_contents = getChild<LLView>("contents_view"); + + LLRect floater_rect = getLocalRect(); + S32 top_border_of_contents = floater_rect.mTop - (isTornOff()? floater_header_size : 0); + LLRect handle_rect (0, floater_rect.mTop, floater_rect.mRight, top_border_of_contents); + LLRect contents_rect (0, top_border_of_contents, floater_rect.mRight, floater_rect.mBottom); + mDragHandle->setShape(handle_rect); + mDragHandle->setVisible(isTornOff()); + floater_contents->setShape(contents_rect); +} + +void LLFloaterIMSessionTab::updateSessionName(const std::string& name) +{ + mInputEditor->setLabel(LLTrans::getString("IM_to_label") + " " + name); +} + +void LLFloaterIMSessionTab::hideAllStandardButtons() +{ + for (S32 i = 0; i < BUTTON_COUNT; i++) + { + if (mButtons[i]) + { + // Hide the standard header buttons in a docked IM floater. + mButtons[i]->setVisible(false); + } + } +} + +void LLFloaterIMSessionTab::updateHeaderAndToolbar() +{ + // prevent start conversation before its container + LLFloaterIMContainer::getInstance(); + + bool is_not_torn_off = !checkIfTornOff(); + if (is_not_torn_off) + { + hideAllStandardButtons(); + } + + hideOrShowTitle(); + + // Participant list should be visible only in torn off floaters. + bool is_participant_list_visible = + !is_not_torn_off + && mIsParticipantListExpanded + && !mIsP2PChat; + + mParticipantListAndHistoryStack->collapsePanel(mParticipantListPanel, !is_participant_list_visible); + + // Display collapse image (<<) if the floater is hosted + // or if it is torn off but has an open control panel. + bool is_expanded = is_not_torn_off || is_participant_list_visible; + mExpandCollapseBtn->setImageOverlay(getString(is_expanded ? "collapse_icon" : "expand_icon")); + mExpandCollapseBtn->setToolTip( + is_not_torn_off? + getString("expcol_button_not_tearoff_tooltip") : + (is_expanded? + getString("expcol_button_tearoff_and_expanded_tooltip") : + getString("expcol_button_tearoff_and_collapsed_tooltip"))); + + // toggle floater's drag handle and title visibility + if (mDragHandle) + { + mDragHandle->setTitleVisible(!is_not_torn_off); + } + + // The button (>>) should be disabled for torn off P2P conversations. + mExpandCollapseBtn->setEnabled(is_not_torn_off || !mIsP2PChat); + + mTearOffBtn->setImageOverlay(getString(is_not_torn_off? "tear_off_icon" : "return_icon")); + mTearOffBtn->setToolTip(getString(is_not_torn_off? "tooltip_to_separate_window" : "tooltip_to_main_window")); + + + mCloseBtn->setVisible(is_not_torn_off && !mIsNearbyChat); + + enableDisableCallBtn(); + + showTranslationCheckbox(); +} + +void LLFloaterIMSessionTab::forceReshape() +{ + LLRect floater_rect = getRect(); + reshape(llmax(floater_rect.getWidth(), this->getMinWidth()), + llmax(floater_rect.getHeight(), this->getMinHeight()), + true); +} + + +void LLFloaterIMSessionTab::reshapeChatLayoutPanel() +{ + LLRect chat_layout_panel_rect = mChatLayoutPanel->getRect(); + LLRect input_rect = mInputEditor->getRect(); + mChatLayoutPanel->reshape(chat_layout_panel_rect.getWidth(), input_rect.getHeight() + mInputEditorPad, FALSE); +} + +void LLFloaterIMSessionTab::showTranslationCheckbox(BOOL show) +{ + getChild<LLUICtrl>("translate_chat_checkbox_lp")->setVisible(mIsNearbyChat? show : FALSE); +} + +// static +void LLFloaterIMSessionTab::processChatHistoryStyleUpdate(bool clean_messages/* = false*/) +{ + LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("impanel"); + for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); + iter != inst_list.end(); ++iter) + { + LLFloaterIMSession* floater = dynamic_cast<LLFloaterIMSession*>(*iter); + if (floater) + { + floater->reloadMessages(clean_messages); + } + } + + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + if (nearby_chat) + { + nearby_chat->reloadMessages(clean_messages); + } +} + +// static +void LLFloaterIMSessionTab::reloadEmptyFloaters() +{ + LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("impanel"); + for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); + iter != inst_list.end(); ++iter) + { + LLFloaterIMSession* floater = dynamic_cast<LLFloaterIMSession*>(*iter); + if (floater && floater->getLastChatMessageIndex() == -1) + { + floater->reloadMessages(true); + } + } + + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + if (nearby_chat && nearby_chat->getMessageArchiveLength() == 0) + { + nearby_chat->reloadMessages(true); + } +} + +void LLFloaterIMSessionTab::updateCallBtnState(bool callIsActive) +{ + LLButton* voiceButton = getChild<LLButton>("voice_call_btn"); + voiceButton->setImageOverlay( + callIsActive? getString("call_btn_stop") : getString("call_btn_start")); + + voiceButton->setToolTip( + callIsActive? getString("end_call_button_tooltip") : getString("start_call_button_tooltip")); + + enableDisableCallBtn(); + +} + +void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self) +{ + LLFloaterIMContainer* host_floater = dynamic_cast<LLFloaterIMContainer*>(self->getHost()); + if (host_floater) + { + // Hide the messages pane if a floater is hosted in the Conversations + host_floater->collapseMessagesPane(true); + } + else ///< floater is torn off + { + if (!self->mIsP2PChat) + { + bool should_be_expanded = self->mParticipantListPanel->isCollapsed(); + + // Expand/collapse the participant list panel + self->mParticipantListAndHistoryStack->collapsePanel(self->mParticipantListPanel, !should_be_expanded); + self->mParticipantListPanel->setVisible(should_be_expanded); + gSavedSettings.setBOOL("IMShowControlPanel", should_be_expanded); + self->mIsParticipantListExpanded = should_be_expanded; + self->mExpandCollapseBtn->setImageOverlay(self->getString(should_be_expanded ? "collapse_icon" : "expand_icon")); + } + } + + self->assignResizeLimits(); +} + +void LLFloaterIMSessionTab::onCollapseToLine(LLFloaterIMSessionTab* self) +{ + LLFloaterIMContainer* host_floater = dynamic_cast<LLFloaterIMContainer*>(self->getHost()); + if (!host_floater) + { + bool expand = self->isMessagePaneExpanded(); + self->mExpandCollapseLineBtn->setImageOverlay(self->getString(expand ? "collapseline_icon" : "expandline_icon")); + self->mContentPanel->setVisible(!expand); + self->mToolbarPanel->setVisible(!expand); + self->reshapeFloater(expand); + self->setMessagePaneExpanded(!expand); + } +} + +void LLFloaterIMSessionTab::reshapeFloater(bool collapse) +{ + LLRect floater_rect = getRect(); + + if(collapse) + { + mFloaterHeight = floater_rect.getHeight(); + S32 height = mContentPanel->getRect().getHeight() + mToolbarPanel->getRect().getHeight(); + floater_rect.mTop -= height; + enableResizeCtrls(true, true, false); + } + else + { + floater_rect.mTop = floater_rect.mBottom + mFloaterHeight; + enableResizeCtrls(true, true, true); + + } + + setShape(floater_rect, true); + mBodyStack->updateLayout(); + +} + +void LLFloaterIMSessionTab::restoreFloater() +{ + if(!isMessagePaneExpanded()) + { + if(isMinimized()) + { + setMinimized(false); + } + mContentPanel->setVisible(true); + mToolbarPanel->setVisible(true); + LLRect floater_rect = getRect(); + floater_rect.mTop = floater_rect.mBottom + mFloaterHeight; + setShape(floater_rect, true); + mBodyStack->updateLayout(); + mExpandCollapseLineBtn->setImageOverlay(getString("expandline_icon")); + setMessagePaneExpanded(true); + enableResizeCtrls(true, true, true); + } +} + +/*virtual*/ +void LLFloaterIMSessionTab::onOpen(const LLSD& key) +{ + if (!checkIfTornOff()) + { + LLFloaterIMContainer* host_floater = dynamic_cast<LLFloaterIMContainer*>(getHost()); + // Show the messages pane when opening a floater hosted in the Conversations + host_floater->collapseMessagesPane(false); + } + + mInputButtonPanel->setVisible(isTornOff()); +} + + +void LLFloaterIMSessionTab::onTearOffClicked() +{ + restoreFloater(); + setFollows(isTornOff()? FOLLOWS_ALL : FOLLOWS_NONE); + mSaveRect = isTornOff(); + initRectControl(); + LLFloater::onClickTearOff(this); + LLFloaterIMContainer* container = LLFloaterReg::findTypedInstance<LLFloaterIMContainer>("im_container"); + + if (isTornOff()) + { + container->selectAdjacentConversation(false); + forceReshape(); + } + //Upon re-docking the torn off floater, select the corresponding conversation line item + else + { + container->selectConversation(mSessionID); + + } + mInputButtonPanel->setVisible(isTornOff()); + + refreshConversation(); + updateGearBtn(); +} + +void LLFloaterIMSessionTab::updateGearBtn() +{ + + BOOL prevVisibility = mGearBtn->getVisible(); + mGearBtn->setVisible(checkIfTornOff() && mIsP2PChat); + + + // Move buttons if Gear button changed visibility + if(prevVisibility != mGearBtn->getVisible()) + { + LLRect gear_btn_rect = mGearBtn->getRect(); + LLRect add_btn_rect = getChild<LLButton>("add_btn")->getRect(); + LLRect call_btn_rect = getChild<LLButton>("voice_call_btn")->getRect(); + S32 gap_width = call_btn_rect.mLeft - add_btn_rect.mRight; + S32 right_shift = gear_btn_rect.getWidth() + gap_width; + if(mGearBtn->getVisible()) + { + // Move buttons to the right to give space for Gear button + add_btn_rect.translate(right_shift,0); + call_btn_rect.translate(right_shift,0); + } + else + { + add_btn_rect.translate(-right_shift,0); + call_btn_rect.translate(-right_shift,0); + } + getChild<LLButton>("add_btn")->setRect(add_btn_rect); + getChild<LLButton>("voice_call_btn")->setRect(call_btn_rect); + } +} + +void LLFloaterIMSessionTab::initBtns() +{ + LLRect gear_btn_rect = mGearBtn->getRect(); + LLRect add_btn_rect = getChild<LLButton>("add_btn")->getRect(); + LLRect call_btn_rect = getChild<LLButton>("voice_call_btn")->getRect(); + S32 gap_width = call_btn_rect.mLeft - add_btn_rect.mRight; + S32 right_shift = gear_btn_rect.getWidth() + gap_width; + + add_btn_rect.translate(-right_shift,0); + call_btn_rect.translate(-right_shift,0); + + getChild<LLButton>("add_btn")->setRect(add_btn_rect); + getChild<LLButton>("voice_call_btn")->setRect(call_btn_rect); +} + +// static +bool LLFloaterIMSessionTab::isChatMultiTab() +{ + // Restart is required in order to change chat window type. + return true; +} + +bool LLFloaterIMSessionTab::checkIfTornOff() +{ + bool isTorn = !getHost(); + + if (isTorn != isTornOff()) + { + setTornOff(isTorn); + refreshConversation(); + } + + return isTorn; +} + +void LLFloaterIMSessionTab::doToSelected(const LLSD& userdata) +{ + // Get the list of selected items in the tab + std::string command = userdata.asString(); + uuid_vec_t selected_uuids; + getSelectedUUIDs(selected_uuids); + + // Perform the command (IM, profile, etc...) on the list using the general conversation container method + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + // Note: By construction, those can only be participants so we can call doToParticipants() directly + floater_container->doToParticipants(command, selected_uuids); +} + +bool LLFloaterIMSessionTab::enableContextMenuItem(const LLSD& userdata) +{ + // Get the list of selected items in the tab + std::string command = userdata.asString(); + uuid_vec_t selected_uuids; + getSelectedUUIDs(selected_uuids); + + // Perform the item enable test on the list using the general conversation container method + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + return floater_container->enableContextMenuItem(command, selected_uuids); +} + +bool LLFloaterIMSessionTab::checkContextMenuItem(const LLSD& userdata) +{ + // Get the list of selected items in the tab + std::string command = userdata.asString(); + uuid_vec_t selected_uuids; + getSelectedUUIDs(selected_uuids); + + // Perform the item check on the list using the general conversation container method + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + return floater_container->checkContextMenuItem(command, selected_uuids); +} + +void LLFloaterIMSessionTab::getSelectedUUIDs(uuid_vec_t& selected_uuids) +{ + const std::set<LLFolderViewItem*> selected_items = mConversationsRoot->getSelectionList(); + + std::set<LLFolderViewItem*>::const_iterator it = selected_items.begin(); + const std::set<LLFolderViewItem*>::const_iterator it_end = selected_items.end(); + + for (; it != it_end; ++it) + { + LLConversationItem* conversation_item = static_cast<LLConversationItem *>((*it)->getViewModelItem()); + selected_uuids.push_back(conversation_item->getUUID()); + } +} + +LLConversationItem* LLFloaterIMSessionTab::getCurSelectedViewModelItem() +{ + LLConversationItem *conversationItem = NULL; + + if(mConversationsRoot && + mConversationsRoot->getCurSelectedItem() && + mConversationsRoot->getCurSelectedItem()->getViewModelItem()) + { + conversationItem = static_cast<LLConversationItem *>(mConversationsRoot->getCurSelectedItem()->getViewModelItem()) ; + } + + return conversationItem; +} + +BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) +{ + if(mask == MASK_ALT) + { + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + if (KEY_RETURN == key && !isTornOff()) + { + floater_container->expandConversation(); + } + if ((KEY_UP == key) || (KEY_LEFT == key)) + { + floater_container->selectNextorPreviousConversation(false); + } + if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) + { + floater_container->selectNextorPreviousConversation(true); + } + } + return TRUE; +} diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h new file mode 100644 index 0000000000..f0899a3c09 --- /dev/null +++ b/indra/newview/llfloaterimsessiontab.h @@ -0,0 +1,214 @@ +/** + * @file llfloaterimsessiontab.h + * @brief LLFloaterIMSessionTab class implements the common behavior of LNearbyChatBar + * @brief and LLFloaterIMSession for hosting both in LLIMContainer + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_FLOATERIMSESSIONTAB_H +#define LL_FLOATERIMSESSIONTAB_H + +#include "lllayoutstack.h" +#include "llparticipantlist.h" +#include "lltransientdockablefloater.h" +#include "llviewercontrol.h" +#include "lleventtimer.h" +#include "llimview.h" +#include "llconversationmodel.h" +#include "llconversationview.h" +#include "lltexteditor.h" + +class LLPanelChatControlPanel; +class LLChatEntry; +class LLChatHistory; + +class LLFloaterIMSessionTab + : public LLTransientDockableFloater +{ + +public: + LOG_CLASS(LLFloaterIMSessionTab); + + LLFloaterIMSessionTab(const LLSD& session_id); + ~LLFloaterIMSessionTab(); + + // reload all message with new settings of visual modes + static void processChatHistoryStyleUpdate(bool clean_messages = false); + static void reloadEmptyFloaters(); + + /** + * Returns true if chat is displayed in multi tabbed floater + * false if chat is displayed in multiple windows + */ + static bool isChatMultiTab(); + + // add conversation to container + static void addToHost(const LLUUID& session_id); + + bool isHostAttached() {return mIsHostAttached;} + void setHostAttached(bool is_attached) {mIsHostAttached = is_attached;} + + static LLFloaterIMSessionTab* findConversation(const LLUUID& uuid); + static LLFloaterIMSessionTab* getConversation(const LLUUID& uuid); + + // show/hide the translation check box + void showTranslationCheckbox(const BOOL visible = FALSE); + + bool isNearbyChat() {return mIsNearbyChat;} + + // LLFloater overrides + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ BOOL postBuild(); + /*virtual*/ void draw(); + /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void setFocus(BOOL focus); + + // Handle the left hand participant list widgets + void addConversationViewParticipant(LLConversationItem* item); + void removeConversationViewParticipant(const LLUUID& participant_id); + void updateConversationViewParticipant(const LLUUID& participant_id); + void refreshConversation(); + void buildConversationViewParticipant(); + + void setSortOrder(const LLConversationSort& order); + virtual void onTearOffClicked(); + void updateGearBtn(); + void initBtns(); + virtual void updateMessages() {} + LLConversationItem* getCurSelectedViewModelItem(); + void forceReshape(); + virtual BOOL handleKeyHere( KEY key, MASK mask ); + bool isMessagePaneExpanded(){return mMessagePaneExpanded;} + void setMessagePaneExpanded(bool expanded){mMessagePaneExpanded = expanded;} + void restoreFloater(); + +protected: + + // callback for click on any items of the visual states menu + void onIMSessionMenuItemClicked(const LLSD& userdata); + + // callback for check/uncheck of the expanded/collapse mode's switcher + bool onIMCompactExpandedMenuItemCheck(const LLSD& userdata); + + // + bool onIMShowModesMenuItemCheck(const LLSD& userdata); + bool onIMShowModesMenuItemEnable(const LLSD& userdata); + static void onSlide(LLFloaterIMSessionTab *self); + static void onCollapseToLine(LLFloaterIMSessionTab *self); + void reshapeFloater(bool collapse); + + // refresh a visual state of the Call button + void updateCallBtnState(bool callIsActive); + + void hideOrShowTitle(); // toggle the floater's drag handle + void hideAllStandardButtons(); + + /// Update floater header and toolbar buttons when hosted/torn off state is toggled. + void updateHeaderAndToolbar(); + + // Update the input field help text and other places that need the session name + virtual void updateSessionName(const std::string& name); + + // set the enable/disable state for the Call button + virtual void enableDisableCallBtn(); + + // process focus events to set a currently active session + /* virtual */ void onFocusLost(); + /* virtual */ void onFocusReceived(); + + // prepare chat's params and out one message to chatHistory + void appendMessage(const LLChat& chat, const LLSD &args = 0); + + std::string appendTime(); + void assignResizeLimits(); + + S32 mFloaterExtraWidth; + + bool mIsNearbyChat; + bool mIsP2PChat; + + bool mMessagePaneExpanded; + bool mIsParticipantListExpanded; + + + LLIMModel::LLIMSession* mSession; + + // Participants list: model and view + LLConversationViewParticipant* createConversationViewParticipant(LLConversationItem* item); + + LLUUID mSessionID; + LLLayoutStack* mBodyStack; + LLLayoutStack* mParticipantListAndHistoryStack; + LLLayoutPanel* mParticipantListPanel; // add the widgets to that see mConversationsListPanel + LLLayoutPanel* mRightPartPanel; + LLLayoutPanel* mContentPanel; + LLLayoutPanel* mToolbarPanel; + LLLayoutPanel* mInputButtonPanel; + LLParticipantList* getParticipantList(); + conversations_widgets_map mConversationsWidgets; + LLConversationViewModel mConversationViewModel; + LLFolderView* mConversationsRoot; + LLScrollContainer* mScroller; + + LLOutputMonitorCtrl* mSpeakingIndicator; + LLChatHistory* mChatHistory; + LLChatEntry* mInputEditor; + LLLayoutPanel * mChatLayoutPanel; + int mInputEditorPad; // padding between input field and chat history + + LLButton* mExpandCollapseLineBtn; + LLButton* mExpandCollapseBtn; + LLButton* mTearOffBtn; + LLButton* mCloseBtn; + LLButton* mGearBtn; + + S32 mFloaterHeight; + + +private: + // Handling selection and contextual menu + void doToSelected(const LLSD& userdata); + bool enableContextMenuItem(const LLSD& userdata); + bool checkContextMenuItem(const LLSD& userdata); + + void getSelectedUUIDs(uuid_vec_t& selected_uuids); + + /// Refreshes the floater at a constant rate. + virtual void refresh() = 0; + + /** + * Adjusts chat history height to fit vertically with input chat field + * and avoid overlapping, since input chat field can be vertically expanded. + * Implementation: chat history bottom "follows" top+top_pad of input chat field + */ + void reshapeChatLayoutPanel(); + + bool checkIfTornOff(); + bool mIsHostAttached; + bool mHasVisibleBeenInitialized; + + LLTimer* mRefreshTimer; ///< Defines the rate at which refresh() is called. +}; + + +#endif /* LL_FLOATERIMSESSIONTAB_H */ diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index cece8d299c..5a1dfc99ab 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -46,7 +46,9 @@ LLFloaterInspect::LLFloaterInspect(const LLSD& key) : LLFloater(key), - mDirty(FALSE) + mDirty(FALSE), + mOwnerNameCacheConnection(), + mCreatorNameCacheConnection() { mCommitCallbackRegistrar.add("Inspect.OwnerProfile", boost::bind(&LLFloaterInspect::onClickOwnerProfile, this)); mCommitCallbackRegistrar.add("Inspect.CreatorProfile", boost::bind(&LLFloaterInspect::onClickCreatorProfile, this)); @@ -67,6 +69,14 @@ BOOL LLFloaterInspect::postBuild() LLFloaterInspect::~LLFloaterInspect(void) { + if (mOwnerNameCacheConnection.connected()) + { + mOwnerNameCacheConnection.disconnect(); + } + if (mCreatorNameCacheConnection.connected()) + { + mCreatorNameCacheConnection.disconnect(); + } if(!LLFloaterReg::instanceVisible("build")) { if(LLToolMgr::getInstance()->getBaseTool() == LLToolCompInspect::getInstance()) @@ -80,7 +90,6 @@ LLFloaterInspect::~LLFloaterInspect(void) { LLFloaterReg::showInstance("build", LLSD(), TRUE); } - //sInstance = NULL; } void LLFloaterInspect::onOpen(const LLSD& key) @@ -167,15 +176,6 @@ LLUUID LLFloaterInspect::getSelectedUUID() return LLUUID::null; } -void LLFloaterInspect::onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr) -{ - if (FloaterPtr) - { - LLFloaterInspect* floater = (LLFloaterInspect*)FloaterPtr; - floater->dirty(); - } -} - void LLFloaterInspect::refresh() { LLUUID creator_id; @@ -229,7 +229,11 @@ void LLFloaterInspect::refresh() else { owner_name = LLTrans::getString("RetrievingData"); - LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this)); + if (mOwnerNameCacheConnection.connected()) + { + mOwnerNameCacheConnection.disconnect(); + } + mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this)); } if (LLAvatarNameCache::get(idCreator, &av_name)) @@ -239,7 +243,11 @@ void LLFloaterInspect::refresh() else { creator_name = LLTrans::getString("RetrievingData"); - LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this)); + if (mCreatorNameCacheConnection.connected()) + { + mCreatorNameCacheConnection.disconnect(); + } + mCreatorNameCacheConnection = LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetCreatorNameCallback, this)); } row["id"] = obj->getObject()->getID(); @@ -289,6 +297,18 @@ void LLFloaterInspect::dirty() setDirty(); } +void LLFloaterInspect::onGetOwnerNameCallback() +{ + mOwnerNameCacheConnection.disconnect(); + setDirty(); +} + +void LLFloaterInspect::onGetCreatorNameCallback() +{ + mCreatorNameCacheConnection.disconnect(); + setDirty(); +} + void LLFloaterInspect::draw() { if (mDirty) diff --git a/indra/newview/llfloaterinspect.h b/indra/newview/llfloaterinspect.h index 7ee83ccdb4..44381eac96 100644 --- a/indra/newview/llfloaterinspect.h +++ b/indra/newview/llfloaterinspect.h @@ -55,8 +55,6 @@ public: void onClickOwnerProfile(); void onSelectObject(); - static void onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr); - LLScrollListCtrl* mObjectList; protected: // protected members @@ -64,13 +62,15 @@ protected: bool mDirty; private: + void onGetOwnerNameCallback(); + void onGetCreatorNameCallback(); LLFloaterInspect(const LLSD& key); virtual ~LLFloaterInspect(void); - // static data -// static LLFloaterInspect* sInstance; LLSafeHandle<LLObjectSelection> mObjectSelection; + boost::signals2::connection mOwnerNameCacheConnection; + boost::signals2::connection mCreatorNameCacheConnection; }; #endif //LL_LLFLOATERINSPECT_H diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index c37798c330..d0c22d25f2 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -33,6 +33,7 @@ #include "llerror.h" #include "llrect.h" #include "llstring.h" +#include "llstat.h" // project includes #include "lluictrlfactory.h" @@ -83,7 +84,8 @@ BOOL LLFloaterJoystick::postBuild() for (U32 i = 0; i < 6; i++) { - mAxisStats[i] = new LLStat(4); + std::string stat_name(llformat("Joystick axis %d", i)); + mAxisStats[i] = new LLStat(stat_name, 4); std::string axisname = llformat("axis%d", i); mAxisStatsBar[i] = getChild<LLStatBar>(axisname); if (mAxisStatsBar[i]) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 61da99fe3a..0a30fef768 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -783,8 +783,9 @@ void LLPanelLandGeneral::refresh() mBtnReleaseLand->setEnabled( can_release ); } - BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();; + BOOL use_pass = parcel->getOwnerID()!= gAgent.getID() && parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();; mBtnBuyPass->setEnabled(use_pass); + } } @@ -1045,6 +1046,8 @@ void LLPanelLandGeneral::onCommitAny(LLUICtrl *ctrl, void *userdata) void LLPanelLandGeneral::onClickSellLand(void* data) { LLViewerParcelMgr::getInstance()->startSellLand(); + LLPanelLandGeneral *panelp = (LLPanelLandGeneral *)data; + panelp->refresh(); } // static @@ -2212,8 +2215,8 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata) BOOL allow_damage = !self->mCheckSafe->get(); BOOL allow_fly = self->mCheckFly->get(); BOOL allow_landmark = TRUE; // cannot restrict landmark creation - BOOL allow_group_scripts = self->mCheckGroupScripts->get() || self->mCheckOtherScripts->get(); BOOL allow_other_scripts = self->mCheckOtherScripts->get(); + BOOL allow_group_scripts = self->mCheckGroupScripts->get() || allow_other_scripts; BOOL allow_publish = FALSE; BOOL mature_publish = self->mMatureCtrl->get(); BOOL push_restriction = self->mPushRestrictionCtrl->get(); @@ -2226,11 +2229,16 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata) LLViewerRegion* region; region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); - if (!allow_other_scripts && region && region->getAllowDamage()) - { - - LLNotificationsUtil::add("UnableToDisableOutsideScripts"); - return; + if (region && region->getAllowDamage()) + { // Damage is allowed on the region - server will always allow scripts + if ( (!allow_other_scripts && parcel->getParcelFlag(PF_ALLOW_OTHER_SCRIPTS)) || + (!allow_group_scripts && parcel->getParcelFlag(PF_ALLOW_GROUP_SCRIPTS)) ) + { // Don't allow turning off "Run Scripts" if damage is allowed in the region + self->mCheckOtherScripts->set(parcel->getParcelFlag(PF_ALLOW_OTHER_SCRIPTS)); // Restore UI to actual settings + self->mCheckGroupScripts->set(parcel->getParcelFlag(PF_ALLOW_GROUP_SCRIPTS)); + LLNotificationsUtil::add("UnableToDisableOutsideScripts"); + return; + } } // Push data into current parcel @@ -2357,12 +2365,6 @@ LLPanelLandAccess::~LLPanelLandAccess() void LLPanelLandAccess::refresh() { LLFloater* parent_floater = gFloaterView->getParentFloater(this); - - if (mListAccess) - mListAccess->deleteAllItems(); - if (mListBanned) - mListBanned->deleteAllItems(); - LLParcel *parcel = mParcel->getParcel(); // Display options @@ -2380,7 +2382,11 @@ void LLPanelLandAccess::refresh() getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", group_name ); // Allow list + if (mListAccess) { + // Clear the sort order so we don't re-sort on every add. + mListAccess->clearSortOrder(); + mListAccess->deleteAllItems(); S32 count = parcel->mAccessList.size(); getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count)); getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST)); @@ -2415,13 +2421,17 @@ void LLPanelLandAccess::refresh() } suffix.append(" " + parent_floater->getString("Remaining") + ")"); } - if (mListAccess) - mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix); + mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix); } + mListAccess->sortByName(TRUE); } // Ban List + if(mListBanned) { + // Clear the sort order so we don't re-sort on every add. + mListBanned->clearSortOrder(); + mListBanned->deleteAllItems(); S32 count = parcel->mBanList.size(); getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count)); @@ -2459,6 +2469,7 @@ void LLPanelLandAccess::refresh() } mListBanned->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix); } + mListBanned->sortByName(TRUE); } if(parcel->getRegionDenyAnonymousOverride()) @@ -2594,13 +2605,13 @@ void LLPanelLandAccess::refresh_ui() getChildView("AccessList")->setEnabled(can_manage_allowed); S32 allowed_list_count = parcel->mAccessList.size(); getChildView("add_allowed")->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST); - BOOL has_selected = mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0; + BOOL has_selected = (mListAccess && mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0); getChildView("remove_allowed")->setEnabled(can_manage_allowed && has_selected); getChildView("BannedList")->setEnabled(can_manage_banned); S32 banned_list_count = parcel->mBanList.size(); getChildView("add_banned")->setEnabled(can_manage_banned && banned_list_count < PARCEL_MAX_ACCESS_LIST); - has_selected = mListBanned->getSelectionInterface()->getFirstSelectedIndex() >= 0; + has_selected = (mListBanned && mListBanned->getSelectionInterface()->getFirstSelectedIndex() >= 0); getChildView("remove_banned")->setEnabled(can_manage_banned && has_selected); } } @@ -2725,11 +2736,13 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata) void LLPanelLandAccess::onClickAddAccess() { + LLView * button = findChild<LLButton>("add_allowed"); + LLFloater * root_floater = gFloaterView->getParentFloater(this); LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show( - boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1)); + boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1), FALSE, FALSE, FALSE, root_floater->getName(), button); if (picker) { - gFloaterView->getParentFloater(this)->addDependentFloater(picker); + root_floater->addDependentFloater(picker); } } @@ -2774,11 +2787,13 @@ void LLPanelLandAccess::onClickRemoveAccess(void* data) // static void LLPanelLandAccess::onClickAddBanned() { + LLView * button = findChild<LLButton>("add_banned"); + LLFloater * root_floater = gFloaterView->getParentFloater(this); LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show( - boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1)); + boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1), FALSE, FALSE, FALSE, root_floater->getName(), button); if (picker) { - gFloaterView->getParentFloater(this)->addDependentFloater(picker); + root_floater->addDependentFloater(picker); } } diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index a65e9e911a..473e2938be 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -122,16 +122,13 @@ BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask) LLVector3d pos_global = mMap->viewPosToGlobal(x, y); - // If we're not tracking a beacon already, double-click will set one - if (!LLTracker::isTracking(NULL)) + LLTracker::stopTracking(NULL); + LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance(); + if (world_map) { - LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance(); - if (world_map) - { - world_map->trackLocation(pos_global); - } + world_map->trackLocation(pos_global); } - + if (gSavedSettings.getBOOL("DoubleClickTeleport")) { // If DoubleClickTeleport is on, double clicking the minimap will teleport there @@ -249,3 +246,8 @@ void LLFloaterMap::handleZoom(const LLSD& userdata) mMap->setScale(scale); } } + +LLFloaterMap* LLFloaterMap::getInstance() +{ + return LLFloaterReg::getTypedInstance<LLFloaterMap>("mini_map"); +} diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h index 8a1b965e62..ff2fb20535 100644 --- a/indra/newview/llfloatermap.h +++ b/indra/newview/llfloatermap.h @@ -39,6 +39,7 @@ class LLFloaterMap : public LLFloater { public: LLFloaterMap(const LLSD& key); + static LLFloaterMap* getInstance(); virtual ~LLFloaterMap(); /*virtual*/ BOOL postBuild(); diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 3fe535cbe8..ea839e6f5a 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -737,6 +737,20 @@ void LLFloaterModelPreview::onAutoFillCommit(LLUICtrl* ctrl, void* userdata) void LLFloaterModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit) { mModelPreview->onLODParamCommit(lod, enforce_tri_limit); + + //refresh LoDs that reference this one + for (S32 i = lod - 1; i >= 0; --i) + { + LLComboBox* lod_source_combo = getChild<LLComboBox>("lod_source_" + lod_name[i]); + if (lod_source_combo->getCurrentIndex() == LLModelPreview::USE_LOD_ABOVE) + { + onLoDSourceCommit(i); + } + else + { + break; + } + } } @@ -3870,15 +3884,30 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim U32 triangle_count = 0; - for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter) + U32 instanced_triangle_count = 0; + + //get the triangle count for the whole scene + for (LLModelLoader::scene::iterator iter = mBaseScene.begin(), endIter = mBaseScene.end(); iter != endIter; ++iter) { - LLModel* mdl = *iter; - for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i) + for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance) { - triangle_count += mdl->getVolumeFace(i).mNumIndices/3; + LLModel* mdl = instance->mModel; + if (mdl) + { + instanced_triangle_count += mdl->getNumTriangles(); + } } } + //get the triangle count for the non-instanced set of models + for (U32 i = 0; i < mBaseModel.size(); ++i) + { + triangle_count += mBaseModel[i]->getNumTriangles(); + } + + //get ratio of uninstanced triangles to instanced triangles + F32 triangle_ratio = (F32) triangle_count / (F32) instanced_triangle_count; + U32 base_triangle_count = triangle_count; U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0; @@ -3912,6 +3941,8 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim if (which_lod > -1 && which_lod < NUM_LOD) { limit = mFMP->childGetValue("lod_triangle_limit_" + lod_name[which_lod]).asInteger(); + //convert from "scene wide" to "non-instanced" triangle limit + limit = (S32) ( (F32) limit*triangle_ratio ); } } else @@ -4017,7 +4048,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim U32 actual_verts = 0; U32 submeshes = 0; - mRequestedTriangleCount[lod] = triangle_count; + mRequestedTriangleCount[lod] = (S32) ( (F32) triangle_count / triangle_ratio ); mRequestedErrorThreshold[lod] = lod_error_threshold; glodGroupParameteri(mGroup, GLOD_ADAPT_MODE, lod_mode); @@ -4199,28 +4230,36 @@ void LLModelPreview::updateStatusMessages() //initialize total for this lod to 0 total_tris[lod] = total_verts[lod] = total_submeshes[lod] = 0; - for (U32 i = 0; i < mModel[lod].size(); ++i) - { //for each model in the lod - S32 cur_tris = 0; - S32 cur_verts = 0; - S32 cur_submeshes = mModel[lod][i]->getNumVolumeFaces(); - - for (S32 j = 0; j < cur_submeshes; ++j) - { //for each submesh (face), add triangles and vertices to current total - const LLVolumeFace& face = mModel[lod][i]->getVolumeFace(j); - cur_tris += face.mNumIndices/3; - cur_verts += face.mNumVertices; - } + for (LLModelLoader::scene::iterator iter = mScene[lod].begin(), endIter = mScene[lod].end(); iter != endIter; ++iter) + { + for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance) + { + LLModel* model = instance->mModel; + if (model) + { + //for each model in the lod + S32 cur_tris = 0; + S32 cur_verts = 0; + S32 cur_submeshes = model->getNumVolumeFaces(); + + for (S32 j = 0; j < cur_submeshes; ++j) + { //for each submesh (face), add triangles and vertices to current total + const LLVolumeFace& face = model->getVolumeFace(j); + cur_tris += face.mNumIndices/3; + cur_verts += face.mNumVertices; + } - //add this model to the lod total - total_tris[lod] += cur_tris; - total_verts[lod] += cur_verts; - total_submeshes[lod] += cur_submeshes; + //add this model to the lod total + total_tris[lod] += cur_tris; + total_verts[lod] += cur_verts; + total_submeshes[lod] += cur_submeshes; - //store this model's counts to asset data - tris[lod].push_back(cur_tris); - verts[lod].push_back(cur_verts); - submeshes[lod].push_back(cur_submeshes); + //store this model's counts to asset data + tris[lod].push_back(cur_tris); + verts[lod].push_back(cur_verts); + submeshes[lod].push_back(cur_submeshes); + } + } } } @@ -4397,34 +4436,38 @@ void LLModelPreview::updateStatusMessages() } //add up physics triangles etc - S32 start = 0; - S32 end = mModel[LLModel::LOD_PHYSICS].size(); - S32 phys_tris = 0; S32 phys_hulls = 0; S32 phys_points = 0; - for (S32 i = start; i < end; ++i) - { //add up hulls and points and triangles for selected mesh(es) - LLModel* model = mModel[LLModel::LOD_PHYSICS][i]; - S32 cur_submeshes = model->getNumVolumeFaces(); - - LLModel::convex_hull_decomposition& decomp = model->mPhysics.mHull; - - if (!decomp.empty()) + //get the triangle count for the whole scene + for (LLModelLoader::scene::iterator iter = mScene[LLModel::LOD_PHYSICS].begin(), endIter = mScene[LLModel::LOD_PHYSICS].end(); iter != endIter; ++iter) + { + for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance) { - phys_hulls += decomp.size(); - for (U32 i = 0; i < decomp.size(); ++i) + LLModel* model = instance->mModel; + if (model) { - phys_points += decomp[i].size(); - } - } - else - { //choose physics shape OR decomposition, can't use both - for (S32 j = 0; j < cur_submeshes; ++j) - { //for each submesh (face), add triangles and vertices to current total - const LLVolumeFace& face = model->getVolumeFace(j); - phys_tris += face.mNumIndices/3; + S32 cur_submeshes = model->getNumVolumeFaces(); + + LLModel::convex_hull_decomposition& decomp = model->mPhysics.mHull; + + if (!decomp.empty()) + { + phys_hulls += decomp.size(); + for (U32 i = 0; i < decomp.size(); ++i) + { + phys_points += decomp[i].size(); + } + } + else + { //choose physics shape OR decomposition, can't use both + for (S32 j = 0; j < cur_submeshes; ++j) + { //for each submesh (face), add triangles and vertices to current total + const LLVolumeFace& face = model->getVolumeFace(j); + phys_tris += face.mNumIndices/3; + } + } } } } @@ -4588,7 +4631,7 @@ void LLModelPreview::updateLodControls(S32 lod) if (!lod_combo) return; S32 lod_mode = lod_combo->getCurrentIndex(); - if (lod_mode == 0) // LoD from file + if (lod_mode == LOD_FROM_FILE) // LoD from file { fmp->mLODMode[lod] = 0; for (U32 i = 0; i < num_file_controls; ++i) @@ -4601,7 +4644,7 @@ void LLModelPreview::updateLodControls(S32 lod) mFMP->childHide(lod_controls[i] + lod_name[lod]); } } - else if (lod_mode == 2) // use LoD above + else if (lod_mode == USE_LOD_ABOVE) // use LoD above { fmp->mLODMode[lod] = 2; for (U32 i = 0; i < num_file_controls; ++i) @@ -4774,7 +4817,8 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights) if (vf.mTexCoords) { vb->getTexCoord0Strider(tc_strider); - LLVector4a::memcpyNonAliased16((F32*) tc_strider.get(), (F32*) vf.mTexCoords, num_vertices*2*sizeof(F32)); + S32 tex_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF; + LLVector4a::memcpyNonAliased16((F32*) tc_strider.get(), (F32*) vf.mTexCoords, tex_size); } if (vf.mNormals) @@ -5072,6 +5116,11 @@ BOOL LLModelPreview::render() refresh(); } + if (use_shaders) + { + gObjectPreviewProgram.bind(); + } + gGL.loadIdentity(); gPipeline.enableLightsPreview(); @@ -5097,11 +5146,6 @@ BOOL LLModelPreview::render() const U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0; - if (use_shaders) - { - gObjectPreviewProgram.bind(); - } - LLGLEnable normalize(GL_NORMALIZE); if (!mBaseModel.empty() && mVertexBuffer[5].empty()) @@ -5290,7 +5334,7 @@ BOOL LLModelPreview::render() hull_colors.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 128)); } - glColor4ubv(hull_colors[i].mV); + gGL.diffuseColor4ubv(hull_colors[i].mV); LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions, physics.mMesh[i].mNormals); if (explode > 0.f) @@ -5761,6 +5805,12 @@ void LLFloaterModelPreview::onLoDSourceCommit(S32 lod) { mModelPreview->updateLodControls(lod); refresh(); + + LLComboBox* lod_source_combo = getChild<LLComboBox>("lod_source_" + lod_name[lod]); + if (lod_source_combo->getCurrentIndex() == LLModelPreview::GENERATE) + { //rebuild LoD to update triangle counts + onLODParamCommit(lod, true); + } } void LLFloaterModelPreview::resetDisplayOptions() diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index ab319c30d5..e588418f7b 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -311,6 +311,15 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex typedef boost::signals2::signal<void (bool)> model_updated_signal_t; public: + + typedef enum + { + LOD_FROM_FILE = 0, + GENERATE, + USE_LOD_ABOVE, + } eLoDMode; + +public: LLModelPreview(S32 width, S32 height, LLFloater* fmp); virtual ~LLModelPreview(); diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 2681d4b34d..4f35c325a8 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -44,21 +44,16 @@ public: BOOL postBuild(); private: - bool update(const LLSD& payload, bool passed_filter); + bool update(const LLSD& payload); static void toggleClick(void* user_data); static void onClickNotification(void* user_data); - static void onClickNotificationReject(void* user_data); LLNotificationChannelPtr mChannelPtr; - LLNotificationChannelPtr mChannelRejectsPtr; }; LLNotificationChannelPanel::LLNotificationChannelPanel(const LLNotificationChannelPanel::Params& p) : LLLayoutPanel(p) { mChannelPtr = LLNotifications::instance().getChannel(p.name); - mChannelRejectsPtr = LLNotificationChannelPtr( - LLNotificationChannel::buildChannel(p.name() + "rejects", mChannelPtr->getParentChannelName(), - !boost::bind(mChannelPtr->getFilter(), _1))); buildFromFile( "panel_notifications_channel.xml"); } @@ -68,15 +63,11 @@ BOOL LLNotificationChannelPanel::postBuild() header_button->setLabel(mChannelPtr->getName()); header_button->setClickedCallback(toggleClick, this); - mChannelPtr->connectChanged(boost::bind(&LLNotificationChannelPanel::update, this, _1, true)); - mChannelRejectsPtr->connectChanged(boost::bind(&LLNotificationChannelPanel::update, this, _1, false)); + mChannelPtr->connectChanged(boost::bind(&LLNotificationChannelPanel::update, this, _1)); LLScrollListCtrl* scroll = getChild<LLScrollListCtrl>("notifications_list"); scroll->setDoubleClickCallback(onClickNotification, this); scroll->setRect(LLRect( getRect().mLeft, getRect().mTop, getRect().mRight, 0)); - scroll = getChild<LLScrollListCtrl>("notification_rejects_list"); - scroll->setDoubleClickCallback(onClickNotificationReject, this); - scroll->setRect(LLRect( getRect().mLeft, getRect().mTop, getRect().mRight, 0)); return TRUE; } @@ -97,8 +88,6 @@ void LLNotificationChannelPanel::toggleClick(void *user_data) // turn off tab stop for collapsed panel self->getChild<LLScrollListCtrl>("notifications_list")->setTabStop(!header_button->getToggleState()); self->getChild<LLScrollListCtrl>("notifications_list")->setVisible(!header_button->getToggleState()); - self->getChild<LLScrollListCtrl>("notification_rejects_list")->setTabStop(!header_button->getToggleState()); - self->getChild<LLScrollListCtrl>("notification_rejects_list")->setVisible(!header_button->getToggleState()); } /*static*/ @@ -118,24 +107,7 @@ void LLNotificationChannelPanel::onClickNotification(void* user_data) } } -/*static*/ -void LLNotificationChannelPanel::onClickNotificationReject(void* user_data) -{ - LLNotificationChannelPanel* self = (LLNotificationChannelPanel*)user_data; - if (!self) return; - LLScrollListItem* firstselected = self->getChild<LLScrollListCtrl>("notification_rejects_list")->getFirstSelected(); - llassert(firstselected); - if (firstselected) - { - void* data = firstselected->getUserdata(); - if (data) - { - gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE); - } - } -} - -bool LLNotificationChannelPanel::update(const LLSD& payload, bool passed_filter) +bool LLNotificationChannelPanel::update(const LLSD& payload) { LLNotificationPtr notification = LLNotifications::instance().find(payload["id"].asUUID()); if (notification) @@ -151,9 +123,7 @@ bool LLNotificationChannelPanel::update(const LLSD& payload, bool passed_filter) row["columns"][2]["column"] = "date"; row["columns"][2]["type"] = "date"; - LLScrollListItem* sli = passed_filter ? - getChild<LLScrollListCtrl>("notifications_list")->addElement(row) : - getChild<LLScrollListCtrl>("notification_rejects_list")->addElement(row); + LLScrollListItem* sli = getChild<LLScrollListCtrl>("notifications_list")->addElement(row); sli->setUserdata(&(*notification)); } diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 540f977305..29a3e6ac3a 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -44,14 +44,17 @@ #include "llviewernetwork.h" #include "llwindowshade.h" -#define USE_WINDOWSHADE_DIALOGS 0 - ///---------------------------------------------------------------------------- /// LLOutboxNotification class ///---------------------------------------------------------------------------- -bool LLNotificationsUI::LLOutboxNotification::processNotification(const LLSD& notify) +LLNotificationsUI::LLOutboxNotification::LLOutboxNotification() + : LLSystemNotificationHandler("Outbox", "outbox") +{ +} + +bool LLNotificationsUI::LLOutboxNotification::processNotification(const LLNotificationPtr& notify) { LLFloaterOutbox* outbox_floater = LLFloaterReg::getTypedInstance<LLFloaterOutbox>("outbox"); @@ -60,6 +63,14 @@ bool LLNotificationsUI::LLOutboxNotification::processNotification(const LLSD& no return false; } +void LLNotificationsUI::LLOutboxNotification::onDelete(LLNotificationPtr p) +{ + LLNotificationsUI::LLNotificationHandler * notification_handler = dynamic_cast<LLNotificationsUI::LLNotificationHandler*>(LLNotifications::instance().getChannel("AlertModal").get()); + if (notification_handler) + { + notification_handler->onDelete(p); + } +} ///---------------------------------------------------------------------------- /// LLOutboxAddedObserver helper class @@ -168,9 +179,8 @@ void LLFloaterOutbox::onOpen(const LLSD& key) if (mOutboxId.isNull()) { const bool do_not_create_folder = false; - const bool do_not_find_in_library = false; - const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, do_not_create_folder, do_not_find_in_library); + const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, do_not_create_folder); if (outbox_id.isNull()) { @@ -244,8 +254,9 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId) mOutboxInventoryPanel->setShape(inventory_placeholder_rect); // Set the sort order newest to oldest - mOutboxInventoryPanel->setSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME); - mOutboxInventoryPanel->getFilter()->markDefault(); + + mOutboxInventoryPanel->getFolderViewModel()->setSorter(LLInventoryFilter::SO_FOLDERS_BY_NAME); + mOutboxInventoryPanel->getFilter().markDefault(); fetchOutboxContents(); @@ -380,7 +391,7 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // Determine if the mouse is inside the inventory panel itself or just within the floater bool pointInInventoryPanel = false; bool pointInInventoryPanelChild = false; - LLFolderView * root_folder = mOutboxInventoryPanel->getRootFolder(); + LLFolderView* root_folder = mOutboxInventoryPanel->getRootFolder(); if (mOutboxInventoryPanel->getVisible()) { S32 inv_x, inv_y; @@ -437,10 +448,10 @@ void LLFloaterOutbox::onOutboxChanged() { llassert(!mOutboxId.isNull()); - if (mOutboxInventoryPanel) - { - mOutboxInventoryPanel->requestSort(); - } + //if (mOutboxInventoryPanel) + //{ + // mOutboxInventoryPanel->requestSort(); + //} fetchOutboxContents(); @@ -516,52 +527,11 @@ void LLFloaterOutbox::initializationReportError(U32 status, const LLSD& content) updateView(); } -void LLFloaterOutbox::showNotification(const LLSD& notify) +void LLFloaterOutbox::showNotification(const LLNotificationPtr& notification) { - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - if (!notification) - { - llerrs << "Unable to find outbox notification!" << notify.asString() << llendl; - - return; - } - -#if USE_WINDOWSHADE_DIALOGS - - if (mWindowShade) - { - delete mWindowShade; - } - - LLRect floater_rect = getLocalRect(); - floater_rect.mTop -= getHeaderHeight(); - floater_rect.stretch(-5, 0); - - LLWindowShade::Params params; - params.name = "notification_shade"; - params.rect = floater_rect; - params.follows.flags = FOLLOWS_ALL; - params.modal = true; - params.can_close = false; - params.shade_color = LLColor4::white % 0.25f; - params.text_color = LLColor4::white; - - mWindowShade = LLUICtrlFactory::create<LLWindowShade>(params); - - addChild(mWindowShade); - mWindowShade->show(notification); - -#else - - LLNotificationsUI::LLEventHandler * handler = - LLNotificationsUI::LLNotificationManager::instance().getHandlerForNotification("alertmodal"); - - LLNotificationsUI::LLSysHandler * sys_handler = dynamic_cast<LLNotificationsUI::LLSysHandler *>(handler); - llassert(sys_handler); - - sys_handler->processNotification(notify); + LLNotificationsUI::LLNotificationHandler * notification_handler = dynamic_cast<LLNotificationsUI::LLNotificationHandler*>(LLNotifications::instance().getChannel("AlertModal").get()); + llassert(notification_handler); -#endif + notification_handler->processNotification(notification); } diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 18baccf1c9..a91d8c1139 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -64,7 +64,7 @@ public: EAcceptance* accept, std::string& tooltip_msg); - void showNotification(const LLSD& notify); + void showNotification(const LLNotificationPtr& notification); BOOL handleHover(S32 x, S32 y, MASK mask); void onMouseLeave(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 5752f839ce..a28af2101b 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -51,11 +51,11 @@ #include "llfloaterabout.h" #include "llfloaterhardwaresettings.h" #include "llfloatersidepanelcontainer.h" -#include "llimfloater.h" +#include "llfloaterimsession.h" #include "llkeyboard.h" #include "llmodaldialog.h" #include "llnavigationbar.h" -#include "llnearbychat.h" +#include "llfloaterimnearbychat.h" #include "llnotifications.h" #include "llnotificationsutil.h" #include "llnotificationtemplate.h" @@ -306,7 +306,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mAvatarDataInitialized(false), mClickActionDirty(false) { - + LLConversationLog::instance().addObserver(this); + //Build Floater is now Called from LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>); static bool registered_dialog = false; @@ -329,8 +330,6 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.VoiceSetKey", boost::bind(&LLFloaterPreference::onClickSetKey, this)); mCommitCallbackRegistrar.add("Pref.VoiceSetMiddleMouse", boost::bind(&LLFloaterPreference::onClickSetMiddleMouse, this)); mCommitCallbackRegistrar.add("Pref.SetSounds", boost::bind(&LLFloaterPreference::onClickSetSounds, this)); -// mCommitCallbackRegistrar.add("Pref.ClickSkipDialogs", boost::bind(&LLFloaterPreference::onClickSkipDialogs, this)); -// mCommitCallbackRegistrar.add("Pref.ClickResetDialogs", boost::bind(&LLFloaterPreference::onClickResetDialogs, this)); mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this)); mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this)); mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this)); @@ -351,13 +350,16 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) sSkin = gSavedSettings.getString("SkinCurrent"); - mCommitCallbackRegistrar.add("Pref.ClickActionChange", boost::bind(&LLFloaterPreference::onClickActionChange, this)); + mCommitCallbackRegistrar.add("Pref.ClickActionChange", boost::bind(&LLFloaterPreference::onClickActionChange, this)); gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2)); LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this ); + + mCommitCallbackRegistrar.add("Pref.ClearLog", boost::bind(&LLConversationLog::onClearLog, &LLConversationLog::instance())); + mCommitCallbackRegistrar.add("Pref.DeleteTranscripts", boost::bind(&LLFloaterPreference::onDeleteTranscripts, this)); } void LLFloaterPreference::processProperties( void* pData, EAvatarProcessorType type ) @@ -425,13 +427,7 @@ void LLFloaterPreference::saveAvatarProperties( void ) BOOL LLFloaterPreference::postBuild() { - gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2)); - - gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2)); - - gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2)); - - gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2)); + gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate, false)); gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLViewerChat::signalChatFontChanged)); @@ -447,28 +443,45 @@ BOOL LLFloaterPreference::postBuild() std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""); setCacheLocation(cache_location); + getChild<LLUICtrl>("log_path_string")->setEnabled(FALSE); // make it read-only but selectable + getChild<LLComboBox>("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this)); - // if floater is opened before login set default localized busy message + getChild<LLComboBox>("FriendIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"FriendIMOptions")); + getChild<LLComboBox>("NonFriendIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"NonFriendIMOptions")); + getChild<LLComboBox>("ConferenceIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"ConferenceIMOptions")); + getChild<LLComboBox>("GroupChatOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"GroupChatOptions")); + getChild<LLComboBox>("NearbyChatOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"NearbyChatOptions")); + + // if floater is opened before login set default localized do not disturb message if (LLStartUp::getStartupState() < STATE_STARTED) { - gSavedPerAccountSettings.setString("BusyModeResponse", LLTrans::getString("BusyModeResponseDefault")); + gSavedPerAccountSettings.setString("DoNotDisturbModeResponse", LLTrans::getString("DoNotDisturbModeResponseDefault")); } + // set 'enable' property for 'Clear log...' button + changed(); + + LLLogChat::setSaveHistorySignal(boost::bind(&LLFloaterPreference::onLogChatHistorySaved, this)); + return TRUE; } -void LLFloaterPreference::onBusyResponseChanged() +void LLFloaterPreference::updateDeleteTranscriptsButton() { - // set "BusyResponseChanged" TRUE if user edited message differs from default, FALSE otherwise - if (LLTrans::getString("BusyModeResponseDefault") != getChild<LLUICtrl>("busy_response")->getValue().asString()) - { - gSavedPerAccountSettings.setBOOL("BusyResponseChanged", TRUE ); - } - else - { - gSavedPerAccountSettings.setBOOL("BusyResponseChanged", FALSE ); - } + std::vector<std::string> list_of_transcriptions_file_names; + LLLogChat::getListOfTranscriptFiles(list_of_transcriptions_file_names); + getChild<LLButton>("delete_transcripts")->setEnabled(list_of_transcriptions_file_names.size() > 0); +} + +void LLFloaterPreference::onDoNotDisturbResponseChanged() +{ + // set "DoNotDisturbResponseChanged" TRUE if user edited message differs from default, FALSE otherwise + bool response_changed_flag = + LLTrans::getString("DoNotDisturbModeResponseDefault") + != getChild<LLUICtrl>("do_not_disturb_response")->getValue().asString(); + + gSavedPerAccountSettings.setBOOL("DoNotDisturbResponseChanged", response_changed_flag ); } LLFloaterPreference::~LLFloaterPreference() @@ -479,6 +492,8 @@ LLFloaterPreference::~LLFloaterPreference() { ctrl_window_size->setCurrentByIndex(i); } + + LLConversationLog::instance().removeObserver(this); } void LLFloaterPreference::draw() @@ -551,14 +566,8 @@ void LLFloaterPreference::apply() LLViewerMedia::setProxyConfig(proxy_enable, proxy_address, proxy_port); } -// LLWString busy_response = utf8str_to_wstring(getChild<LLUICtrl>("busy_response")->getValue().asString()); -// LLWStringUtil::replaceTabsWithSpaces(busy_response, 4); - - gSavedSettings.setBOOL("PlainTextChatHistory", getChild<LLUICtrl>("plain_text_chat_history")->getValue().asBoolean()); - if (mGotPersonalInfo) { -// gSavedSettings.setString("BusyModeResponse2", std::string(wstring_to_utf8str(busy_response))); bool new_im_via_email = getChild<LLUICtrl>("send_im_to_email")->getValue().asBoolean(); bool new_hide_online = getChild<LLUICtrl>("online_visibility")->getValue().asBoolean(); @@ -644,21 +653,21 @@ void LLFloaterPreference::cancel() void LLFloaterPreference::onOpen(const LLSD& key) { - // this variable and if that follows it are used to properly handle busy mode response message + // this variable and if that follows it are used to properly handle do not disturb mode response message static bool initialized = FALSE; - // if user is logged in and we haven't initialized busy_response yet, do it + // if user is logged in and we haven't initialized do not disturb mode response yet, do it if (!initialized && LLStartUp::getStartupState() == STATE_STARTED) { - // Special approach is used for busy response localization, because "BusyModeResponse" is + // Special approach is used for do not disturb response localization, because "DoNotDisturbModeResponse" is // in non-localizable xml, and also because it may be changed by user and in this case it shouldn't be localized. - // To keep track of whether busy response is default or changed by user additional setting BusyResponseChanged + // To keep track of whether do not disturb response is default or changed by user additional setting DoNotDisturbResponseChanged // was added into per account settings. // initialization should happen once,so setting variable to TRUE initialized = TRUE; - // this connection is needed to properly set "BusyResponseChanged" setting when user makes changes in - // busy response message. - gSavedPerAccountSettings.getControl("BusyModeResponse")->getSignal()->connect(boost::bind(&LLFloaterPreference::onBusyResponseChanged, this)); + // this connection is needed to properly set "DoNotDisturbResponseChanged" setting when user makes changes in + // do not disturb response message. + gSavedPerAccountSettings.getControl("DoNotDisturbModeResponse")->getSignal()->connect(boost::bind(&LLFloaterPreference::onDoNotDisturbResponseChanged, this)); } gAgent.sendAgentUserInfoRequest(); @@ -705,6 +714,14 @@ void LLFloaterPreference::onOpen(const LLSD& key) // while preferences floater was closed. buildPopupLists(); + + //get the options that were checked + onNotificationsChange("FriendIMOptions"); + onNotificationsChange("NonFriendIMOptions"); + onNotificationsChange("ConferenceIMOptions"); + onNotificationsChange("GroupChatOptions"); + onNotificationsChange("NearbyChatOptions"); + LLPanelLogin::setAlwaysRefresh(true); refresh(); @@ -720,12 +737,12 @@ void LLFloaterPreference::onVertexShaderEnable() } //static -void LLFloaterPreference::initBusyResponse() +void LLFloaterPreference::initDoNotDisturbResponse() { - if (!gSavedPerAccountSettings.getBOOL("BusyResponseChanged")) + if (!gSavedPerAccountSettings.getBOOL("DoNotDisturbResponseChanged")) { - //LLTrans::getString("BusyModeResponseDefault") is used here for localization (EXT-5885) - gSavedPerAccountSettings.setString("BusyModeResponse", LLTrans::getString("BusyModeResponseDefault")); + //LLTrans::getString("DoNotDisturbModeResponseDefault") is used here for localization (EXT-5885) + gSavedPerAccountSettings.setString("DoNotDisturbModeResponse", LLTrans::getString("DoNotDisturbModeResponseDefault")); } } @@ -750,7 +767,10 @@ void LLFloaterPreference::onClose(bool app_quitting) { gSavedSettings.setS32("LastPrefTab", getChild<LLTabContainer>("pref core")->getCurrentPanelIndex()); LLPanelLogin::setAlwaysRefresh(false); - cancel(); + if (!app_quitting) + { + cancel(); + } } void LLFloaterPreference::onOpenHardwareSettings() @@ -777,8 +797,31 @@ void LLFloaterPreference::onBtnOK() apply(); closeFloater(false); + //Conversation transcript and log path changed so reload conversations based on new location + if(mPriorInstantMessageLogPath.length()) + { + if(moveTranscriptsAndLog()) + { + //When floaters are empty but have a chat history files, reload chat history into them + LLFloaterIMSessionTab::reloadEmptyFloaters(); + } + //Couldn't move files so restore the old path and show a notification + else + { + gSavedPerAccountSettings.setString("InstantMessageLogPath", mPriorInstantMessageLogPath); + LLNotificationsUtil::add("PreferenceChatPathChanged"); + } + mPriorInstantMessageLogPath.clear(); + } + LLUIColorTable::instance().saveUserSettings(); gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); + + //Only save once logged in and loaded per account settings + if(mGotPersonalInfo) + { + gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); + } } else { @@ -831,12 +874,12 @@ void LLFloaterPreference::onBtnCancel() } // static -void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_via_email, const std::string& email) +void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_via_email) { LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences"); if (instance) { - instance->setPersonalInfo(visibility, im_via_email, email); + instance->setPersonalInfo(visibility, im_via_email); } } @@ -878,6 +921,23 @@ void LLFloaterPreference::onLanguageChange() } } +void LLFloaterPreference::onNotificationsChange(const std::string& OptionName) +{ + mNotificationOptions[OptionName] = getChild<LLComboBox>(OptionName)->getSelectedItemLabel(); + + bool show_notifications_alert = true; + for (notifications_map::iterator it_notification = mNotificationOptions.begin(); it_notification != mNotificationOptions.end(); it_notification++) + { + if(it_notification->second != "None") + { + show_notifications_alert = false; + break; + } + } + + getChild<LLTextBox>("notifications_alert")->setVisible(show_notifications_alert); +} + void LLFloaterPreference::onNameTagOpacityChange(const LLSD& newvalue) { LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>("background"); @@ -1399,17 +1459,94 @@ void LLFloaterPreference::setAllIgnored() void LLFloaterPreference::onClickLogPath() { std::string proposed_name(gSavedPerAccountSettings.getString("InstantMessageLogPath")); + mPriorInstantMessageLogPath.clear(); LLDirPicker& picker = LLDirPicker::instance(); + //Launches a directory picker and waits for feedback if (!picker.getDir(&proposed_name ) ) { return; //Canceled! } - gSavedPerAccountSettings.setString("InstantMessageLogPath", picker.getDirName()); + //Gets the path from the directory picker + std::string dir_name = picker.getDirName(); + + //Path changed + if(proposed_name != dir_name) + { + gSavedPerAccountSettings.setString("InstantMessageLogPath", dir_name); + mPriorInstantMessageLogPath = proposed_name; + + // enable/disable 'Delete transcripts button + updateDeleteTranscriptsButton(); +} } -void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email) +bool LLFloaterPreference::moveTranscriptsAndLog() +{ + std::string instantMessageLogPath(gSavedPerAccountSettings.getString("InstantMessageLogPath")); + std::string chatLogPath = gDirUtilp->add(instantMessageLogPath, gDirUtilp->getUserName()); + + bool madeDirectory = false; + + //Does the directory really exist, if not then make it + if(!LLFile::isdir(chatLogPath)) + { + //mkdir success is defined as zero + if(LLFile::mkdir(chatLogPath) != 0) + { + return false; + } + madeDirectory = true; + } + + std::string originalConversationLogDir = LLConversationLog::instance().getFileName(); + std::string targetConversationLogDir = gDirUtilp->add(chatLogPath, "conversation.log"); + //Try to move the conversation log + if(!LLConversationLog::instance().moveLog(originalConversationLogDir, targetConversationLogDir)) + { + //Couldn't move the log and created a new directory so remove the new directory + if(madeDirectory) + { + LLFile::rmdir(chatLogPath); + } + return false; + } + + //Attempt to move transcripts + std::vector<std::string> listOfTranscripts; + std::vector<std::string> listOfFilesMoved; + + LLLogChat::getListOfTranscriptFiles(listOfTranscripts); + + if(!LLLogChat::moveTranscripts(gDirUtilp->getChatLogsDir(), + instantMessageLogPath, + listOfTranscripts, + listOfFilesMoved)) + { + //Couldn't move all the transcripts so restore those that moved back to their old location + LLLogChat::moveTranscripts(instantMessageLogPath, + gDirUtilp->getChatLogsDir(), + listOfFilesMoved); + + //Move the conversation log back + LLConversationLog::instance().moveLog(targetConversationLogDir, originalConversationLogDir); + + if(madeDirectory) + { + LLFile::rmdir(chatLogPath); + } + + return false; + } + + gDirUtilp->setChatLogsDir(instantMessageLogPath); + gDirUtilp->updatePerAccountChatLogsDir(); + + return true; +} + +void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im_via_email) { mGotPersonalInfo = true; mOriginalIMViaEmail = im_via_email; @@ -1431,37 +1568,14 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im } getChild<LLUICtrl>("online_searchresults")->setEnabled(TRUE); - - getChildView("include_im_in_chat_history")->setEnabled(TRUE); - getChildView("show_timestamps_check_im")->setEnabled(TRUE); getChildView("friends_online_notify_checkbox")->setEnabled(TRUE); - getChild<LLUICtrl>("online_visibility")->setValue(mOriginalHideOnlineStatus); getChild<LLUICtrl>("online_visibility")->setLabelArg("[DIR_VIS]", mDirectoryVisibility); getChildView("send_im_to_email")->setEnabled(TRUE); getChild<LLUICtrl>("send_im_to_email")->setValue(im_via_email); - getChildView("plain_text_chat_history")->setEnabled(TRUE); - getChild<LLUICtrl>("plain_text_chat_history")->setValue(gSavedSettings.getBOOL("PlainTextChatHistory")); - getChildView("log_instant_messages")->setEnabled(TRUE); -// getChildView("log_chat")->setEnabled(TRUE); -// getChildView("busy_response")->setEnabled(TRUE); -// getChildView("log_instant_messages_timestamp")->setEnabled(TRUE); -// getChildView("log_chat_timestamp")->setEnabled(TRUE); - getChildView("log_chat_IM")->setEnabled(TRUE); - getChildView("log_date_timestamp")->setEnabled(TRUE); - -// getChild<LLUICtrl>("busy_response")->setValue(gSavedSettings.getString("BusyModeResponse2")); - getChildView("favorites_on_login_check")->setEnabled(TRUE); - getChildView("log_nearby_chat")->setEnabled(TRUE); - getChildView("log_instant_messages")->setEnabled(TRUE); - getChildView("show_timestamps_check_im")->setEnabled(TRUE); - getChildView("log_path_string")->setEnabled(FALSE);// LineEditor becomes readonly in this case. getChildView("log_path_button")->setEnabled(TRUE); - childEnable("logfile_name_datestamp"); - std::string display_email(email); - getChild<LLUICtrl>("email_address")->setValue(display_email); - + getChildView("chat_font_size")->setEnabled(TRUE); } void LLFloaterPreference::onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name) @@ -1523,7 +1637,8 @@ void LLFloaterPreference::onChangeMaturity() // but the UI for this will still be enabled void LLFloaterPreference::onClickBlockList() { - LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD()); + LLFloaterSidePanelContainer::showPanel("people", "panel_people", + LLSD().with("people_panel_tab_name", "blocked_panel")); } void LLFloaterPreference::onClickProxySettings() @@ -1551,6 +1666,33 @@ void LLFloaterPreference::onClickActionChange() mClickActionDirty = true; } +void LLFloaterPreference::onDeleteTranscripts() +{ + LLSD args; + args["FOLDER"] = gDirUtilp->getUserName(); + + LLNotificationsUtil::add("PreferenceChatDeleteTranscripts", args, LLSD(), boost::bind(&LLFloaterPreference::onDeleteTranscriptsResponse, this, _1, _2)); +} + +void LLFloaterPreference::onDeleteTranscriptsResponse(const LLSD& notification, const LLSD& response) +{ + if (0 == LLNotificationsUtil::getSelectedOption(notification, response)) + { + LLLogChat::deleteTranscripts(); + updateDeleteTranscriptsButton(); + } +} + +void LLFloaterPreference::onLogChatHistorySaved() +{ + LLButton * delete_transcripts_buttonp = getChild<LLButton>("delete_transcripts"); + + if (!delete_transcripts_buttonp->getEnabled()) + { + delete_transcripts_buttonp->setEnabled(true); + } +} + void LLFloaterPreference::updateClickActionSettings() { const int single_clk_action = getChild<LLComboBox>("single_click_action_combo")->getValue().asInteger(); @@ -1589,6 +1731,35 @@ void LLFloaterPreference::setCacheLocation(const LLStringExplicit& location) cache_location_editor->setToolTip(location); } +void LLFloaterPreference::selectPanel(const LLSD& name) +{ + LLTabContainer * tab_containerp = getChild<LLTabContainer>("pref core"); + LLPanel * panel = tab_containerp->getPanelByName(name); + if (NULL != panel) + { + tab_containerp->selectTabPanel(panel); + } +} + +void LLFloaterPreference::selectPrivacyPanel() +{ + selectPanel("im"); +} + +void LLFloaterPreference::selectChatPanel() +{ + selectPanel("chat"); +} + +void LLFloaterPreference::changed() +{ + getChild<LLButton>("clear_log")->setEnabled(LLConversationLog::instance().getConversations().size() > 0); + + // set 'enable' property for 'Delete transcripts...' button + updateDeleteTranscriptsButton(); + +} + //------------------------------Updater--------------------------------------- static bool handleBandwidthChanged(const LLSD& newvalue) @@ -1647,6 +1818,17 @@ LLPanelPreference::LLPanelPreference() //virtual BOOL LLPanelPreference::postBuild() { + ////////////////////// PanelGeneral /////////////////// + if (hasChild("display_names_check")) + { + BOOL use_people_api = gSavedSettings.getBOOL("UsePeopleAPI"); + LLCheckBoxCtrl* ctrl_display_name = getChild<LLCheckBoxCtrl>("display_names_check"); + ctrl_display_name->setEnabled(use_people_api); + if (!use_people_api) + { + ctrl_display_name->setValue(FALSE); + } + } ////////////////////// PanelVoice /////////////////// if (hasChild("voice_unavailable")) @@ -1671,12 +1853,6 @@ BOOL LLPanelPreference::postBuild() } - if (hasChild("online_visibility") && hasChild("send_im_to_email")) - { - getChild<LLUICtrl>("email_address")->setValue(getString("log_in_to_change") ); -// getChild<LLUICtrl>("busy_response")->setValue(getString("log_in_to_change")); - } - //////////////////////PanelPrivacy /////////////////// if (hasChild("media_enabled")) { @@ -1698,7 +1874,7 @@ BOOL LLPanelPreference::postBuild() getChild<LLCheckBoxCtrl>("favorites_on_login_check")->setCommitCallback(boost::bind(&showFavoritesOnLoginWarning, _1, _2)); } - // Panel Advanced + //////////////////////PanelAdvanced /////////////////// if (hasChild("modifier_combo")) { //localizing if push2talk button is set to middle mouse @@ -1853,7 +2029,7 @@ public: for (control_values_map_t::iterator it = mSavedValues.begin(); it != mSavedValues.end(); ) { const std::string setting = it->first->getName(); - if (std::find(mAccountIndependentSettings.begin(), + if (find(mAccountIndependentSettings.begin(), mAccountIndependentSettings.end(), setting) == mAccountIndependentSettings.end()) { mSavedValues.erase(it++); @@ -2142,4 +2318,4 @@ void LLFloaterPreferenceProxy::onChangeSocksSettings() otherHttpProxy->selectFirstItem(); } -}; +} diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index b71f7c647b..22e80a21cb 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -35,7 +35,9 @@ #include "llfloater.h" #include "llavatarpropertiesprocessor.h" +#include "llconversationlog.h" +class LLConversationLogObserver; class LLPanelPreference; class LLPanelLCD; class LLPanelDebug; @@ -45,6 +47,8 @@ class LLSliderCtrl; class LLSD; class LLTextBox; +typedef std::map<std::string, std::string> notifications_map; + typedef enum { GS_LOW_GRAPHICS, @@ -56,7 +60,7 @@ typedef enum // Floater to control preferences (display, audio, bandwidth, general. -class LLFloaterPreference : public LLFloater, public LLAvatarPropertiesObserver +class LLFloaterPreference : public LLFloater, public LLAvatarPropertiesObserver, public LLConversationLogObserver { public: LLFloaterPreference(const LLSD& key); @@ -68,20 +72,24 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); + /*virtual*/ void changed(); + /*virtual*/ void changed(const LLUUID& session_id, U32 mask) {}; // static data update, called from message handler - static void updateUserInfo(const std::string& visibility, bool im_via_email, const std::string& email); + static void updateUserInfo(const std::string& visibility, bool im_via_email); // refresh all the graphics preferences menus static void refreshEnabledGraphics(); - // translate user's busy response message according to current locale if message is default, otherwise do nothing - static void initBusyResponse(); + // translate user's do not disturb response message according to current locale if message is default, otherwise do nothing + static void initDoNotDisturbResponse(); void processProperties( void* pData, EAvatarProcessorType type ); void processProfileProperties(const LLAvatarData* pAvatarData ); void storeAvatarProperties( const LLAvatarData* pAvatarData ); void saveAvatarProperties( void ); + void selectPrivacyPanel(); + void selectChatPanel(); protected: void onBtnOK(); @@ -91,11 +99,12 @@ protected: void onClickClearCache(); // Clear viewer texture cache, vfs, and VO cache on next startup void onClickBrowserClearCache(); // Clear web history and caches as well as viewer caches above void onLanguageChange(); + void onNotificationsChange(const std::string& OptionName); void onNameTagOpacityChange(const LLSD& newvalue); - // set value of "BusyResponseChanged" in account settings depending on whether busy response + // set value of "DoNotDisturbResponseChanged" in account settings depending on whether do not disturb response // string differs from default after user changes. - void onBusyResponseChanged(); + void onDoNotDisturbResponseChanged(); // if the custom settings box is clicked void onChangeCustom(); void updateMeterText(LLUICtrl* ctrl); @@ -129,15 +138,14 @@ public: void setKey(KEY key); void onClickSetMiddleMouse(); void onClickSetSounds(); -// void onClickSkipDialogs(); -// void onClickResetDialogs(); void onClickEnablePopup(); void onClickDisablePopup(); void resetAllIgnored(); void setAllIgnored(); - void onClickLogPath(); + void onClickLogPath(); + bool moveTranscriptsAndLog(); void enableHistory(); - void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email); + void setPersonalInfo(const std::string& visibility, bool im_via_email); void refreshEnabledState(); void disableUnavailableSettings(); void onCommitWindowedMode(); @@ -161,16 +169,25 @@ public: void onClickSpellChecker(); void applyUIColor(LLUICtrl* ctrl, const LLSD& param); void getUIColor(LLUICtrl* ctrl, const LLSD& param); - + void onLogChatHistorySaved(); void buildPopupLists(); static void refreshSkin(void* data); + void selectPanel(const LLSD& name); + private: + + void onDeleteTranscripts(); + void onDeleteTranscriptsResponse(const LLSD& notification, const LLSD& response); + void updateDeleteTranscriptsButton(); + static std::string sSkin; + notifications_map mNotificationOptions; bool mClickActionDirty; ///< Set to true when the click/double-click options get changed by user. bool mGotPersonalInfo; bool mOriginalIMViaEmail; bool mLanguageChanged; bool mAvatarDataInitialized; + std::string mPriorInstantMessageLogPath; bool mOriginalHideOnlineStatus; std::string mDirectoryVisibility; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 17850ff35d..e6b76159a1 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -287,8 +287,7 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) //dispatch the message dispatch.dispatch(request, invoice, strings); - LLViewerRegion* region = gAgent.getRegion(); - panel->updateControls(region); + panel->updateControls(gAgent.getRegion()); } @@ -648,8 +647,10 @@ void LLPanelRegionGeneralInfo::onClickKick() // this depends on the grandparent view being a floater // in order to set up floater dependency + LLView * button = findChild<LLButton>("kick_btn"); LLFloater* parent_floater = gFloaterView->getParentFloater(this); - LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionGeneralInfo::onKickCommit, this, _1), FALSE, TRUE); + LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionGeneralInfo::onKickCommit, this, _1), + FALSE, TRUE, FALSE, parent_floater->getName(), button); if (child_floater) { parent_floater->addDependentFloater(child_floater); @@ -925,7 +926,14 @@ BOOL LLPanelRegionDebugInfo::sendUpdate() void LLPanelRegionDebugInfo::onClickChooseAvatar() { - LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionDebugInfo::callbackAvatarID, this, _1, _2), FALSE, TRUE); + LLView * button = findChild<LLButton>("choose_avatar_btn"); + LLFloater* parent_floater = gFloaterView->getParentFloater(this); + LLFloater * child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionDebugInfo::callbackAvatarID, this, _1, _2), + FALSE, TRUE, FALSE, parent_floater->getName(), button); + if (child_floater) + { + parent_floater->addDependentFloater(child_floater); + } } @@ -1471,8 +1479,10 @@ void LLPanelEstateInfo::onClickKickUser() { // this depends on the grandparent view being a floater // in order to set up floater dependency + LLView * button = findChild<LLButton>("kick_user_from_estate_btn"); LLFloater* parent_floater = gFloaterView->getParentFloater(this); - LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::onKickUserCommit, this, _1), FALSE, TRUE); + LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::onKickUserCommit, this, _1), + FALSE, TRUE, FALSE, parent_floater->getName(), button); if (child_floater) { parent_floater->addDependentFloater(child_floater); @@ -1647,8 +1657,39 @@ bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& res } LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo(notification["payload"]); + //Get parent floater name + LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); + LLFloater* parent_floater = panel ? gFloaterView->getParentFloater(panel) : NULL; + const std::string& parent_floater_name = parent_floater ? parent_floater->getName() : ""; + + //Determine the button that triggered opening of the avatar picker + //(so that a shadow frustum from the button to the avatar picker can be created) + LLView * button = NULL; + switch(change_info->mOperationFlag) + { + case ESTATE_ACCESS_ALLOWED_AGENT_ADD: + button = panel->findChild<LLButton>("add_allowed_avatar_btn"); + break; + + case ESTATE_ACCESS_BANNED_AGENT_ADD: + button = panel->findChild<LLButton>("add_banned_avatar_btn"); + break; + + case ESTATE_ACCESS_MANAGER_ADD: + button = panel->findChild<LLButton>("add_estate_manager_btn"); + break; + } + // avatar picker yes multi-select, yes close-on-select - LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::accessAddCore3, _1, (void*)change_info), TRUE, TRUE); + LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::accessAddCore3, _1, (void*)change_info), + TRUE, TRUE, FALSE, parent_floater_name, button); + + //Allows the closed parent floater to close the child floater (avatar picker) + if (child_floater) + { + parent_floater->addDependentFloater(child_floater); + } + return false; } @@ -1924,10 +1965,18 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region) BOOL manager = (region && region->isEstateManager()); setCtrlsEnabled(god || owner || manager); + BOOL has_allowed_avatar = getChild<LLNameListCtrl>("allowed_avatar_name_list")->getFirstSelected() ? TRUE : FALSE; + BOOL has_allowed_group = getChild<LLNameListCtrl>("allowed_group_name_list")->getFirstSelected() ? TRUE : FALSE; + BOOL has_banned_agent = getChild<LLNameListCtrl>("banned_avatar_name_list")->getFirstSelected() ? TRUE : FALSE; + BOOL has_estate_manager = getChild<LLNameListCtrl>("estate_manager_name_list")->getFirstSelected() ? TRUE : FALSE; + getChildView("add_allowed_avatar_btn")->setEnabled(god || owner || manager); - getChildView("remove_allowed_avatar_btn")->setEnabled(god || owner || manager); + getChildView("remove_allowed_avatar_btn")->setEnabled(has_allowed_avatar && (god || owner || manager)); + getChildView("allowed_avatar_name_list")->setEnabled(god || owner || manager); + getChildView("add_allowed_group_btn")->setEnabled(god || owner || manager); - getChildView("remove_allowed_group_btn")->setEnabled(god || owner || manager); + getChildView("remove_allowed_group_btn")->setEnabled(has_allowed_group && (god || owner || manager) ); + getChildView("allowed_group_name_list")->setEnabled(god || owner || manager); // Can't ban people from mainland, orientation islands, etc. because this // creates much network traffic and server load. @@ -1935,14 +1984,15 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region) bool linden_estate = isLindenEstate(); bool enable_ban = (god || owner || manager) && !linden_estate; getChildView("add_banned_avatar_btn")->setEnabled(enable_ban); - getChildView("remove_banned_avatar_btn")->setEnabled(enable_ban); + getChildView("remove_banned_avatar_btn")->setEnabled(has_banned_agent && enable_ban); + getChildView("banned_avatar_name_list")->setEnabled(god || owner || manager); getChildView("message_estate_btn")->setEnabled(god || owner || manager); getChildView("kick_user_from_estate_btn")->setEnabled(god || owner || manager); // estate managers can't add estate managers getChildView("add_estate_manager_btn")->setEnabled(god || owner); - getChildView("remove_estate_manager_btn")->setEnabled(god || owner); + getChildView("remove_estate_manager_btn")->setEnabled(has_estate_manager && (god || owner)); getChildView("estate_manager_name_list")->setEnabled(god || owner); refresh(); @@ -1979,10 +2029,8 @@ bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region) void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl) { - if (checkRemovalButton(child_ctrl->getName())) - { - // do nothing - } + // Ensure appropriate state of the management ui. + updateControls(gAgent.getRegion()); } bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg) @@ -2080,23 +2128,8 @@ void LLPanelEstateInfo::refreshFromEstate() getChild<LLUICtrl>("limit_payment")->setValue(estate_info.getDenyAnonymous()); getChild<LLUICtrl>("limit_age_verified")->setValue(estate_info.getDenyAgeUnverified()); - // If visible from mainland, disable the access allowed - // UI, as anyone can teleport there. - // However, gods need to be able to edit the access list for - // linden estates, regardless of visibility, to allow object - // and L$ transfers. - { - bool visible_from_mainland = estate_info.getIsExternallyVisible(); - bool god = gAgent.isGodlike(); - bool linden_estate = isLindenEstate(); - - bool enable_agent = (!visible_from_mainland || (god && linden_estate)); - bool enable_group = enable_agent; - bool enable_ban = !linden_estate; - - setAccessAllowedEnabled(enable_agent, enable_group, enable_ban); - } - + // Ensure appriopriate state of the management UI + updateControls(gAgent.getRegion()); refresh(); } @@ -2225,47 +2258,6 @@ void LLPanelEstateInfo::setOwnerName(const std::string& name) getChild<LLUICtrl>("estate_owner")->setValue(LLSD(name)); } -void LLPanelEstateInfo::setAccessAllowedEnabled(bool enable_agent, - bool enable_group, - bool enable_ban) -{ - getChildView("allow_resident_label")->setEnabled(enable_agent); - getChildView("allowed_avatar_name_list")->setEnabled(enable_agent); - getChildView("allowed_avatar_name_list")->setVisible( enable_agent); - getChildView("add_allowed_avatar_btn")->setEnabled(enable_agent); - getChildView("remove_allowed_avatar_btn")->setEnabled(enable_agent); - - // Groups - getChildView("allow_group_label")->setEnabled(enable_group); - getChildView("allowed_group_name_list")->setEnabled(enable_group); - getChildView("allowed_group_name_list")->setVisible( enable_group); - getChildView("add_allowed_group_btn")->setEnabled(enable_group); - getChildView("remove_allowed_group_btn")->setEnabled(enable_group); - - // Ban - getChildView("ban_resident_label")->setEnabled(enable_ban); - getChildView("banned_avatar_name_list")->setEnabled(enable_ban); - getChildView("banned_avatar_name_list")->setVisible( enable_ban); - getChildView("add_banned_avatar_btn")->setEnabled(enable_ban); - getChildView("remove_banned_avatar_btn")->setEnabled(enable_ban); - - // Update removal buttons if needed - if (enable_agent) - { - checkRemovalButton("allowed_avatar_name_list"); - } - - if (enable_group) - { - checkRemovalButton("allowed_group_name_list"); - } - - if (enable_ban) - { - checkRemovalButton("banned_avatar_name_list"); - } -} - void LLPanelEstateInfo::clearAccessLists() { LLNameListCtrl* name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list"); @@ -2279,39 +2271,7 @@ void LLPanelEstateInfo::clearAccessLists() { name_list->deleteAllItems(); } -} - -// enables/disables the "remove" button for the various allow/ban lists -BOOL LLPanelEstateInfo::checkRemovalButton(std::string name) -{ - std::string btn_name = ""; - if (name == "allowed_avatar_name_list") - { - btn_name = "remove_allowed_avatar_btn"; - } - else if (name == "allowed_group_name_list") - { - btn_name = "remove_allowed_group_btn"; - } - else if (name == "banned_avatar_name_list") - { - btn_name = "remove_banned_avatar_btn"; - } - else if (name == "estate_manager_name_list") - { - //ONLY OWNER CAN ADD /DELET ESTATE MANAGER - LLViewerRegion* region = gAgent.getRegion(); - if (region && (region->getOwner() == gAgent.getID())) - { - btn_name = "remove_estate_manager_btn"; - } - } - - // enable the remove button if something is selected - LLNameListCtrl* name_list = getChild<LLNameListCtrl>(name); - getChildView(btn_name)->setEnabled(name_list && name_list->getFirstSelected() ? TRUE : FALSE); - - return (btn_name != ""); + updateControls(gAgent.getRegion()); } // static @@ -2792,15 +2752,15 @@ bool LLDispatchSetEstateAccess::operator()( if (allowed_agent_name_list) { - //allowed_agent_name_list->deleteAllItems(); + // Don't sort these as we add them, sort them when we are done. + allowed_agent_name_list->clearSortOrder(); for (S32 i = 0; i < num_allowed_agents && i < ESTATE_MAX_ACCESS_IDS; i++) { LLUUID id; memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ allowed_agent_name_list->addNameItem(id); } - panel->getChildView("remove_allowed_avatar_btn")->setEnabled(allowed_agent_name_list->getFirstSelected() ? TRUE : FALSE); - allowed_agent_name_list->sortByColumnIndex(0, TRUE); + allowed_agent_name_list->sortByName(TRUE); } } @@ -2817,6 +2777,8 @@ bool LLDispatchSetEstateAccess::operator()( if (allowed_group_name_list) { + // Don't sort these as we add them, sort them when we are done. + allowed_group_name_list->clearSortOrder(); allowed_group_name_list->deleteAllItems(); for (S32 i = 0; i < num_allowed_groups && i < ESTATE_MAX_GROUP_IDS; i++) { @@ -2824,8 +2786,7 @@ bool LLDispatchSetEstateAccess::operator()( memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ allowed_group_name_list->addGroupNameItem(id); } - panel->getChildView("remove_allowed_group_btn")->setEnabled(allowed_group_name_list->getFirstSelected() ? TRUE : FALSE); - allowed_group_name_list->sortByColumnIndex(0, TRUE); + allowed_group_name_list->sortByName(TRUE); } } @@ -2849,15 +2810,16 @@ bool LLDispatchSetEstateAccess::operator()( if (banned_agent_name_list) { - //banned_agent_name_list->deleteAllItems(); + // Don't sort these as we add them, sort them when we are done. + banned_agent_name_list->clearSortOrder(); + for (S32 i = 0; i < num_banned_agents && i < ESTATE_MAX_ACCESS_IDS; i++) { LLUUID id; memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ banned_agent_name_list->addNameItem(id); } - panel->getChildView("remove_banned_avatar_btn")->setEnabled(banned_agent_name_list->getFirstSelected() ? TRUE : FALSE); - banned_agent_name_list->sortByColumnIndex(0, TRUE); + banned_agent_name_list->sortByName(TRUE); } } @@ -2872,6 +2834,9 @@ bool LLDispatchSetEstateAccess::operator()( panel->getChild<LLNameListCtrl>("estate_manager_name_list"); if (estate_manager_name_list) { + // Don't sort these as we add them, sort them when we are done. + estate_manager_name_list->clearSortOrder(); + estate_manager_name_list->deleteAllItems(); // Clear existing entries // There should be only ESTATE_MAX_MANAGERS people in the list, but if the database gets more (SL-46107) don't @@ -2883,11 +2848,13 @@ bool LLDispatchSetEstateAccess::operator()( memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ estate_manager_name_list->addNameItem(id); } - panel->getChildView("remove_estate_manager_btn")->setEnabled(estate_manager_name_list->getFirstSelected() ? TRUE : FALSE); - estate_manager_name_list->sortByColumnIndex(0, TRUE); + estate_manager_name_list->sortByName(TRUE); } } + // Update the buttons which may change based on the list contents but also needs to account for general access features. + panel->updateControls(gAgent.getRegion()); + return true; } diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index e36ef4604b..f0499f1903 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -312,9 +312,6 @@ public: const std::string getOwnerName() const; void setOwnerName(const std::string& name); - // If visible from mainland, allowed agent and allowed groups - // are ignored, so must disable UI. - void setAccessAllowedEnabled(bool enable_agent, bool enable_group, bool enable_ban); protected: virtual BOOL sendUpdate(); // confirmation dialog callback @@ -324,7 +321,6 @@ protected: void commitEstateManagers(); void clearAccessLists(); - BOOL checkRemovalButton(std::string name); BOOL checkSunHourSlider(LLUICtrl* child_ctrl); U32 mEstateID; diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 3ec1e372eb..0e4c7406c5 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -103,7 +103,8 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key) mPicking( FALSE), mPosition(), mCopyrightWarningSeen( FALSE ), - mResourceDatap(new LLResourceData()) + mResourceDatap(new LLResourceData()), + mAvatarNameCacheConnection() { } @@ -187,6 +188,11 @@ BOOL LLFloaterReporter::postBuild() // virtual LLFloaterReporter::~LLFloaterReporter() { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + // child views automatically deleted mObjectID = LLUUID::null; @@ -285,10 +291,13 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id) void LLFloaterReporter::onClickSelectAbuser() { - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE ); + LLView * button = findChild<LLButton>("select_abuser", TRUE); + + LLFloater * root_floater = gFloaterView->getParentFloater(this); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE, FALSE, root_floater->getName(), button); if (picker) { - gFloaterView->getParentFloater(this)->addDependentFloater(picker); + root_floater->addDependentFloater(picker); } } @@ -310,11 +319,17 @@ void LLFloaterReporter::setFromAvatarID(const LLUUID& avatar_id) std::string avatar_link = LLSLURL("agent", mObjectID, "inspect").getSLURLString(); getChild<LLUICtrl>("owner_name")->setValue(avatar_link); - LLAvatarNameCache::get(avatar_id, boost::bind(&LLFloaterReporter::onAvatarNameCache, this, _1, _2)); + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(avatar_id, boost::bind(&LLFloaterReporter::onAvatarNameCache, this, _1, _2)); } void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name) { + mAvatarNameCacheConnection.disconnect(); + if (mObjectID == avatar_id) { mOwnerName = av_name.getCompleteName(); diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index 7d68431710..d54e7f6ab0 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -137,6 +137,7 @@ private: std::list<LLMeanCollisionData*> mMCDList; std::string mDefaultSummary; LLResourceData* mResourceDatap; + boost::signals2::connection mAvatarNameCacheConnection; }; #endif diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index a50907601c..8d8bba7b17 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -602,15 +602,7 @@ void LLPanelScriptLimitsRegionMemory::onNameCache( return; } - std::string name; - if (LLAvatarNameCache::useDisplayNames()) - { - name = LLCacheName::buildUsername(full_name); - } - else - { - name = full_name; - } + std::string name = LLCacheName::buildUsername(full_name); std::vector<LLSD>::iterator id_itor; for (id_itor = mObjectListItems.begin(); id_itor != mObjectListItems.end(); ++id_itor) @@ -713,10 +705,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) else { name_is_cached = gCacheName->getFullName(owner_id, owner_buf); // username - if (LLAvatarNameCache::useDisplayNames()) - { - owner_buf = LLCacheName::buildUsername(owner_buf); - } + owner_buf = LLCacheName::buildUsername(owner_buf); } if(!name_is_cached) { diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 64c0dfa023..0cb37dabe7 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -81,6 +81,7 @@ private: LLUUID mAuthorizedBuyer; bool mParcelSoldWithObjects; SelectionObserver mParcelSelectionObserver; + boost::signals2::connection mAvatarNameCacheConnection; void updateParcelInfo(); void refreshUI(); @@ -129,13 +130,18 @@ LLFloater* LLFloaterSellLand::buildFloater(const LLSD& key) LLFloaterSellLandUI::LLFloaterSellLandUI(const LLSD& key) : LLFloater(key), mParcelSelectionObserver(this), - mRegion(0) + mRegion(0), + mAvatarNameCacheConnection() { LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver); } LLFloaterSellLandUI::~LLFloaterSellLandUI() { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } LLViewerParcelMgr::getInstance()->removeObserver(&mParcelSelectionObserver); } @@ -230,15 +236,20 @@ void LLFloaterSellLandUI::updateParcelInfo() if(mSellToBuyer) { - LLAvatarNameCache::get(mAuthorizedBuyer, - boost::bind(&LLFloaterSellLandUI::onBuyerNameCache, this, _2)); + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(mAuthorizedBuyer, boost::bind(&LLFloaterSellLandUI::onBuyerNameCache, this, _2)); } } void LLFloaterSellLandUI::onBuyerNameCache(const LLAvatarName& av_name) { + mAvatarNameCacheConnection.disconnect(); + getChild<LLUICtrl>("sell_to_agent")->setValue(av_name.getCompleteName()); - getChild<LLUICtrl>("sell_to_agent")->setToolTip(av_name.mUsername); + getChild<LLUICtrl>("sell_to_agent")->setToolTip(av_name.getUserName()); } void LLFloaterSellLandUI::setBadge(const char* id, Badge badge) @@ -392,7 +403,8 @@ void LLFloaterSellLandUI::onChangeValue(LLUICtrl *ctrl, void *userdata) void LLFloaterSellLandUI::doSelectAgent() { - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), FALSE, TRUE); + LLView * button = findChild<LLView>("sell_to_select_agent"); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), FALSE, TRUE, FALSE, this->getName(), button); // grandparent is a floater, in order to set up dependency if (picker) { diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp index 5385977d95..96b5c6b09b 100644 --- a/indra/newview/llfloatersidepanelcontainer.cpp +++ b/indra/newview/llfloatersidepanelcontainer.cpp @@ -61,7 +61,7 @@ LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_na if (!getVisible()) { - openFloater(); + openFloater(); } LLPanel* panel = NULL; @@ -69,10 +69,7 @@ LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_na LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(view->getParent()); if (container) { - LLSD new_params = params; - new_params[LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME] = panel_name; - container->onOpen(new_params); - + container->openPanel(panel_name, params); panel = container->getCurrentPanel(); } else if ((panel = dynamic_cast<LLPanel*>(view)) != NULL) diff --git a/indra/newview/llfloatertexturefetchdebugger.cpp b/indra/newview/llfloatertexturefetchdebugger.cpp index 2b34b72055..9a23d99802 100644 --- a/indra/newview/llfloatertexturefetchdebugger.cpp +++ b/indra/newview/llfloatertexturefetchdebugger.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2007&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2012, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -59,12 +59,15 @@ LLFloaterTextureFetchDebugger::LLFloaterTextureFetchDebugger(const LLSD& key) mCommitCallbackRegistrar.add("TexFetchDebugger.RefetchVisCache", boost::bind(&LLFloaterTextureFetchDebugger::onClickRefetchVisCache, this)); mCommitCallbackRegistrar.add("TexFetchDebugger.RefetchVisHTTP", boost::bind(&LLFloaterTextureFetchDebugger::onClickRefetchVisHTTP, this)); + mCommitCallbackRegistrar.add("TexFetchDebugger.RefetchAllCache", boost::bind(&LLFloaterTextureFetchDebugger::onClickRefetchAllCache, this)); + mCommitCallbackRegistrar.add("TexFetchDebugger.RefetchAllHTTP", boost::bind(&LLFloaterTextureFetchDebugger::onClickRefetchAllHTTP, this)); } //---------------------------------------------- BOOL LLFloaterTextureFetchDebugger::postBuild(void) { mDebugger = LLAppViewer::getTextureFetch()->getFetchDebugger(); + mStartStatus = (S32)LLTextureFetchDebugger::IDLE; //set states for buttons mButtonStateMap["start_btn"] = true; @@ -76,8 +79,10 @@ BOOL LLFloaterTextureFetchDebugger::postBuild(void) mButtonStateMap["decode_btn"] = false; mButtonStateMap["gl_btn"] = false; - mButtonStateMap["refetchviscache_btn"] = true; - mButtonStateMap["refetchvishttp_btn"] = true; + mButtonStateMap["refetchviscache_btn"] = false; + mButtonStateMap["refetchvishttp_btn"] = false; + mButtonStateMap["refetchallcache_btn"] = false; + mButtonStateMap["refetchallhttp_btn"] = false; updateButtons(); @@ -89,7 +94,7 @@ BOOL LLFloaterTextureFetchDebugger::postBuild(void) LLFloaterTextureFetchDebugger::~LLFloaterTextureFetchDebugger() { //stop everything - mDebugger->stopDebug(); + mDebugger->setStopDebug(); } void LLFloaterTextureFetchDebugger::updateButtons() @@ -118,47 +123,81 @@ void LLFloaterTextureFetchDebugger::disableButtons() childDisable("gl_btn"); childDisable("refetchviscache_btn"); childDisable("refetchvishttp_btn"); + childDisable("refetchallcache_btn"); + childDisable("refetchallhttp_btn"); +} +void LLFloaterTextureFetchDebugger::setStartStatus(S32 status) +{ + llassert_always(LLTextureFetchDebugger::IDLE == (LLTextureFetchDebugger::e_debug_state)mStartStatus) ; + mStartStatus = status; +} + +bool LLFloaterTextureFetchDebugger::idleStart() +{ + if(mStartStatus != (S32)LLTextureFetchDebugger::IDLE) + { + mDebugger->startWork((LLTextureFetchDebugger::e_debug_state)mStartStatus); + mStartStatus = (S32)LLTextureFetchDebugger::IDLE; + return true; + } + + return false; } void LLFloaterTextureFetchDebugger::idle() { - LLTextureFetchDebugger::e_debug_state state = mDebugger->getState(); - - if(mDebugger->update()) + if(idleStart()) + { + return; + } + + const F32 max_time = 0.005f; //5ms + LLTextureFetchDebugger::e_debug_state state = mDebugger->getState(); + if(mDebugger->update(max_time)) { switch(state) { case LLTextureFetchDebugger::IDLE: break; - case LLTextureFetchDebugger::READ_CACHE: - mButtonStateMap["cachewrite_btn"] = true; - mButtonStateMap["decode_btn"] = true; - updateButtons(); + case LLTextureFetchDebugger::START_DEBUG: + mButtonStateMap["cacheread_btn"] = true; + mButtonStateMap["http_btn"] = true; + mButtonStateMap["refetchviscache_btn"] = true; + mButtonStateMap["refetchvishttp_btn"] = true; + mButtonStateMap["refetchallcache_btn"] = true; + mButtonStateMap["refetchallhttp_btn"] = true; break; - case LLTextureFetchDebugger::WRITE_CACHE: - updateButtons(); + case LLTextureFetchDebugger::READ_CACHE: + mButtonStateMap["decode_btn"] = true; + break; + case LLTextureFetchDebugger::WRITE_CACHE: break; case LLTextureFetchDebugger::DECODING: - mButtonStateMap["gl_btn"] = true; - updateButtons(); + mButtonStateMap["gl_btn"] = true; break; case LLTextureFetchDebugger::HTTP_FETCHING: mButtonStateMap["cacheread_btn"] = true; mButtonStateMap["cachewrite_btn"] = true; - mButtonStateMap["decode_btn"] = true; - updateButtons(); + mButtonStateMap["decode_btn"] = true; break; - case LLTextureFetchDebugger::GL_TEX: - updateButtons(); + case LLTextureFetchDebugger::GL_TEX: break; - case LLTextureFetchDebugger::REFETCH_VIS_CACHE: - updateButtons(); - case LLTextureFetchDebugger::REFETCH_VIS_HTTP: - updateButtons(); + case LLTextureFetchDebugger::REFETCH_VIS_CACHE: + break; + case LLTextureFetchDebugger::REFETCH_VIS_HTTP: + break; + case LLTextureFetchDebugger::REFETCH_ALL_CACHE: + break; + case LLTextureFetchDebugger::REFETCH_ALL_HTTP: break; default: break; } + + if(state != LLTextureFetchDebugger::IDLE) + { + updateButtons(); + } } } @@ -172,11 +211,10 @@ void LLFloaterTextureFetchDebugger::onClickStart() { disableButtons(); - mDebugger->startDebug(); + setStartStatus((S32)LLTextureFetchDebugger::START_DEBUG); mButtonStateMap["start_btn"] = false; - mButtonStateMap["cacheread_btn"] = true; - mButtonStateMap["http_btn"] = true; + updateButtons(); } @@ -185,7 +223,9 @@ void LLFloaterTextureFetchDebugger::onClickClose() setVisible(FALSE); //stop everything - mDebugger->stopDebug(); + mDebugger->setStopDebug(); + + delete this; } void LLFloaterTextureFetchDebugger::onClickClear() @@ -203,7 +243,7 @@ void LLFloaterTextureFetchDebugger::onClickClear() updateButtons(); //stop everything - mDebugger->stopDebug(); + mDebugger->setStopDebug(); mDebugger->clearHistory(); } @@ -211,49 +251,63 @@ void LLFloaterTextureFetchDebugger::onClickCacheRead() { disableButtons(); - mDebugger->debugCacheRead(); + setStartStatus((S32)LLTextureFetchDebugger::READ_CACHE); } void LLFloaterTextureFetchDebugger::onClickCacheWrite() { disableButtons(); - mDebugger->debugCacheWrite(); + setStartStatus((S32)LLTextureFetchDebugger::WRITE_CACHE); } void LLFloaterTextureFetchDebugger::onClickHTTPLoad() { disableButtons(); - mDebugger->debugHTTP(); + setStartStatus((S32)LLTextureFetchDebugger::HTTP_FETCHING); } void LLFloaterTextureFetchDebugger::onClickDecode() { disableButtons(); - mDebugger->debugDecoder(); + setStartStatus((S32)LLTextureFetchDebugger::DECODING); } void LLFloaterTextureFetchDebugger::onClickGLTexture() { disableButtons(); - mDebugger->debugGLTextureCreation(); + setStartStatus((S32)LLTextureFetchDebugger::GL_TEX); } void LLFloaterTextureFetchDebugger::onClickRefetchVisCache() { disableButtons(); - mDebugger->debugRefetchVisibleFromCache(); + setStartStatus((S32)LLTextureFetchDebugger::REFETCH_VIS_CACHE); } void LLFloaterTextureFetchDebugger::onClickRefetchVisHTTP() { disableButtons(); - mDebugger->debugRefetchVisibleFromHTTP(); + setStartStatus((S32)LLTextureFetchDebugger::REFETCH_VIS_HTTP); +} + +void LLFloaterTextureFetchDebugger::onClickRefetchAllCache() +{ + disableButtons(); + + setStartStatus((S32)LLTextureFetchDebugger::REFETCH_ALL_CACHE); +} + +void LLFloaterTextureFetchDebugger::onClickRefetchAllHTTP() +{ + disableButtons(); + + setStartStatus((S32)LLTextureFetchDebugger::REFETCH_ALL_HTTP); } void LLFloaterTextureFetchDebugger::draw() @@ -368,8 +422,22 @@ void LLFloaterTextureFetchDebugger::draw() else { getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getRefetchVisCacheTime())); - getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedData() >> 10)); - getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedPixels() / 1000000.f)); + getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedVisData() >> 10)); + getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedVisPixels() / 1000000.f)); + } + + //total time on refetching all textures from cache + if(mDebugger->getRefetchAllCacheTime() < 0.f) + { + getChild<LLUICtrl>("total_time_refetch_all_cache_label")->setTextArg("[TIME]", std::string("----")); + getChild<LLUICtrl>("total_time_refetch_all_cache_label")->setTextArg("[SIZE]", std::string("----")); + getChild<LLUICtrl>("total_time_refetch_all_cache_label")->setTextArg("[PIXEL]", std::string("----")); + } + else + { + getChild<LLUICtrl>("total_time_refetch_all_cache_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getRefetchAllCacheTime())); + getChild<LLUICtrl>("total_time_refetch_all_cache_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedAllData() >> 10)); + getChild<LLUICtrl>("total_time_refetch_all_cache_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedAllPixels() / 1000000.f)); } //total time on refetching visible textures from http @@ -382,8 +450,22 @@ void LLFloaterTextureFetchDebugger::draw() else { getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getRefetchVisHTTPTime())); - getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedData() >> 10)); - getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedPixels() / 1000000.f)); + getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedVisData() >> 10)); + getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedVisPixels() / 1000000.f)); + } + + //total time on refetching all textures from http + if(mDebugger->getRefetchAllHTTPTime() < 0.f) + { + getChild<LLUICtrl>("total_time_refetch_all_http_label")->setTextArg("[TIME]", std::string("----")); + getChild<LLUICtrl>("total_time_refetch_all_http_label")->setTextArg("[SIZE]", std::string("----")); + getChild<LLUICtrl>("total_time_refetch_all_http_label")->setTextArg("[PIXEL]", std::string("----")); + } + else + { + getChild<LLUICtrl>("total_time_refetch_all_http_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getRefetchAllHTTPTime())); + getChild<LLUICtrl>("total_time_refetch_all_http_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedAllData() >> 10)); + getChild<LLUICtrl>("total_time_refetch_all_http_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedAllPixels() / 1000000.f)); } LLFloater::draw(); diff --git a/indra/newview/llfloatertexturefetchdebugger.h b/indra/newview/llfloatertexturefetchdebugger.h index 33012c6a3d..096ad88e07 100644 --- a/indra/newview/llfloatertexturefetchdebugger.h +++ b/indra/newview/llfloatertexturefetchdebugger.h @@ -53,6 +53,8 @@ public: void onClickRefetchVisCache(); void onClickRefetchVisHTTP(); + void onClickRefetchAllCache(); + void onClickRefetchAllHTTP(); public: void idle() ; @@ -63,9 +65,12 @@ private: void updateButtons(); void disableButtons(); + void setStartStatus(S32 status); + bool idleStart(); private: LLTextureFetchDebugger* mDebugger; std::map<std::string, bool> mButtonStateMap; + S32 mStartStatus; }; #endif // LL_FLOATER_TEXTURE_FETCH_DEBUGGER__H diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 48484786f6..14923eec3c 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -657,8 +657,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) mBtnEdit ->setToggleState( edit_visible ); mRadioGroupEdit->setVisible( edit_visible ); - bool linked_parts = gSavedSettings.getBOOL("EditLinkedParts"); - getChildView("RenderingCost")->setVisible( !linked_parts && (edit_visible || focus_visible || move_visible) && sShowObjectCost); + //bool linked_parts = gSavedSettings.getBOOL("EditLinkedParts"); + //getChildView("RenderingCost")->setVisible( !linked_parts && (edit_visible || focus_visible || move_visible) && sShowObjectCost); mBtnLink->setVisible(edit_visible); mBtnUnlink->setVisible(edit_visible); @@ -1055,6 +1055,17 @@ void commit_grid_mode(LLUICtrl *ctrl) LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex()); } +// static +void LLFloaterTools::setGridMode(S32 mode) +{ + LLFloaterTools* tools_floater = LLFloaterReg::getTypedInstance<LLFloaterTools>("build"); + if (!tools_floater || !tools_floater->mComboGridMode) + { + return; + } + + tools_floater->mComboGridMode->setCurrentByIndex(mode); +} void LLFloaterTools::onClickGridOptions() { diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 7a19d093a4..ecb0092a6f 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -107,6 +107,8 @@ public: bool selectedMediaEditable(); void updateLandImpacts(); + static void setGridMode(S32 mode); + private: void refresh(); void refreshMedia(); diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index 87d048c15b..7530c72dd2 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -82,6 +82,7 @@ LLFloaterTopObjects::LLFloaterTopObjects(const LLSD& key) mCommitCallbackRegistrar.add("TopObjects.Refresh", boost::bind(&LLFloaterTopObjects::onRefresh, this)); mCommitCallbackRegistrar.add("TopObjects.GetByObjectName", boost::bind(&LLFloaterTopObjects::onGetByObjectName, this)); mCommitCallbackRegistrar.add("TopObjects.GetByOwnerName", boost::bind(&LLFloaterTopObjects::onGetByOwnerName, this)); + mCommitCallbackRegistrar.add("TopObjects.GetByParcelName", boost::bind(&LLFloaterTopObjects::onGetByParcelName, this)); mCommitCallbackRegistrar.add("TopObjects.CommitObjectsList",boost::bind(&LLFloaterTopObjects::onCommitObjectsList, this)); } @@ -99,21 +100,6 @@ BOOL LLFloaterTopObjects::postBuild() setDefaultBtn("show_beacon_btn"); - /* - LLLineEditor* line_editor = getChild<LLLineEditor>("owner_name_editor"); - if (line_editor) - { - line_editor->setCommitOnFocusLost(FALSE); - line_editor->setCommitCallback(onGetByOwnerName, this); - } - - line_editor = getChild<LLLineEditor>("object_name_editor"); - if (line_editor) - { - line_editor->setCommitOnFocusLost(FALSE); - line_editor->setCommitCallback(onGetByObjectName, this); - }*/ - mCurrentMode = STAT_REPORT_TOP_SCRIPTS; mFlags = 0; mFilter.clear(); @@ -168,9 +154,11 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) F32 score; std::string name_buf; std::string owner_buf; + std::string parcel_buf("unknown"); F32 mono_score = 0.f; bool have_extended_data = false; S32 public_urls = 0; + F32 script_memory = 0.f; msg->getU32Fast(_PREHASH_ReportData, _PREHASH_TaskLocalID, task_local_id, block); msg->getUUIDFast(_PREHASH_ReportData, _PREHASH_TaskID, task_id, block); @@ -180,12 +168,18 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) msg->getF32Fast(_PREHASH_ReportData, _PREHASH_Score, score, block); msg->getStringFast(_PREHASH_ReportData, _PREHASH_TaskName, name_buf, block); msg->getStringFast(_PREHASH_ReportData, _PREHASH_OwnerName, owner_buf, block); + if(msg->has("DataExtended")) { have_extended_data = true; msg->getU32("DataExtended", "TimeStamp", time_stamp, block); msg->getF32("DataExtended", "MonoScore", mono_score, block); msg->getS32("DataExtended", "PublicURLs", public_urls, block); + if (msg->getSize("DataExtended", "ParcelName") > 0) + { + msg->getString("DataExtended", "ParcelName", parcel_buf, block); + msg->getF32("DataExtended", "Size", script_memory, block); + } } LLSD element; @@ -193,50 +187,48 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) element["id"] = task_id; LLSD columns; - columns[0]["column"] = "score"; - columns[0]["value"] = llformat("%0.3f", score); - columns[0]["font"] = "SANSSERIF"; + S32 column_num = 0; + columns[column_num]["column"] = "score"; + columns[column_num]["value"] = llformat("%0.3f", score); + columns[column_num++]["font"] = "SANSSERIF"; - columns[1]["column"] = "name"; - columns[1]["value"] = name_buf; - columns[1]["font"] = "SANSSERIF"; + columns[column_num]["column"] = "name"; + columns[column_num]["value"] = name_buf; + columns[column_num++]["font"] = "SANSSERIF"; // Owner names can have trailing spaces sent from server LLStringUtil::trim(owner_buf); - if (LLAvatarNameCache::useDisplayNames()) - { - // ...convert hard-coded name from server to a username - // *TODO: Send owner_id from server and look up display name - owner_buf = LLCacheName::buildUsername(owner_buf); - } - else - { - // ...just strip out legacy "Resident" name - owner_buf = LLCacheName::cleanFullName(owner_buf); - } - columns[2]["column"] = "owner"; - columns[2]["value"] = owner_buf; - columns[2]["font"] = "SANSSERIF"; - - columns[3]["column"] = "location"; - columns[3]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z); - columns[3]["font"] = "SANSSERIF"; - columns[4]["column"] = "time"; - columns[4]["type"] = "date"; - columns[4]["value"] = LLDate((time_t)time_stamp); - columns[4]["font"] = "SANSSERIF"; + // *TODO: Send owner_id from server and look up display name + owner_buf = LLCacheName::buildUsername(owner_buf); + + columns[column_num]["column"] = "owner"; + columns[column_num]["value"] = owner_buf; + columns[column_num++]["font"] = "SANSSERIF"; + + columns[column_num]["column"] = "location"; + columns[column_num]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z); + columns[column_num++]["font"] = "SANSSERIF"; + + columns[column_num]["column"] = "parcel"; + columns[column_num]["value"] = parcel_buf; + columns[column_num++]["font"] = "SANSSERIF"; + + columns[column_num]["column"] = "time"; + columns[column_num]["type"] = "date"; + columns[column_num]["value"] = LLDate((time_t)time_stamp); + columns[column_num++]["font"] = "SANSSERIF"; if (mCurrentMode == STAT_REPORT_TOP_SCRIPTS && have_extended_data) { - columns[5]["column"] = "mono_time"; - columns[5]["value"] = llformat("%0.3f", mono_score); - columns[5]["font"] = "SANSSERIF"; + columns[column_num]["column"] = "memory"; + columns[column_num]["value"] = llformat("%0.0f", (script_memory / 1000.f)); + columns[column_num++]["font"] = "SANSSERIF"; - columns[6]["column"] = "URLs"; - columns[6]["value"] = llformat("%d", public_urls); - columns[6]["font"] = "SANSSERIF"; + columns[column_num]["column"] = "URLs"; + columns[column_num]["value"] = llformat("%d", public_urls); + columns[column_num++]["font"] = "SANSSERIF"; } element["columns"] = columns; list->addElement(element); @@ -260,18 +252,18 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) { setTitle(getString("top_scripts_title")); list->setColumnLabel("score", getString("scripts_score_label")); - list->setColumnLabel("mono_time", getString("scripts_mono_time_label")); LLUIString format = getString("top_scripts_text"); format.setArg("[COUNT]", llformat("%d", total_count)); - format.setArg("[TIME]", llformat("%0.1f", mtotalScore)); + format.setArg("[TIME]", llformat("%0.3f", mtotalScore)); getChild<LLUICtrl>("title_text")->setValue(LLSD(format)); } else { setTitle(getString("top_colliders_title")); list->setColumnLabel("score", getString("colliders_score_label")); - list->setColumnLabel("mono_time", ""); + list->setColumnLabel("URLs", ""); + list->setColumnLabel("memory", ""); LLUIString format = getString("top_colliders_text"); format.setArg("[COUNT]", llformat("%d", total_count)); getChild<LLUICtrl>("title_text")->setValue(LLSD(format)); @@ -301,6 +293,7 @@ void LLFloaterTopObjects::updateSelectionInfo() { getChild<LLUICtrl>("object_name_editor")->setValue(sli->getColumn(1)->getValue().asString()); getChild<LLUICtrl>("owner_name_editor")->setValue(sli->getColumn(2)->getValue().asString()); + getChild<LLUICtrl>("parcel_name_editor")->setValue(sli->getColumn(4)->getValue().asString()); } } @@ -480,6 +473,15 @@ void LLFloaterTopObjects::onGetByOwnerName() onRefresh(); } + +void LLFloaterTopObjects::onGetByParcelName() +{ + mFlags = STAT_FILTER_BY_PARCEL_NAME; + mFilter = getChild<LLUICtrl>("parcel_name_editor")->getValue().asString(); + onRefresh(); +} + + void LLFloaterTopObjects::showBeacon() { LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list"); diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h index a608ca20f1..6edc46cf79 100644 --- a/indra/newview/llfloatertopobjects.h +++ b/indra/newview/llfloatertopobjects.h @@ -73,9 +73,7 @@ private: void onGetByOwnerName(); void onGetByObjectName(); - -// static void onGetByOwnerNameClicked(void* data) { onGetByOwnerName(NULL, data); }; -// static void onGetByObjectNameClicked(void* data) { onGetByObjectName(NULL, data); }; + void onGetByParcelName(); void showBeacon(); diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index c5df7e16e9..a242b224cd 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -71,9 +71,9 @@ class LLIamHere : public LLHTTPClient::Responder public: - static boost::intrusive_ptr< LLIamHere > build( LLFloaterTOS* parent ) + static LLIamHere* build( LLFloaterTOS* parent ) { - return boost::intrusive_ptr< LLIamHere >( new LLIamHere( parent ) ); + return new LLIamHere( parent ); }; virtual void setParent( LLFloaterTOS* parentIn ) @@ -102,7 +102,7 @@ class LLIamHere : public LLHTTPClient::Responder // this is global and not a class member to keep crud out of the header file namespace { - boost::intrusive_ptr< LLIamHere > gResponsePtr = 0; + LLPointer< LLIamHere > gResponsePtr = 0; }; BOOL LLFloaterTOS::postBuild() diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp index 1a17183efd..33f2c35239 100644 --- a/indra/newview/llfloatertranslationsettings.cpp +++ b/indra/newview/llfloatertranslationsettings.cpp @@ -29,7 +29,7 @@ #include "llfloatertranslationsettings.h" // Viewer includes -#include "llnearbychatbar.h" +#include "llfloaterimnearbychat.h" #include "lltranslate.h" #include "llviewercontrol.h" // for gSavedSettings @@ -225,11 +225,10 @@ void LLFloaterTranslationSettings::updateControlsEnabledState() mGoogleVerifyBtn->setEnabled(on && google_selected && !mGoogleKeyVerified && !getEnteredGoogleKey().empty()); - mOKBtn->setEnabled( - !on || ( - (bing_selected && mBingKeyVerified) || - (google_selected && mGoogleKeyVerified) - )); + bool service_verified = (bing_selected && mBingKeyVerified) || (google_selected && mGoogleKeyVerified); + gSavedPerAccountSettings.setBOOL("TranslatingEnabled", service_verified); + + mOKBtn->setEnabled(!on || service_verified); } void LLFloaterTranslationSettings::verifyKey(int service, const std::string& key, bool alert) @@ -285,7 +284,16 @@ void LLFloaterTranslationSettings::onBtnGoogleVerify() verifyKey(LLTranslate::SERVICE_GOOGLE, key); } } +void LLFloaterTranslationSettings::onClose(bool app_quitting) +{ + std::string service = gSavedSettings.getString("TranslationService"); + bool bing_selected = service == "bing"; + bool google_selected = service == "google"; + + bool service_verified = (bing_selected && mBingKeyVerified) || (google_selected && mGoogleKeyVerified); + gSavedPerAccountSettings.setBOOL("TranslatingEnabled", service_verified); +} void LLFloaterTranslationSettings::onBtnOK() { gSavedSettings.setBOOL("TranslateChat", mMachineTranslationCB->getValue().asBoolean()); @@ -293,6 +301,7 @@ void LLFloaterTranslationSettings::onBtnOK() gSavedSettings.setString("TranslationService", getSelectedService()); gSavedSettings.setString("BingTranslateAPIKey", getEnteredBingKey()); gSavedSettings.setString("GoogleTranslateAPIKey", getEnteredGoogleKey()); - LLNearbyChatBar::getInstance()->showTranslationCheckbox(LLTranslate::isTranslationConfigured()); + (LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))-> + showTranslationCheckbox(LLTranslate::isTranslationConfigured()); closeFloater(false); } diff --git a/indra/newview/llfloatertranslationsettings.h b/indra/newview/llfloatertranslationsettings.h index 9b47ad72ed..b9bfd6265a 100644 --- a/indra/newview/llfloatertranslationsettings.h +++ b/indra/newview/llfloatertranslationsettings.h @@ -44,6 +44,7 @@ public: void setBingVerified(bool ok, bool alert); void setGoogleVerified(bool ok, bool alert); + void onClose(bool app_quitting); private: std::string getSelectedService() const; diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index d741b5b133..15e0b89f6c 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -137,7 +137,7 @@ public: virtual ~LLFloaterUIPreview(); std::string getLocStr(S32 ID); // fetches the localization string based on what is selected in the drop-down menu - void displayFloater(BOOL click, S32 ID, bool save = false); // needs to be public so live file can call it when it finds an update + void displayFloater(BOOL click, S32 ID); // needs to be public so live file can call it when it finds an update /*virtual*/ BOOL postBuild(); /*virtual*/ void onClose(bool app_quitting); @@ -291,7 +291,8 @@ LLLocalizationResetForcer::LLLocalizationResetForcer(LLFloaterUIPreview* floater { mSavedLocalization = LLUI::sSettingGroups["config"]->getString("Language"); // save current localization setting LLUI::sSettingGroups["config"]->setString("Language", floater->getLocStr(ID));// hack language to be the one we want to preview floaters in - LLUI::setupPaths(); // forcibly reset XUI paths with this new language + // forcibly reset XUI paths with this new language + gDirUtilp->setSkinFolder(gDirUtilp->getSkinFolder(), floater->getLocStr(ID)); } // Actually reset in destructor @@ -299,7 +300,8 @@ LLLocalizationResetForcer::LLLocalizationResetForcer(LLFloaterUIPreview* floater LLLocalizationResetForcer::~LLLocalizationResetForcer() { LLUI::sSettingGroups["config"]->setString("Language", mSavedLocalization); // reset language to what it was before we changed it - LLUI::setupPaths(); // forcibly reset XUI paths with this new language + // forcibly reset XUI paths with this new language + gDirUtilp->setSkinFolder(gDirUtilp->getSkinFolder(), mSavedLocalization); } // Live file constructor @@ -488,7 +490,7 @@ BOOL LLFloaterUIPreview::postBuild() { if((found = iter.next(language_directory))) // get next directory { - std::string full_path = xui_dir + language_directory; + std::string full_path = gDirUtilp->add(xui_dir, language_directory); if(LLFile::isfile(full_path.c_str())) // if it's not a directory, skip it { continue; @@ -773,7 +775,8 @@ void LLFloaterUIPreview::onClickDisplayFloater(S32 caller_id) // Saves the current floater/panel void LLFloaterUIPreview::onClickSaveFloater(S32 caller_id) { - displayFloater(TRUE, caller_id, true); + displayFloater(TRUE, caller_id); + popupAndPrintWarning("Save-floater functionality removed, use XML schema to clean up XUI files"); } // Saves all floater/panels @@ -784,25 +787,15 @@ void LLFloaterUIPreview::onClickSaveAll(S32 caller_id) for (int index = 0; index < listSize; index++) { mFileList->selectNthItem(index); - displayFloater(TRUE, caller_id, true); + displayFloater(TRUE, caller_id); } -} - -// Given path to floater or panel XML file "filename.xml", -// returns "filename_new.xml" -static std::string append_new_to_xml_filename(const std::string& path) -{ - std::string full_filename = gDirUtilp->findSkinnedFilename(LLUI::getLocalizedSkinPath(), path); - std::string::size_type extension_pos = full_filename.rfind(".xml"); - full_filename.resize(extension_pos); - full_filename += "_new.xml"; - return full_filename; + popupAndPrintWarning("Save-floater functionality removed, use XML schema to clean up XUI files"); } // Actually display the floater // Only set up a new live file if this came from a click (at which point there should be no existing live file), rather than from the live file's update itself; // otherwise, we get an infinite loop as the live file keeps recreating itself. That means this function is generally called twice. -void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) +void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID) { // Convince UI that we're in a different language (the one selected on the drop-down menu) LLLocalizationResetForcer reset_forcer(this, ID); // save old language in reset forcer object (to be reset upon destruction when it falls out of scope) @@ -843,48 +836,13 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) if(!strncmp(path.c_str(),"floater_",8) || !strncmp(path.c_str(), "inspect_", 8)) // if it's a floater { - if (save) - { - LLXMLNodePtr floater_write = new LLXMLNode(); - (*floaterp)->buildFromFile(path, floater_write); // just build it - - if (!floater_write->isNull()) - { - std::string full_filename = append_new_to_xml_filename(path); - LLFILE* floater_temp = LLFile::fopen(full_filename.c_str(), "w"); - LLXMLNode::writeHeaderToFile(floater_temp); - const bool use_type_decorations = false; - floater_write->writeToFile(floater_temp, std::string(), use_type_decorations); - fclose(floater_temp); - } - } - else - { - (*floaterp)->buildFromFile(path); // just build it - (*floaterp)->openFloater((*floaterp)->getKey()); - (*floaterp)->setCanResize((*floaterp)->isResizable()); - } - + (*floaterp)->buildFromFile(path); // just build it + (*floaterp)->openFloater((*floaterp)->getKey()); + (*floaterp)->setCanResize((*floaterp)->isResizable()); } else if (!strncmp(path.c_str(),"menu_",5)) // if it's a menu { - if (save) - { - LLXMLNodePtr menu_write = new LLXMLNode(); - LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(path, gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance(), menu_write); - - if (!menu_write->isNull()) - { - std::string full_filename = append_new_to_xml_filename(path); - LLFILE* menu_temp = LLFile::fopen(full_filename.c_str(), "w"); - LLXMLNode::writeHeaderToFile(menu_temp); - const bool use_type_decorations = false; - menu_write->writeToFile(menu_temp, std::string(), use_type_decorations); - fclose(menu_temp); - } - - delete menu; - } + // former 'save' processing excised } else // if it is a panel... { @@ -896,39 +854,21 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) LLPanel::Params panel_params; LLPanel* panel = LLUICtrlFactory::create<LLPanel>(panel_params); // create a new panel - if (save) - { - LLXMLNodePtr panel_write = new LLXMLNode(); - panel->buildFromFile(path, panel_write); // build it - - if (!panel_write->isNull()) - { - std::string full_filename = append_new_to_xml_filename(path); - LLFILE* panel_temp = LLFile::fopen(full_filename.c_str(), "w"); - LLXMLNode::writeHeaderToFile(panel_temp); - const bool use_type_decorations = false; - panel_write->writeToFile(panel_temp, std::string(), use_type_decorations); - fclose(panel_temp); - } - } - else - { - panel->buildFromFile(path); // build it - LLRect new_size = panel->getRect(); // get its rectangle - panel->setOrigin(2,2); // reset its origin point so it's not offset by -left or other XUI attributes - (*floaterp)->setTitle(path); // use the file name as its title, since panels have no guaranteed meaningful name attribute - panel->setUseBoundingRect(TRUE); // enable the use of its outer bounding rect (normally disabled because it's O(n) on the number of sub-elements) - panel->updateBoundingRect(); // update bounding rect - LLRect bounding_rect = panel->getBoundingRect(); // get the bounding rect - LLRect new_rect = panel->getRect(); // get the panel's rect - new_rect.unionWith(bounding_rect); // union them to make sure we get the biggest one possible - LLRect floater_rect = new_rect; - floater_rect.stretch(4, 4); - (*floaterp)->reshape(floater_rect.getWidth(), floater_rect.getHeight() + floater_header_size); // reshape floater to match the union rect's dimensions - panel->reshape(new_rect.getWidth(), new_rect.getHeight()); // reshape panel to match the union rect's dimensions as well (both are needed) - (*floaterp)->addChild(panel); // add panel as child - (*floaterp)->openFloater(); // open floater (needed?) - } + panel->buildFromFile(path); // build it + LLRect new_size = panel->getRect(); // get its rectangle + panel->setOrigin(2,2); // reset its origin point so it's not offset by -left or other XUI attributes + (*floaterp)->setTitle(path); // use the file name as its title, since panels have no guaranteed meaningful name attribute + panel->setUseBoundingRect(TRUE); // enable the use of its outer bounding rect (normally disabled because it's O(n) on the number of sub-elements) + panel->updateBoundingRect(); // update bounding rect + LLRect bounding_rect = panel->getBoundingRect(); // get the bounding rect + LLRect new_rect = panel->getRect(); // get the panel's rect + new_rect.unionWith(bounding_rect); // union them to make sure we get the biggest one possible + LLRect floater_rect = new_rect; + floater_rect.stretch(4, 4); + (*floaterp)->reshape(floater_rect.getWidth(), floater_rect.getHeight() + floater_header_size); // reshape floater to match the union rect's dimensions + panel->reshape(new_rect.getWidth(), new_rect.getHeight()); // reshape panel to match the union rect's dimensions as well (both are needed) + (*floaterp)->addChild(panel); // add panel as child + (*floaterp)->openFloater(); // open floater (needed?) } if(ID == 1) @@ -964,7 +904,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) (*floaterp)->center(); addDependentFloater(*floaterp); - if(click && ID == 1 && !save) + if(click && ID == 1) { // set up live file to track it if(mLiveFile) diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 151cd2a1cd..e85d849c9a 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -219,7 +219,8 @@ void LLFloaterURLEntry::onBtnOK( void* userdata ) } // Discover the MIME type only for "http" scheme. - if(scheme == "http" || scheme == "https") + if(!media_url.empty() && + (scheme == "http" || scheme == "https")) { LLHTTPClient::getHeaderOnly( media_url, new LLMediaTypeResponder(self->getHandle())); diff --git a/indra/newview/llfloatervoicevolume.cpp b/indra/newview/llfloatervoicevolume.cpp new file mode 100644 index 0000000000..38446e46df --- /dev/null +++ b/indra/newview/llfloatervoicevolume.cpp @@ -0,0 +1,220 @@ +/** + * @file llfloatervoicevolume.cpp + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloatervoicevolume.h" + +// Linden libraries +#include "llavatarname.h" +#include "llavatarnamecache.h" +#include "llfloater.h" +#include "llfloaterreg.h" +#include "lltextbox.h" + +// viewer files +#include "llagent.h" +#include "llavataractions.h" +#include "llinspect.h" +#include "lltransientfloatermgr.h" +#include "llvoiceclient.h" + +class LLAvatarName; + +////////////////////////////////////////////////////////////////////////////// +// LLFloaterVoiceVolume +////////////////////////////////////////////////////////////////////////////// + +// Avatar Inspector, a small information window used when clicking +// on avatar names in the 2D UI and in the ambient inspector widget for +// the 3D world. +class LLFloaterVoiceVolume : public LLInspect, LLTransientFloater +{ + friend class LLFloaterReg; + +public: + // avatar_id - Avatar ID for which to show information + // Inspector will be positioned relative to current mouse position + LLFloaterVoiceVolume(const LLSD& avatar_id); + virtual ~LLFloaterVoiceVolume(); + + /*virtual*/ BOOL postBuild(void); + + // Because floater is single instance, need to re-parse data on each spawn + // (for example, inspector about same avatar but in different position) + /*virtual*/ void onOpen(const LLSD& avatar_id); + + /*virtual*/ LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::GLOBAL; } + +private: + // Set the volume slider to this user's current client-side volume setting, + // hiding/disabling if the user is not nearby. + void updateVolumeControls(); + + void onClickMuteVolume(); + void onVolumeChange(const LLSD& data); + void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); + +private: + LLUUID mAvatarID; + // Need avatar name information to spawn friend add request + LLAvatarName mAvatarName; + boost::signals2::connection mAvatarNameCacheConnection; +}; + +LLFloaterVoiceVolume::LLFloaterVoiceVolume(const LLSD& sd) +: LLInspect(LLSD()) // single_instance, doesn't really need key +, mAvatarID() // set in onOpen() *Note: we used to show partner's name but we dont anymore --angela 3rd Dec* +, mAvatarName() +, mAvatarNameCacheConnection() +{ + LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::GLOBAL, this); + LLTransientFloater::init(this); +} + +LLFloaterVoiceVolume::~LLFloaterVoiceVolume() +{ + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + LLTransientFloaterMgr::getInstance()->removeControlView(this); +} + +/*virtual*/ +BOOL LLFloaterVoiceVolume::postBuild(void) +{ + getChild<LLUICtrl>("mute_btn")->setCommitCallback( + boost::bind(&LLFloaterVoiceVolume::onClickMuteVolume, this) ); + + getChild<LLUICtrl>("volume_slider")->setCommitCallback( + boost::bind(&LLFloaterVoiceVolume::onVolumeChange, this, _2)); + + return TRUE; +} + + +// Multiple calls to showInstance("floater_voice_volume", foo) will provide different +// LLSD for foo, which we will catch here. +//virtual +void LLFloaterVoiceVolume::onOpen(const LLSD& data) +{ + // Start open animation + LLInspect::onOpen(data); + + // Extract appropriate avatar id + mAvatarID = data["avatar_id"]; + + LLUI::positionViewNearMouse(this); + + getChild<LLUICtrl>("avatar_name")->setValue(""); + updateVolumeControls(); + + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(mAvatarID, boost::bind(&LLFloaterVoiceVolume::onAvatarNameCache, this, _1, _2)); +} + +void LLFloaterVoiceVolume::updateVolumeControls() +{ + bool voice_enabled = LLVoiceClient::getInstance()->getVoiceEnabled(mAvatarID); + + LLUICtrl* mute_btn = getChild<LLUICtrl>("mute_btn"); + LLUICtrl* volume_slider = getChild<LLUICtrl>("volume_slider"); + + // Do not display volume slider and mute button if it + // is ourself or we are not in a voice channel together + if (!voice_enabled || (mAvatarID == gAgent.getID())) + { + mute_btn->setVisible(false); + volume_slider->setVisible(false); + } + else + { + mute_btn->setVisible(true); + volume_slider->setVisible(true); + + // By convention, we only display and toggle voice mutes, not all mutes + bool is_muted = LLAvatarActions::isVoiceMuted(mAvatarID); + bool is_linden = LLStringUtil::endsWith(mAvatarName.getUserName(), " Linden"); + + mute_btn->setEnabled(!is_linden); + mute_btn->setValue(is_muted); + + volume_slider->setEnabled(!is_muted); + + F32 volume; + if (is_muted) + { + // it's clearer to display their volume as zero + volume = 0.f; + } + else + { + // actual volume + volume = LLVoiceClient::getInstance()->getUserVolume(mAvatarID); + } + volume_slider->setValue((F64)volume); + } + +} + +void LLFloaterVoiceVolume::onClickMuteVolume() +{ + LLAvatarActions::toggleMuteVoice(mAvatarID); + updateVolumeControls(); +} + +void LLFloaterVoiceVolume::onVolumeChange(const LLSD& data) +{ + F32 volume = (F32)data.asReal(); + LLVoiceClient::getInstance()->setUserVolume(mAvatarID, volume); +} + +void LLFloaterVoiceVolume::onAvatarNameCache( + const LLUUID& agent_id, + const LLAvatarName& av_name) +{ + mAvatarNameCacheConnection.disconnect(); + + if (agent_id != mAvatarID) + { + return; + } + + getChild<LLUICtrl>("avatar_name")->setValue(av_name.getCompleteName()); + mAvatarName = av_name; +} + +////////////////////////////////////////////////////////////////////////////// +// LLFloaterVoiceVolumeUtil +////////////////////////////////////////////////////////////////////////////// +void LLFloaterVoiceVolumeUtil::registerFloater() +{ + LLFloaterReg::add("floater_voice_volume", "floater_voice_volume.xml", + &LLFloaterReg::build<LLFloaterVoiceVolume>); +} diff --git a/indra/newview/llfloatervoicevolume.h b/indra/newview/llfloatervoicevolume.h new file mode 100644 index 0000000000..8fcf7f250b --- /dev/null +++ b/indra/newview/llfloatervoicevolume.h @@ -0,0 +1,35 @@ +/** + * @file llfloatervoicevolume.h + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERVOICEVOLUME_H +#define LL_LLFLOATERVOICEVOLUME_H + +namespace LLFloaterVoiceVolumeUtil +{ + // Register with LLFloaterReg + void registerFloater(); +} + +#endif // LL_LLFLOATERVOICEVOLUME_H diff --git a/indra/newview/llfoldervieweventlistener.h b/indra/newview/llfoldervieweventlistener.h deleted file mode 100644 index 06682dcbf1..0000000000 --- a/indra/newview/llfoldervieweventlistener.h +++ /dev/null @@ -1,103 +0,0 @@ -/** - * @file llfoldervieweventlistener.h - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ -#ifndef LLFOLDERVIEWEVENTLISTENER_H -#define LLFOLDERVIEWEVENTLISTENER_H - -#include "lldarray.h" // *TODO: convert to std::vector -#include "llfoldertype.h" -#include "llfontgl.h" // just for StyleFlags enum -#include "llinventorytype.h" -#include "llpermissionsflags.h" -#include "llpointer.h" -#include "llwearabletype.h" - - -class LLFolderViewItem; -class LLFolderView; -class LLFontGL; -class LLInventoryModel; -class LLMenuGL; -class LLScrollContainer; -class LLUIImage; -class LLUUID; - -// This is an abstract base class that users of the folderview classes -// would use to catch the useful events emitted from the folder -// views. -class LLFolderViewEventListener -{ -public: - virtual ~LLFolderViewEventListener( void ) {} - virtual const std::string& getName() const = 0; - virtual const std::string& getDisplayName() const = 0; - virtual const LLUUID& getUUID() const = 0; - virtual time_t getCreationDate() const = 0; // UTC seconds - virtual PermissionMask getPermissionMask() const = 0; - virtual LLFolderType::EType getPreferredType() const = 0; - virtual LLPointer<LLUIImage> getIcon() const = 0; - virtual LLPointer<LLUIImage> getOpenIcon() const { return getIcon(); } - virtual LLFontGL::StyleFlags getLabelStyle() const = 0; - virtual std::string getLabelSuffix() const = 0; - virtual void openItem( void ) = 0; - virtual void closeItem( void ) = 0; - virtual void previewItem( void ) = 0; - virtual void selectItem(void) = 0; - virtual void showProperties(void) = 0; - virtual BOOL isItemRenameable() const = 0; - virtual BOOL renameItem(const std::string& new_name) = 0; - virtual BOOL isItemMovable( void ) const = 0; // Can be moved to another folder - virtual BOOL isItemRemovable( void ) const = 0; // Can be destroyed - virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual. - virtual BOOL removeItem() = 0; - virtual void removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch) = 0; - virtual void move( LLFolderViewEventListener* parent_listener ) = 0; - virtual BOOL isItemCopyable() const = 0; - virtual BOOL copyToClipboard() const = 0; - virtual BOOL cutToClipboard() const = 0; - virtual BOOL isClipboardPasteable() const = 0; - virtual void pasteFromClipboard() = 0; - virtual void pasteLinkFromClipboard() = 0; - virtual void buildContextMenu(LLMenuGL& menu, U32 flags) = 0; - virtual BOOL isUpToDate() const = 0; - virtual BOOL hasChildren() const = 0; - virtual LLInventoryType::EType getInventoryType() const = 0; - virtual void performAction(LLInventoryModel* model, std::string action) = 0; - virtual LLWearableType::EType getWearableType() const = 0; - - // This method should be called when a drag begins. returns TRUE - // if the drag can begin, otherwise FALSE. - virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const = 0; - - // This method will be called to determine if a drop can be - // performed, and will set drop to TRUE if a drop is - // requested. Returns TRUE if a drop is possible/happened, - // otherwise FALSE. - virtual BOOL dragOrDrop(MASK mask, BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - std::string& tooltip_msg) = 0; -}; - -#endif diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp deleted file mode 100644 index 3aa16b4413..0000000000 --- a/indra/newview/llfolderviewitem.cpp +++ /dev/null @@ -1,2901 +0,0 @@ -/** -* @file llfolderviewitem.cpp -* @brief Items and folders that can appear in a hierarchical folder view -* -* $LicenseInfo:firstyear=2001&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2010, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ -#include "llviewerprecompiledheaders.h" - -#include "llfolderviewitem.h" - -// viewer includes -#include "llfolderview.h" // Items depend extensively on LLFolderViews -#include "llfoldervieweventlistener.h" -#include "llviewerfoldertype.h" -#include "llinventorybridge.h" // for LLItemBridge in LLInventorySort::operator() -#include "llinventoryfilter.h" -#include "llinventoryfunctions.h" -#include "llinventorymodelbackgroundfetch.h" -#include "llpanel.h" -#include "llviewercontrol.h" // gSavedSettings -#include "llviewerwindow.h" // Argh, only for setCursor() - -// linden library includes -#include "llclipboard.h" -#include "llfocusmgr.h" // gFocusMgr -#include "lltrans.h" - -///---------------------------------------------------------------------------- -/// Class LLFolderViewItem -///---------------------------------------------------------------------------- - -static LLDefaultChildRegistry::Register<LLFolderViewItem> r("folder_view_item"); - -// statics -std::map<U8, LLFontGL*> LLFolderViewItem::sFonts; // map of styles to fonts - -// only integers can be initialized in header -const F32 LLFolderViewItem::FOLDER_CLOSE_TIME_CONSTANT = 0.02f; -const F32 LLFolderViewItem::FOLDER_OPEN_TIME_CONSTANT = 0.03f; - -const LLColor4U DEFAULT_WHITE(255, 255, 255); - - -//static -LLFontGL* LLFolderViewItem::getLabelFontForStyle(U8 style) -{ - LLFontGL* rtn = sFonts[style]; - if (!rtn) // grab label font with this style, lazily - { - LLFontDescriptor labelfontdesc("SansSerif", "Small", style); - rtn = LLFontGL::getFont(labelfontdesc); - if (!rtn) - { - rtn = LLFontGL::getFontDefault(); - } - sFonts[style] = rtn; - } - return rtn; -} - -//static -void LLFolderViewItem::initClass() -{ -} - -//static -void LLFolderViewItem::cleanupClass() -{ - sFonts.clear(); -} - - -// NOTE: Optimize this, we call it a *lot* when opening a large inventory -LLFolderViewItem::Params::Params() -: icon(), - icon_open(), - icon_overlay(), - root(), - listener(), - folder_arrow_image("folder_arrow_image"), - folder_indentation("folder_indentation"), - selection_image("selection_image"), - item_height("item_height"), - item_top_pad("item_top_pad"), - creation_date() -{} - -// Default constructor -LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) -: LLView(p), - mLabelWidth(0), - mLabelWidthDirty(false), - mParentFolder( NULL ), - mIsSelected( FALSE ), - mIsCurSelection( FALSE ), - mSelectPending(FALSE), - mLabelStyle( LLFontGL::NORMAL ), - mHasVisibleChildren(FALSE), - mIndentation(0), - mItemHeight(p.item_height), - mPassedFilter(FALSE), - mLastFilterGeneration(-1), - mStringMatchOffset(std::string::npos), - mControlLabelRotation(0.f), - mDragAndDropTarget(FALSE), - mIsLoading(FALSE), - mLabel(p.name), - mRoot(p.root), - mCreationDate(p.creation_date), - mIcon(p.icon), - mIconOpen(p.icon_open), - mIconOverlay(p.icon_overlay), - mListener(p.listener), - mShowLoadStatus(false), - mIsMouseOverTitle(false) -{ -} - -BOOL LLFolderViewItem::postBuild() -{ - refresh(); - return TRUE; -} - -// Destroys the object -LLFolderViewItem::~LLFolderViewItem( void ) -{ - delete mListener; - mListener = NULL; -} - -LLFolderView* LLFolderViewItem::getRoot() -{ - return mRoot; -} - -// Returns true if this object is a child (or grandchild, etc.) of potential_ancestor. -BOOL LLFolderViewItem::isDescendantOf( const LLFolderViewFolder* potential_ancestor ) -{ - LLFolderViewItem* root = this; - while( root->mParentFolder ) - { - if( root->mParentFolder == potential_ancestor ) - { - return TRUE; - } - root = root->mParentFolder; - } - return FALSE; -} - -LLFolderViewItem* LLFolderViewItem::getNextOpenNode(BOOL include_children) -{ - if (!mParentFolder) - { - return NULL; - } - - LLFolderViewItem* itemp = mParentFolder->getNextFromChild( this, include_children ); - while(itemp && !itemp->getVisible()) - { - LLFolderViewItem* next_itemp = itemp->mParentFolder->getNextFromChild( itemp, include_children ); - if (itemp == next_itemp) - { - // hit last item - return itemp->getVisible() ? itemp : this; - } - itemp = next_itemp; - } - - return itemp; -} - -LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children) -{ - if (!mParentFolder) - { - return NULL; - } - - LLFolderViewItem* itemp = mParentFolder->getPreviousFromChild( this, include_children ); - - // Skip over items that are invisible or are hidden from the UI. - while(itemp && !itemp->getVisible()) - { - LLFolderViewItem* next_itemp = itemp->mParentFolder->getPreviousFromChild( itemp, include_children ); - if (itemp == next_itemp) - { - // hit first item - return itemp->getVisible() ? itemp : this; - } - itemp = next_itemp; - } - - return itemp; -} - -// is this item something we think we should be showing? -// for example, if we haven't gotten around to filtering it yet, then the answer is yes -// until we find out otherwise -BOOL LLFolderViewItem::potentiallyVisible() -{ - // we haven't been checked against min required filter - // or we have and we passed - return potentiallyFiltered(); -} - -BOOL LLFolderViewItem::potentiallyFiltered() -{ - return getLastFilterGeneration() < getRoot()->getFilter()->getMinRequiredGeneration() || getFiltered(); -} - -BOOL LLFolderViewItem::getFiltered() -{ - return mPassedFilter && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration(); -} - -BOOL LLFolderViewItem::getFiltered(S32 filter_generation) -{ - return mPassedFilter && mLastFilterGeneration >= filter_generation; -} - -void LLFolderViewItem::setFiltered(BOOL filtered, S32 filter_generation) -{ - mPassedFilter = filtered; - mLastFilterGeneration = filter_generation; -} - -void LLFolderViewItem::setIcon(LLUIImagePtr icon) -{ - mIcon = icon; -} - -// refresh information from the listener -void LLFolderViewItem::refreshFromListener() -{ - if(mListener) - { - mLabel = mListener->getDisplayName(); - LLFolderType::EType preferred_type = mListener->getPreferredType(); - - // *TODO: to be removed when database supports multi language. This is a - // temporary attempt to display the inventory folder in the user locale. - // mantipov: *NOTE: be sure this code is synchronized with LLFriendCardsManager::findChildFolderUUID - // it uses the same way to find localized string - - // HACK: EXT - 6028 ([HARD CODED]? Inventory > Library > "Accessories" folder) - // Translation of Accessories folder in Library inventory folder - bool accessories = false; - if(mLabel == std::string("Accessories")) - { - //To ensure that Accessories folder is in Library we have to check its parent folder. - //Due to parent LLFolderViewFloder is not set to this item yet we have to check its parent via Inventory Model - LLInventoryCategory* cat = gInventory.getCategory(mListener->getUUID()); - if(cat) - { - const LLUUID& parent_folder_id = cat->getParentUUID(); - accessories = (parent_folder_id == gInventory.getLibraryRootFolderID()); - } - } - - //"Accessories" inventory category has folder type FT_NONE. So, this folder - //can not be detected as protected with LLFolderType::lookupIsProtectedType - if (accessories || LLFolderType::lookupIsProtectedType(preferred_type)) - { - LLTrans::findString(mLabel, "InvFolder " + mLabel); - }; - - setToolTip(mLabel); - setIcon(mListener->getIcon()); - time_t creation_date = mListener->getCreationDate(); - if ((creation_date > 0) && (mCreationDate != creation_date)) - { - setCreationDate(creation_date); - dirtyFilter(); - } - if (mRoot->useLabelSuffix()) - { - mLabelStyle = mListener->getLabelStyle(); - mLabelSuffix = mListener->getLabelSuffix(); - } - } -} - -void LLFolderViewItem::refresh() -{ - refreshFromListener(); - - std::string searchable_label(mLabel); - searchable_label.append(mLabelSuffix); - LLStringUtil::toUpper(searchable_label); - - if (mSearchableLabel.compare(searchable_label)) - { - mSearchableLabel.assign(searchable_label); - dirtyFilter(); - // some part of label has changed, so overall width has potentially changed, and sort order too - if (mParentFolder) - { - mParentFolder->requestSort(); - mParentFolder->requestArrange(); - } - } - - mLabelWidthDirty = true; -} - -void LLFolderViewItem::applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor) -{ - functor(mListener); -} - -// This function is called when items are added or view filters change. It's -// implemented here but called by derived classes when folding the -// views. -void LLFolderViewItem::filterFromRoot( void ) -{ - LLFolderViewItem* root = getRoot(); - - root->filter(*((LLFolderView*)root)->getFilter()); -} - -// This function is called when the folder view is dirty. It's -// implemented here but called by derived classes when folding the -// views. -void LLFolderViewItem::arrangeFromRoot() -{ - LLFolderViewItem* root = getRoot(); - - S32 height = 0; - S32 width = 0; - S32 total_height = root->arrange( &width, &height, 0 ); - - LLSD params; - params["action"] = "size_changes"; - params["height"] = total_height; - getParent()->notifyParent(params); -} - -// Utility function for LLFolderView -void LLFolderViewItem::arrangeAndSet(BOOL set_selection, - BOOL take_keyboard_focus) -{ - LLFolderView* root = getRoot(); - if (getParentFolder()) - { - getParentFolder()->requestArrange(); - } - if(set_selection) - { - setSelectionFromRoot(this, TRUE, take_keyboard_focus); - if(root) - { - root->scrollToShowSelection(); - } - } -} - -// This function clears the currently selected item, and records the -// specified selected item appropriately for display and use in the -// UI. If open is TRUE, then folders are opened up along the way to -// the selection. -void LLFolderViewItem::setSelectionFromRoot(LLFolderViewItem* selection, - BOOL openitem, - BOOL take_keyboard_focus) -{ - getRoot()->setSelection(selection, openitem, take_keyboard_focus); -} - -// helper function to change the selection from the root. -void LLFolderViewItem::changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected) -{ - getRoot()->changeSelection(selection, selected); -} - -std::set<LLUUID> LLFolderViewItem::getSelectionList() const -{ - std::set<LLUUID> selection; - return selection; -} - -EInventorySortGroup LLFolderViewItem::getSortGroup() const -{ - return SG_ITEM; -} - -// addToFolder() returns TRUE if it succeeds. FALSE otherwise -BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* root) -{ - if (!folder) - { - return FALSE; - } - mParentFolder = folder; - root->addItemID(getListener()->getUUID(), this); - return folder->addItem(this); -} - - -// Finds width and height of this object and its children. Also -// makes sure that this view and its children are the right size. -S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) -{ - const Params& p = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>(); - S32 indentation = p.folder_indentation(); - // Only indent deeper items in hierarchy - mIndentation = (getParentFolder() - && getParentFolder()->getParentFolder() ) - ? mParentFolder->getIndentation() + indentation - : 0; - if (mLabelWidthDirty) - { - mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + TEXT_PAD_RIGHT; - mLabelWidthDirty = false; - } - - *width = llmax(*width, mLabelWidth + mIndentation); - - // determine if we need to use ellipses to avoid horizontal scroll. EXT-719 - bool use_ellipses = getRoot()->getUseEllipses(); - if (use_ellipses) - { - // limit to set rect to avoid horizontal scrollbar - *width = llmin(*width, getRoot()->getRect().getWidth()); - } - *height = getItemHeight(); - return *height; -} - -S32 LLFolderViewItem::getItemHeight() -{ - return mItemHeight; -} - -void LLFolderViewItem::filter( LLInventoryFilter& filter) -{ - const BOOL previous_passed_filter = mPassedFilter; - const BOOL passed_filter = filter.check(this); - - // If our visibility will change as a result of this filter, then - // we need to be rearranged in our parent folder - if (mParentFolder) - { - if (getVisible() != passed_filter - || previous_passed_filter != passed_filter ) - mParentFolder->requestArrange(); - } - - setFiltered(passed_filter, filter.getCurrentGeneration()); - mStringMatchOffset = filter.getStringMatchOffset(); - filter.decrementFilterCount(); - - if (getRoot()->getDebugFilters()) - { - mStatusText = llformat("%d", mLastFilterGeneration); - } -} - -void LLFolderViewItem::dirtyFilter() -{ - mLastFilterGeneration = -1; - // bubble up dirty flag all the way to root - if (getParentFolder()) - { - getParentFolder()->setCompletedFilterGeneration(-1, TRUE); - } -} - -// *TODO: This can be optimized a lot by simply recording that it is -// selected in the appropriate places, and assuming that set selection -// means 'deselect' for a leaf item. Do this optimization after -// multiple selection is implemented to make sure it all plays nice -// together. -BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus) -{ - if (selection == this && !mIsSelected) - { - selectItem(); - } - else if (mIsSelected) // Deselect everything else. - { - deselectItem(); - } - return mIsSelected; -} - -BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selected) -{ - if (selection == this) - { - if (mIsSelected) - { - deselectItem(); - } - else - { - selectItem(); - } - return TRUE; - } - return FALSE; -} - -void LLFolderViewItem::deselectItem(void) -{ - mIsSelected = FALSE; -} - -void LLFolderViewItem::selectItem(void) -{ - if (mIsSelected == FALSE) - { - if (mListener) - { - mListener->selectItem(); - } - mIsSelected = TRUE; - } -} - -BOOL LLFolderViewItem::isMovable() -{ - if( mListener ) - { - return mListener->isItemMovable(); - } - else - { - return TRUE; - } -} - -BOOL LLFolderViewItem::isRemovable() -{ - if( mListener ) - { - return mListener->isItemRemovable(); - } - else - { - return TRUE; - } -} - -void LLFolderViewItem::destroyView() -{ - if (mParentFolder) - { - // removeView deletes me - mParentFolder->removeView(this); - } -} - -// Call through to the viewed object and return true if it can be -// removed. -//BOOL LLFolderViewItem::removeRecursively(BOOL single_item) -BOOL LLFolderViewItem::remove() -{ - if(!isRemovable()) - { - return FALSE; - } - if(mListener) - { - return mListener->removeItem(); - } - return TRUE; -} - -// Build an appropriate context menu for the item. -void LLFolderViewItem::buildContextMenu(LLMenuGL& menu, U32 flags) -{ - if(mListener) - { - mListener->buildContextMenu(menu, flags); - } -} - -void LLFolderViewItem::openItem( void ) -{ - if( mListener ) - { - mListener->openItem(); - } -} - -void LLFolderViewItem::preview( void ) -{ - if (mListener) - { - mListener->previewItem(); - } -} - -void LLFolderViewItem::rename(const std::string& new_name) -{ - if( !new_name.empty() ) - { - if( mListener ) - { - mListener->renameItem(new_name); - - if(mParentFolder) - { - mParentFolder->requestSort(); - } - } - } -} - -const std::string& LLFolderViewItem::getSearchableLabel() const -{ - return mSearchableLabel; -} - -LLViewerInventoryItem * LLFolderViewItem::getInventoryItem(void) -{ - if (!getListener()) return NULL; - return gInventory.getItem(getListener()->getUUID()); -} - -const std::string& LLFolderViewItem::getName( void ) const -{ - if(mListener) - { - return mListener->getName(); - } - return mLabel; -} - -// LLView functionality -BOOL LLFolderViewItem::handleRightMouseDown( S32 x, S32 y, MASK mask ) -{ - if(!mIsSelected) - { - setSelectionFromRoot(this, FALSE); - } - make_ui_sound("UISndClick"); - return TRUE; -} - -BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask ) -{ - if (LLView::childrenHandleMouseDown(x, y, mask)) - { - return TRUE; - } - - // No handler needed for focus lost since this class has no - // state that depends on it. - gFocusMgr.setMouseCapture( this ); - - if (!mIsSelected) - { - if(mask & MASK_CONTROL) - { - changeSelectionFromRoot(this, !mIsSelected); - } - else if (mask & MASK_SHIFT) - { - getParentFolder()->extendSelectionTo(this); - } - else - { - setSelectionFromRoot(this, FALSE); - } - make_ui_sound("UISndClick"); - } - else - { - mSelectPending = TRUE; - } - - if( isMovable() ) - { - S32 screen_x; - S32 screen_y; - localPointToScreen(x, y, &screen_x, &screen_y ); - LLToolDragAndDrop::getInstance()->setDragStart( screen_x, screen_y ); - } - return TRUE; -} - -BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask ) -{ - mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight)); - - if( hasMouseCapture() && isMovable() ) - { - S32 screen_x; - S32 screen_y; - localPointToScreen(x, y, &screen_x, &screen_y ); - BOOL can_drag = TRUE; - if( LLToolDragAndDrop::getInstance()->isOverThreshold( screen_x, screen_y ) ) - { - LLFolderView* root = getRoot(); - - if(root->getCurSelectedItem()) - { - LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_WORLD; - - // *TODO: push this into listener and remove - // dependency on llagent - if (mListener - && gInventory.isObjectDescendentOf(mListener->getUUID(), gInventory.getRootFolderID())) - { - src = LLToolDragAndDrop::SOURCE_AGENT; - } - else if (mListener - && gInventory.isObjectDescendentOf(mListener->getUUID(), gInventory.getLibraryRootFolderID())) - { - src = LLToolDragAndDrop::SOURCE_LIBRARY; - } - - can_drag = root->startDrag(src); - if (can_drag) - { - // if (mListener) mListener->startDrag(); - // RN: when starting drag and drop, clear out last auto-open - root->autoOpenTest(NULL); - root->setShowSelectionContext(TRUE); - - // Release keyboard focus, so that if stuff is dropped into the - // world, pressing the delete key won't blow away the inventory - // item. - gFocusMgr.setKeyboardFocus(NULL); - - return LLToolDragAndDrop::getInstance()->handleHover( x, y, mask ); - } - } - } - - if (can_drag) - { - gViewerWindow->setCursor(UI_CURSOR_ARROW); - } - else - { - gViewerWindow->setCursor(UI_CURSOR_NOLOCKED); - } - return TRUE; - } - else - { - getRoot()->setShowSelectionContext(FALSE); - gViewerWindow->setCursor(UI_CURSOR_ARROW); - // let parent handle this then... - return FALSE; - } -} - - -BOOL LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask ) -{ - preview(); - return TRUE; -} - -BOOL LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask ) -{ - if (LLView::childrenHandleMouseUp(x, y, mask)) - { - return TRUE; - } - - // if mouse hasn't moved since mouse down... - if ( pointInView(x, y) && mSelectPending ) - { - //...then select - if(mask & MASK_CONTROL) - { - changeSelectionFromRoot(this, !mIsSelected); - } - else if (mask & MASK_SHIFT) - { - getParentFolder()->extendSelectionTo(this); - } - else - { - setSelectionFromRoot(this, FALSE); - } - } - - mSelectPending = FALSE; - - if( hasMouseCapture() ) - { - getRoot()->setShowSelectionContext(FALSE); - gFocusMgr.setMouseCapture( NULL ); - } - return TRUE; -} - -void LLFolderViewItem::onMouseLeave(S32 x, S32 y, MASK mask) -{ - mIsMouseOverTitle = false; -} - -BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg) -{ - BOOL accepted = FALSE; - BOOL handled = FALSE; - if(mListener) - { - accepted = mListener->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg); - handled = accepted; - if (accepted) - { - mDragAndDropTarget = TRUE; - *accept = ACCEPT_YES_MULTI; - } - else - { - *accept = ACCEPT_NO; - } - } - if(mParentFolder && !handled) - { - // store this item to get it in LLFolderBridge::dragItemIntoFolder on drop event. - mRoot->setDraggingOverItem(this); - handled = mParentFolder->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg); - mRoot->setDraggingOverItem(NULL); - } - if (handled) - { - lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewItem" << llendl; - } - - return handled; -} - -void LLFolderViewItem::draw() -{ - static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); - static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); - static LLUIColor sHighlightFgColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE); - static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE); - static LLUIColor sFilterBGColor = LLUIColorTable::instance().getColor("FilterBackgroundColor", DEFAULT_WHITE); - 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); - static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE); - - const Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>(); - const S32 TOP_PAD = default_params.item_top_pad; - const S32 FOCUS_LEFT = 1; - const LLFontGL* font = getLabelFontForStyle(mLabelStyle); - - const BOOL in_inventory = getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(), gInventory.getRootFolderID()); - const BOOL in_library = getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(), gInventory.getLibraryRootFolderID()); - - //--------------------------------------------------------------------------------// - // Draw open folder arrow - // - const bool up_to_date = mListener && mListener->isUpToDate(); - const bool possibly_has_children = ((up_to_date && hasVisibleChildren()) // we fetched our children and some of them have passed the filter... - || (!up_to_date && mListener && mListener->hasChildren())); // ...or we know we have children but haven't fetched them (doesn't obey filter) - if (possibly_has_children) - { - LLUIImage* arrow_image = default_params.folder_arrow_image; - gl_draw_scaled_rotated_image( - mIndentation, getRect().getHeight() - ARROW_SIZE - TEXT_PAD - TOP_PAD, - ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, arrow_image->getImage(), sFgColor); - } - - - //--------------------------------------------------------------------------------// - // Draw highlight for selected items - // - const BOOL show_context = getRoot()->getShowSelectionContext(); - const BOOL filled = show_context || (getRoot()->getParentPanel()->hasFocus()); // If we have keyboard focus, draw selection filled - const S32 focus_top = getRect().getHeight(); - const S32 focus_bottom = getRect().getHeight() - mItemHeight; - const bool folder_open = (getRect().getHeight() > mItemHeight + 4); - if (mIsSelected) // always render "current" item. Only render other selected items if mShowSingleSelection is FALSE - { - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - LLColor4 bg_color = sHighlightBgColor; - if (!mIsCurSelection) - { - // do time-based fade of extra objects - F32 fade_time = getRoot()->getSelectionFadeElapsedTime(); - if (getRoot()->getShowSingleSelection()) - { - // fading out - bg_color.mV[VALPHA] = clamp_rescale(fade_time, 0.f, 0.4f, bg_color.mV[VALPHA], 0.f); - } - else - { - // fading in - bg_color.mV[VALPHA] = clamp_rescale(fade_time, 0.f, 0.4f, 0.f, bg_color.mV[VALPHA]); - } - } - gl_rect_2d(FOCUS_LEFT, - focus_top, - getRect().getWidth() - 2, - focus_bottom, - bg_color, filled); - if (mIsCurSelection) - { - gl_rect_2d(FOCUS_LEFT, - focus_top, - getRect().getWidth() - 2, - focus_bottom, - sFocusOutlineColor, FALSE); - } - if (folder_open) - { - gl_rect_2d(FOCUS_LEFT, - focus_bottom + 1, // overlap with bottom edge of above rect - getRect().getWidth() - 2, - 0, - sFocusOutlineColor, FALSE); - if (show_context) - { - gl_rect_2d(FOCUS_LEFT, - focus_bottom + 1, - getRect().getWidth() - 2, - 0, - sHighlightBgColor, TRUE); - } - } - } - else if (mIsMouseOverTitle) - { - gl_rect_2d(FOCUS_LEFT, - focus_top, - getRect().getWidth() - 2, - focus_bottom, - sMouseOverColor, FALSE); - } - - //--------------------------------------------------------------------------------// - // Draw DragNDrop highlight - // - if (mDragAndDropTarget) - { - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gl_rect_2d(FOCUS_LEFT, - focus_top, - getRect().getWidth() - 2, - focus_bottom, - sHighlightBgColor, FALSE); - if (folder_open) - { - gl_rect_2d(FOCUS_LEFT, - focus_bottom + 1, // overlap with bottom edge of above rect - getRect().getWidth() - 2, - 0, - sHighlightBgColor, FALSE); - } - mDragAndDropTarget = FALSE; - } - - const LLViewerInventoryItem *item = getInventoryItem(); - const BOOL highlight_link = mIconOverlay && item && item->getIsLinkType(); - //--------------------------------------------------------------------------------// - // Draw open icon - // - const S32 icon_x = mIndentation + ARROW_SIZE + TEXT_PAD; - if (!mIconOpen.isNull() && (llabs(mControlLabelRotation) > 80)) // For open folders - { - mIconOpen->draw(icon_x, getRect().getHeight() - mIconOpen->getHeight() - TOP_PAD + 1); - } - else if (mIcon) - { - mIcon->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1); - } - - if (highlight_link) - { - mIconOverlay->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1); - } - - //--------------------------------------------------------------------------------// - // Exit if no label to draw - // - if (mLabel.empty()) - { - return; - } - - LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor; - if (highlight_link) color = sLinkColor; - if (in_library) color = sLibraryColor; - - F32 right_x = 0; - F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD; - F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation); - - //--------------------------------------------------------------------------------// - // Highlight filtered text - // - if (getRoot()->getDebugFilters()) - { - if (!getFiltered() && !possibly_has_children) - { - color.mV[VALPHA] *= 0.5f; - } - LLColor4 filter_color = mLastFilterGeneration >= getRoot()->getFilter()->getCurrentGeneration() ? - LLColor4(0.5f, 0.8f, 0.5f, 1.f) : - LLColor4(0.8f, 0.5f, 0.5f, 1.f); - LLFontGL::getFontMonospace()->renderUTF8(mStatusText, 0, text_left, y, filter_color, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, S32_MAX, &right_x, FALSE ); - text_left = right_x; - } - //--------------------------------------------------------------------------------// - // Draw the actual label text - // - font->renderUTF8(mLabel, 0, text_left, y, color, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE); - - //--------------------------------------------------------------------------------// - // Draw "Loading..." text - // - bool root_is_loading = false; - if (in_inventory) - { - root_is_loading = LLInventoryModelBackgroundFetch::instance().inventoryFetchInProgress(); - } - if (in_library) - { - root_is_loading = LLInventoryModelBackgroundFetch::instance().libraryFetchInProgress(); - } - if ((mIsLoading - && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) - || (LLInventoryModelBackgroundFetch::instance().folderFetchActive() - && root_is_loading - && mShowLoadStatus)) - { - std::string load_string = " ( " + LLTrans::getString("LoadingData") + " ) "; - font->renderUTF8(load_string, 0, right_x, y, sSearchStatusColor, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, S32_MAX, &right_x, FALSE); - } - - //--------------------------------------------------------------------------------// - // Draw label suffix - // - if (!mLabelSuffix.empty()) - { - font->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, S32_MAX, &right_x, FALSE ); - } - - //--------------------------------------------------------------------------------// - // Highlight string match - // - if (mStringMatchOffset != std::string::npos) - { - // don't draw backgrounds for zero-length strings - S32 filter_string_length = getRoot()->getFilterSubString().size(); - if (filter_string_length > 0) - { - std::string combined_string = mLabel + mLabelSuffix; - S32 left = llround(text_left) + font->getWidth(combined_string, 0, mStringMatchOffset) - 1; - S32 right = left + font->getWidth(combined_string, mStringMatchOffset, filter_string_length) + 2; - S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD); - S32 top = getRect().getHeight() - TOP_PAD; - - LLUIImage* box_image = default_params.selection_image; - LLRect box_rect(left, top, right, bottom); - box_image->draw(box_rect, sFilterBGColor); - F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, mStringMatchOffset); - F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD; - font->renderUTF8( combined_string, mStringMatchOffset, match_string_left, yy, - sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - filter_string_length, S32_MAX, &right_x, FALSE ); - } - } -} - -bool LLFolderViewItem::isInSelection() const -{ - return mIsSelected || (mParentFolder && mParentFolder->isInSelection()); -} - -///---------------------------------------------------------------------------- -/// Class LLFolderViewFolder -///---------------------------------------------------------------------------- - -LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ): - LLFolderViewItem( p ), // 0 = no create time - mIsOpen(FALSE), - mExpanderHighlighted(FALSE), - mCurHeight(0.f), - mTargetHeight(0.f), - mAutoOpenCountdown(0.f), - mSubtreeCreationDate(0), - mAmTrash(LLFolderViewFolder::UNKNOWN), - mLastArrangeGeneration( -1 ), - mLastCalculatedWidth(0), - mCompletedFilterGeneration(-1), - mMostFilteredDescendantGeneration(-1), - mNeedsSort(false), - mPassedFolderFilter(FALSE) -{ -} - -// Destroys the object -LLFolderViewFolder::~LLFolderViewFolder( void ) -{ - // The LLView base class takes care of object destruction. make sure that we - // don't have mouse or keyboard focus - gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit() -} - -void LLFolderViewFolder::setFilteredFolder(bool filtered, S32 filter_generation) -{ - mPassedFolderFilter = filtered; - mLastFilterGeneration = filter_generation; -} - -bool LLFolderViewFolder::getFilteredFolder(S32 filter_generation) -{ - return mPassedFolderFilter && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration(); -} - -// addToFolder() returns TRUE if it succeeds. FALSE otherwise -BOOL LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder, LLFolderView* root) -{ - if (!folder) - { - return FALSE; - } - mParentFolder = folder; - root->addItemID(getListener()->getUUID(), this); - return folder->addFolder(this); -} - -// Finds width and height of this object and its children. Also -// makes sure that this view and its children are the right size. -S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation) -{ - // sort before laying out contents - if (mNeedsSort) - { - mFolders.sort(mSortFunction); - mItems.sort(mSortFunction); - mNeedsSort = false; - } - - // evaluate mHasVisibleChildren - mHasVisibleChildren = false; - if (hasFilteredDescendants(filter_generation)) - { - // We have to verify that there's at least one child that's not filtered out - bool found = false; - // Try the items first - for (items_t::iterator iit = mItems.begin(); iit != mItems.end(); ++iit) - { - LLFolderViewItem* itemp = (*iit); - found = (itemp->getFiltered(filter_generation)); - if (found) - break; - } - if (!found) - { - // If no item found, try the folders - for (folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit) - { - LLFolderViewFolder* folderp = (*fit); - found = ( folderp->getListener() - && (folderp->getFiltered(filter_generation) - || (folderp->getFilteredFolder(filter_generation) - && folderp->hasFilteredDescendants(filter_generation)))); - if (found) - break; - } - } - - mHasVisibleChildren = found; - } - - // calculate height as a single item (without any children), and reshapes rectangle to match - LLFolderViewItem::arrange( width, height, filter_generation ); - - // clamp existing animated height so as to never get smaller than a single item - mCurHeight = llmax((F32)*height, mCurHeight); - - // initialize running height value as height of single item in case we have no children - *height = getItemHeight(); - F32 running_height = (F32)*height; - F32 target_height = (F32)*height; - - // are my children visible? - if (needsArrange()) - { - // set last arrange generation first, in case children are animating - // and need to be arranged again - mLastArrangeGeneration = getRoot()->getArrangeGeneration(); - if (mIsOpen) - { - // Add sizes of children - S32 parent_item_height = getRect().getHeight(); - - for(folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit) - { - LLFolderViewFolder* folderp = (*fit); - if (getRoot()->getDebugFilters()) - { - folderp->setVisible(TRUE); - } - else - { - folderp->setVisible( folderp->getListener() - && (folderp->getFiltered(filter_generation) - || (folderp->getFilteredFolder(filter_generation) - && folderp->hasFilteredDescendants(filter_generation)))); // passed filter or has descendants that passed filter - } - - if (folderp->getVisible()) - { - S32 child_width = *width; - S32 child_height = 0; - S32 child_top = parent_item_height - llround(running_height); - - target_height += folderp->arrange( &child_width, &child_height, filter_generation ); - - running_height += (F32)child_height; - *width = llmax(*width, child_width); - folderp->setOrigin( 0, child_top - folderp->getRect().getHeight() ); - } - } - for(items_t::iterator iit = mItems.begin(); - iit != mItems.end(); ++iit) - { - LLFolderViewItem* itemp = (*iit); - if (getRoot()->getDebugFilters()) - { - itemp->setVisible(TRUE); - } - else - { - itemp->setVisible(itemp->getFiltered(filter_generation)); - } - - if (itemp->getVisible()) - { - S32 child_width = *width; - S32 child_height = 0; - S32 child_top = parent_item_height - llround(running_height); - - target_height += itemp->arrange( &child_width, &child_height, filter_generation ); - // don't change width, as this item is as wide as its parent folder by construction - itemp->reshape( itemp->getRect().getWidth(), child_height); - - running_height += (F32)child_height; - *width = llmax(*width, child_width); - itemp->setOrigin( 0, child_top - itemp->getRect().getHeight() ); - } - } - } - - mTargetHeight = target_height; - // cache this width so next time we can just return it - mLastCalculatedWidth = *width; - } - else - { - // just use existing width - *width = mLastCalculatedWidth; - } - - // animate current height towards target height - if (llabs(mCurHeight - mTargetHeight) > 1.f) - { - mCurHeight = lerp(mCurHeight, mTargetHeight, LLCriticalDamp::getInterpolant(mIsOpen ? FOLDER_OPEN_TIME_CONSTANT : FOLDER_CLOSE_TIME_CONSTANT)); - - requestArrange(); - - // hide child elements that fall out of current animated height - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) - { - folders_t::iterator fit = iter++; - // number of pixels that bottom of folder label is from top of parent folder - if (getRect().getHeight() - (*fit)->getRect().mTop + (*fit)->getItemHeight() - > llround(mCurHeight) + MAX_FOLDER_ITEM_OVERLAP) - { - // hide if beyond current folder height - (*fit)->setVisible(FALSE); - } - } - - for (items_t::iterator iter = mItems.begin(); - iter != mItems.end();) - { - items_t::iterator iit = iter++; - // number of pixels that bottom of item label is from top of parent folder - if (getRect().getHeight() - (*iit)->getRect().mBottom - > llround(mCurHeight) + MAX_FOLDER_ITEM_OVERLAP) - { - (*iit)->setVisible(FALSE); - } - } - } - else - { - mCurHeight = mTargetHeight; - } - - // don't change width as this item is already as wide as its parent folder - reshape(getRect().getWidth(),llround(mCurHeight)); - - // pass current height value back to parent - *height = llround(mCurHeight); - - return llround(mTargetHeight); -} - -BOOL LLFolderViewFolder::needsArrange() -{ - return mLastArrangeGeneration < getRoot()->getArrangeGeneration(); -} - -void LLFolderViewFolder::requestSort() -{ - mNeedsSort = true; - // whenever item order changes, we need to lay things out again - requestArrange(); -} - -void LLFolderViewFolder::setCompletedFilterGeneration(S32 generation, BOOL recurse_up) -{ - //mMostFilteredDescendantGeneration = llmin(mMostFilteredDescendantGeneration, generation); - mCompletedFilterGeneration = generation; - // only aggregate up if we are a lower (older) value - if (recurse_up - && mParentFolder - && generation < mParentFolder->getCompletedFilterGeneration()) - { - mParentFolder->setCompletedFilterGeneration(generation, TRUE); - } -} - -void LLFolderViewFolder::filter( LLInventoryFilter& filter) -{ - S32 filter_generation = filter.getCurrentGeneration(); - // if failed to pass filter newer than must_pass_generation - // you will automatically fail this time, so we only - // check against items that have passed the filter - S32 must_pass_generation = filter.getMustPassGeneration(); - - bool autoopen_folders = (filter.hasFilterString()); - - // if we have already been filtered against this generation, skip out - if (getCompletedFilterGeneration() >= filter_generation) - { - return; - } - - // filter folder itself - if (getLastFilterGeneration() < filter_generation) - { - if (getLastFilterGeneration() >= must_pass_generation // folder has been compared to a valid precursor filter - && !mPassedFilter) // and did not pass the filter - { - // go ahead and flag this folder as done - mLastFilterGeneration = filter_generation; - mStringMatchOffset = std::string::npos; - } - else // filter self only on first pass through - { - // filter against folder rules - filterFolder(filter); - // and then item rules - LLFolderViewItem::filter( filter ); - } - } - - if (getRoot()->getDebugFilters()) - { - mStatusText = llformat("%d", mLastFilterGeneration); - mStatusText += llformat("(%d)", mCompletedFilterGeneration); - mStatusText += llformat("+%d", mMostFilteredDescendantGeneration); - } - - // all descendants have been filtered later than must pass generation - // but none passed - if(getCompletedFilterGeneration() >= must_pass_generation && !hasFilteredDescendants(must_pass_generation)) - { - // don't traverse children if we've already filtered them since must_pass_generation - // and came back with nothing - return; - } - - // we entered here with at least one filter iteration left - // check to see if we have any more before continuing on to children - if (filter.getFilterCount() < 0) - { - return; - } - - // when applying a filter, matching folders get their contents downloaded first - if (filter.isNotDefault() - && getFiltered(filter.getMinRequiredGeneration()) - && (mListener - && !gInventory.isCategoryComplete(mListener->getUUID()))) - { - LLInventoryModelBackgroundFetch::instance().start(mListener->getUUID()); - } - - // now query children - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end(); - ++iter) - { - LLFolderViewFolder* folder = (*iter); - // have we run out of iterations this frame? - if (filter.getFilterCount() < 0) - { - break; - } - - // mMostFilteredDescendantGeneration might have been reset - // in which case we need to update it even for folders that - // don't need to be filtered anymore - if (folder->getCompletedFilterGeneration() >= filter_generation) - { - // track latest generation to pass any child items - if (folder->getFiltered() || folder->hasFilteredDescendants(filter.getMinRequiredGeneration())) - { - mMostFilteredDescendantGeneration = filter_generation; - requestArrange(); - } - // just skip it, it has already been filtered - continue; - } - - // update this folders filter status (and children) - folder->filter( filter ); - - // track latest generation to pass any child items - if (folder->getFiltered() || folder->hasFilteredDescendants(filter_generation)) - { - mMostFilteredDescendantGeneration = filter_generation; - requestArrange(); - if (getRoot()->needsAutoSelect() && autoopen_folders) - { - folder->setOpenArrangeRecursively(TRUE); - } - } - } - - for (items_t::iterator iter = mItems.begin(); - iter != mItems.end(); - ++iter) - { - LLFolderViewItem* item = (*iter); - if (filter.getFilterCount() < 0) - { - break; - } - if (item->getLastFilterGeneration() >= filter_generation) - { - if (item->getFiltered()) - { - mMostFilteredDescendantGeneration = filter_generation; - requestArrange(); - } - continue; - } - - if (item->getLastFilterGeneration() >= must_pass_generation && - !item->getFiltered(must_pass_generation)) - { - // failed to pass an earlier filter that was a subset of the current one - // go ahead and flag this item as done - item->setFiltered(FALSE, filter_generation); - continue; - } - - item->filter( filter ); - - if (item->getFiltered(filter.getMinRequiredGeneration())) - { - mMostFilteredDescendantGeneration = filter_generation; - requestArrange(); - } - } - - // if we didn't use all filter iterations - // that means we filtered all of our descendants - // instead of exhausting the filter count for this frame - if (filter.getFilterCount() > 0) - { - // flag this folder as having completed filter pass for all descendants - setCompletedFilterGeneration(filter_generation, FALSE/*dont recurse up to root*/); - } -} - -void LLFolderViewFolder::filterFolder(LLInventoryFilter& filter) -{ - const BOOL previous_passed_filter = mPassedFolderFilter; - const BOOL passed_filter = filter.checkFolder(this); - - // If our visibility will change as a result of this filter, then - // we need to be rearranged in our parent folder - if (mParentFolder) - { - if (getVisible() != passed_filter - || previous_passed_filter != passed_filter ) - { - mParentFolder->requestArrange(); - } - } - - setFilteredFolder(passed_filter, filter.getCurrentGeneration()); - filter.decrementFilterCount(); - - if (getRoot()->getDebugFilters()) - { - mStatusText = llformat("%d", mLastFilterGeneration); - } -} - -void LLFolderViewFolder::setFiltered(BOOL filtered, S32 filter_generation) -{ - // if this folder is now filtered, but wasn't before - // (it just passed) - if (filtered && !mPassedFilter) - { - // reset current height, because last time we drew it - // it might have had more visible items than now - mCurHeight = 0.f; - } - - LLFolderViewItem::setFiltered(filtered, filter_generation); -} - -void LLFolderViewFolder::dirtyFilter() -{ - // we're a folder, so invalidate our completed generation - setCompletedFilterGeneration(-1, FALSE); - LLFolderViewItem::dirtyFilter(); -} - -BOOL LLFolderViewFolder::getFiltered() -{ - return getFilteredFolder(getRoot()->getFilter()->getMinRequiredGeneration()) - && LLFolderViewItem::getFiltered(); -} - -BOOL LLFolderViewFolder::getFiltered(S32 filter_generation) -{ - return getFilteredFolder(filter_generation) && LLFolderViewItem::getFiltered(filter_generation); -} - -BOOL LLFolderViewFolder::hasFilteredDescendants(S32 filter_generation) -{ - return mMostFilteredDescendantGeneration >= filter_generation; -} - - -BOOL LLFolderViewFolder::hasFilteredDescendants() -{ - return mMostFilteredDescendantGeneration >= getRoot()->getFilter()->getCurrentGeneration(); -} - -// Passes selection information on to children and record selection -// information if necessary. -BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem, - BOOL take_keyboard_focus) -{ - BOOL rv = FALSE; - if (selection == this) - { - if (!isSelected()) - { - selectItem(); - } - rv = TRUE; - } - else - { - if (isSelected()) - { - deselectItem(); - } - rv = FALSE; - } - BOOL child_selected = FALSE; - - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) - { - folders_t::iterator fit = iter++; - if((*fit)->setSelection(selection, openitem, take_keyboard_focus)) - { - rv = TRUE; - child_selected = TRUE; - } - } - for (items_t::iterator iter = mItems.begin(); - iter != mItems.end();) - { - items_t::iterator iit = iter++; - if((*iit)->setSelection(selection, openitem, take_keyboard_focus)) - { - rv = TRUE; - child_selected = TRUE; - } - } - if(openitem && child_selected) - { - setOpenArrangeRecursively(TRUE); - } - return rv; -} - -// This method is used to change the selection of an item. -// Recursively traverse all children; if 'selection' is 'this' then change -// the select status if necessary. -// Returns TRUE if the selection state of this folder, or of a child, was changed. -BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selected) -{ - BOOL rv = FALSE; - if(selection == this) - { - if (isSelected() != selected) - { - rv = TRUE; - if (selected) - { - selectItem(); - } - else - { - deselectItem(); - } - } - } - - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) - { - folders_t::iterator fit = iter++; - if((*fit)->changeSelection(selection, selected)) - { - rv = TRUE; - } - } - for (items_t::iterator iter = mItems.begin(); - iter != mItems.end();) - { - items_t::iterator iit = iter++; - if((*iit)->changeSelection(selection, selected)) - { - rv = TRUE; - } - } - return rv; -} - -LLFolderViewFolder* LLFolderViewFolder::getCommonAncestor(LLFolderViewItem* item_a, LLFolderViewItem* item_b, bool& reverse) -{ - if (!item_a->getParentFolder() || !item_b->getParentFolder()) return NULL; - - std::deque<LLFolderViewFolder*> item_a_ancestors; - - LLFolderViewFolder* parent = item_a->getParentFolder(); - while(parent) - { - item_a_ancestors.push_back(parent); - parent = parent->getParentFolder(); - } - - std::deque<LLFolderViewFolder*> item_b_ancestors; - - parent = item_b->getParentFolder(); - while(parent) - { - item_b_ancestors.push_back(parent); - parent = parent->getParentFolder(); - } - - LLFolderViewFolder* common_ancestor = item_a->getRoot(); - - while(item_a_ancestors.size() > item_b_ancestors.size()) - { - item_a = item_a_ancestors.front(); - item_a_ancestors.pop_front(); - } - - while(item_b_ancestors.size() > item_a_ancestors.size()) - { - item_b = item_b_ancestors.front(); - item_b_ancestors.pop_front(); - } - - while(item_a_ancestors.size()) - { - common_ancestor = item_a_ancestors.front(); - - if (item_a_ancestors.front() == item_b_ancestors.front()) - { - // which came first, sibling a or sibling b? - for (folders_t::iterator it = common_ancestor->mFolders.begin(), end_it = common_ancestor->mFolders.end(); - it != end_it; - ++it) - { - LLFolderViewItem* item = *it; - - if (item == item_a) - { - reverse = false; - return common_ancestor; - } - if (item == item_b) - { - reverse = true; - return common_ancestor; - } - } - - for (items_t::iterator it = common_ancestor->mItems.begin(), end_it = common_ancestor->mItems.end(); - it != end_it; - ++it) - { - LLFolderViewItem* item = *it; - - if (item == item_a) - { - reverse = false; - return common_ancestor; - } - if (item == item_b) - { - reverse = true; - return common_ancestor; - } - } - break; - } - - item_a = item_a_ancestors.front(); - item_a_ancestors.pop_front(); - item_b = item_b_ancestors.front(); - item_b_ancestors.pop_front(); - } - - return NULL; -} - -void LLFolderViewFolder::gatherChildRangeExclusive(LLFolderViewItem* start, LLFolderViewItem* end, bool reverse, std::vector<LLFolderViewItem*>& items) -{ - bool selecting = start == NULL; - if (reverse) - { - for (items_t::reverse_iterator it = mItems.rbegin(), end_it = mItems.rend(); - it != end_it; - ++it) - { - if (*it == end) - { - return; - } - if (selecting) - { - items.push_back(*it); - } - - if (*it == start) - { - selecting = true; - } - } - for (folders_t::reverse_iterator it = mFolders.rbegin(), end_it = mFolders.rend(); - it != end_it; - ++it) - { - if (*it == end) - { - return; - } - - if (selecting) - { - items.push_back(*it); - } - - if (*it == start) - { - selecting = true; - } - } - } - else - { - for (folders_t::iterator it = mFolders.begin(), end_it = mFolders.end(); - it != end_it; - ++it) - { - if (*it == end) - { - return; - } - - if (selecting) - { - items.push_back(*it); - } - - if (*it == start) - { - selecting = true; - } - } - for (items_t::iterator it = mItems.begin(), end_it = mItems.end(); - it != end_it; - ++it) - { - if (*it == end) - { - return; - } - - if (selecting) - { - items.push_back(*it); - } - - if (*it == start) - { - selecting = true; - } - } - } -} - -void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection) -{ - if (getRoot()->getAllowMultiSelect() == FALSE) return; - - LLFolderViewItem* cur_selected_item = getRoot()->getCurSelectedItem(); - if (cur_selected_item == NULL) - { - cur_selected_item = new_selection; - } - - - bool reverse = false; - LLFolderViewFolder* common_ancestor = getCommonAncestor(cur_selected_item, new_selection, reverse); - if (!common_ancestor) return; - - LLFolderViewItem* last_selected_item_from_cur = cur_selected_item; - LLFolderViewFolder* cur_folder = cur_selected_item->getParentFolder(); - - std::vector<LLFolderViewItem*> items_to_select_forward; - - while(cur_folder != common_ancestor) - { - cur_folder->gatherChildRangeExclusive(last_selected_item_from_cur, NULL, reverse, items_to_select_forward); - - last_selected_item_from_cur = cur_folder; - cur_folder = cur_folder->getParentFolder(); - } - - std::vector<LLFolderViewItem*> items_to_select_reverse; - - LLFolderViewItem* last_selected_item_from_new = new_selection; - cur_folder = new_selection->getParentFolder(); - while(cur_folder != common_ancestor) - { - cur_folder->gatherChildRangeExclusive(last_selected_item_from_new, NULL, !reverse, items_to_select_reverse); - - last_selected_item_from_new = cur_folder; - cur_folder = cur_folder->getParentFolder(); - } - - common_ancestor->gatherChildRangeExclusive(last_selected_item_from_cur, last_selected_item_from_new, reverse, items_to_select_forward); - - for (std::vector<LLFolderViewItem*>::reverse_iterator it = items_to_select_reverse.rbegin(), end_it = items_to_select_reverse.rend(); - it != end_it; - ++it) - { - items_to_select_forward.push_back(*it); - } - - LLFolderView* root = getRoot(); - - for (std::vector<LLFolderViewItem*>::iterator it = items_to_select_forward.begin(), end_it = items_to_select_forward.end(); - it != end_it; - ++it) - { - LLFolderViewItem* item = *it; - if (item->isSelected()) - { - root->removeFromSelectionList(item); - } - else - { - item->selectItem(); - } - root->addToSelectionList(item); - } - - if (new_selection->isSelected()) - { - root->removeFromSelectionList(new_selection); - } - else - { - new_selection->selectItem(); - } - root->addToSelectionList(new_selection); -} - - -void LLFolderViewFolder::destroyView() -{ - for (items_t::iterator iter = mItems.begin(); - iter != mItems.end();) - { - items_t::iterator iit = iter++; - LLFolderViewItem* item = (*iit); - getRoot()->removeItemID(item->getListener()->getUUID()); - } - - std::for_each(mItems.begin(), mItems.end(), DeletePointer()); - mItems.clear(); - - while (!mFolders.empty()) - { - LLFolderViewFolder *folderp = mFolders.back(); - folderp->destroyView(); // removes entry from mFolders - } - - //deleteAllChildren(); - - if (mParentFolder) - { - mParentFolder->removeView(this); - } -} - -// remove the specified item (and any children) if possible. Return -// TRUE if the item was deleted. -BOOL LLFolderViewFolder::removeItem(LLFolderViewItem* item) -{ - if(item->remove()) - { - return TRUE; - } - return FALSE; -} - -// simply remove the view (and any children) Don't bother telling the -// listeners. -void LLFolderViewFolder::removeView(LLFolderViewItem* item) -{ - if (!item || item->getParentFolder() != this) - { - return; - } - // deselect without traversing hierarchy - if (item->isSelected()) - { - item->deselectItem(); - } - getRoot()->removeFromSelectionList(item); - extractItem(item); - delete item; -} - -// extractItem() removes the specified item from the folder, but -// doesn't delete it. -void LLFolderViewFolder::extractItem( LLFolderViewItem* item ) -{ - items_t::iterator it = std::find(mItems.begin(), mItems.end(), item); - if(it == mItems.end()) - { - // This is an evil downcast. However, it's only doing - // pointer comparison to find if (which it should be ) the - // item is in the container, so it's pretty safe. - LLFolderViewFolder* f = static_cast<LLFolderViewFolder*>(item); - folders_t::iterator ft; - ft = std::find(mFolders.begin(), mFolders.end(), f); - if (ft != mFolders.end()) - { - mFolders.erase(ft); - } - } - else - { - mItems.erase(it); - } - //item has been removed, need to update filter - dirtyFilter(); - //because an item is going away regardless of filter status, force rearrange - requestArrange(); - getRoot()->removeItemID(item->getListener()->getUUID()); - removeChild(item); -} - -bool LLFolderViewFolder::isTrash() const -{ - if (mAmTrash == LLFolderViewFolder::UNKNOWN) - { - mAmTrash = mListener->getUUID() == gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH, false) ? LLFolderViewFolder::TRASH : LLFolderViewFolder::NOT_TRASH; - } - return mAmTrash == LLFolderViewFolder::TRASH; -} - -void LLFolderViewFolder::sortBy(U32 order) -{ - if (!mSortFunction.updateSort(order)) - { - // No changes. - return; - } - - // Propagate this change to sub folders - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) - { - folders_t::iterator fit = iter++; - (*fit)->sortBy(order); - } - - // Don't sort the topmost folders (My Inventory and Library) - if (mListener->getUUID().notNull()) - { - mFolders.sort(mSortFunction); - mItems.sort(mSortFunction); - } - - if (order & LLInventoryFilter::SO_DATE) - { - time_t latest = 0; - - if (!mItems.empty()) - { - LLFolderViewItem* item = *(mItems.begin()); - latest = item->getCreationDate(); - } - - if (!mFolders.empty()) - { - LLFolderViewFolder* folder = *(mFolders.begin()); - if (folder->getCreationDate() > latest) - { - latest = folder->getCreationDate(); - } - } - mSubtreeCreationDate = latest; - } -} - -void LLFolderViewFolder::setItemSortOrder(U32 ordering) -{ - if (mSortFunction.updateSort(ordering)) - { - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) - { - folders_t::iterator fit = iter++; - (*fit)->setItemSortOrder(ordering); - } - - mFolders.sort(mSortFunction); - mItems.sort(mSortFunction); - } -} - -EInventorySortGroup LLFolderViewFolder::getSortGroup() const -{ - if (isTrash()) - { - return SG_TRASH_FOLDER; - } - - if( mListener ) - { - if(LLFolderType::lookupIsProtectedType(mListener->getPreferredType())) - { - return SG_SYSTEM_FOLDER; - } - } - - return SG_NORMAL_FOLDER; -} - -BOOL LLFolderViewFolder::isMovable() -{ - if( mListener ) - { - if( !(mListener->isItemMovable()) ) - { - return FALSE; - } - - for (items_t::iterator iter = mItems.begin(); - iter != mItems.end();) - { - items_t::iterator iit = iter++; - if(!(*iit)->isMovable()) - { - return FALSE; - } - } - - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) - { - folders_t::iterator fit = iter++; - if(!(*fit)->isMovable()) - { - return FALSE; - } - } - } - return TRUE; -} - - -BOOL LLFolderViewFolder::isRemovable() -{ - if( mListener ) - { - if( !(mListener->isItemRemovable()) ) - { - return FALSE; - } - - for (items_t::iterator iter = mItems.begin(); - iter != mItems.end();) - { - items_t::iterator iit = iter++; - if(!(*iit)->isRemovable()) - { - return FALSE; - } - } - - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) - { - folders_t::iterator fit = iter++; - if(!(*fit)->isRemovable()) - { - return FALSE; - } - } - } - return TRUE; -} - -// this is an internal method used for adding items to folders. -BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item) -{ - mItems.push_back(item); - - item->setRect(LLRect(0, 0, getRect().getWidth(), 0)); - item->setVisible(FALSE); - - addChild(item); - - item->dirtyFilter(); - - // Update the folder creation date if the child is newer than our current date - setCreationDate(llmax<time_t>(mCreationDate, item->getCreationDate())); - - // Handle sorting - requestArrange(); - requestSort(); - - // Traverse parent folders and update creation date and resort, if necessary - LLFolderViewFolder* parentp = getParentFolder(); - while (parentp) - { - // Update the folder creation date if the child is newer than our current date - parentp->setCreationDate(llmax<time_t>(parentp->mCreationDate, item->getCreationDate())); - - if (parentp->mSortFunction.isByDate()) - { - // parent folder doesn't have a time stamp yet, so get it from us - parentp->requestSort(); - } - - parentp = parentp->getParentFolder(); - } - - return TRUE; -} - -// this is an internal method used for adding items to folders. -BOOL LLFolderViewFolder::addFolder(LLFolderViewFolder* folder) -{ - mFolders.push_back(folder); - folder->setOrigin(0, 0); - folder->reshape(getRect().getWidth(), 0); - folder->setVisible(FALSE); - addChild( folder ); - folder->dirtyFilter(); - // rearrange all descendants too, as our indentation level might have changed - folder->requestArrange(TRUE); - requestSort(); - LLFolderViewFolder* parentp = getParentFolder(); - while (parentp && !parentp->mSortFunction.isByDate()) - { - // parent folder doesn't have a time stamp yet, so get it from us - parentp->requestSort(); - parentp = parentp->getParentFolder(); - } - return TRUE; -} - -void LLFolderViewFolder::requestArrange(BOOL include_descendants) -{ - mLastArrangeGeneration = -1; - // flag all items up to root - if (mParentFolder) - { - mParentFolder->requestArrange(); - } - - if (include_descendants) - { - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end(); - ++iter) - { - (*iter)->requestArrange(TRUE); - } - } -} - -void LLFolderViewFolder::toggleOpen() -{ - setOpen(!mIsOpen); -} - -// Force a folder open or closed -void LLFolderViewFolder::setOpen(BOOL openitem) -{ - setOpenArrangeRecursively(openitem); -} - -void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse) -{ - BOOL was_open = mIsOpen; - mIsOpen = openitem; - if (mListener) - { - if(!was_open && openitem) - { - mListener->openItem(); - } - else if(was_open && !openitem) - { - mListener->closeItem(); - } - } - - if (recurse == RECURSE_DOWN || recurse == RECURSE_UP_DOWN) - { - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) - { - folders_t::iterator fit = iter++; - (*fit)->setOpenArrangeRecursively(openitem, RECURSE_DOWN); /* Flawfinder: ignore */ - } - } - if (mParentFolder - && (recurse == RECURSE_UP - || recurse == RECURSE_UP_DOWN)) - { - mParentFolder->setOpenArrangeRecursively(openitem, RECURSE_UP); - } - - if (was_open != mIsOpen) - { - requestArrange(); - } -} - -BOOL LLFolderViewFolder::handleDragAndDropFromChild(MASK mask, - BOOL drop, - EDragAndDropType c_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg) -{ - BOOL accepted = mListener && mListener->dragOrDrop(mask,drop,c_type,cargo_data, tooltip_msg); - if (accepted) - { - mDragAndDropTarget = TRUE; - *accept = ACCEPT_YES_MULTI; - } - else - { - *accept = ACCEPT_NO; - } - - // drag and drop to child item, so clear pending auto-opens - getRoot()->autoOpenTest(NULL); - - return TRUE; -} - -void LLFolderViewFolder::openItem( void ) -{ - toggleOpen(); -} - -void LLFolderViewFolder::applyFunctorToChildren(LLFolderViewFunctor& functor) -{ - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) - { - folders_t::iterator fit = iter++; - functor.doItem((*fit)); - } - for (items_t::iterator iter = mItems.begin(); - iter != mItems.end();) - { - items_t::iterator iit = iter++; - functor.doItem((*iit)); - } -} - -void LLFolderViewFolder::applyFunctorRecursively(LLFolderViewFunctor& functor) -{ - functor.doFolder(this); - - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) - { - folders_t::iterator fit = iter++; - (*fit)->applyFunctorRecursively(functor); - } - for (items_t::iterator iter = mItems.begin(); - iter != mItems.end();) - { - items_t::iterator iit = iter++; - functor.doItem((*iit)); - } -} - -void LLFolderViewFolder::applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor) -{ - functor(mListener); - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) - { - folders_t::iterator fit = iter++; - (*fit)->applyListenerFunctorRecursively(functor); - } - for (items_t::iterator iter = mItems.begin(); - iter != mItems.end();) - { - items_t::iterator iit = iter++; - (*iit)->applyListenerFunctorRecursively(functor); - } -} - -// LLView functionality -BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg) -{ - BOOL handled = FALSE; - - if (mIsOpen) - { - handled = (childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg) != NULL); - } - - if (!handled) - { - handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - - lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewFolder" << llendl; - } - - return TRUE; -} - -BOOL LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask, - BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg) -{ - BOOL accepted = mListener && mListener->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg); - - if (accepted) - { - mDragAndDropTarget = TRUE; - *accept = ACCEPT_YES_MULTI; - } - else - { - *accept = ACCEPT_NO; - } - - if (!drop && accepted) - { - getRoot()->autoOpenTest(this); - } - - return TRUE; -} - - -BOOL LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask ) -{ - BOOL handled = FALSE; - // fetch contents of this folder, as context menu can depend on contents - // still, user would have to open context menu again to see the changes - gInventory.fetchDescendentsOf(mListener->getUUID()); - - if( mIsOpen ) - { - handled = childrenHandleRightMouseDown( x, y, mask ) != NULL; - } - if (!handled) - { - handled = LLFolderViewItem::handleRightMouseDown( x, y, mask ); - } - return handled; -} - - -BOOL LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask) -{ - mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight)); - - BOOL handled = LLView::handleHover(x, y, mask); - - if (!handled) - { - // this doesn't do child processing - handled = LLFolderViewItem::handleHover(x, y, mask); - } - - return handled; -} - -BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask ) -{ - BOOL handled = FALSE; - if( mIsOpen ) - { - handled = childrenHandleMouseDown(x,y,mask) != NULL; - } - if( !handled ) - { - if(mIndentation < x && x < mIndentation + ARROW_SIZE + TEXT_PAD) - { - toggleOpen(); - handled = TRUE; - } - else - { - // do normal selection logic - handled = LLFolderViewItem::handleMouseDown(x, y, mask); - } - } - - return handled; -} - -BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask ) -{ - /* Disable outfit double click to wear - const LLUUID &cat_uuid = getListener()->getUUID(); - const LLViewerInventoryCategory *cat = gInventory.getCategory(cat_uuid); - if (cat && cat->getPreferredType() == LLFolderType::FT_OUTFIT) - { - getListener()->performAction(NULL, NULL,"replaceoutfit"); - return TRUE; - } - */ - - BOOL handled = FALSE; - if( mIsOpen ) - { - handled = childrenHandleDoubleClick( x, y, mask ) != NULL; - } - if( !handled ) - { - if(mIndentation < x && x < mIndentation + ARROW_SIZE + TEXT_PAD) - { - // don't select when user double-clicks plus sign - // so as not to contradict single-click behavior - toggleOpen(); - } - else - { - setSelectionFromRoot(this, FALSE); - toggleOpen(); - } - handled = TRUE; - } - return handled; -} - -void LLFolderViewFolder::draw() -{ - if (mAutoOpenCountdown != 0.f) - { - mControlLabelRotation = mAutoOpenCountdown * -90.f; - } - else if (mIsOpen) - { - mControlLabelRotation = lerp(mControlLabelRotation, -90.f, LLCriticalDamp::getInterpolant(0.04f)); - } - else - { - mControlLabelRotation = lerp(mControlLabelRotation, 0.f, LLCriticalDamp::getInterpolant(0.025f)); - } - - bool possibly_has_children = false; - bool up_to_date = mListener && mListener->isUpToDate(); - if(!up_to_date - && mListener->hasChildren()) // we know we have children but haven't fetched them (doesn't obey filter) - { - possibly_has_children = true; - } - - - BOOL loading = (mIsOpen - && possibly_has_children - && !up_to_date ); - - if ( loading && !mIsLoading ) - { - // Measure how long we've been in the loading state - mTimeSinceRequestStart.reset(); - } - - mIsLoading = loading; - - LLFolderViewItem::draw(); - - // draw children if root folder, or any other folder that is open or animating to closed state - if( getRoot() == this || (mIsOpen || mCurHeight != mTargetHeight )) - { - LLView::draw(); - } - - mExpanderHighlighted = FALSE; -} - -time_t LLFolderViewFolder::getCreationDate() const -{ - return llmax<time_t>(mCreationDate, mSubtreeCreationDate); -} - - -BOOL LLFolderViewFolder::potentiallyVisible() -{ - // folder should be visible by it's own filter status - return LLFolderViewItem::potentiallyVisible() - // or one or more of its descendants have passed the minimum filter requirement - || hasFilteredDescendants(getRoot()->getFilter()->getMinRequiredGeneration()) - // or not all of its descendants have been checked against minimum filter requirement - || getCompletedFilterGeneration() < getRoot()->getFilter()->getMinRequiredGeneration(); -} - -// this does prefix traversal, as folders are listed above their contents -LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, BOOL include_children ) -{ - BOOL found_item = FALSE; - - LLFolderViewItem* result = NULL; - // when not starting from a given item, start at beginning - if(item == NULL) - { - found_item = TRUE; - } - - // find current item among children - folders_t::iterator fit = mFolders.begin(); - folders_t::iterator fend = mFolders.end(); - - items_t::iterator iit = mItems.begin(); - items_t::iterator iend = mItems.end(); - - // if not trivially starting at the beginning, we have to find the current item - if (!found_item) - { - // first, look among folders, since they are always above items - for(; fit != fend; ++fit) - { - if(item == (*fit)) - { - found_item = TRUE; - // if we are on downwards traversal - if (include_children && (*fit)->isOpen()) - { - // look for first descendant - return (*fit)->getNextFromChild(NULL, TRUE); - } - // otherwise advance to next folder - ++fit; - include_children = TRUE; - break; - } - } - - // didn't find in folders? Check items... - if (!found_item) - { - for(; iit != iend; ++iit) - { - if(item == (*iit)) - { - found_item = TRUE; - // point to next item - ++iit; - break; - } - } - } - } - - if (!found_item) - { - // you should never call this method with an item that isn't a child - // so we should always find something - llassert(FALSE); - return NULL; - } - - // at this point, either iit or fit point to a candidate "next" item - // if both are out of range, we need to punt up to our parent - - // now, starting from found folder, continue through folders - // searching for next visible folder - while(fit != fend && !(*fit)->getVisible()) - { - // turn on downwards traversal for next folder - ++fit; - } - - if (fit != fend) - { - result = (*fit); - } - else - { - // otherwise, scan for next visible item - while(iit != iend && !(*iit)->getVisible()) - { - ++iit; - } - - // check to see if we have a valid item - if (iit != iend) - { - result = (*iit); - } - } - - if( !result && mParentFolder ) - { - // If there are no siblings or children to go to, recurse up one level in the tree - // and skip children for this folder, as we've already discounted them - result = mParentFolder->getNextFromChild(this, FALSE); - } - - return result; -} - -// this does postfix traversal, as folders are listed above their contents -LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* item, BOOL include_children ) -{ - BOOL found_item = FALSE; - - LLFolderViewItem* result = NULL; - // when not starting from a given item, start at end - if(item == NULL) - { - found_item = TRUE; - } - - // find current item among children - folders_t::reverse_iterator fit = mFolders.rbegin(); - folders_t::reverse_iterator fend = mFolders.rend(); - - items_t::reverse_iterator iit = mItems.rbegin(); - items_t::reverse_iterator iend = mItems.rend(); - - // if not trivially starting at the end, we have to find the current item - if (!found_item) - { - // first, look among items, since they are always below the folders - for(; iit != iend; ++iit) - { - if(item == (*iit)) - { - found_item = TRUE; - // point to next item - ++iit; - break; - } - } - - // didn't find in items? Check folders... - if (!found_item) - { - for(; fit != fend; ++fit) - { - if(item == (*fit)) - { - found_item = TRUE; - // point to next folder - ++fit; - break; - } - } - } - } - - if (!found_item) - { - // you should never call this method with an item that isn't a child - // so we should always find something - llassert(FALSE); - return NULL; - } - - // at this point, either iit or fit point to a candidate "next" item - // if both are out of range, we need to punt up to our parent - - // now, starting from found item, continue through items - // searching for next visible item - while(iit != iend && !(*iit)->getVisible()) - { - ++iit; - } - - if (iit != iend) - { - // we found an appropriate item - result = (*iit); - } - else - { - // otherwise, scan for next visible folder - while(fit != fend && !(*fit)->getVisible()) - { - ++fit; - } - - // check to see if we have a valid folder - if (fit != fend) - { - // try selecting child element of this folder - if ((*fit)->isOpen()) - { - result = (*fit)->getPreviousFromChild(NULL); - } - else - { - result = (*fit); - } - } - } - - if( !result ) - { - // If there are no siblings or children to go to, recurse up one level in the tree - // which gets back to this folder, which will only be visited if it is a valid, visible item - result = this; - } - - return result; -} - - -bool LLInventorySort::updateSort(U32 order) -{ - if (order != mSortOrder) - { - mSortOrder = order; - mByDate = (order & LLInventoryFilter::SO_DATE); - mSystemToTop = (order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP); - mFoldersByName = (order & LLInventoryFilter::SO_FOLDERS_BY_NAME); - return true; - } - return false; -} - -bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolderViewItem* const& b) -{ - // ignore sort order for landmarks in the Favorites folder. - // they should be always sorted as in Favorites bar. See EXT-719 - if (a->getSortGroup() == SG_ITEM - && b->getSortGroup() == SG_ITEM - && a->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK - && b->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK) - { - - static const LLUUID& favorites_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - - LLUUID a_uuid = a->getParentFolder()->getListener()->getUUID(); - LLUUID b_uuid = b->getParentFolder()->getListener()->getUUID(); - - if ((a_uuid == favorites_folder_id && b_uuid == favorites_folder_id)) - { - // *TODO: mantipov: probably it is better to add an appropriate method to LLFolderViewItem - // or to LLInvFVBridge - LLViewerInventoryItem* aitem = (static_cast<const LLItemBridge*>(a->getListener()))->getItem(); - LLViewerInventoryItem* bitem = (static_cast<const LLItemBridge*>(b->getListener()))->getItem(); - if (!aitem || !bitem) - return false; - S32 a_sort = aitem->getSortField(); - S32 b_sort = bitem->getSortField(); - return a_sort < b_sort; - } - } - - // We sort by name if we aren't sorting by date - // OR if these are folders and we are sorting folders by name. - bool by_name = (!mByDate - || (mFoldersByName - && (a->getSortGroup() != SG_ITEM))); - - if (a->getSortGroup() != b->getSortGroup()) - { - if (mSystemToTop) - { - // Group order is System Folders, Trash, Normal Folders, Items - return (a->getSortGroup() < b->getSortGroup()); - } - else if (mByDate) - { - // Trash needs to go to the bottom if we are sorting by date - if ( (a->getSortGroup() == SG_TRASH_FOLDER) - || (b->getSortGroup() == SG_TRASH_FOLDER)) - { - return (b->getSortGroup() == SG_TRASH_FOLDER); - } - } - } - - if (by_name) - { - S32 compare = LLStringUtil::compareDict(a->getLabel(), b->getLabel()); - if (0 == compare) - { - return (a->getCreationDate() > b->getCreationDate()); - } - else - { - return (compare < 0); - } - } - else - { - // BUG: This is very very slow. The getCreationDate() is log n in number - // of inventory items. - time_t first_create = a->getCreationDate(); - time_t second_create = b->getCreationDate(); - if (first_create == second_create) - { - return (LLStringUtil::compareDict(a->getLabel(), b->getLabel()) < 0); - } - else - { - return (first_create > second_create); - } - } -} diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp new file mode 100644 index 0000000000..586965e5a0 --- /dev/null +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -0,0 +1,314 @@ +/* + * @file llfolderviewmodelinventory.cpp + * @brief Implementation of the inventory-specific view model + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llfolderviewmodelinventory.h" +#include "llinventorymodelbackgroundfetch.h" +#include "llinventorypanel.h" +#include "lltooldraganddrop.h" +#include "llfavoritesbar.h" + +// +// class LLFolderViewModelInventory +// +static LLFastTimer::DeclareTimer FTM_INVENTORY_SORT("Sort"); + +bool LLFolderViewModelInventory::startDrag(std::vector<LLFolderViewModelItem*>& items) +{ + std::vector<EDragAndDropType> types; + uuid_vec_t cargo_ids; + std::vector<LLFolderViewModelItem*>::iterator item_it; + bool can_drag = true; + if (!items.empty()) + { + for (item_it = items.begin(); item_it != items.end(); ++item_it) + { + EDragAndDropType type = DAD_NONE; + LLUUID id = LLUUID::null; + can_drag = can_drag && static_cast<LLFolderViewModelItemInventory*>(*item_it)->startDrag(&type, &id); + + types.push_back(type); + cargo_ids.push_back(id); + } + + LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, + static_cast<LLFolderViewModelItemInventory*>(items.front())->getDragSource(), mTaskID); + } + return can_drag; +} + + +void LLFolderViewModelInventory::sort( LLFolderViewFolder* folder ) +{ + LLFastTimer _(FTM_INVENTORY_SORT); + + if (!needsSort(folder->getViewModelItem())) return; + + LLFolderViewModelItemInventory* modelp = static_cast<LLFolderViewModelItemInventory*>(folder->getViewModelItem()); + if (modelp->getUUID().isNull()) return; + + for (std::list<LLFolderViewFolder*>::iterator it = folder->getFoldersBegin(), end_it = folder->getFoldersEnd(); + it != end_it; + ++it) + { + LLFolderViewFolder* child_folderp = *it; + sort(child_folderp); + + if (child_folderp->getFoldersCount() > 0) + { + time_t most_recent_folder_time = + static_cast<LLFolderViewModelItemInventory*>((*child_folderp->getFoldersBegin())->getViewModelItem())->getCreationDate(); + LLFolderViewModelItemInventory* modelp = static_cast<LLFolderViewModelItemInventory*>(child_folderp->getViewModelItem()); + if (most_recent_folder_time > modelp->getCreationDate()) + { + modelp->setCreationDate(most_recent_folder_time); + } + } + if (child_folderp->getItemsCount() > 0) + { + time_t most_recent_item_time = + static_cast<LLFolderViewModelItemInventory*>((*child_folderp->getItemsBegin())->getViewModelItem())->getCreationDate(); + + LLFolderViewModelItemInventory* modelp = static_cast<LLFolderViewModelItemInventory*>(child_folderp->getViewModelItem()); + if (most_recent_item_time > modelp->getCreationDate()) + { + modelp->setCreationDate(most_recent_item_time); + } + } + } + base_t::sort(folder); +} + +bool LLFolderViewModelInventory::contentsReady() +{ + return !LLInventoryModelBackgroundFetch::instance().folderFetchActive(); +} + +void LLFolderViewModelItemInventory::requestSort() +{ + LLFolderViewModelItemCommon::requestSort(); + LLFolderViewFolder* folderp = dynamic_cast<LLFolderViewFolder*>(mFolderViewItem); + if (folderp) + { + folderp->requestArrange(); + } + if (static_cast<LLFolderViewModelInventory&>(mRootViewModel).getSorter().isByDate()) + { + // sort by date potentially affects parent folders which use a date + // derived from newest item in them + if (mParent) + { + mParent->requestSort(); + } + } +} + +void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset, std::string::size_type string_size) +{ + LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size); + + bool passed_filter_before = mPrevPassedAllFilters; + mPrevPassedAllFilters = passedFilter(filter_generation); + + if (passed_filter_before != mPrevPassedAllFilters) + { + LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder(); + if (parent_folder) + { + parent_folder->requestArrange(); + } + } +} + +bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* item, LLFolderViewFilter& filter ) +{ + S32 filter_generation = filter.getCurrentGeneration(); + + bool continue_filtering = true; + if (item->getLastFilterGeneration() < filter_generation) + { + // recursive application of the filter for child items + continue_filtering = item->filter( filter ); + } + + // track latest generation to pass any child items, for each folder up to root + if (item->passedFilter()) + { + LLFolderViewModelItemInventory* view_model = this; + + while(view_model && view_model->mMostFilteredDescendantGeneration < filter_generation) + { + view_model->mMostFilteredDescendantGeneration = filter_generation; + view_model = static_cast<LLFolderViewModelItemInventory*>(view_model->mParent); + } + } + + return continue_filtering; +} + +bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter) +{ + const S32 filter_generation = filter.getCurrentGeneration(); + const S32 must_pass_generation = filter.getFirstRequiredGeneration(); + + if (getLastFilterGeneration() >= must_pass_generation + && getLastFolderFilterGeneration() >= must_pass_generation + && !passedFilter(must_pass_generation)) + { + // failed to pass an earlier filter that was a subset of the current one + // go ahead and flag this item as done + setPassedFilter(false, filter_generation); + setPassedFolderFilter(false, filter_generation); + return true; + } + + const bool passed_filter_folder = (getInventoryType() == LLInventoryType::IT_CATEGORY) + ? filter.checkFolder(this) + : true; + setPassedFolderFilter(passed_filter_folder, filter_generation); + + if(!mChildren.empty() + && (getLastFilterGeneration() < must_pass_generation // haven't checked descendants against minimum required generation to pass + || descendantsPassedFilter(must_pass_generation))) // or at least one descendant has passed the minimum requirement + { + // now query children + for (child_list_t::iterator iter = mChildren.begin(), end_iter = mChildren.end(); + iter != end_iter && filter.getFilterCount() > 0; + ++iter) + { + if (!filterChildItem((*iter), filter)) + { + break; + } + } + } + + // if we didn't use all filter iterations + // that means we filtered all of our descendants + // so filter ourselves now + if (filter.getFilterCount() > 0) + { + filter.decrementFilterCount(); + + const bool passed_filter = filter.check(this); + setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize()); + return true; + } + else + { + return false; + } +} + +LLFolderViewModelInventory* LLInventoryPanel::getFolderViewModel() +{ + return &mInventoryViewModel; +} + + +const LLFolderViewModelInventory* LLInventoryPanel::getFolderViewModel() const +{ + return &mInventoryViewModel; +} + +bool LLInventorySort::operator()(const LLFolderViewModelItemInventory* const& a, const LLFolderViewModelItemInventory* const& b) const +{ + // Ignore sort order for landmarks in the Favorites folder. + // In that folder, landmarks should be always sorted as in the Favorites bar. See EXT-719 + if (a->getSortGroup() == SG_ITEM + && b->getSortGroup() == SG_ITEM + && a->getInventoryType() == LLInventoryType::IT_LANDMARK + && b->getInventoryType() == LLInventoryType::IT_LANDMARK) + { + static const LLUUID& favorites_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + // If both landmarks are in the Favorites folder... + if (gInventory.isObjectDescendentOf(a->getUUID(), favorites_folder_id) && gInventory.isObjectDescendentOf(b->getUUID(), favorites_folder_id)) + { + // Get their index in that folder + S32 a_sort = LLFavoritesOrderStorage::instance().getSortIndex(a->getUUID()); + S32 b_sort = LLFavoritesOrderStorage::instance().getSortIndex(b->getUUID()); + // Note: this test is a bit overkill: since they are both in the Favorites folder, we shouldn't get negative index values... + if (!((a_sort < 0) && (b_sort < 0))) + { + return a_sort < b_sort; + } + } + } + + // We sort by name if we aren't sorting by date + // OR if these are folders and we are sorting folders by name. + bool by_name = (!mByDate || (mFoldersByName && (a->getSortGroup() != SG_ITEM))); + + if (a->getSortGroup() != b->getSortGroup()) + { + if (mSystemToTop) + { + // Group order is System Folders, Trash, Normal Folders, Items + return (a->getSortGroup() < b->getSortGroup()); + } + else if (mByDate) + { + // Trash needs to go to the bottom if we are sorting by date + if ( (a->getSortGroup() == SG_TRASH_FOLDER) + || (b->getSortGroup() == SG_TRASH_FOLDER)) + { + return (b->getSortGroup() == SG_TRASH_FOLDER); + } + } + } + + if (by_name) + { + S32 compare = LLStringUtil::compareDict(a->getDisplayName(), b->getDisplayName()); + if (0 == compare) + { + return (a->getCreationDate() > b->getCreationDate()); + } + else + { + return (compare < 0); + } + } + else + { + time_t first_create = a->getCreationDate(); + time_t second_create = b->getCreationDate(); + if (first_create == second_create) + { + return (LLStringUtil::compareDict(a->getDisplayName(), b->getDisplayName()) < 0); + } + else + { + return (first_create > second_create); + } + } +} + +LLFolderViewModelItemInventory::LLFolderViewModelItemInventory( class LLFolderViewModelInventory& root_view_model ) + : LLFolderViewModelItemCommon(root_view_model), + mPrevPassedAllFilters(false) +{ +} diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h new file mode 100644 index 0000000000..890d03d1c9 --- /dev/null +++ b/indra/newview/llfolderviewmodelinventory.h @@ -0,0 +1,118 @@ +/** + * @file llfolderviewmodelinventory.h + * @brief view model implementation specific to inventory + * class definition + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFOLDERVIEWMODELINVENTORY_H +#define LL_LLFOLDERVIEWMODELINVENTORY_H + +#include "llinventoryfilter.h" +#include "llinventory.h" +#include "llwearabletype.h" +#include "lltooldraganddrop.h" + +class LLFolderViewModelItemInventory + : public LLFolderViewModelItemCommon +{ +public: + LLFolderViewModelItemInventory(class LLFolderViewModelInventory& root_view_model); + virtual const LLUUID& getUUID() const = 0; + virtual time_t getCreationDate() const = 0; // UTC seconds + virtual void setCreationDate(time_t creation_date_utc) = 0; + virtual PermissionMask getPermissionMask() const = 0; + virtual LLFolderType::EType getPreferredType() const = 0; + virtual void showProperties(void) = 0; + virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual. + virtual BOOL isUpToDate() const = 0; + virtual bool hasChildren() const = 0; + virtual LLInventoryType::EType getInventoryType() const = 0; + virtual void performAction(LLInventoryModel* model, std::string action) = 0; + virtual LLWearableType::EType getWearableType() const = 0; + virtual EInventorySortGroup getSortGroup() const = 0; + virtual LLInventoryObject* getInventoryObject() const = 0; + virtual void requestSort(); + virtual void setPassedFilter(bool filtered, S32 filter_generation, std::string::size_type string_offset = std::string::npos, std::string::size_type string_size = 0); + virtual bool filter( LLFolderViewFilter& filter); + virtual bool filterChildItem( LLFolderViewModelItem* item, LLFolderViewFilter& filter); + + virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const = 0; + virtual LLToolDragAndDrop::ESource getDragSource() const = 0; + +protected: + bool mPrevPassedAllFilters; +}; + +class LLInventorySort +{ +public: + struct Params : public LLInitParam::Block<Params> + { + Optional<S32> order; + + Params() + : order("order", 0) + {} + }; + + LLInventorySort(S32 order = 0) + { + fromParams(Params().order(order)); + } + + bool isByDate() const { return mByDate; } + U32 getSortOrder() const { return mSortOrder; } + void toParams(Params& p) { p.order(mSortOrder);} + void fromParams(Params& p) + { + mSortOrder = p.order; + mByDate = (mSortOrder & LLInventoryFilter::SO_DATE); + mSystemToTop = (mSortOrder & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP); + mFoldersByName = (mSortOrder & LLInventoryFilter::SO_FOLDERS_BY_NAME); + } + + bool operator()(const LLFolderViewModelItemInventory* const& a, const LLFolderViewModelItemInventory* const& b) const; +private: + U32 mSortOrder; + bool mByDate; + bool mSystemToTop; + bool mFoldersByName; +}; + +class LLFolderViewModelInventory + : public LLFolderViewModel<LLInventorySort, LLFolderViewModelItemInventory, LLFolderViewModelItemInventory, LLInventoryFilter> +{ +public: + typedef LLFolderViewModel<LLInventorySort, LLFolderViewModelItemInventory, LLFolderViewModelItemInventory, LLInventoryFilter> base_t; + + void setTaskID(const LLUUID& id) {mTaskID = id;} + + void sort(LLFolderViewFolder* folder); + bool contentsReady(); + bool startDrag(std::vector<LLFolderViewModelItem*>& items); + +private: + LLUUID mTaskID; +}; +#endif // LL_LLFOLDERVIEWMODELINVENTORY_H diff --git a/indra/newview/llfollowcam.cpp b/indra/newview/llfollowcam.cpp index b670af1782..47612fe25c 100644 --- a/indra/newview/llfollowcam.cpp +++ b/indra/newview/llfollowcam.cpp @@ -38,7 +38,6 @@ std::vector<LLFollowCamParams*> LLFollowCamMgr::sParamStack; //------------------------------------------------------- // constants //------------------------------------------------------- -const F32 ONE_HALF = 0.5; const F32 FOLLOW_CAM_ZOOM_FACTOR = 0.1f; const F32 FOLLOW_CAM_MIN_ZOOM_AMOUNT = 0.1f; const F32 DISTANCE_EPSILON = 0.0001f; diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index 11401d6c68..a4dfd94496 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -47,13 +47,13 @@ static const std::string INVENTORY_STRING_FRIENDS_ALL_SUBFOLDER = "All"; // helper functions // NOTE: For now Friends & All folders are created as protected folders of the LLFolderType::FT_CALLINGCARD type. -// So, their names will be processed in the LLFolderViewItem::refreshFromListener() to be localized +// So, their names will be processed in the LLFolderViewItem::refresh() to be localized // using "InvFolder LABEL_NAME" as LLTrans::findString argument. // We must use in this file their hard-coded names to ensure found them on different locales. EXT-5829. // These hard-coded names will be stored in InventoryItems but shown localized in FolderViewItems -// If hack in the LLFolderViewItem::refreshFromListener() to localize protected folder is removed +// If hack in the LLFolderViewItem::refresh() to localize protected folder is removed // or these folders are not protected these names should be localized in another place/way. inline const std::string get_friend_folder_name() { @@ -533,7 +533,7 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID) bool shouldBeAdded = true; LLAvatarName av_name; LLAvatarNameCache::get(avatarID, &av_name); - const std::string& name = av_name.mUsername; + const std::string& name = av_name.getAccountName(); lldebugs << "Processing buddy name: " << name << ", id: " << avatarID diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 66ca76bfb0..f307505ff8 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -35,6 +35,7 @@ // library #include "llaudioengine.h" #include "lldatapacker.h" +#include "llfloaterreg.h" #include "llinventory.h" #include "llkeyframemotion.h" #include "llmultigesture.h" @@ -51,7 +52,7 @@ #include "llviewermessage.h" #include "llvoavatarself.h" #include "llviewerstats.h" -#include "llnearbychatbar.h" +#include "llfloaterimnearbychat.h" #include "llappearancemgr.h" #include "llgesturelistener.h" @@ -997,7 +998,8 @@ void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step) const BOOL animate = FALSE; - LLNearbyChatBar::getInstance()->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate); + (LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))-> + sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate); gesture->mCurrentStep++; break; diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 623ebb76f2..a0f2918bd7 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -36,10 +36,10 @@ #include "llfloaterreg.h" #include "llfloatersidepanelcontainer.h" #include "llgroupmgr.h" +#include "llfloaterimcontainer.h" #include "llimview.h" // for gIMMgr #include "llnotificationsutil.h" #include "llstatusbar.h" // can_afford_transaction() -#include "llimfloater.h" #include "groupchatlistener.h" // @@ -335,7 +335,7 @@ LLUUID LLGroupActions::startIM(const LLUUID& group_id) group_id); if (session_id != LLUUID::null) { - LLIMFloater::show(session_id); + LLFloaterIMContainer::getInstance()->showConversation(session_id); } make_ui_sound("UISndStartIM"); return session_id; diff --git a/indra/newview/llgroupiconctrl.cpp b/indra/newview/llgroupiconctrl.cpp index 2f9810775b..188c4bcf25 100644 --- a/indra/newview/llgroupiconctrl.cpp +++ b/indra/newview/llgroupiconctrl.cpp @@ -38,7 +38,7 @@ #include "llcachename.h" #include "llagentdata.h" -#include "llimfloater.h" +#include "llfloaterimsession.h" */ static LLDefaultChildRegistry::Register<LLGroupIconCtrl> g_i("group_icon"); diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 129cddda45..aba3d74d87 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -86,7 +86,7 @@ LLGroupList::LLGroupList(const Params& p) registrar.add("People.Groups.Action", boost::bind(&LLGroupList::onContextMenuItemClick, this, _2)); enable_registrar.add("People.Groups.Enable", boost::bind(&LLGroupList::onContextMenuItemEnable, this, _2)); - LLMenuGL* context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_people_groups.xml", + LLToggleableMenu* context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_groups.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if(context_menu) mContextMenuHandle = context_menu->getHandle(); @@ -112,7 +112,7 @@ BOOL LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask) { BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask); - LLMenuGL* context_menu = (LLMenuGL*)mContextMenuHandle.get(); + LLToggleableMenu* context_menu = mContextMenuHandle.get(); if (context_menu && size() > 0) { context_menu->buildDrawLabels(); @@ -406,7 +406,7 @@ void LLGroupListItem::setActive(bool active) // *BUG: setName() overrides the style params. // Active group should be bold. - LLFontDescriptor new_desc(mGroupNameBox->getDefaultFont()->getFontDesc()); + LLFontDescriptor new_desc(mGroupNameBox->getFont()->getFontDesc()); // *NOTE dzaporozhan // On Windows LLFontGL::NORMAL will not remove LLFontGL::BOLD if font diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index 8abf14b3d0..e96a720886 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -28,10 +28,13 @@ #define LL_LLGROUPLIST_H #include "llevent.h" +#include "llpointer.h" + #include "llflatlistview.h" #include "llpanel.h" -#include "llpointer.h" #include "llstyle.h" +#include "lltoggleablemenu.h" + #include "llgroupmgr.h" /** @@ -45,6 +48,10 @@ class LLGroupList: public LLFlatListViewEx, public LLOldEvents::LLSimpleListener { LOG_CLASS(LLGroupList); public: + struct Params : public LLInitParam::Block<Params, LLFlatListViewEx::Params> + { + Params(){}; + }; LLGroupList(const Params& p); virtual ~LLGroupList(); @@ -57,6 +64,8 @@ public: void toggleIcons(); bool getIconsVisible() const { return mShowIcons; } + LLToggleableMenu* getContextMenu() const { return mContextMenuHandle.get(); } + private: void setDirty(bool val = true) { mDirty = val; } void refresh(); @@ -66,7 +75,7 @@ private: bool onContextMenuItemClick(const LLSD& userdata); bool onContextMenuItemEnable(const LLSD& userdata); - LLHandle<LLView> mContextMenuHandle; + LLHandle<LLToggleableMenu> mContextMenuHandle; bool mShowIcons; bool mDirty; diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index efffd0f98e..81eb1d397e 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -36,6 +36,7 @@ #include <vector> #include <algorithm> +#include "llappviewer.h" #include "llagent.h" #include "llui.h" #include "message.h" @@ -63,7 +64,7 @@ #pragma warning(pop) // Restore all warnings to the previous state #endif -const U32 MAX_CACHED_GROUPS = 10; +const U32 MAX_CACHED_GROUPS = 20; // // LLRoleActionSet @@ -234,8 +235,15 @@ LLGroupMgrGroupData::LLGroupMgrGroupData(const LLUUID& id) : mRoleDataComplete(FALSE), mRoleMemberDataComplete(FALSE), mGroupPropertiesDataComplete(FALSE), - mPendingRoleMemberRequest(FALSE) + mPendingRoleMemberRequest(FALSE), + mAccessTime(0.0f) { + mMemberVersion.generate(); +} + +void LLGroupMgrGroupData::setAccessed() +{ + mAccessTime = (F32)LLFrameTimer::getTotalSeconds(); } BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_data) @@ -311,14 +319,14 @@ void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_dat role_data.mChangeType = RC_UPDATE_DATA; } else - { + { role_data.mChangeType = RC_UPDATE_POWERS; } mRoleChanges[role_id] = role_data; } else - { + { llwarns << "Change being made to non-existant role " << role_id << llendl; } } @@ -417,6 +425,7 @@ void LLGroupMgrGroupData::removeMemberData() } mMembers.clear(); mMemberDataComplete = FALSE; + mMemberVersion.generate(); } void LLGroupMgrGroupData::removeRoleData() @@ -739,6 +748,7 @@ void LLGroupMgrGroupData::cancelRoleChanges() LLGroupMgr::LLGroupMgr() { + mLastGroupMembersRequestFrame = 0; } LLGroupMgr::~LLGroupMgr() @@ -937,6 +947,8 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) } } + group_datap->mMemberVersion.generate(); + if (group_datap->mMembers.size() == (U32)group_datap->mMemberCount) { group_datap->mMemberDataComplete = TRUE; @@ -1360,7 +1372,7 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data) LLGroupMgrGroupData* LLGroupMgr::createGroupData(const LLUUID& id) { - LLGroupMgrGroupData* group_datap; + LLGroupMgrGroupData* group_datap = NULL; group_map_t::iterator existing_group = LLGroupMgr::getInstance()->mGroups.find(id); if (existing_group == LLGroupMgr::getInstance()->mGroups.end()) @@ -1373,6 +1385,11 @@ LLGroupMgrGroupData* LLGroupMgr::createGroupData(const LLUUID& id) group_datap = existing_group->second; } + if (group_datap) + { + group_datap->setAccessed(); + } + return group_datap; } @@ -1413,25 +1430,41 @@ void LLGroupMgr::notifyObservers(LLGroupChange gc) void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap) { - if (mGroups.size() > MAX_CACHED_GROUPS) + while (mGroups.size() >= MAX_CACHED_GROUPS) { - // get rid of groups that aren't observed - for (group_map_t::iterator gi = mGroups.begin(); gi != mGroups.end() && mGroups.size() > MAX_CACHED_GROUPS / 2; ) + // LRU: Remove the oldest un-observed group from cache until group size is small enough + + F32 oldest_access = LLFrameTimer::getTotalSeconds(); + group_map_t::iterator oldest_gi = mGroups.end(); + + for (group_map_t::iterator gi = mGroups.begin(); gi != mGroups.end(); ++gi ) { observer_multimap_t::iterator oi = mObservers.find(gi->first); if (oi == mObservers.end()) { - // not observed - LLGroupMgrGroupData* unobserved_groupp = gi->second; - delete unobserved_groupp; - mGroups.erase(gi++); - } - else - { - ++gi; + if (gi->second + && (gi->second->getAccessTime() < oldest_access)) + { + oldest_access = gi->second->getAccessTime(); + oldest_gi = gi; + } } } + + if (oldest_gi != mGroups.end()) + { + delete oldest_gi->second; + mGroups.erase(oldest_gi); + } + else + { + // All groups must be currently open, none to remove. + // Just add the new group anyway, but get out of this loop as it + // will never drop below max_cached_groups. + break; + } } + mGroups[group_datap->getID()] = group_datap; } @@ -1473,6 +1506,7 @@ void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id) } } + void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id) { lldebugs << "LLGroupMgr::sendGroupRoleDataRequest" << llendl; @@ -1741,8 +1775,6 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id, bool start_message = true; LLMessageSystem* msg = gMessageSystem; - - LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!group_datap) return; @@ -1803,8 +1835,193 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id, { gAgent.sendReliableMessage(); } + + group_datap->mMemberVersion.generate(); +} + + +// Responder class for capability group management +class GroupMemberDataResponder : public LLHTTPClient::Responder +{ +public: + GroupMemberDataResponder() {} + virtual ~GroupMemberDataResponder() {} + virtual void result(const LLSD& pContent); + virtual void error(U32 pStatus, const std::string& pReason); +private: + LLSD mMemberData; +}; + +void GroupMemberDataResponder::error(U32 pStatus, const std::string& pReason) +{ + LL_WARNS("GrpMgr") << "Error receiving group member data." << LL_ENDL; } +void GroupMemberDataResponder::result(const LLSD& content) +{ + LLGroupMgr::processCapGroupMembersRequest(content); +} + + +// static +void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id) +{ + // Have we requested the information already this frame? + if(mLastGroupMembersRequestFrame == gFrameCount) + return; + + LLViewerRegion* currentRegion = gAgent.getRegion(); + // Thank you FS:Ansariel! + if(!currentRegion) + { + LL_WARNS("GrpMgr") << "Agent does not have a current region. Uh-oh!" << LL_ENDL; + return; + } + + // Check to make sure we have our capabilities + if(!currentRegion->capabilitiesReceived()) + { + LL_WARNS("GrpMgr") << " Capabilities not received!" << LL_ENDL; + return; + } + + // Get our capability + std::string cap_url = currentRegion->getCapability("GroupMemberData"); + + // Thank you FS:Ansariel! + if(cap_url.empty()) + { + LL_INFOS("GrpMgr") << "Region has no GroupMemberData capability. Falling back to UDP fetch." << LL_ENDL; + sendGroupMembersRequest(group_id); + return; + } + + // Post to our service. Add a body containing the group_id. + LLSD body = LLSD::emptyMap(); + body["group_id"] = group_id; + + LLHTTPClient::ResponderPtr grp_data_responder = new GroupMemberDataResponder(); + + // This could take a while to finish, timeout after 5 minutes. + LLHTTPClient::post(cap_url, body, grp_data_responder, LLSD(), 300); + + mLastGroupMembersRequestFrame = gFrameCount; +} + + +// static +void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content) +{ + // Did we get anything in content? + if(!content.size()) + { + LL_DEBUGS("GrpMgr") << "No group member data received." << LL_ENDL; + return; + } + + // If we have no members, there's no reason to do anything else + S32 num_members = content["member_count"]; + if(num_members < 1) + return; + + LLUUID group_id = content["group_id"].asUUID(); + + LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); + if(!group_datap) + { + LL_WARNS("GrpMgr") << "Received incorrect, possibly stale, group or request id" << LL_ENDL; + return; + } + + group_datap->mMemberCount = num_members; + + LLSD member_list = content["members"]; + LLSD titles = content["titles"]; + LLSD defaults = content["defaults"]; + + std::string online_status; + std::string title; + S32 contribution; + U64 member_powers; + // If this is changed to a bool, make sure to change the LLGroupMemberData constructor + BOOL is_owner; + + // Compute this once, rather than every time. + U64 default_powers = llstrtou64(defaults["default_powers"].asString().c_str(), NULL, 16); + + LLSD::map_const_iterator member_iter_start = member_list.beginMap(); + LLSD::map_const_iterator member_iter_end = member_list.endMap(); + for( ; member_iter_start != member_iter_end; ++member_iter_start) + { + // Reset defaults + online_status = "unknown"; + title = titles[0].asString(); + contribution = 0; + member_powers = default_powers; + is_owner = false; + + const LLUUID member_id(member_iter_start->first); + LLSD member_info = member_iter_start->second; + + if(member_info.has("last_login")) + { + online_status = member_info["last_login"].asString(); + if(online_status == "Online") + online_status = LLTrans::getString("group_member_status_online"); + else + formatDateString(online_status); + } + + if(member_info.has("title")) + title = titles[member_info["title"].asInteger()].asString(); + + if(member_info.has("powers")) + member_powers = llstrtou64(member_info["powers"].asString().c_str(), NULL, 16); + + if(member_info.has("donated_square_meters")) + contribution = member_info["donated_square_meters"]; + + if(member_info.has("owner")) + is_owner = true; + + LLGroupMemberData* data = new LLGroupMemberData(member_id, + contribution, + member_powers, + title, + online_status, + is_owner); + + group_datap->mMembers[member_id] = data; + } + + group_datap->mMemberVersion.generate(); + + // Technically, we have this data, but to prevent completely overhauling + // this entire system (it would be nice, but I don't have the time), + // I'm going to be dumb and just call services I most likely don't need + // with the thought being that the system might need it to be done. + // + // TODO: + // Refactor to reduce multiple calls for data we already have. + if(group_datap->mTitles.size() < 1) + LLGroupMgr::getInstance()->sendGroupTitlesRequest(group_id); + + + group_datap->mMemberDataComplete = TRUE; + group_datap->mMemberRequestID.setNull(); + // Make the role-member data request + if (group_datap->mPendingRoleMemberRequest) + { + group_datap->mPendingRoleMemberRequest = FALSE; + LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(group_id); + } + + group_datap->mChanged = TRUE; + LLGroupMgr::getInstance()->notifyObservers(GC_MEMBER_DATA); + +} + + void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id) { lldebugs << "LLGroupMgr::sendGroupRoleChanges" << llendl; diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index faf0531c10..d8c1ab7ef5 100644 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -86,7 +86,7 @@ public: BOOL isInRole(const LLUUID& role_id) { return (mRolesList.find(role_id) != mRolesList.end()); } -protected: +private: LLUUID mID; S32 mContribution; U64 mAgentPowers; @@ -233,6 +233,11 @@ public: BOOL isRoleMemberDataComplete() { return mRoleMemberDataComplete; } BOOL isGroupPropertiesDataComplete() { return mGroupPropertiesDataComplete; } + F32 getAccessTime() const { return mAccessTime; } + void setAccessed(); + + const LLUUID& getMemberVersion() const { return mMemberVersion; } + public: typedef std::map<LLUUID,LLGroupMemberData*> member_list_t; typedef std::map<LLUUID,LLGroupRoleData*> role_list_t; @@ -280,6 +285,10 @@ private: BOOL mGroupPropertiesDataComplete; BOOL mPendingRoleMemberRequest; + F32 mAccessTime; + + // Generate a new ID every time mMembers + LLUUID mMemberVersion; }; struct LLRoleAction @@ -336,6 +345,10 @@ public: static void sendGroupMemberEjects(const LLUUID& group_id, uuid_vec_t& member_ids); + // BAKER + void sendCapGroupMembersRequest(const LLUUID& group_id); + static void processCapGroupMembersRequest(const LLSD& content); + void cancelGroupRoleChanges(const LLUUID& group_id); static void processGroupPropertiesReply(LLMessageSystem* msg, void** data); @@ -371,6 +384,8 @@ private: typedef std::set<LLParticularGroupObserver*> observer_set_t; typedef std::map<LLUUID,observer_set_t> observer_map_t; observer_map_t mParticularObservers; + + S32 mLastGroupMembersRequestFrame; }; diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp index e15862e2a4..197408b40e 100644 --- a/indra/newview/llhints.cpp +++ b/indra/newview/llhints.cpp @@ -171,12 +171,12 @@ LLHintPopup::LLHintPopup(const LLHintPopup::Params& p) } if (p.hint_image.isProvided()) { - buildFromFile("panel_hint_image.xml", NULL, p); + buildFromFile("panel_hint_image.xml", p); getChild<LLIconCtrl>("hint_image")->setImage(p.hint_image()); } else { - buildFromFile( "panel_hint.xml", NULL, p); + buildFromFile( "panel_hint.xml", p); } } diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index 482294c8a6..3336097955 100644 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -166,7 +166,6 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector3& start, const LLVector3& } // scale screen size of borders down - //RN: for now, text on hud objects is never occluded LLVector3 x_pixel_vec; LLVector3 y_pixel_vec; @@ -187,45 +186,29 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector3& start, const LLVector3& + (y_pixel_vec * screen_offset.mV[VY]); - //if (mUseBubble) + LLVector3 bg_pos = render_position + + (F32)mOffsetY * y_pixel_vec + - (width_vec / 2.f) + - (height_vec); + + LLVector3 v[] = { - LLVector3 bg_pos = render_position - + (F32)mOffsetY * y_pixel_vec - - (width_vec / 2.f) - - (height_vec); - //LLUI::translate(bg_pos.mV[VX], bg_pos.mV[VY], bg_pos.mV[VZ]); + bg_pos, + bg_pos + width_vec, + bg_pos + width_vec + height_vec, + bg_pos + height_vec, + }; - LLVector3 v[] = - { - bg_pos, - bg_pos + width_vec, - bg_pos + width_vec + height_vec, - bg_pos + height_vec, - }; + LLVector3 dir = end-start; + F32 a, b, t; - if (debug_render) + if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, a, b, t, FALSE) || + LLTriangleRayIntersect(v[2], v[3], v[0], start, dir, a, b, t, FALSE) ) + { + if (t <= 1.f) { - gGL.begin(LLRender::LINE_STRIP); - gGL.vertex3fv(v[0].mV); - gGL.vertex3fv(v[1].mV); - gGL.vertex3fv(v[2].mV); - gGL.vertex3fv(v[3].mV); - gGL.vertex3fv(v[0].mV); - gGL.vertex3fv(v[2].mV); - gGL.end(); - } - - LLVector3 dir = end-start; - F32 a, b, t; - - if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, a, b, t, FALSE) || - LLTriangleRayIntersect(v[2], v[3], v[0], start, dir, a, b, t, FALSE) ) - { - if (t <= 1.f) - { - intersection = start + dir*t; - return TRUE; - } + intersection = start + dir*t; + return TRUE; } } @@ -241,12 +224,6 @@ void LLHUDNameTag::render() } } -void LLHUDNameTag::renderForSelect() -{ - LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); - renderText(TRUE); -} - void LLHUDNameTag::renderText(BOOL for_select) { if (!mVisible || mHidden) @@ -299,24 +276,6 @@ void LLHUDNameTag::renderText(BOOL for_select) LLColor4 bg_color = LLUIColorTable::instance().getColor("NameTagBackground"); bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor); - // maybe a no-op? - //const S32 border_height = 16; - //const S32 border_width = 16; - const S32 border_height = 8; - const S32 border_width = 8; - - // *TODO move this into helper function - F32 border_scale = 1.f; - - if (border_height * 2 > mHeight) - { - border_scale = (F32)mHeight / ((F32)border_height * 2.f); - } - if (border_width * 2 > mWidth) - { - border_scale = llmin(border_scale, (F32)mWidth / ((F32)border_width * 2.f)); - } - // scale screen size of borders down //RN: for now, text on hud objects is never occluded @@ -325,152 +284,34 @@ void LLHUDNameTag::renderText(BOOL for_select) LLViewerCamera::getInstance()->getPixelVectors(mPositionAgent, y_pixel_vec, x_pixel_vec); - LLVector2 border_scale_vec((F32)border_width / (F32)imagep->getTextureWidth(), (F32)border_height / (F32)imagep->getTextureHeight()); LLVector3 width_vec = mWidth * x_pixel_vec; LLVector3 height_vec = mHeight * y_pixel_vec; - LLVector3 scaled_border_width = (F32)llfloor(border_scale * (F32)border_width) * x_pixel_vec; - LLVector3 scaled_border_height = (F32)llfloor(border_scale * (F32)border_height) * y_pixel_vec; mRadius = (width_vec + height_vec).magVec() * 0.5f; LLCoordGL screen_pos; LLViewerCamera::getInstance()->projectPosAgentToScreen(mPositionAgent, screen_pos, FALSE); - LLVector2 screen_offset; -// if (!mUseBubble) -// { -// screen_offset = mPositionOffset; -// } -// else -// { - screen_offset = updateScreenPos(mPositionOffset); -// } + LLVector2 screen_offset = updateScreenPos(mPositionOffset); LLVector3 render_position = mPositionAgent + (x_pixel_vec * screen_offset.mV[VX]) + (y_pixel_vec * screen_offset.mV[VY]); -// if (mUseBubble) + LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); + LLRect screen_rect; + screen_rect.setCenterAndSize(0, static_cast<S32>(lltrunc(-mHeight / 2 + mOffsetY)), static_cast<S32>(lltrunc(mWidth)), static_cast<S32>(lltrunc(mHeight))); + imagep->draw3D(render_position, x_pixel_vec, y_pixel_vec, screen_rect, bg_color); + if (mLabelSegments.size()) { - LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); - LLUI::pushMatrix(); - { - LLVector3 bg_pos = render_position - + (F32)mOffsetY * y_pixel_vec - - (width_vec / 2.f) - - (height_vec); - LLUI::translate(bg_pos.mV[VX], bg_pos.mV[VY], bg_pos.mV[VZ]); - - if (for_select) - { - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - S32 name = mSourceObject->mGLName; - LLColor4U coloru((U8)(name >> 16), (U8)(name >> 8), (U8)name); - gGL.color4ubv(coloru.mV); - gl_segmented_rect_3d_tex(border_scale_vec, scaled_border_width, scaled_border_height, width_vec, height_vec); - LLUI::popMatrix(); - return; - } - else - { - gGL.getTexUnit(0)->bind(imagep->getImage()); - - gGL.color4fv(bg_color.mV); - gl_segmented_rect_3d_tex(border_scale_vec, scaled_border_width, scaled_border_height, width_vec, height_vec); - - if ( mLabelSegments.size()) - { - LLUI::pushMatrix(); - { - gGL.color4f(text_color.mV[VX], text_color.mV[VY], text_color.mV[VZ], gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor); - LLVector3 label_height = (mFontp->getLineHeight() * mLabelSegments.size() + (VERTICAL_PADDING / 3.f)) * y_pixel_vec; - LLVector3 label_offset = height_vec - label_height; - LLUI::translate(label_offset.mV[VX], label_offset.mV[VY], label_offset.mV[VZ]); - gl_segmented_rect_3d_tex_top(border_scale_vec, scaled_border_width, scaled_border_height, width_vec, label_height); - } - LLUI::popMatrix(); - } - } - - BOOL outside_width = llabs(mPositionOffset.mV[VX]) > mWidth * 0.5f; - BOOL outside_height = llabs(mPositionOffset.mV[VY] + (mVertAlignment == ALIGN_VERT_TOP ? mHeight * 0.5f : 0.f)) > mHeight * (mVertAlignment == ALIGN_VERT_TOP ? mHeight * 0.75f : 0.5f); + LLUIImagePtr rect_top_image = LLUI::getUIImage("Rounded_Rect_Top"); + LLRect label_top_rect = screen_rect; + const S32 label_height = llround((mFontp->getLineHeight() * (F32)mLabelSegments.size() + (VERTICAL_PADDING / 3.f))); + label_top_rect.mBottom = label_top_rect.mTop - label_height; + LLColor4 label_top_color = text_color; + label_top_color.mV[VALPHA] = gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor; - // draw line segments pointing to parent object - if (!mOffscreen && (outside_width || outside_height)) - { - LLUI::pushMatrix(); - { - gGL.color4fv(bg_color.mV); - LLVector3 target_pos = -1.f * (mPositionOffset.mV[VX] * x_pixel_vec + mPositionOffset.mV[VY] * y_pixel_vec); - target_pos += (width_vec / 2.f); - target_pos += mVertAlignment == ALIGN_VERT_CENTER ? (height_vec * 0.5f) : LLVector3::zero; - target_pos -= 3.f * x_pixel_vec; - target_pos -= 6.f * y_pixel_vec; - LLUI::translate(target_pos.mV[VX], target_pos.mV[VY], target_pos.mV[VZ]); - gl_segmented_rect_3d_tex(border_scale_vec, 3.f * x_pixel_vec, 3.f * y_pixel_vec, 6.f * x_pixel_vec, 6.f * y_pixel_vec); - } - LLUI::popMatrix(); - - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - LLGLDepthTest gls_depth(mZCompare ? GL_TRUE : GL_FALSE, GL_FALSE); - - LLVector3 box_center_offset; - box_center_offset = (width_vec * 0.5f) + (height_vec * 0.5f); - LLUI::translate(box_center_offset.mV[VX], box_center_offset.mV[VY], box_center_offset.mV[VZ]); - gGL.color4fv(bg_color.mV); - LLUI::setLineWidth(2.0); - gGL.begin(LLRender::LINES); - { - if (outside_width) - { - LLVector3 vert; - // draw line in x then y - if (mPositionOffset.mV[VX] < 0.f) - { - // start at right edge - vert = width_vec * 0.5f; - gGL.vertex3fv(vert.mV); - } - else - { - // start at left edge - vert = width_vec * -0.5f; - gGL.vertex3fv(vert.mV); - } - vert = -mPositionOffset.mV[VX] * x_pixel_vec; - gGL.vertex3fv(vert.mV); - gGL.vertex3fv(vert.mV); - vert -= mPositionOffset.mV[VY] * y_pixel_vec; - vert -= ((mVertAlignment == ALIGN_VERT_TOP) ? (height_vec * 0.5f) : LLVector3::zero); - gGL.vertex3fv(vert.mV); - } - else - { - LLVector3 vert; - // draw line in y then x - if (mPositionOffset.mV[VY] < 0.f) - { - // start at top edge - vert = (height_vec * 0.5f) - (mPositionOffset.mV[VX] * x_pixel_vec); - gGL.vertex3fv(vert.mV); - } - else - { - // start at bottom edge - vert = (height_vec * -0.5f) - (mPositionOffset.mV[VX] * x_pixel_vec); - gGL.vertex3fv(vert.mV); - } - vert = -mPositionOffset.mV[VY] * y_pixel_vec - mPositionOffset.mV[VX] * x_pixel_vec; - vert -= ((mVertAlignment == ALIGN_VERT_TOP) ? (height_vec * 0.5f) : LLVector3::zero); - gGL.vertex3fv(vert.mV); - } - } - gGL.end(); - LLUI::setLineWidth(1.0); - - } - } - LLUI::popMatrix(); + rect_top_image->draw3D(render_position, x_pixel_vec, y_pixel_vec, label_top_rect, label_top_color); } F32 y_offset = (F32)mOffsetY; @@ -874,29 +715,26 @@ void LLHUDNameTag::updateAll() for (r_it = sVisibleTextObjects.rbegin(); r_it != sVisibleTextObjects.rend(); ++r_it) { LLHUDNameTag* textp = (*r_it); -// if (textp->mUseBubble) -// { - if (current_screen_area / screen_area > LOD_2_SCREEN_COVERAGE) - { - textp->setLOD(3); - } - else if (current_screen_area / screen_area > LOD_1_SCREEN_COVERAGE) - { - textp->setLOD(2); - } - else if (current_screen_area / screen_area > LOD_0_SCREEN_COVERAGE) - { - textp->setLOD(1); - } - else - { - textp->setLOD(0); - } - textp->updateSize(); - // find on-screen position and initialize collision rectangle - textp->mTargetPositionOffset = textp->updateScreenPos(LLVector2::zero); - current_screen_area += (F32)(textp->mSoftScreenRect.getWidth() * textp->mSoftScreenRect.getHeight()); -// } + if (current_screen_area / screen_area > LOD_2_SCREEN_COVERAGE) + { + textp->setLOD(3); + } + else if (current_screen_area / screen_area > LOD_1_SCREEN_COVERAGE) + { + textp->setLOD(2); + } + else if (current_screen_area / screen_area > LOD_0_SCREEN_COVERAGE) + { + textp->setLOD(1); + } + else + { + textp->setLOD(0); + } + textp->updateSize(); + // find on-screen position and initialize collision rectangle + textp->mTargetPositionOffset = textp->updateScreenPos(LLVector2::zero); + current_screen_area += (F32)(textp->mSoftScreenRect.getWidth() * textp->mSoftScreenRect.getHeight()); } LLStat* camera_vel_stat = LLViewerCamera::getInstance()->getVelocityStat(); @@ -914,20 +752,12 @@ void LLHUDNameTag::updateAll() { LLHUDNameTag* src_textp = (*src_it); -// if (!src_textp->mUseBubble) -// { -// continue; -// } VisibleTextObjectIterator dst_it = src_it; ++dst_it; for (; dst_it != sVisibleTextObjects.end(); ++dst_it) { LLHUDNameTag* dst_textp = (*dst_it); -// if (!dst_textp->mUseBubble) -// { -// continue; -// } if (src_textp->mSoftScreenRect.overlaps(dst_textp->mSoftScreenRect)) { LLRectf intersect_rect = src_textp->mSoftScreenRect; @@ -976,10 +806,6 @@ void LLHUDNameTag::updateAll() VisibleTextObjectIterator this_object_it; for (this_object_it = sVisibleTextObjects.begin(); this_object_it != sVisibleTextObjects.end(); ++this_object_it) { -// if (!(*this_object_it)->mUseBubble) -// { -// continue; -// } (*this_object_it)->mPositionOffset = lerp((*this_object_it)->mPositionOffset, (*this_object_it)->mTargetPositionOffset, LLCriticalDamp::getInterpolant(POSITION_DAMPING_TC)); } } @@ -1037,10 +863,6 @@ void LLHUDNameTag::addPickable(std::set<LLViewerObject*> &pick_list) VisibleTextObjectIterator text_it; for (text_it = sVisibleTextObjects.begin(); text_it != sVisibleTextObjects.end(); ++text_it) { -// if (!(*text_it)->mUseBubble) -// { -// continue; -// } pick_list.insert((*text_it)->mSourceObject); } } diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h index 3325c22def..72647d5b26 100644 --- a/indra/newview/llhudnametag.h +++ b/indra/newview/llhudnametag.h @@ -118,7 +118,6 @@ public: /*virtual*/ void markDead(); friend class LLHUDObject; /*virtual*/ F32 getDistance() const { return mLastDistance; } - //void setUseBubble(BOOL use_bubble) { mUseBubble = use_bubble; } S32 getLOD() { return mLOD; } BOOL getVisible() { return mVisible; } BOOL getHidden() const { return mHidden; } @@ -136,7 +135,6 @@ protected: LLHUDNameTag(const U8 type); /*virtual*/ void render(); - /*virtual*/ void renderForSelect(); void renderText(BOOL for_select); static void updateAll(); void setLOD(S32 lod); diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp deleted file mode 100644 index 63eedcdfea..0000000000 --- a/indra/newview/llimfloater.cpp +++ /dev/null @@ -1,1195 +0,0 @@ -/** - * @file llimfloater.cpp - * @brief LLIMFloater class definition - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llimfloater.h" - -#include "llnotificationsutil.h" - -#include "llagent.h" -#include "llappviewer.h" -#include "llavatarnamecache.h" -#include "llbutton.h" -#include "llchannelmanager.h" -#include "llchiclet.h" -#include "llchicletbar.h" -#include "llfloaterreg.h" -#include "llimfloatercontainer.h" // to replace separate IM Floaters with multifloater container -#include "llinventoryfunctions.h" -#include "lllayoutstack.h" -#include "lllineeditor.h" -#include "lllogchat.h" -#include "llpanelimcontrolpanel.h" -#include "llscreenchannel.h" -#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" -#include "llviewerchat.h" -#include "llautoreplace.h" - -LLIMFloater::LLIMFloater(const LLUUID& session_id) - : LLTransientDockableFloater(NULL, true, session_id), - mControlPanel(NULL), - mSessionID(session_id), - mLastMessageIndex(-1), - mDialog(IM_NOTHING_SPECIAL), - mChatHistory(NULL), - mInputEditor(NULL), - mSavedTitle(), - mTypingStart(), - mShouldSendTypingState(false), - mMeTyping(false), - mOtherTyping(false), - mTypingTimer(), - mTypingTimeoutTimer(), - mPositioned(false), - mSessionInitialized(false) -{ - LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mSessionID); - if (im_session) - { - mSessionInitialized = im_session->mSessionInitialized; - - mDialog = im_session->mType; - switch(mDialog){ - case IM_NOTHING_SPECIAL: - case IM_SESSION_P2P_INVITE: - mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelIMControl, this); - break; - case IM_SESSION_CONFERENCE_START: - mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelAdHocControl, this); - break; - case IM_SESSION_GROUP_START: - mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelGroupControl, this); - break; - case IM_SESSION_INVITE: - if (gAgent.isInGroup(mSessionID)) - { - mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelGroupControl, this); - } - else - { - mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelAdHocControl, this); - } - break; - default: break; - } - } - setOverlapsScreenChannel(true); - - LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this); - - setDocked(true); -} - -void LLIMFloater::onFocusLost() -{ - LLIMModel::getInstance()->resetActiveSessionID(); - - LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, false); -} - -void LLIMFloater::onFocusReceived() -{ - LLIMModel::getInstance()->setActiveSessionID(mSessionID); - - LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, true); - - if (getVisible()) - { - LLIMModel::instance().sendNoUnreadMessages(mSessionID); - } -} - -// virtual -void LLIMFloater::onClose(bool app_quitting) -{ - setTyping(false); - - // The source of much argument and design thrashing - // Should the window hide or the session close when the X is clicked? - // - // Last change: - // EXT-3516 X Button should end IM session, _ button should hide - gIMMgr->leaveSession(mSessionID); -} - -/* static */ -void LLIMFloater::newIMCallback(const LLSD& data){ - - if (data["num_unread"].asInteger() > 0 || data["from_id"].asUUID().isNull()) - { - LLUUID session_id = data["session_id"].asUUID(); - - LLIMFloater* floater = LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id); - if (floater == NULL) return; - - // update if visible, otherwise will be updated when opened - if (floater->getVisible()) - { - floater->updateMessages(); - } - } -} - -void LLIMFloater::onVisibilityChange(const LLSD& new_visibility) -{ - bool visible = new_visibility.asBoolean(); - - LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID); - - if (visible && voice_channel && - voice_channel->getState() == LLVoiceChannel::STATE_CONNECTED) - { - LLFloaterReg::showInstance("voice_call", mSessionID); - } - else - { - LLFloaterReg::hideInstance("voice_call", mSessionID); - } -} - -void LLIMFloater::onSendMsg( LLUICtrl* ctrl, void* userdata ) -{ - LLIMFloater* self = (LLIMFloater*) userdata; - self->sendMsg(); - self->setTyping(false); -} - -void LLIMFloater::sendMsg() -{ - if (!gAgent.isGodlike() - && (mDialog == IM_NOTHING_SPECIAL) - && mOtherParticipantUUID.isNull()) - { - llinfos << "Cannot send IM to everyone unless you're a god." << llendl; - return; - } - - if (mInputEditor) - { - LLWString text = mInputEditor->getConvertedText(); - if(!text.empty()) - { - // Truncate and convert to UTF8 for transport - std::string utf8_text = wstring_to_utf8str(text); - utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1); - - if (mSessionInitialized) - { - LLIMModel::sendMessage(utf8_text, mSessionID, - mOtherParticipantUUID,mDialog); - } - else - { - //queue up the message to send once the session is initialized - mQueuedMsgsForInit.append(utf8_text); - } - - mInputEditor->setText(LLStringUtil::null); - - updateMessages(); - } - } -} - - - -LLIMFloater::~LLIMFloater() -{ - LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this); -} - -//virtual -BOOL LLIMFloater::postBuild() -{ - const LLUUID& other_party_id = LLIMModel::getInstance()->getOtherParticipantID(mSessionID); - if (other_party_id.notNull()) - { - mOtherParticipantUUID = other_party_id; - } - - mControlPanel->setSessionId(mSessionID); - mControlPanel->getParent()->setVisible(gSavedSettings.getBOOL("IMShowControlPanel")); - - LLButton* slide_left = getChild<LLButton>("slide_left_btn"); - slide_left->setVisible(mControlPanel->getParent()->getVisible()); - slide_left->setClickedCallback(boost::bind(&LLIMFloater::onSlide, this)); - - LLButton* slide_right = getChild<LLButton>("slide_right_btn"); - slide_right->setVisible(!mControlPanel->getParent()->getVisible()); - slide_right->setClickedCallback(boost::bind(&LLIMFloater::onSlide, this)); - - mInputEditor = getChild<LLLineEditor>("chat_editor"); - mInputEditor->setMaxTextLength(1023); - // enable line history support for instant message bar - mInputEditor->setEnableLineHistory(TRUE); - // *TODO Establish LineEditor with autoreplace callback - mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2)); - - LLFontGL* font = LLViewerChat::getChatFont(); - mInputEditor->setFont(font); - - mInputEditor->setFocusReceivedCallback( boost::bind(onInputEditorFocusReceived, _1, this) ); - mInputEditor->setFocusLostCallback( boost::bind(onInputEditorFocusLost, _1, this) ); - mInputEditor->setKeystrokeCallback( onInputEditorKeystroke, this ); - mInputEditor->setCommitOnFocusLost( FALSE ); - mInputEditor->setRevertOnEsc( FALSE ); - mInputEditor->setReplaceNewlinesWithSpaces( FALSE ); - mInputEditor->setPassDelete( TRUE ); - - childSetCommitCallback("chat_editor", onSendMsg, this); - - mChatHistory = getChild<LLChatHistory>("chat_history"); - - setDocked(true); - - mTypingStart = LLTrans::getString("IM_typing_start_string"); - - // Disable input editor if session cannot accept text - LLIMModel::LLIMSession* im_session = - LLIMModel::instance().findIMSession(mSessionID); - if( im_session && !im_session->mTextIMPossible ) - { - mInputEditor->setEnabled(FALSE); - mInputEditor->setLabel(LLTrans::getString("IM_unavailable_text_label")); - } - - if ( im_session && im_session->isP2PSessionType()) - { - // look up display name for window title - LLAvatarNameCache::get(im_session->mOtherParticipantID, - boost::bind(&LLIMFloater::onAvatarNameCache, - this, _1, _2)); - } - else - { - std::string session_name(LLIMModel::instance().getName(mSessionID)); - updateSessionName(session_name, session_name); - } - - //*TODO if session is not initialized yet, add some sort of a warning message like "starting session...blablabla" - //see LLFloaterIMPanel for how it is done (IB) - - if(isChatMultiTab()) - { - return LLFloater::postBuild(); - } - else - { - return LLDockableFloater::postBuild(); - } -} - -void LLIMFloater::updateSessionName(const std::string& ui_title, - const std::string& ui_label) -{ - mInputEditor->setLabel(LLTrans::getString("IM_to_label") + " " + ui_label); - setTitle(ui_title); -} - -void LLIMFloater::onAvatarNameCache(const LLUUID& agent_id, - const LLAvatarName& av_name) -{ - // Use display name only for labels, as the extended name will be in the - // floater title - std::string ui_title = av_name.getCompleteName(); - updateSessionName(ui_title, av_name.mDisplayName); - mTypingStart.setArg("[NAME]", ui_title); -} - -// virtual -void LLIMFloater::draw() -{ - if ( mMeTyping ) - { - // Time out if user hasn't typed for a while. - if ( mTypingTimeoutTimer.getElapsedTimeF32() > LLAgent::TYPING_TIMEOUT_SECS ) - { - setTyping(false); - } - } - - LLTransientDockableFloater::draw(); -} - - -// static -void* LLIMFloater::createPanelIMControl(void* userdata) -{ - LLIMFloater *self = (LLIMFloater*)userdata; - self->mControlPanel = new LLPanelIMControlPanel(); - self->mControlPanel->setXMLFilename("panel_im_control_panel.xml"); - return self->mControlPanel; -} - - -// static -void* LLIMFloater::createPanelGroupControl(void* userdata) -{ - LLIMFloater *self = (LLIMFloater*)userdata; - self->mControlPanel = new LLPanelGroupControlPanel(self->mSessionID); - self->mControlPanel->setXMLFilename("panel_group_control_panel.xml"); - return self->mControlPanel; -} - -// static -void* LLIMFloater::createPanelAdHocControl(void* userdata) -{ - LLIMFloater *self = (LLIMFloater*)userdata; - self->mControlPanel = new LLPanelAdHocControlPanel(self->mSessionID); - self->mControlPanel->setXMLFilename("panel_adhoc_control_panel.xml"); - return self->mControlPanel; -} - -void LLIMFloater::onSlide() -{ - mControlPanel->getParent()->setVisible(!mControlPanel->getParent()->getVisible()); - - gSavedSettings.setBOOL("IMShowControlPanel", mControlPanel->getParent()->getVisible()); - - getChild<LLButton>("slide_left_btn")->setVisible(mControlPanel->getParent()->getVisible()); - getChild<LLButton>("slide_right_btn")->setVisible(!mControlPanel->getParent()->getVisible()); -} - -//static -LLIMFloater* LLIMFloater::show(const LLUUID& session_id) -{ - closeHiddenIMToasts(); - - if (!gIMMgr->hasSession(session_id)) return NULL; - - if(!isChatMultiTab()) - { - //hide all - LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("impanel"); - for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); - iter != inst_list.end(); ++iter) - { - LLIMFloater* floater = dynamic_cast<LLIMFloater*>(*iter); - if (floater && floater->isDocked()) - { - floater->setVisible(false); - } - } - } - - bool exist = findInstance(session_id); - - LLIMFloater* floater = getInstance(session_id); - if (!floater) return NULL; - - if(isChatMultiTab()) - { - LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance(); - - // do not add existed floaters to avoid adding torn off instances - if (!exist) - { - // LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END; - // TODO: mantipov: use LLTabContainer::RIGHT_OF_CURRENT if it exists - LLTabContainer::eInsertionPoint i_pt = LLTabContainer::END; - - if (floater_container) - { - floater_container->addFloater(floater, TRUE, i_pt); - } - } - - floater->openFloater(floater->getKey()); - } - else - { - // Docking may move chat window, hide it before moving, or user will see how window "jumps" - floater->setVisible(false); - - if (floater->getDockControl() == NULL) - { - LLChiclet* chiclet = - LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLChiclet>( - session_id); - if (chiclet == NULL) - { - llerror("Dock chiclet for LLIMFloater doesn't exists", 0); - } - else - { - LLChicletBar::getInstance()->getChicletPanel()->scrollToChiclet(chiclet); - } - - floater->setDockControl(new LLDockControl(chiclet, floater, floater->getDockTongue(), - LLDockControl::BOTTOM)); - } - - // window is positioned, now we can show it. - } - floater->setVisible(TRUE); - - return floater; -} - -void LLIMFloater::setDocked(bool docked, bool pop_on_undock) -{ - // update notification channel state - LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*> - (LLNotificationsUI::LLChannelManager::getInstance()-> - findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); - - if(!isChatMultiTab()) - { - LLTransientDockableFloater::setDocked(docked, pop_on_undock); - } - - // update notification channel state - if(channel) - { - channel->updateShowToastsState(); - channel->redrawToasts(); - } -} - -void LLIMFloater::setVisible(BOOL visible) -{ - LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*> - (LLNotificationsUI::LLChannelManager::getInstance()-> - findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); - LLTransientDockableFloater::setVisible(visible); - - // update notification channel state - if(channel) - { - channel->updateShowToastsState(); - channel->redrawToasts(); - } - - BOOL is_minimized = visible && isChatMultiTab() - ? LLIMFloaterContainer::getInstance()->isMinimized() - : !visible; - - if (!is_minimized && mChatHistory && mInputEditor) - { - //only if floater was construced and initialized from xml - updateMessages(); - //prevent stealing focus when opening a background IM tab (EXT-5387, checking focus for EXT-6781) - if (!isChatMultiTab() || hasFocus()) - { - mInputEditor->setFocus(TRUE); - } - } - - if(!visible) - { - LLIMChiclet* chiclet = LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(mSessionID); - if(chiclet) - { - chiclet->setToggleState(false); - } - } -} - -BOOL LLIMFloater::getVisible() -{ - if(isChatMultiTab()) - { - LLIMFloaterContainer* im_container = LLIMFloaterContainer::getInstance(); - - // Treat inactive floater as invisible. - bool is_active = im_container->getActiveFloater() == this; - - //torn off floater is always inactive - if (!is_active && getHost() != im_container) - { - return LLTransientDockableFloater::getVisible(); - } - - // getVisible() returns TRUE when Tabbed IM window is minimized. - return is_active && !im_container->isMinimized() && im_container->getVisible(); - } - else - { - return LLTransientDockableFloater::getVisible(); - } -} - -//static -bool LLIMFloater::toggle(const LLUUID& session_id) -{ - if(!isChatMultiTab()) - { - LLIMFloater* floater = LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id); - if (floater && floater->getVisible() && floater->hasFocus()) - { - // clicking on chiclet to close floater just hides it to maintain existing - // scroll/text entry state - floater->setVisible(false); - return false; - } - else if(floater && (!floater->isDocked() || floater->getVisible() && !floater->hasFocus())) - { - floater->setVisible(TRUE); - floater->setFocus(TRUE); - return true; - } - } - - // ensure the list of messages is updated when floater is made visible - show(session_id); - return true; -} - -//static -LLIMFloater* LLIMFloater::findInstance(const LLUUID& session_id) -{ - return LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id); -} - -LLIMFloater* LLIMFloater::getInstance(const LLUUID& session_id) -{ - return LLFloaterReg::getTypedInstance<LLIMFloater>("impanel", session_id); -} - -void LLIMFloater::sessionInitReplyReceived(const LLUUID& im_session_id) -{ - mSessionInitialized = true; - - //will be different only for an ad-hoc im session - if (mSessionID != im_session_id) - { - mSessionID = im_session_id; - setKey(im_session_id); - mControlPanel->setSessionId(im_session_id); - } - - // updating "Call" button from group control panel here to enable it without placing into draw() (EXT-4796) - if(gAgent.isInGroup(im_session_id)) - { - mControlPanel->updateCallButton(); - } - - //*TODO here we should remove "starting session..." warning message if we added it in postBuild() (IB) - - - //need to send delayed messaged collected while waiting for session initialization - if (!mQueuedMsgsForInit.size()) return; - LLSD::array_iterator iter; - for ( iter = mQueuedMsgsForInit.beginArray(); - iter != mQueuedMsgsForInit.endArray(); - ++iter) - { - LLIMModel::sendMessage(iter->asString(), mSessionID, - mOtherParticipantUUID, mDialog); - } -} - -void LLIMFloater::updateMessages() -{ - bool use_plain_text_chat_history = gSavedSettings.getBOOL("PlainTextChatHistory"); - - std::list<LLSD> messages; - - // we shouldn't reset unread message counters if IM floater doesn't have focus - if (hasFocus()) - { - LLIMModel::instance().getMessages(mSessionID, messages, mLastMessageIndex+1); - } - else - { - LLIMModel::instance().getMessagesSilently(mSessionID, messages, mLastMessageIndex+1); - } - - if (messages.size()) - { - LLSD chat_args; - chat_args["use_plain_text_chat_history"] = use_plain_text_chat_history; - - std::ostringstream message; - std::list<LLSD>::const_reverse_iterator iter = messages.rbegin(); - std::list<LLSD>::const_reverse_iterator iter_end = messages.rend(); - for (; iter != iter_end; ++iter) - { - LLSD msg = *iter; - - std::string time = msg["time"].asString(); - LLUUID from_id = msg["from_id"].asUUID(); - std::string from = msg["from"].asString(); - std::string message = msg["message"].asString(); - bool is_history = msg["is_history"].asBoolean(); - - LLChat chat; - chat.mFromID = from_id; - chat.mSessionID = mSessionID; - chat.mFromName = from; - chat.mTimeStr = time; - chat.mChatStyle = is_history ? CHAT_STYLE_HISTORY : chat.mChatStyle; - - // process offer notification - if (msg.has("notification_id")) - { - chat.mNotifId = msg["notification_id"].asUUID(); - // if notification exists - embed it - if (LLNotificationsUtil::find(chat.mNotifId) != NULL) - { - // remove embedded notification from channel - LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*> - (LLNotificationsUI::LLChannelManager::getInstance()-> - findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); - if (getVisible()) - { - // toast will be automatically closed since it is not storable toast - channel->hideToast(chat.mNotifId); - } - } - // if notification doesn't exist - try to use next message which should be log entry - else - { - continue; - } - } - //process text message - else - { - chat.mText = message; - } - - mChatHistory->appendMessage(chat, chat_args); - mLastMessageIndex = msg["index"].asInteger(); - - // if it is a notification - next message is a notification history log, so skip it - if (chat.mNotifId.notNull() && LLNotificationsUtil::find(chat.mNotifId) != NULL) - { - if (++iter == iter_end) - { - break; - } - else - { - mLastMessageIndex++; - } - } - } - } -} - -void LLIMFloater::reloadMessages() -{ - mChatHistory->clear(); - mLastMessageIndex = -1; - updateMessages(); -} - -// static -void LLIMFloater::onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata ) -{ - LLIMFloater* self= (LLIMFloater*) userdata; - - // Allow enabling the LLIMFloater input editor only if session can accept text - LLIMModel::LLIMSession* im_session = - LLIMModel::instance().findIMSession(self->mSessionID); - //TODO: While disabled lllineeditor can receive focus we need to check if it is enabled (EK) - if( im_session && im_session->mTextIMPossible && self->mInputEditor->getEnabled()) - { - //in disconnected state IM input editor should be disabled - self->mInputEditor->setEnabled(!gDisconnected); - } -} - -// static -void LLIMFloater::onInputEditorFocusLost(LLFocusableElement* caller, void* userdata) -{ - LLIMFloater* self = (LLIMFloater*) userdata; - self->setTyping(false); -} - -// static -void LLIMFloater::onInputEditorKeystroke(LLLineEditor* caller, void* userdata) -{ - LLIMFloater* self = (LLIMFloater*)userdata; - std::string text = self->mInputEditor->getText(); - if (!text.empty()) - { - self->setTyping(true); - } - else - { - // Deleting all text counts as stopping typing. - self->setTyping(false); - } -} - -void LLIMFloater::setTyping(bool typing) -{ - if ( typing ) - { - // Started or proceeded typing, reset the typing timeout timer - mTypingTimeoutTimer.reset(); - } - - if ( mMeTyping != typing ) - { - // Typing state is changed - mMeTyping = typing; - // So, should send current state - mShouldSendTypingState = true; - // In case typing is started, send state after some delay - mTypingTimer.reset(); - } - - // Don't want to send typing indicators to multiple people, potentially too - // much network traffic. Only send in person-to-person IMs. - if ( mShouldSendTypingState && mDialog == IM_NOTHING_SPECIAL ) - { - if ( mMeTyping ) - { - if ( mTypingTimer.getElapsedTimeF32() > 1.f ) - { - // Still typing, send 'start typing' notification - LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE); - mShouldSendTypingState = false; - } - } - else - { - // Send 'stop typing' notification immediately - LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, FALSE); - mShouldSendTypingState = false; - } - } - - LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); - if (speaker_mgr) - speaker_mgr->setSpeakerTyping(gAgent.getID(), FALSE); - -} - -void LLIMFloater::processIMTyping(const LLIMInfo* im_info, BOOL typing) -{ - if ( typing ) - { - // other user started typing - addTypingIndicator(im_info); - } - else - { - // other user stopped typing - removeTypingIndicator(im_info); - } -} - -void LLIMFloater::processAgentListUpdates(const LLSD& body) -{ - if ( !body.isMap() ) return; - - if ( body.has("agent_updates") && body["agent_updates"].isMap() ) - { - LLSD agent_data = body["agent_updates"].get(gAgentID.asString()); - if (agent_data.isMap() && agent_data.has("info")) - { - LLSD agent_info = agent_data["info"]; - - if (agent_info.has("mutes")) - { - BOOL moderator_muted_text = agent_info["mutes"]["text"].asBoolean(); - mInputEditor->setEnabled(!moderator_muted_text); - std::string label; - if (moderator_muted_text) - label = LLTrans::getString("IM_muted_text_label"); - else - label = LLTrans::getString("IM_to_label") + " " + LLIMModel::instance().getName(mSessionID); - mInputEditor->setLabel(label); - - if (moderator_muted_text) - LLNotificationsUtil::add("TextChatIsMutedByModerator"); - } - } - } -} - -void LLIMFloater::updateChatHistoryStyle() -{ - mChatHistory->clear(); - mLastMessageIndex = -1; - updateMessages(); -} - -void LLIMFloater::processChatHistoryStyleUpdate(const LLSD& newvalue) -{ - LLFontGL* font = LLViewerChat::getChatFont(); - LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("impanel"); - for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); - iter != inst_list.end(); ++iter) - { - LLIMFloater* floater = dynamic_cast<LLIMFloater*>(*iter); - if (floater) - { - floater->updateChatHistoryStyle(); - floater->mInputEditor->setFont(font); - } - } - -} - -void LLIMFloater::processSessionUpdate(const LLSD& session_update) -{ - // *TODO : verify following code when moderated mode will be implemented - if ( false && session_update.has("moderated_mode") && - session_update["moderated_mode"].has("voice") ) - { - BOOL voice_moderated = session_update["moderated_mode"]["voice"]; - const std::string session_label = LLIMModel::instance().getName(mSessionID); - - if (voice_moderated) - { - setTitle(session_label + std::string(" ") + LLTrans::getString("IM_moderated_chat_label")); - } - else - { - setTitle(session_label); - } - - // *TODO : uncomment this when/if LLPanelActiveSpeakers panel will be added - //update the speakers dropdown too - //mSpeakerPanel->setVoiceModerationCtrlMode(voice_moderated); - } -} - -BOOL LLIMFloater::handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, - void *cargo_data, EAcceptance *accept, - std::string& tooltip_msg) -{ - - if (mDialog == IM_NOTHING_SPECIAL) - { - LLToolDragAndDrop::handleGiveDragAndDrop(mOtherParticipantUUID, mSessionID, drop, - cargo_type, cargo_data, accept); - } - - // handle case for dropping calling cards (and folders of calling cards) onto invitation panel for invites - else if (isInviteAllowed()) - { - *accept = ACCEPT_NO; - - if (cargo_type == DAD_CALLINGCARD) - { - if (dropCallingCard((LLInventoryItem*)cargo_data, drop)) - { - *accept = ACCEPT_YES_MULTI; - } - } - else if (cargo_type == DAD_CATEGORY) - { - if (dropCategory((LLInventoryCategory*)cargo_data, drop)) - { - *accept = ACCEPT_YES_MULTI; - } - } - } - return TRUE; -} - -BOOL LLIMFloater::dropCallingCard(LLInventoryItem* item, BOOL drop) -{ - BOOL rv = isInviteAllowed(); - if(rv && item && item->getCreatorUUID().notNull()) - { - if(drop) - { - uuid_vec_t ids; - ids.push_back(item->getCreatorUUID()); - inviteToSession(ids); - } - } - else - { - // set to false if creator uuid is null. - rv = FALSE; - } - return rv; -} - -BOOL LLIMFloater::dropCategory(LLInventoryCategory* category, BOOL drop) -{ - BOOL rv = isInviteAllowed(); - if(rv && category) - { - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - LLUniqueBuddyCollector buddies; - gInventory.collectDescendentsIf(category->getUUID(), - cats, - items, - LLInventoryModel::EXCLUDE_TRASH, - buddies); - S32 count = items.count(); - if(count == 0) - { - rv = FALSE; - } - else if(drop) - { - uuid_vec_t ids; - ids.reserve(count); - for(S32 i = 0; i < count; ++i) - { - ids.push_back(items.get(i)->getCreatorUUID()); - } - inviteToSession(ids); - } - } - return rv; -} - -BOOL LLIMFloater::isInviteAllowed() const -{ - - return ( (IM_SESSION_CONFERENCE_START == mDialog) - || (IM_SESSION_INVITE == mDialog) ); -} - -class LLSessionInviteResponder : public LLHTTPClient::Responder -{ -public: - LLSessionInviteResponder(const LLUUID& session_id) - { - mSessionID = session_id; - } - - void error(U32 statusNum, const std::string& reason) - { - llinfos << "Error inviting all agents to session" << llendl; - //throw something back to the viewer here? - } - -private: - LLUUID mSessionID; -}; - -BOOL LLIMFloater::inviteToSession(const uuid_vec_t& ids) -{ - LLViewerRegion* region = gAgent.getRegion(); - if (!region) - { - return FALSE; - } - - S32 count = ids.size(); - - if( isInviteAllowed() && (count > 0) ) - { - llinfos << "LLIMFloater::inviteToSession() - inviting participants" << llendl; - - std::string url = region->getCapability("ChatSessionRequest"); - - LLSD data; - - data["params"] = LLSD::emptyArray(); - for (int i = 0; i < count; i++) - { - data["params"].append(ids[i]); - } - - data["method"] = "invite"; - data["session-id"] = mSessionID; - LLHTTPClient::post( - url, - data, - new LLSessionInviteResponder( - mSessionID)); - } - else - { - llinfos << "LLIMFloater::inviteToSession -" - << " no need to invite agents for " - << mDialog << llendl; - // successful add, because everyone that needed to get added - // was added. - } - - return TRUE; -} - -void LLIMFloater::addTypingIndicator(const LLIMInfo* im_info) -{ - // We may have lost a "stop-typing" packet, don't add it twice - if ( im_info && !mOtherTyping ) - { - mOtherTyping = true; - - // Save and set new title - mSavedTitle = getTitle(); - setTitle (mTypingStart); - - // Update speaker - LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); - if ( speaker_mgr ) - { - speaker_mgr->setSpeakerTyping(im_info->mFromID, TRUE); - } - } -} - -void LLIMFloater::removeTypingIndicator(const LLIMInfo* im_info) -{ - if ( mOtherTyping ) - { - mOtherTyping = false; - - // Revert the title to saved one - setTitle(mSavedTitle); - - if ( im_info ) - { - // Update speaker - LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); - if ( speaker_mgr ) - { - speaker_mgr->setSpeakerTyping(im_info->mFromID, FALSE); - } - } - - } -} - -// 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. - static bool is_single_window = gSavedSettings.getS32("ChatWindow") == 1; - return is_single_window; -} - -// static -void LLIMFloater::initIMFloater() -{ - // This is called on viewer start up - // init chat window type before user changed it in preferences - isChatMultiTab(); -} - -//static -void LLIMFloater::sRemoveTypingIndicator(const LLSD& data) -{ - LLUUID session_id = data["session_id"]; - if (session_id.isNull()) return; - - LLUUID from_id = data["from_id"]; - if (gAgentID == from_id || LLUUID::null == from_id) return; - - LLIMFloater* floater = LLIMFloater::findInstance(session_id); - if (!floater) return; - - if (IM_NOTHING_SPECIAL != floater->mDialog) return; - - floater->removeTypingIndicator(); -} - -void LLIMFloater::onIMChicletCreated( const LLUUID& session_id ) -{ - - if (isChatMultiTab()) - { - LLIMFloaterContainer* im_box = LLIMFloaterContainer::getInstance(); - if (!im_box) return; - - if (LLIMFloater::findInstance(session_id)) return; - - LLIMFloater* new_tab = LLIMFloater::getInstance(session_id); - - im_box->addFloater(new_tab, FALSE, LLTabContainer::END); - } - -} - -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/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp deleted file mode 100644 index 0f0ae896a2..0000000000 --- a/indra/newview/llimfloatercontainer.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/** - * @file llimfloatercontainer.cpp - * @brief Multifloater containing active IM sessions in separate tab container tabs - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - - -#include "llviewerprecompiledheaders.h" - -#include "llimfloatercontainer.h" -#include "llfloaterreg.h" -#include "llimview.h" -#include "llavatariconctrl.h" -#include "llgroupiconctrl.h" -#include "llagent.h" -#include "lltransientfloatermgr.h" - -// -// LLIMFloaterContainer -// -LLIMFloaterContainer::LLIMFloaterContainer(const LLSD& seed) -: LLMultiFloater(seed) -{ - mAutoResize = FALSE; - LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this); -} - -LLIMFloaterContainer::~LLIMFloaterContainer() -{ - mNewMessageConnection.disconnect(); - LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this); -} - -BOOL LLIMFloaterContainer::postBuild() -{ - mNewMessageConnection = LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLIMFloaterContainer::onNewMessageReceived, this, _1)); - // Do not call base postBuild to not connect to mCloseSignal to not close all floaters via Close button - // mTabContainer will be initialized in LLMultiFloater::addChild() - return TRUE; -} - -void LLIMFloaterContainer::onOpen(const LLSD& key) -{ - LLMultiFloater::onOpen(key); -/* - if (key.isDefined()) - { - LLIMFloater* im_floater = LLIMFloater::findInstance(key.asUUID()); - if (im_floater) - { - im_floater->openFloater(); - } - } -*/ -} - -void LLIMFloaterContainer::addFloater(LLFloater* floaterp, - BOOL select_added_floater, - LLTabContainer::eInsertionPoint insertion_point) -{ - if(!floaterp) return; - - // already here - if (floaterp->getHost() == this) - { - openFloater(floaterp->getKey()); - return; - } - - LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point); - - LLUUID session_id = floaterp->getKey(); - - LLIconCtrl* icon = 0; - - if(gAgent.isInGroup(session_id, TRUE)) - { - LLGroupIconCtrl::Params icon_params; - icon_params.group_id = session_id; - icon = LLUICtrlFactory::instance().create<LLGroupIconCtrl>(icon_params); - - mSessions[session_id] = floaterp; - floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); - } - else - { - LLUUID avatar_id = LLIMModel::getInstance()->getOtherParticipantID(session_id); - - LLAvatarIconCtrl::Params icon_params; - icon_params.avatar_id = avatar_id; - icon = LLUICtrlFactory::instance().create<LLAvatarIconCtrl>(icon_params); - - mSessions[session_id] = floaterp; - floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); - } - mTabContainer->setTabImage(floaterp, icon); -} - -void LLIMFloaterContainer::onCloseFloater(LLUUID& id) -{ - mSessions.erase(id); - setFocus(TRUE); -} - -void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data) -{ - LLUUID session_id = data["session_id"].asUUID(); - LLFloater* floaterp = get_ptr_in_map(mSessions, session_id); - LLFloater* current_floater = LLMultiFloater::getActiveFloater(); - - if(floaterp && current_floater && floaterp != current_floater) - { - if(LLMultiFloater::isFloaterFlashing(floaterp)) - LLMultiFloater::setFloaterFlashing(floaterp, FALSE); - LLMultiFloater::setFloaterFlashing(floaterp, TRUE); - } -} - -LLIMFloaterContainer* LLIMFloaterContainer::findInstance() -{ - return LLFloaterReg::findTypedInstance<LLIMFloaterContainer>("im_container"); -} - -LLIMFloaterContainer* LLIMFloaterContainer::getInstance() -{ - return LLFloaterReg::getTypedInstance<LLIMFloaterContainer>("im_container"); -} - -void LLIMFloaterContainer::setMinimized(BOOL b) -{ - if (isMinimized() == b) return; - - LLMultiFloater::setMinimized(b); - // Hide minimized floater (see EXT-5315) - setVisible(!b); - - if (isMinimized()) return; - - if (getActiveFloater()) - { - getActiveFloater()->setVisible(TRUE); - } -} - -// EOF diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h deleted file mode 100644 index 892ecef48d..0000000000 --- a/indra/newview/llimfloatercontainer.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file llimfloatercontainer.h - * @brief Multifloater containing active IM sessions in separate tab container tabs - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLIMFLOATERCONTAINER_H -#define LL_LLIMFLOATERCONTAINER_H - -#include <map> -#include <vector> - -#include "llfloater.h" -#include "llmultifloater.h" -#include "llavatarpropertiesprocessor.h" -#include "llgroupmgr.h" - -class LLTabContainer; - -class LLIMFloaterContainer : public LLMultiFloater -{ -public: - LLIMFloaterContainer(const LLSD& seed); - virtual ~LLIMFloaterContainer(); - - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - void onCloseFloater(LLUUID& id); - - /*virtual*/ void addFloater(LLFloater* floaterp, - BOOL select_added_floater, - LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); - - static LLFloater* getCurrentVoiceFloater(); - - static LLIMFloaterContainer* findInstance(); - - static LLIMFloaterContainer* getInstance(); - - virtual void setMinimized(BOOL b); - -private: - typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t; - avatarID_panel_map_t mSessions; - boost::signals2::connection mNewMessageConnection; - - void onNewMessageReceived(const LLSD& data); -}; - -#endif // LL_LLIMFLOATERCONTAINER_H diff --git a/indra/newview/llimhandler.cpp b/indra/newview/llimhandler.cpp index 07d73c8c66..c2b29f36e8 100644 --- a/indra/newview/llimhandler.cpp +++ b/indra/newview/llimhandler.cpp @@ -36,11 +36,12 @@ using namespace LLNotificationsUI; +extern void process_dnd_im(const LLSD& notification); + //-------------------------------------------------------------------------- -LLIMHandler::LLIMHandler(e_notification_type type, const LLSD& id) +LLIMHandler::LLIMHandler() +: LLCommunicationNotificationHandler("IM Notifications", "notifytoast") { - mType = type; - // Getting a Channel for our notifications mChannel = LLChannelManager::getInstance()->createNotificationChannel()->getHandle(); } @@ -59,72 +60,57 @@ void LLIMHandler::initChannel() } //-------------------------------------------------------------------------- -bool LLIMHandler::processNotification(const LLSD& notify) +bool LLIMHandler::processNotification(const LLNotificationPtr& notification) { - if(mChannel.isDead()) - { - return false; - } - - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - if(!notification) - return false; - - // arrange a channel on a screen - if(!mChannel.get()->getVisible()) - { - initChannel(); - } - - if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change") - { - LLSD substitutions = notification->getSubstitutions(); - - // According to comments in LLIMMgr::addMessage(), if we get message - // from ourselves, the sender id is set to null. This fixes EXT-875. - LLUUID avatar_id = substitutions["FROM_ID"].asUUID(); - if (avatar_id.isNull()) - avatar_id = gAgentID; - - LLToastIMPanel::Params im_p; - im_p.notification = notification; - im_p.avatar_id = avatar_id; - im_p.from = substitutions["FROM"].asString(); - im_p.time = substitutions["TIME"].asString(); - im_p.message = substitutions["MESSAGE"].asString(); - im_p.session_id = substitutions["SESSION_ID"].asUUID(); - - LLToastIMPanel* im_box = new LLToastIMPanel(im_p); - - LLToast::Params p; - p.notif_id = notification->getID(); - p.session_id = im_p.session_id; - p.notification = notification; - p.panel = im_box; - p.can_be_stored = false; - p.on_delete_toast = boost::bind(&LLIMHandler::onDeleteToast, this, _1); - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); - if(channel) - channel->addToast(p); - - // send a signal to the counter manager; - mNewNotificationSignal(); - } - else if (notify["sigtype"].asString() == "delete") - { - mChannel.get()->killToastByNotificationID(notification->getID()); - } - return false; -} + if(notification->isDND()) + { + LLSD data = notification->asLLSD(); //don't need this if retrieve needed data from notification getters + process_dnd_im(data); + } + else + { + if(mChannel.isDead()) + { + return false; + } + + // arrange a channel on a screen + if(!mChannel.get()->getVisible()) + { + initChannel(); + } + + LLSD substitutions = notification->getSubstitutions(); + + // According to comments in LLIMMgr::addMessage(), if we get message + // from ourselves, the sender id is set to null. This fixes EXT-875. + LLUUID avatar_id = substitutions["FROM_ID"].asUUID(); + if (avatar_id.isNull()) + avatar_id = gAgentID; + + LLToastIMPanel::Params im_p; + im_p.notification = notification; + im_p.avatar_id = avatar_id; + im_p.from = substitutions["FROM"].asString(); + im_p.time = substitutions["TIME"].asString(); + im_p.message = substitutions["MESSAGE"].asString(); + im_p.session_id = substitutions["SESSION_ID"].asUUID(); + + LLToastIMPanel* im_box = new LLToastIMPanel(im_p); + + LLToast::Params p; + p.notif_id = notification->getID(); + p.session_id = im_p.session_id; + p.notification = notification; + p.panel = im_box; + p.can_be_stored = false; + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) + channel->addToast(p); + } -//-------------------------------------------------------------------------- -void LLIMHandler::onDeleteToast(LLToast* toast) -{ - // send a signal to the counter manager - mDelNotificationSignal(); + return false; } -//-------------------------------------------------------------------------- diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 0250af6a0e..c64ecdc47a 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -171,7 +171,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label, // enable line history support for instant message bar mInputEditor->setEnableLineHistory(TRUE); - //*TODO we probably need the same "awaiting message" thing in LLIMFloater + //*TODO we probably need the same "awaiting message" thing in LLFloaterIMSession LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mSessionUUID); if (!im_session) { diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 4000570872..8c862548bb 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -29,6 +29,8 @@ #include "llimview.h" #include "llavatarnamecache.h" // IDEVO +#include "llavataractions.h" +#include "llfloaterconversationlog.h" #include "llfloaterreg.h" #include "llfontgl.h" #include "llgl.h" @@ -41,14 +43,15 @@ #include "lltextutil.h" #include "lltrans.h" #include "lluictrlfactory.h" - +#include "llfloaterimsessiontab.h" #include "llagent.h" #include "llagentui.h" #include "llappviewer.h" #include "llavatariconctrl.h" #include "llcallingcard.h" #include "llchat.h" -#include "llimfloater.h" +#include "llfloaterimsession.h" +#include "llfloaterimcontainer.h" #include "llgroupiconctrl.h" #include "llmd5.h" #include "llmutelist.h" @@ -57,12 +60,14 @@ #include "llviewerwindow.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnearbychat.h" +#include "llfloaterimnearbychat.h" #include "llspeakers.h" //for LLIMSpeakerMgr #include "lltextbox.h" #include "lltoolbarview.h" #include "llviewercontrol.h" #include "llviewerparcelmgr.h" +#include "llconversationlog.h" +#include "message.h" const static std::string ADHOC_NAME_SUFFIX(" Conference"); @@ -97,6 +102,47 @@ BOOL LLSessionTimeoutTimer::tick() return TRUE; } + + +void process_dnd_im(const LLSD& notification) +{ + LLSD data = notification["substitutions"]; + LLUUID sessionID = data["SESSION_ID"].asUUID(); + LLUUID fromID = data["FROM_ID"].asUUID(); + + //re-create the IM session if needed + //(when coming out of DND mode upon app restart) + if(!gIMMgr->hasSession(sessionID)) + { + //reconstruct session using data from the notification + std::string name = data["FROM"]; + LLAvatarName av_name; + if (LLAvatarNameCache::get(data["FROM_ID"], &av_name)) + { + name = av_name.getDisplayName(); + } + + + LLIMModel::getInstance()->newSession(sessionID, + name, + IM_NOTHING_SPECIAL, + fromID, + false, + false); //will need slight refactor to retrieve whether offline message or not (assume online for now) + + LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); + + if (im_box) + { + im_box->flashConversationItemWidget(sessionID, true); + } + + } +} + + + + static void on_avatar_name_cache_toast(const LLUUID& agent_id, const LLAvatarName& av_name, LLSD msg) @@ -108,77 +154,183 @@ static void on_avatar_name_cache_toast(const LLUUID& agent_id, args["FROM"] = av_name.getCompleteName(); args["FROM_ID"] = msg["from_id"]; args["SESSION_ID"] = msg["session_id"]; - LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLIMFloater::show, msg["session_id"].asUUID())); -} - -void toast_callback(const LLSD& msg){ - // do not show toast in busy mode or it goes from agent - if (gAgent.getBusy() || gAgent.getID() == msg["from_id"]) - { - return; - } - - // check whether incoming IM belongs to an active session or not - if (LLIMModel::getInstance()->getActiveSessionID().notNull() - && LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"]) - { - return; - } - - // Skip toasting for system messages - if (msg["from_id"].asUUID() == LLUUID::null) - { - return; - } - - // *NOTE Skip toasting if the user disable it in preferences/debug settings ~Alexandrea - LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession( - msg["session_id"]); - if (!gSavedSettings.getBOOL("EnableGroupChatPopups") - && session->isGroupSessionType()) - { - return; - } - if (!gSavedSettings.getBOOL("EnableIMChatPopups") - && !session->isGroupSessionType()) + args["SESSION_TYPE"] = msg["session_type"]; + LLNotificationsUtil::add("IMToast", args, args, boost::bind(&LLFloaterIMContainer::showConversation, LLFloaterIMContainer::getInstance(), msg["session_id"].asUUID())); +} + +void on_new_message(const LLSD& msg) +{ + std::string action; + LLUUID participant_id = msg["from_id"].asUUID(); + LLUUID session_id = msg["session_id"].asUUID(); + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id); + + // determine action for this session + + if (session_id.isNull()) + { + action = gSavedSettings.getString("NotificationNearbyChatOptions"); + } + else if(session->isP2PSessionType()) + { + if (LLAvatarTracker::instance().isBuddy(participant_id)) + { + action = gSavedSettings.getString("NotificationFriendIMOptions"); + } + else + { + action = gSavedSettings.getString("NotificationNonFriendIMOptions"); + } + } + else if(session->isAdHocSessionType()) + { + action = gSavedSettings.getString("NotificationConferenceIMOptions"); + } + else if(session->isGroupSessionType()) + { + action = gSavedSettings.getString("NotificationGroupChatOptions"); + } + + // do not show notification which goes from agent + if (gAgent.getID() == participant_id) + { + return; + } + + // execution of the action + + LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id); + + if (im_box->isFrontmost() && im_box->getSelectedSession() == session_id + && !(session_floater->getHost() ? im_box->isMinimized() : session_floater->isMinimized())) { return; } + + //session floater not focused (visible or not) + bool session_floater_not_focused = session_floater && !session_floater->hasFocus(); + + //conv. floater is closed + bool conversation_floater_is_closed = + !( im_box + && im_box->isInVisibleChain() + && !im_box->isMinimized()); + + //conversation floater not focused (visible or not) + bool conversation_floater_not_focused = + conversation_floater_is_closed || !im_box->hasFocus(); + // sess. floater is open + bool session_floater_is_open = + session_floater + && session_floater->isInVisibleChain() + && !session_floater->isMinimized() + && !(session_floater->getHost() && session_floater->getHost()->isMinimized()); + + bool conversation_floater_collapsed = !session_floater->isMessagePaneExpanded(); + if (("toast" == action && !session_floater_is_open) || conversation_floater_collapsed) + { + //User is not focused on conversation containing the message + if(session_floater_not_focused || conversation_floater_collapsed) + { + if(!LLMuteList::getInstance()->isMuted(participant_id)) + { + im_box->flashConversationItemWidget(session_id, true); + } + //The conversation floater isn't focused/open + if(conversation_floater_not_focused || conversation_floater_collapsed) + { + if(!LLMuteList::getInstance()->isMuted(participant_id) + && !gAgent.isDoNotDisturb()) + { + gToolBarView->flashCommand(LLCommandId("chat"), true); + } + + //Show IM toasts (upper right toasts) + // Skip toasting for system messages and for nearby chat + if(session_id.notNull() && participant_id.notNull()) + { + LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg)); + } + } + } + } + + else if ("flash" == action) + { + if (!gAgent.isDoNotDisturb()) + { + im_box->flashConversationItemWidget(session_id, true); + if(conversation_floater_not_focused) + { + //User is not focused on conversation containing the message + gToolBarView->flashCommand(LLCommandId("chat"), true); + } + } + else if(session_id.notNull() && participant_id.notNull()) + { + //If a DND message, allow notification to be stored so upon DND exit + //useMostItrusiveIMNotification will be called to notify user a message exists + LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg)); + } + } - // Skip toasting if we have open window of IM with this session id - LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]); - if (open_im_floater && open_im_floater->getVisible()) - { - return; - } + else if("openconversations" == action) + { + //User is not focused on conversation containing the message + if(session_floater_not_focused) + { + //Flash line item + im_box->flashConversationItemWidget(session_id, true); - LLAvatarNameCache::get(msg["from_id"].asUUID(), - boost::bind(&on_avatar_name_cache_toast, - _1, _2, msg)); -} - -void LLIMModel::setActiveSessionID(const LLUUID& session_id) -{ - // check if such an ID really exists - if (!findIMSession(session_id)) - { - llwarns << "Trying to set as active a non-existent session!" << llendl; - return; - } + if(!gAgent.isDoNotDisturb()) + { + //Surface conversations floater + LLFloaterReg::showInstance("im_container"); + im_box->collapseMessagesPane(false); + if (session_floater) + { + if (session_floater->getHost()) + { + if (NULL != im_box && im_box->isMinimized()) + { + LLFloater::onClickMinimize(im_box); + } + } + else + { + if (session_floater->isMinimized()) + { + LLFloater::onClickMinimize(session_floater); + } + } + } + } - mActiveSessionID = session_id; + //If in DND mode, allow notification to be stored so upon DND exit + //useMostItrusiveIMNotification will be called to notify user a message exists + if(session_id.notNull() + && participant_id.notNull() + && gAgent.isDoNotDisturb() + && !session_floater_is_open) + { + LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg)); + } + } + } } LLIMModel::LLIMModel() { - addNewMsgCallback(boost::bind(&LLIMFloater::newIMCallback, _1)); - addNewMsgCallback(boost::bind(&toast_callback, _1)); + addNewMsgCallback(boost::bind(&LLFloaterIMSession::newIMCallback, _1)); + addNewMsgCallback(boost::bind(&on_new_message, _1)); } -LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice) +LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice, bool has_offline_msg) : mSessionID(session_id), mName(name), mType(type), + mHasOfflineMessage(has_offline_msg), mParticipantUnreadMessageCount(0), mNumUnread(0), mOtherParticipantID(other_participant_id), @@ -190,7 +342,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mTextIMPossible(true), mOtherParticipantIsAvatar(true), mStartCallOnInitialize(false), - mStartedAsIMCall(voice) + mStartedAsIMCall(voice), + mAvatarNameCacheConnection() { // set P2P type by default mSessionType = P2P_SESSION; @@ -256,30 +409,22 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& } buildHistoryFileName(); - - if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) - { - std::list<LLSD> chat_history; - - //involves parsing of a chat history - LLLogChat::loadAllHistory(mHistoryFileName, chat_history); - addMessagesFromHistory(chat_history); - } + loadHistory(); // Localizing name of ad-hoc session. STORM-153 // Changing name should happen here- after the history file was created, so that // history files have consistent (English) names in different locales. if (isAdHocSessionType() && IM_SESSION_INVITE == mType) { - LLAvatarNameCache::get(mOtherParticipantID, - boost::bind(&LLIMModel::LLIMSession::onAdHocNameCache, - this, _2)); + mAvatarNameCacheConnection = LLAvatarNameCache::get(mOtherParticipantID,boost::bind(&LLIMModel::LLIMSession::onAdHocNameCache,this, _2)); } } void LLIMModel::LLIMSession::onAdHocNameCache(const LLAvatarName& av_name) { - if (av_name.mIsTemporaryName) + mAvatarNameCacheConnection.disconnect(); + + if (!av_name.isValidName()) { S32 separator_index = mName.rfind(" "); std::string name = mName.substr(0, separator_index); @@ -375,6 +520,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES break; } } + default: + break; } // Update speakers list when connected if (LLVoiceChannel::STATE_CONNECTED == new_state) @@ -385,6 +532,11 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES LLIMModel::LLIMSession::~LLIMSession() { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + delete mSpeakers; mSpeakers = NULL; @@ -450,11 +602,11 @@ void LLIMModel::LLIMSession::addMessagesFromHistory(const std::list<LLSD>& histo { const LLSD& msg = *it; - std::string from = msg[IM_FROM]; + std::string from = msg[LL_IM_FROM]; LLUUID from_id; - if (msg[IM_FROM_ID].isDefined()) + if (msg[LL_IM_FROM_ID].isDefined()) { - from_id = msg[IM_FROM_ID].asUUID(); + from_id = msg[LL_IM_FROM_ID].asUUID(); } else { @@ -463,8 +615,8 @@ void LLIMModel::LLIMSession::addMessagesFromHistory(const std::list<LLSD>& histo gCacheName->getUUID(legacy_name, from_id); } - std::string timestamp = msg[IM_TIME]; - std::string text = msg[IM_TEXT]; + std::string timestamp = msg[LL_IM_TIME]; + std::string text = msg[LL_IM_TEXT]; addMessage(from, from_id, text, timestamp, true); @@ -488,10 +640,23 @@ void LLIMModel::LLIMSession::chatFromLogFile(LLLogChat::ELogLineType type, const } } +void LLIMModel::LLIMSession::loadHistory() +{ + mMsgs.clear(); + + if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) + { + std::list<LLSD> chat_history; + + //involves parsing of a chat history + LLLogChat::loadChatHistory(mHistoryFileName, chat_history); + addMessagesFromHistory(chat_history); + } +} + LLIMModel::LLIMSession* LLIMModel::findIMSession(const LLUUID& session_id) const { - return get_if_there(mId2SessionMap, session_id, - (LLIMModel::LLIMSession*) NULL); + return get_if_there(mId2SessionMap, session_id, (LLIMModel::LLIMSession*) NULL); } //*TODO consider switching to using std::set instead of std::list for holding LLUUIDs across the whole code @@ -533,7 +698,7 @@ LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const uuid_vec_t& ids) return NULL; } -bool LLIMModel::LLIMSession::isOutgoingAdHoc() +bool LLIMModel::LLIMSession::isOutgoingAdHoc() const { return IM_SESSION_CONFERENCE_START == mType; } @@ -553,6 +718,19 @@ bool LLIMModel::LLIMSession::isOtherParticipantAvaline() return !mOtherParticipantIsAvatar; } +LLUUID LLIMModel::LLIMSession::generateOutgouigAdHocHash() const +{ + LLUUID hash = LLUUID::null; + + if (mInitialTargetIDs.size()) + { + std::set<LLUUID> sorted_uuids(mInitialTargetIDs.begin(), mInitialTargetIDs.end()); + hash = generateHash(sorted_uuids); + } + + return hash; +} + void LLIMModel::LLIMSession::buildHistoryFileName() { mHistoryFileName = mName; @@ -569,7 +747,7 @@ void LLIMModel::LLIMSession::buildHistoryFileName() if (mInitialTargetIDs.size()) { std::set<LLUUID> sorted_uuids(mInitialTargetIDs.begin(), mInitialTargetIDs.end()); - mHistoryFileName = mName + " hash" + generateHash(sorted_uuids); + mHistoryFileName = mName + " hash" + generateHash(sorted_uuids).asString(); } else { @@ -584,15 +762,7 @@ void LLIMModel::LLIMSession::buildHistoryFileName() // so no need for a callback in LLAvatarNameCache::get() if (LLAvatarNameCache::get(mOtherParticipantID, &av_name)) { - if (av_name.mUsername.empty()) - { - // Display names are off, use mDisplayName which will be the legacy name - mHistoryFileName = LLCacheName::buildUsername(av_name.mDisplayName); - } - else - { - mHistoryFileName = av_name.mUsername; - } + mHistoryFileName = LLCacheName::buildUsername(av_name.getUserName()); } else { @@ -603,7 +773,7 @@ void LLIMModel::LLIMSession::buildHistoryFileName() } //static -std::string LLIMModel::LLIMSession::generateHash(const std::set<LLUUID>& sorted_uuids) +LLUUID LLIMModel::LLIMSession::generateHash(const std::set<LLUUID>& sorted_uuids) { LLMD5 md5_uuid; @@ -617,7 +787,7 @@ std::string LLIMModel::LLIMSession::generateHash(const std::set<LLUUID>& sorted_ LLUUID participants_md5_hash; md5_uuid.raw_digest((unsigned char*) participants_md5_hash.mData); - return participants_md5_hash.asString(); + return participants_md5_hash; } void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id) @@ -631,16 +801,19 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con { mId2SessionMap.erase(old_session_id); mId2SessionMap[new_session_id] = session; - - gIMMgr->notifyObserverSessionIDUpdated(old_session_id, new_session_id); } - LLIMFloater* im_floater = LLIMFloater::findInstance(old_session_id); + LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(old_session_id); if (im_floater) { im_floater->sessionInitReplyReceived(new_session_id); } + if (old_session_id != new_session_id) + { + gIMMgr->notifyObserverSessionIDUpdated(old_session_id, new_session_id); + } + // auto-start the call on session initialization? if (session->mStartCallOnInitialize) { @@ -676,7 +849,7 @@ void LLIMModel::testMessages() //session name should not be empty bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, - const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice) + const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice, bool has_offline_msg) { if (name.empty()) { @@ -690,22 +863,23 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co return false; } - LLIMSession* session = new LLIMSession(session_id, name, type, other_participant_id, ids, voice); + LLIMSession* session = new LLIMSession(session_id, name, type, other_participant_id, ids, voice, has_offline_msg); mId2SessionMap[session_id] = session; // When notifying observer, name of session is used instead of "name", because they may not be the // same if it is an adhoc session (in this case name is localized in LLIMSession constructor). std::string session_name = LLIMModel::getInstance()->getName(session_id); - LLIMMgr::getInstance()->notifyObserverSessionAdded(session_id, session_name, other_participant_id); + LLIMMgr::getInstance()->notifyObserverSessionAdded(session_id, session_name, other_participant_id,has_offline_msg); return true; } -bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, bool voice) +bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, bool voice, bool has_offline_msg) { - uuid_vec_t no_ids; - return newSession(session_id, name, type, other_participant_id, no_ids, voice); + uuid_vec_t ids; + ids.push_back(other_participant_id); + return newSession(session_id, name, type, other_participant_id, ids, voice, has_offline_msg); } bool LLIMModel::clearSession(const LLUUID& session_id) @@ -716,6 +890,16 @@ bool LLIMModel::clearSession(const LLUUID& session_id) return true; } +void LLIMModel::getMessages(const LLUUID& session_id, std::list<LLSD>& messages, int start_index, const bool sendNoUnreadMsgs) +{ + getMessagesSilently(session_id, messages, start_index); + + if (sendNoUnreadMsgs) + { + sendNoUnreadMessages(session_id); + } +} + void LLIMModel::getMessagesSilently(const LLUUID& session_id, std::list<LLSD>& messages, int start_index) { LLIMSession* session = findIMSession(session_id); @@ -757,13 +941,6 @@ void LLIMModel::sendNoUnreadMessages(const LLUUID& session_id) mNoUnreadMsgsSignal(arg); } -void LLIMModel::getMessages(const LLUUID& session_id, std::list<LLSD>& messages, int start_index) -{ - getMessagesSilently(session_id, messages, start_index); - - sendNoUnreadMessages(session_id); -} - bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) { LLIMSession* session = findIMSession(session_id); @@ -781,19 +958,20 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, bool LLIMModel::logToFile(const std::string& file_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) { - if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) + if (gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 1) { std::string from_name = from; LLAvatarName av_name; if (!from_id.isNull() && LLAvatarNameCache::get(from_id, &av_name) && - !av_name.mIsDisplayNameDefault) + !av_name.isDisplayNameDefault()) { from_name = av_name.getCompleteName(); } LLLogChat::saveHistory(file_name, from_name, from_id, utf8_text); + LLConversationLog::instance().cache(); // update the conversation log too return true; } else @@ -831,6 +1009,7 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co arg["from"] = from; arg["from_id"] = from_id; arg["time"] = LLLogChat::timestamp(false); + arg["session_type"] = session->mSessionType; mNewMsgSignal(arg); return true; @@ -878,7 +1057,7 @@ const std::string LLIMModel::getName(const LLUUID& session_id) const { LLIMSession* session = findIMSession(session_id); - if (!session) + if (!session) { llwarns << "session " << session_id << "does not exist " << llendl; return LLTrans::getString("no_session_message"); @@ -904,7 +1083,7 @@ const LLUUID& LLIMModel::getOtherParticipantID(const LLUUID& session_id) const LLIMSession* session = findIMSession(session_id); if (!session) { - llwarns << "session " << session_id << "does not exist " << llendl; + llwarns << "session " << session_id << " does not exist " << llendl; return LLUUID::null; } @@ -1376,7 +1555,7 @@ public: && LLIMModel::getInstance()->findIMSession(mSessionID)) { // TODO remove in 2010, for voice calls we do not open an IM window - //LLIMFloater::show(mSessionID); + //LLFloaterIMSession::show(mSessionID); } gIMMgr->clearPendingAgentListUpdates(mSessionID); @@ -1444,6 +1623,11 @@ LLUUID LLIMMgr::computeSessionID( session_id = other_participant_id ^ agent_id; } } + + if (gAgent.isInGroup(session_id) && (session_id != other_participant_id)) + { + llwarns << "Group session id different from group id: IM type = " << dialog << ", session id = " << session_id << ", group id = " << other_participant_id << llendl; + } return session_id; } @@ -1520,7 +1704,7 @@ LLIMMgr::onConfirmForceCloseError( //only 1 option really LLUUID session_id = notification["payload"]["session_id"]; - LLFloater* floater = LLIMFloater::findInstance(session_id); + LLFloater* floater = LLFloaterIMSession::findInstance(session_id); if ( floater ) { floater->closeFloater(FALSE); @@ -1878,7 +2062,7 @@ void LLOutgoingCallDialog::show(const LLSD& key) LLAvatarName av_name; if (LLAvatarNameCache::get(callee_id, &av_name)) { - final_callee_name = av_name.mDisplayName; + final_callee_name = av_name.getDisplayName(); title = av_name.getCompleteName(); } } @@ -1980,7 +2164,8 @@ BOOL LLOutgoingCallDialog::postBuild() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) : -LLCallDialog(payload) +LLCallDialog(payload), +mAvatarNameCacheConnection() { } @@ -2050,9 +2235,11 @@ BOOL LLIncomingCallDialog::postBuild() else { // Get the full name information - LLAvatarNameCache::get(caller_id, - boost::bind(&LLIncomingCallDialog::onAvatarNameCache, - this, _1, _2, call_type)); + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(caller_id, boost::bind(&LLIncomingCallDialog::onAvatarNameCache, this, _1, _2, call_type)); } setIcon(session_id, caller_id); @@ -2078,7 +2265,6 @@ BOOL LLIncomingCallDialog::postBuild() getChildView("Start IM")->setVisible( is_avatar && notify_box_type != "VoiceInviteAdHoc" && notify_box_type != "VoiceInviteGroup"); setCanDrag(FALSE); - return TRUE; } @@ -2086,7 +2272,6 @@ void LLIncomingCallDialog::setCallerName(const std::string& ui_title, const std::string& ui_label, const std::string& call_type) { - setTitle(ui_title); // call_type may be a string like " is calling." LLUICtrl* caller_name_widget = getChild<LLUICtrl>("caller name"); @@ -2097,14 +2282,15 @@ void LLIncomingCallDialog::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, const std::string& call_type) { + mAvatarNameCacheConnection.disconnect(); std::string title = av_name.getCompleteName(); - setCallerName(title, av_name.mDisplayName, call_type); + setCallerName(title, av_name.getCompleteName(), call_type); } void LLIncomingCallDialog::onOpen(const LLSD& key) { LLCallDialog::onOpen(key); - + make_ui_sound("UISndStartIM"); LLStringUtil::format_map_t args; LLGroupData data; // if it's a group call, retrieve group name to use it in question @@ -2112,18 +2298,6 @@ void LLIncomingCallDialog::onOpen(const LLSD& key) { args["[GROUP]"] = data.mName; } - // tell the user which voice channel they would be leaving - LLVoiceChannel *voice = LLVoiceChannel::getCurrentVoiceChannel(); - if (voice && !voice->getSessionName().empty()) - { - args["[CURRENT_CHAT]"] = voice->getSessionName(); - getChild<LLUICtrl>("question")->setValue(getString(key["question_type"].asString(), args)); - } - else - { - args["[CURRENT_CHAT]"] = getString("localchat"); - getChild<LLUICtrl>("question")->setValue(getString(key["question_type"].asString(), args)); - } } //static @@ -2184,6 +2358,10 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload { gIMMgr->startCall(session_id, LLVoiceChannel::INCOMING_CALL); } + else + { + LLAvatarActions::startIM(caller_id); + } gIMMgr->clearPendingAgentListUpdates(session_id); gIMMgr->clearPendingInvitation(session_id); @@ -2386,7 +2564,7 @@ LLIMMgr::LLIMMgr() mPendingInvitations = LLSD::emptyMap(); mPendingAgentListUpdates = LLSD::emptyMap(); - LLIMModel::getInstance()->addNewMsgCallback(boost::bind(&LLIMFloater::sRemoveTypingIndicator, _1)); + LLIMModel::getInstance()->addNewMsgCallback(boost::bind(&LLFloaterIMSession::sRemoveTypingIndicator, _1)); } // Add a message to a session. @@ -2395,6 +2573,7 @@ void LLIMMgr::addMessage( const LLUUID& target_id, const std::string& from, const std::string& msg, + bool is_offline_msg, const std::string& session_name, EInstantMessage dialog, U32 parent_estate_id, @@ -2403,6 +2582,7 @@ void LLIMMgr::addMessage( bool link_name) // If this is true, then we insert the name and link it to a profile { LLUUID other_participant_id = target_id; + LLUUID new_session_id = session_id; if (new_session_id.isNull()) { @@ -2412,15 +2592,22 @@ void LLIMMgr::addMessage( //*NOTE session_name is empty in case of incoming P2P sessions std::string fixed_session_name = from; + bool name_is_setted = false; if(!session_name.empty() && session_name.size()>1) { fixed_session_name = session_name; + name_is_setted = true; } bool new_session = !hasSession(new_session_id); if (new_session) { - LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id); + LLAvatarName av_name; + if (LLAvatarNameCache::get(other_participant_id, &av_name) && !name_is_setted) + { + fixed_session_name = av_name.getDisplayName(); + } + LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id, false, is_offline_msg); // When we get a new IM, and if you are a god, display a bit // of information about the source. This is to help liaisons @@ -2455,16 +2642,35 @@ void LLIMMgr::addMessage( return; } - make_ui_sound("UISndNewIncomingIMSession"); + //Play sound for new conversations + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation") == TRUE)) + { + make_ui_sound("UISndNewIncomingIMSession"); + } } - bool skip_message = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && - LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL); + bool skip_message = false; + if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly")) + { + // Evaluate if we need to skip this message when that setting is true (default is false) + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(new_session_id); + skip_message = (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL); // Skip non friends... + skip_message &= !session->isGroupSessionType(); // Do not skip group chats... + skip_message &= !(other_participant_id == gAgentID); // You are your best friend... Don't skip yourself + } if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !skip_message) { LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg); } + + // Open conversation floater if offline messages are present + if (is_offline_msg) + { + LLFloaterReg::showInstance("im_container"); + LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container")-> + flashConversationItemWidget(new_session_id, true); + } } void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& message_name, const LLSD& args) @@ -2479,11 +2685,9 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess LLChat chat(message); chat.mSourceType = CHAT_SOURCE_SYSTEM; - - LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar"); - LLNearbyChat* nearby_chat = chat_bar->findChild<LLNearbyChat>("nearby_chat"); - if(nearby_chat) + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + if (nearby_chat) { nearby_chat->addMessage(chat); } @@ -2497,6 +2701,7 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess gIMMgr->addMessage(session_id, LLUUID::null, SYSTEM_FROM, message.getString()); } // log message to file + else { std::string session_name; @@ -2579,7 +2784,8 @@ LLUUID LLIMMgr::addSession( { LLDynamicArray<LLUUID> ids; ids.put(other_participant_id); - return addSession(name, dialog, other_participant_id, ids, voice); + LLUUID session_id = addSession(name, dialog, other_participant_id, ids, voice); + return session_id; } // Adds a session using the given session_id. If the session already exists @@ -2588,7 +2794,8 @@ LLUUID LLIMMgr::addSession( const std::string& name, EInstantMessage dialog, const LLUUID& other_participant_id, - const LLDynamicArray<LLUUID>& ids, bool voice) + const LLDynamicArray<LLUUID>& ids, bool voice, + const LLUUID& floater_id) { if (0 == ids.getLength()) { @@ -2603,7 +2810,21 @@ LLUUID LLIMMgr::addSession( LLUUID session_id = computeSessionID(dialog,other_participant_id); - bool new_session = !LLIMModel::getInstance()->findIMSession(session_id); + if (floater_id.notNull()) + { + LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(floater_id); + + if (im_floater) + { + // The IM floater should be initialized with a new session_id + // so that it is found by that id when creating a chiclet in LLFloaterIMSession::onIMChicletCreated, + // and a new floater is not created. + im_floater->initIMSession(session_id); + im_floater->reloadMessages(); + } + } + + bool new_session = (LLIMModel::getInstance()->findIMSession(session_id) == NULL); //works only for outgoing ad-hoc sessions if (new_session && IM_SESSION_CONFERENCE_START == dialog && ids.size()) @@ -2616,10 +2837,17 @@ LLUUID LLIMMgr::addSession( } } + //Notify observers that a session was added if (new_session) { LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids, voice); } + //Notifies observers that the session was already added + else + { + std::string session_name = LLIMModel::getInstance()->getName(session_id); + LLIMMgr::getInstance()->notifyObserverSessionActivated(session_id, session_name, other_participant_id); + } //we don't need to show notes about online/offline, mute/unmute users' statuses for existing sessions if (!new_session) return session_id; @@ -2634,6 +2862,8 @@ LLUUID LLIMMgr::addSession( noteMutedUsers(session_id, ids); } + notifyObserverSessionVoiceOrIMStarted(session_id); + return session_id; } @@ -2739,12 +2969,17 @@ void LLIMMgr::inviteToSession( if (voice_invite) { - if ( // if we are rejecting group calls - (gSavedSettings.getBOOL("VoiceCallsRejectGroup") && notify_box_type == "VoiceInviteGroup") || - // or we're rejecting non-friend voice calls and this isn't a friend - (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL)) - ) + bool isRejectGroupCall = (gSavedSettings.getBOOL("VoiceCallsRejectGroup") && (notify_box_type == "VoiceInviteGroup")); + bool isRejectNonFriendCall = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL)); + bool isRejectDoNotDisturb = (gAgent.isDoNotDisturb() && !hasSession(session_id)); + if (isRejectGroupCall || isRejectNonFriendCall || isRejectDoNotDisturb) { + if (isRejectDoNotDisturb && !isRejectGroupCall && !isRejectNonFriendCall) + { + LLSD args; + addSystemMessage(session_id, "you_auto_rejected_call", args); + send_do_not_disturb_message(gMessageSystem, caller_id, session_id); + } // silently decline the call LLIncomingCallDialog::processCallResponse(1, payload); return; @@ -2806,7 +3041,7 @@ void LLIMMgr::clearPendingInvitation(const LLUUID& session_id) void LLIMMgr::processAgentListUpdates(const LLUUID& session_id, const LLSD& body) { - LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id); if ( im_floater ) { im_floater->processAgentListUpdates(body); @@ -2912,11 +3147,27 @@ void LLIMMgr::clearPendingAgentListUpdates(const LLUUID& session_id) } } -void LLIMMgr::notifyObserverSessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) +void LLIMMgr::notifyObserverSessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg) { for (session_observers_list_t::iterator it = mSessionObservers.begin(); it != mSessionObservers.end(); it++) { - (*it)->sessionAdded(session_id, name, other_participant_id); + (*it)->sessionAdded(session_id, name, other_participant_id, has_offline_msg); + } +} + +void LLIMMgr::notifyObserverSessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) +{ + for (session_observers_list_t::iterator it = mSessionObservers.begin(); it != mSessionObservers.end(); it++) + { + (*it)->sessionActivated(session_id, name, other_participant_id); + } +} + +void LLIMMgr::notifyObserverSessionVoiceOrIMStarted(const LLUUID& session_id) +{ + for (session_observers_list_t::iterator it = mSessionObservers.begin(); it != mSessionObservers.end(); it++) + { + (*it)->sessionVoiceOrIMStarted(session_id); } } @@ -3016,7 +3267,7 @@ void LLIMMgr::noteOfflineUsers( { LLUIString offline = LLTrans::getString("offline_message"); // Use display name only because this user is your friend - offline.setArg("[NAME]", av_name.mDisplayName); + offline.setArg("[NAME]", av_name.getDisplayName()); im_model.proccessOnlineOfflineNotification(session_id, offline); } } @@ -3064,7 +3315,7 @@ void LLIMMgr::processIMTypingStop(const LLIMInfo* im_info) void LLIMMgr::processIMTypingCore(const LLIMInfo* im_info, BOOL typing) { LLUUID session_id = computeSessionID(im_info->mIMType, im_info->mFromID); - LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id); if ( im_floater ) { im_floater->processIMTyping(im_info, typing); @@ -3109,7 +3360,7 @@ public: speaker_mgr->updateSpeakers(gIMMgr->getPendingAgentListUpdates(session_id)); } - LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id); if ( im_floater ) { if ( body.has("session_info") ) @@ -3203,7 +3454,7 @@ public: const LLSD& input) const { LLUUID session_id = input["body"]["session_id"].asUUID(); - LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id); if ( im_floater ) { im_floater->processSessionUpdate(input["body"]["info"]); @@ -3248,13 +3499,11 @@ public: time_t timestamp = (time_t) message_params["timestamp"].asInteger(); - BOOL is_busy = gAgent.getBusy(); - BOOL is_muted = LLMuteList::getInstance()->isMuted( - from_id, - name, - LLMute::flagTextChat); + BOOL is_do_not_disturb = gAgent.isDoNotDisturb(); - if (is_busy || is_muted) + //don't return if user is muted b/c proper way to ignore a muted user who + //initiated an adhoc/group conference is to create then leave the session (see STORM-1731) + if (is_do_not_disturb) { return; } @@ -3279,6 +3528,7 @@ public: from_id, name, buffer, + IM_OFFLINE == offline, std::string((char*)&bin_bucket[0]), IM_SESSION_INVITE, message_params["parent_estate_id"].asInteger(), diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 7c2cd03d97..da6039a3ae 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -27,7 +27,7 @@ #ifndef LL_LLIMVIEW_H #define LL_LLIMVIEW_H -#include "lldockablefloater.h" +#include "../llui/lldockablefloater.h" #include "lleventtimer.h" #include "llinstantmessage.h" @@ -70,10 +70,11 @@ public: GROUP_SESSION, ADHOC_SESSION, AVALINE_SESSION, + NONE_SESSION, } SType; LLIMSession(const LLUUID& session_id, const std::string& name, - const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice); + const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice, bool has_offline_msg); virtual ~LLIMSession(); void sessionInitReplyReceived(const LLUUID& new_session_id); @@ -84,7 +85,7 @@ public: /** @deprecated */ static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata); - bool isOutgoingAdHoc(); + bool isOutgoingAdHoc() const; bool isAdHoc(); bool isP2P(); bool isOtherParticipantAvaline(); @@ -94,10 +95,14 @@ public: bool isGroupSessionType() const { return mSessionType == GROUP_SESSION;} bool isAvalineSessionType() const { return mSessionType == AVALINE_SESSION;} + LLUUID generateOutgouigAdHocHash() const; + //*TODO make private /** ad-hoc sessions involve sophisticated chat history file naming schemes */ void buildHistoryFileName(); + void loadHistory(); + LLUUID mSessionID; std::string mName; EInstantMessage mType; @@ -133,22 +138,18 @@ public: //if IM session is created for a voice call bool mStartedAsIMCall; + bool mHasOfflineMessage; + private: void onAdHocNameCache(const LLAvatarName& av_name); - static std::string generateHash(const std::set<LLUUID>& sorted_uuids); + static LLUUID generateHash(const std::set<LLUUID>& sorted_uuids); + boost::signals2::connection mAvatarNameCacheConnection; }; LLIMModel(); - - //we should control the currently active session - LLUUID mActiveSessionID; - void setActiveSessionID(const LLUUID& session_id); - void resetActiveSessionID() { mActiveSessionID.setNull(); } - LLUUID getActiveSessionID() { return mActiveSessionID; } - /** Session id to session object */ std::map<LLUUID, LLIMSession*> mId2SessionMap; @@ -181,10 +182,10 @@ public: * @param name session name should not be empty, will return false if empty */ bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, - const uuid_vec_t& ids, bool voice = false); + const uuid_vec_t& ids, bool voice = false, bool has_offline_msg = false); bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, - const LLUUID& other_participant_id, bool voice = false); + const LLUUID& other_participant_id, bool voice = false, bool has_offline_msg = false); /** * Remove all session data associated with a session specified by session_id @@ -192,12 +193,6 @@ public: bool clearSession(const LLUUID& session_id); /** - * Populate supplied std::list with messages starting from index specified by start_index without - * emitting no unread messages signal. - */ - void getMessagesSilently(const LLUUID& session_id, std::list<LLSD>& messages, int start_index = 0); - - /** * Sends no unread messages signal. */ void sendNoUnreadMessages(const LLUUID& session_id); @@ -205,7 +200,7 @@ public: /** * Populate supplied std::list with messages starting from index specified by start_index */ - void getMessages(const LLUUID& session_id, std::list<LLSD>& messages, int start_index = 0); + void getMessages(const LLUUID& session_id, std::list<LLSD>& messages, int start_index = 0, const bool sendNoUnreadMsgs = true); /** * Add a message to an IM Model - the message is saved in a message store associated with a session specified by session_id @@ -288,6 +283,12 @@ public: private: /** + * Populate supplied std::list with messages starting from index specified by start_index without + * emitting no unread messages signal. + */ + void getMessagesSilently(const LLUUID& session_id, std::list<LLSD>& messages, int start_index = 0); + + /** * Add message to a list of message associated with session specified by session_id */ bool addToHistory(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text); @@ -297,7 +298,9 @@ class LLIMSessionObserver { public: virtual ~LLIMSessionObserver() {} - virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) = 0; + virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) = 0; + virtual void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) = 0; + virtual void sessionVoiceOrIMStarted(const LLUUID& session_id) = 0; virtual void sessionRemoved(const LLUUID& session_id) = 0; virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) = 0; }; @@ -324,6 +327,7 @@ public: const LLUUID& target_id, const std::string& from, const std::string& msg, + bool is_offline_msg = false, const std::string& session_name = LLStringUtil::null, EInstantMessage dialog = IM_NOTHING_SPECIAL, U32 parent_estate_id = 0, @@ -347,10 +351,12 @@ public: // Adds a session using a specific group of starting agents // the dialog type is assumed correct. Returns the uuid of the session. + // A session can be added to a floater specified by floater_id. LLUUID addSession(const std::string& name, EInstantMessage dialog, const LLUUID& other_participant_id, - const LLDynamicArray<LLUUID>& ids, bool voice = false); + const LLDynamicArray<LLUUID>& ids, bool voice = false, + const LLUUID& floater_id = LLUUID::null); /** * Creates a P2P session with the requisite handle for responding to voice calls. @@ -459,7 +465,10 @@ private: static void onInviteNameLookup(LLSD payload, const LLUUID& id, const std::string& name, bool is_group); - void notifyObserverSessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id); + void notifyObserverSessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg); + //Triggers when a session has already been added + void notifyObserverSessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id); + void notifyObserverSessionVoiceOrIMStarted(const LLUUID& session_id); void notifyObserverSessionRemoved(const LLUUID& session_id); void notifyObserverSessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); @@ -541,7 +550,14 @@ class LLIncomingCallDialog : public LLCallDialog { public: LLIncomingCallDialog(const LLSD& payload); - + ~LLIncomingCallDialog() + { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + } + /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); @@ -558,6 +574,8 @@ private: const LLAvatarName& av_name, const std::string& call_type); + boost::signals2::connection mAvatarNameCacheConnection; + /*virtual*/ void onLifetimeExpired(); }; diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 17d0b0ffbb..1e15dc832c 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -29,37 +29,24 @@ // viewer files #include "llagent.h" -#include "llagentdata.h" #include "llavataractions.h" +#include "llavatariconctrl.h" #include "llavatarnamecache.h" #include "llavatarpropertiesprocessor.h" -#include "llcallingcard.h" #include "lldateutil.h" -#include "llfloaterreporter.h" -#include "llfloaterworldmap.h" -#include "llimview.h" #include "llinspect.h" #include "llmutelist.h" -#include "llpanelblockedlist.h" +#include "llslurl.h" #include "llstartup.h" -#include "llspeakers.h" -#include "llviewermenu.h" #include "llvoiceclient.h" -#include "llviewerobjectlist.h" #include "lltransientfloatermgr.h" -#include "llnotificationsutil.h" // Linden libraries #include "llfloater.h" #include "llfloaterreg.h" -#include "llmenubutton.h" #include "lltextbox.h" -#include "lltoggleablemenu.h" #include "lltooltip.h" // positionViewNearMouse() #include "lltrans.h" -#include "lluictrl.h" - -#include "llavatariconctrl.h" class LLFetchAvatarData; @@ -80,70 +67,30 @@ public: // Inspector will be positioned relative to current mouse position LLInspectAvatar(const LLSD& avatar_id); virtual ~LLInspectAvatar(); - + /*virtual*/ BOOL postBuild(void); // Because floater is single instance, need to re-parse data on each spawn // (for example, inspector about same avatar but in different position) /*virtual*/ void onOpen(const LLSD& avatar_id); - // When closing they should close their gear menu - /*virtual*/ void onClose(bool app_quitting); - // Update view based on information from avatar properties processor void processAvatarData(LLAvatarData* data); - // override the inspector mouse leave so timer is only paused if - // gear menu is not open - /* virtual */ void onMouseLeave(S32 x, S32 y, MASK mask); - virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::GLOBAL; } private: // Make network requests for all the data to display in this view. // Used on construction and if avatar id changes. void requestUpdate(); - + // Set the volume slider to this user's current client-side volume setting, // hiding/disabling if the user is not nearby. void updateVolumeSlider(); - // Shows/hides moderator panel depending on voice state - void updateModeratorPanel(); - - // Moderator ability to enable/disable voice chat for avatar - void toggleSelectedVoice(bool enabled); - // Button callbacks - void onClickAddFriend(); - void onClickViewProfile(); - void onClickIM(); - void onClickCall(); - void onClickTeleport(); - void onClickInviteToGroup(); - void onClickPay(); - void onClickShare(); - void onToggleMute(); - void onClickReport(); - void onClickFreeze(); - void onClickEject(); - void onClickKick(); - void onClickCSR(); - void onClickZoomIn(); - void onClickFindOnMap(); - bool onVisibleFindOnMap(); - bool onVisibleEject(); - bool onVisibleFreeze(); - bool onVisibleZoomIn(); void onClickMuteVolume(); void onVolumeChange(const LLSD& data); - bool enableMute(); - bool enableUnmute(); - bool enableTeleportOffer(); - bool godModeEnabled(); - - // Is used to determine if "Add friend" option should be enabled in gear menu - bool isNotFriend(); void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); @@ -155,6 +102,7 @@ private: // an in-flight request for avatar properties from LLAvatarPropertiesProcessor // is represented by this object LLFetchAvatarData* mPropertiesRequest; + boost::signals2::connection mAvatarNameCacheConnection; }; ////////////////////////////////////////////////////////////////////////////// @@ -207,41 +155,11 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) : LLInspect( LLSD() ), // single_instance, doesn't really need key mAvatarID(), // set in onOpen() *Note: we used to show partner's name but we dont anymore --angela 3rd Dec* mAvatarName(), - mPropertiesRequest(NULL) + mPropertiesRequest(NULL), + mAvatarNameCacheConnection() { - mCommitCallbackRegistrar.add("InspectAvatar.ViewProfile", boost::bind(&LLInspectAvatar::onClickViewProfile, this)); - mCommitCallbackRegistrar.add("InspectAvatar.AddFriend", boost::bind(&LLInspectAvatar::onClickAddFriend, this)); - mCommitCallbackRegistrar.add("InspectAvatar.IM", - boost::bind(&LLInspectAvatar::onClickIM, this)); - mCommitCallbackRegistrar.add("InspectAvatar.Call", boost::bind(&LLInspectAvatar::onClickCall, this)); - mCommitCallbackRegistrar.add("InspectAvatar.Teleport", boost::bind(&LLInspectAvatar::onClickTeleport, this)); - mCommitCallbackRegistrar.add("InspectAvatar.InviteToGroup", boost::bind(&LLInspectAvatar::onClickInviteToGroup, this)); - mCommitCallbackRegistrar.add("InspectAvatar.Pay", boost::bind(&LLInspectAvatar::onClickPay, this)); - mCommitCallbackRegistrar.add("InspectAvatar.Share", boost::bind(&LLInspectAvatar::onClickShare, this)); - mCommitCallbackRegistrar.add("InspectAvatar.ToggleMute", boost::bind(&LLInspectAvatar::onToggleMute, this)); - mCommitCallbackRegistrar.add("InspectAvatar.Freeze", boost::bind(&LLInspectAvatar::onClickFreeze, this)); - mCommitCallbackRegistrar.add("InspectAvatar.Eject", boost::bind(&LLInspectAvatar::onClickEject, this)); - mCommitCallbackRegistrar.add("InspectAvatar.Kick", boost::bind(&LLInspectAvatar::onClickKick, this)); - mCommitCallbackRegistrar.add("InspectAvatar.CSR", boost::bind(&LLInspectAvatar::onClickCSR, this)); - mCommitCallbackRegistrar.add("InspectAvatar.Report", boost::bind(&LLInspectAvatar::onClickReport, this)); - mCommitCallbackRegistrar.add("InspectAvatar.FindOnMap", boost::bind(&LLInspectAvatar::onClickFindOnMap, this)); - mCommitCallbackRegistrar.add("InspectAvatar.ZoomIn", boost::bind(&LLInspectAvatar::onClickZoomIn, this)); - mCommitCallbackRegistrar.add("InspectAvatar.DisableVoice", boost::bind(&LLInspectAvatar::toggleSelectedVoice, this, false)); - mCommitCallbackRegistrar.add("InspectAvatar.EnableVoice", boost::bind(&LLInspectAvatar::toggleSelectedVoice, this, true)); - - mEnableCallbackRegistrar.add("InspectAvatar.EnableGod", boost::bind(&LLInspectAvatar::godModeEnabled, this)); - mEnableCallbackRegistrar.add("InspectAvatar.VisibleFindOnMap", boost::bind(&LLInspectAvatar::onVisibleFindOnMap, this)); - mEnableCallbackRegistrar.add("InspectAvatar.VisibleEject", boost::bind(&LLInspectAvatar::onVisibleEject, this)); - mEnableCallbackRegistrar.add("InspectAvatar.VisibleFreeze", boost::bind(&LLInspectAvatar::onVisibleFreeze, this)); - mEnableCallbackRegistrar.add("InspectAvatar.VisibleZoomIn", boost::bind(&LLInspectAvatar::onVisibleZoomIn, this)); - mEnableCallbackRegistrar.add("InspectAvatar.Gear.Enable", boost::bind(&LLInspectAvatar::isNotFriend, this)); - mEnableCallbackRegistrar.add("InspectAvatar.Gear.EnableCall", boost::bind(&LLAvatarActions::canCall)); - mEnableCallbackRegistrar.add("InspectAvatar.Gear.EnableTeleportOffer", boost::bind(&LLInspectAvatar::enableTeleportOffer, this)); - mEnableCallbackRegistrar.add("InspectAvatar.EnableMute", boost::bind(&LLInspectAvatar::enableMute, this)); - mEnableCallbackRegistrar.add("InspectAvatar.EnableUnmute", boost::bind(&LLInspectAvatar::enableUnmute, this)); - // can't make the properties request until the widgets are constructed - // as it might return immediately, so do it in postBuild. + // as it might return immediately, so do it in onOpen. LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::GLOBAL, this); LLTransientFloater::init(this); @@ -249,6 +167,10 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) LLInspectAvatar::~LLInspectAvatar() { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } // clean up any pending requests so they don't call back into a deleted // view delete mPropertiesRequest; @@ -260,12 +182,6 @@ LLInspectAvatar::~LLInspectAvatar() /*virtual*/ BOOL LLInspectAvatar::postBuild(void) { - getChild<LLUICtrl>("add_friend_btn")->setCommitCallback( - boost::bind(&LLInspectAvatar::onClickAddFriend, this) ); - - getChild<LLUICtrl>("view_profile_btn")->setCommitCallback( - boost::bind(&LLInspectAvatar::onClickViewProfile, this) ); - getChild<LLUICtrl>("mute_btn")->setCommitCallback( boost::bind(&LLInspectAvatar::onClickMuteVolume, this) ); @@ -275,7 +191,6 @@ BOOL LLInspectAvatar::postBuild(void) return TRUE; } - // Multiple calls to showInstance("inspect_avatar", foo) will provide different // LLSD for foo, which we will catch here. //virtual @@ -287,11 +202,6 @@ void LLInspectAvatar::onOpen(const LLSD& data) // Extract appropriate avatar id mAvatarID = data["avatar_id"]; - BOOL self = mAvatarID == gAgent.getID(); - - getChild<LLUICtrl>("gear_self_btn")->setVisible(self); - getChild<LLUICtrl>("gear_btn")->setVisible(!self); - // Position the inspector relative to the mouse cursor // Similar to how tooltips are positioned // See LLToolTipMgr::createToolTip @@ -304,20 +214,15 @@ void LLInspectAvatar::onOpen(const LLSD& data) LLUI::positionViewNearMouse(this); } + // Generate link to avatar profile. + getChild<LLUICtrl>("avatar_profile_link")->setTextArg("[LINK]", LLSLURL("agent", mAvatarID, "about").getSLURLString()); + // can't call from constructor as widgets are not built yet requestUpdate(); updateVolumeSlider(); - - updateModeratorPanel(); } -// virtual -void LLInspectAvatar::onClose(bool app_quitting) -{ - getChild<LLMenuButton>("gear_btn")->hideMenu(); -} - void LLInspectAvatar::requestUpdate() { // Don't make network requests when spawning from the debug menu at the @@ -344,25 +249,6 @@ void LLInspectAvatar::requestUpdate() delete mPropertiesRequest; mPropertiesRequest = new LLFetchAvatarData(mAvatarID, this); - // You can't re-add someone as a friend if they are already your friend - bool is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarID) != NULL; - bool is_self = (mAvatarID == gAgentID); - if (is_self) - { - getChild<LLUICtrl>("add_friend_btn")->setVisible(false); - getChild<LLUICtrl>("im_btn")->setVisible(false); - } - else if (is_friend) - { - getChild<LLUICtrl>("add_friend_btn")->setVisible(false); - getChild<LLUICtrl>("im_btn")->setVisible(true); - } - else - { - getChild<LLUICtrl>("add_friend_btn")->setVisible(true); - getChild<LLUICtrl>("im_btn")->setVisible(false); - } - // Use an avatar_icon even though the image id will come down with the // avatar properties because the avatar_icon code maintains a cache of icons // and this may result in the image being visible sooner. @@ -374,9 +260,11 @@ void LLInspectAvatar::requestUpdate() getChild<LLUICtrl>("avatar_icon")->setValue(LLSD(mAvatarID) ); - LLAvatarNameCache::get(mAvatarID, - boost::bind(&LLInspectAvatar::onAvatarNameCache, - this, _1, _2)); + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(mAvatarID,boost::bind(&LLInspectAvatar::onAvatarNameCache,this, _1, _2)); } void LLInspectAvatar::processAvatarData(LLAvatarData* data) @@ -405,141 +293,6 @@ void LLInspectAvatar::processAvatarData(LLAvatarData* data) mPropertiesRequest = NULL; } -// For the avatar inspector, we only want to unpause the fade timer -// if neither the gear menu or self gear menu are open -void LLInspectAvatar::onMouseLeave(S32 x, S32 y, MASK mask) -{ - LLToggleableMenu* gear_menu = getChild<LLMenuButton>("gear_btn")->getMenu(); - LLToggleableMenu* gear_menu_self = getChild<LLMenuButton>("gear_self_btn")->getMenu(); - if ( gear_menu && gear_menu->getVisible() && - gear_menu_self && gear_menu_self->getVisible() ) - { - return; - } - - if(childHasVisiblePopupMenu()) - { - return; - } - - mOpenTimer.unpause(); -} - -void LLInspectAvatar::updateModeratorPanel() -{ - bool enable_moderator_panel = false; - - if (LLVoiceChannel::getCurrentVoiceChannel() && - mAvatarID != gAgent.getID()) - { - LLUUID session_id = LLVoiceChannel::getCurrentVoiceChannel()->getSessionID(); - - if (session_id != LLUUID::null) - { - LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id); - - if (speaker_mgr) - { - LLPointer<LLSpeaker> self_speakerp = speaker_mgr->findSpeaker(gAgent.getID()); - LLPointer<LLSpeaker> selected_speakerp = speaker_mgr->findSpeaker(mAvatarID); - - if(speaker_mgr->isVoiceActive() && selected_speakerp && - selected_speakerp->isInVoiceChannel() && - ((self_speakerp && self_speakerp->mIsModerator) || gAgent.isGodlike())) - { - getChild<LLUICtrl>("enable_voice")->setVisible(selected_speakerp->mModeratorMutedVoice); - getChild<LLUICtrl>("disable_voice")->setVisible(!selected_speakerp->mModeratorMutedVoice); - - enable_moderator_panel = true; - } - } - } - } - - if (enable_moderator_panel) - { - if (!getChild<LLUICtrl>("moderator_panel")->getVisible()) - { - getChild<LLUICtrl>("moderator_panel")->setVisible(true); - // stretch the floater so it can accommodate the moderator panel - reshape(getRect().getWidth(), getRect().getHeight() + getChild<LLUICtrl>("moderator_panel")->getRect().getHeight()); - } - } - else if (getChild<LLUICtrl>("moderator_panel")->getVisible()) - { - getChild<LLUICtrl>("moderator_panel")->setVisible(false); - // shrink the inspector floater back to original size - reshape(getRect().getWidth(), getRect().getHeight() - getChild<LLUICtrl>("moderator_panel")->getRect().getHeight()); - } -} - -void LLInspectAvatar::toggleSelectedVoice(bool enabled) -{ - LLUUID session_id = LLVoiceChannel::getCurrentVoiceChannel()->getSessionID(); - LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id); - - if (speaker_mgr) - { - if (!gAgent.getRegion()) - return; - - std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); - LLSD data; - data["method"] = "mute update"; - data["session-id"] = session_id; - data["params"] = LLSD::emptyMap(); - data["params"]["agent_id"] = mAvatarID; - data["params"]["mute_info"] = LLSD::emptyMap(); - // ctrl value represents ability to type, so invert - data["params"]["mute_info"]["voice"] = !enabled; - - class MuteVoiceResponder : public LLHTTPClient::Responder - { - public: - MuteVoiceResponder(const LLUUID& session_id) - { - mSessionID = session_id; - } - - virtual void error(U32 status, const std::string& reason) - { - llwarns << status << ": " << reason << llendl; - - if ( gIMMgr ) - { - //403 == you're not a mod - //should be disabled if you're not a moderator - if ( 403 == status ) - { - gIMMgr->showSessionEventError( - "mute", - "not_a_moderator", - mSessionID); - } - else - { - gIMMgr->showSessionEventError( - "mute", - "generic", - mSessionID); - } - } - } - - private: - LLUUID mSessionID; - }; - - LLHTTPClient::post( - url, - data, - new MuteVoiceResponder(speaker_mgr->getSessionID())); - } - - closeFloater(); - -} - void LLInspectAvatar::updateVolumeSlider() { bool voice_enabled = LLVoiceClient::getInstance()->getVoiceEnabled(mAvatarID); @@ -558,12 +311,11 @@ void LLInspectAvatar::updateVolumeSlider() getChild<LLUICtrl>("volume_slider")->setVisible(true); // By convention, we only display and toggle voice mutes, not all mutes - bool is_muted = LLMuteList::getInstance()-> - isMuted(mAvatarID, LLMute::flagVoiceChat); + bool is_muted = LLAvatarActions::isVoiceMuted(mAvatarID); LLUICtrl* mute_btn = getChild<LLUICtrl>("mute_btn"); - bool is_linden = LLStringUtil::endsWith(mAvatarName.getLegacyName(), " Linden"); + bool is_linden = LLStringUtil::endsWith(mAvatarName.getDisplayName(), " Linden"); mute_btn->setEnabled( !is_linden); mute_btn->setValue( is_muted ); @@ -594,7 +346,7 @@ void LLInspectAvatar::onClickMuteVolume() LLMuteList* mute_list = LLMuteList::getInstance(); bool is_muted = mute_list->isMuted(mAvatarID, LLMute::flagVoiceChat); - LLMute mute(mAvatarID, mAvatarName.getLegacyName(), LLMute::AGENT); + LLMute mute(mAvatarID, mAvatarName.getDisplayName(), LLMute::AGENT); if (!is_muted) { mute_list->add(mute, LLMute::flagVoiceChat); @@ -617,11 +369,13 @@ void LLInspectAvatar::onAvatarNameCache( const LLUUID& agent_id, const LLAvatarName& av_name) { + mAvatarNameCacheConnection.disconnect(); + if (agent_id == mAvatarID) { - getChild<LLUICtrl>("user_name")->setValue(av_name.mDisplayName); - getChild<LLUICtrl>("user_name_small")->setValue(av_name.mDisplayName); - getChild<LLUICtrl>("user_slid")->setValue(av_name.mUsername); + getChild<LLUICtrl>("user_name")->setValue(av_name.getDisplayName()); + getChild<LLUICtrl>("user_name_small")->setValue(av_name.getDisplayName()); + getChild<LLUICtrl>("user_slid")->setValue(av_name.getUserName()); mAvatarName = av_name; // show smaller display name if too long to display in regular size @@ -640,215 +394,6 @@ void LLInspectAvatar::onAvatarNameCache( } } -void LLInspectAvatar::onClickAddFriend() -{ - LLAvatarActions::requestFriendshipDialog(mAvatarID, mAvatarName.getLegacyName()); - closeFloater(); -} - -void LLInspectAvatar::onClickViewProfile() -{ - LLAvatarActions::showProfile(mAvatarID); - closeFloater(); -} - -bool LLInspectAvatar::isNotFriend() -{ - return !LLAvatarActions::isFriend(mAvatarID); -} - -bool LLInspectAvatar::onVisibleFindOnMap() -{ - return gAgent.isGodlike() || is_agent_mappable(mAvatarID); -} - -bool LLInspectAvatar::onVisibleEject() -{ - return enable_freeze_eject( LLSD(mAvatarID) ); -} - -bool LLInspectAvatar::onVisibleFreeze() -{ - // either user is a god and can do long distance freeze - // or check for target proximity and permissions - return gAgent.isGodlike() || enable_freeze_eject(LLSD(mAvatarID)); -} - -bool LLInspectAvatar::onVisibleZoomIn() -{ - return gObjectList.findObject(mAvatarID); -} - -void LLInspectAvatar::onClickIM() -{ - LLAvatarActions::startIM(mAvatarID); - closeFloater(); -} - -void LLInspectAvatar::onClickCall() -{ - LLAvatarActions::startCall(mAvatarID); - closeFloater(); -} - -void LLInspectAvatar::onClickTeleport() -{ - LLAvatarActions::offerTeleport(mAvatarID); - closeFloater(); -} - -void LLInspectAvatar::onClickInviteToGroup() -{ - LLAvatarActions::inviteToGroup(mAvatarID); - closeFloater(); -} - -void LLInspectAvatar::onClickPay() -{ - LLAvatarActions::pay(mAvatarID); - closeFloater(); -} - -void LLInspectAvatar::onClickShare() -{ - LLAvatarActions::share(mAvatarID); - closeFloater(); -} - -void LLInspectAvatar::onToggleMute() -{ - LLMute mute(mAvatarID, mAvatarName.mDisplayName, LLMute::AGENT); - - if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName)) - { - LLMuteList::getInstance()->remove(mute); - } - else - { - LLMuteList::getInstance()->add(mute); - } - - LLPanelBlockedList::showPanelAndSelect(mute.mID); - closeFloater(); -} - -void LLInspectAvatar::onClickReport() -{ - LLFloaterReporter::showFromAvatar(mAvatarID, mAvatarName.getCompleteName()); - closeFloater(); -} - -bool godlike_freeze(const LLSD& notification, const LLSD& response) -{ - LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID(); - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - - switch (option) - { - case 0: - LLAvatarActions::freeze(avatar_id); - break; - case 1: - LLAvatarActions::unfreeze(avatar_id); - break; - default: - break; - } - - return false; -} - -void LLInspectAvatar::onClickFreeze() -{ - if (gAgent.isGodlike()) - { - // use godlike freeze-at-a-distance, with confirmation - LLNotificationsUtil::add("FreezeAvatar", - LLSD(), - LLSD().with("avatar_id", mAvatarID), - godlike_freeze); - } - else - { - // use default "local" version of freezing that requires avatar to be in range - handle_avatar_freeze( LLSD(mAvatarID) ); - } - closeFloater(); -} - -void LLInspectAvatar::onClickEject() -{ - handle_avatar_eject( LLSD(mAvatarID) ); - closeFloater(); -} - -void LLInspectAvatar::onClickKick() -{ - LLAvatarActions::kick(mAvatarID); - closeFloater(); -} - -void LLInspectAvatar::onClickCSR() -{ - std::string name; - gCacheName->getFullName(mAvatarID, name); - LLAvatarActions::csr(mAvatarID, name); - closeFloater(); -} - -void LLInspectAvatar::onClickZoomIn() -{ - handle_zoom_to_object(mAvatarID); - closeFloater(); -} - -void LLInspectAvatar::onClickFindOnMap() -{ - gFloaterWorldMap->trackAvatar(mAvatarID, mAvatarName.mDisplayName); - LLFloaterReg::showInstance("world_map"); -} - - -bool LLInspectAvatar::enableMute() -{ - bool is_linden = LLStringUtil::endsWith(mAvatarName.getLegacyName(), " Linden"); - bool is_self = mAvatarID == gAgent.getID(); - - if (!is_linden && !is_self && !LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName.getLegacyName())) - { - return true; - } - else - { - return false; - } -} - -bool LLInspectAvatar::enableUnmute() -{ - bool is_linden = LLStringUtil::endsWith(mAvatarName.getLegacyName(), " Linden"); - bool is_self = mAvatarID == gAgent.getID(); - - if (!is_linden && !is_self && LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName.getLegacyName())) - { - return true; - } - else - { - return false; - } -} - -bool LLInspectAvatar::enableTeleportOffer() -{ - return LLAvatarActions::canOfferTeleport(mAvatarID); -} - -bool LLInspectAvatar::godModeEnabled() -{ - return gAgent.isGodlike(); -} - ////////////////////////////////////////////////////////////////////////////// // LLInspectAvatarUtil ////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b819100b9b..0ee78d57bd 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -37,6 +37,7 @@ #include "llappearancemgr.h" #include "llattachmentsmgr.h" #include "llavataractions.h" +#include "llfavoritesbar.h" // management of favorites folder #include "llfloateropenobject.h" #include "llfloaterreg.h" #include "llfloatersidepanelcontainer.h" @@ -45,7 +46,7 @@ #include "llfriendcard.h" #include "llgesturemgr.h" #include "llgiveinventory.h" -#include "llimfloater.h" +#include "llfloaterimcontainer.h" #include "llimview.h" #include "llclipboard.h" #include "llinventorydefines.h" @@ -71,6 +72,9 @@ #include "llviewerwindow.h" #include "llvoavatarself.h" #include "llwearablelist.h" +#include "lllandmarkactions.h" + +void copy_slurl_to_clipboard_callback_inv(const std::string& slurl); // Marketplace outbox current disabled #define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 @@ -91,21 +95,6 @@ struct LLMoveInv using namespace LLOldEvents; -// Helpers -// bug in busy count inc/dec right now, logic is complex... do we really need it? -void inc_busy_count() -{ -// gViewerWindow->getWindow()->incBusyCount(); -// check balance of these calls if this code is changed to ever actually -// *do* something! -} -void dec_busy_count() -{ -// gViewerWindow->getWindow()->decBusyCount(); -// check balance of these calls if this code is changed to ever actually -// *do* something! -} - // Function declarations void remove_inventory_category_from_avatar(LLInventoryCategory* category); void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_id); @@ -115,10 +104,10 @@ void teleport_via_landmark(const LLUUID& asset_id); static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit); static bool check_category(LLInventoryModel* model, const LLUUID& cat_id, - LLFolderView* active_folder_view, + LLInventoryPanel* active_panel, LLInventoryFilter* filter); static bool check_item(const LLUUID& item_id, - LLFolderView* active_folder_view, + LLInventoryPanel* active_panel, LLInventoryFilter* filter); // Helper functions @@ -166,7 +155,6 @@ public: { if (clear_observer) { - dec_busy_count(); gInventory.removeObserver(this); delete this; } @@ -189,7 +177,8 @@ LLInvFVBridge::LLInvFVBridge(LLInventoryPanel* inventory, mUUID(uuid), mRoot(root), mInvType(LLInventoryType::IT_NONE), - mIsLink(FALSE) + mIsLink(FALSE), + LLFolderViewModelItemInventory(inventory->getRootViewModel()) { mInventoryPanel = inventory->getInventoryPanelHandle(); const LLInventoryObject* obj = getInventoryObject(); @@ -208,7 +197,11 @@ const std::string& LLInvFVBridge::getName() const const std::string& LLInvFVBridge::getDisplayName() const { - return getName(); + if(mDisplayName.empty()) + { + buildDisplayName(); + } + return mDisplayName; } // Folders have full perms @@ -227,9 +220,24 @@ LLFolderType::EType LLInvFVBridge::getPreferredType() const // Folders don't have creation dates. time_t LLInvFVBridge::getCreationDate() const { - return 0; + LLInventoryObject* objectp = getInventoryObject(); + if (objectp) + { + return objectp->getCreationDate(); + } + return (time_t)0; +} + +void LLInvFVBridge::setCreationDate(time_t creation_date_utc) +{ + LLInventoryObject* objectp = getInventoryObject(); + if (objectp) + { + objectp->setCreationDate(creation_date_utc); + } } + // Can be destroyed (or moved to trash) BOOL LLInvFVBridge::isItemRemovable() const { @@ -247,6 +255,11 @@ BOOL LLInvFVBridge::isLink() const return mIsLink; } +BOOL LLInvFVBridge::isLibraryItem() const +{ + return gInventory.isObjectDescendentOf(getUUID(),gInventory.getLibraryRootFolderID()); +} + /*virtual*/ /** * @brief Adds this item into clipboard storage @@ -283,7 +296,7 @@ void LLInvFVBridge::showProperties() */ } -void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch) +void LLInvFVBridge::removeBatch(std::vector<LLFolderViewModelItem*>& batch) { // Deactivate gestures when moving them into Trash LLInvFVBridge* bridge; @@ -292,11 +305,11 @@ void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batc LLViewerInventoryCategory* cat = NULL; LLInventoryModel::cat_array_t descendent_categories; LLInventoryModel::item_array_t descendent_items; - S32 count = batch.count(); + S32 count = batch.size(); S32 i,j; for(i = 0; i < count; ++i) { - bridge = (LLInvFVBridge*)(batch.get(i)); + bridge = (LLInvFVBridge*)(batch[i]); if(!bridge || !bridge->isItemRemovable()) continue; item = (LLViewerInventoryItem*)model->getItem(bridge->getUUID()); if (item) @@ -309,7 +322,7 @@ void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batc } for(i = 0; i < count; ++i) { - bridge = (LLInvFVBridge*)(batch.get(i)); + bridge = (LLInvFVBridge*)(batch[i]); if(!bridge || !bridge->isItemRemovable()) continue; cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID()); if (cat) @@ -327,7 +340,7 @@ void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batc removeBatchNoCheck(batch); } -void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*>& batch) +void LLInvFVBridge::removeBatchNoCheck(std::vector<LLFolderViewModelItem*>& batch) { // this method moves a bunch of items and folders to the trash. As // per design guidelines for the inventory model, the message is @@ -343,14 +356,14 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener* uuid_vec_t move_ids; LLInventoryModel::update_map_t update; bool start_new_message = true; - S32 count = batch.count(); + S32 count = batch.size(); S32 i; // first, hide any 'preview' floaters that correspond to the items // being deleted. for(i = 0; i < count; ++i) { - bridge = (LLInvFVBridge*)(batch.get(i)); + bridge = (LLInvFVBridge*)(batch[i]); if(!bridge || !bridge->isItemRemovable()) continue; item = (LLViewerInventoryItem*)model->getItem(bridge->getUUID()); if(item) @@ -363,7 +376,7 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener* for(i = 0; i < count; ++i) { - bridge = (LLInvFVBridge*)(batch.get(i)); + bridge = (LLInvFVBridge*)(batch[i]); if(!bridge || !bridge->isItemRemovable()) continue; item = (LLViewerInventoryItem*)model->getItem(bridge->getUUID()); if(item) @@ -404,7 +417,7 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener* for(i = 0; i < count; ++i) { - bridge = (LLInvFVBridge*)(batch.get(i)); + bridge = (LLInvFVBridge*)(batch[i]); if(!bridge || !bridge->isItemRemovable()) continue; LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID()); if(cat) @@ -498,8 +511,10 @@ BOOL LLInvFVBridge::isClipboardPasteable() const // Each item must be copyable to be pastable LLItemBridge item_br(mInventoryPanel.get(), mRoot, item_id); if (!item_br.isItemCopyable()) - return FALSE; - } + { + return FALSE; + } + } return TRUE; } @@ -876,6 +891,12 @@ LLInventoryModel* LLInvFVBridge::getInventoryModel() const return panel ? panel->getModel() : NULL; } +LLInventoryFilter* LLInvFVBridge::getInventoryFilter() const +{ + LLInventoryPanel* panel = mInventoryPanel.get(); + return panel ? &(panel->getFilter()) : NULL; +} + BOOL LLInvFVBridge::isItemInTrash() const { LLInventoryModel* model = getInventoryModel(); @@ -928,7 +949,7 @@ BOOL LLInvFVBridge::isCOFFolder() const BOOL LLInvFVBridge::isInboxFolder() const { - const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false); + const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false); if (inbox_id.isNull()) { @@ -968,7 +989,7 @@ BOOL LLInvFVBridge::isOutboxFolderDirectParent() const const LLUUID LLInvFVBridge::getOutboxFolder() const { - const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false); + const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); return outbox_id; } @@ -1000,6 +1021,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderViewModelInventory* view_model, LLFolderView* root, const LLUUID& uuid, U32 flags) @@ -1250,10 +1272,10 @@ bool LLInvFVBridge::canListOnMarketplaceNow() const if (can_list) { - LLFolderViewFolder * object_folderp = mRoot->getFolderByID(object_id); + LLFolderViewFolder * object_folderp = mInventoryPanel.get() ? mInventoryPanel.get()->getFolderByID(object_id) : NULL; if (object_folderp) { - can_list = !object_folderp->isLoading(); + can_list = !static_cast<LLFolderBridge*>(object_folderp->getViewModelItem())->isLoading(); } } @@ -1261,7 +1283,7 @@ bool LLInvFVBridge::canListOnMarketplaceNow() const { // Get outbox id const LLUUID & outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); - LLFolderViewItem * outbox_itemp = mRoot->getItemByID(outbox_id); + LLFolderViewItem * outbox_itemp = mInventoryPanel.get() ? mInventoryPanel.get()->getItemByID(outbox_id) : NULL; if (outbox_itemp) { @@ -1271,7 +1293,7 @@ bool LLInvFVBridge::canListOnMarketplaceNow() const void * cargo_data = (void *) obj; std::string tooltip_msg; - can_list = outbox_itemp->getListener()->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg); + can_list = outbox_itemp->getViewModelItem()->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg); } } } @@ -1283,14 +1305,30 @@ bool LLInvFVBridge::canListOnMarketplaceNow() const #endif } +LLToolDragAndDrop::ESource LLInvFVBridge::getDragSource() const +{ + if (gInventory.isObjectDescendentOf(getUUID(), gInventory.getRootFolderID())) + { + return LLToolDragAndDrop::SOURCE_AGENT; + } + else if (gInventory.isObjectDescendentOf(getUUID(), gInventory.getLibraryRootFolderID())) + { + return LLToolDragAndDrop::SOURCE_LIBRARY; + } + + return LLToolDragAndDrop::SOURCE_VIEWER; +} + + // +=================================================+ // | InventoryFVBridgeBuilder | // +=================================================+ -LLInvFVBridge* LLInventoryFVBridgeBuilder::createBridge(LLAssetType::EType asset_type, +LLInvFVBridge* LLInventoryFolderViewModelBuilder::createBridge(LLAssetType::EType asset_type, LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderViewModelInventory* view_model, LLFolderView* root, const LLUUID& uuid, U32 flags /* = 0x00 */) const @@ -1299,6 +1337,7 @@ LLInvFVBridge* LLInventoryFVBridgeBuilder::createBridge(LLAssetType::EType asset actual_asset_type, inv_type, inventory, + view_model, root, uuid, flags); @@ -1355,10 +1394,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) else if ("cut" == action) { cutToClipboard(); - // MAINT-1197: This is temp code to work around a deselection/reselection bug. Please discard when merging CHUI. - LLFolderViewItem* item_to_select = mRoot->getNextUnselectedItem(); - LLFolderView::removeCutItems(); - mRoot->setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, false); + gInventory.removeObject(mUUID); return; } else if ("copy" == action) @@ -1371,10 +1407,10 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) LLInventoryItem* itemp = model->getItem(mUUID); if (!itemp) return; - LLFolderViewItem* folder_view_itemp = mRoot->getItemByID(itemp->getParentUUID()); + LLFolderViewItem* folder_view_itemp = mInventoryPanel.get()->getItemByID(itemp->getParentUUID()); if (!folder_view_itemp) return; - folder_view_itemp->getListener()->pasteFromClipboard(); + folder_view_itemp->getViewModelItem()->pasteFromClipboard(); return; } else if ("paste_link" == action) @@ -1383,10 +1419,10 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) LLInventoryItem* itemp = model->getItem(mUUID); if (!itemp) return; - LLFolderViewItem* folder_view_itemp = mRoot->getItemByID(itemp->getParentUUID()); + LLFolderViewItem* folder_view_itemp = mInventoryPanel.get()->getItemByID(itemp->getParentUUID()); if (!folder_view_itemp) return; - folder_view_itemp->getListener()->pasteLinkFromClipboard(); + folder_view_itemp->getViewModelItem()->pasteLinkFromClipboard(); return; } else if (isMarketplaceCopyAction(action)) @@ -1396,9 +1432,32 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) LLInventoryItem* itemp = model->getItem(mUUID); if (!itemp) return; - const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false); + const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); copy_item_to_outbox(itemp, outbox_id, LLUUID::null, LLToolDragAndDrop::getOperationId()); } + else if ("copy_slurl" == action) + { + LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(getItem()); + if(item) + { + LLUUID asset_id = item->getAssetUUID(); + LLLandmark* landmark = gLandmarkList.getAsset(asset_id); + if (landmark) + { + LLVector3d global_pos; + landmark->getGlobalPos(global_pos); + LLLandmarkActions::getSLURLfromPosGlobal(global_pos, ©_slurl_to_clipboard_callback_inv, true); + } + } + } +} + +void copy_slurl_to_clipboard_callback_inv(const std::string& slurl) +{ + gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(slurl)); + LLSD args; + args["SLURL"] = slurl; + LLNotificationsUtil::add("CopySLURL", args); } void LLItemBridge::selectItem() @@ -1489,6 +1548,15 @@ LLUIImagePtr LLItemBridge::getIcon() const return LLInventoryIcon::getIcon(LLInventoryIcon::ICONNAME_OBJECT); } +LLUIImagePtr LLItemBridge::getIconOverlay() const +{ + if (getItem() && getItem()->getIsLinkType()) + { + return LLUI::getUIImage("Inv_Link"); + } + return NULL; +} + PermissionMask LLItemBridge::getPermissionMask() const { LLViewerInventoryItem* item = getItem(); @@ -1497,26 +1565,27 @@ PermissionMask LLItemBridge::getPermissionMask() const return perm_mask; } -const std::string& LLItemBridge::getDisplayName() const +void LLItemBridge::buildDisplayName() const { - if(mDisplayName.empty()) + if(getItem()) { - buildDisplayName(getItem(), mDisplayName); + mDisplayName.assign(getItem()->getName()); } - return mDisplayName; + else + { + mDisplayName.assign(LLStringUtil::null); } -void LLItemBridge::buildDisplayName(LLInventoryItem* item, std::string& name) + mSearchableName.assign(mDisplayName); + mSearchableName.append(getLabelSuffix()); + LLStringUtil::toUpper(mSearchableName); + + //Name set, so trigger a sort + if(mParent) { - if(item) - { - name.assign(item->getName()); + mParent->requestSort(); } - else - { - name.assign(LLStringUtil::null); } -} LLFontGL::StyleFlags LLItemBridge::getLabelStyle() const { @@ -1632,18 +1701,17 @@ BOOL LLItemBridge::renameItem(const std::string& new_name) { LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); new_item->rename(new_name); - buildDisplayName(new_item, mDisplayName); new_item->updateServer(FALSE); model->updateItem(new_item); model->notifyObservers(); + buildDisplayName(); } // return FALSE because we either notified observers (& therefore // rebuilt) or we didn't update. return FALSE; } - BOOL LLItemBridge::removeItem() { if(!isItemRemovable()) @@ -1651,7 +1719,6 @@ BOOL LLItemBridge::removeItem() return FALSE; } - // move it to the trash LLPreview::hide(mUUID, TRUE); LLInventoryModel* model = getInventoryModel(); @@ -1789,6 +1856,99 @@ void LLFolderBridge::selectItem() LLInventoryModelBackgroundFetch::instance().start(getUUID(), true); } +void LLFolderBridge::buildDisplayName() const +{ + LLFolderType::EType preferred_type = getPreferredType(); + + // *TODO: to be removed when database supports multi language. This is a + // temporary attempt to display the inventory folder in the user locale. + // mantipov: *NOTE: be sure this code is synchronized with LLFriendCardsManager::findChildFolderUUID + // it uses the same way to find localized string + + // HACK: EXT - 6028 ([HARD CODED]? Inventory > Library > "Accessories" folder) + // Translation of Accessories folder in Library inventory folder + bool accessories = false; + if(getName() == "Accessories") + { + //To ensure that Accessories folder is in Library we have to check its parent folder. + //Due to parent LLFolderViewFloder is not set to this item yet we have to check its parent via Inventory Model + LLInventoryCategory* cat = gInventory.getCategory(getUUID()); + if(cat) + { + const LLUUID& parent_folder_id = cat->getParentUUID(); + accessories = (parent_folder_id == gInventory.getLibraryRootFolderID()); + } + } + + //"Accessories" inventory category has folder type FT_NONE. So, this folder + //can not be detected as protected with LLFolderType::lookupIsProtectedType + mDisplayName.assign(getName()); + if (accessories || LLFolderType::lookupIsProtectedType(preferred_type)) + { + LLTrans::findString(mDisplayName, std::string("InvFolder ") + getName(), LLSD()); + } + + mSearchableName.assign(mDisplayName); + mSearchableName.append(getLabelSuffix()); + LLStringUtil::toUpper(mSearchableName); + + //Name set, so trigger a sort + if(mParent) + { + mParent->requestSort(); + } +} + + +void LLFolderBridge::update() +{ + bool possibly_has_children = false; + bool up_to_date = isUpToDate(); + if(!up_to_date && hasChildren()) // we know we have children but haven't fetched them (doesn't obey filter) + { + possibly_has_children = true; + } + + bool loading = (possibly_has_children + && !up_to_date ); + + if (loading != mIsLoading) + { + if ( loading && !mIsLoading ) + { + // Measure how long we've been in the loading state + mTimeSinceRequestStart.reset(); + } + + const BOOL in_inventory = gInventory.isObjectDescendentOf(getUUID(), gInventory.getRootFolderID()); + const BOOL in_library = gInventory.isObjectDescendentOf(getUUID(), gInventory.getLibraryRootFolderID()); + + bool root_is_loading = false; + if (in_inventory) + { + root_is_loading = LLInventoryModelBackgroundFetch::instance().inventoryFetchInProgress(); + } + if (in_library) + { + root_is_loading = LLInventoryModelBackgroundFetch::instance().libraryFetchInProgress(); + } + if ((mIsLoading + && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) + || (LLInventoryModelBackgroundFetch::instance().folderFetchActive() + && root_is_loading)) + { + mDisplayName = LLInvFVBridge::getDisplayName() + " ( " + LLTrans::getString("LoadingData") + " ) "; + mIsLoading = true; + } + else + { + mDisplayName = LLInvFVBridge::getDisplayName(); + mIsLoading = false; + } + } +} + + // Iterate through a folder's children to determine if // all the children are removable. class LLIsItemRemovable : public LLFolderViewFunctor @@ -1797,11 +1957,11 @@ public: LLIsItemRemovable() : mPassed(TRUE) {} virtual void doFolder(LLFolderViewFolder* folder) { - mPassed &= folder->getListener()->isItemRemovable(); + mPassed &= folder->getViewModelItem()->isItemRemovable(); } virtual void doItem(LLFolderViewItem* item) { - mPassed &= item->getListener()->isItemRemovable(); + mPassed &= item->getViewModelItem()->isItemRemovable(); } BOOL mPassed; }; @@ -1815,7 +1975,7 @@ BOOL LLFolderBridge::isItemRemovable() const } LLInventoryPanel* panel = mInventoryPanel.get(); - LLFolderViewFolder* folderp = dynamic_cast<LLFolderViewFolder*>(panel ? panel->getRootFolder()->getItemByID(mUUID) : NULL); + LLFolderViewFolder* folderp = dynamic_cast<LLFolderViewFolder*>(panel ? panel->getItemByID(mUUID) : NULL); if (folderp) { LLIsItemRemovable folder_test; @@ -2054,7 +2214,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, LLInventoryPanel* destination_panel = mInventoryPanel.get(); if (!destination_panel) return false; - LLInventoryFilter* filter = destination_panel->getFilter(); + LLInventoryFilter* filter = getInventoryFilter(); if (!filter) return false; const LLUUID &cat_id = inv_cat->getUUID(); @@ -2273,7 +2433,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, { // Check whether the folder being dragged from active inventory panel // passes the filter of the destination panel. - is_movable = check_category(model, cat_id, active_folder_view, filter); + is_movable = check_category(model, cat_id, active_panel, filter); } } } @@ -2347,7 +2507,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } else { - if (model->isObjectDescendentOf(cat_id, model->findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false))) + if (model->isObjectDescendentOf(cat_id, model->findCategoryUUIDForType(LLFolderType::FT_INBOX, false))) { set_dad_inbox_object(cat_id); } @@ -2525,7 +2685,6 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer) llwarns << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << llendl; if (clear_observer) { - dec_busy_count(); gInventory.removeObserver(this); delete this; } @@ -2539,7 +2698,6 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer) // could notify observers and throw us into an infinite loop. if (clear_observer) { - dec_busy_count(); gInventory.removeObserver(this); delete this; } @@ -2551,14 +2709,23 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer) LLInventoryModel::item_array_t* item_array; gInventory.getDirectDescendentsOf(*current_folder, cat_array, item_array); - S32 item_count = item_array->count(); - S32 cat_count = cat_array->count(); - + S32 item_count(0); + if( item_array ) + { + item_count = item_array->count(); + } + + S32 cat_count(0); + if( cat_array ) + { + cat_count = cat_array->count(); + } + // Move to next if current folder empty if ((item_count == 0) && (cat_count == 0)) - { + { continue; - } + } uuid_vec_t ids; LLRightClickInventoryFetchObserver* outfit = NULL; @@ -2601,7 +2768,6 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer) { // it's all on its way - add an observer, and the inventory // will call done for us when everything is here. - inc_busy_count(); gInventory.addObserver(outfit); } */ @@ -2620,7 +2786,6 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer) { // it's all on its way - add an observer, and the inventory // will call done for us when everything is here. - inc_busy_count(); gInventory.addObserver(categories); } } @@ -2699,7 +2864,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) { if ("open" == action) { - LLFolderViewFolder *f = dynamic_cast<LLFolderViewFolder *>(mRoot->getItemByID(mUUID)); + LLFolderViewFolder *f = dynamic_cast<LLFolderViewFolder *>(mInventoryPanel.get()->getItemByID(mUUID)); if (f) { f->setOpen(TRUE); @@ -2746,10 +2911,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) else if ("cut" == action) { cutToClipboard(); - // MAINT-1197: This is temp code to work around a deselection/reselection bug. Please discard when merging CHUI. - LLFolderViewItem* item_to_select = mRoot->getNextUnselectedItem(); - LLFolderView::removeCutItems(); - mRoot->setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, false); + gInventory.removeObject(mUUID); return; } else if ("copy" == action) @@ -2790,7 +2952,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) LLInventoryCategory * cat = gInventory.getCategory(mUUID); if (!cat) return; - const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false); + const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); copy_folder_to_outbox(cat, outbox_id, cat->getUUID(), LLToolDragAndDrop::getOperationId()); } #if ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU @@ -2886,17 +3048,24 @@ LLUIImagePtr LLFolderBridge::getIcon() const LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type) { return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, FALSE)); - /*case LLAssetType::AT_MESH: - control = "inv_folder_mesh.tga"; - break;*/ } -LLUIImagePtr LLFolderBridge::getOpenIcon() const +LLUIImagePtr LLFolderBridge::getIconOpen() const { return LLUI::getUIImage(LLViewerFolderType::lookupIconName(getPreferredType(), TRUE)); } +LLUIImagePtr LLFolderBridge::getIconOverlay() const +{ + if (getInventoryObject() && getInventoryObject()->getIsLinkType()) + { + return LLUI::getUIImage("Inv_Link"); + } + return NULL; +} + + BOOL LLFolderBridge::renameItem(const std::string& new_name) { rename_category(getInventoryModel(), mUUID, new_name); @@ -2960,6 +3129,19 @@ bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& re return FALSE; } +//Recursively update the folder's creation date +void LLFolderBridge::updateHierarchyCreationDate(time_t date) +{ + if(getCreationDate() < date) + { + setCreationDate(date); + if(mParent) + { + static_cast<LLFolderBridge *>(mParent)->updateHierarchyCreationDate(date); + } + } +} + void LLFolderBridge::pasteFromClipboard() { LLInventoryModel* model = getInventoryModel(); @@ -2977,7 +3159,7 @@ void LLFolderBridge::pasteFromClipboard() if (move_is_into_outbox) { - LLFolderViewItem * outbox_itemp = mRoot->getItemByID(mUUID); + LLFolderViewItem * outbox_itemp = mInventoryPanel.get()->getItemByID(mUUID); if (outbox_itemp) { @@ -3000,7 +3182,7 @@ void LLFolderBridge::pasteFromClipboard() void * cargo_data = (void *) item; std::string tooltip_msg; - can_list = outbox_itemp->getListener()->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg); + can_list = outbox_itemp->getViewModelItem()->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg); } } @@ -3042,7 +3224,8 @@ void LLFolderBridge::pasteFromClipboard() LLViewerInventoryCategory* vicat = (LLViewerInventoryCategory *) model->getCategory(item_id); llassert(vicat); if (vicat) - { + { + //changeCategoryParent() implicity calls dirtyFilter changeCategoryParent(model, vicat, parent_id, FALSE); } } @@ -3052,6 +3235,7 @@ void LLFolderBridge::pasteFromClipboard() llassert(viitem); if (viitem) { + //changeItemParent() implicity calls dirtyFilter changeItemParent(model, viitem, parent_id, FALSE); } } @@ -3172,41 +3356,45 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv return ((item_array.count() > 0) ? TRUE : FALSE ); } -void LLFolderBridge::buildContextMenuBaseOptions(U32 flags) +void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items) { LLInventoryModel* model = getInventoryModel(); llassert(model != NULL); const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); const LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); + const LLUUID favorites = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE); if (lost_and_found_id == mUUID) { // This is the lost+found folder. - mItems.push_back(std::string("Empty Lost And Found")); + items.push_back(std::string("Empty Lost And Found")); - mDisabledItems.push_back(std::string("New Folder")); - mDisabledItems.push_back(std::string("New Script")); - mDisabledItems.push_back(std::string("New Note")); - mDisabledItems.push_back(std::string("New Gesture")); - mDisabledItems.push_back(std::string("New Clothes")); - mDisabledItems.push_back(std::string("New Body Parts")); + disabled_items.push_back(std::string("New Folder")); + disabled_items.push_back(std::string("New Script")); + disabled_items.push_back(std::string("New Note")); + disabled_items.push_back(std::string("New Gesture")); + disabled_items.push_back(std::string("New Clothes")); + disabled_items.push_back(std::string("New Body Parts")); + } + if (favorites == mUUID) + { + disabled_items.push_back(std::string("New Folder")); } - if(trash_id == mUUID) { // This is the trash. - mItems.push_back(std::string("Empty Trash")); + items.push_back(std::string("Empty Trash")); } else if(isItemInTrash()) { // This is a folder in the trash. - mItems.clear(); // clear any items that used to exist - addTrashContextMenuOptions(mItems, mDisabledItems); + items.clear(); // clear any items that used to exist + addTrashContextMenuOptions(items, disabled_items); } else if(isOutboxFolder()) { - addOutboxContextMenuOptions(flags, mItems, mDisabledItems); + addOutboxContextMenuOptions(flags, items, disabled_items); } else if(isAgentInventory()) // do not allow creating in library { @@ -3220,40 +3408,40 @@ void LLFolderBridge::buildContextMenuBaseOptions(U32 flags) // Do not allow to create 2-level subfolder in the Calling Card/Friends folder. EXT-694. if (!LLFriendCardsManager::instance().isCategoryInFriendFolder(cat)) { - mItems.push_back(std::string("New Folder")); + items.push_back(std::string("New Folder")); } - mItems.push_back(std::string("New Script")); - mItems.push_back(std::string("New Note")); - mItems.push_back(std::string("New Gesture")); - mItems.push_back(std::string("New Clothes")); - mItems.push_back(std::string("New Body Parts")); + items.push_back(std::string("New Script")); + items.push_back(std::string("New Note")); + items.push_back(std::string("New Gesture")); + items.push_back(std::string("New Clothes")); + items.push_back(std::string("New Body Parts")); } #if SUPPORT_ENSEMBLES // Changing folder types is an unfinished unsupported feature // and can lead to unexpected behavior if enabled. - mItems.push_back(std::string("Change Type")); + items.push_back(std::string("Change Type")); const LLViewerInventoryCategory *cat = getCategory(); if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType())) { - mDisabledItems.push_back(std::string("Change Type")); + disabled_items.push_back(std::string("Change Type")); } #endif - getClipboardEntries(false, mItems, mDisabledItems, flags); + getClipboardEntries(false, items, disabled_items, flags); } else { // Want some but not all of the items from getClipboardEntries for outfits. if (cat && (cat->getPreferredType() == LLFolderType::FT_OUTFIT)) { - mItems.push_back(std::string("Rename")); + items.push_back(std::string("Rename")); - addDeleteContextMenuOptions(mItems, mDisabledItems); + addDeleteContextMenuOptions(items, disabled_items); // EXT-4030: disallow deletion of currently worn outfit const LLViewerInventoryItem *base_outfit_link = LLAppearanceMgr::instance().getBaseOutfitLink(); if (base_outfit_link && (cat == base_outfit_link->getLinkedCategory())) { - mDisabledItems.push_back(std::string("Delete")); + disabled_items.push_back(std::string("Delete")); } } } @@ -3282,20 +3470,43 @@ void LLFolderBridge::buildContextMenuBaseOptions(U32 flags) // Preemptively disable system folder removal if more than one item selected. if ((flags & FIRST_SELECTED_ITEM) == 0) { - mDisabledItems.push_back(std::string("Delete System Folder")); + disabled_items.push_back(std::string("Delete System Folder")); } if (!isOutboxFolder()) { - mItems.push_back(std::string("Share")); + items.push_back(std::string("Share")); if (!canShare()) { - mDisabledItems.push_back(std::string("Share")); + disabled_items.push_back(std::string("Share")); + } + } + // Add menu items that are dependent on the contents of the folder. + LLViewerInventoryCategory* category = (LLViewerInventoryCategory *) model->getCategory(mUUID); + if (category) + { + uuid_vec_t folders; + folders.push_back(category->getUUID()); + + sSelf = getHandle(); + LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(folders); + fetch->startFetch(); + if (fetch->isFinished()) + { + // Do not call execute() or done() here as if the folder is here, there's likely no point drilling down + // This saves lots of time as buildContextMenu() is called a lot + delete fetch; + buildContextMenuFolderOptions(flags, items, disabled_items); } + else + { + // it's all on its way - add an observer, and the inventory will call done for us when everything is here. + gInventory.addObserver(fetch); } } +} -void LLFolderBridge::buildContextMenuFolderOptions(U32 flags) +void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items) { // Build folder specific options back up LLInventoryModel* model = getInventoryModel(); @@ -3322,21 +3533,21 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags) LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD); if (mCallingCards || checkFolderForContentsOfType(model, is_callingcard)) { - mItems.push_back(std::string("Calling Card Separator")); - mItems.push_back(std::string("Conference Chat Folder")); - mItems.push_back(std::string("IM All Contacts In Folder")); + items.push_back(std::string("Calling Card Separator")); + items.push_back(std::string("Conference Chat Folder")); + items.push_back(std::string("IM All Contacts In Folder")); } } if (!isItemRemovable()) { - mDisabledItems.push_back(std::string("Delete")); + disabled_items.push_back(std::string("Delete")); } #ifndef LL_RELEASE_FOR_DOWNLOAD if (LLFolderType::lookupIsProtectedType(type)) { - mItems.push_back(std::string("Delete System Folder")); + items.push_back(std::string("Delete System Folder")); } #endif @@ -3351,7 +3562,7 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags) checkFolderForContentsOfType(model, is_object) || checkFolderForContentsOfType(model, is_gesture) ) { - mItems.push_back(std::string("Folder Wearables Separator")); + items.push_back(std::string("Folder Wearables Separator")); // Only enable add/replace outfit for non-system folders. if (!is_system_folder) @@ -3359,25 +3570,25 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags) // Adding an outfit onto another (versus replacing) doesn't make sense. if (type != LLFolderType::FT_OUTFIT) { - mItems.push_back(std::string("Add To Outfit")); + items.push_back(std::string("Add To Outfit")); } - mItems.push_back(std::string("Replace Outfit")); + items.push_back(std::string("Replace Outfit")); } if (is_ensemble) { - mItems.push_back(std::string("Wear As Ensemble")); + items.push_back(std::string("Wear As Ensemble")); } - mItems.push_back(std::string("Remove From Outfit")); + items.push_back(std::string("Remove From Outfit")); if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID)) { - mDisabledItems.push_back(std::string("Remove From Outfit")); + disabled_items.push_back(std::string("Remove From Outfit")); } if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) { - mDisabledItems.push_back(std::string("Replace Outfit")); + disabled_items.push_back(std::string("Replace Outfit")); } - mItems.push_back(std::string("Outfit Separator")); + items.push_back(std::string("Outfit Separator")); } } @@ -3386,49 +3597,28 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { sSelf.markDead(); - mItems.clear(); - mDisabledItems.clear(); + // fetch contents of this folder, as context menu can depend on contents + // still, user would have to open context menu again to see the changes + gInventory.fetchDescendentsOf(getUUID()); + + + menuentry_vec_t items; + menuentry_vec_t disabled_items; lldebugs << "LLFolderBridge::buildContextMenu()" << llendl; LLInventoryModel* model = getInventoryModel(); if(!model) return; - buildContextMenuBaseOptions(flags); - - // Add menu items that are dependent on the contents of the folder. - LLViewerInventoryCategory* category = (LLViewerInventoryCategory *) model->getCategory(mUUID); - if (category) - { - uuid_vec_t folders; - folders.push_back(category->getUUID()); - - sSelf = getHandle(); - LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(folders); - fetch->startFetch(); - if (fetch->isFinished()) - { - // Do not call execute() or done() here as if the folder is here, there's likely no point drilling down - // This saves lots of time as buildContextMenu() is called a lot - delete fetch; - buildContextMenuFolderOptions(flags); - } - else - { - // it's all on its way - add an observer, and the inventory will call done for us when everything is here. - inc_busy_count(); - gInventory.addObserver(fetch); - } - } - - hide_context_entries(menu, mItems, mDisabledItems); + buildContextMenuOptions(flags, items, disabled_items); + hide_context_entries(menu, items, disabled_items); // Reposition the menu, in case we're adding items to an existing menu. menu.needsArrange(); menu.arrangeAndClear(); } -BOOL LLFolderBridge::hasChildren() const +bool LLFolderBridge::hasChildren() const { LLInventoryModel* model = getInventoryModel(); if(!model) return FALSE; @@ -3518,25 +3708,6 @@ void LLFolderBridge::pasteClipboard(void* user_data) if(self) self->pasteFromClipboard(); } -void LLFolderBridge::createNewCategory(void* user_data) -{ - LLFolderBridge* bridge = (LLFolderBridge*)user_data; - if(!bridge) return; - LLInventoryPanel* panel = bridge->mInventoryPanel.get(); - if (!panel) return; - LLInventoryModel* model = panel->getModel(); - if(!model) return; - LLUUID id; - id = model->createNewCategory(bridge->getUUID(), - LLFolderType::FT_NONE, - LLStringUtil::null); - model->notifyObservers(); - - // At this point, the bridge has probably been deleted, but the - // view is still there. - panel->setSelection(id, TAKE_FOCUS_YES); -} - void LLFolderBridge::createNewShirt(void* user_data) { LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SHIRT); @@ -3602,6 +3773,24 @@ void LLFolderBridge::createNewEyes(void* user_data) LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_EYES); } +EInventorySortGroup LLFolderBridge::getSortGroup() const +{ + LLFolderType::EType preferred_type = getPreferredType(); + + if (preferred_type == LLFolderType::FT_TRASH) + { + return SG_TRASH_FOLDER; + } + + if(LLFolderType::lookupIsProtectedType(preferred_type)) + { + return SG_SYSTEM_FOLDER; + } + + return SG_NORMAL_FOLDER; +} + + // static void LLFolderBridge::createWearable(LLFolderBridge* bridge, LLWearableType::EType type) { @@ -3704,9 +3893,10 @@ void LLFolderBridge::dropToFavorites(LLInventoryItem* inv_item) LLPointer<AddFavoriteLandmarkCallback> cb = new AddFavoriteLandmarkCallback(); LLInventoryPanel* panel = mInventoryPanel.get(); LLFolderViewItem* drag_over_item = panel ? panel->getRootFolder()->getDraggingOverItem() : NULL; - if (drag_over_item && drag_over_item->getListener()) + LLFolderViewModelItemInventory* view_model = drag_over_item ? static_cast<LLFolderViewModelItemInventory*>(drag_over_item->getViewModelItem()) : NULL; + if (view_model) { - cb.get()->setTargetLandmarkId(drag_over_item->getListener()->getUUID()); + cb.get()->setTargetLandmarkId(view_model->getUUID()); } copy_inventory_item( @@ -3755,7 +3945,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, LLInventoryPanel* destination_panel = mInventoryPanel.get(); if (!destination_panel) return false; - LLInventoryFilter* filter = destination_panel->getFilter(); + LLInventoryFilter* filter = getInventoryFilter(); if (!filter) return false; const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); @@ -3872,13 +4062,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // passes the filter of the destination panel. if (accept && active_panel) { - LLFolderView* active_folder_view = active_panel->getRootFolder(); - if (!active_folder_view) return false; - - LLFolderViewItem* fv_item = active_folder_view->getItemByID(inv_item->getUUID()); + LLFolderViewItem* fv_item = active_panel->getItemByID(inv_item->getUUID()); if (!fv_item) return false; - accept = filter->check(fv_item); + accept = filter->check(fv_item->getViewModelItem()); } if (accept && drop) @@ -3890,6 +4077,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } // If an item is being dragged between windows, unselect everything in the active window // so that we don't follow the selection to its new location (which is very annoying). + // RN: a better solution would be to deselect automatically when an item is moved + // and then select any item that is dropped only in the panel that it is dropped in if (active_panel && (destination_panel != active_panel)) { active_panel->unSelectAll(); @@ -3907,8 +4096,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if (itemp) { LLUUID srcItemId = inv_item->getUUID(); - LLUUID destItemId = itemp->getListener()->getUUID(); - gInventory.rearrangeFavoriteLandmarks(srcItemId, destItemId); + LLUUID destItemId = static_cast<LLFolderViewModelItemInventory*>(itemp->getViewModelItem())->getUUID(); + LLFavoritesOrderStorage::instance().rearrangeFavoriteLandmarks(srcItemId, destItemId); } } @@ -3940,7 +4129,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, else { // set up observer to select item once drag and drop from inbox is complete - if (gInventory.isObjectDescendentOf(inv_item->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false))) + if (gInventory.isObjectDescendentOf(inv_item->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false))) { set_dad_inbox_object(inv_item->getUUID()); } @@ -4095,13 +4284,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // passes the filter of the destination panel. if (accept && active_panel) { - LLFolderView* active_folder_view = active_panel->getRootFolder(); - if (!active_folder_view) return false; - - LLFolderViewItem* fv_item = active_folder_view->getItemByID(inv_item->getUUID()); + LLFolderViewItem* fv_item = active_panel->getItemByID(inv_item->getUUID()); if (!fv_item) return false; - accept = filter->check(fv_item); + accept = filter->check(fv_item->getViewModelItem()); } if (accept && drop) @@ -4141,10 +4327,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // static bool check_category(LLInventoryModel* model, const LLUUID& cat_id, - LLFolderView* active_folder_view, + LLInventoryPanel* active_panel, LLInventoryFilter* filter) { - if (!model || !active_folder_view || !filter) + if (!model || !active_panel || !filter) return false; if (!filter->checkFolder(cat_id)) @@ -4164,13 +4350,13 @@ bool check_category(LLInventoryModel* model, // Empty folder should be checked as any other folder view item. // If we are filtering by date the folder should not pass because // it doesn't have its own creation date. See LLInvFVBridge::getCreationDate(). - return check_item(cat_id, active_folder_view, filter); + return check_item(cat_id, active_panel, filter); } for (S32 i = 0; i < num_descendent_categories; ++i) { LLInventoryCategory* category = descendent_categories[i]; - if(!check_category(model, category->getUUID(), active_folder_view, filter)) + if(!check_category(model, category->getUUID(), active_panel, filter)) { return false; } @@ -4179,7 +4365,7 @@ bool check_category(LLInventoryModel* model, for (S32 i = 0; i < num_descendent_items; ++i) { LLViewerInventoryItem* item = descendent_items[i]; - if(!check_item(item->getUUID(), active_folder_view, filter)) + if(!check_item(item->getUUID(), active_panel, filter)) { return false; } @@ -4190,15 +4376,15 @@ bool check_category(LLInventoryModel* model, // static bool check_item(const LLUUID& item_id, - LLFolderView* active_folder_view, + LLInventoryPanel* active_panel, LLInventoryFilter* filter) { - if (!active_folder_view || !filter) return false; + if (!active_panel || !filter) return false; - LLFolderViewItem* fv_item = active_folder_view->getItemByID(item_id); + LLFolderViewItem* fv_item = active_panel->getItemByID(item_id); if (!fv_item) return false; - return filter->check(fv_item); + return filter->check(fv_item->getViewModelItem()); } // +=================================================+ @@ -4300,15 +4486,6 @@ void LLSoundBridge::openItem() } } -void LLSoundBridge::previewItem() -{ - LLViewerInventoryItem* item = getItem(); - if(item) - { - send_sound_trigger(item->getAssetUUID(), 1.0); - } -} - void LLSoundBridge::openSoundPreview(void* which) { LLSoundBridge *me = (LLSoundBridge *)which; @@ -4403,6 +4580,7 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } items.push_back(std::string("Landmark Separator")); + items.push_back(std::string("url_copy")); items.push_back(std::string("About Landmark")); } @@ -4411,6 +4589,7 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) // info panel can be shown at a time. if ((flags & FIRST_SELECTED_ITEM) == 0) { + disabled_items.push_back(std::string("url_copy")); disabled_items.push_back(std::string("About Landmark")); } @@ -4524,7 +4703,7 @@ LLCallingCardBridge::~LLCallingCardBridge() void LLCallingCardBridge::refreshFolderViewItem() { LLInventoryPanel* panel = mInventoryPanel.get(); - LLFolderViewItem* itemp = panel ? panel->getRootFolder()->getItemByID(mUUID) : NULL; + LLFolderViewItem* itemp = panel ? panel->getItemByID(mUUID) : NULL; if (itemp) { itemp->refresh(); @@ -4540,19 +4719,16 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act if (item && (item->getCreatorUUID() != gAgent.getID()) && (!item->getCreatorUUID().isNull())) { - std::string callingcard_name; - gCacheName->getFullName(item->getCreatorUUID(), callingcard_name); - // IDEVO + std::string callingcard_name = LLCacheName::getDefaultName(); LLAvatarName av_name; - if (LLAvatarNameCache::useDisplayNames() - && LLAvatarNameCache::get(item->getCreatorUUID(), &av_name)) + if (LLAvatarNameCache::get(item->getCreatorUUID(), &av_name)) { - callingcard_name = av_name.mDisplayName + " (" + av_name.mUsername + ")"; + callingcard_name = av_name.getCompleteName(); } LLUUID session_id = gIMMgr->addSession(callingcard_name, IM_NOTHING_SPECIAL, item->getCreatorUUID()); if (session_id != LLUUID::null) { - LLIMFloater::show(session_id); + LLFloaterIMContainer::getInstance()->showConversation(session_id); } } } @@ -4630,6 +4806,10 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { disabled_items.push_back(std::string("Share")); } + if ((flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Open")); + } addOpenRightClickMenuOption(items); items.push_back(std::string("Properties")); @@ -5294,6 +5474,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) p.on_enable.parameter = cbparams; LLView* parent = attachment->getIsHUDAttachment() ? attach_hud_menu : attach_menu; LLUICtrlFactory::create<LLMenuItemCallGL>(p, parent); + items.push_back(p.name); } } } @@ -5315,11 +5496,10 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name) { LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); new_item->rename(new_name); - buildDisplayName(new_item, mDisplayName); new_item->updateServer(FALSE); model->updateItem(new_item); - model->notifyObservers(); + buildDisplayName(); if (isAgentAvatarValid()) { @@ -5596,7 +5776,8 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Wearable Edit")); - if ((flags & FIRST_SELECTED_ITEM) == 0) + bool modifiable = !gAgentWearables.isWearableModifiable(item->getUUID()); + if (((flags & FIRST_SELECTED_ITEM) == 0) || modifiable) { disabled_items.push_back(std::string("Wearable Edit")); } @@ -5919,16 +6100,6 @@ void LLMeshBridge::openItem() } } -void LLMeshBridge::previewItem() -{ - LLViewerInventoryItem* item = getItem(); - if(item) - { - // preview mesh - } -} - - void LLMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { lldebugs << "LLMeshBridge::buildContextMenu()" << llendl; @@ -6017,14 +6188,15 @@ void LLLinkFolderBridge::gotoItem() const LLUUID &cat_uuid = getFolderID(); if (!cat_uuid.isNull()) { - if (LLFolderViewItem *base_folder = mRoot->getItemByID(cat_uuid)) + LLFolderViewItem *base_folder = mInventoryPanel.get()->getItemByID(cat_uuid); + if (base_folder) { if (LLInventoryModel* model = getInventoryModel()) { model->fetchDescendentsOf(cat_uuid); } base_folder->setOpen(TRUE); - mRoot->setSelectionFromRoot(base_folder,TRUE); + mRoot->setSelection(base_folder,TRUE); mRoot->scrollToShowSelection(); } } @@ -6355,9 +6527,8 @@ LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_ /************************************************************************/ void LLRecentItemsFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { - LLFolderBridge::buildContextMenu(menu, flags); - - menuentry_vec_t disabled_items, items = getMenuItems(); + menuentry_vec_t disabled_items, items; + buildContextMenuOptions(flags, items, disabled_items); items.erase(std::remove(items.begin(), items.end(), std::string("New Folder")), items.end()); @@ -6369,42 +6540,29 @@ LLInvFVBridge* LLRecentInventoryBridgeBuilder::createBridge( LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderViewModelInventory* view_model, LLFolderView* root, const LLUUID& uuid, U32 flags /*= 0x00*/ ) const { LLInvFVBridge* new_listener = NULL; - switch(asset_type) + if (asset_type == LLAssetType::AT_CATEGORY + && actual_asset_type != LLAssetType::AT_LINK_FOLDER) { - case LLAssetType::AT_CATEGORY: - if (actual_asset_type == LLAssetType::AT_LINK_FOLDER) + new_listener = new LLRecentItemsFolderBridge(inv_type, inventory, root, uuid); + } + else { - // *TODO: Create a link folder handler instead if it is necessary - new_listener = LLInventoryFVBridgeBuilder::createBridge( - asset_type, + new_listener = LLInventoryFolderViewModelBuilder::createBridge(asset_type, actual_asset_type, inv_type, inventory, + view_model, 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 dc9e88d54d..5c6cf0f0f0 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -29,11 +29,13 @@ #include "llcallingcard.h" #include "llfloaterproperties.h" -#include "llfoldervieweventlistener.h" +#include "llfolderviewmodel.h" #include "llinventorymodel.h" #include "llinventoryobserver.h" +#include "llinventorypanel.h" #include "llviewercontrol.h" #include "llwearable.h" +#include "lltooldraganddrop.h" class LLInventoryFilter; class LLInventoryPanel; @@ -41,7 +43,7 @@ class LLInventoryModel; class LLMenuGL; class LLCallingCardObserver; class LLViewerJointAttachment; - +class LLFolderView; typedef std::vector<std::string> menuentry_vec_t; @@ -56,7 +58,7 @@ typedef std::vector<std::string> menuentry_vec_t; // functionality a bit. (except for folders, you can create those // manually...) //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLInvFVBridge : public LLFolderViewEventListener +class LLInvFVBridge : public LLFolderViewModelItemInventory { public: // This method is a convenience function which creates the correct @@ -65,6 +67,7 @@ public: LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderViewModelInventory* view_model, LLFolderView* root, const LLUUID& uuid, U32 flags = 0x00); @@ -78,23 +81,25 @@ public: // LLInvFVBridge functionality //-------------------------------------------------------------------- virtual const LLUUID& getUUID() const { return mUUID; } - virtual void clearDisplayName() {} + virtual void clearDisplayName() { mDisplayName.clear(); } virtual void restoreItem() {} virtual void restoreToWorld() {} //-------------------------------------------------------------------- - // Inherited LLFolderViewEventListener functions + // Inherited LLFolderViewModelItemInventory functions //-------------------------------------------------------------------- virtual const std::string& getName() const; virtual const std::string& getDisplayName() const; + const std::string& getSearchableName() const { return mSearchableName; } + virtual PermissionMask getPermissionMask() const; virtual LLFolderType::EType getPreferredType() const; virtual time_t getCreationDate() const; + virtual void setCreationDate(time_t creation_date_utc); virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } virtual void openItem() {} virtual void closeItem() {} - virtual void previewItem() {openItem();} virtual void showProperties(); virtual BOOL isItemRenameable() const { return TRUE; } //virtual BOOL renameItem(const std::string& new_name) {} @@ -102,9 +107,10 @@ public: virtual BOOL isItemMovable() const; virtual BOOL isItemInTrash() const; virtual BOOL isLink() const; + virtual BOOL isLibraryItem() const; //virtual BOOL removeItem() = 0; - virtual void removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch); - virtual void move(LLFolderViewEventListener* new_parent_bridge) {} + virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch); + virtual void move(LLFolderViewModelItem* new_parent_bridge) {} virtual BOOL isItemCopyable() const { return FALSE; } virtual BOOL copyToClipboard() const; virtual BOOL cutToClipboard() const; @@ -115,6 +121,7 @@ public: void getClipboardEntries(bool show_asset_id, menuentry_vec_t &items, menuentry_vec_t &disabled_items, U32 flags); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual LLToolDragAndDrop::ESource getDragSource() const; virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, @@ -122,6 +129,9 @@ public: std::string& tooltip_msg) { return FALSE; } virtual LLInventoryType::EType getInventoryType() const { return mInvType; } virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } + EInventorySortGroup getSortGroup() const { return SG_ITEM; } + virtual LLInventoryObject* getInventoryObject() const; + //-------------------------------------------------------------------- // Convenience functions for adding various common menu options. @@ -138,16 +148,16 @@ protected: protected: LLInvFVBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid); - LLInventoryObject* getInventoryObject() const; LLInventoryModel* getInventoryModel() const; + LLInventoryFilter* getInventoryFilter() const; BOOL isLinkedObjectInTrash() const; // Is this obj or its baseobj in the trash? 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 isInboxFolder() const; // true if COF or descendent of marketplace inbox - BOOL isOutboxFolder() const; // true if COF or descendent of marketplace outbox + BOOL isCOFFolder() const; // true if COF or descendant of + BOOL isInboxFolder() const; // true if COF or descendant of marketplace inbox + BOOL isOutboxFolder() const; // true if COF or descendant of marketplace outbox BOOL isOutboxFolderDirectParent() const; const LLUUID getOutboxFolder() const; @@ -160,30 +170,36 @@ protected: LLViewerInventoryCategory* item, const LLUUID& new_parent, BOOL restamp); - void removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*>& batch); + void removeBatchNoCheck(std::vector<LLFolderViewModelItem*>& batch); protected: LLHandle<LLInventoryPanel> mInventoryPanel; LLFolderView* mRoot; const LLUUID mUUID; // item id LLInventoryType::EType mInvType; - BOOL mIsLink; + bool mIsLink; + LLTimer mTimeSinceRequestStart; + mutable std::string mDisplayName; + mutable std::string mSearchableName; + void purgeItem(LLInventoryModel *model, const LLUUID &uuid); + virtual void buildDisplayName() const {} }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInvFVBridgeBuilder +// Class LLInventoryFolderViewModelBuilder // -// 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. +// This class intended to build Folder View Model via LLInvFVBridge::createBridge. +// It can be overridden with another way of creation necessary Inventory Folder View Models. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLInventoryFVBridgeBuilder +class LLInventoryFolderViewModelBuilder { public: - virtual ~LLInventoryFVBridgeBuilder() {} + virtual ~LLInventoryFolderViewModelBuilder() {} virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderViewModelInventory* view_model, LLFolderView* root, const LLUUID& uuid, U32 flags = 0x00) const; @@ -197,13 +213,14 @@ public: const LLUUID& uuid) : LLInvFVBridge(inventory, root, uuid) {} + typedef boost::function<void(std::string& slurl)> slurl_callback_t; + virtual void performAction(LLInventoryModel* model, std::string action); virtual void selectItem(); virtual void restoreItem(); virtual void restoreToWorld(); virtual void gotoItem(); virtual LLUIImagePtr getIcon() const; - virtual const std::string& getDisplayName() const; virtual std::string getLabelSuffix() const; virtual LLFontGL::StyleFlags getLabelStyle() const; virtual PermissionMask getPermissionMask() const; @@ -212,19 +229,17 @@ public: virtual BOOL renameItem(const std::string& new_name); virtual BOOL removeItem(); virtual BOOL isItemCopyable() const; - virtual BOOL hasChildren() const { return FALSE; } + virtual bool hasChildren() const { return FALSE; } virtual BOOL isUpToDate() const { return TRUE; } - - /*virtual*/ void clearDisplayName() { mDisplayName.clear(); } + virtual LLUIImagePtr getIconOverlay() const; LLViewerInventoryItem* getItem() const; protected: BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response); virtual BOOL isItemPermissive() const; - static void buildDisplayName(LLInventoryItem* item, std::string& name); + virtual void buildDisplayName() const; - mutable std::string mDisplayName; }; class LLFolderBridge : public LLInvFVBridge @@ -232,15 +247,18 @@ class LLFolderBridge : public LLInvFVBridge public: LLFolderBridge(LLInventoryPanel* inventory, LLFolderView* root, - const LLUUID& uuid) : - LLInvFVBridge(inventory, root, uuid), + const LLUUID& uuid) + : LLInvFVBridge(inventory, root, uuid), mCallingCards(FALSE), - mWearables(FALSE) + mWearables(FALSE), + mIsLoading(false) {} BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg); BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg); + virtual void buildDisplayName() const; + virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual void closeItem(); @@ -250,7 +268,9 @@ public: virtual LLFolderType::EType getPreferredType() const; virtual LLUIImagePtr getIcon() const; - virtual LLUIImagePtr getOpenIcon() const; + virtual LLUIImagePtr getIconOpen() const; + virtual LLUIImagePtr getIconOverlay() const; + static LLUIImagePtr getIcon(LLFolderType::EType preferred_type); virtual BOOL renameItem(const std::string& new_name); @@ -258,11 +278,12 @@ public: virtual BOOL removeItem(); BOOL removeSystemFolder(); bool removeItemResponse(const LLSD& notification, const LLSD& response); + void updateHierarchyCreationDate(time_t date); virtual void pasteFromClipboard(); virtual void pasteLinkFromClipboard(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual BOOL hasChildren() const; + virtual bool hasChildren() const; virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, @@ -275,20 +296,24 @@ public: virtual BOOL isClipboardPasteable() const; virtual BOOL isClipboardPasteableAsLink() const; + EInventorySortGroup getSortGroup() const; + virtual void update(); + static void createWearable(LLFolderBridge* bridge, LLWearableType::EType type); LLViewerInventoryCategory* getCategory() const; LLHandle<LLFolderBridge> getHandle() { mHandle.bind(this); return mHandle; } + bool isLoading() { return mIsLoading; } + protected: - void buildContextMenuBaseOptions(U32 flags); - void buildContextMenuFolderOptions(U32 flags); + void buildContextMenuOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items); + void buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items); //-------------------------------------------------------------------- // 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); @@ -308,8 +333,6 @@ protected: void modifyOutfit(BOOL append); void determineFolderType(); - menuentry_vec_t getMenuItems() { return mItems; } // returns a copy of current menu items - void dropToFavorites(LLInventoryItem* inv_item); void dropToOutfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit); @@ -321,10 +344,11 @@ public: static void staticFolderOptionsMenu(); private: - BOOL mCallingCards; - BOOL mWearables; - menuentry_vec_t mItems; - menuentry_vec_t mDisabledItems; + + bool mCallingCards; + bool mWearables; + bool mIsLoading; + LLTimer mTimeSinceRequestStart; LLRootHandle<LLFolderBridge> mHandle; }; @@ -354,7 +378,6 @@ public: const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} virtual void openItem(); - virtual void previewItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); static void openSoundPreview(void*); }; @@ -544,7 +567,6 @@ class LLMeshBridge : public LLItemBridge public: virtual LLUIImagePtr getIcon() const; virtual void openItem(); - virtual void previewItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); protected: @@ -620,7 +642,7 @@ public: }; // Bridge builder to create Inventory-Folder-View-Bridge for Recent Inventory Panel -class LLRecentInventoryBridgeBuilder : public LLInventoryFVBridgeBuilder +class LLRecentInventoryBridgeBuilder : public LLInventoryFolderViewModelBuilder { public: // Overrides FolderBridge for Recent Inventory Panel. @@ -629,6 +651,7 @@ public: LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderViewModelInventory* view_model, LLFolderView* root, const LLUUID& uuid, U32 flags = 0x00) const; diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 4573074c73..92f2d33073 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -29,7 +29,7 @@ #include "llinventoryfilter.h" // viewer includes -#include "llfoldervieweventlistener.h" +#include "llfolderviewmodel.h" #include "llfolderviewitem.h" #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" @@ -44,107 +44,86 @@ LLFastTimer::DeclareTimer FT_FILTER_CLIPBOARD("Filter Clipboard"); -LLInventoryFilter::FilterOps::FilterOps() : - mFilterObjectTypes(0xffffffffffffffffULL), - mFilterCategoryTypes(0xffffffffffffffffULL), - mFilterWearableTypes(0xffffffffffffffffULL), - mMinDate(time_min()), - mMaxDate(time_max()), - mHoursAgo(0), - mShowFolderState(SHOW_NON_EMPTY_FOLDERS), - mPermissions(PERM_NONE), - mFilterTypes(FILTERTYPE_OBJECT), - mFilterUUID(LLUUID::null), - mFilterLinks(FILTERLINK_INCLUDE_LINKS) +LLInventoryFilter::FilterOps::FilterOps(const Params& p) +: mFilterObjectTypes(p.object_types), + mFilterCategoryTypes(p.category_types), + mFilterWearableTypes(p.wearable_types), + mMinDate(p.date_range.min_date), + mMaxDate(p.date_range.max_date), + mHoursAgo(p.hours_ago), + mShowFolderState(p.show_folder_state), + mPermissions(p.permissions), + mFilterTypes(p.types), + mFilterUUID(p.uuid), + mFilterLinks(p.links) { } ///---------------------------------------------------------------------------- /// Class LLInventoryFilter ///---------------------------------------------------------------------------- -LLInventoryFilter::LLInventoryFilter(const std::string& name) -: mName(name), - mModified(FALSE), - mNeedTextRebuild(TRUE), - mEmptyLookupMessage("InventoryNoMatchingItems") +LLInventoryFilter::LLInventoryFilter(const Params& p) +: mName(p.name), + mFilterModified(FILTER_NONE), + mEmptyLookupMessage("InventoryNoMatchingItems"), + mFilterOps(p.filter_ops), + mFilterSubString(p.substring), + mCurrentGeneration(0), + mFirstRequiredGeneration(0), + mFirstSuccessGeneration(0), + mFilterCount(0) { - mOrder = SO_FOLDERS_BY_NAME; // This gets overridden by a pref immediately - - mSubStringMatchOffset = 0; - mFilterSubString.clear(); - mFilterGeneration = 0; - mMustPassGeneration = S32_MAX; - mMinRequiredGeneration = 0; - mFilterCount = 0; - mNextFilterGeneration = mFilterGeneration + 1; - - mLastLogoff = gSavedPerAccountSettings.getU32("LastLogoff"); - mFilterBehavior = FILTER_NONE; + mNextFilterGeneration = mCurrentGeneration + 1; // copy mFilterOps into mDefaultFilterOps markDefault(); } -LLInventoryFilter::~LLInventoryFilter() -{ -} - -BOOL LLInventoryFilter::check(const LLFolderViewItem* item) +bool LLInventoryFilter::check(const LLFolderViewModelItem* item) { + const LLFolderViewModelItemInventory* listener = dynamic_cast<const LLFolderViewModelItemInventory*>(item); // Clipboard cut items are *always* filtered so we need this value upfront - const LLFolderViewEventListener* listener = item->getListener(); const BOOL passed_clipboard = (listener ? checkAgainstClipboard(listener->getUUID()) : TRUE); // If it's a folder and we're showing all folders, return automatically. - const BOOL is_folder = (dynamic_cast<const LLFolderViewFolder*>(item) != NULL); + const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY; if (is_folder && (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)) { return passed_clipboard; } - mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos; + std::string::size_type string_offset = mFilterSubString.size() ? listener->getSearchableName().find(mFilterSubString) : std::string::npos; - const BOOL passed_filtertype = checkAgainstFilterType(item); - const BOOL passed_permissions = checkAgainstPermissions(item); - const BOOL passed_filterlink = checkAgainstFilterLinks(item); - const BOOL passed = (passed_filtertype && - passed_permissions && - passed_filterlink && - passed_clipboard && - (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)); + BOOL passed = (mFilterSubString.size() == 0 || string_offset != std::string::npos); + passed = passed && checkAgainstFilterType(listener); + passed = passed && checkAgainstPermissions(listener); + passed = passed && checkAgainstFilterLinks(listener); + passed = passed && passed_clipboard; return passed; } bool LLInventoryFilter::check(const LLInventoryItem* item) { - mSubStringMatchOffset = mFilterSubString.size() ? item->getName().find(mFilterSubString) : std::string::npos; + std::string::size_type string_offset = mFilterSubString.size() ? item->getName().find(mFilterSubString) : std::string::npos; const bool passed_filtertype = checkAgainstFilterType(item); const bool passed_permissions = checkAgainstPermissions(item); const BOOL passed_clipboard = checkAgainstClipboard(item->getUUID()); - const bool passed = (passed_filtertype && - passed_permissions && - passed_clipboard && - (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)); + const bool passed = (passed_filtertype + && passed_permissions + && passed_clipboard + && (mFilterSubString.size() == 0 || string_offset != std::string::npos)); return passed; } -bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder) const +bool LLInventoryFilter::checkFolder(const LLFolderViewModelItem* item) const { - if (!folder) - { - llwarns << "The filter can not be checked on an invalid folder." << llendl; - llassert(false); // crash in development builds - return false; - } - - const LLFolderViewEventListener* listener = folder->getListener(); + const LLFolderViewModelItemInventory* listener = dynamic_cast<const LLFolderViewModelItemInventory*>(item); if (!listener) { - llwarns << "Folder view event listener not found." << llendl; - llassert(false); // crash in development builds + llerrs << "Folder view event listener not found." << llendl; return false; } @@ -155,6 +134,13 @@ bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder) const bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const { + // when applying a filter, matching folders get their contents downloaded first + if (isNotDefault() + && !gInventory.isCategoryComplete(folder_id)) + { + LLInventoryModelBackgroundFetch::instance().start(folder_id); + } + // Always check against the clipboard const BOOL passed_clipboard = checkAgainstClipboard(folder_id); @@ -163,14 +149,14 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const { return passed_clipboard; } - + if (mFilterOps.mFilterTypes & FILTERTYPE_CATEGORY) { // Can only filter categories for items in your inventory // (e.g. versus in-world object contents). const LLViewerInventoryCategory *cat = gInventory.getCategory(folder_id); if (!cat) - return false; + return folder_id.isNull(); LLFolderType::EType cat_type = cat->getPreferredType(); if (cat_type != LLFolderType::FT_NONE && (1LL << cat_type & mFilterOps.mFilterCategoryTypes) == U64(0)) return false; @@ -179,9 +165,8 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const return passed_clipboard; } -BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) const +bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInventory* listener) const { - const LLFolderViewEventListener* listener = item->getListener(); if (!listener) return FALSE; LLInventoryType::EType object_type = listener->getInventoryType(); @@ -268,7 +253,7 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con } } } - + return TRUE; } @@ -347,13 +332,12 @@ bool LLInventoryFilter::checkAgainstClipboard(const LLUUID& object_id) const return true; } -BOOL LLInventoryFilter::checkAgainstPermissions(const LLFolderViewItem* item) const +bool LLInventoryFilter::checkAgainstPermissions(const LLFolderViewModelItemInventory* listener) const { - const LLFolderViewEventListener* listener = item->getListener(); if (!listener) return FALSE; PermissionMask perm = listener->getPermissionMask(); - const LLInvFVBridge *bridge = dynamic_cast<const LLInvFVBridge *>(item->getListener()); + const LLInvFVBridge *bridge = dynamic_cast<const LLInvFVBridge *>(listener); if (bridge && bridge->isLink()) { const LLUUID& linked_uuid = gInventory.getLinkedItemID(bridge->getUUID()); @@ -375,9 +359,8 @@ bool LLInventoryFilter::checkAgainstPermissions(const LLInventoryItem* item) con return (perm & mFilterOps.mPermissions) == mFilterOps.mPermissions; } -BOOL LLInventoryFilter::checkAgainstFilterLinks(const LLFolderViewItem* item) const +bool LLInventoryFilter::checkAgainstFilterLinks(const LLFolderViewModelItemInventory* listener) const { - const LLFolderViewEventListener* listener = item->getListener(); if (!listener) return TRUE; const LLUUID object_id = listener->getUUID(); @@ -397,20 +380,20 @@ const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const return mFilterSubString; } -std::string::size_type LLInventoryFilter::getStringMatchOffset() const +std::string::size_type LLInventoryFilter::getStringMatchOffset(LLFolderViewModelItem* item) const { - return mSubStringMatchOffset; + return mFilterSubString.size() ? item->getSearchableName().find(mFilterSubString) : std::string::npos; } -BOOL LLInventoryFilter::isDefault() const +bool LLInventoryFilter::isDefault() const { return !isNotDefault(); } // has user modified default filter params? -BOOL LLInventoryFilter::isNotDefault() const +bool LLInventoryFilter::isNotDefault() const { - BOOL not_default = FALSE; + S32 not_default = 0; not_default |= (mFilterOps.mFilterObjectTypes != mDefaultFilterOps.mFilterObjectTypes); not_default |= (mFilterOps.mFilterCategoryTypes != mDefaultFilterOps.mFilterCategoryTypes); @@ -422,11 +405,11 @@ BOOL LLInventoryFilter::isNotDefault() const not_default |= (mFilterOps.mMinDate != mDefaultFilterOps.mMinDate); not_default |= (mFilterOps.mMaxDate != mDefaultFilterOps.mMaxDate); not_default |= (mFilterOps.mHoursAgo != mDefaultFilterOps.mHoursAgo); - - return not_default; + + return not_default != 0; } -BOOL LLInventoryFilter::isActive() const +bool LLInventoryFilter::isActive() const { return mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL || mFilterOps.mFilterCategoryTypes != 0xffffffffffffffffULL @@ -440,16 +423,9 @@ BOOL LLInventoryFilter::isActive() const || mFilterOps.mHoursAgo != 0; } -BOOL LLInventoryFilter::isModified() const -{ - return mModified; -} - -BOOL LLInventoryFilter::isModifiedAndClear() +bool LLInventoryFilter::isModified() const { - BOOL ret = mModified; - mModified = FALSE; - return ret; + return mFilterModified != FILTER_NONE; } void LLInventoryFilter::updateFilterTypes(U64 types, U64& current_types) @@ -613,9 +589,10 @@ void LLInventoryFilter::setDateRange(time_t min_date, time_t max_date) void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl) { + static LLCachedControl<U32> s_last_logoff(gSavedPerAccountSettings, "LastLogoff", 0); if (sl && !isSinceLogoff()) { - setDateRange(mLastLogoff, time_max()); + setDateRange(s_last_logoff(), time_max()); setModified(); } if (!sl && isSinceLogoff()) @@ -634,17 +611,18 @@ void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl) } } -BOOL LLInventoryFilter::isSinceLogoff() const +bool LLInventoryFilter::isSinceLogoff() const { - return (mFilterOps.mMinDate == (time_t)mLastLogoff) && + static LLCachedControl<U32> s_last_logoff(gSavedSettings, "LastLogoff", 0); + + return (mFilterOps.mMinDate == (time_t)s_last_logoff()) && (mFilterOps.mMaxDate == time_max()) && (mFilterOps.mFilterTypes & FILTERTYPE_DATE); } void LLInventoryFilter::clearModified() { - mModified = FALSE; - mFilterBehavior = FILTER_NONE; + mFilterModified = FILTER_NONE; } void LLInventoryFilter::setHoursAgo(U32 hours) @@ -722,15 +700,6 @@ void LLInventoryFilter::setShowFolderState(EFolderShow state) } } -void LLInventoryFilter::setSortOrder(U32 order) -{ - if (mOrder != order) - { - mOrder = order; - setModified(); - } -} - void LLInventoryFilter::markDefault() { mDefaultFilterOps = mFilterOps; @@ -742,83 +711,68 @@ void LLInventoryFilter::resetDefault() setModified(); } -void LLInventoryFilter::setModified(EFilterBehavior behavior) +void LLInventoryFilter::setModified(EFilterModified behavior) { - mModified = TRUE; - mNeedTextRebuild = TRUE; - mFilterGeneration = mNextFilterGeneration++; + mFilterText.clear(); + mCurrentGeneration = mNextFilterGeneration++; - if (mFilterBehavior == FILTER_NONE) + if (mFilterModified == FILTER_NONE) { - mFilterBehavior = behavior; + mFilterModified = behavior; } - else if (mFilterBehavior != behavior) + else if (mFilterModified != behavior) { // trying to do both less restrictive and more restrictive filter // basically means restart from scratch - mFilterBehavior = FILTER_RESTART; + mFilterModified = FILTER_RESTART; } - if (isNotDefault()) + // if not keeping current filter results, update last valid as well + switch(mFilterModified) { - // if not keeping current filter results, update last valid as well - switch(mFilterBehavior) - { - case FILTER_RESTART: - mMustPassGeneration = mFilterGeneration; - mMinRequiredGeneration = mFilterGeneration; - break; - case FILTER_LESS_RESTRICTIVE: - mMustPassGeneration = mFilterGeneration; - break; - case FILTER_MORE_RESTRICTIVE: - mMinRequiredGeneration = mFilterGeneration; - // must have passed either current filter generation (meaningless, as it hasn't been run yet) - // or some older generation, so keep the value - mMustPassGeneration = llmin(mMustPassGeneration, mFilterGeneration); - break; - default: - llerrs << "Bad filter behavior specified" << llendl; - } - } - else - { - // shortcut disabled filters to show everything immediately - mMinRequiredGeneration = 0; - mMustPassGeneration = S32_MAX; + case FILTER_RESTART: + mFirstRequiredGeneration = mCurrentGeneration; + mFirstSuccessGeneration = mCurrentGeneration; + break; + case FILTER_LESS_RESTRICTIVE: + mFirstRequiredGeneration = mCurrentGeneration; + break; + case FILTER_MORE_RESTRICTIVE: + mFirstSuccessGeneration = mCurrentGeneration; + break; + default: + llerrs << "Bad filter behavior specified" << llendl; } } -BOOL LLInventoryFilter::isFilterObjectTypesWith(LLInventoryType::EType t) const +bool LLInventoryFilter::isFilterObjectTypesWith(LLInventoryType::EType t) const { return mFilterOps.mFilterObjectTypes & (1LL << t); } const std::string& LLInventoryFilter::getFilterText() { - if (!mNeedTextRebuild) + if (!mFilterText.empty()) { return mFilterText; } - mNeedTextRebuild = FALSE; std::string filtered_types; std::string not_filtered_types; BOOL filtered_by_type = FALSE; BOOL filtered_by_all_types = TRUE; S32 num_filter_types = 0; + mFilterText.clear(); if (isFilterObjectTypesWith(LLInventoryType::IT_ANIMATION)) { - //filtered_types += " Animations,"; filtered_types += LLTrans::getString("Animations"); filtered_by_type = TRUE; num_filter_types++; } else { - //not_filtered_types += " Animations,"; not_filtered_types += LLTrans::getString("Animations"); filtered_by_all_types = FALSE; @@ -826,140 +780,120 @@ const std::string& LLInventoryFilter::getFilterText() if (isFilterObjectTypesWith(LLInventoryType::IT_CALLINGCARD)) { - //filtered_types += " Calling Cards,"; filtered_types += LLTrans::getString("Calling Cards"); filtered_by_type = TRUE; num_filter_types++; } else { - //not_filtered_types += " Calling Cards,"; not_filtered_types += LLTrans::getString("Calling Cards"); filtered_by_all_types = FALSE; } if (isFilterObjectTypesWith(LLInventoryType::IT_WEARABLE)) { - //filtered_types += " Clothing,"; filtered_types += LLTrans::getString("Clothing"); filtered_by_type = TRUE; num_filter_types++; } else { - //not_filtered_types += " Clothing,"; not_filtered_types += LLTrans::getString("Clothing"); filtered_by_all_types = FALSE; } if (isFilterObjectTypesWith(LLInventoryType::IT_GESTURE)) { - //filtered_types += " Gestures,"; filtered_types += LLTrans::getString("Gestures"); filtered_by_type = TRUE; num_filter_types++; } else { - //not_filtered_types += " Gestures,"; not_filtered_types += LLTrans::getString("Gestures"); filtered_by_all_types = FALSE; } if (isFilterObjectTypesWith(LLInventoryType::IT_LANDMARK)) { - //filtered_types += " Landmarks,"; filtered_types += LLTrans::getString("Landmarks"); filtered_by_type = TRUE; num_filter_types++; } else { - //not_filtered_types += " Landmarks,"; not_filtered_types += LLTrans::getString("Landmarks"); filtered_by_all_types = FALSE; } if (isFilterObjectTypesWith(LLInventoryType::IT_NOTECARD)) { - //filtered_types += " Notecards,"; filtered_types += LLTrans::getString("Notecards"); filtered_by_type = TRUE; num_filter_types++; } else { - //not_filtered_types += " Notecards,"; not_filtered_types += LLTrans::getString("Notecards"); filtered_by_all_types = FALSE; } if (isFilterObjectTypesWith(LLInventoryType::IT_OBJECT) && isFilterObjectTypesWith(LLInventoryType::IT_ATTACHMENT)) { - //filtered_types += " Objects,"; filtered_types += LLTrans::getString("Objects"); filtered_by_type = TRUE; num_filter_types++; } else { - //not_filtered_types += " Objects,"; not_filtered_types += LLTrans::getString("Objects"); filtered_by_all_types = FALSE; } if (isFilterObjectTypesWith(LLInventoryType::IT_LSL)) { - //filtered_types += " Scripts,"; filtered_types += LLTrans::getString("Scripts"); filtered_by_type = TRUE; num_filter_types++; } else { - //not_filtered_types += " Scripts,"; not_filtered_types += LLTrans::getString("Scripts"); filtered_by_all_types = FALSE; } if (isFilterObjectTypesWith(LLInventoryType::IT_SOUND)) { - //filtered_types += " Sounds,"; filtered_types += LLTrans::getString("Sounds"); filtered_by_type = TRUE; num_filter_types++; } else { - //not_filtered_types += " Sounds,"; not_filtered_types += LLTrans::getString("Sounds"); filtered_by_all_types = FALSE; } if (isFilterObjectTypesWith(LLInventoryType::IT_TEXTURE)) { - //filtered_types += " Textures,"; filtered_types += LLTrans::getString("Textures"); filtered_by_type = TRUE; num_filter_types++; } else { - //not_filtered_types += " Textures,"; not_filtered_types += LLTrans::getString("Textures"); filtered_by_all_types = FALSE; } if (isFilterObjectTypesWith(LLInventoryType::IT_SNAPSHOT)) { - //filtered_types += " Snapshots,"; filtered_types += LLTrans::getString("Snapshots"); filtered_by_type = TRUE; num_filter_types++; } else { - //not_filtered_types += " Snapshots,"; not_filtered_types += LLTrans::getString("Snapshots"); filtered_by_all_types = FALSE; } @@ -975,7 +909,6 @@ const std::string& LLInventoryFilter::getFilterText() } else { - //mFilterText += "No "; mFilterText += LLTrans::getString("No Filters"); mFilterText += not_filtered_types; } @@ -985,66 +918,55 @@ const std::string& LLInventoryFilter::getFilterText() if (isSinceLogoff()) { - //mFilterText += " - Since Logoff"; mFilterText += LLTrans::getString("Since Logoff"); } return mFilterText; } -void LLInventoryFilter::toLLSD(LLSD& data) const -{ - data["filter_types"] = (LLSD::Integer)getFilterObjectTypes(); - data["min_date"] = (LLSD::Integer)getMinDate(); - data["max_date"] = (LLSD::Integer)getMaxDate(); - data["hours_ago"] = (LLSD::Integer)getHoursAgo(); - data["show_folder_state"] = (LLSD::Integer)getShowFolderState(); - data["permissions"] = (LLSD::Integer)getFilterPermissions(); - data["substring"] = (LLSD::String)getFilterSubString(); - data["sort_order"] = (LLSD::Integer)getSortOrder(); - data["since_logoff"] = (LLSD::Boolean)isSinceLogoff(); -} -void LLInventoryFilter::fromLLSD(LLSD& data) +LLInventoryFilter& LLInventoryFilter::operator=( const LLInventoryFilter& other ) { - if(data.has("filter_types")) - { - setFilterObjectTypes((U64)data["filter_types"].asInteger()); - } - - if(data.has("min_date") && data.has("max_date")) - { - setDateRange(data["min_date"].asInteger(), data["max_date"].asInteger()); - } - - if(data.has("hours_ago")) - { - setHoursAgo((U32)data["hours_ago"].asInteger()); - } - - if(data.has("show_folder_state")) - { - setShowFolderState((EFolderShow)data["show_folder_state"].asInteger()); - } + setFilterObjectTypes(other.getFilterObjectTypes()); + setDateRange(other.getMinDate(), other.getMaxDate()); + setHoursAgo(other.getHoursAgo()); + setShowFolderState(other.getShowFolderState()); + setFilterPermissions(other.getFilterPermissions()); + setFilterSubString(other.getFilterSubString()); + setDateRangeLastLogoff(other.isSinceLogoff()); + return *this; +} - if(data.has("permissions")) - { - setFilterPermissions((PermissionMask)data["permissions"].asInteger()); - } - if(data.has("substring")) - { - setFilterSubString(std::string(data["substring"].asString())); - } +void LLInventoryFilter::toParams(Params& params) const +{ + params.filter_ops.types = getFilterObjectTypes(); + params.filter_ops.category_types = getFilterCategoryTypes(); + params.filter_ops.wearable_types = getFilterWearableTypes(); + params.filter_ops.date_range.min_date = getMinDate(); + params.filter_ops.date_range.max_date = getMaxDate(); + params.filter_ops.hours_ago = getHoursAgo(); + params.filter_ops.show_folder_state = getShowFolderState(); + params.filter_ops.permissions = getFilterPermissions(); + params.substring = getFilterSubString(); + params.since_logoff = isSinceLogoff(); +} - if(data.has("sort_order")) +void LLInventoryFilter::fromParams(const Params& params) +{ + if (!params.validateBlock()) { - setSortOrder((U32)data["sort_order"].asInteger()); + return; } - if(data.has("since_logoff")) - { - setDateRangeLastLogoff((bool)data["since_logoff"].asBoolean()); - } + setFilterObjectTypes(params.filter_ops.types); + setFilterCategoryTypes(params.filter_ops.category_types); + setFilterWearableTypes(params.filter_ops.wearable_types); + setDateRange(params.filter_ops.date_range.min_date, params.filter_ops.date_range.max_date); + setHoursAgo(params.filter_ops.hours_ago); + setShowFolderState(params.filter_ops.show_folder_state); + setFilterPermissions(params.filter_ops.permissions); + setFilterSubString(params.substring); + setDateRangeLastLogoff(params.since_logoff); } U64 LLInventoryFilter::getFilterObjectTypes() const @@ -1057,11 +979,21 @@ U64 LLInventoryFilter::getFilterCategoryTypes() const return mFilterOps.mFilterCategoryTypes; } -BOOL LLInventoryFilter::hasFilterString() const +U64 LLInventoryFilter::getFilterWearableTypes() const +{ + return mFilterOps.mFilterWearableTypes; +} + +bool LLInventoryFilter::hasFilterString() const { return mFilterSubString.size() > 0; } +std::string::size_type LLInventoryFilter::getFilterStringSize() const +{ + return mFilterSubString.size(); +} + PermissionMask LLInventoryFilter::getFilterPermissions() const { return mFilterOps.mPermissions; @@ -1088,14 +1020,6 @@ LLInventoryFilter::EFolderShow LLInventoryFilter::getShowFolderState() const { return mFilterOps.mShowFolderState; } -U32 LLInventoryFilter::getSortOrder() const -{ - return mOrder; -} -const std::string& LLInventoryFilter::getName() const -{ - return mName; -} void LLInventoryFilter::setFilterCount(S32 count) { @@ -1113,15 +1037,15 @@ void LLInventoryFilter::decrementFilterCount() S32 LLInventoryFilter::getCurrentGeneration() const { - return mFilterGeneration; + return mCurrentGeneration; } -S32 LLInventoryFilter::getMinRequiredGeneration() const +S32 LLInventoryFilter::getFirstSuccessGeneration() const { - return mMinRequiredGeneration; + return mFirstSuccessGeneration; } -S32 LLInventoryFilter::getMustPassGeneration() const +S32 LLInventoryFilter::getFirstRequiredGeneration() const { - return mMustPassGeneration; + return mFirstRequiredGeneration; } void LLInventoryFilter::setEmptyLookupMessage(const std::string& message) @@ -1129,9 +1053,12 @@ void LLInventoryFilter::setEmptyLookupMessage(const std::string& message) mEmptyLookupMessage = message; } -const std::string& LLInventoryFilter::getEmptyLookupMessage() const +std::string LLInventoryFilter::getEmptyLookupMessage() const { - return mEmptyLookupMessage; + LLStringUtil::format_map_t args; + args["[SEARCH_TERM]"] = LLURI::escape(getFilterSubStringOrig()); + + return LLTrans::getString(mEmptyLookupMessage, args); } @@ -1141,3 +1068,27 @@ bool LLInventoryFilter::areDateLimitsSet() || mFilterOps.mMaxDate != time_max() || mFilterOps.mHoursAgo != 0; } + +bool LLInventoryFilter::showAllResults() const +{ + return hasFilterString(); +} + + + +bool LLInventoryFilter::FilterOps::DateRange::validateBlock( bool emit_errors /*= true*/ ) const +{ + bool valid = LLInitParam::Block<DateRange>::validateBlock(emit_errors); + if (valid) + { + if (max_date() < min_date()) + { + if (emit_errors) + { + llwarns << "max_date should be greater or equal to min_date" << llendl; + } + valid = false; + } + } + return valid; +} diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 9e600c036f..4912b5ca91 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -29,12 +29,13 @@ #include "llinventorytype.h" #include "llpermissionsflags.h" +#include "llfolderviewmodel.h" class LLFolderViewItem; class LLFolderViewFolder; class LLInventoryItem; -class LLInventoryFilter +class LLInventoryFilter : public LLFolderViewFilter { public: enum EFolderShow @@ -44,14 +45,6 @@ public: SHOW_NO_FOLDERS }; - enum EFilterBehavior - { - FILTER_NONE, // nothing to do, already filtered - FILTER_RESTART, // restart filtering from scratch - FILTER_LESS_RESTRICTIVE, // existing filtered items will certainly pass this filter - FILTER_MORE_RESTRICTIVE // if you didn't pass the previous filter, you definitely won't pass this one - }; - enum EFilterType { FILTERTYPE_NONE = 0, FILTERTYPE_OBJECT = 0x1 << 0, // normal default search-by-object-type @@ -59,7 +52,7 @@ public: FILTERTYPE_UUID = 0x1 << 2, // find the object with UUID and any links to it FILTERTYPE_DATE = 0x1 << 3, // search by date range FILTERTYPE_WEARABLE = 0x1 << 4, // search by wearable type - FILTERTYPE_EMPTYFOLDERS = 0x1 << 5 // pass if folder is not a system folder to be hidden if empty + FILTERTYPE_EMPTYFOLDERS = 0x1 << 5 // pass if folder is not a system folder to be hidden if }; enum EFilterLink @@ -77,16 +70,92 @@ public: SO_SYSTEM_FOLDERS_TO_TOP = 0x1 << 2 // Force system folders to be on top }; - LLInventoryFilter(const std::string& name); - virtual ~LLInventoryFilter(); + struct FilterOps + { + struct DateRange : public LLInitParam::Block<DateRange> + { + Optional<time_t> min_date, + max_date; + + DateRange() + : min_date("min_date", time_min()), + max_date("max_date", time_max()) + {} + + bool validateBlock(bool emit_errors = true) const; + }; + + struct Params : public LLInitParam::Block<Params> + { + Optional<U32> types; + Optional<U64> object_types, + wearable_types, + category_types; + Optional<EFilterLink> links; + Optional<LLUUID> uuid; + Optional<DateRange> date_range; + Optional<S32> hours_ago; + Optional<EFolderShow> show_folder_state; + Optional<PermissionMask> permissions; + + Params() + : types("filter_types", FILTERTYPE_OBJECT), + object_types("object_types", 0xffffFFFFffffFFFFULL), + wearable_types("wearable_types", 0xffffFFFFffffFFFFULL), + category_types("category_types", 0xffffFFFFffffFFFFULL), + links("links", FILTERLINK_INCLUDE_LINKS), + uuid("uuid"), + date_range("date_range"), + hours_ago("hours_ago", 0), + show_folder_state("show_folder_state", SHOW_NON_EMPTY_FOLDERS), + permissions("permissions", PERM_NONE) + {} + }; + + FilterOps(const Params& = Params()); + + U32 mFilterTypes; + U64 mFilterObjectTypes, // For _OBJECT + mFilterWearableTypes, + mFilterLinks, + mFilterCategoryTypes; // For _CATEGORY + LLUUID mFilterUUID; // for UUID + + time_t mMinDate, + mMaxDate; + U32 mHoursAgo; + + EFolderShow mShowFolderState; + PermissionMask mPermissions; + }; + + struct Params : public LLInitParam::Block<Params> + { + Optional<std::string> name; + Optional<FilterOps::Params> filter_ops; + Optional<std::string> substring; + Optional<bool> since_logoff; + + Params() + : name("name"), + filter_ops(""), + substring("substring"), + since_logoff("since_logoff") + {} + }; + + LLInventoryFilter(const Params& p = Params()); + LLInventoryFilter(const LLInventoryFilter& other) { *this = other; } + virtual ~LLInventoryFilter() {} // +-------------------------------------------------------------------+ // + Parameters // +-------------------------------------------------------------------+ - void setFilterObjectTypes(U64 types); U64 getFilterObjectTypes() const; U64 getFilterCategoryTypes() const; - BOOL isFilterObjectTypesWith(LLInventoryType::EType t) const; + U64 getFilterWearableTypes() const; + bool isFilterObjectTypesWith(LLInventoryType::EType t) const; + void setFilterObjectTypes(U64 types); void setFilterCategoryTypes(U64 types); void setFilterUUID(const LLUUID &object_id); void setFilterWearableTypes(U64 types); @@ -96,7 +165,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; + bool hasFilterString() const; void setFilterPermissions(PermissionMask perms); PermissionMask getFilterPermissions() const; @@ -115,43 +184,35 @@ public: // +-------------------------------------------------------------------+ // + Execution And Results // +-------------------------------------------------------------------+ - BOOL check(const LLFolderViewItem* item); + bool check(const LLFolderViewModelItem* listener); bool check(const LLInventoryItem* item); - bool checkFolder(const LLFolderViewFolder* folder) const; + bool checkFolder(const LLFolderViewModelItem* listener) const; bool checkFolder(const LLUUID& folder_id) const; - BOOL checkAgainstFilterType(const LLFolderViewItem* item) const; - bool checkAgainstFilterType(const LLInventoryItem* item) const; - BOOL checkAgainstPermissions(const LLFolderViewItem* item) const; - bool checkAgainstPermissions(const LLInventoryItem* item) const; - BOOL checkAgainstFilterLinks(const LLFolderViewItem* item) const; - bool checkAgainstClipboard(const LLUUID& object_id) const; - std::string::size_type getStringMatchOffset() const; + bool showAllResults() const; + std::string::size_type getStringMatchOffset(LLFolderViewModelItem* item) const; + std::string::size_type getFilterStringSize() const; // +-------------------------------------------------------------------+ // + Presentation // +-------------------------------------------------------------------+ void setShowFolderState( EFolderShow state); EFolderShow getShowFolderState() const; - void setSortOrder(U32 order); - U32 getSortOrder() const; - void setEmptyLookupMessage(const std::string& message); - const std::string& getEmptyLookupMessage() const; + std::string getEmptyLookupMessage() const; // +-------------------------------------------------------------------+ // + Status // +-------------------------------------------------------------------+ - BOOL isActive() const; - BOOL isModified() const; - BOOL isModifiedAndClear(); - BOOL isSinceLogoff() const; + bool isActive() const; + bool isModified() const; + bool isSinceLogoff() const; void clearModified(); - const std::string& getName() const; + const std::string& getName() const { return mName; } const std::string& getFilterText(); //RN: this is public to allow system to externally force a global refilter - void setModified(EFilterBehavior behavior = FILTER_RESTART); + void setModified(EFilterModified behavior = FILTER_RESTART); // +-------------------------------------------------------------------+ // + Count @@ -163,8 +224,8 @@ public: // +-------------------------------------------------------------------+ // + Default // +-------------------------------------------------------------------+ - BOOL isDefault() const; - BOOL isNotDefault() const; + bool isDefault() const; + bool isNotDefault() const; void markDefault(); void resetDefault(); @@ -172,57 +233,42 @@ public: // + Generation // +-------------------------------------------------------------------+ S32 getCurrentGeneration() const; - S32 getMinRequiredGeneration() const; - S32 getMustPassGeneration() const; + S32 getFirstSuccessGeneration() const; + S32 getFirstRequiredGeneration() const; + // +-------------------------------------------------------------------+ // + Conversion // +-------------------------------------------------------------------+ - void toLLSD(LLSD& data) const; - void fromLLSD(LLSD& data); + void toParams(Params& params) const; + void fromParams(const Params& p); + + LLInventoryFilter& operator =(const LLInventoryFilter& other); private: bool areDateLimitsSet(); - - struct FilterOps - { - FilterOps(); - U32 mFilterTypes; - - U64 mFilterObjectTypes; // For _OBJECT - U64 mFilterWearableTypes; - U64 mFilterCategoryTypes; // For _CATEGORY - LLUUID mFilterUUID; // for UUID - - time_t mMinDate; - time_t mMaxDate; - U32 mHoursAgo; - EFolderShow mShowFolderState; - PermissionMask mPermissions; - U64 mFilterLinks; - }; - - U32 mOrder; - U32 mLastLogoff; + bool checkAgainstFilterType(const class LLFolderViewModelItemInventory* listener) const; + bool checkAgainstFilterType(const LLInventoryItem* item) const; + bool checkAgainstPermissions(const class LLFolderViewModelItemInventory* listener) const; + bool checkAgainstPermissions(const LLInventoryItem* item) const; + bool checkAgainstFilterLinks(const class LLFolderViewModelItemInventory* listener) const; + bool checkAgainstClipboard(const LLUUID& object_id) const; FilterOps mFilterOps; FilterOps mDefaultFilterOps; - std::string::size_type mSubStringMatchOffset; std::string mFilterSubString; std::string mFilterSubStringOrig; const std::string mName; - S32 mFilterGeneration; - S32 mMustPassGeneration; - S32 mMinRequiredGeneration; + S32 mCurrentGeneration; + S32 mFirstRequiredGeneration; + S32 mFirstSuccessGeneration; S32 mNextFilterGeneration; S32 mFilterCount; - EFilterBehavior mFilterBehavior; + EFilterModified mFilterModified; - BOOL mModified; - BOOL mNeedTextRebuild; std::string mFilterText; std::string mEmptyLookupMessage; }; diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index ab5b082915..f1a4889f5a 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -45,7 +45,8 @@ // newview includes #include "llappearancemgr.h" #include "llappviewer.h" -//#include "llfirstuse.h" +#include "llclipboard.h" +#include "lldonotdisturbnotificationstorage.h" #include "llfloaterinventory.h" #include "llfloatersidepanelcontainer.h" #include "llfocusmgr.h" @@ -74,8 +75,10 @@ #include "llsidepanelinventory.h" #include "lltabcontainer.h" #include "lltooldraganddrop.h" +#include "lltrans.h" #include "lluictrlfactory.h" #include "llviewermessage.h" +#include "llviewerfoldertype.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" #include "llviewerwindow.h" @@ -440,7 +443,7 @@ void show_item_original(const LLUUID& item_uuid) //sidetray inventory panel LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); - bool reset_inventory_filter = !floater_inventory->isInVisibleChain(); + bool do_reset_inventory_filter = !floater_inventory->isInVisibleChain(); LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(); if (!active_panel) @@ -460,37 +463,49 @@ void show_item_original(const LLUUID& item_uuid) } active_panel->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_NO); - if(reset_inventory_filter) + if(do_reset_inventory_filter) { - //inventory floater - bool floater_inventory_visible = false; + reset_inventory_filter(); + } +} + + +void reset_inventory_filter() +{ + //inventory floater + bool floater_inventory_visible = false; - LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); - for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter) + LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); + for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter) + { + LLFloaterInventory* floater_inventory = dynamic_cast<LLFloaterInventory*>(*iter); + if (floater_inventory) { - LLFloaterInventory* floater_inventory = dynamic_cast<LLFloaterInventory*>(*iter); - if (floater_inventory) - { - LLPanelMainInventory* main_inventory = floater_inventory->getMainInventoryPanel(); + LLPanelMainInventory* main_inventory = floater_inventory->getMainInventoryPanel(); - main_inventory->onFilterEdit(""); + main_inventory->onFilterEdit(""); - if(floater_inventory->getVisible()) - { - floater_inventory_visible = true; - } + if(floater_inventory->getVisible()) + { + floater_inventory_visible = true; } } - if(sidepanel_inventory && !floater_inventory_visible) + } + + if(!floater_inventory_visible) + { + LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); + if (sidepanel_inventory) { LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); - - main_inventory->onFilterEdit(""); + if (main_inventory) + { + main_inventory->onFilterEdit(""); + } } } } - void open_outbox() { LLFloaterReg::showInstance("outbox"); @@ -947,8 +962,7 @@ void LLSaveFolderState::setApply(BOOL apply) void LLSaveFolderState::doFolder(LLFolderViewFolder* folder) { - LLMemType mt(LLMemType::MTYPE_INVENTORY_DO_FOLDER); - LLInvFVBridge* bridge = (LLInvFVBridge*)folder->getListener(); + LLInvFVBridge* bridge = (LLInvFVBridge*)folder->getViewModelItem(); if(!bridge) return; if(mApply) @@ -983,7 +997,7 @@ void LLSaveFolderState::doFolder(LLFolderViewFolder* folder) void LLOpenFilteredFolders::doItem(LLFolderViewItem *item) { - if (item->getFiltered()) + if (item->passedFilter()) { item->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); } @@ -991,12 +1005,12 @@ void LLOpenFilteredFolders::doItem(LLFolderViewItem *item) void LLOpenFilteredFolders::doFolder(LLFolderViewFolder* folder) { - if (folder->getFiltered() && folder->getParentFolder()) + if (folder->LLFolderViewItem::passedFilter() && folder->getParentFolder()) { folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); } // if this folder didn't pass the filter, and none of its descendants did - else if (!folder->getFiltered() && !folder->hasFilteredDescendants()) + else if (!folder->getViewModelItem()->passedFilter() && !folder->getViewModelItem()->descendantsPassedFilter()) { folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_NO); } @@ -1004,7 +1018,7 @@ void LLOpenFilteredFolders::doFolder(LLFolderViewFolder* folder) void LLSelectFirstFilteredItem::doItem(LLFolderViewItem *item) { - if (item->getFiltered() && !mItemSelected) + if (item->passedFilter() && !mItemSelected) { item->getRoot()->setSelection(item, FALSE, FALSE); if (item->getParentFolder()) @@ -1017,14 +1031,12 @@ void LLSelectFirstFilteredItem::doItem(LLFolderViewItem *item) void LLSelectFirstFilteredItem::doFolder(LLFolderViewFolder* folder) { - if (folder->getFiltered() && !mItemSelected) + // Skip if folder or item already found, if not filtered or if no parent (root folder is not selectable) + if (!mFolderSelected && !mItemSelected && folder->LLFolderViewItem::passedFilter() && folder->getParentFolder()) { folder->getRoot()->setSelection(folder, FALSE, FALSE); - if (folder->getParentFolder()) - { - folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); - } - mItemSelected = TRUE; + folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); + mFolderSelected = TRUE; } } @@ -1044,3 +1056,113 @@ void LLOpenFoldersWithSelection::doFolder(LLFolderViewFolder* folder) } } +void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action) +{ + if ("rename" == action) + { + root->startRenamingSelectedItem(); + return; + } + if ("delete" == action) + { + LLSD args; + args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem"); + LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root)); + return; + } + if (("copy" == action) || ("cut" == action)) + { + // Clear the clipboard before we start adding things on it + LLClipboard::instance().reset(); + } + + static const std::string change_folder_string = "change_folder_type_"; + if (action.length() > change_folder_string.length() && + (action.compare(0,change_folder_string.length(),"change_folder_type_") == 0)) + { + LLFolderType::EType new_folder_type = LLViewerFolderType::lookupTypeFromXUIName(action.substr(change_folder_string.length())); + LLFolderViewModelItemInventory* inventory_item = static_cast<LLFolderViewModelItemInventory*>(root->getViewModelItem()); + LLViewerInventoryCategory *cat = model->getCategory(inventory_item->getUUID()); + if (!cat) return; + cat->changeType(new_folder_type); + return; + } + + + std::set<LLFolderViewItem*> selected_items = root->getSelectionList(); + + LLMultiPreview* multi_previewp = NULL; + LLMultiProperties* multi_propertiesp = NULL; + + if (("task_open" == action || "open" == action) && selected_items.size() > 1) + { + multi_previewp = new LLMultiPreview(); + gFloaterView->addChild(multi_previewp); + + LLFloater::setFloaterHost(multi_previewp); + + } + else if (("task_properties" == action || "properties" == action) && selected_items.size() > 1) + { + multi_propertiesp = new LLMultiProperties(); + gFloaterView->addChild(multi_propertiesp); + + LLFloater::setFloaterHost(multi_propertiesp); + } + + std::set<LLFolderViewItem*>::iterator set_iter; + + for (set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter) + { + LLFolderViewItem* folder_item = *set_iter; + if(!folder_item) continue; + LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem(); + if(!bridge) continue; + bridge->performAction(model, action); + } + + LLFloater::setFloaterHost(NULL); + if (multi_previewp) + { + multi_previewp->openFloater(LLSD()); + } + else if (multi_propertiesp) + { + multi_propertiesp->openFloater(LLSD()); + } +} + +void LLInventoryAction::removeItemFromDND(LLFolderView* root) +{ + if(gAgent.isDoNotDisturb()) + { + //Get selected items + LLFolderView::selected_items_t selectedItems = root->getSelectedItems(); + LLFolderViewModelItemInventory * viewModel = NULL; + + //If user is in DND and deletes item, make sure the notification is not displayed by removing the notification + //from DND history and .xml file. Once this is done, upon exit of DND mode the item deleted will not show a notification. + for(LLFolderView::selected_items_t::iterator it = selectedItems.begin(); it != selectedItems.end(); ++it) + { + viewModel = dynamic_cast<LLFolderViewModelItemInventory *>((*it)->getViewModelItem()); + + if(viewModel && viewModel->getUUID().notNull()) + { + //Will remove the item offer notification + LLDoNotDisturbNotificationStorage::instance().removeNotification(LLDoNotDisturbNotificationStorage::offerName, viewModel->getUUID()); + } + } + } +} + +void LLInventoryAction::onItemsRemovalConfirmation( const LLSD& notification, const LLSD& response, LLFolderView* root ) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0) + { + //Need to remove item from DND before item is removed from root folder view + //because once removed from root folder view the item is no longer a selected item + removeItemFromDND(root); + root->removeSelectedItems(); + } +} diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 5cf9c528b0..f1066a4dc9 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -56,6 +56,7 @@ void show_item_profile(const LLUUID& item_uuid); void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id); void show_item_original(const LLUUID& item_uuid); +void reset_inventory_filter(); void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::string& new_name); @@ -418,21 +419,6 @@ public: class LLFolderViewItem; class LLFolderViewFolder; -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLFolderViewFunctor -// -// Simple abstract base class for applying a functor to folders and -// items in a folder view hierarchy. This is suboptimal for algorithms -// that only work folders or only work on items, but I'll worry about -// that later when it's determined to be too slow. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLFolderViewFunctor -{ -public: - virtual ~LLFolderViewFunctor() {} - virtual void doFolder(LLFolderViewFolder* folder) = 0; - virtual void doItem(LLFolderViewItem* item) = 0; -}; class LLInventoryState { @@ -442,49 +428,14 @@ public: static LLUUID sWearNewClothingTransactionID; // wear all clothing in this transaction }; -class LLSelectFirstFilteredItem : public LLFolderViewFunctor +struct LLInventoryAction { -public: - LLSelectFirstFilteredItem() : mItemSelected(FALSE) {} - virtual ~LLSelectFirstFilteredItem() {} - virtual void doFolder(LLFolderViewFolder* folder); - virtual void doItem(LLFolderViewItem* item); - BOOL wasItemSelected() { return mItemSelected; } -protected: - BOOL mItemSelected; -}; + static void doToSelected(class LLInventoryModel* model, class LLFolderView* root, const std::string& action); -class LLOpenFilteredFolders : public LLFolderViewFunctor -{ -public: - LLOpenFilteredFolders() {} - virtual ~LLOpenFilteredFolders() {} - virtual void doFolder(LLFolderViewFolder* folder); - virtual void doItem(LLFolderViewItem* item); + static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLFolderView* root); + static void removeItemFromDND(LLFolderView* root); }; -class LLSaveFolderState : public LLFolderViewFunctor -{ -public: - LLSaveFolderState() : mApply(FALSE) {} - virtual ~LLSaveFolderState() {} - virtual void doFolder(LLFolderViewFolder* folder); - virtual void doItem(LLFolderViewItem* item) {} - void setApply(BOOL apply); - void clearOpenFolders() { mOpenFolders.clear(); } -protected: - std::set<LLUUID> mOpenFolders; - BOOL mApply; -}; - -class LLOpenFoldersWithSelection : public LLFolderViewFunctor -{ -public: - LLOpenFoldersWithSelection() {} - virtual ~LLOpenFoldersWithSelection() {} - virtual void doFolder(LLFolderViewFolder* folder); - virtual void doItem(LLFolderViewItem* item); -}; #endif // LL_LLINVENTORYFUNCTIONS_H diff --git a/indra/newview/llinventoryicon.h b/indra/newview/llinventoryicon.h index c7e2998a20..5c8acf9e85 100644 --- a/indra/newview/llinventoryicon.h +++ b/indra/newview/llinventoryicon.h @@ -1,5 +1,5 @@ /** - * @file llinventoryfunctions.h + * @file llinventoryicon.h * @brief Miscellaneous inventory-related functions and classes * class definition * diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 6e23d7c701..e7d59d92d9 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -373,13 +373,12 @@ 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 preferred_type, - bool create_folder, - bool find_in_library) +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(); + const LLUUID &root_id = /*(find_in_library) ? gInventory.getLibraryRootFolderID() :*/ gInventory.getRootFolderID(); if(LLFolderType::FT_ROOT_INVENTORY == preferred_type) { rv = root_id; @@ -402,7 +401,44 @@ const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType prefe } } - if(rv.isNull() && isInventoryUsable() && (create_folder && !find_in_library)) + if(rv.isNull() && isInventoryUsable() && (create_folder && true/*!find_in_library*/)) + { + if(root_id.notNull()) + { + return createNewCategory(root_id, preferred_type, LLStringUtil::null); + } + } + return rv; +} + +const LLUUID LLInventoryModel::findLibraryCategoryUUIDForType(LLFolderType::EType preferred_type, bool create_folder) +{ + LLUUID rv = LLUUID::null; + + const LLUUID &root_id = gInventory.getLibraryRootFolderID(); + if(LLFolderType::FT_ROOT_INVENTORY == preferred_type) + { + rv = root_id; + } + else if (root_id.notNull()) + { + cat_array_t* cats = NULL; + cats = get_ptr_in_map(mParentChildCategoryTree, root_id); + if(cats) + { + S32 count = cats->count(); + for(S32 i = 0; i < count; ++i) + { + if(cats->get(i)->getPreferredType() == preferred_type) + { + rv = cats->get(i)->getUUID(); + break; + } + } + } + } + + if(rv.isNull() && isInventoryUsable() && (create_folder && true/*!find_in_library*/)) { if(root_id.notNull()) { @@ -950,6 +986,7 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat) cat_array->put(old_cat); } mask |= LLInventoryObserver::STRUCTURE; + mask |= LLInventoryObserver::INTERNAL; } if(old_cat->getName() != cat->getName()) { @@ -1245,14 +1282,33 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id) items, INCLUDE_TRASH); S32 count = items.count(); + + item_map_t::iterator item_map_end = mItemMap.end(); + cat_map_t::iterator cat_map_end = mCategoryMap.end(); + LLUUID uu_id; + for(S32 i = 0; i < count; ++i) { - deleteObject(items.get(i)->getUUID()); + uu_id = items.get(i)->getUUID(); + + // This check prevents the deletion of a previously deleted item. + // This is necessary because deletion is not done in a hierarchical + // order. The current item may have been already deleted as a child + // of its deleted parent. + if (mItemMap.find(uu_id) != item_map_end) + { + deleteObject(uu_id); + } } + count = categories.count(); for(S32 i = 0; i < count; ++i) { - deleteObject(categories.get(i)->getUUID()); + uu_id = categories.get(i)->getUUID(); + if (mCategoryMap.find(uu_id) != cat_map_end) + { + deleteObject(uu_id); + } } } } @@ -3239,68 +3295,7 @@ void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, c } } -//* @param[in] items vector of items in order to be saved. -void LLInventoryModel::saveItemsOrder(const LLInventoryModel::item_array_t& items) -{ - int sortField = 0; - - // current order is saved by setting incremental values (1, 2, 3, ...) for the sort field - for (item_array_t::const_iterator i = items.begin(); i != items.end(); ++i) - { - LLViewerInventoryItem* item = *i; - - item->setSortField(++sortField); - item->setComplete(TRUE); - item->updateServer(FALSE); - - updateItem(item); - - // Tell the parent folder to refresh its sort order. - addChangedMask(LLInventoryObserver::SORT, item->getParentUUID()); - } - - notifyObservers(); -} - -// See also LLInventorySort where landmarks in the Favorites folder are sorted. -class LLViewerInventoryItemSort -{ -public: - bool operator()(const LLPointer<LLViewerInventoryItem>& a, const LLPointer<LLViewerInventoryItem>& b) - { - return a->getSortField() < b->getSortField(); - } -}; -/** - * Sorts passed items by LLViewerInventoryItem sort field. - * - * @param[in, out] items - array of items, not sorted. - */ -static void rearrange_item_order_by_sort_field(LLInventoryModel::item_array_t& items) -{ - static LLViewerInventoryItemSort sort_functor; - 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; - LLInventoryModel::item_array_t items; - LLIsType is_type(LLAssetType::AT_LANDMARK); - LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - gInventory.collectDescendentsIf(favorites_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type); - - // ensure items are sorted properly before changing order. EXT-3498 - rearrange_item_order_by_sort_field(items); - - // update order - updateItemsOrder(items, source_item_id, target_item_id); - - saveItemsOrder(items); -} //---------------------------------------------------------------------------- diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 8382e875b4..503de627a0 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -231,11 +231,12 @@ 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" + // on the fly if one does not exist. const LLUUID findCategoryUUIDForType(LLFolderType::EType preferred_type, - bool create_folder = true, - bool find_in_library = false); + bool create_folder = true); + // will search in the user's library folder instead of "My Inventory" + const LLUUID findLibraryCategoryUUIDForType(LLFolderType::EType preferred_type, + bool create_folder = true); // Get whatever special folder this object is a child of, if any. const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const; @@ -362,15 +363,6 @@ public: // Returns end() of the vector if not found. static LLInventoryModel::item_array_t::iterator findItemIterByUUID(LLInventoryModel::item_array_t& items, const LLUUID& 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); - - // Rearranges Landmarks inside Favorites folder. - // Moves source landmark before target one. - void rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id); - //-------------------------------------------------------------------- // Creation //-------------------------------------------------------------------- diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 71dd963f28..fabcd50c7d 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -38,12 +38,15 @@ #include "llfloaterreg.h" #include "llfloatersidepanelcontainer.h" #include "llfolderview.h" -#include "llimfloater.h" +#include "llfolderviewitem.h" +#include "llfloaterimcontainer.h" #include "llimview.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" #include "llinventorymodelbackgroundfetch.h" +#include "llpreview.h" #include "llsidepanelinventory.h" +#include "lltrans.h" #include "llviewerattachmenu.h" #include "llviewerfoldertype.h" #include "llvoavatarself.h" @@ -53,8 +56,16 @@ static LLDefaultChildRegistry::Register<LLInventoryPanel> r("inventory_panel"); const std::string LLInventoryPanel::DEFAULT_SORT_ORDER = std::string("InventorySortOrder"); const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("RecentItemsSortOrder"); const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string(""); -static const LLInventoryFVBridgeBuilder INVENTORY_BRIDGE_BUILDER; +static const LLInventoryFolderViewModelBuilder INVENTORY_BRIDGE_BUILDER; +// statics +bool LLInventoryPanel::sColorSetInitialized = false; +LLUIColor LLInventoryPanel::sDefaultColor; +LLUIColor LLInventoryPanel::sDefaultHighlightColor; +LLUIColor LLInventoryPanel::sLibraryColor; +LLUIColor LLInventoryPanel::sLinkColor; + +const LLColor4U DEFAULT_WHITE(255, 255, 255); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInventoryPanelObserver @@ -134,78 +145,86 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mAllowMultiSelect(p.allow_multi_select), mShowItemLinkOverlays(p.show_item_link_overlays), mShowEmptyMessage(p.show_empty_message), - mShowLoadStatus(p.show_load_status), mViewsInitialized(false), mInvFVBridgeBuilder(NULL) { mInvFVBridgeBuilder = &INVENTORY_BRIDGE_BUILDER; - // contex menu callbacks + if (!sColorSetInitialized) + { + sDefaultColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + sDefaultHighlightColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE); + sLibraryColor = LLUIColorTable::instance().getColor("InventoryItemLibraryColor", DEFAULT_WHITE); + sLinkColor = LLUIColorTable::instance().getColor("InventoryItemLinkColor", DEFAULT_WHITE); + sColorSetInitialized = true; + } + + // context menu callbacks mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLInventoryPanel::doToSelected, this, _2)); mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH)); mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND)); mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLInventoryPanel::doCreate, this, _2)); mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2)); mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this)); - mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars)); + mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); } -void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params) +LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id ) { - // Determine the root folder in case specified, and - // build the views starting with that folder. - - std::string start_folder_name(params.start_folder()); - - const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(start_folder_name); - - LLUUID root_id; - - if ("LIBRARY" == params.start_folder()) - { - root_id = gInventory.getLibraryRootFolderID(); - } - else - { - root_id = (preferred_type != LLFolderType::FT_NONE) - ? gInventory.findCategoryUUIDForType(preferred_type, false, false) - : LLUUID::null; - } - - if ((root_id == LLUUID::null) && !start_folder_name.empty()) - { - llwarns << "No category found that matches start_folder: " << start_folder_name << llendl; - root_id = LLUUID::generateNewID(); - } - - LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY, + LLFolderView::Params p(mParams.folder_view); + p.name = getName(); + p.title = getLabel(); + p.rect = LLRect(0, 0, getRect().getWidth(), 0); + p.parent_panel = this; + p.tool_tip = p.name; + p.listener = mInvFVBridgeBuilder->createBridge( LLAssetType::AT_CATEGORY, LLAssetType::AT_CATEGORY, LLInventoryType::IT_CATEGORY, this, + &mInventoryViewModel, NULL, root_id); + p.view_model = &mInventoryViewModel; + p.use_label_suffix = mParams.use_label_suffix; + p.allow_multiselect = mAllowMultiSelect; + p.show_empty_message = mShowEmptyMessage; + p.show_item_link_overlays = mShowItemLinkOverlays; + p.root = NULL; + p.options_menu = "menu_inventory.xml"; - mFolderRoot = createFolderView(new_listener, params.use_label_suffix()); + return LLUICtrlFactory::create<LLFolderView>(p); } void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) { - LLMemType mt(LLMemType::MTYPE_INVENTORY_POST_BUILD); + // save off copy of params + mParams = params; + // Clear up the root view + // Note: This needs to be done *before* we build the new folder view + LLUUID root_id = getRootFolderID(); + if (mFolderRoot) + { + removeItemID(root_id); + mFolderRoot->destroyView(); + mFolderRoot = NULL; + } mCommitCallbackRegistrar.pushScope(); // registered as a widget; need to push callback scope ourselves + { + // Determine the root folder in case specified, and + // build the views starting with that folder. + mFolderRoot = createFolderRoot(root_id); - buildFolderView(params); - + addItemID(root_id, mFolderRoot); + } mCommitCallbackRegistrar.popScope(); - mFolderRoot->setCallbackRegistrar(&mCommitCallbackRegistrar); // Scroller - { LLRect scroller_view_rect = getRect(); scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); - LLScrollContainer::Params scroller_params(params.scroll()); + LLScrollContainer::Params scroller_params(mParams.scroll()); scroller_params.rect(scroller_view_rect); mScroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroller_params); addChild(mScroller); @@ -213,7 +232,6 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) mFolderRoot->setScrollContainer(mScroller); mFolderRoot->setFollowsAll(); mFolderRoot->addChild(mFolderRoot->mStatusTextBox); - } // Set up the callbacks from the inventory we're viewing, and then build everything. mInventoryObserver = new LLInventoryPanelObserver(this); @@ -228,6 +246,7 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) { initializeViews(); } + gIdleCallbacks.addFunction(onIdle, (void*)this); if (mSortOrderSetting != INHERIT_SORT_ORDER) @@ -240,32 +259,31 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) } // hide inbox - getFilter()->setFilterCategoryTypes(getFilter()->getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_INBOX)); - getFilter()->setFilterCategoryTypes(getFilter()->getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_OUTBOX)); + getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_INBOX)); + getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_OUTBOX)); // set the filter for the empty folder if the debug setting is on if (gSavedSettings.getBOOL("DebugHideEmptySystemFolders")) { - getFilter()->setFilterEmptySystemFolders(); + getFilter().setFilterEmptySystemFolders(); } // keep track of the clipboard state so that we avoid filtering too much mClipboardState = LLClipboard::instance().getGeneration(); // Initialize base class params. - LLPanel::initFromParams(params); + LLPanel::initFromParams(mParams); } LLInventoryPanel::~LLInventoryPanel() { - if (mFolderRoot) - { - U32 sort_order = mFolderRoot->getSortOrder(); + gIdleCallbacks.deleteFunction(idle, this); + + U32 sort_order = getFolderViewModel()->getSorter().getSortOrder(); if (mSortOrderSetting != INHERIT_SORT_ORDER) { gSavedSettings.setU32(mSortOrderSetting, sort_order); } - } gIdleCallbacks.deleteFunction(onIdle, this); @@ -281,82 +299,68 @@ LLInventoryPanel::~LLInventoryPanel() void LLInventoryPanel::draw() { // Select the desired item (in case it wasn't loaded when the selection was requested) - mFolderRoot->updateSelection(); - - // Nudge the filter if the clipboard state changed - if (mClipboardState != LLClipboard::instance().getGeneration()) - { - mClipboardState = LLClipboard::instance().getGeneration(); - getFilter()->setModified(LLClipboard::instance().isCutMode() ? LLInventoryFilter::FILTER_MORE_RESTRICTIVE : LLInventoryFilter::FILTER_LESS_RESTRICTIVE); - } + updateSelection(); LLPanel::draw(); } -LLInventoryFilter* LLInventoryPanel::getFilter() +const LLInventoryFilter& LLInventoryPanel::getFilter() const { - if (mFolderRoot) - { - return mFolderRoot->getFilter(); - } - return NULL; + return getFolderViewModel()->getFilter(); } -const LLInventoryFilter* LLInventoryPanel::getFilter() const +LLInventoryFilter& LLInventoryPanel::getFilter() { - if (mFolderRoot) - { - return mFolderRoot->getFilter(); - } - return NULL; + return getFolderViewModel()->getFilter(); } void LLInventoryPanel::setFilterTypes(U64 types, LLInventoryFilter::EFilterType filter_type) { if (filter_type == LLInventoryFilter::FILTERTYPE_OBJECT) - getFilter()->setFilterObjectTypes(types); + getFilter().setFilterObjectTypes(types); if (filter_type == LLInventoryFilter::FILTERTYPE_CATEGORY) - getFilter()->setFilterCategoryTypes(types); + getFilter().setFilterCategoryTypes(types); } U32 LLInventoryPanel::getFilterObjectTypes() const { - return mFolderRoot->getFilterObjectTypes(); + return getFilter().getFilterObjectTypes(); } U32 LLInventoryPanel::getFilterPermMask() const { - return mFolderRoot->getFilterPermissions(); + return getFilter().getFilterPermissions(); } void LLInventoryPanel::setFilterPermMask(PermissionMask filter_perm_mask) { - getFilter()->setFilterPermissions(filter_perm_mask); + getFilter().setFilterPermissions(filter_perm_mask); } void LLInventoryPanel::setFilterWearableTypes(U64 types) { - getFilter()->setFilterWearableTypes(types); + getFilter().setFilterWearableTypes(types); } void LLInventoryPanel::setFilterSubString(const std::string& string) { - getFilter()->setFilterSubString(string); + getFilter().setFilterSubString(string); } const std::string LLInventoryPanel::getFilterSubString() { - return mFolderRoot->getFilterSubString(); + return getFilter().getFilterSubString(); } void LLInventoryPanel::setSortOrder(U32 order) { - getFilter()->setSortOrder(order); - if (getFilter()->isModified()) + LLInventorySort sorter(order); + if (order != getFolderViewModel()->getSorter().getSortOrder()) { - mFolderRoot->setSortOrder(order); + getFolderViewModel()->setSorter(sorter); + mFolderRoot->arrangeAll(); // try to keep selection onscreen, even if it wasn't to start with mFolderRoot->scrollToShowSelection(); } @@ -364,37 +368,32 @@ void LLInventoryPanel::setSortOrder(U32 order) U32 LLInventoryPanel::getSortOrder() const { - return mFolderRoot->getSortOrder(); -} - -void LLInventoryPanel::requestSort() -{ - mFolderRoot->requestSort(); + return getFolderViewModel()->getSorter().getSortOrder(); } void LLInventoryPanel::setSinceLogoff(BOOL sl) { - getFilter()->setDateRangeLastLogoff(sl); + getFilter().setDateRangeLastLogoff(sl); } void LLInventoryPanel::setHoursAgo(U32 hours) { - getFilter()->setHoursAgo(hours); + getFilter().setHoursAgo(hours); } void LLInventoryPanel::setFilterLinks(U64 filter_links) { - getFilter()->setFilterLinks(filter_links); + getFilter().setFilterLinks(filter_links); } void LLInventoryPanel::setShowFolderState(LLInventoryFilter::EFolderShow show) { - getFilter()->setShowFolderState(show); + getFilter().setShowFolderState(show); } LLInventoryFilter::EFolderShow LLInventoryPanel::getShowFolderState() { - return getFilter()->getShowFolderState(); + return getFilter().getShowFolderState(); } void LLInventoryPanel::modelChanged(U32 mask) @@ -418,11 +417,20 @@ void LLInventoryPanel::modelChanged(U32 mask) { const LLUUID& item_id = (*items_iter); const LLInventoryObject* model_item = model->getObject(item_id); - LLFolderViewItem* view_item = mFolderRoot->getItemByID(item_id); + LLFolderViewItem* view_item = getItemByID(item_id); + LLFolderViewModelItemInventory* viewmodel_item = + static_cast<LLFolderViewModelItemInventory*>(view_item ? view_item->getViewModelItem() : NULL); // LLFolderViewFolder is derived from LLFolderViewItem so dynamic_cast from item // to folder is the fast way to get a folder without searching through folders tree. - LLFolderViewFolder* view_folder = dynamic_cast<LLFolderViewFolder*>(view_item); + LLFolderViewFolder* view_folder = NULL; + + // Check requires as this item might have already been deleted + // as a child of its deleted parent. + if (model_item && view_item) + { + view_folder = dynamic_cast<LLFolderViewFolder*>(view_item); + } ////////////////////////////// // LABEL Operation @@ -433,7 +441,7 @@ void LLInventoryPanel::modelChanged(U32 mask) if (view_item) { // Request refresh on this item (also flags for filtering) - LLInvFVBridge* bridge = (LLInvFVBridge*)view_item->getListener(); + LLInvFVBridge* bridge = (LLInvFVBridge*)view_item->getViewModelItem(); if(bridge) { // Clear the display name first, so it gets properly re-built during refresh() bridge->clearDisplayName(); @@ -449,11 +457,15 @@ void LLInventoryPanel::modelChanged(U32 mask) if (mask & LLInventoryObserver::REBUILD) { handled = true; - if (model_item && view_item) + if (model_item && view_item && viewmodel_item) { + const LLUUID& idp = viewmodel_item->getUUID(); view_item->destroyView(); + removeItemID(idp); } view_item = buildNewViews(item_id); + viewmodel_item = + static_cast<LLFolderViewModelItemInventory*>(view_item ? view_item->getViewModelItem() : NULL); view_folder = dynamic_cast<LLFolderViewFolder *>(view_item); } @@ -475,7 +487,7 @@ void LLInventoryPanel::modelChanged(U32 mask) { if (view_folder) { - view_folder->requestSort(); + view_folder->getViewModelItem()->requestSort(); } } @@ -510,20 +522,24 @@ void LLInventoryPanel::modelChanged(U32 mask) else if (model_item && view_item) { // Don't process the item if it is the root - if (view_item->getRoot() != view_item) + if (view_item->getParentFolder()) { - LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolderRoot->getItemByID(model_item->getParentUUID()); + LLFolderViewFolder* new_parent = (LLFolderViewFolder*)getItemByID(model_item->getParentUUID()); // Item has been moved. if (view_item->getParentFolder() != new_parent) { if (new_parent != NULL) { // Item is to be moved and we found its new parent in the panel's directory, so move the item's UI. - view_item->getParentFolder()->extractItem(view_item); - view_item->addToFolder(new_parent, mFolderRoot); + view_item->addToFolder(new_parent); + addItemID(viewmodel_item->getUUID(), view_item); } else { + // Remove the item ID before destroying the view because the view-model-item gets + // destroyed when the view is destroyed + removeItemID(viewmodel_item->getUUID()); + // Item is to be moved outside the panel's directory (e.g. moved to trash for a panel that // doesn't include trash). Just remove the item's UI. view_item->destroyView(); @@ -535,9 +551,10 @@ void LLInventoryPanel::modelChanged(U32 mask) ////////////////////////////// // REMOVE Operation // This item has been removed from memory, but its associated UI element still exists. - else if (!model_item && view_item) + else if (!model_item && view_item && viewmodel_item) { // Remove the item's UI. + removeItemID(viewmodel_item->getUUID()); view_item->destroyView(); } } @@ -549,6 +566,43 @@ LLFolderView* LLInventoryPanel::getRootFolder() return mFolderRoot; } +LLUUID LLInventoryPanel::getRootFolderID() +{ + if (mFolderRoot && mFolderRoot->getViewModelItem()) + { + return static_cast<LLFolderViewModelItemInventory*>(mFolderRoot->getViewModelItem())->getUUID(); + + } + else + { + LLUUID root_id; + if (mParams.start_folder.id.isChosen()) + { + root_id = mParams.start_folder.id; + } + else + { + const LLFolderType::EType preferred_type = mParams.start_folder.type.isChosen() + ? mParams.start_folder.type + : LLViewerFolderType::lookupTypeFromNewCategoryName(mParams.start_folder.name); + + if ("LIBRARY" == mParams.start_folder.name()) + { + root_id = gInventory.getLibraryRootFolderID(); + } + else if (preferred_type != LLFolderType::FT_NONE) + { + root_id = gInventory.findCategoryUUIDForType(preferred_type, false); + if (root_id.isNull()) + { + llwarns << "Could not find folder of type " << preferred_type << llendl; + root_id.generateNewID(); + } + } + } + return root_id; + } +} // static void LLInventoryPanel::onIdle(void *userdata) @@ -568,16 +622,73 @@ void LLInventoryPanel::onIdle(void *userdata) } } -const LLUUID& LLInventoryPanel::getRootFolderID() const +struct DirtyFilterFunctor : public LLFolderViewFunctor +{ + /*virtual*/ void doFolder(LLFolderViewFolder* folder) + { + folder->getViewModelItem()->dirtyFilter(); + } + /*virtual*/ void doItem(LLFolderViewItem* item) + { + item->getViewModelItem()->dirtyFilter(); + } +}; + +void LLInventoryPanel::idle(void* user_data) { - return mFolderRoot->getListener()->getUUID(); + LLInventoryPanel* panel = (LLInventoryPanel*)user_data; + // Nudge the filter if the clipboard state changed + if (panel->mClipboardState != LLClipboard::instance().getGeneration()) + { + panel->mClipboardState = LLClipboard::instance().getGeneration(); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + LLFolderViewFolder* trash_folder = panel->getFolderByID(trash_id); + if (trash_folder) + { + DirtyFilterFunctor dirtyFilterFunctor; + trash_folder->applyFunctorToChildren(dirtyFilterFunctor); + } + + } + + panel->mFolderRoot->update(); + // while dragging, update selection rendering to reflect single/multi drag status + if (LLToolDragAndDrop::getInstance()->hasMouseCapture()) + { + EAcceptance last_accept = LLToolDragAndDrop::getInstance()->getLastAccept(); + if (last_accept == ACCEPT_YES_SINGLE || last_accept == ACCEPT_YES_COPY_SINGLE) + { + panel->mFolderRoot->setShowSingleSelection(TRUE); + } + else + { + panel->mFolderRoot->setShowSingleSelection(FALSE); + } +} + else + { + panel->mFolderRoot->setShowSingleSelection(FALSE); + } } + void LLInventoryPanel::initializeViews() { if (!gInventory.isInventoryUsable()) return; - rebuildViewsFor(getRootFolderID()); + LLUUID root_id = getRootFolderID(); + if (root_id.notNull()) + { + buildNewViews(getRootFolderID()); + } + else + { + // Default case: always add "My Inventory" first, "Library" second + buildNewViews(gInventory.getRootFolderID()); // My Inventory + buildNewViews(gInventory.getLibraryRootFolderID()); // Library + } + + gIdleCallbacks.addFunction(idle, this); mViewsInitialized = true; @@ -587,14 +698,14 @@ void LLInventoryPanel::initializeViews() if (gAgent.isFirstLogin()) { // Auto open the user's library - LLFolderViewFolder* lib_folder = mFolderRoot->getFolderByID(gInventory.getLibraryRootFolderID()); + LLFolderViewFolder* lib_folder = getFolderByID(gInventory.getLibraryRootFolderID()); if (lib_folder) { lib_folder->setOpen(TRUE); } // Auto close the user's my inventory folder - LLFolderViewFolder* my_inv_folder = mFolderRoot->getFolderByID(gInventory.getRootFolderID()); + LLFolderViewFolder* my_inv_folder = getFolderByID(gInventory.getRootFolderID()); if (my_inv_folder) { my_inv_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN); @@ -602,79 +713,35 @@ void LLInventoryPanel::initializeViews() } } -LLFolderViewItem* LLInventoryPanel::rebuildViewsFor(const LLUUID& id) -{ - // Destroy the old view for this ID so we can rebuild it. - LLFolderViewItem* old_view = mFolderRoot->getItemByID(id); - if (old_view) - { - old_view->destroyView(); - } - - return buildNewViews(id); -} - -LLFolderView * LLInventoryPanel::createFolderView(LLInvFVBridge * bridge, bool useLabelSuffix) -{ - LLRect folder_rect(0, - 0, - getRect().getWidth(), - 0); - - LLFolderView::Params p; - - p.name = getName(); - p.title = getLabel(); - p.rect = folder_rect; - p.parent_panel = this; - p.tool_tip = p.name; - p.listener = bridge; - p.use_label_suffix = useLabelSuffix; - p.allow_multiselect = mAllowMultiSelect; - p.show_empty_message = mShowEmptyMessage; - p.show_load_status = mShowLoadStatus; - - return LLUICtrlFactory::create<LLFolderView>(p); -} LLFolderViewFolder * LLInventoryPanel::createFolderViewFolder(LLInvFVBridge * bridge) { - LLFolderViewFolder::Params params; + LLFolderViewFolder::Params params(mParams.folder); params.name = bridge->getDisplayName(); - params.icon = bridge->getIcon(); - params.icon_open = bridge->getOpenIcon(); - - if (mShowItemLinkOverlays) // if false, then links show up just like normal items - { - params.icon_overlay = LLUI::getUIImage("Inv_Link"); - } - params.root = mFolderRoot; params.listener = bridge; params.tool_tip = params.name; + params.font_color = (bridge->isLibraryItem() ? sLibraryColor : (bridge->isLink() ? sLinkColor : sDefaultColor)); + params.font_highlight_color = (bridge->isLibraryItem() ? sLibraryColor : (bridge->isLink() ? sLinkColor : sDefaultHighlightColor)); + return LLUICtrlFactory::create<LLFolderViewFolder>(params); } LLFolderViewItem * LLInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge) { - LLFolderViewItem::Params params; + LLFolderViewItem::Params params(mParams.item); params.name = bridge->getDisplayName(); - params.icon = bridge->getIcon(); - params.icon_open = bridge->getOpenIcon(); - - if (mShowItemLinkOverlays) // if false, then links show up just like normal items - { - params.icon_overlay = LLUI::getUIImage("Inv_Link"); - } - params.creation_date = bridge->getCreationDate(); params.root = mFolderRoot; params.listener = bridge; params.rect = LLRect (0, 0, 0, 0); params.tool_tip = params.name; + + params.font_color = (bridge->isLibraryItem() ? sLibraryColor : (bridge->isLink() ? sLinkColor : sDefaultColor)); + params.font_highlight_color = (bridge->isLibraryItem() ? sLibraryColor : (bridge->isLink() ? sLinkColor : sDefaultHighlightColor)); return LLUICtrlFactory::create<LLFolderViewItem>(params); } @@ -682,20 +749,15 @@ LLFolderViewItem * LLInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) { LLInventoryObject const* objectp = gInventory.getObject(id); - LLUUID root_id = mFolderRoot->getListener()->getUUID(); - LLFolderViewFolder* parent_folder = NULL; - LLFolderViewItem* itemp = NULL; - if (id == root_id) - { - parent_folder = mFolderRoot; - } - else if (objectp) - { + if (!objectp) return NULL; + + LLFolderViewItem* folder_view_item = getItemByID(id); + const LLUUID &parent_id = objectp->getParentUUID(); - parent_folder = (LLFolderViewFolder*)mFolderRoot->getItemByID(parent_id); + LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)getItemByID(parent_id); - if (parent_folder) + if (!folder_view_item && parent_folder) { if (objectp->getType() <= LLAssetType::AT_NONE || objectp->getType() >= LLAssetType::AT_COUNT) @@ -713,16 +775,12 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) objectp->getType(), LLInventoryType::IT_CATEGORY, this, + &mInventoryViewModel, mFolderRoot, objectp->getUUID()); if (new_listener) { - LLFolderViewFolder* folderp = createFolderViewFolder(new_listener); - if (folderp) - { - folderp->setItemSortOrder(mFolderRoot->getSortOrder()); - } - itemp = folderp; + folder_view_item = createFolderViewFolder(new_listener); } } else @@ -733,28 +791,28 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) item->getActualType(), item->getInventoryType(), this, + &mInventoryViewModel, mFolderRoot, item->getUUID(), item->getFlags()); if (new_listener) { - itemp = createFolderViewItem(new_listener); + folder_view_item = createFolderViewItem(new_listener); } } - if (itemp) + if (folder_view_item) { - itemp->addToFolder(parent_folder, mFolderRoot); - } + llassert(parent_folder != NULL); + folder_view_item->addToFolder(parent_folder); + addItemID(id, folder_view_item); } } // If this is a folder, add the children of the folder and recursively add any // child folders. - if (id.isNull() - || (objectp - && objectp->getType() == LLAssetType::AT_CATEGORY)) + if (folder_view_item && objectp->getType() == LLAssetType::AT_CATEGORY) { LLViewerInventoryCategory::cat_array_t* categories; LLViewerInventoryItem::item_array_t* items; @@ -771,7 +829,7 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) } } - if(items && parent_folder) + if(items) { for (LLViewerInventoryItem::item_array_t::const_iterator item_iter = items->begin(); item_iter != items->end(); @@ -784,7 +842,7 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) mInventory->unlockDirectDescendentArrays(id); } - return itemp; + return folder_view_item; } // bit of a hack to make sure the inventory is open. @@ -795,8 +853,8 @@ void LLInventoryPanel::openStartFolderOrMyInventory() { LLFolderViewFolder *fchild = dynamic_cast<LLFolderViewFolder*>(child); if (fchild - && fchild->getListener() - && fchild->getListener()->getUUID() == gInventory.getRootFolderID()) + && fchild->getViewModelItem() + && fchild->getViewModelItem()->getName() == "My Inventory") { fchild->setOpen(TRUE); break; @@ -813,7 +871,7 @@ void LLInventoryPanel::openSelected() { LLFolderViewItem* folder_item = mFolderRoot->getCurSelectedItem(); if(!folder_item) return; - LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getListener(); + LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem(); if(!bridge) return; bridge->openItem(); } @@ -917,7 +975,7 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_foc { return; } - mFolderRoot->setSelectionByID(obj_id, take_keyboard_focus); + setSelectionByID(obj_id, take_keyboard_focus); } void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb) @@ -930,7 +988,7 @@ void LLInventoryPanel::setSelectCallback(const boost::function<void (const std:: void LLInventoryPanel::clearSelection() { - mFolderRoot->clearSelection(); + mSelectThisID.setNull(); } void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& items, BOOL user_action) @@ -939,7 +997,7 @@ void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& it mCompletionObserver->reset(); for (std::deque<LLFolderViewItem*>::const_iterator it = items.begin(); it != items.end(); ++it) { - LLUUID id = (*it)->getListener()->getUUID(); + LLUUID id = static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID(); LLViewerInventoryItem* inv_item = mInventory->getItem(id); if (inv_item && !inv_item->isFinished()) @@ -959,40 +1017,34 @@ void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& it } } -void LLInventoryPanel::doToSelected(const LLSD& userdata) -{ - mFolderRoot->doToSelected(&gInventory, userdata); -} - void LLInventoryPanel::doCreate(const LLSD& userdata) { - menu_create_inventory_item(mFolderRoot, LLFolderBridge::sSelf.get(), userdata); + reset_inventory_filter(); + menu_create_inventory_item(this, LLFolderBridge::sSelf.get(), userdata); } bool LLInventoryPanel::beginIMSession() { - std::set<LLUUID> selected_items = mFolderRoot->getSelectionList(); + std::set<LLFolderViewItem*> selected_items = mFolderRoot->getSelectionList(); std::string name; - static int session_num = 1; LLDynamicArray<LLUUID> members; EInstantMessage type = IM_SESSION_CONFERENCE_START; - std::set<LLUUID>::const_iterator iter; + std::set<LLFolderViewItem*>::const_iterator iter; for (iter = selected_items.begin(); iter != selected_items.end(); iter++) { - LLUUID item = *iter; - LLFolderViewItem* folder_item = mFolderRoot->getItemByID(item); + LLFolderViewItem* folder_item = (*iter); if(folder_item) { - LLFolderViewEventListener* fve_listener = folder_item->getListener(); + LLFolderViewModelItemInventory* fve_listener = static_cast<LLFolderViewModelItemInventory*>(folder_item->getViewModelItem()); if (fve_listener && (fve_listener->getInventoryType() == LLInventoryType::IT_CATEGORY)) { - LLFolderBridge* bridge = (LLFolderBridge*)folder_item->getListener(); + LLFolderBridge* bridge = (LLFolderBridge*)folder_item->getViewModelItem(); if(!bridge) return true; LLViewerInventoryCategory* cat = bridge->getCategory(); if(!cat) return true; @@ -1026,9 +1078,7 @@ bool LLInventoryPanel::beginIMSession() } else { - LLFolderViewItem* folder_item = mFolderRoot->getItemByID(item); - if(!folder_item) return true; - LLInvFVBridge* listenerp = (LLInvFVBridge*)folder_item->getListener(); + LLInvFVBridge* listenerp = (LLInvFVBridge*)folder_item->getViewModelItem(); if (listenerp->getInventoryType() == LLInventoryType::IT_CALLINGCARD) { @@ -1054,13 +1104,13 @@ bool LLInventoryPanel::beginIMSession() if (name.empty()) { - name = llformat("Session %d", session_num++); + name = LLTrans::getString("conference-title"); } LLUUID session_id = gIMMgr->addSession(name, type, members[0], members); if (session_id != LLUUID::null) { - LLIMFloater::show(session_id); + LLFloaterIMContainer::getInstance()->showConversation(session_id); } return true; @@ -1069,13 +1119,13 @@ bool LLInventoryPanel::beginIMSession() bool LLInventoryPanel::attachObject(const LLSD& userdata) { // Copy selected item UUIDs to a vector. - std::set<LLUUID> selected_items = mFolderRoot->getSelectionList(); + std::set<LLFolderViewItem*> selected_items = mFolderRoot->getSelectionList(); uuid_vec_t items; - for (std::set<LLUUID>::const_iterator set_iter = selected_items.begin(); + for (std::set<LLFolderViewItem*>::const_iterator set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter) { - items.push_back(*set_iter); + items.push_back(static_cast<LLFolderViewModelItemInventory*>((*set_iter)->getViewModelItem())->getUUID()); } // Attach selected items. @@ -1088,7 +1138,7 @@ bool LLInventoryPanel::attachObject(const LLSD& userdata) BOOL LLInventoryPanel::getSinceLogoff() { - return getFilter()->isSinceLogoff(); + return getFilter().isSinceLogoff(); } // DEBUG ONLY @@ -1214,14 +1264,150 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L void LLInventoryPanel::addHideFolderType(LLFolderType::EType folder_type) { - getFilter()->setFilterCategoryTypes(getFilter()->getFilterCategoryTypes() & ~(1ULL << folder_type)); + getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() & ~(1ULL << folder_type)); } BOOL LLInventoryPanel::getIsHiddenFolderType(LLFolderType::EType folder_type) const { - return !(getFilter()->getFilterCategoryTypes() & (1ULL << folder_type)); + return !(getFilter().getFilterCategoryTypes() & (1ULL << folder_type)); } +void LLInventoryPanel::addItemID( const LLUUID& id, LLFolderViewItem* itemp ) +{ + mItemMap[id] = itemp; +} + +void LLInventoryPanel::removeItemID(const LLUUID& id) +{ + LLInventoryModel::cat_array_t categories; + LLInventoryModel::item_array_t items; + gInventory.collectDescendents(id, categories, items, TRUE); + + mItemMap.erase(id); + + for (LLInventoryModel::cat_array_t::iterator it = categories.begin(), end_it = categories.end(); + it != end_it; + ++it) + { + mItemMap.erase((*it)->getUUID()); +} + + for (LLInventoryModel::item_array_t::iterator it = items.begin(), end_it = items.end(); + it != end_it; + ++it) + { + mItemMap.erase((*it)->getUUID()); + } +} + +LLFastTimer::DeclareTimer FTM_GET_ITEM_BY_ID("Get FolderViewItem by ID"); +LLFolderViewItem* LLInventoryPanel::getItemByID(const LLUUID& id) +{ + LLFastTimer _(FTM_GET_ITEM_BY_ID); + + std::map<LLUUID, LLFolderViewItem*>::iterator map_it; + map_it = mItemMap.find(id); + if (map_it != mItemMap.end()) + { + return map_it->second; + } + + return NULL; +} + +LLFolderViewFolder* LLInventoryPanel::getFolderByID(const LLUUID& id) +{ + LLFolderViewItem* item = getItemByID(id); + return dynamic_cast<LLFolderViewFolder*>(item); +} + + +void LLInventoryPanel::setSelectionByID( const LLUUID& obj_id, BOOL take_keyboard_focus ) +{ + LLFolderViewItem* itemp = getItemByID(obj_id); + if(itemp && itemp->getViewModelItem()) + { + itemp->arrangeAndSet(TRUE, take_keyboard_focus); + mSelectThisID.setNull(); + return; + } + else + { + // save the desired item to be selected later (if/when ready) + mSelectThisID = obj_id; + } +} + +void LLInventoryPanel::updateSelection() +{ + if (mSelectThisID.notNull()) + { + setSelectionByID(mSelectThisID, false); + } +} + +void LLInventoryPanel::doToSelected(const LLSD& userdata) +{ + LLInventoryAction::doToSelected(mInventory, mFolderRoot, userdata.asString()); + + return; +} + +BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) +{ + BOOL handled = FALSE; + switch (key) + { + case KEY_RETURN: + // Open selected items if enter key hit on the inventory panel + if (mask == MASK_NONE) + { + LLInventoryAction::doToSelected(mInventory, mFolderRoot, "open"); + handled = TRUE; + } + break; + case KEY_DELETE: + case KEY_BACKSPACE: + // Delete selected items if delete or backspace key hit on the inventory panel + // Note: on Mac laptop keyboards, backspace and delete are one and the same + if (isSelectionRemovable() && (mask == MASK_NONE)) + { + LLInventoryAction::doToSelected(mInventory, mFolderRoot, "delete"); + handled = TRUE; + } + break; + } + return handled; +} + +bool LLInventoryPanel::isSelectionRemovable() +{ + bool can_delete = false; + if (mFolderRoot) + { + std::set<LLFolderViewItem*> selection_set = mFolderRoot->getSelectionList(); + if (!selection_set.empty()) + { + can_delete = true; + for (std::set<LLFolderViewItem*>::iterator iter = selection_set.begin(); + iter != selection_set.end(); + ++iter) + { + LLFolderViewItem *item = *iter; + const LLFolderViewModelItemInventory *listener = static_cast<const LLFolderViewModelItemInventory*>(item->getViewModelItem()); + if (!listener) + { + can_delete = false; + } + else + { + can_delete &= listener->isItemRemovable() && !listener->isItemInTrash(); + } + } + } + } + return can_delete; +} /************************************************************************/ /* Recent Inventory Panel related class */ @@ -1240,7 +1426,7 @@ public: { LLInventoryPanel::initFromParams(p); // turn on inbox for recent items - getFilter()->setFilterCategoryTypes(getFilter()->getFilterCategoryTypes() | (1ULL << LLFolderType::FT_INBOX)); + getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() | (1ULL << LLFolderType::FT_INBOX)); } protected: @@ -1255,3 +1441,34 @@ LLInventoryRecentItemsPanel::LLInventoryRecentItemsPanel( const Params& params) mInvFVBridgeBuilder = &RECENT_ITEMS_BUILDER; } +namespace LLInitParam +{ + void TypeValues<LLFolderType::EType>::declareValues() + { + declare(LLFolderType::lookup(LLFolderType::FT_TEXTURE) , LLFolderType::FT_TEXTURE); + declare(LLFolderType::lookup(LLFolderType::FT_SOUND) , LLFolderType::FT_SOUND); + declare(LLFolderType::lookup(LLFolderType::FT_CALLINGCARD) , LLFolderType::FT_CALLINGCARD); + declare(LLFolderType::lookup(LLFolderType::FT_LANDMARK) , LLFolderType::FT_LANDMARK); + declare(LLFolderType::lookup(LLFolderType::FT_CLOTHING) , LLFolderType::FT_CLOTHING); + declare(LLFolderType::lookup(LLFolderType::FT_OBJECT) , LLFolderType::FT_OBJECT); + declare(LLFolderType::lookup(LLFolderType::FT_NOTECARD) , LLFolderType::FT_NOTECARD); + declare(LLFolderType::lookup(LLFolderType::FT_ROOT_INVENTORY) , LLFolderType::FT_ROOT_INVENTORY); + declare(LLFolderType::lookup(LLFolderType::FT_LSL_TEXT) , LLFolderType::FT_LSL_TEXT); + declare(LLFolderType::lookup(LLFolderType::FT_BODYPART) , LLFolderType::FT_BODYPART); + declare(LLFolderType::lookup(LLFolderType::FT_TRASH) , LLFolderType::FT_TRASH); + declare(LLFolderType::lookup(LLFolderType::FT_SNAPSHOT_CATEGORY), LLFolderType::FT_SNAPSHOT_CATEGORY); + declare(LLFolderType::lookup(LLFolderType::FT_LOST_AND_FOUND) , LLFolderType::FT_LOST_AND_FOUND); + declare(LLFolderType::lookup(LLFolderType::FT_ANIMATION) , LLFolderType::FT_ANIMATION); + declare(LLFolderType::lookup(LLFolderType::FT_GESTURE) , LLFolderType::FT_GESTURE); + declare(LLFolderType::lookup(LLFolderType::FT_FAVORITE) , LLFolderType::FT_FAVORITE); + declare(LLFolderType::lookup(LLFolderType::FT_ENSEMBLE_START) , LLFolderType::FT_ENSEMBLE_START); + declare(LLFolderType::lookup(LLFolderType::FT_ENSEMBLE_END) , LLFolderType::FT_ENSEMBLE_END); + declare(LLFolderType::lookup(LLFolderType::FT_CURRENT_OUTFIT) , LLFolderType::FT_CURRENT_OUTFIT); + declare(LLFolderType::lookup(LLFolderType::FT_OUTFIT) , LLFolderType::FT_OUTFIT); + declare(LLFolderType::lookup(LLFolderType::FT_MY_OUTFITS) , LLFolderType::FT_MY_OUTFITS); + declare(LLFolderType::lookup(LLFolderType::FT_MESH ) , LLFolderType::FT_MESH ); + declare(LLFolderType::lookup(LLFolderType::FT_INBOX) , LLFolderType::FT_INBOX); + declare(LLFolderType::lookup(LLFolderType::FT_OUTBOX) , LLFolderType::FT_OUTBOX); + declare(LLFolderType::lookup(LLFolderType::FT_BASIC_ROOT) , LLFolderType::FT_BASIC_ROOT); + } +} diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 6db59afb9b..00a90325ad 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -30,6 +30,8 @@ #include "llassetstorage.h" #include "lldarray.h" +#include "llfolderviewitem.h" +#include "llfolderviewmodelinventory.h" #include "llfloater.h" #include "llinventory.h" #include "llinventoryfilter.h" @@ -38,22 +40,19 @@ #include "lluictrlfactory.h" #include <set> -class LLFolderView; -class LLFolderViewFolder; -class LLFolderViewItem; -class LLInventoryFilter; -class LLInventoryModel; class LLInvFVBridge; -class LLInventoryFVBridgeBuilder; -class LLMenuBarGL; -class LLCheckBoxCtrl; -class LLSpinCtrl; -class LLTextBox; -class LLIconCtrl; -class LLSaveFolderState; -class LLFilterEditor; -class LLTabContainer; +class LLInventoryFolderViewModelBuilder; class LLInvPanelComplObserver; +class LLFolderViewModelInventory; + +namespace LLInitParam +{ + template<> + struct TypeValues<LLFolderType::EType> : public TypeValuesHelper<LLFolderType::EType> + { + static void declareValues(); + }; +} class LLInventoryPanel : public LLPanel { @@ -74,6 +73,19 @@ public: {} }; + struct StartFolder : public LLInitParam::ChoiceBlock<StartFolder> + { + Alternative<std::string> name; + Alternative<LLUUID> id; + Alternative<LLFolderType::EType> type; + + StartFolder() + : name("name"), + id("id"), + type("type") + {} + }; + struct Params : public LLInitParam::Block<Params, LLPanel::Params> { @@ -82,12 +94,14 @@ public: Optional<bool> allow_multi_select; Optional<bool> show_item_link_overlays; Optional<Filter> filter; - Optional<std::string> start_folder; + Optional<StartFolder> start_folder; Optional<bool> use_label_suffix; Optional<bool> show_empty_message; - Optional<bool> show_load_status; Optional<LLScrollContainer::Params> scroll; Optional<bool> accepts_drag_and_drop; + Optional<LLFolderView::Params> folder_view; + Optional<LLFolderViewFolder::Params> folder; + Optional<LLFolderViewItem::Params> item; Params() : sort_order_setting("sort_order_setting"), @@ -98,27 +112,38 @@ public: start_folder("start_folder"), use_label_suffix("use_label_suffix", true), show_empty_message("show_empty_message", true), - show_load_status("show_load_status"), scroll("scroll"), - accepts_drag_and_drop("accepts_drag_and_drop") + accepts_drag_and_drop("accepts_drag_and_drop"), + folder_view("folder_view"), + folder("folder"), + item("item") {} }; + struct InventoryState : public LLInitParam::Block<InventoryState> + { + Mandatory<LLInventoryFilter::Params> filter; + Mandatory<LLInventorySort::Params> sort; + }; + //-------------------------------------------------------------------- // Initialization //-------------------------------------------------------------------- protected: LLInventoryPanel(const Params&); void initFromParams(const Params&); + friend class LLUICtrlFactory; public: virtual ~LLInventoryPanel(); public: LLInventoryModel* getModel() { return mInventory; } + LLFolderViewModelInventory& getRootViewModel() { return mInventoryViewModel; } // LLView methods void draw(); + /*virtual*/ BOOL handleKeyHere( KEY key, MASK mask ); BOOL handleHover(S32 x, S32 y, MASK mask); BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, @@ -137,8 +162,9 @@ public: void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus); void setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb); void clearSelection(); - LLInventoryFilter* getFilter(); - const LLInventoryFilter* getFilter() const; + bool isSelectionRemovable(); + LLInventoryFilter& getFilter(); + const LLInventoryFilter& getFilter() const; void setFilterTypes(U64 filter, LLInventoryFilter::EFilterType = LLInventoryFilter::FILTERTYPE_OBJECT); U32 getFilterObjectTypes() const; void setFilterPermMask(PermissionMask filter_perm_mask); @@ -156,6 +182,7 @@ public: // This method is called when something has changed about the inventory. void modelChanged(U32 mask); LLFolderView* getRootFolder(); + LLUUID getRootFolderID(); LLScrollContainer* getScrollableContainer() { return mScroller; } void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); @@ -167,7 +194,8 @@ public: void doCreate(const LLSD& userdata); bool beginIMSession(); bool attachObject(const LLSD& userdata); - + static void idle(void* user_data); + // DEBUG ONLY: static void dumpSelectionInformation(void* user_data); @@ -182,30 +210,44 @@ public: static void openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id); + void addItemID(const LLUUID& id, LLFolderViewItem* itemp); + void removeItemID(const LLUUID& id); + LLFolderViewItem* getItemByID(const LLUUID& id); + LLFolderViewFolder* getFolderByID(const LLUUID& id); + void setSelectionByID(const LLUUID& obj_id, BOOL take_keyboard_focus); + void updateSelection(); + + LLFolderViewModelInventory* getFolderViewModel(); + const LLFolderViewModelInventory* getFolderViewModel() const; + protected: void openStartFolderOrMyInventory(); // open the first level of inventory void onItemsCompletion(); // called when selected items are complete + LLUUID mSelectThisID; LLInventoryModel* mInventory; LLInventoryObserver* mInventoryObserver; LLInvPanelComplObserver* mCompletionObserver; - BOOL mAcceptsDragAndDrop; - BOOL mAllowMultiSelect; - BOOL mShowItemLinkOverlays; // Shows link graphic over inventory item icons - BOOL mShowEmptyMessage; - BOOL mShowLoadStatus; + bool mAcceptsDragAndDrop; + bool mAllowMultiSelect; + bool mShowItemLinkOverlays; // Shows link graphic over inventory item icons + bool mShowEmptyMessage; LLFolderView* mFolderRoot; LLScrollContainer* mScroller; + LLFolderViewModelInventory mInventoryViewModel; + Params mParams; // stored copy of parameter block + + std::map<LLUUID, LLFolderViewItem*> mItemMap; /** - * Pointer to LLInventoryFVBridgeBuilder. + * Pointer to LLInventoryFolderViewModelBuilder. * * It is set in LLInventoryPanel's constructor and can be overridden in derived classes with * another implementation. * Take into account it will not be deleted by LLInventoryPanel itself. */ - const LLInventoryFVBridgeBuilder* mInvFVBridgeBuilder; + const LLInventoryFolderViewModelBuilder* mInvFVBridgeBuilder; //-------------------------------------------------------------------- @@ -218,7 +260,6 @@ public: void setSortOrder(U32 order); U32 getSortOrder() const; - void requestSort(); private: std::string mSortOrderSetting; @@ -231,26 +272,27 @@ public: void addHideFolderType(LLFolderType::EType folder_type); public: - BOOL getIsViewsInitialized() const { return mViewsInitialized; } - const LLUUID& getRootFolderID() const; + BOOL getIsViewsInitialized() const { return mViewsInitialized; } protected: // Builds the UI. Call this once the inventory is usable. void initializeViews(); - LLFolderViewItem* rebuildViewsFor(const LLUUID& id); // Given the id and the parent, build all of the folder views. - virtual void buildFolderView(const LLInventoryPanel::Params& params); + // Specific inventory colors + static bool sColorSetInitialized; + static LLUIColor sDefaultColor; + static LLUIColor sDefaultHighlightColor; + static LLUIColor sLibraryColor; + static LLUIColor sLinkColor; + LLFolderViewItem* buildNewViews(const LLUUID& id); BOOL getIsHiddenFolderType(LLFolderType::EType folder_type) const; - virtual LLFolderView* createFolderView(LLInvFVBridge * bridge, bool useLabelSuffix); + virtual LLFolderView * createFolderRoot(LLUUID root_id ); virtual LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge); virtual LLFolderViewItem* createFolderViewItem(LLInvFVBridge * bridge); private: - BOOL mBuildDefaultHierarchy; // default inventory hierarchy should be created in postBuild() - BOOL mViewsInitialized; // Views have been generated - // UUID of category from which hierarchy should be built. Set with the - // "start_folder" xml property. Default is LLUUID::null that means total Inventory hierarchy. - LLUUID mStartFolderID; + bool mBuildDefaultHierarchy; // default inventory hierarchy should be created in postBuild() + bool mViewsInitialized; // Views have been generated }; #endif // LL_LLINVENTORYPANEL_H diff --git a/indra/newview/lllistcontextmenu.h b/indra/newview/lllistcontextmenu.h index fabd68ee20..04d3314829 100644 --- a/indra/newview/lllistcontextmenu.h +++ b/indra/newview/lllistcontextmenu.h @@ -37,7 +37,7 @@ class LLContextMenu; /** * Context menu for single or multiple list items. * - * Derived classes must implement contextMenu(). + * Derived classes must implement createMenu(). * * Typical usage: * <code> diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 459e52c4f4..97ba5b634a 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -32,9 +32,7 @@ #include "lllocalbitmaps.h" /* boost: will not compile unless equivalent is undef'd, beware. */ -#ifdef equivalent -#undef equivalent -#endif +#include "fix_macros.h" #include <boost/filesystem.hpp> /* image compression headers. */ diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index ebb5912ace..2d7454b636 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -28,11 +28,13 @@ #include "llagent.h" #include "llagentui.h" +#include "llavatarnamecache.h" #include "lllogchat.h" #include "lltrans.h" #include "llviewercontrol.h" #include "lldiriterator.h" +#include "llfloaterimsessiontab.h" #include "llinstantmessage.h" #include "llsingleton.h" // for LLSingleton @@ -40,6 +42,7 @@ #include <boost/algorithm/string/replace.hpp> #include <boost/regex.hpp> #include <boost/regex/v4/match_results.hpp> +#include <boost/foreach.hpp> #if LL_MSVC #pragma warning(push) @@ -58,10 +61,11 @@ const S32 LOG_RECALL_SIZE = 2048; -const std::string IM_TIME("time"); -const std::string IM_TEXT("message"); -const std::string IM_FROM("from"); -const std::string IM_FROM_ID("from_id"); +const std::string LL_IM_TIME("time"); +const std::string LL_IM_TEXT("message"); +const std::string LL_IM_FROM("from"); +const std::string LL_IM_FROM_ID("from_id"); +const std::string LL_TRANSCRIPT_FILE_EXTENSION("txt"); const static std::string IM_SEPARATOR(": "); const static std::string NEW_LINE("\n"); @@ -84,6 +88,7 @@ const static std::string MULTI_LINE_PREFIX(" "); * Note: "You" was used as an avatar names in viewers of previous versions */ const static boost::regex TIMESTAMP_AND_STUFF("^(\\[\\d{4}/\\d{1,2}/\\d{1,2}\\s+\\d{1,2}:\\d{2}\\]\\s+|\\[\\d{1,2}:\\d{2}\\]\\s+)?(.*)$"); +const static boost::regex TIMESTAMP("^(\\[\\d{4}/\\d{1,2}/\\d{1,2}\\s+\\d{1,2}:\\d{2}\\]|\\[\\d{1,2}:\\d{2}\\]).*"); /** * Regular expression suitable to match names like @@ -116,6 +121,15 @@ const static int IDX_TEXT = 3; using namespace boost::posix_time; using namespace boost::gregorian; +void append_to_last_message(std::list<LLSD>& messages, const std::string& line) +{ + if (!messages.size()) return; + + std::string im_text = messages.back()[LL_IM_TEXT].asString(); + im_text.append(line); + messages.back()[LL_IM_TEXT] = im_text; +} + class LLLogChatTimeScanner: public LLSingleton<LLLogChatTimeScanner> { public: @@ -191,15 +205,17 @@ private: std::stringstream mTimeStream; }; +LLLogChat::save_history_signal_t * LLLogChat::sSaveHistorySignal = NULL; + //static std::string LLLogChat::makeLogFileName(std::string filename) { /** - * Testing for in bound and out bound ad-hoc file names - * if it is then skip date stamping. - **/ - //LL_INFOS("") << "Befor:" << filename << LL_ENDL;/* uncomment if you want to verify step, delete on commit */ - boost::match_results<std::string::const_iterator> matches; + * Testing for in bound and out bound ad-hoc file names + * if it is then skip date stamping. + **/ + + boost::match_results<std::string::const_iterator> matches; bool inboundConf = boost::regex_match(filename, matches, INBOUND_CONFERENCE); bool outboundConf = boost::regex_match(filename, matches, OUTBOUND_CONFERENCE); if (!(inboundConf || outboundConf)) @@ -220,17 +236,17 @@ std::string LLLogChat::makeLogFileName(std::string filename) filename += dbuffer; } } - //LL_INFOS("") << "After:" << filename << LL_ENDL;/* uncomment if you want to verify step, delete on commit */ + filename = cleanFileName(filename); - filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_ACCOUNT_CHAT_LOGS,filename); - filename += ".txt"; - //LL_INFOS("") << "Full:" << filename << LL_ENDL;/* uncomment if you want to verify step, delete on commit */ + filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_ACCOUNT_CHAT_LOGS, filename); + filename += '.' + LL_TRANSCRIPT_FILE_EXTENSION; + return filename; } std::string LLLogChat::cleanFileName(std::string filename) { - std::string invalidChars = "\"\'\\/?*:.<>|[]{}~"; // Cannot match glob or illegal filename chars + std::string invalidChars = "\"\'\\/?*:.<>|[]{}~"; // Cannot match glob or illegal filename chars std::string::size_type position = filename.find_first_of(invalidChars); while (position != filename.npos) { @@ -242,27 +258,24 @@ std::string LLLogChat::cleanFileName(std::string filename) std::string LLLogChat::timestamp(bool withdate) { - time_t utc_time; - utc_time = time_corrected(); - std::string timeStr; - LLSD substitution; - substitution["datetime"] = (S32) utc_time; - if (withdate) { - timeStr = "["+LLTrans::getString ("TimeYear")+"]/[" - +LLTrans::getString ("TimeMonth")+"]/[" - +LLTrans::getString ("TimeDay")+"] [" - +LLTrans::getString ("TimeHour")+"]:[" - +LLTrans::getString ("TimeMin")+"]"; + timeStr = "[" + LLTrans::getString ("TimeYear") + "]/[" + + LLTrans::getString ("TimeMonth") + "]/[" + + LLTrans::getString ("TimeDay") + "] [" + + LLTrans::getString ("TimeHour") + "]:[" + + LLTrans::getString ("TimeMin") + "]"; } else { timeStr = "[" + LLTrans::getString("TimeHour") + "]:[" - + LLTrans::getString ("TimeMin")+"]"; + + LLTrans::getString ("TimeMin")+"]"; } + LLSD substitution; + substitution["datetime"] = (S32)time_corrected(); + LLStringUtil::format (timeStr, substitution); return timeStr; } @@ -270,9 +283,9 @@ std::string LLLogChat::timestamp(bool withdate) //static void LLLogChat::saveHistory(const std::string& filename, - const std::string& from, - const LLUUID& from_id, - const std::string& line) + const std::string& from, + const LLUUID& from_id, + const std::string& line) { std::string tmp_filename = filename; LLStringUtil::trim(tmp_filename); @@ -312,108 +325,41 @@ void LLLogChat::saveHistory(const std::string& filename, file << LLChatLogFormatter(item) << std::endl; file.close(); -} -void LLLogChat::loadHistory(const std::string& filename, void (*callback)(ELogLineType, const LLSD&, void*), void* userdata) -{ - if(!filename.size()) - { - llwarns << "Filename is Empty!" << llendl; - return ; - } - - LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r"); /*Flawfinder: ignore*/ - if (!fptr) - { - callback(LOG_EMPTY, LLSD(), userdata); - return; //No previous conversation with this name. - } - else + if (NULL != sSaveHistorySignal) { - char buffer[LOG_RECALL_SIZE]; /*Flawfinder: ignore*/ - char *bptr; - S32 len; - bool firstline=TRUE; - - if ( fseek(fptr, (LOG_RECALL_SIZE - 1) * -1 , SEEK_END) ) - { //File is smaller than recall size. Get it all. - firstline = FALSE; - if ( fseek(fptr, 0, SEEK_SET) ) - { - fclose(fptr); - return; - } - } - - while ( fgets(buffer, LOG_RECALL_SIZE, fptr) && !feof(fptr) ) - { - len = strlen(buffer) - 1; /*Flawfinder: ignore*/ - for ( bptr = (buffer + len); (*bptr == '\n' || *bptr == '\r') && bptr>buffer; bptr--) *bptr='\0'; - - if (!firstline) - { - LLSD item; - std::string line(buffer); - std::istringstream iss(line); - - if (!LLChatLogParser::parse(line, item)) - { - item["message"] = line; - callback(LOG_LINE, item, userdata); - } - else - { - callback(LOG_LLSD, item, userdata); - } - } - else - { - firstline = FALSE; - } - } - callback(LOG_END, LLSD(), userdata); - - fclose(fptr); + (*sSaveHistorySignal)(); } } -void append_to_last_message(std::list<LLSD>& messages, const std::string& line) -{ - if (!messages.size()) return; - - std::string im_text = messages.back()[IM_TEXT].asString(); - im_text.append(line); - messages.back()[IM_TEXT] = im_text; -} - // static -void LLLogChat::loadAllHistory(const std::string& file_name, std::list<LLSD>& messages) +void LLLogChat::loadChatHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params) { if (file_name.empty()) { llwarns << "Session name is Empty!" << llendl; return ; } - //LL_INFOS("") << "Loading:" << file_name << LL_ENDL;/* uncomment if you want to verify step, delete on commit */ - //LL_INFOS("") << "Current:" << makeLogFileName(file_name) << LL_ENDL;/* uncomment if you want to verify step, delete on commit */ + + bool load_all_history = load_params.has("load_all_history") ? load_params["load_all_history"].asBoolean() : false; + LLFILE* fptr = LLFile::fopen(makeLogFileName(file_name), "r");/*Flawfinder: ignore*/ if (!fptr) - { + { fptr = LLFile::fopen(oldLogFileName(file_name), "r");/*Flawfinder: ignore*/ - if (!fptr) - { - if (!fptr) return; //No previous conversation with this name. - } + if (!fptr) + { + return; //No previous conversation with this name. + } } - //LL_INFOS("") << "Reading:" << file_name << LL_ENDL; char buffer[LOG_RECALL_SIZE]; /*Flawfinder: ignore*/ char *bptr; S32 len; bool firstline = TRUE; - if (fseek(fptr, (LOG_RECALL_SIZE - 1) * -1 , SEEK_END)) - { //File is smaller than recall size. Get it all. + if (load_all_history || fseek(fptr, (LOG_RECALL_SIZE - 1) * -1 , SEEK_END)) + { //We need to load the whole historyFile or it's smaller than recall size, so get it all. firstline = FALSE; if (fseek(fptr, 0, SEEK_SET)) { @@ -449,9 +395,9 @@ void LLLogChat::loadAllHistory(const std::string& file_name, std::list<LLSD>& me else { LLSD item; - if (!LLChatLogParser::parse(line, item)) + if (!LLChatLogParser::parse(line, item, load_params)) { - item[IM_TEXT] = line; + item[LL_IM_TEXT] = line; } messages.push_back(item); } @@ -459,9 +405,259 @@ void LLLogChat::loadAllHistory(const std::string& file_name, std::list<LLSD>& me fclose(fptr); } +// static +std::string LLLogChat::oldLogFileName(std::string filename) +{ + // get Users log directory + std::string directory = gDirUtilp->getPerAccountChatLogsDir(); + + // add final OS dependent delimiter + directory += gDirUtilp->getDirDelimiter(); + + // lest make sure the file name has no invalid characters before making the pattern + filename = cleanFileName(filename); + + // create search pattern + std::string pattern = filename + ( filename == "chat" ? "-???\?-?\?-??.txt" : "-???\?-??.txt"); + + std::vector<std::string> allfiles; + LLDirIterator iter(directory, pattern); + std::string scanResult; + + while (iter.next(scanResult)) + { + allfiles.push_back(scanResult); + } + + if (allfiles.size() == 0) // if no result from date search, return generic filename + { + scanResult = directory + filename + '.' + LL_TRANSCRIPT_FILE_EXTENSION; + } + else + { + sort(allfiles.begin(), allfiles.end()); + scanResult = directory + allfiles.back(); + // this file is now the most recent version of the file. + } + + return scanResult; +} + +// static +void LLLogChat::findTranscriptFiles(std::string pattern, std::vector<std::string>& list_of_transcriptions) +{ + // get Users log directory + std::string dirname = gDirUtilp->getPerAccountChatLogsDir(); + + // add final OS dependent delimiter + dirname += gDirUtilp->getDirDelimiter(); + + LLDirIterator iter(dirname, pattern); + std::string filename; + while (iter.next(filename)) + { + std::string fullname = gDirUtilp->add(dirname, filename); + + LLFILE * filep = LLFile::fopen(fullname, "rb"); + if (NULL != filep) + { + char buffer[LOG_RECALL_SIZE]; + + fseek(filep, 0, SEEK_END); // seek to end of file + S32 bytes_to_read = ftell(filep); // get current file pointer + fseek(filep, 0, SEEK_SET); // seek back to beginning of file + + // limit the number characters to read from file + if (bytes_to_read >= LOG_RECALL_SIZE) + { + bytes_to_read = LOG_RECALL_SIZE - 1; + } + + if (bytes_to_read > 0 && NULL != fgets(buffer, bytes_to_read, filep)) + { + //matching a timestamp + boost::match_results<std::string::const_iterator> matches; + if (boost::regex_match(std::string(buffer), matches, TIMESTAMP)) + { + list_of_transcriptions.push_back(gDirUtilp->add(dirname, filename)); + } + } + LLFile::close(filep); + } + } +} + +// static +void LLLogChat::getListOfTranscriptFiles(std::vector<std::string>& list_of_transcriptions) +{ + // create search pattern + std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION; + findTranscriptFiles(pattern, list_of_transcriptions); +} + +// static +void LLLogChat::getListOfTranscriptBackupFiles(std::vector<std::string>& list_of_transcriptions) +{ + // create search pattern + std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION + ".backup*"; + findTranscriptFiles(pattern, list_of_transcriptions); +} + +//static +boost::signals2::connection LLLogChat::setSaveHistorySignal(const save_history_signal_t::slot_type& cb) +{ + if (NULL == sSaveHistorySignal) + { + sSaveHistorySignal = new save_history_signal_t(); + } + + return sSaveHistorySignal->connect(cb); +} + +//static +bool LLLogChat::moveTranscripts(const std::string originDirectory, + const std::string targetDirectory, + std::vector<std::string>& listOfFilesToMove, + std::vector<std::string>& listOfFilesMoved) +{ + std::string newFullPath; + bool movedAllTranscripts = true; + std::string backupFileName; + unsigned backupFileCount; + + BOOST_FOREACH(const std::string& fullpath, listOfFilesToMove) + { + backupFileCount = 0; + newFullPath = targetDirectory + fullpath.substr(originDirectory.length(), std::string::npos); + + //The target directory contains that file already, so lets store it + if(LLFile::isfile(newFullPath)) + { + backupFileName = newFullPath + ".backup"; + + //If needed store backup file as .backup1 etc. + while(LLFile::isfile(backupFileName)) + { + ++backupFileCount; + backupFileName = newFullPath + ".backup" + boost::lexical_cast<std::string>(backupFileCount); + } + + //Rename the file to its backup name so it is not overwritten + LLFile::rename(newFullPath, backupFileName); + } + + S32 retry_count = 0; + while (retry_count < 5) + { + //success is zero + if (LLFile::rename(fullpath, newFullPath) != 0) + { + retry_count++; + S32 result = errno; + LL_WARNS("LLLogChat::moveTranscripts") << "Problem renaming " << fullpath << " - errorcode: " + << result << " attempt " << retry_count << LL_ENDL; + + ms_sleep(100); + } + else + { + listOfFilesMoved.push_back(newFullPath); + + if (retry_count) + { + LL_WARNS("LLLogChat::moveTranscripts") << "Successfully renamed " << fullpath << LL_ENDL; + } + break; + } + } + } + + if(listOfFilesMoved.size() != listOfFilesToMove.size()) + { + movedAllTranscripts = false; + } + + return movedAllTranscripts; +} + +//static +bool LLLogChat::moveTranscripts(const std::string currentDirectory, + const std::string newDirectory, + std::vector<std::string>& listOfFilesToMove) +{ + std::vector<std::string> listOfFilesMoved; + return moveTranscripts(currentDirectory, newDirectory, listOfFilesToMove, listOfFilesMoved); +} + +//static +void LLLogChat::deleteTranscripts() +{ + std::vector<std::string> list_of_transcriptions; + getListOfTranscriptFiles(list_of_transcriptions); + getListOfTranscriptBackupFiles(list_of_transcriptions); + + BOOST_FOREACH(const std::string& fullpath, list_of_transcriptions) + { + S32 retry_count = 0; + while (retry_count < 5) + { + if (0 != LLFile::remove(fullpath)) + { + retry_count++; + S32 result = errno; + LL_WARNS("LLLogChat::deleteTranscripts") << "Problem removing " << fullpath << " - errorcode: " + << result << " attempt " << retry_count << LL_ENDL; + + if(retry_count >= 5) + { + LL_WARNS("LLLogChat::deleteTranscripts") << "Failed to remove " << fullpath << LL_ENDL; + return; + } + + ms_sleep(100); + } + else + { + if (retry_count) + { + LL_WARNS("LLLogChat::deleteTranscripts") << "Successfully removed " << fullpath << LL_ENDL; + } + break; + } + } + } + + LLFloaterIMSessionTab::processChatHistoryStyleUpdate(true); +} + +// static +bool LLLogChat::isTranscriptExist(const LLUUID& avatar_id) +{ + std::vector<std::string> list_of_transcriptions; + LLLogChat::getListOfTranscriptFiles(list_of_transcriptions); + + if (list_of_transcriptions.size() > 0) + { + LLAvatarName avatar_name; + LLAvatarNameCache::get(avatar_id, &avatar_name); + std::string avatar_user_name = avatar_name.getAccountName(); + std::replace(avatar_user_name.begin(), avatar_user_name.end(), '.', '_'); + + BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions) + { + if (std::string::npos != transcript_file_name.find(avatar_user_name)) + { + return true; + } + } + } + + return false; +} + //*TODO mark object's names in a special way so that they will be distinguishable form avatar name //which are more strict by its nature (only firstname and secondname) -//Example, an object's name can be writen like "Object <actual_object's_name>" +//Example, an object's name can be written like "Object <actual_object's_name>" void LLChatLogFormatter::format(const LLSD& im, std::ostream& ostr) const { if (!im.isMap()) @@ -470,19 +666,19 @@ void LLChatLogFormatter::format(const LLSD& im, std::ostream& ostr) const return; } - if (im[IM_TIME].isDefined()) + if (im[LL_IM_TIME].isDefined()) { - std::string timestamp = im[IM_TIME].asString(); + std::string timestamp = im[LL_IM_TIME].asString(); boost::trim(timestamp); ostr << '[' << timestamp << ']' << TWO_SPACES; } //*TODO mark object's names in a special way so that they will be distinguishable form avatar name //which are more strict by its nature (only firstname and secondname) - //Example, an object's name can be writen like "Object <actual_object's_name>" - if (im[IM_FROM].isDefined()) + //Example, an object's name can be written like "Object <actual_object's_name>" + if (im[LL_IM_FROM].isDefined()) { - std::string from = im[IM_FROM].asString(); + std::string from = im[LL_IM_FROM].asString(); boost::trim(from); if (from.size()) { @@ -490,9 +686,9 @@ void LLChatLogFormatter::format(const LLSD& im, std::ostream& ostr) const } } - if (im[IM_TEXT].isDefined()) + if (im[LL_IM_TEXT].isDefined()) { - std::string im_text = im[IM_TEXT].asString(); + std::string im_text = im[LL_IM_TEXT].asString(); //multilined text will be saved with prepended spaces boost::replace_all(im_text, NEW_LINE, NEW_LINE_SPACE_PREFIX); @@ -500,10 +696,11 @@ void LLChatLogFormatter::format(const LLSD& im, std::ostream& ostr) const } } -bool LLChatLogParser::parse(std::string& raw, LLSD& im) +bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params) { if (!raw.length()) return false; + bool cut_off_todays_date = parse_params.has("cut_off_todays_date") ? parse_params["cut_off_todays_date"].asBoolean() : true; im = LLSD::emptyMap(); //matching a timestamp @@ -518,13 +715,18 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im) boost::trim(timestamp); timestamp.erase(0, 1); timestamp.erase(timestamp.length()-1, 1); - LLLogChatTimeScanner::instance().checkAndCutOffDate(timestamp); - im[IM_TIME] = timestamp; + + if (cut_off_todays_date) + { + LLLogChatTimeScanner::instance().checkAndCutOffDate(timestamp); + } + + im[LL_IM_TIME] = timestamp; } else { //timestamp is optional - im[IM_TIME] = ""; + im[LL_IM_TIME] = ""; } bool has_stuff = matches[IDX_STUFF].matched; @@ -550,8 +752,8 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im) if (!has_name || name == SYSTEM_FROM) { //name is optional too - im[IM_FROM] = SYSTEM_FROM; - im[IM_FROM_ID] = LLUUID::null; + im[LL_IM_FROM] = SYSTEM_FROM; + im[LL_IM_FROM_ID] = LLUUID::null; } //possibly a case of complex object names consisting of 3+ words @@ -560,8 +762,8 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im) U32 divider_pos = stuff.find(NAME_TEXT_DIVIDER); if (divider_pos != std::string::npos && divider_pos < (stuff.length() - NAME_TEXT_DIVIDER.length())) { - im[IM_FROM] = stuff.substr(0, divider_pos); - im[IM_TEXT] = stuff.substr(divider_pos + NAME_TEXT_DIVIDER.length()); + im[LL_IM_FROM] = stuff.substr(0, divider_pos); + im[LL_IM_TEXT] = stuff.substr(divider_pos + NAME_TEXT_DIVIDER.length()); return true; } } @@ -569,7 +771,7 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im) if (!has_name) { //text is mandatory - im[IM_TEXT] = stuff; + im[LL_IM_TEXT] = stuff; return true; //parse as a message from Second Life } @@ -581,45 +783,15 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im) { std::string agent_name; LLAgentUI::buildFullname(agent_name); - im[IM_FROM] = agent_name; - im[IM_FROM_ID] = gAgentID; + im[LL_IM_FROM] = agent_name; + im[LL_IM_FROM_ID] = gAgentID; } else { - im[IM_FROM] = name; + im[LL_IM_FROM] = name; } - im[IM_TEXT] = name_and_text[IDX_TEXT]; + im[LL_IM_TEXT] = name_and_text[IDX_TEXT]; return true; //parsed name and message text, maybe have a timestamp too } -std::string LLLogChat::oldLogFileName(std::string filename) -{ - std::string scanResult; - std::string directory = gDirUtilp->getPerAccountChatLogsDir();/* get Users log directory */ - directory += gDirUtilp->getDirDelimiter();/* add final OS dependent delimiter */ - filename=cleanFileName(filename);/* lest make shure the file name has no invalad charecters befor making the pattern */ - std::string pattern = (filename+(( filename == "chat" ) ? "-???\?-?\?-??.txt" : "-???\?-??.txt"));/* create search pattern*/ - //LL_INFOS("") << "Checking:" << directory << " for " << pattern << LL_ENDL;/* uncomment if you want to verify step, delete on commit */ - std::vector<std::string> allfiles; - - LLDirIterator iter(directory, pattern); - while (iter.next(scanResult)) - { - //LL_INFOS("") << "Found :" << scanResult << LL_ENDL; - allfiles.push_back(scanResult); - } - - if (allfiles.size() == 0) // if no result from date search, return generic filename - { - scanResult = directory + filename + ".txt"; - } - else - { - std::sort(allfiles.begin(), allfiles.end()); - scanResult = directory + allfiles.back(); - // thisfile is now the most recent version of the file. - } - //LL_INFOS("") << "Reading:" << scanResult << LL_ENDL;/* uncomment if you want to verify step, delete on commit */ - return scanResult; -} diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h index 27752452c9..e819f00dd9 100644 --- a/indra/newview/lllogchat.h +++ b/indra/newview/lllogchat.h @@ -49,15 +49,29 @@ public: const std::string& from, const LLUUID& from_id, const std::string& line); + static void findTranscriptFiles(std::string pattern, std::vector<std::string>& list_of_transcriptions); + static void getListOfTranscriptFiles(std::vector<std::string>& list); + static void getListOfTranscriptBackupFiles(std::vector<std::string>& list_of_transcriptions); - /** @deprecated @see loadAllHistory() */ - static void loadHistory(const std::string& filename, - void (*callback)(ELogLineType, const LLSD&, void*), - void* userdata); + static void loadChatHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params = LLSD()); + + typedef boost::signals2::signal<void ()> save_history_signal_t; + static boost::signals2::connection setSaveHistorySignal(const save_history_signal_t::slot_type& cb); + + static bool moveTranscripts(const std::string currentDirectory, + const std::string newDirectory, + std::vector<std::string>& listOfFilesToMove, + std::vector<std::string>& listOfFilesMoved); + static bool moveTranscripts(const std::string currentDirectory, + const std::string newDirectory, + std::vector<std::string>& listOfFilesToMove); + + static void deleteTranscripts(); + static bool isTranscriptExist(const LLUUID& avatar_id); - static void loadAllHistory(const std::string& file_name, std::list<LLSD>& messages); private: static std::string cleanFileName(std::string filename); + static save_history_signal_t * sSaveHistorySignal; }; /** @@ -105,7 +119,7 @@ public: * * @return false if failed to parse mandatory data - message text */ - static bool parse(std::string& raw, LLSD& im); + static bool parse(std::string& raw, LLSD& im, const LLSD& parse_params = LLSD()); protected: LLChatLogParser(); @@ -113,9 +127,10 @@ protected: }; // LLSD map lookup constants -extern const std::string IM_TIME; //("time"); -extern const std::string IM_TEXT; //("message"); -extern const std::string IM_FROM; //("from"); -extern const std::string IM_FROM_ID; //("from_id"); +extern const std::string LL_IM_TIME; //("time"); +extern const std::string LL_IM_TEXT; //("message"); +extern const std::string LL_IM_FROM; //("from"); +extern const std::string LL_IM_FROM_ID; //("from_id"); +extern const std::string LL_TRANSCRIPT_FILE_EXTENSION; //("txt"); #endif diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp index 778693876e..cd6473921d 100644 --- a/indra/newview/llmachineid.cpp +++ b/indra/newview/llmachineid.cpp @@ -252,12 +252,20 @@ S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len) if (has_static_unique_id) { memcpy ( unique_id, &static_unique_id, len); - LL_DEBUGS("AppInit") << "UniqueID: " << unique_id[0] << unique_id[1]<< unique_id[2] << unique_id[3] << unique_id[4] << unique_id [5] << LL_ENDL; + LL_DEBUGS("AppInit") << "UniqueID: 0x"; + // Code between here and LL_ENDL is not executed unless the LL_DEBUGS + // actually produces output + for (size_t i = 0; i < len; ++i) + { + // Copy each char to unsigned int to hexify. Sending an unsigned + // char to a std::ostream tries to represent it as a char, not + // what we want here. + unsigned byte = unique_id[i]; + LL_CONT << std::hex << std::setw(2) << std::setfill('0') << byte; + } + // Reset default output formatting to avoid nasty surprises! + LL_CONT << std::dec << std::setw(0) << std::setfill(' ') << LL_ENDL; return 1; } return 0; } - - - - diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index 6e0f360cbc..9ec5d7c20c 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -72,7 +72,6 @@ void LLManip::rebuild(LLViewerObject* vobj) LLDrawable* drawablep = vobj->mDrawable; if (drawablep && drawablep->getVOVolume()) { - gPipeline.markRebuild(drawablep,LLDrawable::REBUILD_VOLUME, TRUE); drawablep->setState(LLDrawable::MOVE_UNDAMPED); // force to UNDAMPED drawablep->updateMove(); @@ -82,6 +81,14 @@ void LLManip::rebuild(LLViewerObject* vobj) group->dirtyGeom(); gPipeline.markRebuild(group, TRUE); } + + LLViewerObject::const_child_list_t& child_list = vobj->getChildren(); + for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(), endIter = child_list.end(); + iter != endIter; ++iter) + { + LLViewerObject* child = *iter; + rebuild(child); + } } } diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 826e8d560a..c8b446872b 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -1376,74 +1376,28 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) BOOL hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis); projected_mouse -= snap_plane_center; - S32 snap_plane = 0; - - F32 dot = cam_to_snap_plane * constraint_axis; - if (llabs(dot) < 0.01f) - { - // looking at ring edge on, project onto view plane and check if mouse is past ring - getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_to_snap_plane); - projected_mouse -= snap_plane_center; - dot = projected_mouse * constraint_axis; - if (projected_mouse * constraint_axis > 0) - { - snap_plane = 1; - } - projected_mouse -= dot * constraint_axis; - } - else if (dot > 0.f) - { - // look for mouse position outside and in front of snap circle - if (hit && projected_mouse.magVec() > SNAP_GUIDE_INNER_RADIUS * mRadiusMeters && projected_mouse * cam_to_snap_plane < 0.f) - { - snap_plane = 1; - } - } - else - { - // look for mouse position inside or in back of snap circle - if (projected_mouse.magVec() < SNAP_GUIDE_INNER_RADIUS * mRadiusMeters || projected_mouse * cam_to_snap_plane > 0.f || !hit) - { - snap_plane = 1; - } - } - - if (snap_plane == 0) - { - // try other plane - snap_plane_center = (center - (constraint_axis * mRadiusMeters * 0.5f)); - if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) - { - cam_to_snap_plane.setVec(1.f, 0.f, 0.f); - } - else - { - cam_to_snap_plane = snap_plane_center - gAgentCamera.getCameraPositionAgent(); - cam_to_snap_plane.normVec(); - } - - hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis); - projected_mouse -= snap_plane_center; - - dot = cam_to_snap_plane * constraint_axis; + if (gSavedSettings.getBOOL("SnapEnabled")) { + S32 snap_plane = 0; + + F32 dot = cam_to_snap_plane * constraint_axis; if (llabs(dot) < 0.01f) { // looking at ring edge on, project onto view plane and check if mouse is past ring getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_to_snap_plane); projected_mouse -= snap_plane_center; dot = projected_mouse * constraint_axis; - if (projected_mouse * constraint_axis < 0) + if (projected_mouse * constraint_axis > 0) { - snap_plane = 2; + snap_plane = 1; } projected_mouse -= dot * constraint_axis; } - else if (dot < 0.f) + else if (dot > 0.f) { // look for mouse position outside and in front of snap circle if (hit && projected_mouse.magVec() > SNAP_GUIDE_INNER_RADIUS * mRadiusMeters && projected_mouse * cam_to_snap_plane < 0.f) { - snap_plane = 2; + snap_plane = 1; } } else @@ -1451,78 +1405,136 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) // look for mouse position inside or in back of snap circle if (projected_mouse.magVec() < SNAP_GUIDE_INNER_RADIUS * mRadiusMeters || projected_mouse * cam_to_snap_plane > 0.f || !hit) { - snap_plane = 2; + snap_plane = 1; } } - } - - if (snap_plane > 0) - { - LLVector3 cam_at_axis; - if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) - { - cam_at_axis.setVec(1.f, 0.f, 0.f); - } - else - { - cam_at_axis = snap_plane_center - gAgentCamera.getCameraPositionAgent(); - cam_at_axis.normVec(); - } - - // first, project mouse onto screen plane at point tangent to rotation radius. - getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_at_axis); - // project that point onto rotation plane - projected_mouse -= snap_plane_center; - projected_mouse -= projected_vec(projected_mouse, constraint_axis); - - F32 mouse_lateral_dist = llmin(SNAP_GUIDE_INNER_RADIUS * mRadiusMeters, projected_mouse.magVec()); - F32 mouse_depth = SNAP_GUIDE_INNER_RADIUS * mRadiusMeters; - if (llabs(mouse_lateral_dist) > 0.01f) - { - mouse_depth = sqrtf((SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) * (SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) - - (mouse_lateral_dist * mouse_lateral_dist)); - } - LLVector3 projected_camera_at = cam_at_axis - projected_vec(cam_at_axis, constraint_axis); - projected_mouse -= mouse_depth * projected_camera_at; - - if (!mInSnapRegime) + + if (snap_plane == 0) { - mSmoothRotate = TRUE; + // try other plane + snap_plane_center = (center - (constraint_axis * mRadiusMeters * 0.5f)); + if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) + { + cam_to_snap_plane.setVec(1.f, 0.f, 0.f); + } + else + { + cam_to_snap_plane = snap_plane_center - gAgentCamera.getCameraPositionAgent(); + cam_to_snap_plane.normVec(); + } + + hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis); + projected_mouse -= snap_plane_center; + + dot = cam_to_snap_plane * constraint_axis; + if (llabs(dot) < 0.01f) + { + // looking at ring edge on, project onto view plane and check if mouse is past ring + getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_to_snap_plane); + projected_mouse -= snap_plane_center; + dot = projected_mouse * constraint_axis; + if (projected_mouse * constraint_axis < 0) + { + snap_plane = 2; + } + projected_mouse -= dot * constraint_axis; + } + else if (dot < 0.f) + { + // look for mouse position outside and in front of snap circle + if (hit && projected_mouse.magVec() > SNAP_GUIDE_INNER_RADIUS * mRadiusMeters && projected_mouse * cam_to_snap_plane < 0.f) + { + snap_plane = 2; + } + } + else + { + // look for mouse position inside or in back of snap circle + if (projected_mouse.magVec() < SNAP_GUIDE_INNER_RADIUS * mRadiusMeters || projected_mouse * cam_to_snap_plane > 0.f || !hit) + { + snap_plane = 2; + } + } } - mInSnapRegime = TRUE; - // 0 to 360 deg - F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f); - F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT); - //fmodf(llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f); - - LLVector3 object_axis; - getObjectAxisClosestToMouse(object_axis); - object_axis = object_axis * first_object_node->mSavedRotation; - - // project onto constraint plane - object_axis = object_axis - (object_axis * getConstraintAxis()) * getConstraintAxis(); - object_axis.normVec(); - - if (relative_mouse_angle < SNAP_ANGLE_DETENTE) + if (snap_plane > 0) { - F32 quantized_mouse_angle = mouse_angle - (relative_mouse_angle - (SNAP_ANGLE_DETENTE * 0.5f)); - angle = (quantized_mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2); + LLVector3 cam_at_axis; + if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) + { + cam_at_axis.setVec(1.f, 0.f, 0.f); + } + else + { + cam_at_axis = snap_plane_center - gAgentCamera.getCameraPositionAgent(); + cam_at_axis.normVec(); + } + + // first, project mouse onto screen plane at point tangent to rotation radius. + getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_at_axis); + // project that point onto rotation plane + projected_mouse -= snap_plane_center; + projected_mouse -= projected_vec(projected_mouse, constraint_axis); + + F32 mouse_lateral_dist = llmin(SNAP_GUIDE_INNER_RADIUS * mRadiusMeters, projected_mouse.magVec()); + F32 mouse_depth = SNAP_GUIDE_INNER_RADIUS * mRadiusMeters; + if (llabs(mouse_lateral_dist) > 0.01f) + { + mouse_depth = sqrtf((SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) * (SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) - + (mouse_lateral_dist * mouse_lateral_dist)); + } + LLVector3 projected_camera_at = cam_at_axis - projected_vec(cam_at_axis, constraint_axis); + projected_mouse -= mouse_depth * projected_camera_at; + + if (!mInSnapRegime) + { + mSmoothRotate = TRUE; + } + mInSnapRegime = TRUE; + // 0 to 360 deg + F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f); + + F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT); + //fmodf(llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f); + + LLVector3 object_axis; + getObjectAxisClosestToMouse(object_axis); + object_axis = object_axis * first_object_node->mSavedRotation; + + // project onto constraint plane + object_axis = object_axis - (object_axis * getConstraintAxis()) * getConstraintAxis(); + object_axis.normVec(); + + if (relative_mouse_angle < SNAP_ANGLE_DETENTE) + { + F32 quantized_mouse_angle = mouse_angle - (relative_mouse_angle - (SNAP_ANGLE_DETENTE * 0.5f)); + angle = (quantized_mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2); + } + else + { + angle = (mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2); + } + return LLQuaternion( -angle, constraint_axis ); } else { - angle = (mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2); + if (mInSnapRegime) + { + mSmoothRotate = TRUE; + } + mInSnapRegime = FALSE; } - return LLQuaternion( -angle, constraint_axis ); } - else - { + else { if (mInSnapRegime) { mSmoothRotate = TRUE; } mInSnapRegime = FALSE; - + } + + if (!mInSnapRegime) + { LLVector3 up_from_axis = mCenterToCamNorm % constraint_axis; up_from_axis.normVec(); LLVector3 cur_intersection; diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 10608463b4..362308c176 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -1755,6 +1755,11 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal, shader->bind(); } + if (shader) + { + shader->bind(); + } + //draw volume/plane intersections { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 7650fe9229..99b4707158 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -564,32 +564,13 @@ void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type) // void LLMediaCtrl::navigateToLocalPage( const std::string& subdir, const std::string& filename_in ) { - std::string language = LLUI::getLanguage(); - std::string delim = gDirUtilp->getDirDelimiter(); - std::string filename; + std::string filename(gDirUtilp->add(subdir, filename_in)); + std::string expanded_filename = gDirUtilp->findSkinnedFilename("html", filename); - filename += subdir; - filename += delim; - filename += filename_in; - - std::string expanded_filename = gDirUtilp->findSkinnedFilename("html", language, filename); - - if (! gDirUtilp->fileExists(expanded_filename)) + if (expanded_filename.empty()) { - if (language != "en") - { - expanded_filename = gDirUtilp->findSkinnedFilename("html", "en", filename); - if (! gDirUtilp->fileExists(expanded_filename)) - { - llwarns << "File " << subdir << delim << filename_in << "not found" << llendl; - return; - } - } - else - { - llwarns << "File " << subdir << delim << filename_in << "not found" << llendl; - return; - } + llwarns << "File " << filename << "not found" << llendl; + return; } if (ensureMediaSourceExists()) { @@ -597,7 +578,6 @@ void LLMediaCtrl::navigateToLocalPage( const std::string& subdir, const std::str mMediaSource->setSize(mTextureWidth, mTextureHeight); mMediaSource->navigateTo(expanded_filename, "text/html", false); } - } //////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp deleted file mode 100644 index c0a323d6cb..0000000000 --- a/indra/newview/llmemoryview.cpp +++ /dev/null @@ -1,333 +0,0 @@ -/** - * @file llmemoryview.cpp - * @brief LLMemoryView class implementation - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llmemoryview.h" - -#include "llappviewer.h" -#include "llallocator_heap_profile.h" -#include "llgl.h" // LLGLSUIDefault -#include "llviewerwindow.h" -#include "llviewercontrol.h" - -#include <sstream> -#include <boost/algorithm/string/split.hpp> - -#include "llmemory.h" - -LLMemoryView::LLMemoryView(const LLMemoryView::Params& p) -: LLView(p), - mPaused(FALSE), - //mDelay(120), - mAlloc(NULL) -{ -} - -LLMemoryView::~LLMemoryView() -{ -} - -BOOL LLMemoryView::handleMouseDown(S32 x, S32 y, MASK mask) -{ - if (mask & MASK_SHIFT) - { - } - else if (mask & MASK_CONTROL) - { - } - else - { - mPaused = !mPaused; - } - return TRUE; -} - -BOOL LLMemoryView::handleMouseUp(S32 x, S32 y, MASK mask) -{ - return TRUE; -} - - -BOOL LLMemoryView::handleHover(S32 x, S32 y, MASK mask) -{ - return FALSE; -} - -void LLMemoryView::refreshProfile() -{ - /* - LLAllocator & alloc = LLAppViewer::instance()->getAllocator(); - if(alloc.isProfiling()) { - std::string profile_text = alloc.getRawProfile(); - - boost::algorithm::split(mLines, profile_text, boost::bind(std::equal_to<llwchar>(), '\n', _1)); - } else { - mLines.clear(); - } - */ - if (mAlloc == NULL) { - mAlloc = &LLAppViewer::instance()->getAllocator(); - } - - mLines.clear(); - - if(mAlloc->isProfiling()) - { - const LLAllocatorHeapProfile &prof = mAlloc->getProfile(); - for(size_t i = 0; i < prof.mLines.size(); ++i) - { - std::stringstream ss; - ss << "Unfreed Mem: " << (prof.mLines[i].mLiveSize >> 20) << " M Trace: "; - for(size_t k = 0; k < prof.mLines[i].mTrace.size(); ++k) - { - ss << LLMemType::getNameFromID(prof.mLines[i].mTrace[k]) << " "; - } - mLines.push_back(utf8string_to_wstring(ss.str())); - } - } -} - -void LLMemoryView::draw() -{ - const S32 UPDATE_INTERVAL = 60; - const S32 MARGIN_AMT = 10; - static S32 curUpdate = UPDATE_INTERVAL; - static LLUIColor s_console_color = LLUIColorTable::instance().getColor("ConsoleBackground", LLColor4U::black); - - // setup update interval - if (curUpdate >= UPDATE_INTERVAL) - { - refreshProfile(); - curUpdate = 0; - } - curUpdate++; - - // setup window properly - S32 height = (S32) (gViewerWindow->getWindowRectScaled().getHeight()*0.75f); - S32 width = (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.9f); - setRect(LLRect().setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height)); - - // setup window color - F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); - LLColor4 color = s_console_color; - color.mV[VALPHA] *= console_opacity; - - LLGLSUIDefault gls_ui; - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gl_rect_2d(0, height, width, 0, color); - - LLFontGL * font = LLFontGL::getFontSansSerifSmall(); - - // draw remaining lines - F32 y_pos = 0.f; - F32 y_off = 0.f; - - F32 line_height = font->getLineHeight(); - S32 target_width = width - 2 * MARGIN_AMT; - - // cut off lines on bottom - U32 max_lines = U32((height - 2 * line_height) / line_height); - y_pos = height - MARGIN_AMT - line_height; - y_off = 0.f; - -#if !MEM_TRACK_MEM - std::vector<LLWString>::const_iterator end = mLines.end(); - if(mLines.size() > max_lines) { - end = mLines.begin() + max_lines; - } - for (std::vector<LLWString>::const_iterator i = mLines.begin(); i != end; ++i) - { - font->render(*i, 0, MARGIN_AMT, y_pos - y_off, - LLColor4::white, - LLFontGL::LEFT, - LLFontGL::BASELINE, - LLFontGL::NORMAL, - LLFontGL::DROP_SHADOW, - S32_MAX, - target_width - ); - y_off += line_height; - } - -#else - LLMemTracker::getInstance()->preDraw(mPaused) ; - - { - F32 x_pos = MARGIN_AMT ; - U32 lines = 0 ; - const char* str = LLMemTracker::getInstance()->getNextLine() ; - while(str != NULL) - { - lines++ ; - font->renderUTF8(str, 0, x_pos, y_pos - y_off, - LLColor4::white, - LLFontGL::LEFT, - LLFontGL::BASELINE, - LLFontGL::NORMAL, - LLFontGL::DROP_SHADOW, - S32_MAX, - target_width, - NULL, FALSE); - - str = LLMemTracker::getInstance()->getNextLine() ; - y_off += line_height; - - if(lines >= max_lines) - { - lines = 0 ; - x_pos += 512.f ; - if(x_pos + 512.f > target_width) - { - break ; - } - - y_pos = height - MARGIN_AMT - line_height; - y_off = 0.f; - } - } - } - - LLMemTracker::getInstance()->postDraw() ; -#endif - -#if MEM_TRACK_TYPE - - S32 left, top, right, bottom; - S32 x, y; - - S32 margin = 10; - S32 texth = LLFontGL::getFontMonospace()->getLineHeight(); - - S32 xleft = margin; - S32 ytop = height - margin; - S32 labelwidth = 0; - S32 maxmaxbytes = 1; - - // Make sure all timers are accounted for - // Set 'MT_OTHER' to unaccounted ticks last frame - { - S32 display_memtypes[LLMemType::MTYPE_NUM_TYPES]; - for (S32 i=0; i < LLMemType::MTYPE_NUM_TYPES; i++) - { - display_memtypes[i] = 0; - } - for (S32 i=0; i < MTV_DISPLAY_NUM; i++) - { - S32 tidx = mtv_display_table[i].memtype; - display_memtypes[tidx]++; - } - LLMemType::sMemCount[LLMemType::MTYPE_OTHER] = 0; - LLMemType::sMaxMemCount[LLMemType::MTYPE_OTHER] = 0; - for (S32 tidx = 0; tidx < LLMemType::MTYPE_NUM_TYPES; tidx++) - { - if (display_memtypes[tidx] == 0) - { - LLMemType::sMemCount[LLMemType::MTYPE_OTHER] += LLMemType::sMemCount[tidx]; - LLMemType::sMaxMemCount[LLMemType::MTYPE_OTHER] += LLMemType::sMaxMemCount[tidx]; - } - } - } - - // Labels - { - y = ytop; - S32 peak = 0; - for (S32 i=0; i<MTV_DISPLAY_NUM; i++) - { - x = xleft; - - int tidx = mtv_display_table[i].memtype; - S32 bytes = LLMemType::sMemCount[tidx]; - S32 maxbytes = LLMemType::sMaxMemCount[tidx]; - maxmaxbytes = llmax(maxbytes, maxmaxbytes); - peak += maxbytes; - S32 mbytes = bytes >> 20; - - tdesc = llformat("%s [%4d MB] in %06d NEWS",mtv_display_table[i].desc,mbytes, LLMemType::sNewCount[tidx]); - LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); - - y -= (texth + 2); - - S32 textw = LLFontGL::getFontMonospace()->getWidth(tdesc); - if (textw > labelwidth) - labelwidth = textw; - } - - S32 num_avatars = 0; - S32 num_motions = 0; - S32 num_loading_motions = 0; - S32 num_loaded_motions = 0; - S32 num_active_motions = 0; - S32 num_deprecated_motions = 0; - for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); - iter != LLCharacter::sInstances.end(); ++iter) - { - num_avatars++; - (*iter)->getMotionController().incMotionCounts(num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions); - } - - x = xleft; - tdesc = llformat("Total Bytes: %d MB Overhead: %d KB Avs %d Motions:%d Loading:%d Loaded:%d Active:%d Dep:%d", - LLMemType::sTotalMem >> 20, LLMemType::sOverheadMem >> 10, - num_avatars, num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions); - LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); - } - - // Bars - y = ytop; - labelwidth += 8; - S32 barw = width - labelwidth - xleft - margin; - for (S32 i=0; i<MTV_DISPLAY_NUM; i++) - { - x = xleft + labelwidth; - - int tidx = mtv_display_table[i].memtype; - S32 bytes = LLMemType::sMemCount[tidx]; - F32 frac = (F32)bytes / (F32)maxmaxbytes; - S32 w = (S32)(frac * (F32)barw); - left = x; right = x + w; - top = y; bottom = y - texth; - gl_rect_2d(left, top, right, bottom, *mtv_display_table[i].color); - - S32 maxbytes = LLMemType::sMaxMemCount[tidx]; - F32 frac2 = (F32)maxbytes / (F32)maxmaxbytes; - S32 w2 = (S32)(frac2 * (F32)barw); - left = x + w + 1; right = x + w2; - top = y; bottom = y - texth; - LLColor4 tcolor = *mtv_display_table[i].color; - tcolor.setAlpha(.5f); - gl_rect_2d(left, top, right, bottom, tcolor); - - y -= (texth + 2); - } - - dumpData(); - -#endif - - LLView::draw(); -} diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp new file mode 100644 index 0000000000..2b92b0b3d1 --- /dev/null +++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp @@ -0,0 +1,245 @@ +/** +* @file llmenuoptionpathfindingrebakenavmesh.cpp +* @brief Implementation of llmenuoptionpathfindingrebakenavmesh +* @author Prep@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + + +#include "llviewerprecompiledheaders.h" + +#include "llmenuoptionpathfindingrebakenavmesh.h" + +#include <boost/bind.hpp> +#include <boost/signals2.hpp> + +#include "llagent.h" +#include "llenvmanager.h" +#include "llnotificationsutil.h" +#include "llpathfindingmanager.h" +#include "llpathfindingnavmesh.h" +#include "llpathfindingnavmeshstatus.h" +#include "llviewerregion.h" + +LLMenuOptionPathfindingRebakeNavmesh::LLMenuOptionPathfindingRebakeNavmesh() + : LLSingleton<LLMenuOptionPathfindingRebakeNavmesh>(), + mIsInitialized(false), + mCanRebakeRegion(false), + mRebakeNavMeshMode(kRebakeNavMesh_Default), + mNavMeshSlot(), + mRegionCrossingSlot(), + mAgentStateSlot() +{ +} + +LLMenuOptionPathfindingRebakeNavmesh::~LLMenuOptionPathfindingRebakeNavmesh() +{ + if (mIsInitialized) + { + if (mRebakeNavMeshMode == kRebakeNavMesh_RequestSent) + { + LL_WARNS("navmeshRebaking") << "During destruction of the LLMenuOptionPathfindingRebakeNavmesh " + << "singleton, the mode indicates that a request has been sent for which a response has yet " + << "to be received. This could contribute to a crash on exit." << LL_ENDL; + } + + quit(); + } +} + +void LLMenuOptionPathfindingRebakeNavmesh::initialize() +{ + if (!mIsInitialized) + { + mIsInitialized = true; + + setMode(kRebakeNavMesh_Default); + + createNavMeshStatusListenerForCurrentRegion(); + + if ( !mRegionCrossingSlot.connected() ) + { + mRegionCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleRegionBoundaryCrossed, this)); + } + + if (!mAgentStateSlot.connected()) + { + mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleAgentState, this, _1)); + } + LLPathfindingManager::getInstance()->requestGetAgentState(); + } +} + +void LLMenuOptionPathfindingRebakeNavmesh::quit() +{ + if (mIsInitialized) + { + if (mNavMeshSlot.connected()) + { + mNavMeshSlot.disconnect(); + } + + if (mRegionCrossingSlot.connected()) + { + mRegionCrossingSlot.disconnect(); + } + + if (mAgentStateSlot.connected()) + { + mAgentStateSlot.disconnect(); + } + + mIsInitialized = false; + } +} + +bool LLMenuOptionPathfindingRebakeNavmesh::canRebakeRegion() const +{ + if (!mIsInitialized) + { + LL_ERRS("navmeshRebaking") << "LLMenuOptionPathfindingRebakeNavmesh class has not been initialized " + << "when the ability to rebake navmesh is being requested." << LL_ENDL; + } + return mCanRebakeRegion; +} + +LLMenuOptionPathfindingRebakeNavmesh::ERebakeNavMeshMode LLMenuOptionPathfindingRebakeNavmesh::getMode() const +{ + if (!mIsInitialized) + { + LL_ERRS("navmeshRebaking") << "LLMenuOptionPathfindingRebakeNavmesh class has not been initialized " + << "when the mode is being requested." << LL_ENDL; + } + return mRebakeNavMeshMode; +} + +void LLMenuOptionPathfindingRebakeNavmesh::sendRequestRebakeNavmesh() +{ + if (!mIsInitialized) + { + LL_ERRS("navmeshRebaking") << "LLMenuOptionPathfindingRebakeNavmesh class has not been initialized " + << "when the request is being made to rebake the navmesh." << LL_ENDL; + } + else + { + if (!canRebakeRegion()) + { + LL_WARNS("navmeshRebaking") << "attempting to rebake navmesh when user does not have permissions " + << "on this region" << LL_ENDL; + } + if (getMode() != kRebakeNavMesh_Available) + { + LL_WARNS("navmeshRebaking") << "attempting to rebake navmesh when mode is not available" + << LL_ENDL; + } + + setMode(kRebakeNavMesh_RequestSent); + LLPathfindingManager::getInstance()->requestRebakeNavMesh(boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleRebakeNavMeshResponse, this, _1)); + } +} + +void LLMenuOptionPathfindingRebakeNavmesh::setMode(ERebakeNavMeshMode pRebakeNavMeshMode) +{ + mRebakeNavMeshMode = pRebakeNavMeshMode; +} + +void LLMenuOptionPathfindingRebakeNavmesh::handleAgentState(BOOL pCanRebakeRegion) +{ + llassert(mIsInitialized); + mCanRebakeRegion = pCanRebakeRegion; +} + +void LLMenuOptionPathfindingRebakeNavmesh::handleRebakeNavMeshResponse(bool pResponseStatus) +{ + llassert(mIsInitialized); + if (mIsInitialized) + { + if (getMode() == kRebakeNavMesh_RequestSent) + { + setMode(pResponseStatus ? kRebakeNavMesh_InProgress : kRebakeNavMesh_Default); + } + + if (!pResponseStatus) + { + LLNotificationsUtil::add("PathfindingCannotRebakeNavmesh"); + } + } +} + +void LLMenuOptionPathfindingRebakeNavmesh::handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus) +{ + llassert(mIsInitialized); + if (mIsInitialized) + { + ERebakeNavMeshMode rebakeNavMeshMode = kRebakeNavMesh_Default; + if (pNavMeshStatus.isValid()) + { + switch (pNavMeshStatus.getStatus()) + { + case LLPathfindingNavMeshStatus::kPending : + case LLPathfindingNavMeshStatus::kRepending : + rebakeNavMeshMode = kRebakeNavMesh_Available; + break; + case LLPathfindingNavMeshStatus::kBuilding : + rebakeNavMeshMode = kRebakeNavMesh_InProgress; + break; + case LLPathfindingNavMeshStatus::kComplete : + rebakeNavMeshMode = kRebakeNavMesh_NotAvailable; + break; + default : + rebakeNavMeshMode = kRebakeNavMesh_Default; + llassert(0); + break; + } + } + + setMode(rebakeNavMeshMode); + } +} + +void LLMenuOptionPathfindingRebakeNavmesh::handleRegionBoundaryCrossed() +{ + llassert(mIsInitialized); + if (mIsInitialized) + { + createNavMeshStatusListenerForCurrentRegion(); + mCanRebakeRegion = FALSE; + LLPathfindingManager::getInstance()->requestGetAgentState(); + } +} + +void LLMenuOptionPathfindingRebakeNavmesh::createNavMeshStatusListenerForCurrentRegion() +{ + if (mNavMeshSlot.connected()) + { + mNavMeshSlot.disconnect(); + } + + LLViewerRegion *currentRegion = gAgent.getRegion(); + if (currentRegion != NULL) + { + mNavMeshSlot = LLPathfindingManager::getInstance()->registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleNavMeshStatus, this, _2)); + LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true); + } +} + diff --git a/indra/newview/llpanelpathfindingrebakenavmesh.h b/indra/newview/llmenuoptionpathfindingrebakenavmesh.h index 48764f2aa7..7b1d2873ba 100644 --- a/indra/newview/llpanelpathfindingrebakenavmesh.h +++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.h @@ -1,6 +1,6 @@ /** -* @file llpanelpathfindingrebakenavmesh.h -* @brief Header file for llpanelpathfindingrebakenavmesh +* @file llmenuoptionpathfindingrebakenavmesh.h +* @brief Header file for llmenuoptionpathfindingrebakenavmesh * @author Prep@lindenlab.com * * $LicenseInfo:firstyear=2012&license=viewerlgpl$ @@ -24,34 +24,22 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -#ifndef LL_LLPANELPATHFINDINGREBAKENAVMESH_H -#define LL_LLPANELPATHFINDINGREBAKENAVMESH_H +#ifndef LL_LLMENUOPTIONPATHFINDINGREBAKENAVMESH_H +#define LL_LLMENUOPTIONPATHFINDINGREBAKENAVMESH_H #include <boost/signals2.hpp> -#include "llpanel.h" #include "llpathfindingmanager.h" #include "llpathfindingnavmesh.h" +#include "llsingleton.h" -class LLButton; class LLPathfindingNavMeshStatus; -class LLPanelPathfindingRebakeNavmesh : public LLPanel +class LLMenuOptionPathfindingRebakeNavmesh : public LLSingleton<LLMenuOptionPathfindingRebakeNavmesh> { - - LOG_CLASS(LLPanelPathfindingRebakeNavmesh); + LOG_CLASS(LLMenuOptionPathfindingRebakeNavmesh); public: - static LLPanelPathfindingRebakeNavmesh* getInstance(); - - virtual BOOL postBuild(); - - virtual void draw(); - virtual BOOL handleToolTip( S32 x, S32 y, MASK mask ); - -protected: - -private: typedef enum { kRebakeNavMesh_Available, @@ -61,15 +49,21 @@ private: kRebakeNavMesh_Default = kRebakeNavMesh_NotAvailable } ERebakeNavMeshMode; - LLPanelPathfindingRebakeNavmesh(); - virtual ~LLPanelPathfindingRebakeNavmesh(); + LLMenuOptionPathfindingRebakeNavmesh(); + virtual ~LLMenuOptionPathfindingRebakeNavmesh(); - static LLPanelPathfindingRebakeNavmesh* getPanel(); + void initialize(); + void quit(); - void setMode(ERebakeNavMeshMode pRebakeNavMeshMode); + bool canRebakeRegion() const; ERebakeNavMeshMode getMode() const; - void onNavMeshRebakeClick(); + void sendRequestRebakeNavmesh(); + +protected: + +private: + void setMode(ERebakeNavMeshMode pRebakeNavMeshMode); void handleAgentState(BOOL pCanRebakeRegion); void handleRebakeNavMeshResponse(bool pResponseStatus); @@ -78,19 +72,14 @@ private: void createNavMeshStatusListenerForCurrentRegion(); - bool doDraw() const; - void updatePosition(); + bool mIsInitialized; - BOOL mCanRebakeRegion; + bool mCanRebakeRegion; ERebakeNavMeshMode mRebakeNavMeshMode; - LLButton* mNavMeshRebakeButton; - LLButton* mNavMeshSendingButton; - LLButton* mNavMeshBakingButton; - LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot; boost::signals2::connection mRegionCrossingSlot; LLPathfindingManager::agent_state_slot_t mAgentStateSlot; }; -#endif // LL_LLPANELPATHFINDINGREBAKENAVMESH_H +#endif // LL_LLMENUOPTIONPATHFINDINGREBAKENAVMESH_H diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index bc7f522848..1223615079 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -204,16 +204,30 @@ class LLMeshHeaderResponder : public LLCurl::Responder { public: LLVolumeParams mMeshParams; - + bool mProcessed; + LLMeshHeaderResponder(const LLVolumeParams& mesh_params) : mMeshParams(mesh_params) { - LLMeshRepoThread::sActiveHeaderRequests++; + LLMeshRepoThread::incActiveHeaderRequests(); + mProcessed = false; } ~LLMeshHeaderResponder() { - LLMeshRepoThread::sActiveHeaderRequests--; + if (!LLApp::isQuitting()) + { + if (!mProcessed) + { //something went wrong, retry + llwarns << "Timeout or service unavailable, retrying." << llendl; + LLMeshRepository::sHTTPRetryCount++; + LLMeshRepoThread::HeaderRequest req(mMeshParams); + LLMutexLock lock(gMeshRepo.mThread->mMutex); + gMeshRepo.mThread->mHeaderReqQ.push(req); + } + + LLMeshRepoThread::decActiveHeaderRequests(); + } } virtual void completedRaw(U32 status, const std::string& reason, @@ -229,16 +243,27 @@ public: S32 mLOD; U32 mRequestedBytes; U32 mOffset; + bool mProcessed; LLMeshLODResponder(const LLVolumeParams& mesh_params, S32 lod, U32 offset, U32 requested_bytes) : mMeshParams(mesh_params), mLOD(lod), mOffset(offset), mRequestedBytes(requested_bytes) { - LLMeshRepoThread::sActiveLODRequests++; + LLMeshRepoThread::incActiveLODRequests(); + mProcessed = false; } ~LLMeshLODResponder() { - LLMeshRepoThread::sActiveLODRequests--; + if (!LLApp::isQuitting()) + { + if (!mProcessed) + { + llwarns << "Killed without being processed, retrying." << llendl; + LLMeshRepository::sHTTPRetryCount++; + gMeshRepo.mThread->lockAndLoadMeshLOD(mMeshParams, mLOD); + } + LLMeshRepoThread::decActiveLODRequests(); + } } virtual void completedRaw(U32 status, const std::string& reason, @@ -253,10 +278,17 @@ public: LLUUID mMeshID; U32 mRequestedBytes; U32 mOffset; + bool mProcessed; LLMeshSkinInfoResponder(const LLUUID& id, U32 offset, U32 size) : mMeshID(id), mRequestedBytes(size), mOffset(offset) { + mProcessed = false; + } + + ~LLMeshSkinInfoResponder() + { + llassert(mProcessed); } virtual void completedRaw(U32 status, const std::string& reason, @@ -271,10 +303,17 @@ public: LLUUID mMeshID; U32 mRequestedBytes; U32 mOffset; + bool mProcessed; LLMeshDecompositionResponder(const LLUUID& id, U32 offset, U32 size) : mMeshID(id), mRequestedBytes(size), mOffset(offset) { + mProcessed = false; + } + + ~LLMeshDecompositionResponder() + { + llassert(mProcessed); } virtual void completedRaw(U32 status, const std::string& reason, @@ -289,10 +328,17 @@ public: LLUUID mMeshID; U32 mRequestedBytes; U32 mOffset; + bool mProcessed; LLMeshPhysicsShapeResponder(const LLUUID& id, U32 offset, U32 size) : mMeshID(id), mRequestedBytes(size), mOffset(offset) { + mProcessed = false; + } + + ~LLMeshPhysicsShapeResponder() + { + llassert(mProcessed); } virtual void completedRaw(U32 status, const std::string& reason, @@ -361,7 +407,20 @@ public: mModelData(model_data), mObserverHandle(observer_handle) { + if (mThread) + { + mThread->startRequest(); + } + } + + ~LLWholeModelFeeResponder() + { + if (mThread) + { + mThread->stopRequest(); + } } + virtual void completed(U32 status, const std::string& reason, const LLSD& content) @@ -372,7 +431,6 @@ public: cc = llsd_from_file("fake_upload_error.xml"); } - mThread->mPendingUploads--; dump_llsd_to_file(cc,make_dump_name("whole_model_fee_response_",dump_num)); LLWholeModelFeeObserver* observer = mObserverHandle.get(); @@ -415,7 +473,20 @@ public: mModelData(model_data), mObserverHandle(observer_handle) { + if (mThread) + { + mThread->startRequest(); + } } + + ~LLWholeModelUploadResponder() + { + if (mThread) + { + mThread->stopRequest(); + } + } + virtual void completed(U32 status, const std::string& reason, const LLSD& content) @@ -426,7 +497,6 @@ public: cc = llsd_from_file("fake_upload_error.xml"); } - mThread->mPendingUploads--; dump_llsd_to_file(cc,make_dump_name("whole_model_upload_response_",dump_num)); LLWholeModelUploadObserver* observer = mObserverHandle.get(); @@ -614,16 +684,24 @@ void LLMeshRepoThread::loadMeshPhysicsShape(const LLUUID& mesh_id) mPhysicsShapeRequests.insert(mesh_id); } +void LLMeshRepoThread::lockAndLoadMeshLOD(const LLVolumeParams& mesh_params, S32 lod) +{ + if (!LLAppViewer::isQuitting()) + { + loadMeshLOD(mesh_params, lod); + } +} + -void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod) -{ //protected by mSignal, no locking needed here +void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod) +{ //could be called from any thread + LLMutexLock lock(mMutex); mesh_header_map::iterator iter = mMeshHeader.find(mesh_params.getSculptID()); if (iter != mMeshHeader.end()) { //if we have the header, request LOD byte range LODRequest req(mesh_params, lod); { - LLMutexLock lock(mMutex); mLODReqQ.push(req); LLMeshRepository::sLODProcessing++; } @@ -641,7 +719,6 @@ void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod) } else { //if no header request is pending, fetch header - LLMutexLock lock(mMutex); mHeaderReqQ.push(req); mPendingLOD[mesh_params].push_back(lod); } @@ -921,6 +998,34 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id) return ret; } +//static +void LLMeshRepoThread::incActiveLODRequests() +{ + LLMutexLock lock(gMeshRepo.mThread->mMutex); + ++LLMeshRepoThread::sActiveLODRequests; +} + +//static +void LLMeshRepoThread::decActiveLODRequests() +{ + LLMutexLock lock(gMeshRepo.mThread->mMutex); + --LLMeshRepoThread::sActiveLODRequests; +} + +//static +void LLMeshRepoThread::incActiveHeaderRequests() +{ + LLMutexLock lock(gMeshRepo.mThread->mMutex); + ++LLMeshRepoThread::sActiveHeaderRequests; +} + +//static +void LLMeshRepoThread::decActiveHeaderRequests() +{ + LLMutexLock lock(gMeshRepo.mThread->mMutex); + --LLMeshRepoThread::sActiveHeaderRequests; +} + //return false if failed to get header bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, U32& count) { @@ -1097,11 +1202,13 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat mMeshHeader[mesh_id] = header; } + + LLMutexLock lock(mMutex); // make sure only one thread access mPendingLOD at the same time. + //check for pending requests pending_lod_map::iterator iter = mPendingLOD.find(mesh_params); if (iter != mPendingLOD.end()) { - LLMutexLock lock(mMutex); for (U32 i = 0; i < iter->second.size(); ++i) { LODRequest req(mesh_params, iter->second[i]); @@ -1620,7 +1727,7 @@ void LLMeshUploadThread::doWholeModelUpload() mCurlRequest->process(); //sleep for 10ms to prevent eating a whole core apr_sleep(10000); - } while (!LLAppViewer::isQuitting() && mCurlRequest->getQueued() > 0); + } while (!LLAppViewer::isQuitting() && mPendingUploads > 0); } delete mCurlRequest; @@ -1642,7 +1749,6 @@ void LLMeshUploadThread::requestWholeModelFee() wholeModelToLLSD(model_data,false); dump_llsd_to_file(model_data,make_dump_name("whole_model_fee_request_",dump_num)); - mPendingUploads++; LLCurlRequest::headers_t headers; { @@ -1659,7 +1765,7 @@ void LLMeshUploadThread::requestWholeModelFee() mCurlRequest->process(); //sleep for 10ms to prevent eating a whole core apr_sleep(10000); - } while (!LLApp::isQuitting() && mCurlRequest->getQueued() > 0); + } while (!LLApp::isQuitting() && mPendingUploads > 0); delete mCurlRequest; mCurlRequest = NULL; @@ -1796,7 +1902,14 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { - + mProcessed = true; + + // thread could have already be destroyed during logout + if( !gMeshRepo.mThread ) + { + return; + } + S32 data_size = buffer->countAfter(channels.in(), NULL); if (status < 200 || status > 400) @@ -1808,11 +1921,13 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason, { if (status == 499 || status == 503) { //timeout or service unavailable, try again + llwarns << "Timeout or service unavailable, retrying." << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshLOD(mMeshParams, mLOD); } else { + llassert(status == 499 || status == 503); //intentionally trigger a breakpoint llwarns << "Unhandled status " << status << llendl; } return; @@ -1851,6 +1966,14 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { + mProcessed = true; + + // thread could have already be destroyed during logout + if( !gMeshRepo.mThread ) + { + return; + } + S32 data_size = buffer->countAfter(channels.in(), NULL); if (status < 200 || status > 400) @@ -1862,11 +1985,13 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason { if (status == 499 || status == 503) { //timeout or service unavailable, try again + llwarns << "Timeout or service unavailable, retrying." << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshSkinInfo(mMeshID); } else { + llassert(status == 499 || status == 503); //intentionally trigger a breakpoint llwarns << "Unhandled status " << status << llendl; } return; @@ -1905,6 +2030,13 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { + mProcessed = true; + + if( !gMeshRepo.mThread ) + { + return; + } + S32 data_size = buffer->countAfter(channels.in(), NULL); if (status < 200 || status > 400) @@ -1916,11 +2048,13 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r { if (status == 499 || status == 503) { //timeout or service unavailable, try again + llwarns << "Timeout or service unavailable, retrying." << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshDecomposition(mMeshID); } else { + llassert(status == 499 || status == 503); //intentionally trigger a breakpoint llwarns << "Unhandled status " << status << llendl; } return; @@ -1959,6 +2093,14 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { + mProcessed = true; + + // thread could have already be destroyed during logout + if( !gMeshRepo.mThread ) + { + return; + } + S32 data_size = buffer->countAfter(channels.in(), NULL); if (status < 200 || status > 400) @@ -1970,11 +2112,13 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re { if (status == 499 || status == 503) { //timeout or service unavailable, try again + llwarns << "Timeout or service unavailable, retrying." << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID); } else { + llassert(status == 499 || status == 503); //intentionally trigger a breakpoint llwarns << "Unhandled status " << status << llendl; } return; @@ -2013,6 +2157,14 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { + mProcessed = true; + + // thread could have already be destroyed during logout + if( !gMeshRepo.mThread ) + { + return; + } + if (status < 200 || status > 400) { //llwarns @@ -2025,8 +2177,12 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, // TODO*: Add maximum retry logic, exponential backoff // and (somewhat more optional than the others) retries // again after some set period of time + + llassert(status == 503 || status == 499); + if (status == 503 || status == 499) { //retry + llwarns << "Timeout or service unavailable, retrying." << llendl; LLMeshRepository::sHTTPRetryCount++; LLMeshRepoThread::HeaderRequest req(mMeshParams); LLMutexLock lock(gMeshRepo.mThread->mMutex); @@ -2034,6 +2190,10 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, return; } + else + { + llwarns << "Unhandled status." << llendl; + } } S32 data_size = buffer->countAfter(channels.in(), NULL); @@ -2048,7 +2208,11 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, LLMeshRepository::sBytesReceived += llmin(data_size, 4096); - if (!gMeshRepo.mThread->headerReceived(mMeshParams, data, data_size)) + bool success = gMeshRepo.mThread->headerReceived(mMeshParams, data, data_size); + + llassert(success); + + if (!success) { llwarns << "Unable to parse mesh header: " diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index da81bb057b..8602271f84 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -322,7 +322,9 @@ public: virtual void run(); + void lockAndLoadMeshLOD(const LLVolumeParams& mesh_params, S32 lod); void loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod); + bool fetchMeshHeader(const LLVolumeParams& mesh_params, U32& count); bool fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, U32& count); bool headerReceived(const LLVolumeParams& mesh_params, U8* data, S32 data_size); @@ -351,6 +353,10 @@ public: // (should hold onto mesh_id and try again later if header info does not exist) bool fetchMeshPhysicsShape(const LLUUID& mesh_id); + static void incActiveLODRequests(); + static void decActiveLODRequests(); + static void incActiveHeaderRequests(); + static void decActiveHeaderRequests(); }; @@ -405,6 +411,9 @@ public: LLHandle<LLWholeModelFeeObserver> fee_observer= (LLHandle<LLWholeModelFeeObserver>()), LLHandle<LLWholeModelUploadObserver> upload_observer = (LLHandle<LLWholeModelUploadObserver>())); ~LLMeshUploadThread(); + void startRequest() { ++mPendingUploads; } + void stopRequest() { --mPendingUploads; } + bool finished() { return mFinished; } virtual void run(); void preStart(); diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 93f7146fc8..eb6591eb39 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -698,19 +698,28 @@ void LLPanelStandStopFlying::updatePosition() S32 y_pos = 0; S32 bottom_tb_center = 0; - if (LLToolBar* toolbar_bottom = gToolBarView->getChild<LLToolBar>("toolbar_bottom")) + if (LLToolBar* toolbar_bottom = gToolBarView->getToolbar(LLToolBarView::TOOLBAR_BOTTOM)) { y_pos = toolbar_bottom->getRect().getHeight(); bottom_tb_center = toolbar_bottom->getRect().getCenterX(); } S32 left_tb_width = 0; - if (LLToolBar* toolbar_left = gToolBarView->getChild<LLToolBar>("toolbar_left")) + if (LLToolBar* toolbar_left = gToolBarView->getToolbar(LLToolBarView::TOOLBAR_LEFT)) { left_tb_width = toolbar_left->getRect().getWidth(); } - if(LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("state_management_buttons_container")) + if (!mStateManagementButtons.get()) + { + LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("state_management_buttons_container"); + if (panel_ssf_container) + { + mStateManagementButtons = panel_ssf_container->getHandle(); + } + } + + if(LLPanel* panel_ssf_container = mStateManagementButtons.get()) { panel_ssf_container->setOrigin(0, y_pos); } diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index 744dd866d4..c525d9dfdb 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -172,6 +172,8 @@ private: */ LLHandle<LLPanel> mOriginalParent; + LLHandle<LLPanel> mStateManagementButtons; + /** * True if the panel is currently attached to the movement controls floater. * diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index a7059eb519..54522bb7f6 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -44,6 +44,8 @@ #include "llmutelist.h" +#include "pipeline.h" + #include <boost/tokenizer.hpp> #include "lldispatcher.h" @@ -192,6 +194,23 @@ BOOL LLMuteList::isLinden(const std::string& name) const return last_name == "Linden"; } +static LLVOAvatar* find_avatar(const LLUUID& id) +{ + LLViewerObject *obj = gObjectList.findObject(id); + while (obj && obj->isAttachment()) + { + obj = (LLViewerObject *)obj->getParent(); + } + + if (obj && obj->isAvatar()) + { + return (LLVOAvatar*)obj; + } + else + { + return NULL; + } +} BOOL LLMuteList::add(const LLMute& mute, U32 flags) { @@ -288,6 +307,12 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) LLViewerPartSim::getInstance()->clearParticlesByOwnerID(localmute.mID); } } + //mute local lights that are attached to the avatar + LLVOAvatar *avatarp = find_avatar(localmute.mID); + if (avatarp) + { + LLPipeline::removeMutedAVsLights(avatarp); + } return TRUE; } } diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 4e28d1f526..7f396b7b7e 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -64,11 +64,12 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p) mNameColumnIndex(p.name_column.column_index), mNameColumn(p.name_column.column_name), mAllowCallingCardDrop(p.allow_calling_card_drop), - mShortNames(p.short_names) + mShortNames(p.short_names), + mAvatarNameCacheConnection() {} // public -void LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, +LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, BOOL enabled, const std::string& suffix) { //llinfos << "LLNameListCtrl::addNameItem " << agent_id << llendl; @@ -78,7 +79,7 @@ void LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, item.enabled = enabled; item.target = INDIVIDUAL; - addNameItemRow(item, pos, suffix); + return addNameItemRow(item, pos, suffix); } // virtual, public @@ -204,7 +205,7 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask) { BOOL handled = FALSE; S32 column_index = getColumnIndexFromOffset(x); - LLScrollListItem* hit_item = hitItem(x, y); + LLNameListItem* hit_item = dynamic_cast<LLNameListItem*>(hitItem(x, y)); if (hit_item && column_index == mNameColumnIndex) { @@ -228,7 +229,7 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask) LLCoordGL pos( sticky_rect.mRight - info_icon_size, sticky_rect.mTop - (sticky_rect.getHeight() - icon->getHeight())/2 ); // Should we show a group or an avatar inspector? - bool is_group = hit_item->getValue()["is_group"].asBoolean(); + bool is_group = hit_item->isGroup(); LLToolTip::Params params; params.background_visible( false ); @@ -271,10 +272,10 @@ void LLNameListCtrl::addGroupNameItem(LLNameListCtrl::NameItem& item, EAddPositi addNameItemRow(item, pos); } -void LLNameListCtrl::addNameItem(LLNameListCtrl::NameItem& item, EAddPosition pos) +LLScrollListItem* LLNameListCtrl::addNameItem(LLNameListCtrl::NameItem& item, EAddPosition pos) { item.target = INDIVIDUAL; - addNameItemRow(item, pos); + return addNameItemRow(item, pos); } LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition pos, void* userdata) @@ -293,19 +294,12 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow( const std::string& suffix) { LLUUID id = name_item.value().asUUID(); - LLNameListItem* item = NULL; - - // Store item type so that we can invoke the proper inspector. - // *TODO Vadim: Is there a more proper way of storing additional item data? - { - LLNameListCtrl::NameItem item_p(name_item); - item_p.value = LLSD().with("uuid", id).with("is_group", name_item.target() == GROUP); - item = new LLNameListItem(item_p); - LLScrollListCtrl::addRow(item, item_p, pos); - } + LLNameListItem* item = new LLNameListItem(name_item,name_item.target() == GROUP); if (!item) return NULL; + LLScrollListCtrl::addRow(item, name_item, pos); + // use supplied name by default std::string fullname = name_item.name; switch(name_item.target) @@ -327,16 +321,20 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow( else if (LLAvatarNameCache::get(id, &av_name)) { if (mShortNames) - fullname = av_name.mDisplayName; + fullname = av_name.getDisplayName(); else fullname = av_name.getCompleteName(); } else { // ...schedule a callback - LLAvatarNameCache::get(id, - boost::bind(&LLNameListCtrl::onAvatarNameCache, - this, _1, _2)); + // This is not correct and will likely lead to partially populated lists in cases where avatar names are not cached. + // *TODO : Change this to have 2 callbacks : one callback per list item and one for the whole list. + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(id,boost::bind(&LLNameListCtrl::onAvatarNameCache,this, _1, _2, item->getHandle())); } break; } @@ -392,28 +390,28 @@ void LLNameListCtrl::removeNameItem(const LLUUID& agent_id) } void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id, - const LLAvatarName& av_name) + const LLAvatarName& av_name, + LLHandle<LLNameListItem> item) { + mAvatarNameCacheConnection.disconnect(); + std::string name; if (mShortNames) - name = av_name.mDisplayName; + name = av_name.getDisplayName(); else name = av_name.getCompleteName(); - item_list::iterator iter; - for (iter = getItemList().begin(); iter != getItemList().end(); iter++) + LLNameListItem* list_item = item.get(); + if (list_item && list_item->getUUID() == agent_id) { - LLScrollListItem* item = *iter; - if (item->getUUID() == agent_id) + LLScrollListCell* cell = list_item->getColumn(mNameColumnIndex); + if (cell) { - LLScrollListCell* cell = item->getColumn(mNameColumnIndex); - if (cell) - { - cell->setValue(name); - } + cell->setValue(name); + setNeedsSort(); } } - + dirtyColumns(); } @@ -431,3 +429,8 @@ void LLNameListCtrl::updateColumns() } } } + +void LLNameListCtrl::sortByName(BOOL ascending) +{ + sortByColumnIndex(mNameColumnIndex,ascending); +} diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index ca9956dc53..271802d48a 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -33,6 +33,36 @@ class LLAvatarName; +/** + * LLNameListCtrl item + * + * We don't use LLScrollListItem to be able to override getUUID(), which is needed + * because the name list item value is not simply an UUID but a map (uuid, is_group). + */ +class LLNameListItem : public LLScrollListItem, public LLHandleProvider<LLNameListItem> +{ +public: + bool isGroup() const { return mIsGroup; } + void setIsGroup(bool is_group) { mIsGroup = is_group; } + +protected: + friend class LLNameListCtrl; + + LLNameListItem( const LLScrollListItem::Params& p ) + : LLScrollListItem(p), mIsGroup(false) + { + } + + LLNameListItem( const LLScrollListItem::Params& p, bool is_group ) + : LLScrollListItem(p), mIsGroup(is_group) + { + } + +private: + bool mIsGroup; +}; + + class LLNameListCtrl : public LLScrollListCtrl, public LLInstanceTracker<LLNameListCtrl> { @@ -81,13 +111,20 @@ public: protected: LLNameListCtrl(const Params&); + virtual ~LLNameListCtrl() + { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + } friend class LLUICtrlFactory; public: // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. - void addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM, + LLScrollListItem* addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null); - void addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM); + LLScrollListItem* addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM); /*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL); LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null); @@ -110,38 +147,22 @@ public: void setAllowCallingCardDrop(BOOL b) { mAllowCallingCardDrop = b; } + void sortByName(BOOL ascending); + /*virtual*/ void updateColumns(); /*virtual*/ void mouseOverHighlightNthItem( S32 index ); private: void showInspector(const LLUUID& avatar_id, bool is_group); - void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); + void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, LLHandle<LLNameListItem> item); private: S32 mNameColumnIndex; std::string mNameColumn; BOOL mAllowCallingCardDrop; bool mShortNames; // display name only, no SLID + boost::signals2::connection mAvatarNameCacheConnection; }; -/** - * LLNameListCtrl item - * - * We don't use LLScrollListItem to be able to override getUUID(), which is needed - * because the name list item value is not simply an UUID but a map (uuid, is_group). - */ -class LLNameListItem : public LLScrollListItem -{ -public: - LLUUID getUUID() const { return getValue()["uuid"].asUUID(); } - -protected: - friend class LLNameListCtrl; - - LLNameListItem( const LLScrollListItem::Params& p ) - : LLScrollListItem(p) - { - } -}; #endif diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp deleted file mode 100644 index a7303ad035..0000000000 --- a/indra/newview/llnearbychat.cpp +++ /dev/null @@ -1,338 +0,0 @@ -/** - * @file LLNearbyChat.cpp - * @brief Nearby chat history scrolling panel implementation - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llnearbychat.h" -#include "llviewercontrol.h" -#include "llviewerwindow.h" -#include "llrootview.h" -//#include "llchatitemscontainerctrl.h" -#include "lliconctrl.h" -#include "llfloatersidepanelcontainer.h" -#include "llfocusmgr.h" -#include "lllogchat.h" -#include "llresizebar.h" -#include "llresizehandle.h" -#include "llmenugl.h" -#include "llviewermenu.h"//for gMenuHolder - -#include "llnearbychathandler.h" -#include "llchannelmanager.h" - -#include "llagent.h" // gAgent -#include "llchathistory.h" -#include "llstylemap.h" - -#include "llavatarnamecache.h" - -#include "lldraghandle.h" - -#include "llnearbychatbar.h" -#include "llfloaterreg.h" -#include "lltrans.h" - -static const S32 RESIZE_BAR_THICKNESS = 3; - - -static LLRegisterPanelClassWrapper<LLNearbyChat> t_panel_nearby_chat("panel_nearby_chat"); - -LLNearbyChat::LLNearbyChat(const LLNearbyChat::Params& p) -: LLPanel(p), - mChatHistory(NULL) -{ -} - -BOOL LLNearbyChat::postBuild() -{ - //menu - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; - - enable_registrar.add("NearbyChat.Check", boost::bind(&LLNearbyChat::onNearbyChatCheckContextMenuItem, this, _2)); - registrar.add("NearbyChat.Action", boost::bind(&LLNearbyChat::onNearbyChatContextMenuItemClicked, this, _2)); - - - LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_nearby_chat.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - if(menu) - mPopupMenuHandle = menu->getHandle(); - - gSavedSettings.declareS32("nearbychat_showicons_and_names",2,"NearByChat header settings",true); - - mChatHistory = getChild<LLChatHistory>("chat_history"); - - if(!LLPanel::postBuild()) - return false; - - return true; -} - -std::string appendTime() -{ - time_t utc_time; - utc_time = time_corrected(); - std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:[" - +LLTrans::getString("TimeMin")+"]"; - - LLSD substitution; - - substitution["datetime"] = (S32) utc_time; - LLStringUtil::format (timeStr, substitution); - - return timeStr; -} - - -void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args) -{ - LLChat& tmp_chat = const_cast<LLChat&>(chat); - - if(tmp_chat.mTimeStr.empty()) - tmp_chat.mTimeStr = appendTime(); - - bool use_plain_text_chat_history = gSavedSettings.getBOOL("PlainTextChatHistory"); - - if (!chat.mMuted) - { - tmp_chat.mFromName = chat.mFromName; - LLSD chat_args = args; - chat_args["use_plain_text_chat_history"] = use_plain_text_chat_history; - mChatHistory->appendMessage(chat, chat_args); - } - - if(archive) - { - mMessageArchive.push_back(chat); - if(mMessageArchive.size()>200) - mMessageArchive.erase(mMessageArchive.begin()); - } - - if (args["do_not_log"].asBoolean()) - { - return; - } - - if (gSavedPerAccountSettings.getBOOL("LogNearbyChat")) - { - std::string from_name = chat.mFromName; - - if (chat.mSourceType == CHAT_SOURCE_AGENT) - { - // if the chat is coming from an agent, log the complete name - LLAvatarName av_name; - LLAvatarNameCache::get(chat.mFromID, &av_name); - - if (!av_name.mIsDisplayNameDefault) - { - from_name = av_name.getCompleteName(); - } - } - - LLLogChat::saveHistory("chat", from_name, chat.mFromID, chat.mText); - } -} - -void LLNearbyChat::onNearbySpeakers() -{ - LLSD param; - param["people_panel_tab_name"] = "nearby_panel"; - LLFloaterSidePanelContainer::showPanel("people", "panel_people", param); -} - - -void LLNearbyChat::onNearbyChatContextMenuItemClicked(const LLSD& userdata) -{ -} -bool LLNearbyChat::onNearbyChatCheckContextMenuItem(const LLSD& userdata) -{ - std::string str = userdata.asString(); - if(str == "nearby_people") - onNearbySpeakers(); - return false; -} - -void LLNearbyChat::removeScreenChat() -{ - LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID"))); - if(chat_channel) - { - chat_channel->removeToastsFromChannel(); - } -} - -void LLNearbyChat::setVisible(BOOL visible) -{ - if(visible) - { - removeScreenChat(); - } - - LLPanel::setVisible(visible); -} - - -void LLNearbyChat::getAllowedRect(LLRect& rect) -{ - rect = gViewerWindow->getWorldViewRectScaled(); -} - -void LLNearbyChat::updateChatHistoryStyle() -{ - mChatHistory->clear(); - - LLSD do_not_log; - do_not_log["do_not_log"] = true; - for(std::vector<LLChat>::iterator it = mMessageArchive.begin();it!=mMessageArchive.end();++it) - { - // Update the messages without re-writing them to a log file. - addMessage(*it,false, do_not_log); - } -} - -//static -void LLNearbyChat::processChatHistoryStyleUpdate(const LLSD& newvalue) -{ - LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar"); - LLNearbyChat* nearby_chat = chat_bar->findChild<LLNearbyChat>("nearby_chat"); - if(nearby_chat) - nearby_chat->updateChatHistoryStyle(); -} - -bool isWordsName(const std::string& name) -{ - // checking to see if it's display name plus username in parentheses - S32 open_paren = name.find(" (", 0); - S32 close_paren = name.find(')', 0); - - if (open_paren != std::string::npos && - close_paren == name.length()-1) - { - return true; - } - else - { - //checking for a single space - S32 pos = name.find(' ', 0); - return std::string::npos != pos && name.rfind(' ', name.length()) == pos && 0 != pos && name.length()-1 != pos; - } -} - -void LLNearbyChat::loadHistory() -{ - LLSD do_not_log; - do_not_log["do_not_log"] = true; - - std::list<LLSD> history; - LLLogChat::loadAllHistory("chat", history); - - std::list<LLSD>::const_iterator it = history.begin(); - while (it != history.end()) - { - const LLSD& msg = *it; - - std::string from = msg[IM_FROM]; - LLUUID from_id; - if (msg[IM_FROM_ID].isDefined()) - { - from_id = msg[IM_FROM_ID].asUUID(); - } - else - { - std::string legacy_name = gCacheName->buildLegacyName(from); - gCacheName->getUUID(legacy_name, from_id); - } - - LLChat chat; - chat.mFromName = from; - chat.mFromID = from_id; - chat.mText = msg[IM_TEXT].asString(); - chat.mTimeStr = msg[IM_TIME].asString(); - chat.mChatStyle = CHAT_STYLE_HISTORY; - - chat.mSourceType = CHAT_SOURCE_AGENT; - if (from_id.isNull() && SYSTEM_FROM == from) - { - chat.mSourceType = CHAT_SOURCE_SYSTEM; - - } - else if (from_id.isNull()) - { - chat.mSourceType = isWordsName(from) ? CHAT_SOURCE_UNKNOWN : CHAT_SOURCE_OBJECT; - } - - addMessage(chat, true, do_not_log); - - it++; - } -} - -//static -LLNearbyChat* LLNearbyChat::getInstance() -{ - LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar"); - return chat_bar->findChild<LLNearbyChat>("nearby_chat"); -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLNearbyChat::onFocusReceived() -{ - setBackgroundOpaque(true); - LLPanel::onFocusReceived(); -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLNearbyChat::onFocusLost() -{ - setBackgroundOpaque(false); - 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 LLPanel::handleMouseDown(x, y, mask); -} - -void LLNearbyChat::draw() -{ - // *HACK: Update transparency type depending on whether our children have focus. - // This is needed because this floater is chrome and thus cannot accept focus, so - // the transparency type setting code from LLFloater::setFocus() isn't reached. - if (getTransparencyType() != TT_DEFAULT) - { - setTransparencyType(hasFocus() ? TT_ACTIVE : TT_INACTIVE); - } - - LLPanel::draw(); -} diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h deleted file mode 100644 index 7c5975cbc5..0000000000 --- a/indra/newview/llnearbychat.h +++ /dev/null @@ -1,83 +0,0 @@ - /** - * @file llnearbychat.h - * @brief nearby chat history scrolling panel implementation - * - * $LicenseInfo:firstyear=2004&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLNEARBYCHAT_H_ -#define LL_LLNEARBYCHAT_H_ - -#include "llscrollbar.h" -#include "llviewerchat.h" -#include "llfloater.h" - -class LLResizeBar; -class LLChatHistory; - -class LLNearbyChat: public LLPanel -{ -public: - LLNearbyChat(const Params& p = LLPanel::getDefaultParams()); - - BOOL postBuild (); - - /** @param archive true - to save a message to the chat history log */ - void addMessage (const LLChat& message,bool archive = true, const LLSD &args = LLSD()); - void onNearbyChatContextMenuItemClicked(const LLSD& userdata); - bool onNearbyChatCheckContextMenuItem(const LLSD& userdata); - - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual void draw(); - - // focus overrides - /*virtual*/ void onFocusLost(); - /*virtual*/ void onFocusReceived(); - - /*virtual*/ void setVisible(BOOL visible); - - virtual void updateChatHistoryStyle(); - - static void processChatHistoryStyleUpdate(const LLSD& newvalue); - - void loadHistory(); - - static LLNearbyChat* getInstance(); - void removeScreenChat(); - -private: - - void getAllowedRect (LLRect& rect); - - void onNearbySpeakers (); - - -private: - LLHandle<LLView> mPopupMenuHandle; - LLChatHistory* mChatHistory; - - std::vector<LLChat> mMessageArchive; -}; - -#endif - - diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp deleted file mode 100644 index f8f0f7d243..0000000000 --- a/indra/newview/llnearbychatbar.cpp +++ /dev/null @@ -1,680 +0,0 @@ -/** - * @file llnearbychatbar.cpp - * @brief LLNearbyChatBar class implementation - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "message.h" - -#include "llappviewer.h" -#include "llfloaterreg.h" -#include "lltrans.h" - -#include "llfirstuse.h" -#include "llnearbychatbar.h" -#include "llnearbychatbarlistener.h" -#include "llagent.h" -#include "llgesturemgr.h" -#include "llmultigesture.h" -#include "llkeyboard.h" -#include "llanimationstates.h" -#include "llviewerstats.h" -#include "llcommandhandler.h" -#include "llviewercontrol.h" -#include "llnavigationbar.h" -#include "llwindow.h" -#include "llviewerwindow.h" -#include "llrootview.h" -#include "llviewerchat.h" -#include "llnearbychat.h" -#include "lltranslate.h" - -#include "llresizehandle.h" -#include "llautoreplace.h" - -S32 LLNearbyChatBar::sLastSpecialChatChannel = 0; - -const S32 EXPANDED_HEIGHT = 300; -const S32 COLLAPSED_HEIGHT = 60; -const S32 EXPANDED_MIN_HEIGHT = 150; - -// legacy callback glue -void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); - -struct LLChatTypeTrigger { - std::string name; - EChatType type; -}; - -static LLChatTypeTrigger sChatTypeTriggers[] = { - { "/whisper" , CHAT_TYPE_WHISPER}, - { "/shout" , CHAT_TYPE_SHOUT} -}; - -LLNearbyChatBar::LLNearbyChatBar(const LLSD& key) -: LLFloater(key), - mChatBox(NULL), - mNearbyChat(NULL), - mOutputMonitor(NULL), - mSpeakerMgr(NULL), - mExpandedHeight(COLLAPSED_HEIGHT + EXPANDED_HEIGHT) -{ - mSpeakerMgr = LLLocalSpeakerMgr::getInstance(); - mListener.reset(new LLNearbyChatBarListener(*this)); -} - -//virtual -BOOL LLNearbyChatBar::postBuild() -{ - mChatBox = getChild<LLLineEditor>("chat_box"); - - mChatBox->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2)); - mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this)); - mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this); - mChatBox->setFocusLostCallback(boost::bind(&onChatBoxFocusLost, _1, this)); - mChatBox->setFocusReceivedCallback(boost::bind(&LLNearbyChatBar::onChatBoxFocusReceived, this)); - - mChatBox->setIgnoreArrowKeys( FALSE ); - mChatBox->setCommitOnFocusLost( FALSE ); - mChatBox->setRevertOnEsc( FALSE ); - mChatBox->setIgnoreTab(TRUE); - mChatBox->setPassDelete(TRUE); - mChatBox->setReplaceNewlinesWithSpaces(FALSE); - mChatBox->setEnableLineHistory(TRUE); - mChatBox->setFont(LLViewerChat::getChatFont()); - - mNearbyChat = getChildView("nearby_chat"); - - gSavedSettings.declareBOOL("nearbychat_history_visibility", mNearbyChat->getVisible(), "Visibility state of nearby chat history", TRUE); - BOOL show_nearby_chat = gSavedSettings.getBOOL("nearbychat_history_visibility"); - - LLButton* show_btn = getChild<LLButton>("show_nearby_chat"); - show_btn->setCommitCallback(boost::bind(&LLNearbyChatBar::onToggleNearbyChatPanel, this)); - show_btn->setToggleState(show_nearby_chat); - - mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator"); - mOutputMonitor->setVisible(FALSE); - - showNearbyChatPanel(show_nearby_chat); - - // Register for font change notifications - LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1)); - - enableResizeCtrls(true, true, false); - - return TRUE; -} - -// virtual -void LLNearbyChatBar::onOpen(const LLSD& key) -{ - showTranslationCheckbox(LLTranslate::isTranslationConfigured()); -} - -bool LLNearbyChatBar::applyRectControl() -{ - bool rect_controlled = LLFloater::applyRectControl(); - - if (!mNearbyChat->getVisible()) - { - reshape(getRect().getWidth(), getMinHeight()); - enableResizeCtrls(true, true, false); - } - else - { - enableResizeCtrls(true); - setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); - } - - return rect_controlled; -} - -void LLNearbyChatBar::onChatFontChange(LLFontGL* fontp) -{ - // Update things with the new font whohoo - if (mChatBox) - { - mChatBox->setFont(fontp); - } -} - -//static -LLNearbyChatBar* LLNearbyChatBar::getInstance() -{ - return LLFloaterReg::getTypedInstance<LLNearbyChatBar>("chat_bar"); -} - -void LLNearbyChatBar::showHistory() -{ - openFloater(); - - if (!getChildView("nearby_chat")->getVisible()) - { - onToggleNearbyChatPanel(); - } -} - -void LLNearbyChatBar::showTranslationCheckbox(BOOL show) -{ - getChild<LLUICtrl>("translate_chat_checkbox_lp")->setVisible(show); -} - -void LLNearbyChatBar::draw() -{ - displaySpeakingIndicator(); - LLFloater::draw(); -} - -std::string LLNearbyChatBar::getCurrentChat() -{ - return mChatBox ? mChatBox->getText() : LLStringUtil::null; -} - -// virtual -BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask ) -{ - BOOL handled = FALSE; - - if( KEY_RETURN == key && mask == MASK_CONTROL) - { - // shout - sendChat(CHAT_TYPE_SHOUT); - handled = TRUE; - } - - return handled; -} - -BOOL LLNearbyChatBar::matchChatTypeTrigger(const std::string& in_str, std::string* out_str) -{ - U32 in_len = in_str.length(); - S32 cnt = sizeof(sChatTypeTriggers) / sizeof(*sChatTypeTriggers); - - for (S32 n = 0; n < cnt; n++) - { - if (in_len > sChatTypeTriggers[n].name.length()) - continue; - - std::string trigger_trunc = sChatTypeTriggers[n].name; - LLStringUtil::truncate(trigger_trunc, in_len); - - if (!LLStringUtil::compareInsensitive(in_str, trigger_trunc)) - { - *out_str = sChatTypeTriggers[n].name; - return TRUE; - } - } - - return FALSE; -} - -void LLNearbyChatBar::onChatBoxKeystroke(LLLineEditor* caller, void* userdata) -{ - LLFirstUse::otherAvatarChatFirst(false); - - LLNearbyChatBar* self = (LLNearbyChatBar *)userdata; - - LLWString raw_text = self->mChatBox->getWText(); - - // Can't trim the end, because that will cause autocompletion - // to eat trailing spaces that might be part of a gesture. - LLWStringUtil::trimHead(raw_text); - - S32 length = raw_text.length(); - - if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences - { - gAgent.startTyping(); - } - else - { - gAgent.stopTyping(); - } - - /* Doesn't work -- can't tell the difference between a backspace - that killed the selection vs. backspace at the end of line. - if (length > 1 - && text[0] == '/' - && key == KEY_BACKSPACE) - { - // the selection will already be deleted, but we need to trim - // off the character before - std::string new_text = raw_text.substr(0, length-1); - self->mInputEditor->setText( new_text ); - self->mInputEditor->setCursorToEnd(); - length = length - 1; - } - */ - - KEY key = gKeyboard->currentKey(); - - // Ignore "special" keys, like backspace, arrows, etc. - if (length > 1 - && raw_text[0] == '/' - && key < KEY_SPECIAL) - { - // we're starting a gesture, attempt to autocomplete - - std::string utf8_trigger = wstring_to_utf8str(raw_text); - std::string utf8_out_str(utf8_trigger); - - if (LLGestureMgr::instance().matchPrefix(utf8_trigger, &utf8_out_str)) - { - std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size()); - self->mChatBox->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part - S32 outlength = self->mChatBox->getLength(); // in characters - - // Select to end of line, starting from the character - // after the last one the user typed. - self->mChatBox->setSelection(length, outlength); - } - else if (matchChatTypeTrigger(utf8_trigger, &utf8_out_str)) - { - std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size()); - self->mChatBox->setText(utf8_trigger + rest_of_match + " "); // keep original capitalization for user-entered part - self->mChatBox->setCursorToEnd(); - } - - //llinfos << "GESTUREDEBUG " << trigger - // << " len " << length - // << " outlen " << out_str.getLength() - // << llendl; - } -} - -// static -void LLNearbyChatBar::onChatBoxFocusLost(LLFocusableElement* caller, void* userdata) -{ - // stop typing animation - gAgent.stopTyping(); -} - -void LLNearbyChatBar::onChatBoxFocusReceived() -{ - mChatBox->setEnabled(!gDisconnected); -} - -EChatType LLNearbyChatBar::processChatTypeTriggers(EChatType type, std::string &str) -{ - U32 length = str.length(); - S32 cnt = sizeof(sChatTypeTriggers) / sizeof(*sChatTypeTriggers); - - for (S32 n = 0; n < cnt; n++) - { - if (length >= sChatTypeTriggers[n].name.length()) - { - std::string trigger = str.substr(0, sChatTypeTriggers[n].name.length()); - - if (!LLStringUtil::compareInsensitive(trigger, sChatTypeTriggers[n].name)) - { - U32 trigger_length = sChatTypeTriggers[n].name.length(); - - // It's to remove space after trigger name - if (length > trigger_length && str[trigger_length] == ' ') - trigger_length++; - - str = str.substr(trigger_length, length); - - if (CHAT_TYPE_NORMAL == type) - return sChatTypeTriggers[n].type; - else - break; - } - } - } - - return type; -} - -void LLNearbyChatBar::sendChat( EChatType type ) -{ - if (mChatBox) - { - LLWString text = mChatBox->getConvertedText(); - if (!text.empty()) - { - // store sent line in history, duplicates will get filtered - mChatBox->updateHistory(); - // Check if this is destined for another channel - S32 channel = 0; - stripChannelNumber(text, &channel); - - std::string utf8text = wstring_to_utf8str(text); - // Try to trigger a gesture, if not chat to a script. - std::string utf8_revised_text; - if (0 == channel) - { - // discard returned "found" boolean - LLGestureMgr::instance().triggerAndReviseString(utf8text, &utf8_revised_text); - } - else - { - utf8_revised_text = utf8text; - } - - utf8_revised_text = utf8str_trim(utf8_revised_text); - - type = processChatTypeTriggers(type, utf8_revised_text); - - if (!utf8_revised_text.empty()) - { - // Chat with animation - sendChatFromViewer(utf8_revised_text, type, TRUE); - } - } - - mChatBox->setText(LLStringExplicit("")); - } - - gAgent.stopTyping(); - - // If the user wants to stop chatting on hitting return, lose focus - // and go out of chat mode. - if (gSavedSettings.getBOOL("CloseChatOnReturn")) - { - stopChat(); - } -} - -void LLNearbyChatBar::showNearbyChatPanel(bool show) -{ - if (!show) - { - if (mNearbyChat->getVisible() && !isMinimized()) - { - mExpandedHeight = getRect().getHeight(); - } - setResizeLimits(getMinWidth(), COLLAPSED_HEIGHT); - mNearbyChat->setVisible(FALSE); - reshape(getRect().getWidth(), COLLAPSED_HEIGHT); - enableResizeCtrls(true, true, false); - storeRectControl(); - } - else - { - mNearbyChat->setVisible(TRUE); - setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); - reshape(getRect().getWidth(), mExpandedHeight); - enableResizeCtrls(true); - storeRectControl(); - } - - gSavedSettings.setBOOL("nearbychat_history_visibility", mNearbyChat->getVisible()); -} - -void LLNearbyChatBar::onToggleNearbyChatPanel() -{ - showNearbyChatPanel(!mNearbyChat->getVisible()); -} - -void LLNearbyChatBar::setMinimized(BOOL b) -{ - LLNearbyChat* nearby_chat = getChild<LLNearbyChat>("nearby_chat"); - // when unminimizing with nearby chat visible, go ahead and kill off screen chats - if (!b && nearby_chat->getVisible()) - { - nearby_chat->removeScreenChat(); - } - LLFloater::setMinimized(b); -} - -void LLNearbyChatBar::onChatBoxCommit() -{ - if (mChatBox->getText().length() > 0) - { - sendChat(CHAT_TYPE_NORMAL); - } - - gAgent.stopTyping(); -} - -void LLNearbyChatBar::displaySpeakingIndicator() -{ - LLSpeakerMgr::speaker_list_t speaker_list; - LLUUID id; - - id.setNull(); - mSpeakerMgr->update(TRUE); - mSpeakerMgr->getSpeakerList(&speaker_list, FALSE); - - for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i) - { - LLPointer<LLSpeaker> s = *i; - if (s->mSpeechVolume > 0 || s->mStatus == LLSpeaker::STATUS_SPEAKING) - { - id = s->mID; - break; - } - } - - if (!id.isNull()) - { - mOutputMonitor->setVisible(TRUE); - mOutputMonitor->setSpeakerId(id); - } - else - { - mOutputMonitor->setVisible(FALSE); - } -} - -void LLNearbyChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate) -{ - sendChatFromViewer(utf8str_to_wstring(utf8text), type, animate); -} - -void LLNearbyChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) -{ - // Look for "/20 foo" channel chats. - S32 channel = 0; - LLWString out_text = stripChannelNumber(wtext, &channel); - std::string utf8_out_text = wstring_to_utf8str(out_text); - std::string utf8_text = wstring_to_utf8str(wtext); - - utf8_text = utf8str_trim(utf8_text); - if (!utf8_text.empty()) - { - utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1); - } - - // Don't animate for chats people can't hear (chat to scripts) - if (animate && (channel == 0)) - { - if (type == CHAT_TYPE_WHISPER) - { - lldebugs << "You whisper " << utf8_text << llendl; - gAgent.sendAnimationRequest(ANIM_AGENT_WHISPER, ANIM_REQUEST_START); - } - else if (type == CHAT_TYPE_NORMAL) - { - lldebugs << "You say " << utf8_text << llendl; - gAgent.sendAnimationRequest(ANIM_AGENT_TALK, ANIM_REQUEST_START); - } - else if (type == CHAT_TYPE_SHOUT) - { - lldebugs << "You shout " << utf8_text << llendl; - gAgent.sendAnimationRequest(ANIM_AGENT_SHOUT, ANIM_REQUEST_START); - } - else - { - llinfos << "send_chat_from_viewer() - invalid volume" << llendl; - return; - } - } - else - { - if (type != CHAT_TYPE_START && type != CHAT_TYPE_STOP) - { - lldebugs << "Channel chat: " << utf8_text << llendl; - } - } - - send_chat_from_viewer(utf8_out_text, type, channel); -} - -// static -void LLNearbyChatBar::startChat(const char* line) -{ - LLNearbyChatBar* cb = LLNearbyChatBar::getInstance(); - - if (!cb ) - return; - - cb->setVisible(TRUE); - cb->setFocus(TRUE); - cb->mChatBox->setFocus(TRUE); - - if (line) - { - std::string line_string(line); - cb->mChatBox->setText(line_string); - } - - cb->mChatBox->setCursorToEnd(); -} - -// Exit "chat mode" and do the appropriate focus changes -// static -void LLNearbyChatBar::stopChat() -{ - LLNearbyChatBar* cb = LLNearbyChatBar::getInstance(); - - if (!cb) - return; - - cb->mChatBox->setFocus(FALSE); - - // stop typing animation - gAgent.stopTyping(); -} - -// If input of the form "/20foo" or "/20 foo", returns "foo" and channel 20. -// Otherwise returns input and channel 0. -LLWString LLNearbyChatBar::stripChannelNumber(const LLWString &mesg, S32* channel) -{ - if (mesg[0] == '/' - && mesg[1] == '/') - { - // This is a "repeat channel send" - *channel = sLastSpecialChatChannel; - return mesg.substr(2, mesg.length() - 2); - } - else if (mesg[0] == '/' - && mesg[1] - && LLStringOps::isDigit(mesg[1])) - { - // This a special "/20" speak on a channel - S32 pos = 0; - - // Copy the channel number into a string - LLWString channel_string; - llwchar c; - do - { - c = mesg[pos+1]; - channel_string.push_back(c); - pos++; - } - while(c && pos < 64 && LLStringOps::isDigit(c)); - - // Move the pointer forward to the first non-whitespace char - // Check isspace before looping, so we can handle "/33foo" - // as well as "/33 foo" - while(c && iswspace(c)) - { - c = mesg[pos+1]; - pos++; - } - - sLastSpecialChatChannel = strtol(wstring_to_utf8str(channel_string).c_str(), NULL, 10); - *channel = sLastSpecialChatChannel; - return mesg.substr(pos, mesg.length() - pos); - } - else - { - // This is normal chat. - *channel = 0; - return mesg; - } -} - -void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel) -{ - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_ChatFromViewer); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_ChatData); - msg->addStringFast(_PREHASH_Message, utf8_out_text); - msg->addU8Fast(_PREHASH_Type, type); - msg->addS32("Channel", channel); - - gAgent.sendReliableMessage(); - - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT); -} - -class LLChatCommandHandler : public LLCommandHandler -{ -public: - // not allowed from outside the app - LLChatCommandHandler() : LLCommandHandler("chat", UNTRUSTED_BLOCK) { } - - // Your code here - bool handle(const LLSD& tokens, const LLSD& query_map, - LLMediaCtrl* web) - { - bool retval = false; - // Need at least 2 tokens to have a valid message. - if (tokens.size() < 2) - { - retval = false; - } - else - { - S32 channel = tokens[0].asInteger(); - // VWR-19499 Restrict function to chat channels greater than 0. - if ((channel > 0) && (channel < CHAT_CHANNEL_DEBUG)) - { - retval = true; - // Send unescaped message, see EXT-6353. - std::string unescaped_mesg (LLURI::unescape(tokens[1].asString())); - send_chat_from_viewer(unescaped_mesg, CHAT_TYPE_NORMAL, channel); - } - else - { - retval = false; - // Tell us this is an unsupported SLurl. - } - } - return retval; - } -}; - -// Creating the object registers with the dispatcher. -LLChatCommandHandler gChatHandler; - - diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp index 89fe7bb3c2..58a9b01a45 100644 --- a/indra/newview/llnotificationalerthandler.cpp +++ b/indra/newview/llnotificationalerthandler.cpp @@ -29,6 +29,7 @@ #include "llnotificationhandler.h" +#include "llagentcamera.h" #include "llnotifications.h" #include "llprogressview.h" #include "lltoastnotifypanel.h" @@ -40,10 +41,10 @@ using namespace LLNotificationsUI; //-------------------------------------------------------------------------- -LLAlertHandler::LLAlertHandler(e_notification_type type, const LLSD& id) : mIsModal(false) +LLAlertHandler::LLAlertHandler(const std::string& name, const std::string& notification_type, bool is_modal) +: LLSystemNotificationHandler(name, notification_type), + mIsModal(is_modal) { - mType = type; - LLScreenChannelBase::Params p; p.id = LLUUID(gSavedSettings.getString("AlertChannelUUID")); p.display_toasts_always = true; @@ -68,79 +69,83 @@ void LLAlertHandler::initChannel() } //-------------------------------------------------------------------------- -bool LLAlertHandler::processNotification(const LLSD& notify) +bool LLAlertHandler::processNotification(const LLNotificationPtr& notification) { if(mChannel.isDead()) { return false; } - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - if(!notification) - return false; - // arrange a channel on a screen if(!mChannel.get()->getVisible()) { initChannel(); } - if (notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "load") + if (notification->canLogToIM() && notification->hasFormElements()) { - if (LLHandlerUtil::canSpawnSessionAndLogToIM(notification)) - { - const std::string name = LLHandlerUtil::getSubstitutionName(notification); - - LLUUID from_id = notification->getPayload()["from_id"]; - - // firstly create session... - LLHandlerUtil::spawnIMSession(name, from_id); - - // ...then log message to have IM Well notified about new message - LLHandlerUtil::logToIMP2P(notification); - } - - LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal); - LLToast::Params p; - p.notif_id = notification->getID(); - p.notification = notification; - p.panel = dynamic_cast<LLToastPanel*>(alert_dialog); - p.enable_hide_btn = false; - p.can_fade = false; - p.is_modal = mIsModal; - p.on_delete_toast = boost::bind(&LLAlertHandler::onDeleteToast, this, _1); - - // Show alert in middle of progress view (during teleport) (EXT-1093) - LLProgressView* progress = gViewerWindow->getProgressView(); - LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled(); - mChannel.get()->updatePositionAndSize(rc); - - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); - if(channel) - channel->addToast(p); - } - else if (notify["sigtype"].asString() == "change") - { - LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal); - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); - if(channel) - channel->modifyToastByNotificationID(notification->getID(), (LLToastPanel*)alert_dialog); - } - else - { - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); - if(channel) - channel->killToastByNotificationID(notification->getID()); + const std::string name = LLHandlerUtil::getSubstitutionName(notification); + + LLUUID from_id = notification->getPayload()["from_id"]; + + // firstly create session... + LLHandlerUtil::spawnIMSession(name, from_id); + + // ...then log message to have IM Well notified about new message + LLHandlerUtil::logToIMP2P(notification); } + + LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal); + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.panel = dynamic_cast<LLToastPanel*>(alert_dialog); + p.enable_hide_btn = false; + p.can_fade = false; + p.is_modal = mIsModal; + p.on_delete_toast = boost::bind(&LLAlertHandler::onDeleteToast, this, _1); + + // Show alert in middle of progress view (during teleport) (EXT-1093) + LLProgressView* progress = gViewerWindow->getProgressView(); + LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled(); + mChannel.get()->updatePositionAndSize(rc); + + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) + channel->addToast(p); + return false; } +void LLAlertHandler::onChange( LLNotificationPtr notification ) +{ + LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal); + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) + channel->modifyToastByNotificationID(notification->getID(), (LLToastPanel*)alert_dialog); +} + //-------------------------------------------------------------------------- +LLViewerAlertHandler::LLViewerAlertHandler(const std::string& name, const std::string& notification_type) + : LLSystemNotificationHandler(name, notification_type) +{ +} -void LLAlertHandler::onDeleteToast(LLToast* toast) +bool LLViewerAlertHandler::processNotification(const LLNotificationPtr& p) { + if (gHeadlessClient) + { + LL_INFOS("LLViewerAlertHandler") << "Alert: " << p->getName() << LL_ENDL; + } + + // If we're in mouselook, the mouse is hidden and so the user can't click + // the dialog buttons. In that case, change to First Person instead. + if( gAgentCamera.cameraMouselook() ) + { + gAgentCamera.changeCameraToDefault(); + } + + return false; } -//-------------------------------------------------------------------------- diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp index ad51389241..8fef102cf8 100644 --- a/indra/newview/llnotificationgrouphandler.cpp +++ b/indra/newview/llnotificationgrouphandler.cpp @@ -37,15 +37,13 @@ using namespace LLNotificationsUI; //-------------------------------------------------------------------------- -LLGroupHandler::LLGroupHandler(e_notification_type type, const LLSD& id) +LLGroupHandler::LLGroupHandler() +: LLCommunicationNotificationHandler("Group Notifications", "groupnotify") { - mType = type; - // Getting a Channel for our notifications LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel(); if(channel) { - channel->setOnRejectToastCallback(boost::bind(&LLGroupHandler::onRejectToast, this, _1)); mChannel = channel->getHandle(); } } @@ -64,72 +62,37 @@ void LLGroupHandler::initChannel() } //-------------------------------------------------------------------------- -bool LLGroupHandler::processNotification(const LLSD& notify) +bool LLGroupHandler::processNotification(const LLNotificationPtr& notification) { if(mChannel.isDead()) { return false; } - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - if(!notification) - return false; - // arrange a channel on a screen if(!mChannel.get()->getVisible()) { initChannel(); } - if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change") - { - LLHandlerUtil::logGroupNoticeToIMGroup(notification); + LLHandlerUtil::logGroupNoticeToIMGroup(notification); - LLPanel* notify_box = new LLToastGroupNotifyPanel(notification); - LLToast::Params p; - p.notif_id = notification->getID(); - p.notification = notification; - p.panel = notify_box; - p.on_delete_toast = boost::bind(&LLGroupHandler::onDeleteToast, this, _1); + LLPanel* notify_box = new LLToastGroupNotifyPanel(notification); + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.panel = notify_box; + p.on_delete_toast = boost::bind(&LLGroupHandler::onDeleteToast, this, _1); - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); - if(channel) - channel->addToast(p); + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) + channel->addToast(p); - // send a signal to the counter manager - mNewNotificationSignal(); + LLGroupActions::refresh_notices(); - LLGroupActions::refresh_notices(); - } - else if (notify["sigtype"].asString() == "delete") - { - mChannel.get()->killToastByNotificationID(notification->getID()); - } return false; } -//-------------------------------------------------------------------------- -void LLGroupHandler::onDeleteToast(LLToast* toast) -{ - // send a signal to the counter manager - mDelNotificationSignal(); - - // send a signal to a listener to let him perform some action - // in this case listener is a SysWellWindow and it will remove a corresponding item from its list - mNotificationIDSignal(toast->getNotificationID()); -} - -//-------------------------------------------------------------------------- -void LLGroupHandler::onRejectToast(LLUUID& id) -{ - LLNotificationPtr notification = LLNotifications::instance().find(id); - - if (notification && LLNotificationManager::getInstance()->getHandlerForNotification(notification->getType()) == this) - { - LLNotifications::instance().cancel(notification); - } -} //-------------------------------------------------------------------------- diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 3569ad6447..bff4efa9ea 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -27,33 +27,20 @@ #ifndef LL_LLNOTIFICATIONHANDLER_H #define LL_LLNOTIFICATIONHANDLER_H +#include <boost/intrusive_ptr.hpp> #include "llwindow.h" -//#include "llnotificationsutil.h" +#include "llnotifications.h" #include "llchannelmanager.h" #include "llchat.h" #include "llinstantmessage.h" #include "llnotificationptr.h" -class LLIMFloater; +class LLFloaterIMSession; namespace LLNotificationsUI { -// ENotificationType enumerates all possible types of notifications that could be met -// -typedef enum e_notification_type -{ - NT_NOTIFY, - NT_NOTIFYTIP, - NT_GROUPNOTIFY, - NT_IMCHAT, - NT_GROUPCHAT, - NT_NEARBYCHAT, - NT_ALERT, - NT_ALERTMODAL, - NT_OFFER -} ENotificationType; /** * Handler of notification events. @@ -81,21 +68,8 @@ class LLEventHandler public: virtual ~LLEventHandler() {}; - // callbacks for counters - typedef boost::function<void (void)> notification_callback_t; - typedef boost::signals2::signal<void (void)> notification_signal_t; - notification_signal_t mNewNotificationSignal; - notification_signal_t mDelNotificationSignal; - boost::signals2::connection setNewNotificationCallback(notification_callback_t cb) { return mNewNotificationSignal.connect(cb); } - boost::signals2::connection setDelNotification(notification_callback_t cb) { return mDelNotificationSignal.connect(cb); } - // callback for notification/toast - typedef boost::function<void (const LLUUID id)> notification_id_callback_t; - typedef boost::signals2::signal<void (const LLUUID id)> notification_id_signal_t; - notification_id_signal_t mNotificationIDSignal; - boost::signals2::connection setNotificationIDCallback(notification_id_callback_t cb) { return mNotificationIDSignal.connect(cb); } - protected: - virtual void onDeleteToast(LLToast* toast)=0; + virtual void onDeleteToast(LLToast* toast) {} // arrange handler's channel on a screen // is necessary to unbind a moment of creation of a channel and a moment of positioning of it @@ -104,8 +78,6 @@ protected: virtual void initChannel()=0; LLHandle<LLScreenChannelBase> mChannel; - e_notification_type mType; - }; // LLSysHandler and LLChatHandler are more specific base classes @@ -115,24 +87,37 @@ protected: /** * Handler for system notifications. */ -class LLSysHandler : public LLEventHandler +class LLNotificationHandler : public LLEventHandler, public LLNotificationChannel { public: - LLSysHandler(); - virtual ~LLSysHandler() {}; + LLNotificationHandler(const std::string& name, const std::string& notification_type, const std::string& parentName); + virtual ~LLNotificationHandler() {}; - virtual bool processNotification(const LLSD& notify)=0; + // base interface functions + virtual void onAdd(LLNotificationPtr p) { processNotification(p); } + virtual void onChange(LLNotificationPtr p) { processNotification(p); } + virtual void onLoad(LLNotificationPtr p) { processNotification(p); } + virtual void onDelete(LLNotificationPtr p) { if (mChannel.get()) mChannel.get()->removeToastByNotificationID(p->getID());} -protected : - static void init(); - void removeExclusiveNotifications(const LLNotificationPtr& notif); + virtual bool processNotification(const LLNotificationPtr& notify) = 0; +}; - typedef std::list< std::set<std::string> > exclusive_notif_sets; - static exclusive_notif_sets sExclusiveNotificationGroups; +class LLSystemNotificationHandler : public LLNotificationHandler +{ +public: + LLSystemNotificationHandler(const std::string& name, const std::string& notification_type); + virtual ~LLSystemNotificationHandler() {}; +}; + +class LLCommunicationNotificationHandler : public LLNotificationHandler +{ +public: + LLCommunicationNotificationHandler(const std::string& name, const std::string& notification_type); + virtual ~LLCommunicationNotificationHandler() {}; }; /** - * Handler for chat message notifications. + * Handler for chat message notifications. */ class LLChatHandler : public LLEventHandler { @@ -146,17 +131,14 @@ public: * Handler for IM notifications. * It manages life time of IMs, group messages. */ -class LLIMHandler : public LLSysHandler +class LLIMHandler : public LLCommunicationNotificationHandler { public: - LLIMHandler(e_notification_type type, const LLSD& id); + LLIMHandler(); virtual ~LLIMHandler(); - - // base interface functions - virtual bool processNotification(const LLSD& notify); + bool processNotification(const LLNotificationPtr& p); protected: - virtual void onDeleteToast(LLToast* toast); virtual void initChannel(); }; @@ -164,18 +146,15 @@ protected: * Handler for system informational notices. * It manages life time of tip notices. */ -class LLTipHandler : public LLSysHandler +class LLTipHandler : public LLSystemNotificationHandler { public: - LLTipHandler(e_notification_type type, const LLSD& id); + LLTipHandler(); virtual ~LLTipHandler(); - // base interface functions - virtual bool processNotification(const LLSD& notify); + virtual bool processNotification(const LLNotificationPtr& p); protected: - virtual void onDeleteToast(LLToast* toast); - virtual void onRejectToast(const LLUUID& id); virtual void initChannel(); }; @@ -183,168 +162,144 @@ protected: * Handler for system informational notices. * It manages life time of script notices. */ -class LLScriptHandler : public LLSysHandler +class LLScriptHandler : public LLSystemNotificationHandler { public: - LLScriptHandler(e_notification_type type, const LLSD& id); + LLScriptHandler(); virtual ~LLScriptHandler(); - // base interface functions - virtual bool processNotification(const LLSD& notify); + virtual void onDelete(LLNotificationPtr p); + virtual bool processNotification(const LLNotificationPtr& p); protected: virtual void onDeleteToast(LLToast* toast); virtual void initChannel(); - - // own handlers - void onRejectToast(LLUUID& id); }; /** * Handler for group system notices. */ -class LLGroupHandler : public LLSysHandler +class LLGroupHandler : public LLCommunicationNotificationHandler { public: - LLGroupHandler(e_notification_type type, const LLSD& id); + LLGroupHandler(); virtual ~LLGroupHandler(); - // base interface functions - virtual bool processNotification(const LLSD& notify); + virtual bool processNotification(const LLNotificationPtr& p); protected: - virtual void onDeleteToast(LLToast* toast); virtual void initChannel(); - - // own handlers - void onRejectToast(LLUUID& id); }; /** * Handler for alert system notices. */ -class LLAlertHandler : public LLSysHandler +class LLAlertHandler : public LLSystemNotificationHandler { public: - LLAlertHandler(e_notification_type type, const LLSD& id); + LLAlertHandler(const std::string& name, const std::string& notification_type, bool is_modal); virtual ~LLAlertHandler(); - void setAlertMode(bool is_modal) { mIsModal = is_modal; } - - // base interface functions - virtual bool processNotification(const LLSD& notify); + virtual void onChange(LLNotificationPtr p); + virtual bool processNotification(const LLNotificationPtr& p); protected: - virtual void onDeleteToast(LLToast* toast); virtual void initChannel(); bool mIsModal; }; +class LLViewerAlertHandler : public LLSystemNotificationHandler +{ + LOG_CLASS(LLViewerAlertHandler); +public: + LLViewerAlertHandler(const std::string& name, const std::string& notification_type); + virtual ~LLViewerAlertHandler() {}; + + virtual void onDelete(LLNotificationPtr p) {}; + virtual bool processNotification(const LLNotificationPtr& p); + +protected: + virtual void initChannel() {}; +}; + /** * Handler for offers notices. * It manages life time of offer notices. */ -class LLOfferHandler : public LLSysHandler +class LLOfferHandler : public LLCommunicationNotificationHandler { public: - LLOfferHandler(e_notification_type type, const LLSD& id); + LLOfferHandler(); virtual ~LLOfferHandler(); - // base interface functions - virtual bool processNotification(const LLSD& notify); + virtual void onChange(LLNotificationPtr p); + virtual void onDelete(LLNotificationPtr notification); + virtual bool processNotification(const LLNotificationPtr& p); protected: - virtual void onDeleteToast(LLToast* toast); virtual void initChannel(); - - // own handlers - void onRejectToast(LLUUID& id); }; /** * Handler for UI hints. */ -class LLHintHandler : public LLSingleton<LLHintHandler> +class LLHintHandler : public LLSystemNotificationHandler { public: LLHintHandler(); - virtual ~LLHintHandler(); + virtual ~LLHintHandler() {} - // base interface functions - virtual bool processNotification(const LLSD& notify); + virtual void onAdd(LLNotificationPtr p); + virtual void onLoad(LLNotificationPtr p); + virtual void onDelete(LLNotificationPtr p); + virtual bool processNotification(const LLNotificationPtr& p); + +protected: + virtual void initChannel() {}; }; /** * Handler for browser notifications */ -class LLBrowserNotification : public LLSingleton<LLBrowserNotification> +class LLBrowserNotification : public LLSystemNotificationHandler { public: - virtual bool processNotification(const LLSD& notify); + LLBrowserNotification(); + virtual ~LLBrowserNotification() {} + + virtual bool processNotification(const LLNotificationPtr& p); + +protected: + virtual void initChannel() {}; }; /** * Handler for outbox notifications */ -class LLOutboxNotification : public LLSingleton<LLOutboxNotification> +class LLOutboxNotification : public LLSystemNotificationHandler { public: - virtual bool processNotification(const LLSD& notify); + LLOutboxNotification(); + virtual ~LLOutboxNotification() {}; + virtual void onChange(LLNotificationPtr p) { } + virtual void onDelete(LLNotificationPtr p); + virtual bool processNotification(const LLNotificationPtr& p); + +protected: + virtual void initChannel() {}; }; class LLHandlerUtil { public: /** - * Checks sufficient conditions to log notification message to IM session. - */ - static bool canLogToIM(const LLNotificationPtr& notification); - - /** - * Checks sufficient conditions to log notification message to nearby chat session. - */ - static bool canLogToNearbyChat(const LLNotificationPtr& notification); - - /** - * Checks sufficient conditions to spawn IM session. - */ - static bool canSpawnIMSession(const LLNotificationPtr& notification); - - /** - * Checks sufficient conditions to add notification toast panel IM floater. - */ - static bool canAddNotifPanelToIM(const LLNotificationPtr& notification); - - /** - * Checks whether notification can be used multiple times or not. - */ - static bool isNotificationReusable(const LLNotificationPtr& notification); - - /** - * Checks if passed notification can create IM session and be written into it. - * - * This method uses canLogToIM() & canSpawnIMSession(). - */ - static bool canSpawnSessionAndLogToIM(const LLNotificationPtr& notification); - - /** - * Checks if passed notification can create toast. - */ - static bool canSpawnToast(const LLNotificationPtr& notification); - - /** * Determines whether IM floater is opened. */ static bool isIMFloaterOpened(const LLNotificationPtr& notification); /** - * Determines whether IM floater is focused. - */ - static bool isIMFloaterFocused(const LLNotificationPtr& notification); - - /** * Writes notification message to IM session. */ static void logToIM(const EInstantMessage& session_type, @@ -355,12 +310,7 @@ public: /** * Writes notification message to IM p2p session. */ - static void logToIMP2P(const LLNotificationPtr& notification); - - /** - * Writes notification message to IM p2p session. - */ - static void logToIMP2P(const LLNotificationPtr& notification, bool to_file_only); + static void logToIMP2P(const LLNotificationPtr& notification, bool to_file_only = false); /** * Writes group notice notification message to IM group session. @@ -406,13 +356,6 @@ public: */ static void decIMMesageCounter(const LLNotificationPtr& notification); -private: - - /** - * Find IM floater based on "from_id" - */ - static LLIMFloater* findIMFloater(const LLNotificationPtr& notification); - }; } diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 16c51138a9..eb4601a469 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -34,219 +34,34 @@ #include "llurlaction.h" #include "llagent.h" -#include "llimfloater.h" +#include "llfloaterimsession.h" #include "llimview.h" -#include "llnearbychat.h" +#include "llfloaterimnearbychat.h" #include "llnotificationhandler.h" using namespace LLNotificationsUI; -// static -std::list< std::set<std::string> > LLSysHandler::sExclusiveNotificationGroups; - -// static -void LLSysHandler::init() -{ - std::set<std::string> online_offline_group; - online_offline_group.insert("FriendOnline"); - online_offline_group.insert("FriendOffline"); +LLNotificationHandler::LLNotificationHandler(const std::string& name, const std::string& notification_type, const std::string& parentName) +: LLNotificationChannel(name, parentName, LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, notification_type)) +{} - sExclusiveNotificationGroups.push_back(online_offline_group); -} - -LLSysHandler::LLSysHandler() -{ - if(sExclusiveNotificationGroups.empty()) - { - init(); - } -} +LLSystemNotificationHandler::LLSystemNotificationHandler(const std::string& name, const std::string& notification_type) + : LLNotificationHandler(name, notification_type, "System") +{} -void LLSysHandler::removeExclusiveNotifications(const LLNotificationPtr& notif) -{ - LLScreenChannel* channel = dynamic_cast<LLScreenChannel *>(mChannel.get()); - if (channel == NULL) - { - return; - } - - class ExclusiveMatcher: public LLScreenChannel::Matcher - { - public: - ExclusiveMatcher(const std::set<std::string>& excl_group, - const std::string& from_name) : - mExclGroup(excl_group), mFromName(from_name) - { - } - bool matches(const LLNotificationPtr notification) const - { - for (std::set<std::string>::const_iterator it = mExclGroup.begin(); it - != mExclGroup.end(); it++) - { - std::string from_name = LLHandlerUtil::getSubstitutionName(notification); - if (notification->getName() == *it && from_name == mFromName) - { - return true; - } - } - return false; - } - private: - const std::set<std::string>& mExclGroup; - const std::string& mFromName; - }; - - - for (exclusive_notif_sets::iterator it = sExclusiveNotificationGroups.begin(); it - != sExclusiveNotificationGroups.end(); it++) - { - std::set<std::string> group = *it; - std::set<std::string>::iterator g_it = group.find(notif->getName()); - if (g_it != group.end()) - { - channel->killMatchedToasts(ExclusiveMatcher(group, - LLHandlerUtil::getSubstitutionName(notif))); - } - } -} - -const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), - REVOKED_MODIFY_RIGHTS("RevokedModifyRights"), - OBJECT_GIVE_ITEM("ObjectGiveItem"), - OBJECT_GIVE_ITEM_UNKNOWN_USER("ObjectGiveItemUnknownUser"), - PAYMENT_RECEIVED("PaymentReceived"), - PAYMENT_SENT("PaymentSent"), - ADD_FRIEND_WITH_MESSAGE("AddFriendWithMessage"), - USER_GIVE_ITEM("UserGiveItem"), - INVENTORY_ACCEPTED("InventoryAccepted"), - INVENTORY_DECLINED("InventoryDeclined"), - OFFER_FRIENDSHIP("OfferFriendship"), - FRIENDSHIP_ACCEPTED("FriendshipAccepted"), - FRIENDSHIP_OFFERED("FriendshipOffered"), - FRIENDSHIP_ACCEPTED_BYME("FriendshipAcceptedByMe"), - FRIENDSHIP_DECLINED_BYME("FriendshipDeclinedByMe"), - FRIEND_ONLINE("FriendOnline"), FRIEND_OFFLINE("FriendOffline"), - SERVER_OBJECT_MESSAGE("ServerObjectMessage"), - TELEPORT_OFFERED("TeleportOffered"), - TELEPORT_OFFERED_MATURITY_EXCEEDED("TeleportOffered_MaturityExceeded"), - TELEPORT_OFFERED_MATURITY_BLOCKED("TeleportOffered_MaturityBlocked"), - TELEPORT_OFFER_SENT("TeleportOfferSent"), - IM_SYSTEM_MESSAGE_TIP("IMSystemMessageTip"); - - -// static -bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) -{ - return GRANTED_MODIFY_RIGHTS == notification->getName() - || REVOKED_MODIFY_RIGHTS == notification->getName() - || PAYMENT_RECEIVED == notification->getName() - || PAYMENT_SENT == notification->getName() - || OFFER_FRIENDSHIP == notification->getName() - || FRIENDSHIP_OFFERED == notification->getName() - || FRIENDSHIP_ACCEPTED == notification->getName() - || FRIENDSHIP_ACCEPTED_BYME == notification->getName() - || FRIENDSHIP_DECLINED_BYME == notification->getName() - || SERVER_OBJECT_MESSAGE == notification->getName() - || INVENTORY_ACCEPTED == notification->getName() - || INVENTORY_DECLINED == notification->getName() - || USER_GIVE_ITEM == notification->getName() - || TELEPORT_OFFERED == notification->getName() - || TELEPORT_OFFERED_MATURITY_EXCEEDED == notification->getName() - || TELEPORT_OFFERED_MATURITY_BLOCKED == notification->getName() - || TELEPORT_OFFER_SENT == notification->getName() - || IM_SYSTEM_MESSAGE_TIP == notification->getName(); -} - -// static -bool LLHandlerUtil::canLogToNearbyChat(const LLNotificationPtr& notification) -{ - return notification->getType() == "notifytip" - && FRIEND_ONLINE != notification->getName() - && FRIEND_OFFLINE != notification->getName() - && INVENTORY_ACCEPTED != notification->getName() - && INVENTORY_DECLINED != notification->getName() - && IM_SYSTEM_MESSAGE_TIP != notification->getName(); -} - -// static -bool LLHandlerUtil::canSpawnIMSession(const LLNotificationPtr& notification) -{ - return OFFER_FRIENDSHIP == notification->getName() - || USER_GIVE_ITEM == notification->getName() - || TELEPORT_OFFERED == notification->getName() - || TELEPORT_OFFERED_MATURITY_EXCEEDED == notification->getName() - || TELEPORT_OFFERED_MATURITY_BLOCKED == notification->getName(); -} - -// static -bool LLHandlerUtil::canAddNotifPanelToIM(const LLNotificationPtr& notification) -{ - return OFFER_FRIENDSHIP == notification->getName() - || USER_GIVE_ITEM == notification->getName() - || TELEPORT_OFFERED == notification->getName() - || TELEPORT_OFFERED_MATURITY_EXCEEDED == notification->getName() - || TELEPORT_OFFERED_MATURITY_BLOCKED == notification->getName(); -} - -// static -bool LLHandlerUtil::isNotificationReusable(const LLNotificationPtr& notification) -{ - return OFFER_FRIENDSHIP == notification->getName() - || USER_GIVE_ITEM == notification->getName() - || TELEPORT_OFFERED == notification->getName() - || TELEPORT_OFFERED_MATURITY_EXCEEDED == notification->getName() - || TELEPORT_OFFERED_MATURITY_BLOCKED == notification->getName(); -} - -// static -bool LLHandlerUtil::canSpawnSessionAndLogToIM(const LLNotificationPtr& notification) -{ - return canLogToIM(notification) && canSpawnIMSession(notification); -} +LLCommunicationNotificationHandler::LLCommunicationNotificationHandler(const std::string& name, const std::string& notification_type) + : LLNotificationHandler(name, notification_type, "Communication") +{} // static -bool LLHandlerUtil::canSpawnToast(const LLNotificationPtr& notification) +bool LLHandlerUtil::isIMFloaterOpened(const LLNotificationPtr& notification) { - if(INVENTORY_DECLINED == notification->getName() - || INVENTORY_ACCEPTED == notification->getName()) - { - // return false for inventory accepted/declined notifications if respective IM window is open (EXT-5909) - return ! isIMFloaterOpened(notification); - } - - if(FRIENDSHIP_ACCEPTED == notification->getName()) - { - // don't show FRIENDSHIP_ACCEPTED if IM window is opened and focused - EXT-6441 - return ! isIMFloaterFocused(notification); - } - - if(OFFER_FRIENDSHIP == notification->getName() - || USER_GIVE_ITEM == notification->getName() - || TELEPORT_OFFERED == notification->getName() - || TELEPORT_OFFERED_MATURITY_EXCEEDED == notification->getName() - || TELEPORT_OFFERED_MATURITY_BLOCKED == notification->getName()) - { - // When ANY offer arrives, show toast, unless IM window is already open - EXT-5904 - return ! isIMFloaterOpened(notification); - } - - return true; -} + bool res = false; -// static -LLIMFloater* LLHandlerUtil::findIMFloater(const LLNotificationPtr& notification) -{ LLUUID from_id = notification->getPayload()["from_id"]; LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, from_id); - return LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id); -} - -// static -bool LLHandlerUtil::isIMFloaterOpened(const LLNotificationPtr& notification) -{ - bool res = false; + LLFloaterIMSession* im_floater = LLFloaterReg::findTypedInstance<LLFloaterIMSession>("impanel", session_id); - LLIMFloater* im_floater = findIMFloater(notification); if (im_floater != NULL) { res = im_floater->getVisible() == TRUE; @@ -255,19 +70,6 @@ bool LLHandlerUtil::isIMFloaterOpened(const LLNotificationPtr& notification) return res; } -bool LLHandlerUtil::isIMFloaterFocused(const LLNotificationPtr& notification) -{ - bool res = false; - - LLIMFloater* im_floater = findIMFloater(notification); - if (im_floater != NULL) - { - res = im_floater->hasFocus() == TRUE; - } - - return res; -} - // static void LLHandlerUtil::logToIM(const EInstantMessage& session_type, const std::string& session_name, const std::string& from_name, @@ -299,13 +101,6 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type, } else { - // store active session id - const LLUUID & active_session_id = - LLIMModel::instance().getActiveSessionID(); - - // set searched session as active to avoid IM toast popup - LLIMModel::instance().setActiveSessionID(session_id); - S32 unread = session->mNumUnread; S32 participant_unread = session->mParticipantUnreadMessageCount; LLIMModel::instance().addMessageSilently(session_id, from, from_id, @@ -316,25 +111,9 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type, // update IM floater messages updateIMFLoaterMesages(session_id); - - // restore active session id - if (active_session_id.isNull()) - { - LLIMModel::instance().resetActiveSessionID(); - } - else - { - LLIMModel::instance().setActiveSessionID(active_session_id); - } } } -// static -void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification) -{ - logToIMP2P(notification, false); -} - void log_name_callback(const std::string& full_name, const std::string& from_name, const std::string& message, const LLUUID& from_id) @@ -346,14 +125,12 @@ void log_name_callback(const std::string& full_name, const std::string& from_nam // static void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_file_only) { - // don't create IM p2p session with objects, it's necessary condition to log - if (notification->getName() != OBJECT_GIVE_ITEM) - { LLUUID from_id = notification->getPayload()["from_id"]; if (from_id.isNull()) { - llwarns << " from_id for notification " << notification->getName() << " is null " << llendl; + // Normal behavior for system generated messages, don't spam. + // llwarns << " from_id for notification " << notification->getName() << " is null " << llendl; return; } @@ -366,7 +143,6 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id)); } } -} // static void LLHandlerUtil::logGroupNoticeToIMGroup( @@ -397,8 +173,8 @@ void LLHandlerUtil::logGroupNoticeToIMGroup( // static void LLHandlerUtil::logToNearbyChat(const LLNotificationPtr& notification, EChatSourceType type) { - LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); - if(nearby_chat) + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + if (nearby_chat) { LLChat chat_msg(notification->getMessage()); chat_msg.mSourceType = type; @@ -477,7 +253,7 @@ void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification) // static void LLHandlerUtil::updateIMFLoaterMesages(const LLUUID& session_id) { - LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id); if (im_floater != NULL && im_floater->getVisible()) { im_floater->updateMessages(); @@ -501,14 +277,10 @@ void LLHandlerUtil::decIMMesageCounter(const LLNotificationPtr& notification) LLUUID from_id = notification->getPayload()["from_id"]; LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, from_id); - LLIMModel::LLIMSession * session = LLIMModel::getInstance()->findIMSession( - session_id); + LLIMModel::LLIMSession * session = LLIMModel::getInstance()->findIMSession(session_id); - if (session == NULL) + if (session) { - return; - } - LLSD arg; arg["session_id"] = session_id; session->mNumUnread--; @@ -517,3 +289,5 @@ void LLHandlerUtil::decIMMesageCounter(const LLNotificationPtr& notification) arg["participant_unread"] = session->mParticipantUnreadMessageCount; LLIMModel::getInstance()->mNewMsgSignal(arg); } +} + diff --git a/indra/newview/llnotificationhinthandler.cpp b/indra/newview/llnotificationhinthandler.cpp index f7163cb04f..f40369a2e0 100644 --- a/indra/newview/llnotificationhinthandler.cpp +++ b/indra/newview/llnotificationhinthandler.cpp @@ -34,25 +34,26 @@ using namespace LLNotificationsUI; LLHintHandler::LLHintHandler() + : LLSystemNotificationHandler("Hints", "hint") { } -LLHintHandler::~LLHintHandler() +void LLHintHandler::onAdd(LLNotificationPtr p) { + LLHints::show(p); } -bool LLHintHandler::processNotification(const LLSD& notify) +void LLHintHandler::onLoad(LLNotificationPtr p) +{ + LLHints::show(p); +} + +void LLHintHandler::onDelete(LLNotificationPtr p) +{ + LLHints::hide(p); +} + +bool LLHintHandler::processNotification(const LLNotificationPtr& p) { - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - std::string sigtype = notify["sigtype"].asString(); - if (sigtype == "add" || sigtype == "load") - { - LLHints::show(notification); - } - else if (sigtype == "delete") - { - LLHints::hide(notification); - } return false; } diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp index f792f53ac5..152581c5a0 100644 --- a/indra/newview/llnotificationmanager.cpp +++ b/indra/newview/llnotificationmanager.cpp @@ -31,7 +31,7 @@ #include "llnotificationmanager.h" -#include "llnearbychathandler.h" +#include "llfloaterimnearbychathandler.h" #include "llnotifications.h" #include <boost/bind.hpp> @@ -42,107 +42,35 @@ using namespace LLNotificationsUI; //-------------------------------------------------------------------------- LLNotificationManager::LLNotificationManager() { - mNotifyHandlers.clear(); init(); } //-------------------------------------------------------------------------- LLNotificationManager::~LLNotificationManager() { - BOOST_FOREACH(listener_pair_t& pair, mChannelListeners) - { - pair.second.disconnect(); - } } //-------------------------------------------------------------------------- void LLNotificationManager::init() { - LLNotificationChannel::buildChannel("Notifications", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "notify")); - LLNotificationChannel::buildChannel("NotificationTips", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "notifytip")); - LLNotificationChannel::buildChannel("Group Notifications", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "groupnotify")); - LLNotificationChannel::buildChannel("Alerts", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alert")); - LLNotificationChannel::buildChannel("AlertModal", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alertmodal")); - LLNotificationChannel::buildChannel("IM Notifications", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "notifytoast")); - LLNotificationChannel::buildChannel("Offer", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "offer")); - LLNotificationChannel::buildChannel("Hints", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "hint")); - LLNotificationChannel::buildChannel("Browser", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "browser")); - LLNotificationChannel::buildChannel("Outbox", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "outbox")); + mChannels.push_back(new LLScriptHandler()); + mChannels.push_back(new LLTipHandler()); + mChannels.push_back(new LLGroupHandler()); + mChannels.push_back(new LLAlertHandler("Alerts", "alert", false)); + mChannels.push_back(new LLAlertHandler("AlertModal", "alertmodal", true)); + mChannels.push_back(new LLOfferHandler()); + mChannels.push_back(new LLHintHandler()); + mChannels.push_back(new LLBrowserNotification()); + mChannels.push_back(new LLOutboxNotification()); + mChannels.push_back(new LLIMHandler()); - mChannelListeners["Notifications"] = LLNotifications::instance().getChannel("Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - mChannelListeners["NotificationTips"] = LLNotifications::instance().getChannel("NotificationTips")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - mChannelListeners["Group Notifications"] = LLNotifications::instance().getChannel("Group Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - mChannelListeners["Alerts"] = LLNotifications::instance().getChannel("Alerts")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - mChannelListeners["AlertModal"] = LLNotifications::instance().getChannel("AlertModal")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - mChannelListeners["IM Notifications"] = LLNotifications::instance().getChannel("IM Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - mChannelListeners["Offer"] = LLNotifications::instance().getChannel("Offer")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - mChannelListeners["Hints"] = LLNotifications::instance().getChannel("Hints")->connectChanged(boost::bind(&LLHintHandler::processNotification, LLHintHandler::getInstance(), _1)); - mChannelListeners["Browser"] = LLNotifications::instance().getChannel("Browser")->connectChanged(boost::bind(&LLBrowserNotification::processNotification, LLBrowserNotification::getInstance(), _1)); - mChannelListeners["Outbox"] = LLNotifications::instance().getChannel("Outbox")->connectChanged(boost::bind(&LLOutboxNotification::processNotification, LLOutboxNotification::getInstance(), _1)); - - mNotifyHandlers["notify"] = boost::shared_ptr<LLEventHandler>(new LLScriptHandler(NT_NOTIFY, LLSD())); - mNotifyHandlers["notifytip"] = boost::shared_ptr<LLEventHandler>(new LLTipHandler(NT_NOTIFY, LLSD())); - mNotifyHandlers["groupnotify"] = boost::shared_ptr<LLEventHandler>(new LLGroupHandler(NT_GROUPNOTIFY, LLSD())); - mNotifyHandlers["alert"] = boost::shared_ptr<LLEventHandler>(new LLAlertHandler(NT_ALERT, LLSD())); - mNotifyHandlers["alertmodal"] = boost::shared_ptr<LLEventHandler>(new LLAlertHandler(NT_ALERT, LLSD())); - static_cast<LLAlertHandler*>(mNotifyHandlers["alertmodal"].get())->setAlertMode(true); - mNotifyHandlers["notifytoast"] = boost::shared_ptr<LLEventHandler>(new LLIMHandler(NT_IMCHAT, LLSD())); - - mNotifyHandlers["nearbychat"] = boost::shared_ptr<LLEventHandler>(new LLNearbyChatHandler(NT_NEARBYCHAT, LLSD())); - mNotifyHandlers["offer"] = boost::shared_ptr<LLEventHandler>(new LLOfferHandler(NT_OFFER, LLSD())); -} - -//-------------------------------------------------------------------------- -bool LLNotificationManager::onNotification(const LLSD& notify) -{ - LLSysHandler* handle = NULL; - - if (LLNotifications::destroyed()) - return false; - - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - if (!notification) - return false; - - std::string notification_type = notification->getType(); - handle = static_cast<LLSysHandler*>(mNotifyHandlers[notification_type].get()); - - if(!handle) - return false; - - return handle->processNotification(notify); + mChatHandler = boost::shared_ptr<LLFloaterIMNearbyChatHandler>(new LLFloaterIMNearbyChatHandler()); } //-------------------------------------------------------------------------- void LLNotificationManager::onChat(const LLChat& msg, const LLSD &args) { - // check ENotificationType argument - switch(args["type"].asInteger()) - { - case NT_NEARBYCHAT: - { - LLNearbyChatHandler* handle = dynamic_cast<LLNearbyChatHandler*>(mNotifyHandlers["nearbychat"].get()); - - if(handle) - handle->processChat(msg, args); + if(mChatHandler) + mChatHandler->processChat(msg, args); } - break; - default: //no need to handle all enum types - break; - } -} - -//-------------------------------------------------------------------------- -LLEventHandler* LLNotificationManager::getHandlerForNotification(std::string notification_type) -{ - std::map<std::string, boost::shared_ptr<LLEventHandler> >::iterator it = mNotifyHandlers.find(notification_type); - - if(it != mNotifyHandlers.end()) - return (*it).second.get(); - - return NULL; -} - -//-------------------------------------------------------------------------- diff --git a/indra/newview/llnotificationmanager.h b/indra/newview/llnotificationmanager.h index 27b6ba1c71..f37c6b833c 100644 --- a/indra/newview/llnotificationmanager.h +++ b/indra/newview/llnotificationmanager.h @@ -28,8 +28,6 @@ #ifndef LL_LLNOTIFICATIONMANAGER_H #define LL_LLNOTIFICATIONMANAGER_H -#include "llevents.h" - #include "lluictrl.h" #include "llnotificationhandler.h" @@ -49,7 +47,6 @@ class LLToast; class LLNotificationManager : public LLSingleton<LLNotificationManager> { typedef std::pair<std::string, LLEventHandler*> eventhandlers; - typedef std::pair<const std::string, LLBoundListener> listener_pair_t; public: LLNotificationManager(); virtual ~LLNotificationManager(); @@ -59,22 +56,12 @@ public: void init(void); //TODO: combine processing and storage (*) - // this method reacts on system notifications and calls an appropriate handler - bool onNotification(const LLSD& notification); - // this method reacts on chat notifications and calls an appropriate handler void onChat(const LLChat& msg, const LLSD &args); - // get a handler for a certain type of notification - LLEventHandler* getHandlerForNotification(std::string notification_type); - - private: - //TODO (*) - std::map<std::string, boost::shared_ptr<LLEventHandler> > mNotifyHandlers; - // cruft std::map<std::string, LLChatHandler*> mChatHandlers; - - std::map<std::string, LLBoundListener> mChannelListeners; + boost::shared_ptr<class LLFloaterIMNearbyChatHandler> mChatHandler; + std::vector<LLNotificationChannelPtr> mChannels; }; } diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 1552ed3346..2657b84ef3 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -40,16 +40,14 @@ using namespace LLNotificationsUI; //-------------------------------------------------------------------------- -LLOfferHandler::LLOfferHandler(e_notification_type type, const LLSD& id) +LLOfferHandler::LLOfferHandler() +: LLCommunicationNotificationHandler("Offer", "offer") { - mType = type; - // Getting a Channel for our notifications LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel(); if(channel) { channel->setControlHovering(true); - channel->setOnRejectToastCallback(boost::bind(&LLOfferHandler::onRejectToast, this, _1)); mChannel = channel->getHandle(); } } @@ -68,147 +66,124 @@ void LLOfferHandler::initChannel() } //-------------------------------------------------------------------------- -bool LLOfferHandler::processNotification(const LLSD& notify) +bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) { if(mChannel.isDead()) { return false; } - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - if(!notification) - return false; - // arrange a channel on a screen if(!mChannel.get()->getVisible()) { initChannel(); } - if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change") - { + if( notification->getPayload().has("give_inventory_notification") + && notification->getPayload()["give_inventory_notification"].asBoolean() == false) + { + // This is an original inventory offer, so add a script floater + LLScriptFloaterManager::instance().onAddNotification(notification->getID()); + } + else + { + bool add_notif_to_im = notification->canLogToIM() && notification->hasFormElements(); - if( notification->getPayload().has("give_inventory_notification") - && !notification->getPayload()["give_inventory_notification"] ) + if (add_notif_to_im) { - // This is an original inventory offer, so add a script floater - LLScriptFloaterManager::instance().onAddNotification(notification->getID()); + const std::string name = LLHandlerUtil::getSubstitutionName(notification); + + LLUUID from_id = notification->getPayload()["from_id"]; + + //Will not play a notification sound for inventory and teleport offer based upon chat preference + bool playSound = (!notification->isDND() + && ((notification->getName() == "UserGiveItem" + && gSavedSettings.getBOOL("PlaySoundInventoryOffer")) + || (notification->getName() == "TeleportOffered" + && gSavedSettings.getBOOL("PlaySoundTeleportOffer")))); + + if(playSound) + { + notification->playSound(); + } + + LLHandlerUtil::spawnIMSession(name, from_id); + LLHandlerUtil::addNotifPanelToIM(notification); + } - else + + if (!notification->canShowToast()) { - notification->setReusable(LLHandlerUtil::isNotificationReusable(notification)); - - LLUUID session_id; - if (LLHandlerUtil::canSpawnIMSession(notification)) - { - const std::string name = LLHandlerUtil::getSubstitutionName(notification); - - LLUUID from_id = notification->getPayload()["from_id"]; - - session_id = LLHandlerUtil::spawnIMSession(name, from_id); - } - - bool show_toast = LLHandlerUtil::canSpawnToast(notification); - bool add_notid_to_im = LLHandlerUtil::canAddNotifPanelToIM(notification); - if (add_notid_to_im) - { - LLHandlerUtil::addNotifPanelToIM(notification); - } - - if (notification->getPayload().has("SUPPRESS_TOAST") - && notification->getPayload()["SUPPRESS_TOAST"]) - { - LLNotificationsUtil::cancel(notification); - } - else if(show_toast) - { - LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); - // don't close notification on panel destroy since it will be used by IM floater - notify_box->setCloseNotificationOnDestroy(!add_notid_to_im); - LLToast::Params p; - p.notif_id = notification->getID(); - p.notification = notification; - p.panel = notify_box; - p.on_delete_toast = boost::bind(&LLOfferHandler::onDeleteToast, this, _1); - // we not save offer notifications to the syswell floater that should be added to the IM floater - p.can_be_stored = !add_notid_to_im; - - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); - if(channel) - channel->addToast(p); - - // if we not add notification to IM - add it to notification well - if (!add_notid_to_im) - { - // send a signal to the counter manager - mNewNotificationSignal(); - } - } - - if (LLHandlerUtil::canLogToIM(notification)) - { - // log only to file if notif panel can be embedded to IM and IM is opened - if (add_notid_to_im && LLHandlerUtil::isIMFloaterOpened(notification)) - { - LLHandlerUtil::logToIMP2P(notification, true); - } - else - { - LLHandlerUtil::logToIMP2P(notification); - } - } + LLNotificationsUtil::cancel(notification); } - } - else if (notify["sigtype"].asString() == "delete") - { - if( notification->getPayload().has("give_inventory_notification") - && !notification->getPayload()["give_inventory_notification"] ) + else if(!notification->canLogToIM() || !LLHandlerUtil::isIMFloaterOpened(notification)) { - // Remove original inventory offer script floater - LLScriptFloaterManager::instance().onRemoveNotification(notification->getID()); + LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.panel = notify_box; + // we not save offer notifications to the syswell floater that should be added to the IM floater + p.can_be_stored = !add_notif_to_im; + p.force_show = notification->getOfferFromAgent(); + + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) + channel->addToast(p); + } - else + + if (notification->canLogToIM()) { - if (LLHandlerUtil::canAddNotifPanelToIM(notification) - && !LLHandlerUtil::isIMFloaterOpened(notification)) - { - LLHandlerUtil::decIMMesageCounter(notification); - } - mChannel.get()->killToastByNotificationID(notification->getID()); + // log only to file if notif panel can be embedded to IM and IM is opened + bool file_only = add_notif_to_im && LLHandlerUtil::isIMFloaterOpened(notification); + LLHandlerUtil::logToIMP2P(notification, file_only); } } return false; } -//-------------------------------------------------------------------------- - -void LLOfferHandler::onDeleteToast(LLToast* toast) +/*virtual*/ void LLOfferHandler::onChange(LLNotificationPtr p) { - if (!LLHandlerUtil::canAddNotifPanelToIM(toast->getNotification())) + LLToastNotifyPanel* panelp = LLToastNotifyPanel::getInstance(p->getID()); + if (panelp) { - // send a signal to the counter manager - mDelNotificationSignal(); + // + // HACK: if we're dealing with a notification embedded in IM, update it + // otherwise remove its toast + // + if (dynamic_cast<LLIMToastNotifyPanel*>(panelp)) + { + panelp->updateNotification(); + } + else + { + // if notification has changed, hide it + mChannel.get()->removeToastByNotificationID(p->getID()); + } } - - // send a signal to a listener to let him perform some action - // in this case listener is a SysWellWindow and it will remove a corresponding item from its list - mNotificationIDSignal(toast->getNotificationID()); } -//-------------------------------------------------------------------------- -void LLOfferHandler::onRejectToast(LLUUID& id) -{ - LLNotificationPtr notification = LLNotifications::instance().find(id); - if (notification - && LLNotificationManager::getInstance()->getHandlerForNotification( - notification->getType()) == this - // don't delete notification since it may be used by IM floater - && !LLHandlerUtil::canAddNotifPanelToIM(notification)) +/*virtual*/ void LLOfferHandler::onDelete(LLNotificationPtr notification) +{ + if( notification->getPayload().has("give_inventory_notification") + && !notification->getPayload()["give_inventory_notification"] ) { - LLNotifications::instance().cancel(notification); + // Remove original inventory offer script floater + LLScriptFloaterManager::instance().onRemoveNotification(notification->getID()); + } + else + { + if (notification->canLogToIM() + && notification->hasFormElements() + && !LLHandlerUtil::isIMFloaterOpened(notification)) + { + LLHandlerUtil::decIMMesageCounter(notification); + } + mChannel.get()->removeToastByNotificationID(notification->getID()); } } + diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp index 398f54c6f7..08c98e4f28 100644 --- a/indra/newview/llnotificationscripthandler.cpp +++ b/indra/newview/llnotificationscripthandler.cpp @@ -27,6 +27,7 @@ #include "llviewerprecompiledheaders.h" // must be first include +#include "llagent.h" #include "llnotificationhandler.h" #include "lltoastnotifypanel.h" #include "llviewercontrol.h" @@ -37,21 +38,15 @@ using namespace LLNotificationsUI; -static const std::string SCRIPT_DIALOG ("ScriptDialog"); -static const std::string SCRIPT_DIALOG_GROUP ("ScriptDialogGroup"); -static const std::string SCRIPT_LOAD_URL ("LoadWebPage"); - //-------------------------------------------------------------------------- -LLScriptHandler::LLScriptHandler(e_notification_type type, const LLSD& id) +LLScriptHandler::LLScriptHandler() +: LLSystemNotificationHandler("Notifications", "notify") { - mType = type; - // Getting a Channel for our notifications LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel(); if(channel) { channel->setControlHovering(true); - channel->setOnRejectToastCallback(boost::bind(&LLScriptHandler::onRejectToast, this, _1)); mChannel = channel->getHandle(); } } @@ -70,104 +65,83 @@ void LLScriptHandler::initChannel() } //-------------------------------------------------------------------------- -bool LLScriptHandler::processNotification(const LLSD& notify) +bool LLScriptHandler::processNotification(const LLNotificationPtr& notification) { if(mChannel.isDead()) { return false; } - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - if(!notification) - return false; - // arrange a channel on a screen if(!mChannel.get()->getVisible()) { initChannel(); } - if(notify["sigtype"].asString() == "add") + if (notification->canLogToIM()) { - if (LLHandlerUtil::canLogToIM(notification)) - { - LLHandlerUtil::logToIMP2P(notification); - } + LLHandlerUtil::logToIMP2P(notification); + } - if(SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName() || SCRIPT_LOAD_URL == notification->getName()) - { - LLScriptFloaterManager::getInstance()->onAddNotification(notification->getID()); + if(notification->hasFormElements() && !notification->canShowToast()) + { + LLScriptFloaterManager::getInstance()->onAddNotification(notification->getID()); + } + else + { + LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); + + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.panel = notify_box; + p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1); + if(gAgent.isDoNotDisturb()) + { + p.force_show = notification->getName() == "SystemMessage" + || notification->getName() == "GodMessage" + || notification->getPriority() >= NOTIFICATION_PRIORITY_HIGH; } - else + + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) { - LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); - - LLToast::Params p; - p.notif_id = notification->getID(); - p.notification = notification; - p.panel = notify_box; - p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1); - - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); - if(channel) - { - channel->addToast(p); - } - - // send a signal to the counter manager - mNewNotificationSignal(); + channel->addToast(p); } } - else if (notify["sigtype"].asString() == "delete") + + return false; +} + + +void LLScriptHandler::onDelete( LLNotificationPtr notification ) { - if(SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName() || SCRIPT_LOAD_URL == notification->getName()) + if(notification->hasFormElements() && !notification->canShowToast()) { LLScriptFloaterManager::getInstance()->onRemoveNotification(notification->getID()); } else { - mChannel.get()->killToastByNotificationID(notification->getID()); + mChannel.get()->removeToastByNotificationID(notification->getID()); } } - return false; -} + //-------------------------------------------------------------------------- void LLScriptHandler::onDeleteToast(LLToast* toast) { - // send a signal to the counter manager - mDelNotificationSignal(); - // send a signal to a listener to let him perform some action // in this case listener is a SysWellWindow and it will remove a corresponding item from its list - mNotificationIDSignal(toast->getNotificationID()); - LLNotificationPtr notification = LLNotifications::getInstance()->find(toast->getNotificationID()); - if( notification && - (SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName()) ) + if( notification && notification->hasFormElements() && !notification->canShowToast()) { LLScriptFloaterManager::getInstance()->onRemoveNotification(notification->getID()); } -} - -//-------------------------------------------------------------------------- -void LLScriptHandler::onRejectToast(LLUUID& id) -{ - LLNotificationPtr notification = LLNotifications::instance().find(id); - if (notification - && LLNotificationManager::getInstance()->getHandlerForNotification( - notification->getType()) == this) - { - LLNotifications::instance().cancel(notification); - } } -//-------------------------------------------------------------------------- - diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp index fb1adc7ddf..b6184f09bf 100644 --- a/indra/newview/llnotificationstorage.cpp +++ b/indra/newview/llnotificationstorage.cpp @@ -25,197 +25,111 @@ */ #include "llviewerprecompiledheaders.h" // must be first include + #include "llnotificationstorage.h" -#include "llxmlnode.h" // for linux compilers +#include <string> +#include <map> -#include "llchannelmanager.h" -#include "llscreenchannel.h" -#include "llscriptfloater.h" +#include "llerror.h" +#include "llfile.h" +#include "llnotifications.h" +#include "llpointer.h" +#include "llsd.h" #include "llsdserialize.h" -#include "llviewermessage.h" +#include "llsingleton.h" +#include "llregistry.h" +#include "llviewermessage.h" -////////////////////////////////////////////////////////////////////////// +typedef boost::function<LLNotificationResponderInterface * (const LLSD& pParams)> responder_constructor_t; -class LLResponderRegistry +class LLResponderRegistry : public LLRegistrySingleton<std::string, responder_constructor_t, 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; + public: + template<typename RESPONDER_TYPE> static LLNotificationResponderInterface * create(const LLSD& pParams); + LLNotificationResponderInterface * createResponder(const std::string& pNotificationName, const LLSD& pParams); +}; - static void add(const std::string& notification_name, const responder_constructor_t& ctr); +template<typename RESPONDER_TYPE> LLNotificationResponderInterface * LLResponderRegistry::create(const LLSD& pParams) +{ + RESPONDER_TYPE* responder = new RESPONDER_TYPE(); + responder->fromLLSD(pParams); + return responder; +} -private: - typedef std::map<std::string, responder_constructor_t> build_map_t; +LLNotificationResponderInterface * LLResponderRegistry::createResponder(const std::string& pNotificationName, const LLSD& pParams) +{ + responder_constructor_t * factoryFunc = (LLResponderRegistry::getValue(pNotificationName)); + + if(factoryFunc) + { + return (*factoryFunc)(pParams); + } + + return NULL; +} - static build_map_t sBuildMap; -}; +LLResponderRegistry::StaticRegistrar sRegisterObjectGiveItem("ObjectGiveItem", &LLResponderRegistry::create<LLOfferInfo>); +LLResponderRegistry::StaticRegistrar sRegisterUserGiveItem("UserGiveItem", &LLResponderRegistry::create<LLOfferInfo>); +LLResponderRegistry::StaticRegistrar sRegisterOfferInfo("offer_info", &LLResponderRegistry::create<LLOfferInfo>); -////////////////////////////////////////////////////////////////////////// -LLPersistentNotificationStorage::LLPersistentNotificationStorage() +LLNotificationStorage::LLNotificationStorage(std::string pFileName) + : mFileName(pFileName) { - mFileName = gDirUtilp->getExpandedFilename ( LL_PATH_PER_SL_ACCOUNT, "open_notifications.xml" ); } -bool LLPersistentNotificationStorage::onPersistentChannelChanged(const LLSD& payload) +LLNotificationStorage::~LLNotificationStorage() { - // 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() +bool LLNotificationStorage::writeNotifications(const LLSD& pNotificationData) const { - // TODO - think about save optimization. - llofstream notify_file(mFileName.c_str()); - if (!notify_file.is_open()) + llofstream notifyFile(mFileName.c_str()); + bool didFileOpen = notifyFile.is_open(); + + if (!didFileOpen) { - llwarns << "Failed to open " << mFileName << llendl; - return; + LL_WARNS("LLNotificationStorage") << "Failed to open file '" << mFileName << "'" << LL_ENDL; } - - 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) + else { - 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(pNotificationData, notifyFile, LLSDFormatter::OPTIONS_PRETTY); } - LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); - formatter->format(output, notify_file, LLSDFormatter::OPTIONS_PRETTY); + return didFileOpen; } -void LLPersistentNotificationStorage::loadNotifications() +bool LLNotificationStorage::readNotifications(LLSD& pNotificationData) const { - LLResponderRegistry::registerResponders(); + bool didFileRead; - LLNotifications::instance().getChannel("Persistent")-> - connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1)); + pNotificationData.clear(); - llifstream notify_file(mFileName.c_str()); - if (!notify_file.is_open()) + llifstream notifyFile(mFileName.c_str()); + didFileRead = notifyFile.is_open(); + if (!didFileRead) { - llwarns << "Failed to open " << mFileName << llendl; - return; + LL_WARNS("LLNotificationStorage") << "Failed to open file '" << mFileName << "'" << LL_ENDL; } - - LLSD input; - LLPointer<LLSDParser> parser = new LLSDXMLParser(); - if (parser->parse(notify_file, input, LLSDSerialize::SIZE_UNLIMITED) < 0) + else { - 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) + LLPointer<LLSDParser> parser = new LLSDXMLParser(); + didFileRead = (parser->parse(notifyFile, pNotificationData, LLSDSerialize::SIZE_UNLIMITED) >= 0); + if (!didFileRead) { - // hide saved toasts so they don't confuse the user - notification_channel->hideToast(notification->getID()); + LL_WARNS("LLNotificationStorage") << "Failed to parse open notifications from file '" << mFileName + << "'" << LL_ENDL; } } -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -LLResponderRegistry::build_map_t LLResponderRegistry::sBuildMap; - -void LLResponderRegistry::registerResponders() -{ - sBuildMap.clear(); - - add("ObjectGiveItem", &create<LLOfferInfo>); - add("UserGiveItem", &create<LLOfferInfo>); + return didFileRead; } -LLNotificationResponderInterface* LLResponderRegistry::createResponder(const std::string& notification_name, const LLSD& params) +LLNotificationResponderInterface * LLNotificationStorage::createResponder(const std::string& pNotificationName, const LLSD& pParams) const { - 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); + return LLResponderRegistry::getInstance()->createResponder(pNotificationName, pParams); } - -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 index 8635c797c0..7aabf7d09e 100644 --- a/indra/newview/llnotificationstorage.h +++ b/indra/newview/llnotificationstorage.h @@ -27,32 +27,27 @@ #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: +#include <string> - LLPersistentNotificationStorage(); +#include "llerror.h" - void saveNotifications(); +class LLNotificationResponderInterface; +class LLSD; - void loadNotifications(); +class LLNotificationStorage +{ + LOG_CLASS(LLNotificationStorage); +public: + LLNotificationStorage(std::string pFileName); + ~LLNotificationStorage(); -private: +protected: + bool writeNotifications(const LLSD& pNotificationData) const; + bool readNotifications(LLSD& pNotificationData) const; - bool onPersistentChannelChanged(const LLSD& payload); + LLNotificationResponderInterface* createResponder(const std::string& pNotificationName, const LLSD& pParams) const; +private: std::string mFileName; }; diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index e397cfa046..a85335f1ba 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -28,8 +28,8 @@ #include "llviewerprecompiledheaders.h" // must be first include #include "llfloaterreg.h" -#include "llnearbychat.h" -#include "llnearbychatbar.h" +#include "llfloaterimnearbychat.h" +#include "llfloaterimnearbychat.h" #include "llnotificationhandler.h" #include "llnotifications.h" #include "lltoastnotifypanel.h" @@ -41,15 +41,13 @@ using namespace LLNotificationsUI; //-------------------------------------------------------------------------- -LLTipHandler::LLTipHandler(e_notification_type type, const LLSD& id) +LLTipHandler::LLTipHandler() +: LLSystemNotificationHandler("NotificationTips", "notifytip") { - mType = type; - // Getting a Channel for our notifications LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel(); if(channel) { - channel->setOnRejectToastCallback(boost::bind(&LLTipHandler::onRejectToast, this, _1)); mChannel = channel->getHandle(); } } @@ -68,102 +66,67 @@ void LLTipHandler::initChannel() } //-------------------------------------------------------------------------- -bool LLTipHandler::processNotification(const LLSD& notify) +bool LLTipHandler::processNotification(const LLNotificationPtr& notification) { if(mChannel.isDead()) { return false; } - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - if(!notification) - return false; - // arrange a channel on a screen if(!mChannel.get()->getVisible()) { initChannel(); } - if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change") - { // archive message in nearby chat - if (LLHandlerUtil::canLogToNearbyChat(notification)) - { - LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM); - - // don't show toast if Nearby Chat is opened - LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); - LLNearbyChatBar* nearby_chat_bar = LLNearbyChatBar::getInstance(); - if (!nearby_chat_bar->isMinimized() && nearby_chat_bar->getVisible() && nearby_chat->getVisible()) - { - return false; - } - } - - std::string session_name = notification->getPayload()["SESSION_NAME"]; - const std::string name = notification->getSubstitutions()["NAME"]; - if (session_name.empty()) - { - session_name = name; - } - LLUUID from_id = notification->getPayload()["from_id"]; - if (LLHandlerUtil::canLogToIM(notification)) - { - LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, session_name, name, - notification->getMessage(), from_id, from_id); - } - - if (LLHandlerUtil::canSpawnIMSession(notification)) - { - LLHandlerUtil::spawnIMSession(name, from_id); - } + if (notification->canLogToChat()) + { + LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM); - // don't spawn toast for inventory accepted/declined offers if respective IM window is open (EXT-5909) - if (!LLHandlerUtil::canSpawnToast(notification)) + // don't show toast if Nearby Chat is opened + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + if (nearby_chat->isChatVisible()) { return false; } + } - LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); - - LLToast::Params p; - p.notif_id = notification->getID(); - p.notification = notification; - p.lifetime_secs = gSavedSettings.getS32("NotificationTipToastLifeTime"); - p.panel = notify_box; - p.is_tip = true; - p.can_be_stored = false; - - removeExclusiveNotifications(notification); - - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); - if(channel) - channel->addToast(p); + std::string session_name = notification->getPayload()["SESSION_NAME"]; + const std::string name = notification->getSubstitutions()["NAME"]; + if (session_name.empty()) + { + session_name = name; } - else if (notify["sigtype"].asString() == "delete") + LLUUID from_id = notification->getPayload()["from_id"]; + if (notification->canLogToIM()) { - mChannel.get()->killToastByNotificationID(notification->getID()); + LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, session_name, name, + notification->getMessage(), from_id, from_id); } - return false; -} - -//-------------------------------------------------------------------------- -void LLTipHandler::onDeleteToast(LLToast* toast) -{ -} - -//-------------------------------------------------------------------------- -void LLTipHandler::onRejectToast(const LLUUID& id) -{ - LLNotificationPtr notification = LLNotifications::instance().find(id); + if (notification->canLogToIM() && notification->hasFormElements()) + { + LLHandlerUtil::spawnIMSession(name, from_id); + } - if (notification - && LLNotificationManager::getInstance()->getHandlerForNotification( - notification->getType()) == this) + if (notification->canLogToIM() && LLHandlerUtil::isIMFloaterOpened(notification)) { - LLNotifications::instance().cancel(notification); + return false; } + + LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); + + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.lifetime_secs = gSavedSettings.getS32("NotificationTipToastLifeTime"); + p.panel = notify_box; + p.is_tip = true; + p.can_be_stored = false; + + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) + channel->addToast(p); + return false; } diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index ef5ef2ddc8..c15b6bd0d3 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -117,6 +117,8 @@ public: registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this)); registrar.add("Gear.Delete", boost::bind(&LLOutfitsList::removeSelected, mOutfitList)); registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2)); + registrar.add("Gear.Collapse", boost::bind(&LLOutfitsList::collapse_all_folders, mOutfitList)); + registrar.add("Gear.Expand", boost::bind(&LLOutfitsList::expand_all_folders, mOutfitList)); registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this)); @@ -743,6 +745,34 @@ void LLOutfitsList::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const } } +void LLOutfitsList::collapse_all_folders() +{ + for (outfits_map_t::iterator iter = mOutfitsMap.begin(); + iter != mOutfitsMap.end(); + ++iter) + { + LLAccordionCtrlTab* tab = iter->second; + if(tab && tab->isExpanded()) + { + tab->changeOpenClose(true); + } + } +} + +void LLOutfitsList::expand_all_folders() +{ + for (outfits_map_t::iterator iter = mOutfitsMap.begin(); + iter != mOutfitsMap.end(); + ++iter) + { + LLAccordionCtrlTab* tab = iter->second; + if(tab && !tab->isExpanded()) + { + tab->changeOpenClose(false); + } + } +} + boost::signals2::connection LLOutfitsList::setSelectionChangeCallback(selection_change_callback_t cb) { return mSelectionChangeSignal.connect(cb); diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index a0598737f1..2e3fb3f488 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -108,6 +108,16 @@ public: */ bool hasItemSelected(); + /** + Collapses all outfit accordions. + */ + void collapse_all_folders(); + /** + Expands all outfit accordions. + */ + void expand_all_folders(); + + private: void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 85626d8783..6c26073d5b 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -28,6 +28,7 @@ #include "lloutputmonitorctrl.h" // library includes +#include "llfloaterreg.h" #include "llui.h" // viewer includes @@ -72,8 +73,8 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p) mAutoUpdate(p.auto_update), mSpeakerId(p.speaker_id), mIsAgentControl(false), - mIsSwitchDirty(false), - mShouldSwitchOn(false) + mIndicatorToggled(false), + mShowParticipantsSpeaking(false) { //static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange); //static LLUIColor output_monitor_overdriven_color = LLUIColorTable::instance().getColor("OutputMonitorOverdrivenColor", LLColor4::red); @@ -114,26 +115,6 @@ void LLOutputMonitorCtrl::setPower(F32 val) void LLOutputMonitorCtrl::draw() { - // see also switchIndicator() - if (mIsSwitchDirty) - { - mIsSwitchDirty = false; - if (mShouldSwitchOn) - { - // just notify parent visibility may have changed - notifyParentVisibilityChanged(); - } - else - { - // make itself invisible and notify parent about this - setVisible(FALSE); - notifyParentVisibilityChanged(); - - // no needs to render for invisible element - return; - } - } - // Copied from llmediaremotectrl.cpp // *TODO: Give the LLOutputMonitorCtrl an agent-id to monitor, then // call directly into LLVoiceClient::getInstance() to ask if that agent-id is muted, is @@ -156,6 +137,24 @@ void LLOutputMonitorCtrl::draw() } } + if ((mPower == 0.f && !mIsTalking) && mShowParticipantsSpeaking) + { + std::set<LLUUID> participant_uuids; + LLVoiceClient::instance().getParticipantList(participant_uuids); + std::set<LLUUID>::const_iterator part_it = participant_uuids.begin(); + + F32 power = 0; + for (; part_it != participant_uuids.end(); ++part_it) + { + power = LLVoiceClient::instance().getCurrentPower(*part_it); + if (power) + { + mPower = power; + break; + } + } + } + LLPointer<LLUIImage> icon; if (mIsMuted) { @@ -241,14 +240,34 @@ void LLOutputMonitorCtrl::draw() gl_rect_2d(0, monh, monw, 0, sColorBound, FALSE); } -void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id/* = LLUUID::null*/) +// virtual +BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask) +{ + if (mSpeakerId != gAgentID && !mShowParticipantsSpeaking) + { + LLFloaterReg::showInstance("floater_voice_volume", LLSD().with("avatar_id", mSpeakerId)); + } + else if(mShowParticipantsSpeaking) + { + LLFloaterReg::showInstance("chat_voice", LLSD()); + } + + return TRUE; +} + +void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id/* = LLUUID::null*/, bool show_other_participants_speaking /* = false */) { if (speaker_id.isNull() && mSpeakerId.notNull()) { LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this); + switchIndicator(false); + mSpeakerId = speaker_id; } - if (speaker_id.isNull() || speaker_id == mSpeakerId) return; + if (speaker_id.isNull() || (speaker_id == mSpeakerId)) + { + return; + } if (mSpeakerId.notNull()) { @@ -256,6 +275,7 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& s LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this); } + mShowParticipantsSpeaking = show_other_participants_speaking; mSpeakerId = speaker_id; LLSpeakingIndicatorManager::registerSpeakingIndicator(mSpeakerId, this, session_id); @@ -264,12 +284,12 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& s { if (speaker_id == gAgentID) { - setIsMuted(false); + mIsMuted = false; } else { // check only blocking on voice. EXT-3542 - setIsMuted(LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat)); + mIsMuted = LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat); LLMuteList::getInstance()->addObserver(this); } } @@ -278,32 +298,34 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& s void LLOutputMonitorCtrl::onChange() { // check only blocking on voice. EXT-3542 - setIsMuted(LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat)); + mIsMuted = LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat); } // virtual void LLOutputMonitorCtrl::switchIndicator(bool switch_on) { - // ensure indicator is visible in case it is not in visible chain - // to be called when parent became visible next time to notify parent that visibility is changed. - setVisible(TRUE); - - // if parent is in visible chain apply switch_on state and notify it immediately - if (getParent() && getParent()->isInVisibleChain()) - { - LL_DEBUGS("SpeakingIndicator") << "Indicator is in visible chain, notifying parent: " << mSpeakerId << LL_ENDL; - setVisible((BOOL)switch_on); - notifyParentVisibilityChanged(); - } - // otherwise remember necessary state and mark itself as dirty. - // State will be applied in next draw when parents chain becomes visible. - else - { - LL_DEBUGS("SpeakingIndicator") << "Indicator is not in visible chain, parent won't be notified: " << mSpeakerId << LL_ENDL; - mIsSwitchDirty = true; - mShouldSwitchOn = switch_on; - } + if(getVisible() != (BOOL)switch_on) + { + setVisible(switch_on); + + //Let parent adjust positioning of icons adjacent to speaker indicator + //(when speaker indicator hidden, adjacent icons move to right and when speaker + //indicator visible, adjacent icons move to the left) + if (getParent() && getParent()->isInVisibleChain()) + { + notifyParentVisibilityChanged(); + //Ignore toggled state in case it was set when parent visibility was hidden + mIndicatorToggled = false; + } + else + { + //Makes sure to only adjust adjacent icons when parent becomes visible + //(!mIndicatorToggled ensures that changes of TFT and FTF are discarded, real state changes are TF or FT) + mIndicatorToggled = !mIndicatorToggled; + } + + } } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index 2d23753d46..a346909027 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -28,10 +28,10 @@ #define LL_LLOUTPUTMONITORCTRL_H #include "v4color.h" -#include "llview.h" +#include "../llui/llview.h" #include "llmutelist.h" #include "llspeakingindicatormanager.h" -#include "lluiimage.h" +#include "../llui/lluiimage.h" class LLTextBox; class LLUICtrlFactory; @@ -68,19 +68,19 @@ public: // llview overrides virtual void draw(); + virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); void setPower(F32 val); F32 getPower(F32 val) const { return mPower; } - bool getIsMuted() const { return mIsMuted; } - void setIsMuted(bool val) { mIsMuted = val; } - // For the current user, need to know the PTT state to show // correct button image. void setIsAgentControl(bool val) { mIsAgentControl = val; } void setIsTalking(bool val) { mIsTalking = val; } + void setShowParticipantsSpeaking(bool show) { mShowParticipantsSpeaking = show; } + /** * Sets avatar UUID to interact with voice channel. * @@ -89,7 +89,7 @@ public: * If this parameter is set registered indicator will be shown only in voice channel * which has the same session id (EXT-5562). */ - void setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id = LLUUID::null); + void setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id = LLUUID::null, bool show_other_participants_speaking = false); //called by mute list virtual void onChange(); @@ -105,6 +105,8 @@ public: * It will be applied in next draw and parent will be notified. */ virtual void switchIndicator(bool switch_on); + bool getIndicatorToggled() { return mIndicatorToggled;} + void setIndicatorToggled(bool value) { mIndicatorToggled = value;} private: @@ -131,6 +133,7 @@ private: bool mIsAgentControl; bool mIsMuted; bool mIsTalking; + bool mShowParticipantsSpeaking; LLPointer<LLUIImage> mImageMute; LLPointer<LLUIImage> mImageOff; LLPointer<LLUIImage> mImageOn; @@ -144,9 +147,7 @@ private: /** uuid of a speaker being monitored */ LLUUID mSpeakerId; - /** indicates if the instance is dirty and should notify parent */ - bool mIsSwitchDirty; - bool mShouldSwitchOn; + bool mIndicatorToggled; }; #endif diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index 5c85ec438c..115114bb53 100644 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -30,15 +30,23 @@ // library include #include "llavatarname.h" +#include "llfiltereditor.h" #include "llfloater.h" #include "llfloaterreg.h" #include "llnotificationsutil.h" #include "llscrolllistctrl.h" +#include "llmenubutton.h" // project include +#include "llavatarlistitem.h" +#include "llblocklist.h" +#include "llblockedlistitem.h" #include "llfloateravatarpicker.h" #include "llfloatersidepanelcontainer.h" +#include "llinventorylistitem.h" +#include "llinventorymodel.h" #include "llsidetraypanelcontainer.h" +#include "llviewercontrol.h" static LLRegisterPanelClassWrapper<LLPanelBlockedList> t_panel_blocked_list("panel_block_list_sidetray"); @@ -54,26 +62,47 @@ const std::string BLOCKED_PARAM_NAME = "blocked_to_select"; LLPanelBlockedList::LLPanelBlockedList() : LLPanel() { - mCommitCallbackRegistrar.add("Block.ClickPick", boost::bind(&LLPanelBlockedList::onPickBtnClick, this)); - mCommitCallbackRegistrar.add("Block.ClickBlockByName", boost::bind(&LLPanelBlockedList::onBlockByNameClick, this)); - mCommitCallbackRegistrar.add("Block.ClickRemove", boost::bind(&LLPanelBlockedList::onRemoveBtnClick, this)); + mCommitCallbackRegistrar.add("Block.Action", boost::bind(&LLPanelBlockedList::onCustomAction, this, _2)); + mEnableCallbackRegistrar.add("Block.Check", boost::bind(&LLPanelBlockedList::isActionChecked, this, _2)); } -LLPanelBlockedList::~LLPanelBlockedList() +void LLPanelBlockedList::removePicker() { - LLMuteList::getInstance()->removeObserver(this); + if(mPicker.get()) + { + mPicker.get()->closeFloater(); + } } BOOL LLPanelBlockedList::postBuild() { - mBlockedList = getChild<LLScrollListCtrl>("blocked"); + mBlockedList = getChild<LLBlockList>("blocked"); mBlockedList->setCommitOnSelectionChange(TRUE); + this->setVisibleCallback(boost::bind(&LLPanelBlockedList::removePicker, this)); - childSetCommitCallback("back", boost::bind(&LLPanelBlockedList::onBackBtnClick, this), NULL); + switch (gSavedSettings.getU32("BlockPeopleSortOrder")) + { + case E_SORT_BY_NAME: + mBlockedList->sortByName(); + break; + + case E_SORT_BY_TYPE: + mBlockedList->sortByType(); + break; + default: + llwarns << "Unrecognized sort order for blocked list" << llendl; + break; + } + + // Use the context menu of the Block list for the Block tab gear menu. + LLToggleableMenu* blocked_gear_menu = mBlockedList->getContextMenu(); + if (blocked_gear_menu) + { + getChild<LLMenuButton>("blocked_gear_btn")->setMenu(blocked_gear_menu, LLMenuButton::MP_BOTTOM_LEFT); + } - LLMuteList::getInstance()->addObserver(this); - - refreshBlockedList(); + getChild<LLButton>("unblock_btn")->setCommitCallback(boost::bind(&LLPanelBlockedList::unblockItem, this)); + getChild<LLFilterEditor>("blocked_filter_input")->setCommitCallback(boost::bind(&LLPanelBlockedList::onFilterEdit, this, _2)); return LLPanel::postBuild(); } @@ -94,97 +123,112 @@ void LLPanelBlockedList::onOpen(const LLSD& key) void LLPanelBlockedList::selectBlocked(const LLUUID& mute_id) { - mBlockedList->selectByID(mute_id); + mBlockedList->selectItemByUUID(mute_id); } void LLPanelBlockedList::showPanelAndSelect(const LLUUID& idToSelect) { - LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD().with(BLOCKED_PARAM_NAME, idToSelect)); + LLFloaterSidePanelContainer::showPanel("people", "panel_people", + LLSD().with("people_panel_tab_name", "blocked_panel").with(BLOCKED_PARAM_NAME, idToSelect)); } ////////////////////////////////////////////////////////////////////////// // Private Section ////////////////////////////////////////////////////////////////////////// -void LLPanelBlockedList::refreshBlockedList() +void LLPanelBlockedList::updateButtons() { - mBlockedList->deleteAllItems(); + bool hasSelected = NULL != mBlockedList->getSelectedItem(); + getChildView("unblock_btn")->setEnabled(hasSelected); + getChildView("blocked_gear_btn")->setEnabled(hasSelected); +} - std::vector<LLMute> mutes = LLMuteList::getInstance()->getMutes(); - std::vector<LLMute>::iterator it; - for (it = mutes.begin(); it != mutes.end(); ++it) +void LLPanelBlockedList::unblockItem() +{ + LLBlockedListItem* item = mBlockedList->getBlockedItem(); + if (item) { - LLScrollListItem::Params item_p; - item_p.enabled(TRUE); - item_p.value(it->mID); // link UUID of blocked item with ScrollListItem - item_p.columns.add().column("item_name").value(it->mName);//.type("text"); - item_p.columns.add().column("item_type").value(it->getDisplayType());//.type("text").width(111); - - mBlockedList->addRow(item_p, ADD_BOTTOM); + LLMute mute(item->getUUID(), item->getName()); + LLMuteList::instance().remove(mute); } } -void LLPanelBlockedList::updateButtons() +void LLPanelBlockedList::onCustomAction(const LLSD& userdata) { - bool hasSelected = NULL != mBlockedList->getFirstSelected(); - getChildView("Unblock")->setEnabled(hasSelected); -} - + const std::string command_name = userdata.asString(); - -void LLPanelBlockedList::onBackBtnClick() -{ - LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent()); - if(parent) + if ("block_obj_by_name" == command_name) + { + blockObjectByName(); + } + else if ("block_res_by_name" == command_name) + { + blockResidentByName(); + } + else if ("sort_by_name" == command_name) + { + mBlockedList->sortByName(); + gSavedSettings.setU32("BlockPeopleSortOrder", E_SORT_BY_NAME); + } + else if ("sort_by_type" == command_name) { - parent->openPreviousPanel(); + mBlockedList->sortByType(); + gSavedSettings.setU32("BlockPeopleSortOrder", E_SORT_BY_TYPE); } } -void LLPanelBlockedList::onRemoveBtnClick() +BOOL LLPanelBlockedList::isActionChecked(const LLSD& userdata) { - std::string name = mBlockedList->getSelectedItemLabel(); - LLUUID id = mBlockedList->getStringUUIDSelectedItem(); - LLMute mute(id, name); - - S32 last_selected = mBlockedList->getFirstSelectedIndex(); - if (LLMuteList::getInstance()->remove(mute)) + std::string item = userdata.asString(); + U32 sort_order = gSavedSettings.getU32("BlockPeopleSortOrder"); + + if ("sort_by_name" == item) + { + return E_SORT_BY_NAME == sort_order; + } + else if ("sort_by_type" == item) { - // Above removals may rebuild this dialog. - - if (last_selected == mBlockedList->getItemCount()) - { - // we were on the last item, so select the last item again - mBlockedList->selectNthItem(last_selected - 1); - } - else - { - // else select the item after the last item previously selected - mBlockedList->selectNthItem(last_selected); - } + return E_SORT_BY_TYPE == sort_order; } + + return false; } -void LLPanelBlockedList::onPickBtnClick() +void LLPanelBlockedList::blockResidentByName() { const BOOL allow_multiple = FALSE; const BOOL close_on_select = TRUE; - /*LLFloaterAvatarPicker* picker = */LLFloaterAvatarPicker::show(boost::bind(&LLPanelBlockedList::callbackBlockPicked, this, _1, _2), allow_multiple, close_on_select); - - // *TODO: mantipov: should LLFloaterAvatarPicker be closed when panel is closed? - // old Floater dependency is not enable in panel - // addDependentFloater(picker); + + LLView * button = findChild<LLButton>("plus_btn", TRUE); + LLFloater* root_floater = gFloaterView->getParentFloater(this); + LLFloaterAvatarPicker * picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelBlockedList::callbackBlockPicked, this, _1, _2), + allow_multiple, close_on_select, FALSE, root_floater->getName(), button); + + if (root_floater) + { + root_floater->addDependentFloater(picker); + } + + mPicker = picker->getHandle(); } -void LLPanelBlockedList::onBlockByNameClick() +void LLPanelBlockedList::blockObjectByName() { LLFloaterGetBlockedObjectName::show(&LLPanelBlockedList::callbackBlockByName); } +void LLPanelBlockedList::onFilterEdit(const std::string& search_string) +{ + std::string filter = search_string; + LLStringUtil::trimHead(filter); + + mBlockedList->setNameFilter(filter); +} + void LLPanelBlockedList::callbackBlockPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names) { if (names.empty() || ids.empty()) return; - LLMute mute(ids[0], names[0].getLegacyName(), LLMute::AGENT); + LLMute mute(ids[0], names[0].getAccountName(), LLMute::AGENT); LLMuteList::getInstance()->add(mute); showPanelAndSelect(mute.mID); } diff --git a/indra/newview/llpanelblockedlist.h b/indra/newview/llpanelblockedlist.h index 74ad82e32d..07f0437656 100644 --- a/indra/newview/llpanelblockedlist.h +++ b/indra/newview/llpanelblockedlist.h @@ -30,21 +30,15 @@ #include "llpanel.h" #include "llmutelist.h" #include "llfloater.h" -// #include <vector> -// class LLButton; -// class LLLineEditor; -// class LLMessageSystem; -// class LLUUID; class LLAvatarName; -class LLScrollListCtrl; +class LLBlockList; -class LLPanelBlockedList - : public LLPanel, public LLMuteListObserver +class LLPanelBlockedList : public LLPanel { public: LLPanelBlockedList(); - ~LLPanelBlockedList(); + ~LLPanelBlockedList(){}; virtual BOOL postBuild(); virtual void draw(); @@ -59,25 +53,33 @@ public: * If it is LLUUID::null, nothing will be selected. */ static void showPanelAndSelect(const LLUUID& idToSelect); - - // LLMuteListObserver callback interface implementation. - /* virtual */ void onChange() { refreshBlockedList();} private: - void refreshBlockedList(); + + typedef enum e_sort_oder{ + E_SORT_BY_NAME = 0, + E_SORT_BY_TYPE = 1, + } ESortOrder; + + void removePicker(); void updateButtons(); // UI callbacks - void onBackBtnClick(); - void onRemoveBtnClick(); - void onPickBtnClick(); - void onBlockByNameClick(); + void unblockItem(); + void blockResidentByName(); + void blockObjectByName(); + void onFilterEdit(const std::string& search_string); + + // List commnads + void onCustomAction(const LLSD& userdata); + BOOL isActionChecked(const LLSD& userdata); void callbackBlockPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names); static void callbackBlockByName(const std::string& text); private: - LLScrollListCtrl* mBlockedList; + LLBlockList* mBlockedList; + LLHandle<LLFloater> mPicker; }; //----------------------------------------------------------------------------- diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index d58d6d536c..6b9edcb07c 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -835,11 +835,11 @@ BOOL LLPanelEditWearable::isDirty() const BOOL isDirty = FALSE; if (mWearablePtr) { - if (mWearablePtr->isDirty() || - mWearableItem->getName().compare(mNameEditor->getText()) != 0) - { - isDirty = TRUE; - } + if (mWearablePtr->isDirty() || + ( mWearableItem && mNameEditor && mWearableItem->getName().compare(mNameEditor->getText()) != 0 )) + { + isDirty = TRUE; + } } return isDirty; } @@ -1186,7 +1186,7 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show, BOOL dis void LLPanelEditWearable::showDefaultSubpart() { - changeCamera(3); + changeCamera(0); } void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index) diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index b494c7d403..0e6f5b8924 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -33,7 +33,7 @@ class LLOfferInfo; -const S32 UPDATE_MEMBERS_PER_FRAME = 500; +const F32 UPDATE_MEMBERS_SECONDS_PER_FRAME = 0.005; // 5ms // Forward declares class LLPanelGroupTab; diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index bc594b5517..0cd93b330a 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -28,8 +28,10 @@ #include "llpanelgroupgeneral.h" -#include "lluictrlfactory.h" +#include "llavatarnamecache.h" #include "llagent.h" +#include "llsdparam.h" +#include "lluictrlfactory.h" #include "roles_constants.h" // UI elements @@ -77,13 +79,18 @@ LLPanelGroupGeneral::LLPanelGroupGeneral() mCtrlReceiveNotices(NULL), mCtrlListGroup(NULL), mActiveTitleLabel(NULL), - mComboActiveTitle(NULL) + mComboActiveTitle(NULL), + mAvatarNameCacheConnection() { } LLPanelGroupGeneral::~LLPanelGroupGeneral() { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } } BOOL LLPanelGroupGeneral::postBuild() @@ -313,11 +320,10 @@ void LLPanelGroupGeneral::activate() { LLGroupMgr::getInstance()->sendGroupTitlesRequest(mGroupID); LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mGroupID); - if (!gdatap || !gdatap->isMemberDataComplete() ) { - LLGroupMgr::getInstance()->sendGroupMembersRequest(mGroupID); + LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); } mFirstUse = FALSE; @@ -697,76 +703,48 @@ void LLPanelGroupGeneral::updateMembers() LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); - if (!mListVisibleMembers || !gdatap + if (!mListVisibleMembers + || !gdatap || !gdatap->isMemberDataComplete() || gdatap->mMembers.empty()) { return; } - static LLTimer all_timer; - static LLTimer sd_timer; - static LLTimer element_timer; + LLTimer update_time; + update_time.setTimerExpirySec(UPDATE_MEMBERS_SECONDS_PER_FRAME); - all_timer.reset(); - S32 i = 0; + LLAvatarName av_name; - for( ; mMemberProgress != gdatap->mMembers.end() && i<UPDATE_MEMBERS_PER_FRAME; - ++mMemberProgress, ++i) + for( ; mMemberProgress != gdatap->mMembers.end() && !update_time.hasExpired(); + ++mMemberProgress) { - //llinfos << "Adding " << iter->first << ", " << iter->second->getTitle() << llendl; LLGroupMemberData* member = mMemberProgress->second; if (!member) { continue; } - // Owners show up in bold. - std::string style = "NORMAL"; - sd_timer.reset(); - LLSD row; - row["id"] = member->getID(); - - row["columns"][0]["column"] = "name"; - row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; - row["columns"][0]["font"]["style"] = style; - // value is filled in by name list control - - row["columns"][1]["column"] = "title"; - row["columns"][1]["value"] = member->getTitle(); - row["columns"][1]["font"]["name"] = "SANSSERIF_SMALL"; - row["columns"][1]["font"]["style"] = style; - - std::string status = member->getOnlineStatus(); - - row["columns"][2]["column"] = "status"; - row["columns"][2]["value"] = status; - row["columns"][2]["font"]["name"] = "SANSSERIF_SMALL"; - row["columns"][2]["font"]["style"] = style; - - sSDTime += sd_timer.getElapsedTimeF32(); - element_timer.reset(); - LLScrollListItem* member_row = mListVisibleMembers->addElement(row); - - if ( member->isOwner() ) + if (LLAvatarNameCache::get(mMemberProgress->first, &av_name)) + { + addMember(mMemberProgress->second); + } + else { - LLScrollListText* name_textp = dynamic_cast<LLScrollListText*>(member_row->getColumn(0)); - if (name_textp) - name_textp->setFontStyle(LLFontGL::BOLD); + // If name is not cached, onNameCache() should be called when it is cached and add this member to list. + // *TODO : Use a callback per member, not for the panel group. + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupGeneral::onNameCache, this, gdatap->getMemberVersion(), member, _2)); } - sElementTime += element_timer.getElapsedTimeF32(); } - sAllTime += all_timer.getElapsedTimeF32(); - llinfos << "Updated " << i << " of " << UPDATE_MEMBERS_PER_FRAME << "members in the list." << llendl; if (mMemberProgress == gdatap->mMembers.end()) { - llinfos << " member list completed." << llendl; + lldebugs << " member list completed." << llendl; mListVisibleMembers->setEnabled(TRUE); - - llinfos << "All Time: " << sAllTime << llendl; - llinfos << "SD Time: " << sSDTime << llendl; - llinfos << "Element Time: " << sElementTime << llendl; } else { @@ -775,6 +753,45 @@ void LLPanelGroupGeneral::updateMembers() } } +void LLPanelGroupGeneral::addMember(LLGroupMemberData* member) +{ + LLNameListCtrl::NameItem item_params; + item_params.value = member->getID(); + + LLScrollListCell::Params column; + item_params.columns.add().column("name").font.name("SANSSERIF_SMALL"); + + item_params.columns.add().column("title").value(member->getTitle()).font.name("SANSSERIF_SMALL"); + + item_params.columns.add().column("status").value(member->getOnlineStatus()).font.name("SANSSERIF_SMALL"); + + LLScrollListItem* member_row = mListVisibleMembers->addNameItemRow(item_params); + + if ( member->isOwner() ) + { + LLScrollListText* name_textp = dynamic_cast<LLScrollListText*>(member_row->getColumn(0)); + if (name_textp) + name_textp->setFontStyle(LLFontGL::BOLD); + } +} + +void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name) +{ + mAvatarNameCacheConnection.disconnect(); + + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); + + if (!gdatap + || !gdatap->isMemberDataComplete() + || gdatap->getMemberVersion() != update_id) + { + // Stale data + return; + } + + addMember(member); +} + void LLPanelGroupGeneral::updateChanged() { // List all the controls we want to check for changes... diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index 88c092c461..b7f4a01139 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -38,6 +38,7 @@ class LLNameListCtrl; class LLCheckBoxCtrl; class LLComboBox; class LLSpinCtrl; +class LLAvatarName; class LLPanelGroupGeneral : public LLPanelGroupTab { @@ -62,6 +63,7 @@ public: virtual void setupCtrls (LLPanel* parent); + void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name); private: void reset(); @@ -75,7 +77,8 @@ private: static void onReceiveNotices(LLUICtrl* ctrl, void* data); static void openProfile(void* data); - S32 sortMembersList(S32,const LLScrollListItem*,const LLScrollListItem*); + S32 sortMembersList(S32,const LLScrollListItem*,const LLScrollListItem*); + void addMember(LLGroupMemberData* member); static bool joinDlgCB(const LLSD& notification, const LLSD& response); @@ -108,6 +111,7 @@ private: LLComboBox *mComboMature; LLGroupMgrGroupData::member_list_t::iterator mMemberProgress; + boost::signals2::connection mAvatarNameCacheConnection; }; #endif diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index 7a15d93181..133b269c11 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -83,11 +83,14 @@ public: LLTextBox *mGroupName; std::string mOwnerWarning; std::string mAlreadyInGroup; + std::string mTooManySelected; bool mConfirmedOwnerInvite; void (*mCloseCallback)(void* data); void* mCloseCallbackUserData; + + boost::signals2::connection mAvatarNameCacheConnection; }; @@ -101,12 +104,17 @@ LLPanelGroupInvite::impl::impl(const LLUUID& group_id): mGroupName( NULL ), mConfirmedOwnerInvite( false ), mCloseCallback( NULL ), - mCloseCallbackUserData( NULL ) + mCloseCallbackUserData( NULL ), + mAvatarNameCacheConnection() { } LLPanelGroupInvite::impl::~impl() { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } } void LLPanelGroupInvite::impl::addUsers(const std::vector<std::string>& names, @@ -185,6 +193,17 @@ void LLPanelGroupInvite::impl::submitInvitations() role_member_pairs[item->getUUID()] = role_id; } + const S32 MAX_GROUP_INVITES = 100; // Max invites per request. 100 to match server cap. + if (role_member_pairs.size() > MAX_GROUP_INVITES) + { + // Fail! + LLSD msg; + msg["MESSAGE"] = mTooManySelected; + LLNotificationsUtil::add("GenericAlert", msg); + (*mCloseCallback)(mCloseCallbackUserData); + return; + } + LLGroupMgr::getInstance()->sendGroupMemberInvites(mGroupID, role_member_pairs); if(already_in_group) @@ -289,11 +308,13 @@ void LLPanelGroupInvite::impl::callbackClickAdd(void* userdata) //Soon the avatar picker will be embedded into this panel //instead of being it's own separate floater. But that is next week. //This will do for now. -jwolk May 10, 2006 + LLView * button = panelp->findChild<LLButton>("add_button"); + LLFloater * root_floater = gFloaterView->getParentFloater(panelp); LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show( - boost::bind(impl::callbackAddUsers, _1, panelp->mImplementation), TRUE); + boost::bind(impl::callbackAddUsers, _1, panelp->mImplementation), TRUE, FALSE, FALSE, root_floater->getName(), button); if (picker) { - gFloaterView->getParentFloater(panelp)->addDependentFloater(picker); + root_floater->addDependentFloater(picker); } } } @@ -366,8 +387,24 @@ void LLPanelGroupInvite::impl::callbackAddUsers(const uuid_vec_t& agent_ids, voi std::vector<std::string> names; for (S32 i = 0; i < (S32)agent_ids.size(); i++) { - LLAvatarNameCache::get(agent_ids[i], - boost::bind(&LLPanelGroupInvite::impl::onAvatarNameCache, _1, _2, user_data)); + LLAvatarName av_name; + if (LLAvatarNameCache::get(agent_ids[i], &av_name)) + { + LLPanelGroupInvite::impl::onAvatarNameCache(agent_ids[i], av_name, user_data); + } + else + { + impl* selfp = (impl*) user_data; + if (selfp) + { + if (selfp->mAvatarNameCacheConnection.connected()) + { + selfp->mAvatarNameCacheConnection.disconnect(); + } + // *TODO : Add a callback per avatar name being fetched. + selfp->mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_ids[i],boost::bind(&LLPanelGroupInvite::impl::onAvatarNameCache, _1, _2, user_data)); + } + } } } @@ -380,6 +417,10 @@ void LLPanelGroupInvite::impl::onAvatarNameCache(const LLUUID& agent_id, if (selfp) { + if (selfp->mAvatarNameCacheConnection.connected()) + { + selfp->mAvatarNameCacheConnection.disconnect(); + } std::vector<std::string> names; uuid_vec_t agent_ids; agent_ids.push_back(agent_id); @@ -455,11 +496,11 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids) //so we need to do this additional search in avatar tracker, see EXT-4732 if (LLAvatarTracker::instance().isBuddy(agent_id)) { - if (!gCacheName->getFullName(agent_id, fullname)) + LLAvatarName av_name; + if (!LLAvatarNameCache::get(agent_id, &av_name)) { // actually it should happen, just in case - gCacheName->get(LLUUID(agent_id), false, boost::bind( - &LLPanelGroupInvite::addUserCallback, this, _1, _2)); + //LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupInvite::addUserCallback, this, _1, _2)); // for this special case! //when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence // removed id will be added in callback @@ -467,7 +508,7 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids) } else { - names.push_back(fullname); + names.push_back(av_name.getAccountName()); } } } @@ -475,12 +516,12 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids) mImplementation->addUsers(names, agent_ids); } -void LLPanelGroupInvite::addUserCallback(const LLUUID& id, const std::string& full_name) +void LLPanelGroupInvite::addUserCallback(const LLUUID& id, const LLAvatarName& av_name) { std::vector<std::string> names; uuid_vec_t agent_ids; agent_ids.push_back(id); - names.push_back(full_name); + names.push_back(av_name.getAccountName()); mImplementation->addUsers(names, agent_ids); } @@ -558,8 +599,8 @@ void LLPanelGroupInvite::updateLists() if (!mPendingUpdate) { LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mImplementation->mGroupID); - LLGroupMgr::getInstance()->sendGroupMembersRequest(mImplementation->mGroupID); LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mImplementation->mGroupID); + LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID); } mPendingUpdate = TRUE; } @@ -621,6 +662,7 @@ BOOL LLPanelGroupInvite::postBuild() mImplementation->mOwnerWarning = getString("confirm_invite_owner_str"); mImplementation->mAlreadyInGroup = getString("already_in_group"); + mImplementation->mTooManySelected = getString("invite_selection_too_large"); update(); diff --git a/indra/newview/llpanelgroupinvite.h b/indra/newview/llpanelgroupinvite.h index a7bfd2226e..9f7b5ae9be 100644 --- a/indra/newview/llpanelgroupinvite.h +++ b/indra/newview/llpanelgroupinvite.h @@ -29,6 +29,8 @@ #include "llpanel.h" #include "lluuid.h" +class LLAvatarName; + class LLPanelGroupInvite : public LLPanel { @@ -40,7 +42,7 @@ public: /** * this callback is being used to add a user whose fullname isn't been loaded before invoking of addUsers(). */ - void addUserCallback(const LLUUID& id, const std::string& full_name); + void addUserCallback(const LLUUID& id, const LLAvatarName& av_name); void clear(); void update(); diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 363443646d..37755fb851 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -517,7 +517,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) row["columns"][3]["column"] = "type"; row["columns"][3]["value"] = land_type; - row["columns"][3]["font"] = "SANSSERIFSMALL"; + row["columns"][3]["font"] = "SANSSERIF_SMALL"; // hidden is always last column row["columns"][4]["column"] = "hidden"; diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 31c0e3d01a..93b108efcc 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -543,10 +543,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) msg->getU32("Data","Timestamp",timestamp,i); // we only have the legacy name here, convert it to a username - if (LLAvatarNameCache::useDisplayNames()) - { - name = LLCacheName::buildUsername(name); - } + name = LLCacheName::buildUsername(name); LLSD row; row["id"] = id; diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index f825ee3215..cfdac11d26 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -29,6 +29,7 @@ #include "llcheckboxctrl.h" #include "llagent.h" +#include "llavatarnamecache.h" #include "llbutton.h" #include "llfiltereditor.h" #include "llfloatergroupinvite.h" @@ -356,7 +357,7 @@ void LLPanelGroupRoles::activate() if (!gdatap || !gdatap->isMemberDataComplete() ) { - LLGroupMgr::getInstance()->sendGroupMembersRequest(mGroupID); + LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); } // Check role data. @@ -742,13 +743,17 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab() mChanged(FALSE), mPendingMemberUpdate(FALSE), mHasMatch(FALSE), - mNumOwnerAdditions(0) + mNumOwnerAdditions(0), + mAvatarNameCacheConnection() { - mUdpateSessionID = LLUUID::null; } LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab() { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } if (mMembersList) { gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName()); @@ -1426,13 +1431,20 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag return GP_NO_POWERS; } - LLGroupMemberData* member_data = gdatap->mMembers[agent_id]; - if ( !member_data ) + LLGroupMgrGroupData::member_list_t::iterator iter = gdatap->mMembers.find(agent_id); + if ( iter == gdatap->mMembers.end() ) { llwarns << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- No member data for member with UUID " << agent_id << llendl; return GP_NO_POWERS; } + LLGroupMemberData* member_data = (*iter).second; + if (!member_data) + { + llwarns << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- Null member data for member with UUID " << agent_id << llendl; + return GP_NO_POWERS; + } + //see if there are unsaved role changes for this agent role_change_data_map_t* role_change_datap = NULL; member_role_changes_map_t::iterator member = mMemberRoleChangeData.find(agent_id); @@ -1547,10 +1559,6 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) mMemberProgress = gdatap->mMembers.begin(); mPendingMemberUpdate = TRUE; mHasMatch = FALSE; - // Generate unique ID for current updateMembers()- see onNameCache for details. - // Using unique UUID is perhaps an overkill but this way we are perfectly safe - // from coincidences. - mUdpateSessionID.generate(); } else { @@ -1578,55 +1586,43 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) } } -void LLPanelGroupMembersSubTab::addMemberToList(LLUUID id, LLGroupMemberData* data) +void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data) { if (!data) return; LLUIString donated = getString("donation_area"); donated.setArg("[AREA]", llformat("%d", data->getContribution())); - LLSD row; - row["id"] = id; - - row["columns"][0]["column"] = "name"; - // value is filled in by name list control + LLNameListCtrl::NameItem item_params; + item_params.value = data->getID(); - row["columns"][1]["column"] = "donated"; - row["columns"][1]["value"] = donated.getString(); + item_params.columns.add().column("name").font.name("SANSSERIF_SMALL").style("NORMAL"); - row["columns"][2]["column"] = "online"; - row["columns"][2]["value"] = data->getOnlineStatus(); - row["columns"][2]["font"] = "SANSSERIF_SMALL"; + item_params.columns.add().column("donated").value(donated.getString()) + .font.name("SANSSERIF_SMALL").style("NORMAL"); - mMembersList->addElement(row); + item_params.columns.add().column("online").value(data->getOnlineStatus()) + .font.name("SANSSERIF_SMALL").style("NORMAL"); + mMembersList->addNameItemRow(item_params); mHasMatch = TRUE; } -void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, const LLUUID& id) +void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name) { - // Update ID is used to determine whether member whose id is passed - // into onNameCache() was passed after current or previous user-initiated update. - // This is needed to avoid probable duplication of members in list after changing filter - // or adding of members of another group if gets for their names were called on - // previous update. If this id is from get() called from older update, - // we do nothing. - if (mUdpateSessionID != update_id) return; - + mAvatarNameCacheConnection.disconnect(); + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); - if (!gdatap) + if (!gdatap + || gdatap->getMemberVersion() != update_id + || !member) { - llwarns << "LLPanelGroupMembersSubTab::updateMembers() -- No group data!" << llendl; return; } - std::string fullname; - gCacheName->getFullName(id, fullname); - - LLGroupMemberData* data; // trying to avoid unnecessary hash lookups - if (matchesSearchFilter(fullname) && ((data = gdatap->mMembers[id]) != NULL)) + if (matchesSearchFilter(av_name.getAccountName())) { - addMemberToList(id, data); + addMemberToList(member); if(!mMembersList->getEnabled()) { mMembersList->setEnabled(TRUE); @@ -1665,27 +1661,33 @@ void LLPanelGroupMembersSubTab::updateMembers() LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end(); - - S32 i = 0; - for( ; mMemberProgress != end && i<UPDATE_MEMBERS_PER_FRAME; - ++mMemberProgress, ++i) + + LLTimer update_time; + update_time.setTimerExpirySec(UPDATE_MEMBERS_SECONDS_PER_FRAME); + + for( ; mMemberProgress != end && !update_time.hasExpired(); ++mMemberProgress) { if (!mMemberProgress->second) continue; + // Do filtering on name if it is already in the cache. - std::string fullname; - if (gCacheName->getFullName(mMemberProgress->first, fullname)) + LLAvatarName av_name; + if (LLAvatarNameCache::get(mMemberProgress->first, &av_name)) { - if (matchesSearchFilter(fullname)) + if (matchesSearchFilter(av_name.getAccountName())) { - addMemberToList(mMemberProgress->first, mMemberProgress->second); + addMemberToList(mMemberProgress->second); } } else { // If name is not cached, onNameCache() should be called when it is cached and add this member to list. - gCacheName->get(mMemberProgress->first, FALSE, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, - this, mUdpateSessionID, _1)); + // *TODO : Add one callback per fetched avatar name + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2)); } } @@ -1987,7 +1989,7 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc) if (!gdatap || !gdatap->isMemberDataComplete()) { - LLGroupMgr::getInstance()->sendGroupMembersRequest(mGroupID); + LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); } if (!gdatap || !gdatap->isRoleMemberDataComplete()) @@ -2580,7 +2582,7 @@ void LLPanelGroupActionsSubTab::handleActionSelect() } else { - LLGroupMgr::getInstance()->sendGroupMembersRequest(mGroupID); + LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); } if (gdatap->isRoleDataComplete()) @@ -2604,6 +2606,7 @@ void LLPanelGroupActionsSubTab::handleActionSelect() LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mGroupID); } } + void LLPanelGroupRoles::setGroupID(const LLUUID& id) { LLPanelGroupTab::setGroupID(id); diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index a55e264150..78bb3c57a1 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -187,8 +187,8 @@ public: virtual void setGroupID(const LLUUID& id); - void addMemberToList(LLUUID id, LLGroupMemberData* data); - void onNameCache(const LLUUID& update_id, const LLUUID& id); + void addMemberToList(LLGroupMemberData* data); + void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name); protected: typedef std::map<LLUUID, LLRoleMemberChangeType> role_change_data_map_t; @@ -210,13 +210,11 @@ protected: BOOL mPendingMemberUpdate; BOOL mHasMatch; - // This id is generated after each user initiated member list update(opening Roles or changing filter) - LLUUID mUdpateSessionID; - member_role_changes_map_t mMemberRoleChangeData; U32 mNumOwnerAdditions; LLGroupMgrGroupData::member_list_t::iterator mMemberProgress; + boost::signals2::connection mAvatarNameCacheConnection; }; class LLPanelGroupRolesSubTab : public LLPanelGroupSubTab diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index eda0749cdb..389baa86cd 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -1,31 +1,30 @@ -/** +/** * @file llpanelavatar.cpp * @brief LLPanelAvatar and related class implementations * * $LicenseInfo:firstyear=2004&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License only. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ #include "llviewerprecompiledheaders.h" - #include "llfloaterreg.h" #include "llpanelimcontrolpanel.h" @@ -39,393 +38,7 @@ #include "llavatarlist.h" #include "llparticipantlist.h" #include "llimview.h" -#include "llvoicechannel.h" #include "llspeakers.h" #include "lltrans.h" -void LLPanelChatControlPanel::onCallButtonClicked() -{ - gIMMgr->startCall(mSessionId); -} - -void LLPanelChatControlPanel::onEndCallButtonClicked() -{ - gIMMgr->endCall(mSessionId); -} - -void LLPanelChatControlPanel::onOpenVoiceControlsClicked() -{ - LLFloaterReg::showInstance("voice_controls"); -} - -void LLPanelChatControlPanel::onChange(EStatusType status, const std::string &channelURI, bool proximal) -{ - if(status == STATUS_JOINING || status == STATUS_LEFT_CHANNEL) - { - return; - } - - updateCallButton(); -} - -void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) -{ - updateButtons(new_state); -} - -void LLPanelChatControlPanel::updateCallButton() -{ - // hide/show call button - bool voice_enabled = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); - - LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId); - - if (!session) - { - getChildView("call_btn")->setEnabled(false); - return; - } - - bool session_initialized = session->mSessionInitialized; - bool callback_enabled = session->mCallBackEnabled; - - BOOL enable_connect = session_initialized - && voice_enabled - && callback_enabled; - getChildView("call_btn")->setEnabled(enable_connect); -} - -void LLPanelChatControlPanel::updateButtons(LLVoiceChannel::EState state) -{ - bool is_call_started = state >= LLVoiceChannel::STATE_CALL_STARTED; - getChildView("end_call_btn_panel")->setVisible( is_call_started); - getChildView("voice_ctrls_btn_panel")->setVisible( is_call_started && findChild<LLView>("voice_ctrls_btn_panel")); - getChildView("call_btn_panel")->setVisible( ! is_call_started); - - getChildView("volume_ctrl_panel")->setVisible(state == LLVoiceChannel::STATE_CONNECTED); - - updateCallButton(); - -} - -LLPanelChatControlPanel::~LLPanelChatControlPanel() -{ - mVoiceChannelStateChangeConnection.disconnect(); - if(LLVoiceClient::instanceExists()) - { - LLVoiceClient::getInstance()->removeObserver(this); - } -} - -BOOL LLPanelChatControlPanel::postBuild() -{ - childSetAction("call_btn", boost::bind(&LLPanelChatControlPanel::onCallButtonClicked, this)); - childSetAction("end_call_btn", boost::bind(&LLPanelChatControlPanel::onEndCallButtonClicked, this)); - childSetAction("voice_ctrls_btn", boost::bind(&LLPanelChatControlPanel::onOpenVoiceControlsClicked, this)); - - LLVoiceClient::getInstance()->addObserver(this); - - return TRUE; -} - -void LLPanelChatControlPanel::setSessionId(const LLUUID& session_id) -{ - //Method is called twice for AdHoc and Group chat. Second time when server init reply received - mSessionId = session_id; - LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionId); - if(voice_channel) - { - mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2)); - - //call (either p2p, group or ad-hoc) can be already in started state - updateButtons(voice_channel->getState()); - } -} - -LLPanelIMControlPanel::LLPanelIMControlPanel() -{ -} - -LLPanelIMControlPanel::~LLPanelIMControlPanel() -{ - LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarID, this); -} - -BOOL LLPanelIMControlPanel::postBuild() -{ - childSetAction("view_profile_btn", boost::bind(&LLPanelIMControlPanel::onViewProfileButtonClicked, this)); - childSetAction("add_friend_btn", boost::bind(&LLPanelIMControlPanel::onAddFriendButtonClicked, this)); - - childSetAction("share_btn", boost::bind(&LLPanelIMControlPanel::onShareButtonClicked, this)); - childSetAction("teleport_btn", boost::bind(&LLPanelIMControlPanel::onTeleportButtonClicked, this)); - childSetAction("pay_btn", boost::bind(&LLPanelIMControlPanel::onPayButtonClicked, this)); - - childSetAction("mute_btn", boost::bind(&LLPanelIMControlPanel::onClickMuteVolume, this)); - childSetAction("block_btn", boost::bind(&LLPanelIMControlPanel::onClickBlock, this)); - childSetAction("unblock_btn", boost::bind(&LLPanelIMControlPanel::onClickUnblock, this)); - - getChild<LLUICtrl>("volume_slider")->setCommitCallback(boost::bind(&LLPanelIMControlPanel::onVolumeChange, this, _2)); - - getChildView("add_friend_btn")->setEnabled(!LLAvatarActions::isFriend(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId())); - - setFocusReceivedCallback(boost::bind(&LLPanelIMControlPanel::onFocusReceived, this)); - - return LLPanelChatControlPanel::postBuild(); -} - -void LLPanelIMControlPanel::draw() -{ - bool is_muted = LLMuteList::getInstance()->isMuted(mAvatarID); - - getChild<LLUICtrl>("block_btn_panel")->setVisible(!is_muted); - getChild<LLUICtrl>("unblock_btn_panel")->setVisible(is_muted); - - if (getChildView("volume_ctrl_panel")->getVisible()) - { - - bool is_muted_voice = LLMuteList::getInstance()->isMuted(mAvatarID, LLMute::flagVoiceChat); - - LLUICtrl* mute_btn = getChild<LLUICtrl>("mute_btn"); - mute_btn->setValue( is_muted_voice ); - - LLUICtrl* volume_slider = getChild<LLUICtrl>("volume_slider"); - volume_slider->setEnabled( !is_muted_voice ); - - F32 volume; - - if (is_muted_voice) - { - // it's clearer to display their volume as zero - volume = 0.f; - } - else - { - // actual volume - volume = LLVoiceClient::getInstance()->getUserVolume(mAvatarID); - } - volume_slider->setValue( (F64)volume ); - } - - LLPanelChatControlPanel::draw(); -} - -void LLPanelIMControlPanel::onClickMuteVolume() -{ - // By convention, we only display and toggle voice mutes, not all mutes - LLMuteList* mute_list = LLMuteList::getInstance(); - bool is_muted = mute_list->isMuted(mAvatarID, LLMute::flagVoiceChat); - - LLMute mute(mAvatarID, getChild<LLTextBox>("avatar_name")->getText(), LLMute::AGENT); - if (!is_muted) - { - mute_list->add(mute, LLMute::flagVoiceChat); - } - else - { - mute_list->remove(mute, LLMute::flagVoiceChat); - } -} - -void LLPanelIMControlPanel::onClickBlock() -{ - LLMute mute(mAvatarID, getChild<LLTextBox>("avatar_name")->getText(), LLMute::AGENT); - - LLMuteList::getInstance()->add(mute); -} - -void LLPanelIMControlPanel::onClickUnblock() -{ - LLMute mute(mAvatarID, getChild<LLTextBox>("avatar_name")->getText(), LLMute::AGENT); - - LLMuteList::getInstance()->remove(mute); -} - -void LLPanelIMControlPanel::onVolumeChange(const LLSD& data) -{ - F32 volume = (F32)data.asReal(); - LLVoiceClient::getInstance()->setUserVolume(mAvatarID, volume); -} - -void LLPanelIMControlPanel::onTeleportButtonClicked() -{ - LLAvatarActions::offerTeleport(mAvatarID); -} -void LLPanelIMControlPanel::onPayButtonClicked() -{ - LLAvatarActions::pay(mAvatarID); -} - -void LLPanelIMControlPanel::onViewProfileButtonClicked() -{ - LLAvatarActions::showProfile(mAvatarID); -} - -void LLPanelIMControlPanel::onAddFriendButtonClicked() -{ - LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon"); - std::string full_name = avatar_icon->getFullName(); - LLAvatarActions::requestFriendshipDialog(mAvatarID, full_name); -} - -void LLPanelIMControlPanel::onShareButtonClicked() -{ - LLAvatarActions::share(mAvatarID); -} - -void LLPanelIMControlPanel::onFocusReceived() -{ - // Disable all the buttons (Call, Teleport, etc) if disconnected. - if (gDisconnected) - { - setAllChildrenEnabled(FALSE); - } -} - -void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) -{ - LLPanelChatControlPanel::setSessionId(session_id); - - LLIMModel& im_model = LLIMModel::instance(); - - LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarID, this); - mAvatarID = im_model.getOtherParticipantID(session_id); - LLAvatarTracker::instance().addParticularFriendObserver(mAvatarID, this); - - // Disable "Add friend" button for friends. - getChildView("add_friend_btn")->setEnabled(!LLAvatarActions::isFriend(mAvatarID)); - - // Disable "Teleport" button if friend is offline - if(LLAvatarActions::isFriend(mAvatarID)) - { - getChildView("teleport_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mAvatarID)); - } - - getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(mAvatarID); - - // Disable most profile buttons if the participant is - // not really an SL avatar (e.g., an Avaline caller). - LLIMModel::LLIMSession* im_session = - im_model.findIMSession(session_id); - if( im_session && !im_session->mOtherParticipantIsAvatar ) - { - getChildView("view_profile_btn")->setEnabled(FALSE); - getChildView("add_friend_btn")->setEnabled(FALSE); - - getChildView("share_btn")->setEnabled(FALSE); - getChildView("teleport_btn")->setEnabled(FALSE); - getChildView("pay_btn")->setEnabled(FALSE); - - getChild<LLTextBox>("avatar_name")->setValue(im_session->mName); - getChild<LLTextBox>("avatar_name")->setToolTip(im_session->mName); - } - else - { - // If the participant is an avatar, fetch the currect name - gCacheName->get(mAvatarID, false, - boost::bind(&LLPanelIMControlPanel::onNameCache, this, _1, _2, _3)); - } -} - -//virtual -void LLPanelIMControlPanel::changed(U32 mask) -{ - getChildView("add_friend_btn")->setEnabled(!LLAvatarActions::isFriend(mAvatarID)); - - // Disable "Teleport" button if friend is offline - if(LLAvatarActions::isFriend(mAvatarID)) - { - getChildView("teleport_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mAvatarID)); - } -} - -void LLPanelIMControlPanel::onNameCache(const LLUUID& id, const std::string& full_name, bool is_group) -{ - if ( id == mAvatarID ) - { - std::string avatar_name = full_name; - getChild<LLTextBox>("avatar_name")->setValue(avatar_name); - getChild<LLTextBox>("avatar_name")->setToolTip(avatar_name); - - bool is_linden = LLStringUtil::endsWith(full_name, " Linden"); - getChild<LLUICtrl>("mute_btn")->setEnabled( !is_linden); - } -} - -LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id): -mParticipantList(NULL) -{ -} - -BOOL LLPanelGroupControlPanel::postBuild() -{ - childSetAction("group_info_btn", boost::bind(&LLPanelGroupControlPanel::onGroupInfoButtonClicked, this)); - - return LLPanelChatControlPanel::postBuild(); -} - -LLPanelGroupControlPanel::~LLPanelGroupControlPanel() -{ - delete mParticipantList; - mParticipantList = NULL; -} - -// virtual -void LLPanelGroupControlPanel::draw() -{ - // Need to resort the participant list if it's in sort by recent speaker order. - if (mParticipantList) - mParticipantList->update(); - LLPanelChatControlPanel::draw(); -} - -void LLPanelGroupControlPanel::onGroupInfoButtonClicked() -{ - LLGroupActions::show(mGroupID); -} - -void LLPanelGroupControlPanel::onSortMenuItemClicked(const LLSD& userdata) -{ - // TODO: Check this code when when sort order menu will be added. (EM) - if (false && !mParticipantList) - return; - - std::string chosen_item = userdata.asString(); - - if (chosen_item == "sort_name") - { - mParticipantList->setSortOrder(LLParticipantList::E_SORT_BY_NAME); - } - -} - -void LLPanelGroupControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) -{ - LLPanelChatControlPanel::onVoiceChannelStateChanged(old_state, new_state); - mParticipantList->setSpeakingIndicatorsVisible(new_state >= LLVoiceChannel::STATE_CALL_STARTED); -} - -void LLPanelGroupControlPanel::setSessionId(const LLUUID& session_id) -{ - LLPanelChatControlPanel::setSessionId(session_id); - - mGroupID = session_id; - - // for group and Ad-hoc chat we need to include agent into list - if(!mParticipantList) - { - LLSpeakerMgr* speaker_manager = LLIMModel::getInstance()->getSpeakerManager(session_id); - mParticipantList = new LLParticipantList(speaker_manager, getChild<LLAvatarList>("speakers_list"), true,false); - } -} - - -LLPanelAdHocControlPanel::LLPanelAdHocControlPanel(const LLUUID& session_id):LLPanelGroupControlPanel(session_id) -{ -} - -BOOL LLPanelAdHocControlPanel::postBuild() -{ - //We don't need LLPanelGroupControlPanel::postBuild() to be executed as there is no group_info_btn at AdHoc chat - return LLPanelChatControlPanel::postBuild(); -} diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index bba847b5d4..02915ec4bb 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -28,14 +28,12 @@ #define LL_LLPANELIMCONTROLPANEL_H #include "llpanel.h" -#include "llvoicechannel.h" #include "llcallingcard.h" class LLParticipantList; -class LLPanelChatControlPanel +class LLPanelChatControlPanel : public LLPanel - , public LLVoiceClientStatusObserver { public: LLPanelChatControlPanel() : @@ -44,21 +42,6 @@ public: virtual BOOL postBuild(); - void onCallButtonClicked(); - void onEndCallButtonClicked(); - void onOpenVoiceControlsClicked(); - - // Implements LLVoiceClientStatusObserver::onChange() to enable the call - // button when voice is available - /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); - - virtual void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); - - void updateButtons(LLVoiceChannel::EState state); - - // Enables/disables call button depending on voice availability - void updateCallButton(); - virtual void setSessionId(const LLUUID& session_id); const LLUUID& getSessionId() { return mSessionId; } @@ -69,41 +52,6 @@ private: boost::signals2::connection mVoiceChannelStateChangeConnection; }; - -class LLPanelIMControlPanel : public LLPanelChatControlPanel, LLFriendObserver -{ -public: - LLPanelIMControlPanel(); - ~LLPanelIMControlPanel(); - - BOOL postBuild(); - - void setSessionId(const LLUUID& session_id); - - // LLFriendObserver trigger - virtual void changed(U32 mask); - -protected: - void onNameCache(const LLUUID& id, const std::string& full_name, bool is_group); - -private: - void onViewProfileButtonClicked(); - void onAddFriendButtonClicked(); - void onShareButtonClicked(); - void onTeleportButtonClicked(); - void onPayButtonClicked(); - void onFocusReceived(); - - void onClickMuteVolume(); - void onClickBlock(); - void onClickUnblock(); - /*virtual*/ void draw(); - void onVolumeChange(const LLSD& data); - - LLUUID mAvatarID; -}; - - class LLPanelGroupControlPanel : public LLPanelChatControlPanel { public: @@ -121,9 +69,7 @@ protected: LLParticipantList* mParticipantList; private: - void onGroupInfoButtonClicked(); void onSortMenuItemClicked(const LLSD& userdata); - /*virtual*/ void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); }; class LLPanelAdHocControlPanel : public LLPanelGroupControlPanel diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 68a3b6d1cd..88400e4ef2 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -52,6 +52,7 @@ #include "llmenubutton.h" #include "llplacesinventorybridge.h" #include "llplacesinventorypanel.h" +#include "llplacesfolderview.h" #include "lltoggleablemenu.h" #include "llviewermenu.h" #include "llviewerregion.h" @@ -102,7 +103,7 @@ void LLCheckFolderState::doFolder(LLFolderViewFolder* folder) // Counting only folders that pass the filter. // The listener check allow us to avoid counting the folder view // object itself because it has no listener assigned. - if (folder->hasFilteredDescendants() && folder->getListener()) + if (folder->getViewModelItem()->descendantsPassedFilter()) { if (folder->isOpen()) { @@ -138,7 +139,7 @@ private: // virtual void LLOpenFolderByID::doFolder(LLFolderViewFolder* folder) { - if (folder->getListener() && folder->getListener()->getUUID() == mFolderID) + if (folder->getViewModelItem() && static_cast<LLFolderViewModelItemInventory*>(folder->getViewModelItem())->getUUID() == mFolderID) { if (!folder->isOpen()) { @@ -177,7 +178,7 @@ void LLLandmarksPanelObserver::changed(U32 mask) if (!mIsLibraryLandmarksOpen && library) { // Search for "Landmarks" folder in the Library and open it once on start up. See EXT-4827. - const LLUUID &landmarks_cat = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false, true); + const LLUUID &landmarks_cat = gInventory.findLibraryCategoryUUIDForType(LLFolderType::FT_LANDMARK, false); if (landmarks_cat.notNull()) { LLOpenFolderByID opener(landmarks_cat); @@ -247,10 +248,7 @@ void LLLandmarksPanel::onSearchEdit(const std::string& string) LLPlacesInventoryPanel* inventory_list = dynamic_cast<LLPlacesInventoryPanel*>(tab->getAccordionView()); if (NULL == inventory_list) continue; - if (inventory_list->getFilter()) - { - filter_list(inventory_list, string); - } + filter_list(inventory_list, string); } if (sFilterSubString != string) @@ -281,28 +279,21 @@ void LLLandmarksPanel::onShowOnMap() //virtual void LLLandmarksPanel::onShowProfile() { - LLFolderViewItem* cur_item = getCurSelectedItem(); + LLFolderViewModelItemInventory* cur_item = getCurSelectedViewModelItem(); if(!cur_item) return; - cur_item->getListener()->performAction(mCurrentSelectedList->getModel(),"about"); + cur_item->performAction(mCurrentSelectedList->getModel(),"about"); } // virtual void LLLandmarksPanel::onTeleport() { - LLFolderViewItem* current_item = getCurSelectedItem(); - if (!current_item) - { - llwarns << "There are no selected list. No actions are performed." << llendl; - return; - } - - LLFolderViewEventListener* listenerp = current_item->getListener(); - if (listenerp && listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK) + LLFolderViewModelItemInventory* view_model_item = getCurSelectedViewModelItem(); + if (view_model_item && view_model_item->getInventoryType() == LLInventoryType::IT_LANDMARK) { - listenerp->openItem(); + view_model_item->openItem(); } } @@ -313,8 +304,7 @@ bool LLLandmarksPanel::isSingleItemSelected() if (mCurrentSelectedList != NULL) { - LLPlacesFolderView* root_view = - static_cast<LLPlacesFolderView*>(mCurrentSelectedList->getRootFolder()); + LLFolderView* root_view = mCurrentSelectedList->getRootFolder(); if (root_view->getSelectedCount() == 1) { @@ -360,7 +350,7 @@ void LLLandmarksPanel::onSelectorButtonClicked() LLFolderViewItem* cur_item = mFavoritesInventoryPanel->getRootFolder()->getCurSelectedItem(); if (!cur_item) return; - LLFolderViewEventListener* listenerp = cur_item->getListener(); + LLFolderViewModelItemInventory* listenerp = static_cast<LLFolderViewModelItemInventory*>(cur_item->getViewModelItem()); if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK) { LLSD key; @@ -373,10 +363,7 @@ void LLLandmarksPanel::onSelectorButtonClicked() void LLLandmarksPanel::updateShowFolderState() { - if (!mLandmarksInventoryPanel->getFilter()) - return; - - bool show_all_folders = mLandmarksInventoryPanel->getRootFolder()->getFilterSubString().empty(); + bool show_all_folders = mLandmarksInventoryPanel->getFilterSubString().empty(); if (show_all_folders) { show_all_folders = category_has_descendents(mLandmarksInventoryPanel); @@ -417,13 +404,14 @@ void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_ bool LLLandmarksPanel::isLandmarkSelected() const { - LLFolderViewItem* current_item = getCurSelectedItem(); - if(current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK) - { - return true; - } + LLFolderViewModelItemInventory* current_item = getCurSelectedViewModelItem(); + return current_item && (current_item->getInventoryType() == LLInventoryType::IT_LANDMARK); +} - return false; +bool LLLandmarksPanel::isFolderSelected() const +{ + LLFolderViewModelItemInventory* current_item = getCurSelectedViewModelItem(); + return current_item && (current_item->getInventoryType() == LLInventoryType::IT_CATEGORY); } bool LLLandmarksPanel::isReceivedFolderSelected() const @@ -440,10 +428,10 @@ bool LLLandmarksPanel::isReceivedFolderSelected() const void LLLandmarksPanel::doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb) { - LLFolderViewItem* cur_item = getCurSelectedItem(); - if(cur_item && cur_item->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK) + LLFolderViewModelItemInventory* cur_item = getCurSelectedViewModelItem(); + if(cur_item && cur_item->getInventoryType() == LLInventoryType::IT_LANDMARK) { - LLLandmark* landmark = LLLandmarkActions::getLandmark(cur_item->getListener()->getUUID(), cb); + LLLandmark* landmark = LLLandmarkActions::getLandmark(cur_item->getUUID(), cb); if (landmark) { cb(landmark); @@ -456,6 +444,17 @@ LLFolderViewItem* LLLandmarksPanel::getCurSelectedItem() const return mCurrentSelectedList ? mCurrentSelectedList->getRootFolder()->getCurSelectedItem() : NULL; } +LLFolderViewModelItemInventory* LLLandmarksPanel::getCurSelectedViewModelItem() const +{ + LLFolderViewItem* cur_item = getCurSelectedItem(); + if (cur_item) + { + return static_cast<LLFolderViewModelItemInventory*>(cur_item->getViewModelItem()); + } + return NULL; +} + + LLFolderViewItem* LLLandmarksPanel::selectItemInAccordionTab(LLPlacesInventoryPanel* inventory_list, const std::string& tab_name, const LLUUID& obj_id, @@ -466,7 +465,7 @@ LLFolderViewItem* LLLandmarksPanel::selectItemInAccordionTab(LLPlacesInventoryPa LLFolderView* root = inventory_list->getRootFolder(); - LLFolderViewItem* item = root->getItemByID(obj_id); + LLFolderViewItem* item = inventory_list->getItemByID(obj_id); if (!item) return NULL; @@ -508,12 +507,12 @@ void LLLandmarksPanel::processParcelInfo(const LLParcelData& parcel_data) // We have to make request to sever to get parcel_id and snaption_id. if(isLandmarkSelected()) { - LLFolderViewItem* cur_item = getCurSelectedItem(); + LLFolderViewModelItemInventory* cur_item = getCurSelectedViewModelItem(); if (!cur_item) return; - LLUUID id = cur_item->getListener()->getUUID(); + LLUUID id = cur_item->getUUID(); LLInventoryItem* inv_item = mCurrentSelectedList->getModel()->getItem(id); doActionOnCurSelectedLandmark(boost::bind( - &LLLandmarksPanel::doProcessParcelInfo, this, _1, cur_item, inv_item, parcel_data)); + &LLLandmarksPanel::doProcessParcelInfo, this, _1, getCurSelectedItem(), inv_item, parcel_data)); } } @@ -543,7 +542,7 @@ void LLLandmarksPanel::initFavoritesInventoryPanel() mFavoritesInventoryPanel = getChild<LLPlacesInventoryPanel>("favorites_list"); initLandmarksPanel(mFavoritesInventoryPanel); - mFavoritesInventoryPanel->getFilter()->setEmptyLookupMessage("FavoritesNoMatchingItems"); + mFavoritesInventoryPanel->getFilter().setEmptyLookupMessage("FavoritesNoMatchingItems"); initAccordion("tab_favorites", mFavoritesInventoryPanel, true); } @@ -554,12 +553,7 @@ void LLLandmarksPanel::initLandmarksInventoryPanel() initLandmarksPanel(mLandmarksInventoryPanel); - // Check if mLandmarksInventoryPanel is properly initialized and has a Filter created. - // In case of a dummy widget getFilter() will return NULL. - if (mLandmarksInventoryPanel->getFilter()) - { - mLandmarksInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS); - } + mLandmarksInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS); // subscribe to have auto-rename functionality while creating New Folder mLandmarksInventoryPanel->setSelectCallback(boost::bind(&LLInventoryPanel::onSelectionChange, mLandmarksInventoryPanel, _1, _2)); @@ -583,7 +577,7 @@ void LLLandmarksPanel::initLibraryInventoryPanel() initLandmarksPanel(mLibraryInventoryPanel); // We want to fetch only "Landmarks" category from the library. - const LLUUID &landmarks_cat = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false, true); + const LLUUID &landmarks_cat = gInventory.findLibraryCategoryUUIDForType(LLFolderType::FT_LANDMARK, false); if (landmarks_cat.notNull()) { LLInventoryModelBackgroundFetch::instance().start(landmarks_cat); @@ -595,12 +589,7 @@ void LLLandmarksPanel::initLibraryInventoryPanel() void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list) { - // In case of a dummy widget further we have no Folder View widget and no Filter, - // so further initialization leads to crash. - if (!inventory_list->getFilter()) - return; - - inventory_list->getFilter()->setEmptyLookupMessage("PlacesNoMatchingItems"); + inventory_list->getFilter().setEmptyLookupMessage("PlacesNoMatchingItems"); inventory_list->setFilterTypes(0x1 << LLInventoryType::IT_LANDMARK); inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::onSelectionChange, this, inventory_list, _1, _2)); @@ -665,20 +654,20 @@ void LLLandmarksPanel::deselectOtherThan(const LLPlacesInventoryPanel* inventory { if (inventory_list != mFavoritesInventoryPanel) { - mFavoritesInventoryPanel->getRootFolder()->clearSelection(); + mFavoritesInventoryPanel->clearSelection(); } if (inventory_list != mLandmarksInventoryPanel) { - mLandmarksInventoryPanel->getRootFolder()->clearSelection(); + mLandmarksInventoryPanel->clearSelection(); } if (inventory_list != mMyInventoryPanel) { - mMyInventoryPanel->getRootFolder()->clearSelection(); + mMyInventoryPanel->clearSelection(); } if (inventory_list != mLibraryInventoryPanel) { - mLibraryInventoryPanel->getRootFolder()->clearSelection(); + mLibraryInventoryPanel->clearSelection(); } } @@ -720,7 +709,7 @@ void LLLandmarksPanel::initListCommandsHandlers() void LLLandmarksPanel::updateListCommands() { bool add_folder_enabled = isActionEnabled("category"); - bool trash_enabled = isActionEnabled("delete"); + bool trash_enabled = isActionEnabled("delete") && (isFolderSelected() || isLandmarkSelected()); // keep Options & Add Landmark buttons always enabled mListCommands->getChildView(ADD_FOLDER_BUTTON_NAME)->setEnabled(add_folder_enabled); @@ -731,14 +720,9 @@ void LLLandmarksPanel::onActionsButtonClick() { LLToggleableMenu* menu = mGearFolderMenu; - LLFolderViewItem* cur_item = NULL; if(mCurrentSelectedList) { - cur_item = mCurrentSelectedList->getRootFolder()->getCurSelectedItem(); - if(!cur_item) - return; - - LLFolderViewEventListener* listenerp = cur_item->getListener(); + LLFolderViewModelItemInventory* listenerp = getCurSelectedViewModelItem(); if(!listenerp) return; @@ -776,6 +760,9 @@ void LLLandmarksPanel::onTrashButtonClick() const void LLLandmarksPanel::onAddAction(const LLSD& userdata) const { + LLFolderViewModelItemInventory* view_model = getCurSelectedViewModelItem(); + LLFolderViewItem* item = getCurSelectedItem(); + std::string command_name = userdata.asString(); if("add_landmark" == command_name) { @@ -791,24 +778,24 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const } else if ("category" == command_name) { - LLFolderViewItem* item = getCurSelectedItem(); if (item && mCurrentSelectedList == mLandmarksInventoryPanel) { - LLFolderViewEventListener* folder_bridge = NULL; - if (item-> getListener()->getInventoryType() + LLFolderViewModelItem* folder_bridge = NULL; + + if (view_model->getInventoryType() == LLInventoryType::IT_LANDMARK) { // for a landmark get parent folder bridge - folder_bridge = item->getParentFolder()->getListener(); + folder_bridge = item->getParentFolder()->getViewModelItem(); } - else if (item-> getListener()->getInventoryType() + else if (view_model->getInventoryType() == LLInventoryType::IT_CATEGORY) { // for a folder get its own bridge - folder_bridge = item->getListener(); + folder_bridge = view_model; } - menu_create_inventory_item(mCurrentSelectedList->getRootFolder(), + menu_create_inventory_item(mCurrentSelectedList, dynamic_cast<LLFolderBridge*> (folder_bridge), LLSD( "category"), gInventory.findCategoryUUIDForType( LLFolderType::FT_LANDMARK)); @@ -816,7 +803,7 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const else { //in case My Landmarks tab is completely empty (thus cannot be determined as being selected) - menu_create_inventory_item(mLandmarksInventoryPanel->getRootFolder(), NULL, LLSD("category"), + menu_create_inventory_item(mLandmarksInventoryPanel, NULL, LLSD("category"), gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK)); if (mMyLandmarksAccordionTab) @@ -834,9 +821,9 @@ void LLLandmarksPanel::onClipboardAction(const LLSD& userdata) const std::string command_name = userdata.asString(); if("copy_slurl" == command_name) { - LLFolderViewItem* cur_item = getCurSelectedItem(); + LLFolderViewModelItemInventory* cur_item = getCurSelectedViewModelItem(); if(cur_item) - LLLandmarkActions::copySLURLtoClipboard(cur_item->getListener()->getUUID()); + LLLandmarkActions::copySLURLtoClipboard(cur_item->getUUID()); } else if ( "paste" == command_name) { @@ -848,7 +835,7 @@ void LLLandmarksPanel::onClipboardAction(const LLSD& userdata) const } else { - mCurrentSelectedList->getRootFolder()->doToSelected(mCurrentSelectedList->getModel(),command_name); + mCurrentSelectedList->doToSelected(command_name); } } @@ -893,7 +880,7 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) { if(mCurrentSelectedList) { - mCurrentSelectedList->getRootFolder()->doToSelected(&gInventory, userdata); + mCurrentSelectedList->doToSelected(userdata); } } } @@ -915,8 +902,9 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const { std::string command_name = userdata.asString(); - LLPlacesFolderView* root_folder_view = mCurrentSelectedList ? - static_cast<LLPlacesFolderView*>(mCurrentSelectedList->getRootFolder()) : NULL; + LLFolderView* root_folder_view = mCurrentSelectedList + ? mCurrentSelectedList->getRootFolder() + : NULL; if ("collapse_all" == command_name) { @@ -977,18 +965,13 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const { if (!root_folder_view) return false; - std::set<LLUUID> selected_uuids = root_folder_view->getSelectionList(); + std::set<LLFolderViewItem*> selected_uuids = root_folder_view->getSelectionList(); // Allow to execute the command only if it can be applied to all selected items. - for (std::set<LLUUID>::const_iterator iter = selected_uuids.begin(); iter != selected_uuids.end(); ++iter) + for (std::set<LLFolderViewItem*>::const_iterator iter = selected_uuids.begin(); iter != selected_uuids.end(); ++iter) { - LLFolderViewItem* item = root_folder_view->getItemByID(*iter); + LLFolderViewItem* item = *iter; - // If no item is found it might be a folder id. - if (!item) - { - item = root_folder_view->getFolderByID(*iter); - } if (!item) return false; if (!canItemBeModified(command_name, item)) return false; @@ -1012,10 +995,10 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const if ("show_on_map" == command_name) { - LLFolderViewItem* cur_item = root_folder_view->getCurSelectedItem(); + LLFolderViewModelItemInventory* cur_item = getCurSelectedViewModelItem(); if (!cur_item) return false; - LLViewerInventoryItem* inv_item = cur_item->getInventoryItem(); + LLViewerInventoryItem* inv_item = dynamic_cast<LLViewerInventoryItem*>(cur_item->getInventoryObject()); if (!inv_item) return false; LLUUID asset_uuid = inv_item->getAssetUUID(); @@ -1049,7 +1032,7 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const { if (mCurrentSelectedList) { - std::set<LLUUID> selection = mCurrentSelectedList->getRootFolder()->getSelectionList(); + std::set<LLFolderViewItem*> selection = mCurrentSelectedList->getRootFolder()->getSelectionList(); if (!selection.empty()) { return ( 1 == selection.size() && !LLAgentPicksInfo::getInstance()->isPickLimitReached() ); @@ -1105,27 +1088,23 @@ void LLLandmarksPanel::onMenuVisibilityChange(LLUICtrl* ctrl, const LLSD& param) { const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - std::set<LLUUID> selected_uuids = root_folder_view->getSelectionList(); + std::set<LLFolderViewItem*> selected_items = root_folder_view->getSelectionList(); // Iterate through selected items to find out if any of these items are in Trash // or all the items are in Trash category. - for (std::set<LLUUID>::const_iterator iter = selected_uuids.begin(); iter != selected_uuids.end(); ++iter) + for (std::set<LLFolderViewItem*>::const_iterator iter = selected_items.begin(); iter != selected_items.end(); ++iter) { - LLFolderViewItem* item = root_folder_view->getItemByID(*iter); + LLFolderViewItem* item = *iter; // If no item is found it might be a folder id. - if (!item) - { - item = root_folder_view->getFolderByID(*iter); - } if (!item) continue; - LLFolderViewEventListener* listenerp = item->getListener(); + LLFolderViewModelItemInventory* listenerp = static_cast<LLFolderViewModelItemInventory*>(item->getViewModelItem()); if(!listenerp) continue; // Trash category itself should not be included because it can't be // actually restored from trash. - are_all_items_in_trash &= listenerp->isItemInTrash() && *iter != trash_id; + are_all_items_in_trash &= listenerp->isItemInTrash() && listenerp->getUUID() != trash_id; // If there are any selected items in Trash including the Trash category itself // we show "Restore Item" in context menu and hide other irrelevant items. @@ -1164,7 +1143,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold bool can_be_modified = false; // landmarks can be modified in any other accordion... - if (item->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK) + if (static_cast<LLFolderViewModelItemInventory*>(item->getViewModelItem())->getInventoryType() == LLInventoryType::IT_LANDMARK) { can_be_modified = true; @@ -1202,7 +1181,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold if (can_be_modified) { - LLFolderViewEventListener* listenerp = item->getListener(); + LLFolderViewModelItemInventory* listenerp = static_cast<LLFolderViewModelItemInventory*>(item->getViewModelItem()); if ("cut" == command_name) { @@ -1262,8 +1241,9 @@ bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType carg LLInventoryItem* item = static_cast<LLInventoryItem*>(cargo_data); if (item) { - LLFolderViewItem* fv_item = (mCurrentSelectedList && mCurrentSelectedList->getRootFolder()) ? - mCurrentSelectedList->getRootFolder()->getItemByID(item->getUUID()) : NULL; + LLFolderViewItem* fv_item = mCurrentSelectedList + ? mCurrentSelectedList->getItemByID(item->getUUID()) + : NULL; if (fv_item) { @@ -1391,7 +1371,7 @@ void LLLandmarksPanel::doCreatePick(LLLandmark* landmark) static void filter_list(LLPlacesInventoryPanel* inventory_list, const std::string& string) { // When search is cleared, restore the old folder state. - if (!inventory_list->getRootFolder()->getFilterSubString().empty() && string == "") + if (!inventory_list->getFilterSubString().empty() && string == "") { inventory_list->setFilterSubString(LLStringUtil::null); // Re-open folders that were open before @@ -1405,7 +1385,7 @@ static void filter_list(LLPlacesInventoryPanel* inventory_list, const std::strin } // save current folder open state if no filter currently applied - if (inventory_list->getRootFolder()->getFilterSubString().empty()) + if (inventory_list->getFilterSubString().empty()) { inventory_list->saveFolderState(); } diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index b2f4e92473..8fae0f0b67 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -44,6 +44,7 @@ class LLMenuGL; class LLToggleableMenu; class LLInventoryPanel; class LLPlacesInventoryPanel; +class LLFolderViewModelItemInventory; class LLLandmarksPanel : public LLPanelPlacesTab, LLRemoteParcelInfoObserver { @@ -84,9 +85,11 @@ protected: * @return true - if current selected panel is not null and selected item is a landmark */ bool isLandmarkSelected() const; + bool isFolderSelected() const; bool isReceivedFolderSelected() const; void doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb); LLFolderViewItem* getCurSelectedItem() const; + LLFolderViewModelItemInventory* getCurSelectedViewModelItem() const; /** * Selects item with "obj_id" in "inventory_list" and scrolls accordion diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 44ff62e290..bcb90bcb56 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -27,6 +27,7 @@ #include "llviewerprecompiledheaders.h" #include "llpanellogin.h" +#include "lllayoutstack.h" #include "indra_constants.h" // for key and mask constants #include "llfloaterreg.h" @@ -138,14 +139,17 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, mLogoImage = LLUI::getUIImage("startup_logo"); buildFromFile( "panel_login.xml"); - + reshape(rect.getWidth(), rect.getHeight()); - getChild<LLLineEditor>("password_edit")->setKeystrokeCallback(onPassKey, this); + LLLineEditor* password_edit(getChild<LLLineEditor>("password_edit")); + password_edit->setKeystrokeCallback(onPassKey, this); + // STEAM-14: When user presses Enter with this field in focus, initiate login + password_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, this)); // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("forgot_password_text")); - + LLComboBox* location_combo = getChild<LLComboBox>("start_location_combo"); updateLocationSelectorsVisibility(); // separate so that it can be called from preferences location_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLocationSLURL, this)); @@ -201,7 +205,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, childSetAction("connect_btn", onClickConnect, this); - getChild<LLPanel>("login")->setDefaultBtn("connect_btn"); + getChild<LLPanel>("links_login_panel")->setDefaultBtn("connect_btn"); std::string channel = LLVersionInfo::getChannel(); std::string version = llformat("%s (%d)", @@ -211,8 +215,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLTextBox* forgot_password_text = getChild<LLTextBox>("forgot_password_text"); forgot_password_text->setClickedCallback(onClickForgotPassword, NULL); - LLTextBox* create_new_account_text = getChild<LLTextBox>("create_new_account_text"); - create_new_account_text->setClickedCallback(onClickNewAccount, NULL); + childSetAction("create_new_account_btn", onClickNewAccount, NULL); LLTextBox* need_help_text = getChild<LLTextBox>("login_help"); need_help_text->setClickedCallback(onClickHelp, NULL); @@ -220,14 +223,17 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // get the web browser control LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html"); web_browser->addObserver(this); - + reshapeBrowser(); loadLoginPage(); - + // Show last logged in user favorites in "Start at" combo. addUsersWithFavoritesToUsername(); - getChild<LLComboBox>("username_combo")->setTextChangedCallback(boost::bind(&LLPanelLogin::addFavoritesToStartLocation, this)); + LLComboBox* username_combo(getChild<LLComboBox>("username_combo")); + username_combo->setTextChangedCallback(boost::bind(&LLPanelLogin::addFavoritesToStartLocation, this)); + // STEAM-14: When user presses Enter with this field in focus, initiate login + username_combo->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, this)); } void LLPanelLogin::addUsersWithFavoritesToUsername() @@ -636,12 +642,10 @@ void LLPanelLogin::updateLocationSelectorsVisibility() if (sInstance) { BOOL show_start = gSavedSettings.getBOOL("ShowStartLocation"); - sInstance->getChildView("start_location_combo")->setVisible(show_start); - sInstance->getChildView("start_location_text")->setVisible(show_start); + sInstance->getChild<LLLayoutPanel>("start_location_panel")->setVisible(show_start); BOOL show_server = gSavedSettings.getBOOL("ForceShowGrid"); - LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo"); - server_choice_combo->setVisible( show_server ); + sInstance->getChild<LLLayoutPanel>("grid_panel")->setVisible(show_server); } } @@ -746,63 +750,48 @@ void LLPanelLogin::setAlwaysRefresh(bool refresh) void LLPanelLogin::loadLoginPage() { if (!sInstance) return; - - std::ostringstream oStr; - std::string login_page = LLGridManager::getInstance()->getLoginPage(); + LLURI login_page = LLURI(LLGridManager::getInstance()->getLoginPage()); + LLSD params(login_page.queryMap()); - 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) - { - first_query_delimiter = "?"; - } + LL_DEBUGS("AppInit") << "login_page: " << login_page << LL_ENDL; // Language - std::string language = LLUI::getLanguage(); - oStr << first_query_delimiter<<"lang=" << language; - + params["lang"] = LLUI::getLanguage(); + // First Login? if (gSavedSettings.getBOOL("FirstLoginThisInstall")) { - oStr << "&firstlogin=TRUE"; + params["firstlogin"] = "TRUE"; // not bool: server expects string TRUE } // Channel and Version - std::string version = llformat("%s (%d)", - LLVersionInfo::getShortVersion().c_str(), - LLVersionInfo::getBuild()); + params["version"] = llformat("%s (%d)", + LLVersionInfo::getShortVersion().c_str(), + LLVersionInfo::getBuild()); + params["channel"] = LLVersionInfo::getChannel(); - char* curl_channel = curl_escape(LLVersionInfo::getChannel().c_str(), 0); - char* curl_version = curl_escape(version.c_str(), 0); + // Grid + params["grid"] = LLGridManager::getInstance()->getGridId(); - oStr << "&channel=" << curl_channel; - oStr << "&version=" << curl_version; + // add OS info + params["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); - curl_free(curl_channel); - curl_free(curl_version); + // sourceid + params["sourceid"] = gSavedSettings.getString("sourceid"); + + // Make an LLURI with this augmented info + LLURI login_uri(LLURI::buildHTTP(login_page.authority(), + login_page.path(), + params)); - // Grid - char* curl_grid = curl_escape(LLGridManager::getInstance()->getGridId().c_str(), 0); - oStr << "&grid=" << curl_grid; - curl_free(curl_grid); - - // add OS info - char * os_info = curl_escape(LLAppViewer::instance()->getOSInfo().getOSStringSimple().c_str(), 0); - oStr << "&os=" << os_info; - curl_free(os_info); - gViewerWindow->setMenuBackgroundColor(false, !LLGridManager::getInstance()->isInProductionGrid()); - + LLMediaCtrl* web_browser = sInstance->getChild<LLMediaCtrl>("login_html"); - if (web_browser->getCurrentNavUrl() != oStr.str()) + if (web_browser->getCurrentNavUrl() != login_uri.asString()) { - LL_DEBUGS("AppInit")<<oStr.str()<<LL_ENDL; - web_browser->navigateTo( oStr.str(), "text/html" ); + LL_DEBUGS("AppInit") << "loading: " << login_uri << LL_ENDL; + web_browser->navigateTo( login_uri.asString(), "text/html" ); } } @@ -886,7 +875,7 @@ void LLPanelLogin::onClickNewAccount(void*) { if (sInstance) { - LLWeb::loadURLExternal(sInstance->getString("create_account_url")); + LLWeb::loadURLExternal(LLTrans::getString("create_account_url")); } } @@ -946,9 +935,11 @@ void LLPanelLogin::updateServer() // update the login panel links bool system_grid = LLGridManager::getInstance()->isSystemGrid(); - - sInstance->getChildView("create_new_account_text")->setVisible( system_grid); - sInstance->getChildView("forgot_password_text")->setVisible( system_grid); + + // Want to vanish not only create_new_account_btn, but also the + // title text over it, so turn on/off the whole layout_panel element. + sInstance->getChild<LLLayoutPanel>("links")->setVisible(system_grid); + sInstance->getChildView("forgot_password_text")->setVisible(system_grid); // grid changed so show new splash screen (possibly) loadLoginPage(); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index c11597f532..d6535c88e9 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -47,12 +47,14 @@ #include "llresmgr.h" #include "llscrollcontainer.h" #include "llsdserialize.h" +#include "llsdparam.h" #include "llspinctrl.h" #include "lltoggleablemenu.h" #include "lltooldraganddrop.h" #include "llviewermenu.h" #include "llviewertexturelist.h" #include "llsidepanelinventory.h" +#include "llfolderview.h" const std::string FILTERS_FILENAME("filters.xml"); @@ -105,7 +107,6 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p) mMenuAdd(NULL), mNeedUploadCost(true) { - LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_INIT); // Menu Callbacks (non contex menus) mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelMainInventory::doToSelected, this, _2)); mCommitCallbackRegistrar.add("Inventory.CloseAllFolders", boost::bind(&LLPanelMainInventory::closeAllFolders, this)); @@ -116,7 +117,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p) mCommitCallbackRegistrar.add("Inventory.ShowFilters", boost::bind(&LLPanelMainInventory::toggleFindOptions, this)); mCommitCallbackRegistrar.add("Inventory.ResetFilters", boost::bind(&LLPanelMainInventory::resetFilters, this)); mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLPanelMainInventory::setSortBy, this, _2)); - mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars)); + mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); @@ -129,7 +130,7 @@ BOOL LLPanelMainInventory::postBuild() mFilterTabs = getChild<LLTabContainer>("inventory filter tabs"); mFilterTabs->setCommitCallback(boost::bind(&LLPanelMainInventory::onFilterSelected, this)); - //panel->getFilter()->markDefault(); + //panel->getFilter().markDefault(); // Set up the default inv. panel/filter settings. mActivePanel = getChild<LLInventoryPanel>("All Items"); @@ -137,7 +138,7 @@ BOOL LLPanelMainInventory::postBuild() { // "All Items" is the previous only view, so it gets the InventorySortOrder mActivePanel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER)); - mActivePanel->getFilter()->markDefault(); + mActivePanel->getFilter().markDefault(); mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); mActivePanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mActivePanel, _1, _2)); mResortActivePanel = true; @@ -148,7 +149,7 @@ BOOL LLPanelMainInventory::postBuild() recent_items_panel->setSinceLogoff(TRUE); recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE); recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - recent_items_panel->getFilter()->markDefault(); + recent_items_panel->getFilter().markDefault(); recent_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, recent_items_panel, _1, _2)); } @@ -167,11 +168,14 @@ BOOL LLPanelMainInventory::postBuild() // Note that the "All Items" settings do not persist. if(recent_items_panel) { - if(savedFilterState.has(recent_items_panel->getFilter()->getName())) + if(savedFilterState.has(recent_items_panel->getFilter().getName())) { LLSD recent_items = savedFilterState.get( - recent_items_panel->getFilter()->getName()); - recent_items_panel->getFilter()->fromLLSD(recent_items); + recent_items_panel->getFilter().getName()); + LLInventoryFilter::Params p; + LLParamSDParser parser; + parser.readSD(recent_items, p); + recent_items_panel->getFilter().fromParams(p); } } @@ -208,24 +212,28 @@ LLPanelMainInventory::~LLPanelMainInventory( void ) LLInventoryPanel* all_items_panel = getChild<LLInventoryPanel>("All Items"); if (all_items_panel) { - LLInventoryFilter* filter = all_items_panel->getFilter(); - if (filter) + LLSD filterState; + LLInventoryPanel::InventoryState p; + all_items_panel->getFilter().toParams(p.filter); + all_items_panel->getRootViewModel().getSorter().toParams(p.sort); + if (p.validateBlock(false)) { - LLSD filterState; - filter->toLLSD(filterState); - filterRoot[filter->getName()] = filterState; + LLParamSDParser().writeSD(filterState, p); + filterRoot[all_items_panel->getName()] = filterState; } } - LLInventoryPanel* recent_items_panel = getChild<LLInventoryPanel>("Recent Items"); - if (recent_items_panel) + LLInventoryPanel* panel = findChild<LLInventoryPanel>("Recent Items"); + if (panel) { - LLInventoryFilter* filter = recent_items_panel->getFilter(); - if (filter) + LLSD filterState; + LLInventoryPanel::InventoryState p; + panel->getFilter().toParams(p.filter); + panel->getRootViewModel().getSorter().toParams(p.sort); + if (p.validateBlock(false)) { - LLSD filterState; - filter->toLLSD(filterState); - filterRoot[filter->getName()] = filterState; + LLParamSDParser().writeSD(filterState, p); + filterRoot[panel->getName()] = filterState; } } @@ -285,7 +293,7 @@ BOOL LLPanelMainInventory::handleKeyHere(KEY key, MASK mask) void LLPanelMainInventory::doToSelected(const LLSD& userdata) { - getPanel()->getRootFolder()->doToSelected(&gInventory, userdata); + getPanel()->doToSelected(userdata); } void LLPanelMainInventory::closeAllFolders() @@ -306,13 +314,14 @@ void LLPanelMainInventory::newWindow() void LLPanelMainInventory::doCreate(const LLSD& userdata) { - menu_create_inventory_item(getPanel()->getRootFolder(), NULL, userdata); + reset_inventory_filter(); + menu_create_inventory_item(getPanel(), NULL, userdata); } void LLPanelMainInventory::resetFilters() { LLFloaterInventoryFinder *finder = getFinder(); - getActivePanel()->getFilter()->resetDefault(); + getActivePanel()->getFilter().resetDefault(); if (finder) { finder->updateElementsFromFilter(); @@ -417,7 +426,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) } // save current folder open state if no filter currently applied - if (!mActivePanel->getRootFolder()->isFilterModified()) + if (!mActivePanel->getFilter().isNotDefault()) { mSavedFolderState->setApply(FALSE); mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); @@ -479,13 +488,13 @@ void LLPanelMainInventory::onFilterSelected() } setFilterSubString(mFilterSubString); - LLInventoryFilter* filter = mActivePanel->getFilter(); + LLInventoryFilter& filter = mActivePanel->getFilter(); LLFloaterInventoryFinder *finder = getFinder(); if (finder) { - finder->changeFilter(filter); + finder->changeFilter(&filter); } - if (filter->isActive()) + if (filter.isActive()) { // If our filter is active we may be the first thing requiring a fetch so we better start it here. LLInventoryModelBackgroundFetch::instance().start(); @@ -598,12 +607,11 @@ void LLPanelMainInventory::onFocusReceived() void LLPanelMainInventory::setFilterTextFromFilter() { - mFilterText = mActivePanel->getFilter()->getFilterText(); + mFilterText = mActivePanel->getFilter().getFilterText(); } void LLPanelMainInventory::toggleFindOptions() { - LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE); LLFloater *floater = getFinder(); if (!floater) { @@ -648,7 +656,7 @@ LLFloaterInventoryFinder* LLPanelMainInventory::getFinder() LLFloaterInventoryFinder::LLFloaterInventoryFinder(LLPanelMainInventory* inventory_view) : LLFloater(LLSD()), mPanelMainInventory(inventory_view), - mFilter(inventory_view->getPanel()->getFilter()) + mFilter(&inventory_view->getPanel()->getFilter()) { buildFromFile("floater_inventory_view_finder.xml"); updateElementsFromFilter(); @@ -725,7 +733,6 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() void LLFloaterInventoryFinder::draw() { - LLMemType mt(LLMemType::MTYPE_INVENTORY_DRAW); U64 filter = 0xffffffffffffffffULL; BOOL filtered_by_all_types = TRUE; @@ -961,7 +968,7 @@ void LLPanelMainInventory::onTrashButtonClick() void LLPanelMainInventory::onClipboardAction(const LLSD& userdata) { std::string command_name = userdata.asString(); - getActivePanel()->getRootFolder()->doToSelected(getActivePanel()->getModel(),command_name); + getActivePanel()->doToSelected(command_name); } void LLPanelMainInventory::saveTexture(const LLSD& userdata) @@ -972,7 +979,7 @@ void LLPanelMainInventory::saveTexture(const LLSD& userdata) return; } - const LLUUID& item_id = current_item->getListener()->getUUID(); + const LLUUID& item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID(); LLPreviewTexture* preview_texture = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(item_id), TAKE_FOCUS_YES); if (preview_texture) { @@ -1045,7 +1052,7 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) { return; } - const LLUUID item_id = current_item->getListener()->getUUID(); + const LLUUID item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID(); LLViewerInventoryItem *item = gInventory.getItem(item_id); if (item) { @@ -1060,7 +1067,7 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) { return; } - current_item->getListener()->performAction(getActivePanel()->getModel(), "goto"); + static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->performAction(getActivePanel()->getModel(), "goto"); } if (command_name == "find_links") @@ -1070,17 +1077,17 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) { return; } - const LLUUID& item_id = current_item->getListener()->getUUID(); - const std::string &item_name = current_item->getListener()->getName(); + const LLUUID& item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID(); + const std::string &item_name = current_item->getViewModelItem()->getName(); mFilterSubString = item_name; - LLInventoryFilter *filter = mActivePanel->getFilter(); - filter->setFilterSubString(item_name); + LLInventoryFilter &filter = mActivePanel->getFilter(); + filter.setFilterSubString(item_name); mFilterEditor->setText(item_name); mFilterEditor->setFocus(TRUE); - filter->setFilterUUID(item_id); - filter->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - filter->setFilterLinks(LLInventoryFilter::FILTERLINK_ONLY_LINKS); + filter.setFilterUUID(item_id); + filter.setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); + filter.setFilterLinks(LLInventoryFilter::FILTERLINK_ONLY_LINKS); } } @@ -1089,11 +1096,11 @@ bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata) LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); if (current_item) { - LLViewerInventoryItem *inv_item = current_item->getInventoryItem(); + LLViewerInventoryItem *inv_item = dynamic_cast<LLViewerInventoryItem*>(static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getInventoryObject()); if(inv_item) { bool can_save = inv_item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); - LLInventoryType::EType curr_type = current_item->getListener()->getInventoryType(); + LLInventoryType::EType curr_type = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getInventoryType(); return can_save && (curr_type == LLInventoryType::IT_TEXTURE || curr_type == LLInventoryType::IT_SNAPSHOT); } } @@ -1105,28 +1112,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) const std::string command_name = userdata.asString(); if (command_name == "delete") { - BOOL can_delete = FALSE; - LLFolderView* root = getActivePanel()->getRootFolder(); - if (root) - { - can_delete = TRUE; - 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(); - ++iter) - { - const LLUUID &item_id = (*iter); - LLFolderViewItem *item = root->getItemByID(item_id); - const LLFolderViewEventListener *listener = item->getListener(); - llassert(listener); - if (!listener) return FALSE; - can_delete &= listener->isItemRemovable(); - can_delete &= !listener->isItemInTrash(); - } - return can_delete; - } - return FALSE; + return getActivePanel()->isSelectionRemovable(); } if (command_name == "save_texture") { @@ -1136,7 +1122,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) { LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); if (!current_item) return FALSE; - const LLUUID& item_id = current_item->getListener()->getUUID(); + const LLUUID& item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID(); const LLViewerInventoryItem *item = gInventory.getItem(item_id); if (item && item->getIsLinkType() && !item->getIsBrokenLink()) { @@ -1148,11 +1134,11 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) if (command_name == "find_links") { LLFolderView* root = getActivePanel()->getRootFolder(); - std::set<LLUUID> selection_set = root->getSelectionList(); + std::set<LLFolderViewItem*> selection_set = root->getSelectionList(); if (selection_set.size() != 1) return FALSE; LLFolderViewItem* current_item = root->getCurSelectedItem(); if (!current_item) return FALSE; - const LLUUID& item_id = current_item->getListener()->getUUID(); + const LLUUID& item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID(); const LLInventoryObject *obj = gInventory.getObject(item_id); if (obj && !obj->getIsLinkType() && LLAssetType::lookupCanLink(obj->getType())) { @@ -1165,7 +1151,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) { LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); if (!current_item) return FALSE; - const LLUUID& item_id = current_item->getListener()->getUUID(); + const LLUUID& item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID(); const LLViewerInventoryItem *item = gInventory.getItem(item_id); if (item && item->getIsBrokenLink()) { @@ -1176,6 +1162,8 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) if (command_name == "share") { + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (!current_item) return FALSE; LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); return parent ? parent->canShare() : FALSE; } diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index 5d75375847..dcecce6fe4 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -94,14 +94,14 @@ LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel() mInventoryPanel->setShape(inventory_placeholder_rect); // Set the sort order newest to oldest - mInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE); - mInventoryPanel->getFilter()->markDefault(); + mInventoryPanel->getFolderViewModel()->setSorter(LLInventoryFilter::SO_DATE); + mInventoryPanel->getFilter().markDefault(); // Set selection callback for proper update of inventory status buttons mInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceInbox::onSelectionChange, this)); // Set up the note to display when the inbox is empty - mInventoryPanel->getFilter()->setEmptyLookupMessage("InventoryInboxNoItems"); + mInventoryPanel->getFilter().setEmptyLookupMessage("InventoryInboxNoItems"); // Hide the placeholder text inbox_inventory_placeholder->setVisible(FALSE); @@ -128,7 +128,6 @@ BOOL LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL dr U32 LLPanelMarketplaceInbox::getFreshItemCount() const { -#if SUPPORTING_FRESH_ITEM_COUNT // // NOTE: When turning this on, be sure to test the no inbox/outbox case because this code probably @@ -139,7 +138,7 @@ U32 LLPanelMarketplaceInbox::getFreshItemCount() const if (mInventoryPanel) { - const LLFolderViewFolder * inbox_folder = mInventoryPanel->getRootFolder(); + LLFolderViewFolder * inbox_folder = mInventoryPanel->getRootFolder(); if (inbox_folder) { @@ -174,9 +173,6 @@ U32 LLPanelMarketplaceInbox::getFreshItemCount() const } return fresh_item_count; -#else - return getTotalItemCount(); -#endif } U32 LLPanelMarketplaceInbox::getTotalItemCount() const @@ -231,7 +227,6 @@ void LLPanelMarketplaceInbox::draw() args["[NUM]"] = item_count_str; mInboxButton->setLabel(getString("InboxLabelWithArg", args)); -#if SUPPORTING_FRESH_ITEM_COUNT // set green text to fresh item count U32 fresh_item_count = getFreshItemCount(); mFreshCountCtrl->setVisible((fresh_item_count > 0)); @@ -240,9 +235,6 @@ void LLPanelMarketplaceInbox::draw() { mFreshCountCtrl->setTextArg("[NUM]", llformat("%d", fresh_item_count)); } -#else - mFreshCountCtrl->setVisible(FALSE); -#endif } else { diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 678e4f2843..adfb2dee86 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -29,7 +29,8 @@ #include "llpanelmarketplaceinboxinventory.h" #include "llfolderview.h" -#include "llfoldervieweventlistener.h" +#include "llfolderviewitem.h" +#include "llfolderviewmodel.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" #include "llpanellandmarks.h" @@ -39,6 +40,8 @@ #define DEBUGGING_FRESHNESS 0 +const LLColor4U DEFAULT_WHITE(255, 255, 255); + // // statics // @@ -53,107 +56,42 @@ static LLDefaultChildRegistry::Register<LLInboxFolderViewItem> r3("inbox_folder_ // LLInboxInventoryPanel::LLInboxInventoryPanel(const LLInboxInventoryPanel::Params& p) - : LLInventoryPanel(p) -{ -} +: LLInventoryPanel(p) +{} LLInboxInventoryPanel::~LLInboxInventoryPanel() -{ -} - -// virtual -void LLInboxInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params) -{ - // Determine the root folder in case specified, and - // build the views starting with that folder. - - LLUUID root_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false); - - // leslie -- temporary HACK to work around sim not creating inbox with proper system folder type - if (root_id.isNull()) - { - std::string start_folder_name(params.start_folder()); - - LLInventoryModel::cat_array_t* cats; - LLInventoryModel::item_array_t* items; - - gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), cats, items); - - if (cats) - { - for (LLInventoryModel::cat_array_t::const_iterator cat_it = cats->begin(); cat_it != cats->end(); ++cat_it) - { - LLInventoryCategory* cat = *cat_it; - - if (cat->getName() == start_folder_name) - { - root_id = cat->getUUID(); - break; - } - } - } - - if (root_id == LLUUID::null) - { - llwarns << "No category found that matches inbox inventory panel start_folder: " << start_folder_name << llendl; - } - } - // leslie -- end temporary HACK - - if (root_id == LLUUID::null) - { - llwarns << "Inbox inventory panel has no root folder!" << llendl; - root_id = LLUUID::generateNewID(); - } - - LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY, - LLAssetType::AT_CATEGORY, - LLInventoryType::IT_CATEGORY, - this, - NULL, - root_id); - - mFolderRoot = createFolderView(new_listener, params.use_label_suffix()); -} +{} LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge * bridge) { + LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + LLInboxFolderViewFolder::Params params; params.name = bridge->getDisplayName(); - params.icon = bridge->getIcon(); - params.icon_open = bridge->getOpenIcon(); - - if (mShowItemLinkOverlays) // if false, then links show up just like normal items - { - params.icon_overlay = LLUI::getUIImage("Inv_Link"); - } - params.root = mFolderRoot; params.listener = bridge; params.tool_tip = params.name; + params.font_color = item_color; + params.font_highlight_color = item_color; return LLUICtrlFactory::create<LLInboxFolderViewFolder>(params); } LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge) { + LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + LLInboxFolderViewItem::Params params; params.name = bridge->getDisplayName(); - params.icon = bridge->getIcon(); - params.icon_open = bridge->getOpenIcon(); - - if (mShowItemLinkOverlays) // if false, then links show up just like normal items - { - params.icon_overlay = LLUI::getUIImage("Inv_Link"); - } - params.creation_date = bridge->getCreationDate(); params.root = mFolderRoot; params.listener = bridge; params.rect = LLRect (0, 0, 0, 0); params.tool_tip = params.name; + params.font_color = item_color; + params.font_highlight_color = item_color; return LLUICtrlFactory::create<LLInboxFolderViewItem>(params); } @@ -163,26 +101,40 @@ LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * b // LLInboxFolderViewFolder::LLInboxFolderViewFolder(const Params& p) - : LLFolderViewFolder(p) - , LLBadgeOwner(getHandle()) - , mFresh(false) +: LLFolderViewFolder(p), + LLBadgeOwner(getHandle()), + mFresh(false) { -#if SUPPORTING_FRESH_ITEM_COUNT initBadgeParams(p.new_badge()); -#endif +} + +void LLInboxFolderViewFolder::addItem(LLFolderViewItem* item) +{ + LLFolderViewFolder::addItem(item); + + if(item) + { + LLInvFVBridge* itemBridge = static_cast<LLInvFVBridge*>(item->getViewModelItem()); + LLFolderBridge * bridge = static_cast<LLFolderBridge *>(getViewModelItem()); + bridge->updateHierarchyCreationDate(itemBridge->getCreationDate()); + } + + // Compute freshness if our parent is the root folder for the inbox + if (mParentFolder == mRoot) + { + computeFreshness(); + } } // virtual void LLInboxFolderViewFolder::draw() { -#if SUPPORTING_FRESH_ITEM_COUNT if (!badgeHasParent()) { addBadgeToParentPanel(); } setBadgeVisibility(mFresh); -#endif LLFolderViewFolder::draw(); } @@ -207,7 +159,7 @@ void LLInboxFolderViewFolder::computeFreshness() if (last_expansion_utc > 0) { - mFresh = (mCreationDate > last_expansion_utc); + mFresh = (static_cast<LLFolderViewModelItemInventory*>(getViewModelItem())->getCreationDate() > last_expansion_utc); #if DEBUGGING_FRESHNESS if (mFresh) @@ -229,16 +181,6 @@ void LLInboxFolderViewFolder::deFreshify() gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } -void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc) -{ - mCreationDate = creation_date_utc; - - if (mParentFolder == mRoot) - { - computeFreshness(); - } -} - // // LLInboxFolderViewItem Implementation // @@ -248,24 +190,18 @@ LLInboxFolderViewItem::LLInboxFolderViewItem(const Params& p) , LLBadgeOwner(getHandle()) , mFresh(false) { -#if SUPPORTING_FRESH_ITEM_COUNT initBadgeParams(p.new_badge()); -#endif } -BOOL LLInboxFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* root) +void LLInboxFolderViewItem::addToFolder(LLFolderViewFolder* folder) { - BOOL retval = LLFolderViewItem::addToFolder(folder, root); + LLFolderViewItem::addToFolder(folder); -#if SUPPORTING_FRESH_ITEM_COUNT // Compute freshness if our parent is the root folder for the inbox if (mParentFolder == mRoot) { computeFreshness(); } -#endif - - return retval; } BOOL LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask) @@ -278,14 +214,12 @@ BOOL LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask) // virtual void LLInboxFolderViewItem::draw() { -#if SUPPORTING_FRESH_ITEM_COUNT if (!badgeHasParent()) { addBadgeToParentPanel(); } setBadgeVisibility(mFresh); -#endif LLFolderViewItem::draw(); } @@ -303,7 +237,7 @@ void LLInboxFolderViewItem::computeFreshness() if (last_expansion_utc > 0) { - mFresh = (mCreationDate > last_expansion_utc); + mFresh = (static_cast<LLFolderViewModelItemInventory*>(getViewModelItem())->getCreationDate() > last_expansion_utc); #if DEBUGGING_FRESHNESS if (mFresh) diff --git a/indra/newview/llpanelmarketplaceinboxinventory.h b/indra/newview/llpanelmarketplaceinboxinventory.h index d6b827ee3e..c05e18c300 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.h +++ b/indra/newview/llpanelmarketplaceinboxinventory.h @@ -33,7 +33,6 @@ #include "llfolderviewitem.h" -#define SUPPORTING_FRESH_ITEM_COUNT 1 @@ -47,9 +46,6 @@ public: ~LLInboxInventoryPanel(); // virtual - void buildFolderView(const LLInventoryPanel::Params& params); - - // virtual LLFolderViewFolder * createFolderViewFolder(LLInvFVBridge * bridge); LLFolderViewItem * createFolderViewItem(LLInvFVBridge * bridge); }; @@ -63,13 +59,13 @@ public: Optional<LLBadge::Params> new_badge; Params() - : new_badge("new_badge") - { - } + : new_badge("new_badge") + {} }; LLInboxFolderViewFolder(const Params& p); + void addItem(LLFolderViewItem* item); void draw(); void selectItem(); @@ -81,8 +77,6 @@ public: bool isFresh() const { return mFresh; } protected: - void setCreationDate(time_t creation_date_utc); - bool mFresh; }; @@ -95,14 +89,13 @@ public: Optional<LLBadge::Params> new_badge; Params() - : new_badge("new_badge") - { - } + : new_badge("new_badge") + {} }; LLInboxFolderViewItem(const Params& p); - BOOL addToFolder(LLFolderViewFolder* folder, LLFolderView* root); + void addToFolder(LLFolderViewFolder* folder); BOOL handleDoubleClick(S32 x, S32 y, MASK mask); void draw(); diff --git a/indra/newview/llpanelmarketplaceoutboxinventory.cpp b/indra/newview/llpanelmarketplaceoutboxinventory.cpp deleted file mode 100644 index ff62cb23db..0000000000 --- a/indra/newview/llpanelmarketplaceoutboxinventory.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/** - * @file llpanelmarketplaceoutboxinventory.cpp - * @brief LLOutboxInventoryPanel class definition - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llpanelmarketplaceoutboxinventory.h" - -#include "llfolderview.h" -#include "llfoldervieweventlistener.h" -#include "llinventorybridge.h" -#include "llinventoryfunctions.h" -#include "llpanellandmarks.h" -#include "llplacesinventorybridge.h" -#include "lltrans.h" -#include "llviewerfoldertype.h" - - -// -// statics -// - -static LLDefaultChildRegistry::Register<LLOutboxInventoryPanel> r1("outbox_inventory_panel"); -static LLDefaultChildRegistry::Register<LLOutboxFolderViewFolder> r2("outbox_folder_view_folder"); - - -// -// LLOutboxInventoryPanel Implementation -// - -LLOutboxInventoryPanel::LLOutboxInventoryPanel(const LLOutboxInventoryPanel::Params& p) - : LLInventoryPanel(p) -{ -} - -LLOutboxInventoryPanel::~LLOutboxInventoryPanel() -{ -} - -// virtual -void LLOutboxInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params) -{ - // Determine the root folder in case specified, and - // build the views starting with that folder. - - LLUUID root_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false); - - if (root_id == LLUUID::null) - { - llwarns << "Outbox inventory panel has no root folder!" << llendl; - root_id = LLUUID::generateNewID(); - } - - LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY, - LLAssetType::AT_CATEGORY, - LLInventoryType::IT_CATEGORY, - this, - NULL, - root_id); - - mFolderRoot = createFolderView(new_listener, params.use_label_suffix()); -} - -LLFolderViewFolder * LLOutboxInventoryPanel::createFolderViewFolder(LLInvFVBridge * bridge) -{ - LLOutboxFolderViewFolder::Params params; - - params.name = bridge->getDisplayName(); - params.icon = bridge->getIcon(); - params.icon_open = bridge->getOpenIcon(); - - if (mShowItemLinkOverlays) // if false, then links show up just like normal items - { - params.icon_overlay = LLUI::getUIImage("Inv_Link"); - } - - params.root = mFolderRoot; - params.listener = bridge; - params.tool_tip = params.name; - - return LLUICtrlFactory::create<LLOutboxFolderViewFolder>(params); -} - -LLFolderViewItem * LLOutboxInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge) -{ - LLFolderViewItem::Params params; - - params.name = bridge->getDisplayName(); - params.icon = bridge->getIcon(); - params.icon_open = bridge->getOpenIcon(); - - if (mShowItemLinkOverlays) // if false, then links show up just like normal items - { - params.icon_overlay = LLUI::getUIImage("Inv_Link"); - } - - params.creation_date = bridge->getCreationDate(); - params.root = mFolderRoot; - params.listener = bridge; - params.rect = LLRect (0, 0, 0, 0); - params.tool_tip = params.name; - - return LLUICtrlFactory::create<LLOutboxFolderViewItem>(params); -} - -// -// LLOutboxFolderViewFolder Implementation -// - -LLOutboxFolderViewFolder::LLOutboxFolderViewFolder(const Params& p) - : LLFolderViewFolder(p) -{ -} - -// -// LLOutboxFolderViewItem Implementation -// - -LLOutboxFolderViewItem::LLOutboxFolderViewItem(const Params& p) - : LLFolderViewItem(p) -{ -} - -BOOL LLOutboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask) -{ - return TRUE; -} - -void LLOutboxFolderViewItem::openItem() -{ - // Intentionally do nothing to block attaching items from the outbox -} - -// eof diff --git a/indra/newview/llpanelmarketplaceoutboxinventory.h b/indra/newview/llpanelmarketplaceoutboxinventory.h deleted file mode 100644 index a6c522b7c2..0000000000 --- a/indra/newview/llpanelmarketplaceoutboxinventory.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * @file llpanelmarketplaceoutboxinventory.h - * @brief LLOutboxInventoryPanel class declaration - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_OUTBOXINVENTORYPANEL_H -#define LL_OUTBOXINVENTORYPANEL_H - - -#include "llinventorypanel.h" -#include "llfolderviewitem.h" - - -class LLOutboxInventoryPanel : public LLInventoryPanel -{ -public: - struct Params : public LLInitParam::Block<Params, LLInventoryPanel::Params> - { - Params() {} - }; - - LLOutboxInventoryPanel(const Params& p); - ~LLOutboxInventoryPanel(); - - // virtual - void buildFolderView(const LLInventoryPanel::Params& params); - - // virtual - LLFolderViewFolder * createFolderViewFolder(LLInvFVBridge * bridge); - LLFolderViewItem * createFolderViewItem(LLInvFVBridge * bridge); -}; - - -class LLOutboxFolderViewFolder : public LLFolderViewFolder -{ -public: - struct Params : public LLInitParam::Block<Params, LLFolderViewFolder::Params> - { - Params() {} - }; - - LLOutboxFolderViewFolder(const Params& p); -}; - - -class LLOutboxFolderViewItem : public LLFolderViewItem -{ -public: - LLOutboxFolderViewItem(const Params& p); - - // virtual - BOOL handleDoubleClick(S32 x, S32 y, MASK mask); - void openItem(); -}; - - -#endif //LL_OUTBOXINVENTORYPANEL_H diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 1ca24f3031..7555ac7b2c 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -66,17 +66,19 @@ #include "llviewerobjectlist.h" #include "llviewermessage.h" +const LLColor4U DEFAULT_WHITE(255, 255, 255); ///---------------------------------------------------------------------------- /// Class LLTaskInvFVBridge ///---------------------------------------------------------------------------- -class LLTaskInvFVBridge : public LLFolderViewEventListener +class LLTaskInvFVBridge : public LLFolderViewModelItemInventory { protected: LLUUID mUUID; std::string mName; mutable std::string mDisplayName; + mutable std::string mSearchableName; LLPanelObjectInventory* mPanel; U32 mFlags; LLAssetType::EType mAssetType; @@ -102,26 +104,29 @@ public: S32 getPrice(); static bool commitBuyItem(const LLSD& notification, const LLSD& response); - // LLFolderViewEventListener functionality + // LLFolderViewModelItemInventory functionality virtual const std::string& getName() const; virtual const std::string& getDisplayName() const; + virtual const std::string& getSearchableName() const; + virtual PermissionMask getPermissionMask() const { return PERM_NONE; } /*virtual*/ LLFolderType::EType getPreferredType() const { return LLFolderType::FT_NONE; } virtual const LLUUID& getUUID() const { return mUUID; } virtual time_t getCreationDate() const; + virtual void setCreationDate(time_t creation_date_utc); + virtual LLUIImagePtr getIcon() const; virtual void openItem(); virtual BOOL canOpenItem() const { return FALSE; } virtual void closeItem() {} - virtual void previewItem(); virtual void selectItem() {} virtual BOOL isItemRenameable() const; virtual BOOL renameItem(const std::string& new_name); virtual BOOL isItemMovable() const; virtual BOOL isItemRemovable() const; virtual BOOL removeItem(); - virtual void removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch); - virtual void move(LLFolderViewEventListener* parent_listener); + virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch); + virtual void move(LLFolderViewModelItem* parent_listener); virtual BOOL isItemCopyable() const; virtual BOOL copyToClipboard() const; virtual BOOL cutToClipboard() const; @@ -131,11 +136,15 @@ public: virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual void performAction(LLInventoryModel* model, std::string action); virtual BOOL isUpToDate() const { return TRUE; } - virtual BOOL hasChildren() const { return FALSE; } + virtual bool hasChildren() const { return FALSE; } virtual LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; } virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } + virtual EInventorySortGroup getSortGroup() const { return SG_ITEM; } + virtual LLInventoryObject* getInventoryObject() const { return findInvObject(); } + // LLDragAndDropBridge functionality + virtual LLToolDragAndDrop::ESource getDragSource() const { return LLToolDragAndDrop::SOURCE_WORLD; } virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, @@ -147,7 +156,8 @@ LLTaskInvFVBridge::LLTaskInvFVBridge( LLPanelObjectInventory* panel, const LLUUID& uuid, const std::string& name, - U32 flags): + U32 flags) +: LLFolderViewModelItemInventory(panel->getRootViewModel()), mUUID(uuid), mName(name), mPanel(panel), @@ -330,15 +340,27 @@ const std::string& LLTaskInvFVBridge::getDisplayName() const } } + mSearchableName.assign(mDisplayName + getLabelSuffix()); + return mDisplayName; } +const std::string& LLTaskInvFVBridge::getSearchableName() const +{ + return mSearchableName; +} + + // BUG: No creation dates for task inventory time_t LLTaskInvFVBridge::getCreationDate() const { return 0; } +void LLTaskInvFVBridge::setCreationDate(time_t creation_date_utc) +{} + + LLUIImagePtr LLTaskInvFVBridge::getIcon() const { const BOOL item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS); @@ -352,11 +374,6 @@ void LLTaskInvFVBridge::openItem() lldebugs << "LLTaskInvFVBridge::openItem()" << llendl; } -void LLTaskInvFVBridge::previewItem() -{ - openItem(); -} - BOOL LLTaskInvFVBridge::isItemRenameable() const { if(gAgent.isGodlike()) return TRUE; @@ -467,7 +484,7 @@ BOOL LLTaskInvFVBridge::removeItem() return FALSE; } -void LLTaskInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch) +void LLTaskInvFVBridge::removeBatch(std::vector<LLFolderViewModelItem*>& batch) { if (!mPanel) { @@ -507,7 +524,7 @@ void LLTaskInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& } } -void LLTaskInvFVBridge::move(LLFolderViewEventListener* parent_listener) +void LLTaskInvFVBridge::move(LLFolderViewModelItem* parent_listener) { } @@ -709,7 +726,7 @@ public: virtual BOOL renameItem(const std::string& new_name); virtual BOOL isItemRemovable() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual BOOL hasChildren() const; + virtual bool hasChildren() const; virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, @@ -717,6 +734,7 @@ public: std::string& tooltip_msg); virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); + virtual EInventorySortGroup getSortGroup() const { return SG_NORMAL_FOLDER; } }; LLTaskCategoryBridge::LLTaskCategoryBridge( @@ -739,15 +757,7 @@ const std::string& LLTaskCategoryBridge::getDisplayName() const if (cat) { - // Localize "Contents" folder. - if (cat->getParentUUID().isNull() && cat->getName() == "Contents") - { - mDisplayName.assign(LLTrans::getString("ViewerObjectContents")); - } - else - { - mDisplayName.assign(cat->getName()); - } + mDisplayName.assign(cat->getName()); } return mDisplayName; @@ -775,7 +785,7 @@ void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } -BOOL LLTaskCategoryBridge::hasChildren() const +bool LLTaskCategoryBridge::hasChildren() const { // return TRUE if we have or do know know if we have children. // *FIX: For now, return FALSE - we will know for sure soon enough. @@ -1489,7 +1499,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&do_nothing)); - mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars)); + mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); } // Destroys the object @@ -1514,7 +1524,7 @@ BOOL LLPanelObjectInventory::postBuild() void LLPanelObjectInventory::doToSelected(const LLSD& userdata) { - mFolders->doToSelected(&gInventory, userdata); + LLInventoryAction::doToSelected(&gInventory, mFolders, userdata.asString()); } void LLPanelObjectInventory::clearContents() @@ -1526,6 +1536,8 @@ void LLPanelObjectInventory::clearContents() LLToolDragAndDrop::getInstance()->endDrag(); } + clearItemIDs(); + if( mScroller ) { // removes mFolders @@ -1541,21 +1553,26 @@ void LLPanelObjectInventory::reset() { clearContents(); - //setBorderVisible(FALSE); - mCommitCallbackRegistrar.pushScope(); // push local callbacks + // Reset the inventory model to show all folders by default + mInventoryViewModel.getFilter().setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS); + + // Create a new folder view root LLRect dummy_rect(0, 1, 1, 0); LLFolderView::Params p; p.name = "task inventory"; p.title = "task inventory"; - p.task_id = getTaskUUID(); p.parent_panel = this; p.tool_tip= LLTrans::getString("PanelContentsTooltip"); p.listener = LLTaskInvFVBridge::createObjectBridge(this, NULL); + p.folder_indentation = -14; // subtract space normally reserved for folder expanders + p.view_model = &mInventoryViewModel; + p.root = NULL; + p.options_menu = "menu_inventory.xml"; + mFolders = LLUICtrlFactory::create<LLFolderView>(p); - // this ensures that we never say "searching..." or "no items found" - mFolders->getFilter()->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS); + mFolders->setCallbackRegistrar(&mCommitCallbackRegistrar); if (hasFocus()) @@ -1600,7 +1617,7 @@ void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object, iter != inventory->end(); ) { LLInventoryObject* item = *iter++; - LLFloaterProperties* floater = LLFloaterReg::findTypedInstance<LLFloaterProperties>("properites", item->getUUID()); + LLFloaterProperties* floater = LLFloaterReg::findTypedInstance<LLFloaterProperties>("properties", item->getUUID()); if(floater) { floater->refresh(); @@ -1615,15 +1632,20 @@ void LLPanelObjectInventory::updateInventory() // << " panel UUID: " << panel->mTaskUUID << "\n" // << " task UUID: " << object->mID << llendl; // We're still interested in this task's inventory. - std::set<LLUUID> selected_items; + std::vector<LLUUID> selected_item_ids; + std::set<LLFolderViewItem*> selected_items; BOOL inventory_has_focus = FALSE; - if (mHaveInventory) + if (mHaveInventory && mFolders) { selected_items = mFolders->getSelectionList(); inventory_has_focus = gFocusMgr.childHasKeyboardFocus(mFolders); } - - reset(); + for (std::set<LLFolderViewItem*>::iterator it = selected_items.begin(), end_it = selected_items.end(); + it != end_it; + ++it) + { + selected_item_ids.push_back(static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID()); + } LLViewerObject* objectp = gObjectList.findObject(mTaskUUID); if (objectp) @@ -1631,19 +1653,21 @@ void LLPanelObjectInventory::updateInventory() LLInventoryObject* inventory_root = objectp->getInventoryRoot(); LLInventoryObject::object_list_t contents; objectp->getInventoryContents(contents); + if (inventory_root) { - createFolderViews(inventory_root, contents); - mHaveInventory = TRUE; + reset(); mIsInventoryEmpty = FALSE; + createFolderViews(inventory_root, contents); mFolders->setEnabled(TRUE); } else { // TODO: create an empty inventory mIsInventoryEmpty = TRUE; - mHaveInventory = TRUE; } + + mHaveInventory = TRUE; } else { @@ -1653,11 +1677,12 @@ void LLPanelObjectInventory::updateInventory() } // restore previous selection - std::set<LLUUID>::iterator selection_it; - BOOL first_item = TRUE; - for (selection_it = selected_items.begin(); selection_it != selected_items.end(); ++selection_it) + std::vector<LLUUID>::iterator selection_it; + bool first_item = true; + for (selection_it = selected_item_ids.begin(); selection_it != selected_item_ids.end(); ++selection_it) { - LLFolderViewItem* selected_item = mFolders->getItemByID(*selection_it); + LLFolderViewItem* selected_item = getItemByID(*selection_it); + if (selected_item) { //HACK: "set" first item then "change" each other one to get keyboard focus right @@ -1673,7 +1698,10 @@ void LLPanelObjectInventory::updateInventory() } } - mFolders->requestArrange(); + if (mFolders) + { + mFolders->requestArrange(); + } mInventoryNeedsUpdate = FALSE; // Edit menu handler is set in onFocusReceived } @@ -1694,19 +1722,24 @@ void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root bridge = LLTaskInvFVBridge::createObjectBridge(this, inventory_root); if(bridge) { - LLFolderViewFolder* new_folder = NULL; + LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + LLFolderViewFolder::Params p; p.name = inventory_root->getName(); - p.icon = LLUI::getUIImage("Inv_FolderClosed"); - p.icon_open = LLUI::getUIImage("Inv_FolderOpen"); + p.tool_tip = p.name; p.root = mFolders; p.listener = bridge; - p.tool_tip = p.name; - new_folder = LLUICtrlFactory::create<LLFolderViewFolder>(p); - new_folder->addToFolder(mFolders, mFolders); + p.font_color = item_color; + p.font_highlight_color = item_color; + + LLFolderViewFolder* new_folder = LLUICtrlFactory::create<LLFolderViewFolder>(p); + new_folder->addToFolder(mFolders); new_folder->toggleOpen(); - createViewsForCategory(&contents, inventory_root, new_folder); + if (!contents.empty()) + { + createViewsForCategory(&contents, inventory_root, new_folder); + } } } @@ -1716,6 +1749,8 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li LLInventoryObject* parent, LLFolderViewFolder* folder) { + LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + // Find all in the first pass LLDynamicArray<obj_folder_pair*> child_categories; LLTaskInvFVBridge* bridge; @@ -1738,11 +1773,11 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li { LLFolderViewFolder::Params p; p.name = obj->getName(); - p.icon = LLUI::getUIImage("Inv_FolderClosed"); - p.icon_open = LLUI::getUIImage("Inv_FolderOpen"); p.root = mFolders; p.listener = bridge; p.tool_tip = p.name; + p.font_color = item_color; + p.font_highlight_color = item_color; view = LLUICtrlFactory::create<LLFolderViewFolder>(p); child_categories.put(new obj_folder_pair(obj, (LLFolderViewFolder*)view)); @@ -1751,15 +1786,17 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li { LLFolderViewItem::Params params; params.name(obj->getName()); - params.icon(bridge->getIcon()); params.creation_date(bridge->getCreationDate()); params.root(mFolders); params.listener(bridge); params.rect(LLRect()); params.tool_tip = params.name; + params.font_color = item_color; + params.font_highlight_color = item_color; view = LLUICtrlFactory::create<LLFolderViewItem> (params); } - view->addToFolder(folder, mFolders); + view->addToFolder(folder); + addItemID(obj->getUUID(), view); } } @@ -1827,6 +1864,7 @@ void LLPanelObjectInventory::refresh() removeVOInventoryListener(); clearContents(); } + mInventoryViewModel.setTaskID(mTaskUUID); //llinfos << "LLPanelObjectInventory::refresh() " << mTaskUUID << llendl; } @@ -1914,7 +1952,10 @@ void LLPanelObjectInventory::idle(void* user_data) { LLPanelObjectInventory* self = (LLPanelObjectInventory*)user_data; - + if (self->mFolders) + { + self->mFolders->update(); + } if (self->mInventoryNeedsUpdate) { self->updateInventory(); @@ -1939,3 +1980,32 @@ void LLPanelObjectInventory::onFocusReceived() LLPanel::onFocusReceived(); } + + +LLFolderViewItem* LLPanelObjectInventory::getItemByID( const LLUUID& id ) +{ + std::map<LLUUID, LLFolderViewItem*>::iterator map_it; + map_it = mItemMap.find(id); + if (map_it != mItemMap.end()) + { + return map_it->second; + } + + return NULL; +} + +void LLPanelObjectInventory::removeItemID( const LLUUID& id ) +{ + mItemMap.erase(id); +} + +void LLPanelObjectInventory::addItemID( const LLUUID& id, LLFolderViewItem* itemp ) +{ + mItemMap[id] = itemp; +} + +void LLPanelObjectInventory::clearItemIDs() +{ + mItemMap.clear(); +} + diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h index 607b705f7f..f497c695b3 100644 --- a/indra/newview/llpanelobjectinventory.h +++ b/indra/newview/llpanelobjectinventory.h @@ -29,6 +29,7 @@ #include "llvoinventorylistener.h" #include "llpanel.h" +#include "llinventorypanel.h" // for LLFolderViewModelInventory #include "llinventory.h" @@ -55,6 +56,8 @@ public: virtual BOOL postBuild(); + LLFolderViewModelInventory& getRootViewModel() { return mInventoryViewModel; } + void doToSelected(const LLSD& userdata); void refresh(); @@ -85,8 +88,15 @@ protected: LLInventoryObject* parent, LLFolderViewFolder* folder); void clearContents(); + LLFolderViewItem* getItemByID(const LLUUID& id); + + void addItemID( const LLUUID& id, LLFolderViewItem* itemp ); + void removeItemID(const LLUUID& id); + void clearItemIDs(); private: + std::map<LLUUID, LLFolderViewItem*> mItemMap; + LLScrollContainer* mScroller; LLFolderView* mFolders; @@ -94,6 +104,7 @@ private: BOOL mHaveInventory; BOOL mIsInventoryEmpty; BOOL mInventoryNeedsUpdate; + LLFolderViewModelInventory mInventoryViewModel; }; #endif // LL_LLPANELOBJECTINVENTORY_H diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 35e2e96bab..c09d4393c8 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -169,7 +169,7 @@ public: return menu; } - + private: static void onCreate(const LLSD& param) { @@ -187,7 +187,7 @@ private: static void populateCreateWearableSubmenus(LLMenuGL* menu) { LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE); - LLView* menu_bp = gMenuHolder->getChildView("COF.Geear.New_Body_Parts", FALSE); + LLView* menu_bp = gMenuHolder->getChildView("COF.Gear.New_Body_Parts", FALSE); for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i) { @@ -200,8 +200,7 @@ private: p.on_click.function_name = "Wearable.Create"; p.on_click.parameter = LLSD(type_name); - LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? - menu_clothes : menu_bp; + LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp; LLUICtrlFactory::create<LLMenuItemCallGL>(p, parent); } } @@ -270,7 +269,7 @@ private: if (inventory_panel->getVisible()) { - inventory_panel->setSortOrder(sort_order); + inventory_panel->getFolderViewModel()->setSorter(sort_order); } else { @@ -738,7 +737,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) } // save current folder open state if no filter currently applied - if (mInventoryItemsPanel->getRootFolder()->getFilterSubString().empty()) + if (mInventoryItemsPanel->getFilterSubString().empty()) { mSavedFolderState->setApply(FALSE); mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); @@ -885,13 +884,13 @@ LLPanelOutfitEdit::selection_info_t LLPanelOutfitEdit::getAddMorePanelSelectionT { if (mInventoryItemsPanel != NULL && mInventoryItemsPanel->getVisible()) { - std::set<LLUUID> selected_uuids = mInventoryItemsPanel->getRootFolder()->getSelectionList(); + std::set<LLFolderViewItem*> selected_items = mInventoryItemsPanel->getRootFolder()->getSelectionList(); - result.second = selected_uuids.size(); + result.second = selected_items.size(); if (result.second == 1) { - result.first = getWearableTypeByItemUUID(*(selected_uuids.begin())); + result.first = getWearableTypeByItemUUID(static_cast<LLFolderViewModelItemInventory*>((*selected_items.begin())->getViewModelItem())->getUUID()); } } else if (mWearableItemsList != NULL && mWearableItemsList->getVisible()) @@ -1310,7 +1309,7 @@ void LLPanelOutfitEdit::getCurrentItemUUID(LLUUID& selected_id) LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem(); if (!curr_item) return; - LLFolderViewEventListener* listenerp = curr_item->getListener(); + LLFolderViewModelItemInventory* listenerp = static_cast<LLFolderViewModelItemInventory*>(curr_item->getViewModelItem()); if (!listenerp) return; selected_id = listenerp->getUUID(); @@ -1327,9 +1326,13 @@ void LLPanelOutfitEdit::getSelectedItemsUUID(uuid_vec_t& uuid_list) void (uuid_vec_t::* tmp)(LLUUID const &) = &uuid_vec_t::push_back; if (mInventoryItemsPanel->getVisible()) { - std::set<LLUUID> item_set = mInventoryItemsPanel->getRootFolder()->getSelectionList(); - - std::for_each(item_set.begin(), item_set.end(), boost::bind( tmp, &uuid_list, _1)); + std::set<LLFolderViewItem*> item_set = mInventoryItemsPanel->getRootFolder()->getSelectionList(); + for (std::set<LLFolderViewItem*>::iterator it = item_set.begin(), end_it = item_set.end(); + it != end_it; + ++it) + { + uuid_list.push_back(static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID()); + } } else if (mWearablesListViewPanel->getVisible()) { @@ -1374,13 +1377,13 @@ void LLPanelOutfitEdit::saveListSelection() { if(mWearablesListViewPanel->getVisible()) { - std::set<LLUUID> selected_ids = mInventoryItemsPanel->getRootFolder()->getSelectionList(); + std::set<LLFolderViewItem*> selected_ids = mInventoryItemsPanel->getRootFolder()->getSelectionList(); if(!selected_ids.size()) return; - for (std::set<LLUUID>::const_iterator item_id = selected_ids.begin(); item_id != selected_ids.end(); ++item_id) + for (std::set<LLFolderViewItem*>::const_iterator item_id = selected_ids.begin(); item_id != selected_ids.end(); ++item_id) { - mWearableItemsList->selectItemByUUID(*item_id, true); + mWearableItemsList->selectItemByUUID(static_cast<LLFolderViewModelItemInventory*>((*item_id)->getViewModelItem())->getUUID(), true); } mWearableItemsList->scrollToShowFirstSelectedItem(); } @@ -1398,7 +1401,7 @@ void LLPanelOutfitEdit::saveListSelection() for(std::vector<LLUUID>::const_iterator item_id = selected_ids.begin(); item_id != selected_ids.end(); ++item_id) { - LLFolderViewItem* item = root->getItemByID(*item_id); + LLFolderViewItem* item = mInventoryItemsPanel->getItemByID(*item_id); if (!item) continue; LLFolderViewFolder* parent = item->getParentFolder(); diff --git a/indra/newview/llpanelpathfindingrebakenavmesh.cpp b/indra/newview/llpanelpathfindingrebakenavmesh.cpp deleted file mode 100644 index 7efb1a9227..0000000000 --- a/indra/newview/llpanelpathfindingrebakenavmesh.cpp +++ /dev/null @@ -1,269 +0,0 @@ -/** -* @file llpanelpathfindingrebakenavmesh.cpp -* @brief Implementation of llpanelpathfindingrebakenavmesh -* @author Prep@lindenlab.com -* -* $LicenseInfo:firstyear=2012&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2012, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - - -#include "llviewerprecompiledheaders.h" - -#include "llpanelpathfindingrebakenavmesh.h" - -#include <boost/bind.hpp> -#include <boost/signals2.hpp> - -#include "llagent.h" -#include "llbutton.h" -#include "llenvmanager.h" -#include "llhints.h" -#include "llnotificationsutil.h" -#include "llpanel.h" -#include "llpathfindingmanager.h" -#include "llpathfindingnavmesh.h" -#include "llpathfindingnavmeshstatus.h" -#include "lltoolbar.h" -#include "lltoolbarview.h" -#include "lltooltip.h" -#include "llviewerregion.h" - -LLPanelPathfindingRebakeNavmesh* LLPanelPathfindingRebakeNavmesh::getInstance() -{ - static LLPanelPathfindingRebakeNavmesh* panel = getPanel(); - return panel; -} - -BOOL LLPanelPathfindingRebakeNavmesh::postBuild() -{ - //Rebake button - mNavMeshRebakeButton = findChild<LLButton>("navmesh_btn"); - llassert(mNavMeshRebakeButton != NULL); - mNavMeshRebakeButton->setCommitCallback(boost::bind(&LLPanelPathfindingRebakeNavmesh::onNavMeshRebakeClick, this)); - LLHints::registerHintTarget("navmesh_btn", mNavMeshRebakeButton->getHandle()); - - //Sending rebake request - mNavMeshSendingButton = findChild<LLButton>("navmesh_btn_sending"); - llassert(mNavMeshSendingButton != NULL); - LLHints::registerHintTarget("navmesh_btn_sending", mNavMeshSendingButton->getHandle()); - - //rebaking... - mNavMeshBakingButton = findChild<LLButton>("navmesh_btn_baking"); - llassert(mNavMeshBakingButton != NULL); - LLHints::registerHintTarget("navmesh_btn_baking", mNavMeshBakingButton->getHandle()); - - setMode(kRebakeNavMesh_Default); - - createNavMeshStatusListenerForCurrentRegion(); - - if ( !mRegionCrossingSlot.connected() ) - { - mRegionCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPanelPathfindingRebakeNavmesh::handleRegionBoundaryCrossed, this)); - } - - if (!mAgentStateSlot.connected()) - { - mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLPanelPathfindingRebakeNavmesh::handleAgentState, this, _1)); - } - LLPathfindingManager::getInstance()->requestGetAgentState(); - - return LLPanel::postBuild(); -} - -void LLPanelPathfindingRebakeNavmesh::draw() -{ - if (doDraw()) - { - updatePosition(); - LLPanel::draw(); - } -} - -BOOL LLPanelPathfindingRebakeNavmesh::handleToolTip( S32 x, S32 y, MASK mask ) -{ - LLToolTipMgr::instance().unblockToolTips(); - - if (mNavMeshRebakeButton->getVisible()) - { - LLToolTipMgr::instance().show(mNavMeshRebakeButton->getToolTip()); - } - else if (mNavMeshSendingButton->getVisible()) - { - LLToolTipMgr::instance().show(mNavMeshSendingButton->getToolTip()); - } - else if (mNavMeshBakingButton->getVisible()) - { - LLToolTipMgr::instance().show(mNavMeshBakingButton->getToolTip()); - } - - return LLPanel::handleToolTip(x, y, mask); -} - -LLPanelPathfindingRebakeNavmesh::LLPanelPathfindingRebakeNavmesh() - : LLPanel(), - mCanRebakeRegion(FALSE), - mRebakeNavMeshMode(kRebakeNavMesh_Default), - mNavMeshRebakeButton(NULL), - mNavMeshSendingButton(NULL), - mNavMeshBakingButton(NULL), - mNavMeshSlot(), - mRegionCrossingSlot(), - mAgentStateSlot() -{ - // make sure we have the only instance of this class - static bool b = true; - llassert_always(b); - b=false; -} - -LLPanelPathfindingRebakeNavmesh::~LLPanelPathfindingRebakeNavmesh() -{ -} - -LLPanelPathfindingRebakeNavmesh* LLPanelPathfindingRebakeNavmesh::getPanel() -{ - LLPanelPathfindingRebakeNavmesh* panel = new LLPanelPathfindingRebakeNavmesh(); - panel->buildFromFile("panel_navmesh_rebake.xml"); - return panel; -} - -void LLPanelPathfindingRebakeNavmesh::setMode(ERebakeNavMeshMode pRebakeNavMeshMode) -{ - if (pRebakeNavMeshMode == kRebakeNavMesh_Available) - { - LLNotificationsUtil::add("PathfindingRebakeNavmesh"); - } - mNavMeshRebakeButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_Available); - mNavMeshSendingButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_RequestSent); - mNavMeshBakingButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_InProgress); - mRebakeNavMeshMode = pRebakeNavMeshMode; -} - -LLPanelPathfindingRebakeNavmesh::ERebakeNavMeshMode LLPanelPathfindingRebakeNavmesh::getMode() const -{ - return mRebakeNavMeshMode; -} - -void LLPanelPathfindingRebakeNavmesh::onNavMeshRebakeClick() -{ - setMode(kRebakeNavMesh_RequestSent); - LLPathfindingManager::getInstance()->requestRebakeNavMesh(boost::bind(&LLPanelPathfindingRebakeNavmesh::handleRebakeNavMeshResponse, this, _1)); -} - -void LLPanelPathfindingRebakeNavmesh::handleAgentState(BOOL pCanRebakeRegion) -{ - mCanRebakeRegion = pCanRebakeRegion; -} - -void LLPanelPathfindingRebakeNavmesh::handleRebakeNavMeshResponse(bool pResponseStatus) -{ - if (getMode() == kRebakeNavMesh_RequestSent) - { - setMode(pResponseStatus ? kRebakeNavMesh_InProgress : kRebakeNavMesh_Default); - } - - if (!pResponseStatus) - { - LLNotificationsUtil::add("PathfindingCannotRebakeNavmesh"); - } -} - -void LLPanelPathfindingRebakeNavmesh::handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus) -{ - ERebakeNavMeshMode rebakeNavMeshMode = kRebakeNavMesh_Default; - if (pNavMeshStatus.isValid()) - { - switch (pNavMeshStatus.getStatus()) - { - case LLPathfindingNavMeshStatus::kPending : - case LLPathfindingNavMeshStatus::kRepending : - rebakeNavMeshMode = kRebakeNavMesh_Available; - break; - case LLPathfindingNavMeshStatus::kBuilding : - rebakeNavMeshMode = kRebakeNavMesh_InProgress; - break; - case LLPathfindingNavMeshStatus::kComplete : - rebakeNavMeshMode = kRebakeNavMesh_NotAvailable; - break; - default : - rebakeNavMeshMode = kRebakeNavMesh_Default; - llassert(0); - break; - } - } - - setMode(rebakeNavMeshMode); -} - -void LLPanelPathfindingRebakeNavmesh::handleRegionBoundaryCrossed() -{ - createNavMeshStatusListenerForCurrentRegion(); - mCanRebakeRegion = FALSE; - LLPathfindingManager::getInstance()->requestGetAgentState(); -} - -void LLPanelPathfindingRebakeNavmesh::createNavMeshStatusListenerForCurrentRegion() -{ - if (mNavMeshSlot.connected()) - { - mNavMeshSlot.disconnect(); - } - - LLViewerRegion *currentRegion = gAgent.getRegion(); - if (currentRegion != NULL) - { - mNavMeshSlot = LLPathfindingManager::getInstance()->registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPanelPathfindingRebakeNavmesh::handleNavMeshStatus, this, _2)); - LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true); - } -} - -bool LLPanelPathfindingRebakeNavmesh::doDraw() const -{ - return (mCanRebakeRegion && (mRebakeNavMeshMode != kRebakeNavMesh_NotAvailable)); -} - -void LLPanelPathfindingRebakeNavmesh::updatePosition() -{ - S32 y_pos = 0; - S32 bottom_tb_center = 0; - - if (LLToolBar* toolbar_bottom = gToolBarView->getChild<LLToolBar>("toolbar_bottom")) - { - y_pos = toolbar_bottom->getRect().getHeight(); - bottom_tb_center = toolbar_bottom->getRect().getCenterX(); - } - - S32 left_tb_width = 0; - if (LLToolBar* toolbar_left = gToolBarView->getChild<LLToolBar>("toolbar_left")) - { - left_tb_width = toolbar_left->getRect().getWidth(); - } - - if(LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("state_management_buttons_container")) - { - panel_ssf_container->setOrigin(0, y_pos); - } - - S32 x_pos = bottom_tb_center-getRect().getWidth()/2 - left_tb_width + 113 /* width of stand/fly button */ + 10 /* margin */; - - setOrigin( x_pos, 0); -} diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index f1380e7a36..d7c634d619 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -72,9 +72,12 @@ static const std::string NEARBY_TAB_NAME = "nearby_panel"; static const std::string FRIENDS_TAB_NAME = "friends_panel"; static const std::string GROUP_TAB_NAME = "groups_panel"; static const std::string RECENT_TAB_NAME = "recent_panel"; +static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars static const std::string COLLAPSED_BY_USER = "collapsed_by_user"; +extern S32 gMaxAgentGroups; + /** Comparator for comparing avatar items by last interaction date */ class LLAvatarItemRecentComparator : public LLAvatarItemComparator { @@ -492,26 +495,37 @@ public: LLPanelPeople::LLPanelPeople() : LLPanel(), - mFilterSubString(LLStringUtil::null), - mFilterSubStringOrig(LLStringUtil::null), - mFilterEditor(NULL), mTabContainer(NULL), mOnlineFriendList(NULL), mAllFriendList(NULL), mNearbyList(NULL), mRecentList(NULL), mGroupList(NULL), - mNearbyGearButton(NULL), - mFriendsGearButton(NULL), - mGroupsGearButton(NULL), - mRecentGearButton(NULL), mMiniMap(NULL) { mFriendListUpdater = new LLFriendListUpdater(boost::bind(&LLPanelPeople::updateFriendList, this)); mNearbyListUpdater = new LLNearbyListUpdater(boost::bind(&LLPanelPeople::updateNearbyList, this)); mRecentListUpdater = new LLRecentListUpdater(boost::bind(&LLPanelPeople::updateRecentList, this)); mButtonsUpdater = new LLButtonsUpdater(boost::bind(&LLPanelPeople::updateButtons, this)); - mCommitCallbackRegistrar.add("People.addFriend", boost::bind(&LLPanelPeople::onAddFriendButtonClicked, this)); + + mCommitCallbackRegistrar.add("People.AddFriend", boost::bind(&LLPanelPeople::onAddFriendButtonClicked, this)); + mCommitCallbackRegistrar.add("People.AddFriendWizard", boost::bind(&LLPanelPeople::onAddFriendWizButtonClicked, this)); + mCommitCallbackRegistrar.add("People.DelFriend", boost::bind(&LLPanelPeople::onDeleteFriendButtonClicked, this)); + mCommitCallbackRegistrar.add("People.Group.Minus", boost::bind(&LLPanelPeople::onGroupMinusButtonClicked, this)); + mCommitCallbackRegistrar.add("People.Chat", boost::bind(&LLPanelPeople::onChatButtonClicked, this)); + mCommitCallbackRegistrar.add("People.Gear", boost::bind(&LLPanelPeople::onGearButtonClicked, this, _1)); + + mCommitCallbackRegistrar.add("People.Group.Plus.Action", boost::bind(&LLPanelPeople::onGroupPlusMenuItemClicked, this, _2)); + mCommitCallbackRegistrar.add("People.Friends.ViewSort.Action", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemClicked, this, _2)); + mCommitCallbackRegistrar.add("People.Nearby.ViewSort.Action", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemClicked, this, _2)); + mCommitCallbackRegistrar.add("People.Groups.ViewSort.Action", boost::bind(&LLPanelPeople::onGroupsViewSortMenuItemClicked, this, _2)); + mCommitCallbackRegistrar.add("People.Recent.ViewSort.Action", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemClicked, this, _2)); + + mEnableCallbackRegistrar.add("People.Friends.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemCheck, this, _2)); + mEnableCallbackRegistrar.add("People.Recent.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemCheck, this, _2)); + mEnableCallbackRegistrar.add("People.Nearby.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemCheck, this, _2)); + + mEnableCallbackRegistrar.add("People.Group.Plus.Validate", boost::bind(&LLPanelPeople::onGroupPlusButtonValidate, this)); } LLPanelPeople::~LLPanelPeople() @@ -525,13 +539,6 @@ LLPanelPeople::~LLPanelPeople() { LLVoiceClient::getInstance()->removeObserver(this); } - - if (mGroupPlusMenuHandle.get()) mGroupPlusMenuHandle.get()->die(); - if (mNearbyViewSortMenuHandle.get()) mNearbyViewSortMenuHandle.get()->die(); - if (mNearbyViewSortMenuHandle.get()) mNearbyViewSortMenuHandle.get()->die(); - if (mGroupsViewSortMenuHandle.get()) mGroupsViewSortMenuHandle.get()->die(); - if (mRecentViewSortMenuHandle.get()) mRecentViewSortMenuHandle.get()->die(); - } void LLPanelPeople::onFriendsAccordionExpandedCollapsed(LLUICtrl* ctrl, const LLSD& param, LLAvatarList* avatar_list) @@ -551,17 +558,31 @@ void LLPanelPeople::onFriendsAccordionExpandedCollapsed(LLUICtrl* ctrl, const LL } } + +void LLPanelPeople::removePicker() +{ + if(mPicker.get()) + { + mPicker.get()->closeFloater(); + } +} + BOOL LLPanelPeople::postBuild() { - mFilterEditor = getChild<LLFilterEditor>("filter_input"); - mFilterEditor->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); + getChild<LLFilterEditor>("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); + getChild<LLFilterEditor>("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); + getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); + getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); mTabContainer = getChild<LLTabContainer>("tabs"); mTabContainer->setCommitCallback(boost::bind(&LLPanelPeople::onTabSelected, this, _2)); + mSavedFilters.resize(mTabContainer->getTabCount()); + mSavedOriginalFilters.resize(mTabContainer->getTabCount()); LLPanel* friends_tab = getChild<LLPanel>(FRIENDS_TAB_NAME); // updater is active only if panel is visible to user. friends_tab->setVisibleCallback(boost::bind(&Updater::setActive, mFriendListUpdater, _2)); + friends_tab->setVisibleCallback(boost::bind(&LLPanelPeople::removePicker, this)); mOnlineFriendList = friends_tab->getChild<LLAvatarList>("avatars_online"); mAllFriendList = friends_tab->getChild<LLAvatarList>("avatars_all"); mOnlineFriendList->setNoItemsCommentText(getString("no_friends_online")); @@ -592,23 +613,15 @@ BOOL LLPanelPeople::postBuild() mGroupList->setNoItemsMsg(getString("no_groups_msg")); mGroupList->setNoFilteredItemsMsg(getString("no_filtered_groups_msg")); - mNearbyList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); - mRecentList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); - mAllFriendList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); - mOnlineFriendList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); + mNearbyList->setContextMenu(&LLPanelPeopleMenus::gNearbyPeopleContextMenu); + mRecentList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu); + mAllFriendList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu); + mOnlineFriendList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu); setSortOrder(mRecentList, (ESortOrder)gSavedSettings.getU32("RecentPeopleSortOrder"), false); setSortOrder(mAllFriendList, (ESortOrder)gSavedSettings.getU32("FriendsSortOrder"), false); setSortOrder(mNearbyList, (ESortOrder)gSavedSettings.getU32("NearbyPeopleSortOrder"), false); - LLPanel* groups_panel = getChild<LLPanel>(GROUP_TAB_NAME); - groups_panel->childSetAction("activate_btn", boost::bind(&LLPanelPeople::onActivateButtonClicked, this)); - groups_panel->childSetAction("plus_btn", boost::bind(&LLPanelPeople::onGroupPlusButtonClicked, this)); - - LLPanel* friends_panel = getChild<LLPanel>(FRIENDS_TAB_NAME); - friends_panel->childSetAction("add_btn", boost::bind(&LLPanelPeople::onAddFriendWizButtonClicked, this)); - friends_panel->childSetAction("del_btn", boost::bind(&LLPanelPeople::onDeleteFriendButtonClicked, this)); - mOnlineFriendList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1)); mAllFriendList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1)); mNearbyList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1)); @@ -629,6 +642,19 @@ BOOL LLPanelPeople::postBuild() mGroupList->setCommitCallback(boost::bind(&LLPanelPeople::updateButtons, this)); mGroupList->setReturnCallback(boost::bind(&LLPanelPeople::onChatButtonClicked, this)); + LLMenuButton* groups_gear_btn = getChild<LLMenuButton>("groups_gear_btn"); + + // Use the context menu of the Groups list for the Groups tab gear menu. + LLToggleableMenu* groups_gear_menu = mGroupList->getContextMenu(); + if (groups_gear_menu) + { + groups_gear_btn->setMenu(groups_gear_menu, LLMenuButton::MP_BOTTOM_LEFT); + } + else + { + llwarns << "People->Groups list menu not found" << llendl; + } + LLAccordionCtrlTab* accordion_tab = getChild<LLAccordionCtrlTab>("tab_all"); accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLPanelPeople::onFriendsAccordionExpandedCollapsed, this, _1, _2, mAllFriendList)); @@ -637,70 +663,9 @@ BOOL LLPanelPeople::postBuild() accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLPanelPeople::onFriendsAccordionExpandedCollapsed, this, _1, _2, mOnlineFriendList)); - buttonSetAction("view_profile_btn", boost::bind(&LLPanelPeople::onViewProfileButtonClicked, this)); - buttonSetAction("group_info_btn", boost::bind(&LLPanelPeople::onGroupInfoButtonClicked, this)); - buttonSetAction("chat_btn", boost::bind(&LLPanelPeople::onChatButtonClicked, this)); - buttonSetAction("im_btn", boost::bind(&LLPanelPeople::onImButtonClicked, this)); - buttonSetAction("call_btn", boost::bind(&LLPanelPeople::onCallButtonClicked, this)); - buttonSetAction("group_call_btn", boost::bind(&LLPanelPeople::onGroupCallButtonClicked, this)); - buttonSetAction("teleport_btn", boost::bind(&LLPanelPeople::onTeleportButtonClicked, this)); - buttonSetAction("share_btn", boost::bind(&LLPanelPeople::onShareButtonClicked, this)); - // Must go after setting commit callback and initializing all pointers to children. mTabContainer->selectTabByName(NEARBY_TAB_NAME); - // Create menus. - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; - - registrar.add("People.Group.Plus.Action", boost::bind(&LLPanelPeople::onGroupPlusMenuItemClicked, this, _2)); - registrar.add("People.Group.Minus.Action", boost::bind(&LLPanelPeople::onGroupMinusButtonClicked, this)); - registrar.add("People.Friends.ViewSort.Action", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemClicked, this, _2)); - registrar.add("People.Nearby.ViewSort.Action", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemClicked, this, _2)); - registrar.add("People.Groups.ViewSort.Action", boost::bind(&LLPanelPeople::onGroupsViewSortMenuItemClicked, this, _2)); - registrar.add("People.Recent.ViewSort.Action", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemClicked, this, _2)); - - enable_registrar.add("People.Group.Minus.Enable", boost::bind(&LLPanelPeople::isRealGroup, this)); - enable_registrar.add("People.Friends.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemCheck, this, _2)); - enable_registrar.add("People.Recent.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemCheck, this, _2)); - enable_registrar.add("People.Nearby.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemCheck, this, _2)); - - mNearbyGearButton = getChild<LLMenuButton>("nearby_view_sort_btn"); - mFriendsGearButton = getChild<LLMenuButton>("friends_viewsort_btn"); - mGroupsGearButton = getChild<LLMenuButton>("groups_viewsort_btn"); - mRecentGearButton = getChild<LLMenuButton>("recent_viewsort_btn"); - - LLMenuGL* plus_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_group_plus.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mGroupPlusMenuHandle = plus_menu->getHandle(); - - LLToggleableMenu* nearby_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_nearby_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - if(nearby_view_sort) - { - mNearbyViewSortMenuHandle = nearby_view_sort->getHandle(); - mNearbyGearButton->setMenu(nearby_view_sort); - } - - LLToggleableMenu* friend_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_friends_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - if(friend_view_sort) - { - mFriendsViewSortMenuHandle = friend_view_sort->getHandle(); - mFriendsGearButton->setMenu(friend_view_sort); - } - - LLToggleableMenu* group_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_groups_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - if(group_view_sort) - { - mGroupsViewSortMenuHandle = group_view_sort->getHandle(); - mGroupsGearButton->setMenu(group_view_sort); - } - - LLToggleableMenu* recent_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_recent_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - if(recent_view_sort) - { - mRecentViewSortMenuHandle = recent_view_sort->getHandle(); - mRecentGearButton->setMenu(recent_view_sort); - } - LLVoiceClient::getInstance()->addObserver(this); // call this method in case some list is empty and buttons can be in inconsistent state @@ -735,9 +700,11 @@ void LLPanelPeople::updateFriendListHelpText() if (no_friends_text->getVisible()) { //update help text for empty lists - std::string message_name = mFilterSubString.empty() ? "no_friends_msg" : "no_filtered_friends_msg"; + const std::string& filter = mSavedOriginalFilters[mTabContainer->getCurrentPanelIndex()]; + + std::string message_name = filter.empty() ? "no_friends_msg" : "no_filtered_friends_msg"; LLStringUtil::format_map_t args; - args["[SEARCH_TERM]"] = LLURI::escape(mFilterSubStringOrig); + args["[SEARCH_TERM]"] = LLURI::escape(filter); no_friends_text->setText(getString(message_name, args)); } } @@ -821,31 +788,9 @@ void LLPanelPeople::updateRecentList() mRecentList->setDirty(); } -void LLPanelPeople::buttonSetVisible(std::string btn_name, BOOL visible) -{ - // To make sure we're referencing the right widget (a child of the button bar). - LLButton* button = getChild<LLView>("button_bar")->getChild<LLButton>(btn_name); - button->setVisible(visible); -} - -void LLPanelPeople::buttonSetEnabled(const std::string& btn_name, bool enabled) -{ - // To make sure we're referencing the right widget (a child of the button bar). - LLButton* button = getChild<LLView>("button_bar")->getChild<LLButton>(btn_name); - button->setEnabled(enabled); -} - -void LLPanelPeople::buttonSetAction(const std::string& btn_name, const commit_signal_t::slot_type& cb) -{ - // To make sure we're referencing the right widget (a child of the button bar). - LLButton* button = getChild<LLView>("button_bar")->getChild<LLButton>(btn_name); - button->setClickedCallback(cb); -} - void LLPanelPeople::updateButtons() { std::string cur_tab = getActiveTabName(); - bool nearby_tab_active = (cur_tab == NEARBY_TAB_NAME); bool friends_tab_active = (cur_tab == FRIENDS_TAB_NAME); bool group_tab_active = (cur_tab == GROUP_TAB_NAME); //bool recent_tab_active = (cur_tab == RECENT_TAB_NAME); @@ -856,63 +801,47 @@ void LLPanelPeople::updateButtons() bool item_selected = (selected_uuids.size() == 1); bool multiple_selected = (selected_uuids.size() >= 1); - buttonSetVisible("group_info_btn", group_tab_active); - buttonSetVisible("chat_btn", group_tab_active); - buttonSetVisible("view_profile_btn", !group_tab_active); - buttonSetVisible("im_btn", !group_tab_active); - buttonSetVisible("call_btn", !group_tab_active); - buttonSetVisible("group_call_btn", group_tab_active); - buttonSetVisible("teleport_btn", friends_tab_active); - buttonSetVisible("share_btn", nearby_tab_active || friends_tab_active); - if (group_tab_active) { - bool cur_group_active = true; - if (item_selected) { selected_id = mGroupList->getSelectedUUID(); - cur_group_active = (gAgent.getGroupID() == selected_id); } LLPanel* groups_panel = mTabContainer->getCurrentPanel(); - groups_panel->getChildView("activate_btn")->setEnabled(item_selected && !cur_group_active); // "none" or a non-active group selected - groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); + groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected + groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); + groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.count()))); } else { bool is_friend = true; - + bool is_self = false; // Check whether selected avatar is our friend. if (item_selected) { selected_id = selected_uuids.front(); is_friend = LLAvatarTracker::instance().getBuddyInfo(selected_id) != NULL; + is_self = gAgent.getID() == selected_id; } LLPanel* cur_panel = mTabContainer->getCurrentPanel(); if (cur_panel) { - cur_panel->getChildView("add_friend_btn")->setEnabled(!is_friend); + if (cur_panel->hasChild("add_friend_btn", TRUE)) + cur_panel->getChildView("add_friend_btn")->setEnabled(item_selected && !is_friend && !is_self); + if (friends_tab_active) { - cur_panel->getChildView("del_btn")->setEnabled(multiple_selected); + cur_panel->getChildView("friends_del_btn")->setEnabled(multiple_selected); + } + + if (!group_tab_active) + { + cur_panel->getChildView("gear_btn")->setEnabled(multiple_selected); } } } - - bool enable_calls = LLVoiceClient::getInstance()->isVoiceWorking() && LLVoiceClient::getInstance()->voiceEnabled(); - - buttonSetEnabled("view_profile_btn",item_selected); - buttonSetEnabled("share_btn", item_selected); - buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection - buttonSetEnabled("call_btn", multiple_selected && enable_calls); - buttonSetEnabled("teleport_btn", multiple_selected && LLAvatarActions::canOfferTeleport(selected_uuids)); - - bool none_group_selected = item_selected && selected_id.isNull(); - buttonSetEnabled("group_info_btn", !none_group_selected); - buttonSetEnabled("group_call_btn", !none_group_selected && enable_calls); - buttonSetEnabled("chat_btn", !none_group_selected); } std::string LLPanelPeople::getActiveTabName() const @@ -943,6 +872,9 @@ LLUUID LLPanelPeople::getCurrentItemID() const if (cur_tab == GROUP_TAB_NAME) return mGroupList->getSelectedUUID(); + if (cur_tab == BLOCKED_TAB_NAME) + return LLUUID::null; // FIXME? + llassert(0 && "unknown tab selected"); return LLUUID::null; } @@ -963,6 +895,8 @@ void LLPanelPeople::getCurrentItemIDs(uuid_vec_t& selected_uuids) const mRecentList->getSelectedUUIDs(selected_uuids); else if (cur_tab == GROUP_TAB_NAME) mGroupList->getSelectedUUIDs(selected_uuids); + else if (cur_tab == BLOCKED_TAB_NAME) + selected_uuids.clear(); // FIXME? else llassert(0 && "unknown tab selected"); @@ -1031,49 +965,60 @@ void LLPanelPeople::setSortOrder(LLAvatarList* list, ESortOrder order, bool save } } -bool LLPanelPeople::isRealGroup() -{ - return getCurrentItemID() != LLUUID::null; -} - void LLPanelPeople::onFilterEdit(const std::string& search_string) { - mFilterSubStringOrig = search_string; - LLStringUtil::trimHead(mFilterSubStringOrig); + const S32 cur_tab_idx = mTabContainer->getCurrentPanelIndex(); + std::string& filter = mSavedOriginalFilters[cur_tab_idx]; + std::string& saved_filter = mSavedFilters[cur_tab_idx]; + + filter = search_string; + LLStringUtil::trimHead(filter); + // Searches are case-insensitive - std::string search_upper = mFilterSubStringOrig; + std::string search_upper = filter; LLStringUtil::toUpper(search_upper); - if (mFilterSubString == search_upper) + if (saved_filter == search_upper) return; - mFilterSubString = search_upper; + saved_filter = search_upper; - //store accordion tabs state before any manipulation with accordion tabs - if(!mFilterSubString.empty()) + // Apply new filter to the current tab. + const std::string cur_tab = getActiveTabName(); + if (cur_tab == NEARBY_TAB_NAME) + { + mNearbyList->setNameFilter(filter); + } + else if (cur_tab == FRIENDS_TAB_NAME) + { + // store accordion tabs opened/closed state before any manipulation with accordion tabs + if (!saved_filter.empty()) { notifyChildren(LLSD().with("action","store_state")); } - - // Apply new filter. - mNearbyList->setNameFilter(mFilterSubStringOrig); - mOnlineFriendList->setNameFilter(mFilterSubStringOrig); - mAllFriendList->setNameFilter(mFilterSubStringOrig); - mRecentList->setNameFilter(mFilterSubStringOrig); - mGroupList->setNameFilter(mFilterSubStringOrig); + mOnlineFriendList->setNameFilter(filter); + mAllFriendList->setNameFilter(filter); setAccordionCollapsedByUser("tab_online", false); setAccordionCollapsedByUser("tab_all", false); - showFriendsAccordionsIfNeeded(); - //restore accordion tabs state _after_ all manipulations... - if(mFilterSubString.empty()) + // restore accordion tabs state _after_ all manipulations + if(saved_filter.empty()) { notifyChildren(LLSD().with("action","restore_state")); } } + else if (cur_tab == GROUP_TAB_NAME) + { + mGroupList->setNameFilter(filter); + } + else if (cur_tab == RECENT_TAB_NAME) + { + mRecentList->setNameFilter(filter); + } +} void LLPanelPeople::onTabSelected(const LLSD& param) { @@ -1081,11 +1026,6 @@ void LLPanelPeople::onTabSelected(const LLSD& param) updateButtons(); showFriendsAccordionsIfNeeded(); - - if (GROUP_TAB_NAME == tab_name) - mFilterEditor->setLabel(getString("groups_filter_label")); - else - mFilterEditor->setLabel(getString("people_filter_label")); } void LLPanelPeople::onAvatarListDoubleClicked(LLUICtrl* ctrl) @@ -1097,6 +1037,10 @@ void LLPanelPeople::onAvatarListDoubleClicked(LLUICtrl* ctrl) } LLUUID clicked_id = item->getAvatarId(); + if(gAgent.getID() == clicked_id) + { + return; + } #if 0 // SJB: Useful for testing, but not currently functional or to spec LLAvatarActions::showProfile(clicked_id); @@ -1127,12 +1071,6 @@ void LLPanelPeople::onAvatarListCommitted(LLAvatarList* list) updateButtons(); } -void LLPanelPeople::onViewProfileButtonClicked() -{ - LLUUID id = getCurrentItemID(); - LLAvatarActions::showProfile(id); -} - void LLPanelPeople::onAddFriendButtonClicked() { LLUUID id = getCurrentItemID(); @@ -1160,8 +1098,12 @@ bool LLPanelPeople::isItemsFreeOfFriends(const uuid_vec_t& uuids) void LLPanelPeople::onAddFriendWizButtonClicked() { + LLPanel* cur_panel = mTabContainer->getCurrentPanel(); + LLView * button = cur_panel->findChild<LLButton>("friends_add_btn", TRUE); + // Show add friend wizard. - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), FALSE, TRUE); + LLFloater* root_floater = gFloaterView->getParentFloater(this); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), FALSE, TRUE, FALSE, root_floater->getName(), button); if (!picker) { return; @@ -1169,11 +1111,13 @@ void LLPanelPeople::onAddFriendWizButtonClicked() // Need to disable 'ok' button when friend occurs in selection picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1)); - LLFloater* root_floater = gFloaterView->getParentFloater(this); + if (root_floater) { root_floater->addDependentFloater(picker); } + + mPicker = picker->getHandle(); } void LLPanelPeople::onDeleteFriendButtonClicked() @@ -1191,11 +1135,6 @@ void LLPanelPeople::onDeleteFriendButtonClicked() } } -void LLPanelPeople::onGroupInfoButtonClicked() -{ - LLGroupActions::show(getCurrentItemID()); -} - void LLPanelPeople::onChatButtonClicked() { LLUUID group_id = getCurrentItemID(); @@ -1203,6 +1142,17 @@ void LLPanelPeople::onChatButtonClicked() LLGroupActions::startIM(group_id); } +void LLPanelPeople::onGearButtonClicked(LLUICtrl* btn) +{ + uuid_vec_t selected_uuids; + getCurrentItemIDs(selected_uuids); + // Spawn at bottom left corner of the button. + if (getActiveTabName() == NEARBY_TAB_NAME) + LLPanelPeopleMenus::gNearbyPeopleContextMenu.show(btn, selected_uuids, 0, 0); + else + LLPanelPeopleMenus::gPeopleContextMenu.show(btn, selected_uuids, 0, 0); +} + void LLPanelPeople::onImButtonClicked() { uuid_vec_t selected_uuids; @@ -1219,11 +1169,6 @@ void LLPanelPeople::onImButtonClicked() } } -void LLPanelPeople::onActivateButtonClicked() -{ - LLGroupActions::activate(mGroupList->getSelectedUUID()); -} - // static void LLPanelPeople::onAvatarPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names) { @@ -1231,19 +1176,15 @@ void LLPanelPeople::onAvatarPicked(const uuid_vec_t& ids, const std::vector<LLAv LLAvatarActions::requestFriendshipDialog(ids[0], names[0].getCompleteName()); } -void LLPanelPeople::onGroupPlusButtonClicked() +bool LLPanelPeople::onGroupPlusButtonValidate() { if (!gAgent.canJoinGroups()) { LLNotificationsUtil::add("JoinedTooManyGroups"); - return; + return false; } - LLMenuGL* plus_menu = (LLMenuGL*)mGroupPlusMenuHandle.get(); - if (!plus_menu) - return; - - showGroupMenu(plus_menu); + return true; } void LLPanelPeople::onGroupMinusButtonClicked() @@ -1288,10 +1229,6 @@ void LLPanelPeople::onFriendsViewSortMenuItemClicked(const LLSD& userdata) mAllFriendList->showPermissions(show_permissions); mOnlineFriendList->showPermissions(show_permissions); } - else if (chosen_item == "panel_block_list_sidetray") - { - LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD()); - } } void LLPanelPeople::onGroupsViewSortMenuItemClicked(const LLSD& userdata) @@ -1324,10 +1261,6 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata) { setSortOrder(mNearbyList, E_SORT_BY_DISTANCE); } - else if (chosen_item == "panel_block_list_sidetray") - { - LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD()); - } } bool LLPanelPeople::onNearbyViewSortMenuItemCheck(const LLSD& userdata) @@ -1361,10 +1294,6 @@ void LLPanelPeople::onRecentViewSortMenuItemClicked(const LLSD& userdata) { mRecentList->toggleIcons(); } - else if (chosen_item == "panel_block_list_sidetray") - { - LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD()); - } } bool LLPanelPeople::onFriendsViewSortMenuItemCheck(const LLSD& userdata) @@ -1393,40 +1322,6 @@ bool LLPanelPeople::onRecentViewSortMenuItemCheck(const LLSD& userdata) return false; } -void LLPanelPeople::onCallButtonClicked() -{ - uuid_vec_t selected_uuids; - getCurrentItemIDs(selected_uuids); - - if (selected_uuids.size() == 1) - { - // initiate a P2P voice chat with the selected user - LLAvatarActions::startCall(getCurrentItemID()); - } - else if (selected_uuids.size() > 1) - { - // initiate an ad-hoc voice chat with multiple users - LLAvatarActions::startAdhocCall(selected_uuids); - } -} - -void LLPanelPeople::onGroupCallButtonClicked() -{ - LLGroupActions::startCall(getCurrentItemID()); -} - -void LLPanelPeople::onTeleportButtonClicked() -{ - uuid_vec_t selected_uuids; - getCurrentItemIDs(selected_uuids); - LLAvatarActions::offerTeleport(selected_uuids); -} - -void LLPanelPeople::onShareButtonClicked() -{ - LLAvatarActions::share(getCurrentItemID()); -} - void LLPanelPeople::onMoreButtonClicked() { // *TODO: not implemented yet diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 46c58cd139..4740964dee 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -68,6 +68,8 @@ private: E_SORT_BY_RECENT_SPEAKERS = 4, } ESortOrder; + void removePicker(); + // methods indirectly called by the updaters void updateFriendListHelpText(); void updateFriendList(); @@ -80,31 +82,22 @@ private: std::string getActiveTabName() const; LLUUID getCurrentItemID() const; void getCurrentItemIDs(uuid_vec_t& selected_uuids) const; - void buttonSetVisible(std::string btn_name, BOOL visible); - void buttonSetEnabled(const std::string& btn_name, bool enabled); - void buttonSetAction(const std::string& btn_name, const commit_signal_t::slot_type& cb); void showGroupMenu(LLMenuGL* menu); void setSortOrder(LLAvatarList* list, ESortOrder order, bool save = true); // UI callbacks void onFilterEdit(const std::string& search_string); void onTabSelected(const LLSD& param); - void onViewProfileButtonClicked(); void onAddFriendButtonClicked(); void onAddFriendWizButtonClicked(); void onDeleteFriendButtonClicked(); - void onGroupInfoButtonClicked(); void onChatButtonClicked(); + void onGearButtonClicked(LLUICtrl* btn); void onImButtonClicked(); - void onCallButtonClicked(); - void onGroupCallButtonClicked(); - void onTeleportButtonClicked(); - void onShareButtonClicked(); void onMoreButtonClicked(); - void onActivateButtonClicked(); void onAvatarListDoubleClicked(LLUICtrl* ctrl); void onAvatarListCommitted(LLAvatarList* list); - void onGroupPlusButtonClicked(); + bool onGroupPlusButtonValidate(); void onGroupMinusButtonClicked(); void onGroupPlusMenuItemClicked(const LLSD& userdata); @@ -113,8 +106,6 @@ private: void onGroupsViewSortMenuItemClicked(const LLSD& userdata); void onRecentViewSortMenuItemClicked(const LLSD& userdata); - //returns false only if group is "none" - bool isRealGroup(); bool onFriendsViewSortMenuItemCheck(const LLSD& userdata); bool onRecentViewSortMenuItemCheck(const LLSD& userdata); bool onNearbyViewSortMenuItemCheck(const LLSD& userdata); @@ -135,7 +126,6 @@ private: bool isAccordionCollapsedByUser(LLUICtrl* acc_tab); bool isAccordionCollapsedByUser(const std::string& name); - LLFilterEditor* mFilterEditor; LLTabContainer* mTabContainer; LLAvatarList* mOnlineFriendList; LLAvatarList* mAllFriendList; @@ -144,24 +134,14 @@ private: LLGroupList* mGroupList; LLNetMap* mMiniMap; - LLHandle<LLView> mGroupPlusMenuHandle; - LLHandle<LLView> mNearbyViewSortMenuHandle; - LLHandle<LLView> mFriendsViewSortMenuHandle; - LLHandle<LLView> mGroupsViewSortMenuHandle; - LLHandle<LLView> mRecentViewSortMenuHandle; + std::vector<std::string> mSavedOriginalFilters; + std::vector<std::string> mSavedFilters; Updater* mFriendListUpdater; Updater* mNearbyListUpdater; Updater* mRecentListUpdater; Updater* mButtonsUpdater; - - LLMenuButton* mNearbyGearButton; - LLMenuButton* mFriendsGearButton; - LLMenuButton* mGroupsGearButton; - LLMenuButton* mRecentGearButton; - - std::string mFilterSubString; - std::string mFilterSubStringOrig; + LLHandle< LLFloater > mPicker; }; #endif //LL_LLPANELPEOPLE_H diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index f12c4de2f7..49f7361c4a 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -37,20 +37,25 @@ #include "llagentdata.h" // for gAgentID #include "llavataractions.h" #include "llcallingcard.h" // for LLAvatarTracker +#include "lllogchat.h" #include "llviewermenu.h" // for gMenuHolder +#include "llconversationmodel.h" +#include "llviewerobjectlist.h" namespace LLPanelPeopleMenus { -NearbyMenu gNearbyMenu; +PeopleContextMenu gPeopleContextMenu; +NearbyPeopleContextMenu gNearbyPeopleContextMenu; -//== NearbyMenu =============================================================== +//== PeopleContextMenu =============================================================== -LLContextMenu* NearbyMenu::createMenu() +LLContextMenu* PeopleContextMenu::createMenu() { // set up the callbacks for all of the avatar menu items LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; + LLContextMenu* menu; if ( mUUIDs.size() == 1 ) { @@ -62,38 +67,86 @@ LLContextMenu* NearbyMenu::createMenu() registrar.add("Avatar.RemoveFriend", boost::bind(&LLAvatarActions::removeFriendDialog, id)); registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, id)); registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, id)); - registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this)); + registrar.add("Avatar.OfferTeleport", boost::bind(&PeopleContextMenu::offerTeleport, this)); + registrar.add("Avatar.ZoomIn", boost::bind(&handle_zoom_to_object, id)); registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::showOnMap, id)); registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::share, id)); registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id)); registrar.add("Avatar.BlockUnblock", boost::bind(&LLAvatarActions::toggleBlock, id)); + registrar.add("Avatar.InviteToGroup", boost::bind(&LLAvatarActions::inviteToGroup, id)); + registrar.add("Avatar.Calllog", boost::bind(&LLAvatarActions::viewChatHistory, id)); - enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2)); - enable_registrar.add("Avatar.CheckItem", boost::bind(&NearbyMenu::checkContextMenuItem, this, _2)); + enable_registrar.add("Avatar.EnableItem", boost::bind(&PeopleContextMenu::enableContextMenuItem, this, _2)); + enable_registrar.add("Avatar.CheckItem", boost::bind(&PeopleContextMenu::checkContextMenuItem, this, _2)); // create the context menu from the XUI - return createFromFile("menu_people_nearby.xml"); + menu = createFromFile("menu_people_nearby.xml"); + buildContextMenu(*menu, 0x0); } else { // Set up for multi-selected People // registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs)); // *TODO: unimplemented - registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs)); - registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs)); - registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this)); - registrar.add("Avatar.RemoveFriend",boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs)); + registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs, LLUUID::null)); + registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs, LLUUID::null)); + registrar.add("Avatar.OfferTeleport", boost::bind(&PeopleContextMenu::offerTeleport, this)); + registrar.add("Avatar.RemoveFriend", boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs)); // registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, mUUIDs)); // *TODO: unimplemented - // registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs)); // *TODO: unimplemented - enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2)); + // registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs)); // *TODO: unimplemented + + enable_registrar.add("Avatar.EnableItem", boost::bind(&PeopleContextMenu::enableContextMenuItem, this, _2)); // create the context menu from the XUI - return createFromFile("menu_people_nearby_multiselect.xml"); + menu = createFromFile("menu_people_nearby_multiselect.xml"); + buildContextMenu(*menu, ITEM_IN_MULTI_SELECTION); } + + return menu; +} + +void PeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags) +{ + menuentry_vec_t items; + menuentry_vec_t disabled_items; + + if (flags & ITEM_IN_MULTI_SELECTION) + { + items.push_back(std::string("add_friends")); + items.push_back(std::string("remove_friends")); + items.push_back(std::string("im")); + items.push_back(std::string("call")); + items.push_back(std::string("share")); + items.push_back(std::string("pay")); + items.push_back(std::string("offer_teleport")); + } + else + { + items.push_back(std::string("view_profile")); + items.push_back(std::string("im")); + items.push_back(std::string("offer_teleport")); + items.push_back(std::string("voice_call")); + items.push_back(std::string("chat_history")); + items.push_back(std::string("separator_chat_history")); + items.push_back(std::string("add_friend")); + items.push_back(std::string("remove_friend")); + items.push_back(std::string("invite_to_group")); + items.push_back(std::string("separator_invite_to_group")); + items.push_back(std::string("map")); + items.push_back(std::string("share")); + items.push_back(std::string("pay")); + items.push_back(std::string("block_unblock")); + } + + hide_context_entries(menu, items, disabled_items); } -bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) +bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata) { + if(gAgent.getID() == mUUIDs.front()) + { + return false; + } std::string item = userdata.asString(); // Note: can_block and can_delete is used only for one person selected menu @@ -160,6 +213,12 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) { return LLAvatarActions::canCall(); } + else if (item == std::string("can_zoom_in")) + { + const LLUUID& id = mUUIDs.front(); + + return gObjectList.findObject(id); + } else if (item == std::string("can_show_on_map")) { const LLUUID& id = mUUIDs.front(); @@ -171,10 +230,19 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) { return LLAvatarActions::canOfferTeleport(mUUIDs); } + else if (item == std::string("can_callog")) + { + return LLLogChat::isTranscriptExist(mUUIDs.front()); + } + else if (item == std::string("can_im") || item == std::string("can_invite") || + item == std::string("can_share") || item == std::string("can_pay")) + { + return true; + } return false; } -bool NearbyMenu::checkContextMenuItem(const LLSD& userdata) +bool PeopleContextMenu::checkContextMenuItem(const LLSD& userdata) { std::string item = userdata.asString(); const LLUUID& id = mUUIDs.front(); @@ -187,11 +255,50 @@ bool NearbyMenu::checkContextMenuItem(const LLSD& userdata) return false; } -void NearbyMenu::offerTeleport() +void PeopleContextMenu::offerTeleport() { // boost::bind cannot recognize overloaded method LLAvatarActions::offerTeleport(), // so we have to use a wrapper. LLAvatarActions::offerTeleport(mUUIDs); } +//== NearbyPeopleContextMenu =============================================================== + +void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags) +{ + menuentry_vec_t items; + menuentry_vec_t disabled_items; + + if (flags & ITEM_IN_MULTI_SELECTION) + { + items.push_back(std::string("add_friends")); + items.push_back(std::string("remove_friends")); + items.push_back(std::string("im")); + items.push_back(std::string("call")); + items.push_back(std::string("share")); + items.push_back(std::string("pay")); + items.push_back(std::string("offer_teleport")); + } + else + { + items.push_back(std::string("view_profile")); + items.push_back(std::string("im")); + items.push_back(std::string("offer_teleport")); + items.push_back(std::string("voice_call")); + items.push_back(std::string("chat_history")); + items.push_back(std::string("separator_chat_history")); + items.push_back(std::string("add_friend")); + items.push_back(std::string("remove_friend")); + items.push_back(std::string("invite_to_group")); + items.push_back(std::string("separator_invite_to_group")); + items.push_back(std::string("zoom_in")); + items.push_back(std::string("map")); + items.push_back(std::string("share")); + items.push_back(std::string("pay")); + items.push_back(std::string("block_unblock")); + } + + hide_context_entries(menu, items, disabled_items); +} + } // namespace LLPanelPeopleMenus diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h index d51eaec716..0a1dcef303 100644 --- a/indra/newview/llpanelpeoplemenus.h +++ b/indra/newview/llpanelpeoplemenus.h @@ -33,19 +33,33 @@ namespace LLPanelPeopleMenus { /** - * Menu used in the nearby people list. + * Menu used in the people lists. */ -class NearbyMenu : public LLListContextMenu +class PeopleContextMenu : public LLListContextMenu { public: /*virtual*/ LLContextMenu* createMenu(); + +protected: + virtual void buildContextMenu(class LLMenuGL& menu, U32 flags); + private: bool enableContextMenuItem(const LLSD& userdata); bool checkContextMenuItem(const LLSD& userdata); void offerTeleport(); }; -extern NearbyMenu gNearbyMenu; +/** + * Menu used in the nearby people list. + */ +class NearbyPeopleContextMenu : public PeopleContextMenu +{ +protected: + /*virtual*/ void buildContextMenu(class LLMenuGL& menu, U32 flags); +}; + +extern PeopleContextMenu gPeopleContextMenu; +extern NearbyPeopleContextMenu gNearbyPeopleContextMenu; } // namespace LLPanelPeopleMenus diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 51ab7649a4..e641370d2e 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -425,7 +425,7 @@ void LLPanelPermissions::refresh() } } - getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced); + getChildView("button set group")->setEnabled(root_selected && owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced); getChildView("Name:")->setEnabled(TRUE); LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name"); diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index ce8057eead..83b70d9f29 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -499,9 +499,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, std::string parcel_owner = LLSLURL("agent", parcel->getOwnerID(), "inspect").getSLURLString(); mParcelOwner->setText(parcel_owner); - LLAvatarNameCache::get(region->getOwner(), - boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, - _1, _2, mRegionOwnerText)); + LLAvatarNameCache::get(region->getOwner(), boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mRegionOwnerText)); } if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus()) @@ -523,9 +521,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID(); if(auth_buyer_id.notNull()) { - LLAvatarNameCache::get(auth_buyer_id, - boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, - _1, _2, mSaleToText)); + LLAvatarNameCache::get(auth_buyer_id, boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mSaleToText)); // Show sales info to a specific person or a group he belongs to. if (auth_buyer_id != gAgent.getID() && !gAgent.isInGroup(auth_buyer_id)) diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index a33fc12ce4..f4c6145881 100644 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -38,7 +38,7 @@ class LLPanelPlaceProfile : public LLPanelPlaceInfo public: LLPanelPlaceProfile(); /*virtual*/ ~LLPanelPlaceProfile(); - + /*virtual*/ BOOL postBuild(); /*virtual*/ void resetLocation(); diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 6d321d4716..6c2a01fc82 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -366,6 +366,7 @@ void LLPanelPlaces::onOpen(const LLSD& key) if (key.size() != 0) { + isLandmarkEditModeOn = false; std::string key_type = key["type"].asString(); if (key_type == LANDMARK_TAB_INFO_TYPE) { @@ -392,7 +393,6 @@ void LLPanelPlaces::onOpen(const LLSD& key) mPlaceInfoType = key_type; mPosGlobal.setZero(); mItem = NULL; - isLandmarkEditModeOn = false; togglePlaceInfoPanel(TRUE); if (mPlaceInfoType == AGENT_INFO_TYPE) diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index c63d89fc98..0756faf5c0 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -972,6 +972,11 @@ void LLTeleportHistoryPanel::onCollapseAllFolders() mItemContainers.get(n)->setDisplayChildren(false); } mHistoryAccordion->arrange(); + + if (mLastSelectedFlatlList) + { + mLastSelectedFlatlList->resetSelection(); + } } void LLTeleportHistoryPanel::onClearTeleportHistory() diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp index 280cc11179..343c140bbb 100644 --- a/indra/newview/llpaneltopinfobar.cpp +++ b/indra/newview/llpaneltopinfobar.cpp @@ -64,9 +64,6 @@ private: LLPanelTopInfoBar::LLPanelTopInfoBar(): mParcelChangedObserver(0) { - LLUICtrl::CommitCallbackRegistry::currentRegistrar() - .add("TopInfoBar.Action", boost::bind(&LLPanelTopInfoBar::onContextMenuItemClicked, this, _2)); - buildFromFile( "panel_topinfo_bar.xml"); } @@ -132,6 +129,11 @@ void LLPanelTopInfoBar::handleLoginComplete() BOOL LLPanelTopInfoBar::handleRightMouseDown(S32 x, S32 y, MASK mask) { + if(!LLUICtrl::CommitCallbackRegistry::getValue("TopInfoBar.Action")) + { + LLUICtrl::CommitCallbackRegistry::currentRegistrar() + .add("TopInfoBar.Action", boost::bind(&LLPanelTopInfoBar::onContextMenuItemClicked, this, _2)); + } show_topinfobar_context_menu(this, x, y); return TRUE; } @@ -230,7 +232,7 @@ void LLPanelTopInfoBar::buildLocationString(std::string& loc_str, bool show_coor void LLPanelTopInfoBar::setParcelInfoText(const std::string& new_text) { LLRect old_rect = getRect(); - const LLFontGL* font = mParcelInfoText->getDefaultFont(); + const LLFontGL* font = mParcelInfoText->getFont(); S32 new_text_width = font->getWidth(new_text); mParcelInfoText->setText(new_text); diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 975a6c67d8..c53760bca1 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -1,6 +1,6 @@ /** * @file llparticipantlist.cpp - * @brief LLParticipantList intended to update view(LLAvatarList) according to incoming messages + * @brief LLParticipantList : model of a conversation session with added speaker events handling * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code @@ -26,38 +26,17 @@ #include "llviewerprecompiledheaders.h" -// common includes -#include "lltrans.h" -#include "llavataractions.h" -#include "llagent.h" - +#include "llavatarnamecache.h" #include "llimview.h" -#include "llnotificationsutil.h" +#include "llfloaterimcontainer.h" #include "llparticipantlist.h" #include "llspeakers.h" -#include "llviewercontrol.h" -#include "llviewermenu.h" -#include "llvoiceclient.h" //LLParticipantList retrieves add, clear and remove events and updates view accordingly #if LL_MSVC #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally #endif -static const LLAvatarItemAgentOnTopComparator AGENT_ON_TOP_NAME_COMPARATOR; - -// helper function to update AvatarList Item's indicator in the voice participant list -static void update_speaker_indicator(const LLAvatarList* const avatar_list, const LLUUID& avatar_uuid, bool is_muted) -{ - LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(avatar_list->getItemByValue(avatar_uuid)); - if (item) - { - LLOutputMonitorCtrl* indicator = item->getChild<LLOutputMonitorCtrl>("speaking_indicator"); - indicator->setIsMuted(is_muted); - } -} - - // See EXT-4301. /** * class LLAvalineUpdater - observe the list of voice participants in session and check @@ -197,15 +176,9 @@ private: uuid_set_t mAvalineCallers; }; -LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, - LLAvatarList* avatar_list, - bool use_context_menu/* = true*/, - bool exclude_agent /*= true*/, - bool can_toggle_icons /*= true*/) : +LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLFolderViewModelInterface& root_view_model) : + LLConversationItemSession(data_source->getSessionID(), root_view_model), mSpeakerMgr(data_source), - mAvatarList(avatar_list), - mParticipantListMenu(NULL), - mExcludeAgent(exclude_agent), mValidateSpeakerCallback(NULL) { @@ -216,36 +189,16 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, mSpeakerRemoveListener = new SpeakerRemoveListener(*this); mSpeakerClearListener = new SpeakerClearListener(*this); mSpeakerModeratorListener = new SpeakerModeratorUpdateListener(*this); + mSpeakerUpdateListener = new SpeakerUpdateListener(*this); mSpeakerMuteListener = new SpeakerMuteListener(*this); mSpeakerMgr->addListener(mSpeakerAddListener, "add"); mSpeakerMgr->addListener(mSpeakerRemoveListener, "remove"); mSpeakerMgr->addListener(mSpeakerClearListener, "clear"); mSpeakerMgr->addListener(mSpeakerModeratorListener, "update_moderator"); + mSpeakerMgr->addListener(mSpeakerUpdateListener, "update_speaker"); - mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData")); - LL_DEBUGS("SpeakingIndicator") << "Set session for speaking indicators: " << mSpeakerMgr->getSessionID() << LL_ENDL; - mAvatarList->setSessionID(mSpeakerMgr->getSessionID()); - mAvatarListDoubleClickConnection = mAvatarList->setItemDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, _1)); - mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLParticipantList::onAvatarListRefreshed, this, _1, _2)); - // Set onAvatarListDoubleClicked as default on_return action. - mAvatarListReturnConnection = mAvatarList->setReturnCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList)); - - if (use_context_menu) - { - mParticipantListMenu = new LLParticipantListMenu(*this); - mAvatarList->setContextMenu(mParticipantListMenu); - } - else - { - mAvatarList->setContextMenu(NULL); - } - - if (use_context_menu && can_toggle_icons) - { - mAvatarList->setShowIcons("ParticipantListShowIcons"); - mAvatarListToggleIconsConnection = gSavedSettings.getControl("ParticipantListShowIcons")->getSignal()->connect(boost::bind(&LLAvatarList::toggleIcons, mAvatarList)); - } + setSessionID(mSpeakerMgr->getSessionID()); //Lets fill avatarList with existing speakers LLSpeakerMgr::speaker_list_t speaker_list; @@ -264,138 +217,32 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, mModeratorToRemoveList.insert(speakerp->mID); } } - // we need to exclude agent id for non group chat - sort(); -} - -LLParticipantList::~LLParticipantList() -{ - mAvatarListDoubleClickConnection.disconnect(); - mAvatarListRefreshConnection.disconnect(); - mAvatarListReturnConnection.disconnect(); - mAvatarListToggleIconsConnection.disconnect(); - - // It is possible Participant List will be re-created from LLCallFloater::onCurrentChannelChanged() - // See ticket EXT-3427 - // hide menu before deleting it to stop enable and check handlers from triggering. - if(mParticipantListMenu && !LLApp::isExiting()) - { - mParticipantListMenu->hide(); - } - - if (mParticipantListMenu) - { - delete mParticipantListMenu; - mParticipantListMenu = NULL; - } - - mAvatarList->setContextMenu(NULL); - mAvatarList->setComparator(NULL); - - delete mAvalineUpdater; -} - -void LLParticipantList::setSpeakingIndicatorsVisible(BOOL visible) -{ - mAvatarList->setSpeakingIndicatorsVisible(visible); -}; - -void LLParticipantList::onAvatarListDoubleClicked(LLUICtrl* ctrl) -{ - LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(ctrl); - if(!item) - { - return; - } - - LLUUID clicked_id = item->getAvatarId(); - - if (clicked_id.isNull() || clicked_id == gAgent.getID()) - return; - LLAvatarActions::startIM(clicked_id); -} - -void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) -{ - LLAvatarList* list = dynamic_cast<LLAvatarList*>(ctrl); - if (list) + // Identify and store what kind of session we are + LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(data_source->getSessionID()); + if (im_session) { - const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); - const std::size_t moderator_indicator_len = moderator_indicator.length(); - - // Firstly remove moderators indicator - std::set<LLUUID>::const_iterator - moderator_list_it = mModeratorToRemoveList.begin(), - moderator_list_end = mModeratorToRemoveList.end(); - for (;moderator_list_it != moderator_list_end; ++moderator_list_it) + // By default, sessions that can't be identified as group or ad-hoc will be considered P2P (i.e. 1 on 1) + mConvType = CONV_SESSION_1_ON_1; + if (im_session->isAdHocSessionType()) { - LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*> (list->getItemByValue(*moderator_list_it)); - if ( item ) - { - std::string name = item->getAvatarName(); - std::string tooltip = item->getAvatarToolTip(); - size_t found = name.find(moderator_indicator); - if (found != std::string::npos) - { - name.erase(found, moderator_indicator_len); - item->setAvatarName(name); - } - found = tooltip.find(moderator_indicator); - if (found != tooltip.npos) - { - tooltip.erase(found, moderator_indicator_len); - item->setAvatarToolTip(tooltip); - } - } - } - - mModeratorToRemoveList.clear(); - - // Add moderators indicator - moderator_list_it = mModeratorList.begin(); - moderator_list_end = mModeratorList.end(); - for (;moderator_list_it != moderator_list_end; ++moderator_list_it) - { - LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*> (list->getItemByValue(*moderator_list_it)); - if ( item ) - { - std::string name = item->getAvatarName(); - std::string tooltip = item->getAvatarToolTip(); - size_t found = name.find(moderator_indicator); - if (found == std::string::npos) - { - name += " "; - name += moderator_indicator; - item->setAvatarName(name); - } - found = tooltip.find(moderator_indicator); - if (found == std::string::npos) - { - tooltip += " "; - tooltip += moderator_indicator; - item->setAvatarToolTip(tooltip); - } - } + mConvType = CONV_SESSION_AD_HOC; } - - // update voice mute state of all items. See EXT-7235 - LLSpeakerMgr::speaker_list_t speaker_list; - - // Use also participants which are not in voice session now (the second arg is TRUE). - // They can already have mModeratorMutedVoice set from the previous voice session - // and LLSpeakerVoiceModerationEvent will not be sent when speaker manager is updated next time. - mSpeakerMgr->getSpeakerList(&speaker_list, TRUE); - for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) + else if (im_session->isGroupSessionType()) { - const LLPointer<LLSpeaker>& speakerp = *it; - - if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY) - { - update_speaker_indicator(list, speakerp->mID, speakerp->mModeratorMutedVoice); - } + mConvType = CONV_SESSION_GROUP; } } + else + { + // That's the only session that doesn't get listed in the LLIMModel as a session... + mConvType = CONV_SESSION_NEARBY; + } +} + +LLParticipantList::~LLParticipantList() +{ + delete mAvalineUpdater; } /* @@ -411,31 +258,11 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) */ void LLParticipantList::onAvalineCallerFound(const LLUUID& participant_id) { - LLPanel* item = mAvatarList->getItemByValue(participant_id); - - if (NULL == item) + LLConversationItemParticipant* participant = findParticipant(participant_id); + if (participant) { - LL_WARNS("Avaline") << "Something wrong. Unable to find item for: " << participant_id << LL_ENDL; - return; + removeParticipant(participant); } - - if (typeid(*item) == typeid(LLAvalineListItem)) - { - LL_DEBUGS("Avaline") << "Avaline caller has already correct class type for: " << participant_id << LL_ENDL; - // item representing an Avaline caller has a correct type already. - return; - } - - LL_DEBUGS("Avaline") << "remove item from the list and re-add it: " << participant_id << LL_ENDL; - - // remove UUID from LLAvatarList::mIDs to be able add it again. - uuid_vec_t& ids = mAvatarList->getIDs(); - uuid_vec_t::iterator pos = std::find(ids.begin(), ids.end(), participant_id); - ids.erase(pos); - - // remove item directly - mAvatarList->removeItem(item); - // re-add avaline caller with a correct class instance. addAvatarIDExceptAgent(participant_id); } @@ -447,23 +274,6 @@ void LLParticipantList::onAvalineCallerRemoved(const LLUUID& participant_id) mSpeakerMgr->removeAvalineSpeaker(participant_id); } -void LLParticipantList::setSortOrder(EParticipantSortOrder order) -{ - const U32 speaker_sort_order = gSavedSettings.getU32("SpeakerParticipantDefaultOrder"); - - if ( speaker_sort_order != order ) - { - gSavedSettings.setU32("SpeakerParticipantDefaultOrder", (U32)order); - sort(); - } -} - -const LLParticipantList::EParticipantSortOrder LLParticipantList::getSortOrder() const -{ - const U32 speaker_sort_order = gSavedSettings.getU32("SpeakerParticipantDefaultOrder"); - return EParticipantSortOrder(speaker_sort_order); -} - void LLParticipantList::setValidateSpeakerCallback(validate_speaker_callback_t cb) { mValidateSpeakerCallback = cb; @@ -472,19 +282,6 @@ void LLParticipantList::setValidateSpeakerCallback(validate_speaker_callback_t c void LLParticipantList::update() { mSpeakerMgr->update(true); - - if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder() && !isHovered()) - { - // Resort avatar list - sort(); - } -} - -bool LLParticipantList::isHovered() -{ - S32 x, y; - LLUI::getMousePositionScreen(&x, &y); - return mAvatarList->calcScreenRect().pointInRect(x, y); } bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) @@ -497,27 +294,34 @@ bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, co } addAvatarIDExceptAgent(uu_id); - sort(); return true; } bool LLParticipantList::onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { - uuid_vec_t& group_members = mAvatarList->getIDs(); - uuid_vec_t::iterator pos = std::find(group_members.begin(), group_members.end(), event->getValue().asUUID()); - if(pos != group_members.end()) - { - group_members.erase(pos); - mAvatarList->setDirty(); - } + LLUUID avatar_id = event->getValue().asUUID(); + removeParticipant(avatar_id); return true; } bool LLParticipantList::onClearListEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { - uuid_vec_t& group_members = mAvatarList->getIDs(); - group_members.clear(); - mAvatarList->setDirty(); + clearParticipants(); + return true; +} + +bool LLParticipantList::onSpeakerUpdateEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +{ + const LLSD& evt_data = event->getValue(); + if ( evt_data.has("id") ) + { + LLUUID participant_id = evt_data["id"]; + LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance(); + if (im_box) + { + im_box->setTimeNow(mUUID,participant_id); + } + } return true; } @@ -541,9 +345,7 @@ bool LLParticipantList::onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> e mModeratorList.erase(id); } } - - // apply changes immediately - onAvatarListRefreshed(mAvatarList, LLSD()); + // *TODO : do we have to fire an event so that LLFloaterIMSessionTab::refreshConversation() gets called } } return true; @@ -557,60 +359,45 @@ bool LLParticipantList::onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event // update UI on confirmation of moderator mutes if (event->getValue().asString() == "voice") { - update_speaker_indicator(mAvatarList, speakerp->mID, speakerp->mModeratorMutedVoice); + setParticipantIsMuted(speakerp->mID, speakerp->mModeratorMutedVoice); } return true; } -void LLParticipantList::sort() +void LLParticipantList::addAvatarIDExceptAgent(const LLUUID& avatar_id) { - if ( !mAvatarList ) - return; - - switch ( getSortOrder() ) + // Do not add if already in there, is the session id (hence not an avatar) or excluded for some reason + if (findParticipant(avatar_id) || (avatar_id == mUUID)) { - case E_SORT_BY_NAME : - // if mExcludeAgent == true , then no need to keep agent on top of the list - if(mExcludeAgent) - { - mAvatarList->sortByName(); - } - else - { - mAvatarList->setComparator(&AGENT_ON_TOP_NAME_COMPARATOR); - mAvatarList->sort(); - } - break; - case E_SORT_BY_RECENT_SPEAKERS: - if (mSortByRecentSpeakers.isNull()) - mSortByRecentSpeakers = new LLAvatarItemRecentSpeakerComparator(*this); - mAvatarList->setComparator(mSortByRecentSpeakers.get()); - mAvatarList->sort(); - break; - default : - llwarns << "Unrecognized sort order for " << mAvatarList->getName() << llendl; - return; + return; } -} - -void LLParticipantList::addAvatarIDExceptAgent(const LLUUID& avatar_id) -{ - if (mExcludeAgent && gAgent.getID() == avatar_id) return; - if (mAvatarList->contains(avatar_id)) return; bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(avatar_id); + LLConversationItemParticipant* participant = NULL; + if (is_avatar) { - mAvatarList->getIDs().push_back(avatar_id); - mAvatarList->setDirty(); + // Create a participant view model instance + LLAvatarName avatar_name; + bool has_name = LLAvatarNameCache::get(avatar_id, &avatar_name); + participant = new LLConversationItemParticipant(!has_name ? LLTrans::getString("AvatarNameWaiting") : avatar_name.getDisplayName() , avatar_id, mRootViewModel); + participant->fetchAvatarName(); } else { std::string display_name = LLVoiceClient::getInstance()->getDisplayName(avatar_id); - mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), display_name.empty() ? LLTrans::getString("AvatarNameWaiting") : display_name); + // Create a participant view model instance + participant = new LLConversationItemParticipant(display_name.empty() ? LLTrans::getString("AvatarNameWaiting") : display_name, avatar_id, mRootViewModel); mAvalineUpdater->watchAvalineCaller(avatar_id); } + + // *TODO : Need to update the online/offline status of the participant + // Hack for this: LLAvatarTracker::instance().isBuddyOnline(avatar_id)) + + // Add the participant model to the session's children list + addParticipant(participant); + adjustParticipant(avatar_id); } @@ -629,12 +416,12 @@ void LLParticipantList::adjustParticipant(const LLUUID& speaker_id) bool LLParticipantList::SpeakerAddListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { /** - * We need to filter speaking objects. These objects shouldn't appear in the list + * We need to filter speaking objects. These objects shouldn't appear in the list. * @see LLFloaterChat::addChat() in llviewermessage.cpp to get detailed call hierarchy */ const LLUUID& speaker_id = event->getValue().asUUID(); LLPointer<LLSpeaker> speaker = mParent.mSpeakerMgr->findSpeaker(speaker_id); - if(speaker.isNull() || speaker->mType == LLSpeaker::SPEAKER_OBJECT) + if (speaker.isNull() || (speaker->mType == LLSpeaker::SPEAKER_OBJECT)) { return false; } @@ -658,6 +445,14 @@ bool LLParticipantList::SpeakerClearListener::handleEvent(LLPointer<LLOldEvents: } // +// LLParticipantList::SpeakerUpdateListener +// +bool LLParticipantList::SpeakerUpdateListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +{ + return mParent.onSpeakerUpdateEvent(event, userdata); +} + +// // LLParticipantList::SpeakerModeratorListener // bool LLParticipantList::SpeakerModeratorUpdateListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) @@ -670,377 +465,4 @@ bool LLParticipantList::SpeakerMuteListener::handleEvent(LLPointer<LLOldEvents:: return mParent.onSpeakerMuteEvent(event, userdata); } -LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() -{ - // set up the callbacks for all of the avatar menu items - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; - - registrar.add("ParticipantList.Sort", boost::bind(&LLParticipantList::LLParticipantListMenu::sortParticipantList, this, _2)); - registrar.add("ParticipantList.ToggleAllowTextChat", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleAllowTextChat, this, _2)); - registrar.add("ParticipantList.ToggleMuteText", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleMuteText, this, _2)); - - registrar.add("Avatar.Profile", boost::bind(&LLAvatarActions::showProfile, mUUIDs.front())); - registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, mUUIDs.front())); - registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs.front())); - registrar.add("Avatar.BlockUnblock", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleMuteVoice, this, _2)); - registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::share, mUUIDs.front())); - registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs.front())); - registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, mUUIDs.front())); - - registrar.add("ParticipantList.ModerateVoice", boost::bind(&LLParticipantList::LLParticipantListMenu::moderateVoice, this, _2)); - - enable_registrar.add("ParticipantList.EnableItem", boost::bind(&LLParticipantList::LLParticipantListMenu::enableContextMenuItem, this, _2)); - enable_registrar.add("ParticipantList.EnableItem.Moderate", boost::bind(&LLParticipantList::LLParticipantListMenu::enableModerateContextMenuItem, this, _2)); - enable_registrar.add("ParticipantList.CheckItem", boost::bind(&LLParticipantList::LLParticipantListMenu::checkContextMenuItem, this, _2)); - - // create the context menu from the XUI - LLContextMenu* main_menu = createFromFile("menu_participant_list.xml"); - - // Don't show sort options for P2P chat - bool is_sort_visible = (mParent.mAvatarList && mParent.mAvatarList->size() > 1); - main_menu->setItemVisible("SortByName", is_sort_visible); - main_menu->setItemVisible("SortByRecentSpeakers", is_sort_visible); - main_menu->setItemVisible("Moderator Options Separator", isGroupModerator()); - main_menu->setItemVisible("Moderator Options", isGroupModerator()); - main_menu->setItemVisible("View Icons Separator", mParent.mAvatarListToggleIconsConnection.connected()); - main_menu->setItemVisible("View Icons", mParent.mAvatarListToggleIconsConnection.connected()); - main_menu->arrangeAndClear(); - - return main_menu; -} - -void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y) -{ - if (uuids.size() == 0) return; - - LLListContextMenu::show(spawning_view, uuids, x, y); - - const LLUUID& speaker_id = mUUIDs.front(); - BOOL is_muted = isMuted(speaker_id); - - if (is_muted) - { - LLMenuGL::sMenuContainer->getChildView("ModerateVoiceMuteSelected")->setVisible( false); - } - else - { - LLMenuGL::sMenuContainer->getChildView("ModerateVoiceUnMuteSelected")->setVisible( false); - } -} - -void LLParticipantList::LLParticipantListMenu::sortParticipantList(const LLSD& userdata) -{ - std::string param = userdata.asString(); - if ("sort_by_name" == param) - { - mParent.setSortOrder(E_SORT_BY_NAME); - } - else if ("sort_by_recent_speakers" == param) - { - mParent.setSortOrder(E_SORT_BY_RECENT_SPEAKERS); - } -} - -void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& userdata) -{ - - LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr); - if (mgr) - { - const LLUUID speaker_id = mUUIDs.front(); - mgr->toggleAllowTextChat(speaker_id); - } -} - -void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata, U32 flags) -{ - const LLUUID speaker_id = mUUIDs.front(); - BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, flags); - std::string name; - - //fill in name using voice client's copy of name cache - LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(speaker_id); - if (speakerp.isNull()) - { - LL_WARNS("Speakers") << "Speaker " << speaker_id << " not found" << llendl; - return; - } - LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(mParent.mAvatarList->getItemByValue(speaker_id)); - if (NULL == item) return; - - name = item->getAvatarName(); - - 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) - { - LLMuteList::getInstance()->add(mute, flags); - } - else - { - LLMuteList::getInstance()->remove(mute, flags); - } -} - -void LLParticipantList::LLParticipantListMenu::toggleMuteText(const LLSD& userdata) -{ - toggleMute(userdata, LLMute::flagTextChat); -} - -void LLParticipantList::LLParticipantListMenu::toggleMuteVoice(const LLSD& userdata) -{ - toggleMute(userdata, LLMute::flagVoiceChat); -} - -bool LLParticipantList::LLParticipantListMenu::isGroupModerator() -{ - if (!mParent.mSpeakerMgr) - { - llwarns << "Speaker manager is missing" << llendl; - return false; - } - - // Is session a group call/chat? - if(gAgent.isInGroup(mParent.mSpeakerMgr->getSessionID())) - { - LLSpeaker* speaker = mParent.mSpeakerMgr->findSpeaker(gAgentID).get(); - - // Is agent a moderator? - return speaker && speaker->mIsModerator; - } - return false; -} - -bool LLParticipantList::LLParticipantListMenu::isMuted(const LLUUID& avatar_id) -{ - LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(avatar_id); - if (!selected_speakerp) return true; - - return selected_speakerp->mStatus == LLSpeaker::STATUS_MUTED; -} - -void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdata) -{ - if (!gAgent.getRegion()) return; - - bool moderate_selected = userdata.asString() == "selected"; - - if (moderate_selected) - { - const LLUUID& selected_avatar_id = mUUIDs.front(); - bool is_muted = isMuted(selected_avatar_id); - moderateVoiceParticipant(selected_avatar_id, is_muted); - } - else - { - bool unmute_all = userdata.asString() == "unmute_all"; - moderateVoiceAllParticipants(unmute_all); - } -} - -void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute) -{ - LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr); - if (mgr) - { - mgr->moderateVoiceParticipant(avatar_id, unmute); - } -} - -void LLParticipantList::LLParticipantListMenu::moderateVoiceAllParticipants(bool unmute) -{ - LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr); - if (mgr) - { - if (!unmute) - { - LLSD payload; - payload["session_id"] = mgr->getSessionID(); - LLNotificationsUtil::add("ConfirmMuteAll", LLSD(), payload, confirmMuteAllCallback); - return; - } - - mgr->moderateVoiceAllParticipants(unmute); - } -} - -// static -void LLParticipantList::LLParticipantListMenu::confirmMuteAllCallback(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - // if Cancel pressed - if (option == 1) - { - return; - } - - const LLSD& payload = notification["payload"]; - const LLUUID& session_id = payload["session_id"]; - - LLIMSpeakerMgr * speaker_manager = dynamic_cast<LLIMSpeakerMgr*> ( - LLIMModel::getInstance()->getSpeakerManager(session_id)); - if (speaker_manager) - { - speaker_manager->moderateVoiceAllParticipants(false); - } - - return; -} - - -bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata) -{ - std::string item = userdata.asString(); - const LLUUID& participant_id = mUUIDs.front(); - - // For now non of "can_view_profile" action and menu actions listed below except "can_block" - // can be performed for Avaline callers. - bool is_participant_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(participant_id); - if (!is_participant_avatar && "can_block" != item) return false; - - if (item == "can_mute_text" || "can_block" == item || "can_share" == item || "can_im" == item - || "can_pay" == item) - { - return mUUIDs.front() != gAgentID; - } - else if (item == std::string("can_add")) - { - // We can add friends if: - // - there are selected people - // - and there are no friends among selection yet. - - bool result = (mUUIDs.size() > 0); - - uuid_vec_t::const_iterator - id = mUUIDs.begin(), - uuids_end = mUUIDs.end(); - - for (;id != uuids_end; ++id) - { - if ( *id == gAgentID || LLAvatarActions::isFriend(*id) ) - { - result = false; - break; - } - } - return result; - } - else if (item == "can_call") - { - bool not_agent = mUUIDs.front() != gAgentID; - bool can_call = not_agent && LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); - return can_call; - } - - return true; -} - -/* - Processed menu items with such parameters: - can_allow_text_chat - can_moderate_voice -*/ -bool LLParticipantList::LLParticipantListMenu::enableModerateContextMenuItem(const LLSD& userdata) -{ - // only group moderators can perform actions related to this "enable callback" - if (!isGroupModerator()) return false; - - const LLUUID& participant_id = mUUIDs.front(); - LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(participant_id); - - // not in voice participants can not be moderated - bool speaker_in_voice = speakerp.notNull() && speakerp->isInVoiceChannel(); - - const std::string& item = userdata.asString(); - - if ("can_moderate_voice" == item) - { - return speaker_in_voice; - } - - // For now non of menu actions except "can_moderate_voice" can be performed for Avaline callers. - bool is_participant_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(participant_id); - if (!is_participant_avatar) return false; - - return true; -} - -bool LLParticipantList::LLParticipantListMenu::checkContextMenuItem(const LLSD& userdata) -{ - std::string item = userdata.asString(); - const LLUUID& id = mUUIDs.front(); - - if (item == "is_muted") - { - return LLMuteList::getInstance()->isMuted(id, LLMute::flagTextChat); - } - else if (item == "is_allowed_text_chat") - { - LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(id); - - if (selected_speakerp.notNull()) - { - return !selected_speakerp->mModeratorMutedText; - } - } - else if(item == "is_blocked") - { - return LLMuteList::getInstance()->isMuted(id, LLMute::flagVoiceChat); - } - else if(item == "is_sorted_by_name") - { - return E_SORT_BY_NAME == mParent.getSortOrder(); - } - else if(item == "is_sorted_by_recent_speakers") - { - return E_SORT_BY_RECENT_SPEAKERS == mParent.getSortOrder(); - } - - return false; -} - -bool LLParticipantList::LLAvatarItemRecentSpeakerComparator::doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const -{ - if (mParent.mSpeakerMgr) - { - LLPointer<LLSpeaker> lhs = mParent.mSpeakerMgr->findSpeaker(avatar_item1->getAvatarId()); - LLPointer<LLSpeaker> rhs = mParent.mSpeakerMgr->findSpeaker(avatar_item2->getAvatarId()); - if ( lhs.notNull() && rhs.notNull() ) - { - // Compare by last speaking time - if( lhs->mLastSpokeTime != rhs->mLastSpokeTime ) - return ( lhs->mLastSpokeTime > rhs->mLastSpokeTime ); - else if ( lhs->mSortIndex != rhs->mSortIndex ) - return ( lhs->mSortIndex < rhs->mSortIndex ); - } - else if ( lhs.notNull() ) - { - // True if only avatar_item1 speaker info available - return true; - } - else if ( rhs.notNull() ) - { - // False if only avatar_item2 speaker info available - return false; - } - } - // By default compare by name. - return LLAvatarItemNameComparator::doCompare(avatar_item1, avatar_item2); -} - //EOF diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 53966c15fe..3a3ae76604 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -1,6 +1,6 @@ /** * @file llparticipantlist.h - * @brief LLParticipantList intended to update view(LLAvatarList) according to incoming messages + * @brief LLParticipantList : model of a conversation session with added speaker events handling * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code @@ -28,35 +28,21 @@ #define LL_PARTICIPANTLIST_H #include "llviewerprecompiledheaders.h" -#include "llevent.h" -#include "llavatarlist.h" // for LLAvatarItemRecentSpeakerComparator -#include "lllistcontextmenu.h" +#include "llconversationmodel.h" class LLSpeakerMgr; -class LLAvatarList; class LLUICtrl; class LLAvalineUpdater; -class LLParticipantList +class LLParticipantList : public LLConversationItemSession { LOG_CLASS(LLParticipantList); public: typedef boost::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t; - LLParticipantList(LLSpeakerMgr* data_source, - LLAvatarList* avatar_list, - bool use_context_menu = true, - bool exclude_agent = true, - bool can_toggle_icons = true); + LLParticipantList(LLSpeakerMgr* data_source, LLFolderViewModelInterface& root_view_model); ~LLParticipantList(); - void setSpeakingIndicatorsVisible(BOOL visible); - - enum EParticipantSortOrder - { - E_SORT_BY_NAME = 0, - E_SORT_BY_RECENT_SPEAKERS = 1, - }; /** * Adds specified avatar ID to the existing list if it is not Agent's ID @@ -66,12 +52,6 @@ public: void addAvatarIDExceptAgent(const LLUUID& avatar_id); /** - * Set and sort Avatarlist by given order - */ - void setSortOrder(EParticipantSortOrder order = E_SORT_BY_NAME); - const EParticipantSortOrder getSortOrder() const; - - /** * Refreshes the participant list. */ void update(); @@ -93,14 +73,10 @@ protected: bool onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); bool onClearListEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); bool onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); + bool onSpeakerUpdateEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); bool onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); /** - * Sorts the Avatarlist by stored order - */ - void sort(); - - /** * List of listeners implementing LLOldEvents::LLSimpleListener. * There is no way to handle all the events in one listener as LLSpeakerMgr registers * listeners in such a way that one listener can handle only one type of event @@ -134,6 +110,13 @@ protected: /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); }; + class SpeakerUpdateListener : public BaseSpeakerListener + { + public: + SpeakerUpdateListener(LLParticipantList& parent) : BaseSpeakerListener(parent) {} + /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); + }; + class SpeakerModeratorUpdateListener : public BaseSpeakerListener { public: @@ -149,98 +132,7 @@ protected: /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); }; - /** - * Menu used in the participant list. - */ - class LLParticipantListMenu : public LLListContextMenu - { - public: - LLParticipantListMenu(LLParticipantList& parent):mParent(parent){}; - /*virtual*/ LLContextMenu* createMenu(); - /*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y); - protected: - LLParticipantList& mParent; - private: - bool enableContextMenuItem(const LLSD& userdata); - bool enableModerateContextMenuItem(const LLSD& userdata); - bool checkContextMenuItem(const LLSD& userdata); - - void sortParticipantList(const LLSD& userdata); - void toggleAllowTextChat(const LLSD& userdata); - void toggleMute(const LLSD& userdata, U32 flags); - void toggleMuteText(const LLSD& userdata); - void toggleMuteVoice(const LLSD& userdata); - - /** - * Return true if Agent is group moderator(and moderator of group call). - */ - bool isGroupModerator(); - - // Voice moderation support - /** - * Check whether specified by argument avatar is muted for group chat or not. - */ - bool isMuted(const LLUUID& avatar_id); - - /** - * Processes Voice moderation menu items. - * - * It calls either moderateVoiceParticipant() or moderateVoiceParticipant() depend on - * passed parameter. - * - * @param userdata can be "selected" or "others". - * - * @see moderateVoiceParticipant() - * @see moderateVoiceAllParticipants() - */ - void moderateVoice(const LLSD& userdata); - - /** - * Mutes/Unmutes avatar for current group voice chat. - * - * It only marks avatar as muted for session and does not use local Agent's Block list. - * It does not mute Agent itself. - * - * @param[in] avatar_id UUID of avatar to be processed - * @param[in] unmute if true - specified avatar will be muted, otherwise - unmuted. - * - * @see moderateVoiceAllParticipants() - */ - void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); - - /** - * Mutes/Unmutes all avatars for current group voice chat. - * - * It only marks avatars as muted for session and does not use local Agent's Block list. - * - * @param[in] unmute if true - avatars will be muted, otherwise - unmuted. - * - * @see moderateVoiceParticipant() - */ - void moderateVoiceAllParticipants(bool unmute); - - static void confirmMuteAllCallback(const LLSD& notification, const LLSD& response); - }; - - /** - * Comparator for comparing avatar items by last spoken time - */ - class LLAvatarItemRecentSpeakerComparator : public LLAvatarItemNameComparator, public LLRefCount - { - LOG_CLASS(LLAvatarItemRecentSpeakerComparator); - public: - LLAvatarItemRecentSpeakerComparator(LLParticipantList& parent):mParent(parent){}; - virtual ~LLAvatarItemRecentSpeakerComparator() {}; - protected: - virtual bool doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const; - private: - LLParticipantList& mParent; - }; - private: - void onAvatarListDoubleClicked(LLUICtrl* ctrl); - void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param); - void onAvalineCallerFound(const LLUUID& participant_id); void onAvalineCallerRemoved(const LLUUID& participant_id); @@ -251,10 +143,7 @@ private: */ void adjustParticipant(const LLUUID& speaker_id); - bool isHovered(); - LLSpeakerMgr* mSpeakerMgr; - LLAvatarList* mAvatarList; std::set<LLUUID> mModeratorList; std::set<LLUUID> mModeratorToRemoveList; @@ -262,25 +151,10 @@ private: LLPointer<SpeakerAddListener> mSpeakerAddListener; LLPointer<SpeakerRemoveListener> mSpeakerRemoveListener; LLPointer<SpeakerClearListener> mSpeakerClearListener; + LLPointer<SpeakerUpdateListener> mSpeakerUpdateListener; LLPointer<SpeakerModeratorUpdateListener> mSpeakerModeratorListener; LLPointer<SpeakerMuteListener> mSpeakerMuteListener; - LLParticipantListMenu* mParticipantListMenu; - - /** - * This field manages an adding a new avatar_id in the mAvatarList - * If true, then agent_id wont be added into mAvatarList - * Also by default this field is controlling a sort procedure, @c sort() - */ - bool mExcludeAgent; - - // boost::connections - boost::signals2::connection mAvatarListDoubleClickConnection; - boost::signals2::connection mAvatarListRefreshConnection; - boost::signals2::connection mAvatarListReturnConnection; - boost::signals2::connection mAvatarListToggleIconsConnection; - - LLPointer<LLAvatarItemRecentSpeakerComparator> mSortByRecentSpeakers; validate_speaker_callback_t mValidateSpeakerCallback; LLAvalineUpdater* mAvalineUpdater; }; diff --git a/indra/newview/llpathfindingobject.cpp b/indra/newview/llpathfindingobject.cpp index 858d3203c0..900763eae4 100644 --- a/indra/newview/llpathfindingobject.cpp +++ b/indra/newview/llpathfindingobject.cpp @@ -173,6 +173,7 @@ void LLPathfindingObject::fetchOwnerName() mHasOwnerName = LLAvatarNameCache::get(mOwnerUUID, &mOwnerName); if (!mHasOwnerName) { + disconnectAvatarNameCacheConnection(); mAvatarNameCacheConnection = LLAvatarNameCache::get(mOwnerUUID, boost::bind(&LLPathfindingObject::handleAvatarNameFetch, this, _1, _2)); } } diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp new file mode 100644 index 0000000000..11c12e6c10 --- /dev/null +++ b/indra/newview/llpersistentnotificationstorage.cpp @@ -0,0 +1,145 @@ +/** +* @file llpersistentnotificationstorage.cpp +* @brief Implementation of llpersistentnotificationstorage +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + + +#include "llviewerprecompiledheaders.h" + +#include "llpersistentnotificationstorage.h" + +#include "llchannelmanager.h" +#include "llnotificationstorage.h" +#include "llscreenchannel.h" +#include "llscriptfloater.h" +#include "llviewermessage.h" + +LLPersistentNotificationStorage::LLPersistentNotificationStorage() + : LLSingleton<LLPersistentNotificationStorage>() + , LLNotificationStorage(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "open_notifications.xml")) +{ +} + +LLPersistentNotificationStorage::~LLPersistentNotificationStorage() +{ +} + +static LLFastTimer::DeclareTimer FTM_SAVE_NOTIFICATIONS("Save Notifications"); + +void LLPersistentNotificationStorage::saveNotifications() +{ + LLFastTimer _(FTM_SAVE_NOTIFICATIONS); + + boost::intrusive_ptr<LLPersistentNotificationChannel> history_channel = boost::dynamic_pointer_cast<LLPersistentNotificationChannel>(LLNotifications::instance().getChannel("Persistent")); + if (!history_channel) + { + return; + } + + LLSD output = LLSD::emptyMap(); + LLSD& data = output["data"]; + + for ( std::vector<LLNotificationPtr>::iterator it = history_channel->beginHistory(), end_it = history_channel->endHistory(); + it != 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(true)); + } + + writeNotifications(output); +} + +static LLFastTimer::DeclareTimer FTM_LOAD_NOTIFICATIONS("Load Notifications"); + +void LLPersistentNotificationStorage::loadNotifications() +{ + LLFastTimer _(FTM_LOAD_NOTIFICATIONS); + + LLNotifications::instance().getChannel("Persistent")-> + connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1)); + + LLSD input; + if (!readNotifications(input) ||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(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()); + } + } +} + +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; +} + +// EOF diff --git a/indra/newview/llpersistentnotificationstorage.h b/indra/newview/llpersistentnotificationstorage.h new file mode 100644 index 0000000000..98a825d2c1 --- /dev/null +++ b/indra/newview/llpersistentnotificationstorage.h @@ -0,0 +1,63 @@ +/** +* @file llpersistentnotificationstorage.h +* @brief Header file for llpersistentnotificationstorage +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ +#ifndef LL_LLPERSISTENTNOTIFICATIONSTORAGE_H +#define LL_LLPERSISTENTNOTIFICATIONSTORAGE_H + +#include "llerror.h" +#include "llnotificationstorage.h" +#include "llsingleton.h" + +class LLSD; + +// 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 llpersistentnotificationstorage.cpp). + +class LLPersistentNotificationStorage : public LLSingleton<LLPersistentNotificationStorage>, public LLNotificationStorage +{ + LOG_CLASS(LLPersistentNotificationStorage); +public: + LLPersistentNotificationStorage(); + ~LLPersistentNotificationStorage(); + + void saveNotifications(); + void loadNotifications(); + +protected: + +private: + bool onPersistentChannelChanged(const LLSD& payload); +}; + +#endif // LL_LLPERSISTENTNOTIFICATIONSTORAGE_H + diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index e124916c48..cb6989c9dd 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -67,6 +67,19 @@ inline F64 llsgn(const F64 a) class LLPhysicsMotion { public: + typedef enum + { + SMOOTHING = 0, + MASS, + GRAVITY, + SPRING, + GAIN, + DAMPING, + DRAG, + MAX_EFFECT, + NUM_PARAMS + } eParamName; + /* param_driver_name: The param that controls the params that are being affected by the physics. joint_name: The joint that the body part is attached to. The joint is @@ -98,6 +111,11 @@ public: mPositionLastUpdate_local(0) { mJointState = new LLJointState; + + for (U32 i = 0; i < NUM_PARAMS; ++i) + { + mParamCache[i] = NULL; + } } BOOL initialize(); @@ -111,16 +129,43 @@ public: return mJointState; } protected: - F32 getParamValue(const std::string& controller_key) - { - const controller_map_t::const_iterator& entry = mParamControllers.find(controller_key); + + F32 getParamValue(eParamName param) + { + static std::string controller_key[] = + { + "Smoothing", + "Mass", + "Gravity", + "Spring", + "Gain", + "Damping", + "Drag", + "MaxEffect" + }; + + if (!mParamCache[param]) + { + const controller_map_t::const_iterator& entry = mParamControllers.find(controller_key[param]); if (entry == mParamControllers.end()) { - return sDefaultController[controller_key]; + return sDefaultController[controller_key[param]]; } const std::string& param_name = (*entry).second.c_str(); - return mCharacter->getVisualParamWeight(param_name.c_str()); - } + mParamCache[param] = mCharacter->getVisualParam(param_name.c_str()); + } + + if (mParamCache[param]) + { + return mParamCache[param]->getWeight(); + } + else + { + return sDefaultController[controller_key[param]]; + } + } + + void setParamValue(LLViewerVisualParam *param, const F32 new_value_local, F32 behavior_maxeffect); @@ -150,6 +195,8 @@ private: F32 mLastTime; + LLVisualParam* mParamCache[NUM_PARAMS]; + static default_controller_map_t sDefaultController; }; @@ -427,7 +474,6 @@ BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) return TRUE; } - // Return TRUE if character has to update visual params. BOOL LLPhysicsMotion::onUpdate(F32 time) { @@ -471,15 +517,16 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) LLJoint *joint = mJointState->getJoint(); - const F32 behavior_mass = getParamValue("Mass"); - const F32 behavior_gravity = getParamValue("Gravity"); - const F32 behavior_spring = getParamValue("Spring"); - const F32 behavior_gain = getParamValue("Gain"); - const F32 behavior_damping = getParamValue("Damping"); - const F32 behavior_drag = getParamValue("Drag"); - const BOOL physics_test = FALSE; // Enable this to simulate bouncing on all parts. + const F32 behavior_mass = getParamValue(MASS); + const F32 behavior_gravity = getParamValue(GRAVITY); + const F32 behavior_spring = getParamValue(SPRING); + const F32 behavior_gain = getParamValue(GAIN); + const F32 behavior_damping = getParamValue(DAMPING); + const F32 behavior_drag = getParamValue(DRAG); + F32 behavior_maxeffect = getParamValue(MAX_EFFECT); + + const BOOL physics_test = FALSE; // Enable this to simulate bouncing on all parts. - F32 behavior_maxeffect = getParamValue("MaxEffect"); if (physics_test) behavior_maxeffect = 1.0f; diff --git a/indra/newview/llplacesfolderview.cpp b/indra/newview/llplacesfolderview.cpp new file mode 100644 index 0000000000..3caa93ae71 --- /dev/null +++ b/indra/newview/llplacesfolderview.cpp @@ -0,0 +1,74 @@ +/** +* @file llplacesfolderview.cpp +* @brief llplacesfolderview used within llplacesinventorypanel +* @author Gilbert@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + +#include "llviewerprecompiledheaders.h" + +#include "llplacesfolderview.h" + +#include "llplacesinventorypanel.h" +#include "llpanellandmarks.h" + +LLPlacesFolderView::LLPlacesFolderView(const LLFolderView::Params& p) + : LLFolderView(p) +{ + // we do not need auto select functionality in places landmarks, so override default behavior. + // this disables applying of the LLSelectFirstFilteredItem in LLFolderView::doIdle. + // Fixed issues: EXT-1631, EXT-4994. + mAutoSelectOverride = TRUE; +} + +BOOL LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + // let children to change selection first + childrenHandleRightMouseDown(x, y, mask); + mParentLandmarksPanel->setCurrentSelectedList((LLPlacesInventoryPanel*)getParentPanel()); + + // then determine its type and set necessary menu handle + if (getCurSelectedItem()) + { + LLInventoryType::EType inventory_type = static_cast<LLFolderViewModelItemInventory*>(getCurSelectedItem()->getViewModelItem())->getInventoryType(); + inventory_type_menu_handle_t::iterator it_handle = mMenuHandlesByInventoryType.find(inventory_type); + + if (it_handle != mMenuHandlesByInventoryType.end()) + { + mPopupMenuHandle = (*it_handle).second; + } + else + { + llwarns << "Requested menu handle for non-setup inventory type: " << inventory_type << llendl; + } + + } + + return LLFolderView::handleRightMouseDown(x, y, mask); +} + +void LLPlacesFolderView::setupMenuHandle(LLInventoryType::EType asset_type, LLHandle<LLView> menu_handle) +{ + mMenuHandlesByInventoryType[asset_type] = menu_handle; +} + diff --git a/indra/newview/llplacesfolderview.h b/indra/newview/llplacesfolderview.h new file mode 100644 index 0000000000..8c5be39b5e --- /dev/null +++ b/indra/newview/llplacesfolderview.h @@ -0,0 +1,72 @@ +/** +* @file llplacesfolderview.h +* @brief llplacesfolderview used within llplacesinventorypanel +* @author Gilbert@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ +#ifndef LL_LLPLACESFOLDERVIEW_H +#define LL_LLPLACESFOLDERVIEW_H + +#include "llfolderview.h" +#include "llinventorypanel.h" + +class LLLandmarksPanel; + +class LLPlacesFolderView : public LLFolderView +{ +public: + + struct Params : public LLInitParam::Block<Params, LLFolderView::Params> + { + Params() + {} + }; + + LLPlacesFolderView(const LLFolderView::Params& p); + /** + * Handles right mouse down + * + * Contains workaround for EXT-2786: sets current selected list for landmark + * panel using @c mParentLandmarksPanel which is set in @c LLLandmarksPanel::initLandmarksPanel + */ + /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); + + void setupMenuHandle(LLInventoryType::EType asset_type, LLHandle<LLView> menu_handle); + + void setParentLandmarksPanel(LLLandmarksPanel* panel) + { + mParentLandmarksPanel = panel; + } + +private: + /** + * holds pointer to landmark panel. This pointer is used in @c LLPlacesFolderView::handleRightMouseDown + */ + LLLandmarksPanel* mParentLandmarksPanel; + typedef std::map<LLInventoryType::EType, LLHandle<LLView> > inventory_type_menu_handle_t; + inventory_type_menu_handle_t mMenuHandlesByInventoryType; + +}; + +#endif // LL_LLPLACESFOLDERVIEW_H + diff --git a/indra/newview/llplacesinventorybridge.cpp b/indra/newview/llplacesinventorybridge.cpp index fe4cc0f55f..ebd9604c5b 100644 --- a/indra/newview/llplacesinventorybridge.cpp +++ b/indra/newview/llplacesinventorybridge.cpp @@ -85,34 +85,33 @@ void LLPlacesLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) void LLPlacesFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { + std::vector<std::string> items; + std::vector<std::string> disabled_items; + + LLInventoryPanel* inv_panel = mInventoryPanel.get(); + bool is_open = false; + if (inv_panel) { - std::vector<std::string> items; - std::vector<std::string> disabled_items; + LLFolderViewFolder* folder = dynamic_cast<LLFolderViewFolder*>(inv_panel->getItemByID(mUUID)); + is_open = (NULL != folder) && folder->isOpen(); + } - LLInventoryPanel* inv_panel = mInventoryPanel.get(); - bool is_open = false; - if (inv_panel) - { - LLFolderViewFolder* folder = dynamic_cast<LLFolderViewFolder*>(inv_panel->getRootFolder()->getItemByID(mUUID)); - is_open = (NULL != folder) && folder->isOpen(); - } + // collect all items' names + fill_items_with_menu_items(items, menu); - // collect all items' names - fill_items_with_menu_items(items, menu); + // remove expand or collapse menu item depend on folder state + std::string collapse_expand_item_to_hide(is_open ? "expand" : "collapse"); + std::vector<std::string>::iterator it = std::find(items.begin(), items.end(), collapse_expand_item_to_hide); + if (it != items.end()) items.erase(it); - // remove expand or collapse menu item depend on folder state - std::string collapse_expand_item_to_hide(is_open ? "expand" : "collapse"); - std::vector<std::string>::iterator it = std::find(items.begin(), items.end(), collapse_expand_item_to_hide); - if (it != items.end()) items.erase(it); - // Disabled items are processed via LLLandmarksPanel::isActionEnabled() - // they should be synchronized with Places/My Landmarks/Gear menu. See EXT-1601 + // Disabled items are processed via LLLandmarksPanel::isActionEnabled() + // they should be synchronized with Places/My Landmarks/Gear menu. See EXT-1601 - // repeat parent functionality - sSelf = getHandle(); // necessary for "New Folder" functionality + // repeat parent functionality + sSelf = getHandle(); // necessary for "New Folder" functionality - hide_context_entries(menu, items, disabled_items); - } + hide_context_entries(menu, items, disabled_items); } //virtual @@ -140,7 +139,7 @@ LLFolderViewFolder* LLPlacesFolderBridge::getFolder() LLInventoryPanel* inv_panel = mInventoryPanel.get(); if (inv_panel) { - folder = dynamic_cast<LLFolderViewFolder*>(inv_panel->getRootFolder()->getItemByID(mUUID)); + folder = dynamic_cast<LLFolderViewFolder*>(inv_panel->getItemByID(mUUID)); } return folder; @@ -152,6 +151,7 @@ LLInvFVBridge* LLPlacesInventoryBridgeBuilder::createBridge( LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderViewModelInventory* view_model, LLFolderView* root, const LLUUID& uuid, U32 flags/* = 0x00*/) const @@ -170,11 +170,12 @@ LLInvFVBridge* LLPlacesInventoryBridgeBuilder::createBridge( if (actual_asset_type == LLAssetType::AT_LINK_FOLDER) { // *TODO: Create a link folder handler instead if it is necessary - new_listener = LLInventoryFVBridgeBuilder::createBridge( + new_listener = LLInventoryFolderViewModelBuilder::createBridge( asset_type, actual_asset_type, inv_type, inventory, + view_model, root, uuid, flags); @@ -183,11 +184,12 @@ LLInvFVBridge* LLPlacesInventoryBridgeBuilder::createBridge( new_listener = new LLPlacesFolderBridge(inv_type, inventory, root, uuid); break; default: - new_listener = LLInventoryFVBridgeBuilder::createBridge( + new_listener = LLInventoryFolderViewModelBuilder::createBridge( asset_type, actual_asset_type, inv_type, inventory, + view_model, root, uuid, flags); diff --git a/indra/newview/llplacesinventorybridge.h b/indra/newview/llplacesinventorybridge.h index 52beacef9c..07d18d03c5 100644 --- a/indra/newview/llplacesinventorybridge.h +++ b/indra/newview/llplacesinventorybridge.h @@ -82,13 +82,14 @@ protected: * * It builds Bridges for Landmarks and Folders in Places Landmarks Panel */ -class LLPlacesInventoryBridgeBuilder : public LLInventoryFVBridgeBuilder +class LLPlacesInventoryBridgeBuilder : public LLInventoryFolderViewModelBuilder { public: /*virtual*/ LLInvFVBridge* createBridge(LLAssetType::EType asset_type, LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderViewModelInventory* view_model, LLFolderView* root, const LLUUID& uuid, U32 flags = 0x00) const; diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp index f7823f4fe8..4c2213c198 100644 --- a/indra/newview/llplacesinventorypanel.cpp +++ b/indra/newview/llplacesinventorypanel.cpp @@ -30,7 +30,8 @@ #include "llplacesinventorypanel.h" -#include "llfoldervieweventlistener.h" +#include "llfolderviewmodel.h" +#include "llplacesfolderview.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" #include "llpanellandmarks.h" @@ -57,44 +58,35 @@ LLPlacesInventoryPanel::~LLPlacesInventoryPanel() delete mSavedFolderState; } -void LLPlacesInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params) -{ - // Determine the root folder in case specified, and - // build the views starting with that folder. - const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(params.start_folder); - - LLUUID root_id; - if ("LIBRARY" == params.start_folder()) - { - root_id = gInventory.getLibraryRootFolderID(); - } - else - { - root_id = (preferred_type != LLFolderType::FT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null); - } - - LLRect folder_rect(0, - 0, - getRect().getWidth(), - 0); - LLPlacesFolderView::Params p; - p.name = getName(); - p.title = getLabel(); - p.rect = folder_rect; - p.listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY, - LLAssetType::AT_CATEGORY, - LLInventoryType::IT_CATEGORY, - this, - NULL, - root_id); - p.parent_panel = this; - p.allow_multiselect = mAllowMultiSelect; - p.use_ellipses = true; // truncate inventory item text so remove horizontal scroller - mFolderRoot = (LLFolderView*)LLUICtrlFactory::create<LLPlacesFolderView>(p); +LLFolderView * LLPlacesInventoryPanel::createFolderRoot(LLUUID root_id ) +{ + LLPlacesFolderView::Params p; + + p.name = getName(); + p.title = getLabel(); + p.rect = LLRect(0, 0, getRect().getWidth(), 0); + p.parent_panel = this; + p.tool_tip = p.name; + p.listener = mInvFVBridgeBuilder->createBridge( LLAssetType::AT_CATEGORY, + LLAssetType::AT_CATEGORY, + LLInventoryType::IT_CATEGORY, + this, + &mInventoryViewModel, + NULL, + root_id); + p.view_model = &mInventoryViewModel; + p.use_label_suffix = mParams.use_label_suffix; + p.allow_multiselect = mAllowMultiSelect; + p.show_empty_message = mShowEmptyMessage; + p.show_item_link_overlays = mShowItemLinkOverlays; + p.root = NULL; + p.use_ellipses = mParams.folder_view.use_ellipses; + p.options_menu = "menu_inventory.xml"; + + return LLUICtrlFactory::create<LLPlacesFolderView>(p); } - // save current folder open state void LLPlacesInventoryPanel::saveFolderState() { @@ -128,59 +120,3 @@ S32 LLPlacesInventoryPanel::notify(const LLSD& info) } return 0; } - -/************************************************************************/ -/* PROTECTED METHODS */ -/************************************************************************/ - - - -/************************************************************************/ -/* LLPlacesFolderView implementation */ -/************************************************************************/ - -////////////////////////////////////////////////////////////////////////// -// PUBLIC METHODS -////////////////////////////////////////////////////////////////////////// - -LLPlacesFolderView::LLPlacesFolderView(const LLFolderView::Params& p) -: LLFolderView(p) -{ - // we do not need auto select functionality in places landmarks, so override default behavior. - // this disables applying of the LLSelectFirstFilteredItem in LLFolderView::doIdle. - // Fixed issues: EXT-1631, EXT-4994. - mAutoSelectOverride = TRUE; -} - -BOOL LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask) -{ - // let children to change selection first - childrenHandleRightMouseDown(x, y, mask); - mParentLandmarksPanel->setCurrentSelectedList((LLPlacesInventoryPanel*)getParentPanel()); - - // then determine its type and set necessary menu handle - if (getCurSelectedItem()) - { - LLInventoryType::EType inventory_type = getCurSelectedItem()->getListener()->getInventoryType(); - inventory_type_menu_handle_t::iterator it_handle = mMenuHandlesByInventoryType.find(inventory_type); - - if (it_handle != mMenuHandlesByInventoryType.end()) - { - mPopupMenuHandle = (*it_handle).second; - } - else - { - llwarns << "Requested menu handle for non-setup inventory type: " << inventory_type << llendl; - } - - } - - return LLFolderView::handleRightMouseDown(x, y, mask); -} - -void LLPlacesFolderView::setupMenuHandle(LLInventoryType::EType asset_type, LLHandle<LLView> menu_handle) -{ - mMenuHandlesByInventoryType[asset_type] = menu_handle; -} - -// EOF diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h index f647e7f970..2805fc4257 100644 --- a/indra/newview/llplacesinventorypanel.h +++ b/indra/newview/llplacesinventorypanel.h @@ -29,9 +29,9 @@ #include "llfloaterinventory.h" #include "llinventorypanel.h" -#include "llfolderview.h" class LLLandmarksPanel; +class LLFolderView; class LLPlacesInventoryPanel : public LLInventoryPanel { @@ -46,8 +46,7 @@ public: LLPlacesInventoryPanel(const Params& p); ~LLPlacesInventoryPanel(); - /*virtual*/ void buildFolderView(const LLInventoryPanel::Params& params); - + LLFolderView * createFolderRoot(LLUUID root_id ); void saveFolderState(); void restoreFolderState(); @@ -57,36 +56,4 @@ private: LLSaveFolderState* mSavedFolderState; }; - -class LLPlacesFolderView : public LLFolderView -{ -public: - LLPlacesFolderView(const LLFolderView::Params& p); - /** - * Handles right mouse down - * - * Contains workaround for EXT-2786: sets current selected list for landmark - * panel using @c mParentLandmarksPanel which is set in @c LLLandmarksPanel::initLandmarksPanel - */ - /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); - - void setupMenuHandle(LLInventoryType::EType asset_type, LLHandle<LLView> menu_handle); - - void setParentLandmarksPanel(LLLandmarksPanel* panel) - { - mParentLandmarksPanel = panel; - } - - S32 getSelectedCount() { return (S32)mSelectedItems.size(); } - -private: - /** - * holds pointer to landmark panel. This pointer is used in @c LLPlacesFolderView::handleRightMouseDown - */ - LLLandmarksPanel* mParentLandmarksPanel; - typedef std::map<LLInventoryType::EType, LLHandle<LLView> > inventory_type_menu_handle_t; - inventory_type_menu_handle_t mMenuHandlesByInventoryType; - -}; - #endif //LL_LLINVENTORYSUBTREEPANEL_H diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp index 450f9b2be7..5f5258bbce 100644 --- a/indra/newview/llpolymesh.cpp +++ b/indra/newview/llpolymesh.cpp @@ -129,22 +129,22 @@ void LLPolyMeshSharedData::freeMeshData() { mNumVertices = 0; - delete [] mBaseCoords; + ll_aligned_free_16(mBaseCoords); mBaseCoords = NULL; - delete [] mBaseNormals; + ll_aligned_free_16(mBaseNormals); mBaseNormals = NULL; - delete [] mBaseBinormals; + ll_aligned_free_16(mBaseBinormals); mBaseBinormals = NULL; - delete [] mTexCoords; + ll_aligned_free_16(mTexCoords); mTexCoords = NULL; - delete [] mDetailTexCoords; + ll_aligned_free_16(mDetailTexCoords); mDetailTexCoords = NULL; - delete [] mWeights; + ll_aligned_free_16(mWeights); mWeights = NULL; } @@ -229,15 +229,19 @@ U32 LLPolyMeshSharedData::getNumKB() BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices ) { U32 i; - mBaseCoords = new LLVector3[ numVertices ]; - mBaseNormals = new LLVector3[ numVertices ]; - mBaseBinormals = new LLVector3[ numVertices ]; - mTexCoords = new LLVector2[ numVertices ]; - mDetailTexCoords = new LLVector2[ numVertices ]; - mWeights = new F32[ numVertices ]; + mBaseCoords = (LLVector4a*) ll_aligned_malloc_16(numVertices*sizeof(LLVector4a)); + mBaseNormals = (LLVector4a*) ll_aligned_malloc_16(numVertices*sizeof(LLVector4a)); + mBaseBinormals = (LLVector4a*) ll_aligned_malloc_16(numVertices*sizeof(LLVector4a)); + mTexCoords = (LLVector2*) ll_aligned_malloc_16(numVertices*sizeof(LLVector2)); + mDetailTexCoords = (LLVector2*) ll_aligned_malloc_16(numVertices*sizeof(LLVector2)); + mWeights = (F32*) ll_aligned_malloc_16(numVertices*sizeof(F32)); for (i = 0; i < numVertices; i++) { - mWeights[i] = 0.f; + mBaseCoords[i].clear(); + mBaseNormals[i].clear(); + mBaseBinormals[i].clear(); + mTexCoords[i].clear(); + mWeights[i] = 0.f; } mNumVertices = numVertices; return TRUE; @@ -408,39 +412,47 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) allocateVertexData( numVertices ); - //---------------------------------------------------------------- - // Coords - //---------------------------------------------------------------- - numRead = fread(mBaseCoords, 3*sizeof(float), numVertices, fp); - llendianswizzle(mBaseCoords, sizeof(float), 3*numVertices); - if (numRead != numVertices) - { - llerrs << "can't read Coordinates from " << fileName << llendl; - return FALSE; - } - - //---------------------------------------------------------------- - // Normals - //---------------------------------------------------------------- - numRead = fread(mBaseNormals, 3*sizeof(float), numVertices, fp); - llendianswizzle(mBaseNormals, sizeof(float), 3*numVertices); - if (numRead != numVertices) - { - llerrs << " can't read Normals from " << fileName << llendl; - return FALSE; - } - - //---------------------------------------------------------------- - // Binormals - //---------------------------------------------------------------- - numRead = fread(mBaseBinormals, 3*sizeof(float), numVertices, fp); - llendianswizzle(mBaseBinormals, sizeof(float), 3*numVertices); - if (numRead != numVertices) - { - llerrs << " can't read Binormals from " << fileName << llendl; - return FALSE; - } - + for (U16 i = 0; i < numVertices; ++i) + { + //---------------------------------------------------------------- + // Coords + //---------------------------------------------------------------- + numRead = fread(&mBaseCoords[i], sizeof(float), 3, fp); + llendianswizzle(&mBaseCoords[i], sizeof(float), 3); + if (numRead != 3) + { + llerrs << "can't read Coordinates from " << fileName << llendl; + return FALSE; + } + } + + for (U16 i = 0; i < numVertices; ++i) + { + //---------------------------------------------------------------- + // Normals + //---------------------------------------------------------------- + numRead = fread(&mBaseNormals[i], sizeof(float), 3, fp); + llendianswizzle(&mBaseNormals[i], sizeof(float), 3); + if (numRead != 3) + { + llerrs << " can't read Normals from " << fileName << llendl; + return FALSE; + } + } + + for (U16 i = 0; i < numVertices; ++i) + { + //---------------------------------------------------------------- + // Binormals + //---------------------------------------------------------------- + numRead = fread(&mBaseBinormals[i], sizeof(float), 3, fp); + llendianswizzle(&mBaseBinormals[i], sizeof(float), 3); + if (numRead != 3) + { + llerrs << " can't read Binormals from " << fileName << llendl; + return FALSE; + } + } //---------------------------------------------------------------- // TexCoords @@ -738,8 +750,6 @@ const LLVector2 &LLPolyMeshSharedData::getUVs(U32 index) //----------------------------------------------------------------------------- LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh) { - LLMemType mt(LLMemType::MTYPE_AVATAR_MESH); - llassert(shared_data); mSharedData = shared_data; @@ -767,21 +777,28 @@ LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_ { // Allocate memory without initializing every vector // NOTE: This makes asusmptions about the size of LLVector[234] - int nverts = mSharedData->mNumVertices; - int nfloats = nverts * (2*4 + 3*3 + 2 + 4); + S32 nverts = mSharedData->mNumVertices; + //make sure it's an even number of verts for alignment + nverts += nverts%2; + S32 nfloats = nverts * ( + 4 + //coords + 4 + //normals + 4 + //weights + 2 + //coords + 4 + //scaled normals + 4 + //binormals + 4); //scaled binormals + //use 16 byte aligned vertex data to make LLPolyMesh SSE friendly mVertexData = (F32*) ll_aligned_malloc_16(nfloats*4); - int offset = 0; - mCoords = (LLVector4*)(mVertexData + offset); offset += 4*nverts; - mNormals = (LLVector4*)(mVertexData + offset); offset += 4*nverts; - mClothingWeights = (LLVector4*)(mVertexData + offset); offset += 4*nverts; - mTexCoords = (LLVector2*)(mVertexData + offset); offset += 2*nverts; - - // these members don't need to be 16-byte aligned, but the first one might be - // read during an aligned memcpy of mTexCoords - mScaledNormals = (LLVector3*)(mVertexData + offset); offset += 3*nverts; - mBinormals = (LLVector3*)(mVertexData + offset); offset += 3*nverts; - mScaledBinormals = (LLVector3*)(mVertexData + offset); offset += 3*nverts; + S32 offset = 0; + mCoords = (LLVector4a*)(mVertexData + offset); offset += 4*nverts; + mNormals = (LLVector4a*)(mVertexData + offset); offset += 4*nverts; + mClothingWeights = (LLVector4a*)(mVertexData + offset); offset += 4*nverts; + mTexCoords = (LLVector2*)(mVertexData + offset); offset += 2*nverts; + mScaledNormals = (LLVector4a*)(mVertexData + offset); offset += 4*nverts; + mBinormals = (LLVector4a*)(mVertexData + offset); offset += 4*nverts; + mScaledBinormals = (LLVector4a*)(mVertexData + offset); offset += 4*nverts; initializeForMorph(); } } @@ -906,7 +923,7 @@ void LLPolyMesh::dumpDiagInfo() //----------------------------------------------------------------------------- // getWritableCoords() //----------------------------------------------------------------------------- -LLVector4 *LLPolyMesh::getWritableCoords() +LLVector4a *LLPolyMesh::getWritableCoords() { return mCoords; } @@ -914,7 +931,7 @@ LLVector4 *LLPolyMesh::getWritableCoords() //----------------------------------------------------------------------------- // getWritableNormals() //----------------------------------------------------------------------------- -LLVector4 *LLPolyMesh::getWritableNormals() +LLVector4a *LLPolyMesh::getWritableNormals() { return mNormals; } @@ -922,7 +939,7 @@ LLVector4 *LLPolyMesh::getWritableNormals() //----------------------------------------------------------------------------- // getWritableBinormals() //----------------------------------------------------------------------------- -LLVector3 *LLPolyMesh::getWritableBinormals() +LLVector4a *LLPolyMesh::getWritableBinormals() { return mBinormals; } @@ -931,7 +948,7 @@ LLVector3 *LLPolyMesh::getWritableBinormals() //----------------------------------------------------------------------------- // getWritableClothingWeights() //----------------------------------------------------------------------------- -LLVector4 *LLPolyMesh::getWritableClothingWeights() +LLVector4a *LLPolyMesh::getWritableClothingWeights() { return mClothingWeights; } @@ -947,7 +964,7 @@ LLVector2 *LLPolyMesh::getWritableTexCoords() //----------------------------------------------------------------------------- // getScaledNormals() //----------------------------------------------------------------------------- -LLVector3 *LLPolyMesh::getScaledNormals() +LLVector4a *LLPolyMesh::getScaledNormals() { return mScaledNormals; } @@ -955,7 +972,7 @@ LLVector3 *LLPolyMesh::getScaledNormals() //----------------------------------------------------------------------------- // getScaledBinormals() //----------------------------------------------------------------------------- -LLVector3 *LLPolyMesh::getScaledBinormals() +LLVector4a *LLPolyMesh::getScaledBinormals() { return mScaledBinormals; } @@ -966,17 +983,17 @@ LLVector3 *LLPolyMesh::getScaledBinormals() //----------------------------------------------------------------------------- void LLPolyMesh::initializeForMorph() { - for (U32 i = 0; i < mSharedData->mNumVertices; ++i) + LLVector4a::memcpyNonAliased16((F32*) mCoords, (F32*) mSharedData->mBaseCoords, sizeof(LLVector4a) * mSharedData->mNumVertices); + LLVector4a::memcpyNonAliased16((F32*) mNormals, (F32*) mSharedData->mBaseNormals, sizeof(LLVector4a) * mSharedData->mNumVertices); + LLVector4a::memcpyNonAliased16((F32*) mScaledNormals, (F32*) mSharedData->mBaseNormals, sizeof(LLVector4a) * mSharedData->mNumVertices); + LLVector4a::memcpyNonAliased16((F32*) mBinormals, (F32*) mSharedData->mBaseNormals, sizeof(LLVector4a) * mSharedData->mNumVertices); + LLVector4a::memcpyNonAliased16((F32*) mScaledBinormals, (F32*) mSharedData->mBaseNormals, sizeof(LLVector4a) * mSharedData->mNumVertices); + LLVector4a::memcpyNonAliased16((F32*) mTexCoords, (F32*) mSharedData->mTexCoords, sizeof(LLVector2) * (mSharedData->mNumVertices + mSharedData->mNumVertices%2)); + + for (U32 i = 0; i < mSharedData->mNumVertices; ++i) { - mCoords[i] = LLVector4(mSharedData->mBaseCoords[i]); - mNormals[i] = LLVector4(mSharedData->mBaseNormals[i]); + mClothingWeights[i].clear(); } - - memcpy(mScaledNormals, mSharedData->mBaseNormals, sizeof(LLVector3) * mSharedData->mNumVertices); /*Flawfinder: ignore*/ - memcpy(mBinormals, mSharedData->mBaseBinormals, sizeof(LLVector3) * mSharedData->mNumVertices); /*Flawfinder: ignore*/ - memcpy(mScaledBinormals, mSharedData->mBaseBinormals, sizeof(LLVector3) * mSharedData->mNumVertices); /*Flawfinder: ignore*/ - memcpy(mTexCoords, mSharedData->mTexCoords, sizeof(LLVector2) * mSharedData->mNumVertices); /*Flawfinder: ignore*/ - memset(mClothingWeights, 0, sizeof(LLVector4) * mSharedData->mNumVertices); } //----------------------------------------------------------------------------- @@ -1098,7 +1115,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) LLPolySkeletalDistortion::LLPolySkeletalDistortion(LLVOAvatar *avatarp) { mAvatar = avatarp; - mDefaultVec.setVec(0.001f, 0.001f, 0.001f); + mDefaultVec.splat(0.001f); } //----------------------------------------------------------------------------- @@ -1171,8 +1188,12 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) //----------------------------------------------------------------------------- // apply() //----------------------------------------------------------------------------- +static LLFastTimer::DeclareTimer FTM_POLYSKELETAL_DISTORTION_APPLY("Skeletal Distortion"); + void LLPolySkeletalDistortion::apply( ESex avatar_sex ) { + LLFastTimer t(FTM_POLYSKELETAL_DISTORTION_APPLY); + F32 effective_weight = ( getSex() & avatar_sex ) ? mCurWeight : getDefaultWeight(); LLJoint* joint; @@ -1228,11 +1249,14 @@ LLPolyMorphData *clone_morph_param_direction(const LLPolyMorphData *src_data, { LLPolyMorphData* cloned_morph_data = new LLPolyMorphData(*src_data); cloned_morph_data->mName = name; + LLVector4a dir; + dir.load3(direction.mV); + for (U32 v=0; v < cloned_morph_data->mNumIndices; v++) { - cloned_morph_data->mCoords[v] = direction; - cloned_morph_data->mNormals[v] = LLVector3(0,0,0); - cloned_morph_data->mBinormals[v] = LLVector3(0,0,0); + cloned_morph_data->mCoords[v] = dir; + cloned_morph_data->mNormals[v].clear(); + cloned_morph_data->mBinormals[v].clear(); } return cloned_morph_data; } @@ -1243,17 +1267,27 @@ LLPolyMorphData *clone_morph_param_cleavage(const LLPolyMorphData *src_data, { LLPolyMorphData* cloned_morph_data = new LLPolyMorphData(*src_data); cloned_morph_data->mName = name; + + LLVector4a sc; + sc.splat(scale); + + LLVector4a nsc; + nsc.set(scale, -scale, scale, scale); + for (U32 v=0; v < cloned_morph_data->mNumIndices; v++) { - cloned_morph_data->mCoords[v] = src_data->mCoords[v]*scale; - cloned_morph_data->mNormals[v] = src_data->mNormals[v]*scale; - cloned_morph_data->mBinormals[v] = src_data->mBinormals[v]*scale; - if (cloned_morph_data->mCoords[v][1] < 0) - { - cloned_morph_data->mCoords[v][1] *= -1; - cloned_morph_data->mNormals[v][1] *= -1; - cloned_morph_data->mBinormals[v][1] *= -1; - } + if (cloned_morph_data->mCoords[v][1] < 0) + { + cloned_morph_data->mCoords[v].setMul(src_data->mCoords[v],nsc); + cloned_morph_data->mNormals[v].setMul(src_data->mNormals[v],nsc); + cloned_morph_data->mBinormals[v].setMul(src_data->mBinormals[v],nsc); + } + else + { + cloned_morph_data->mCoords[v].setMul(src_data->mCoords[v],sc); + cloned_morph_data->mNormals[v].setMul(src_data->mNormals[v], sc); + cloned_morph_data->mBinormals[v].setMul(src_data->mBinormals[v],sc); + } } return cloned_morph_data; } diff --git a/indra/newview/llpolymesh.h b/indra/newview/llpolymesh.h index ba2bf85570..28da230541 100644 --- a/indra/newview/llpolymesh.h +++ b/indra/newview/llpolymesh.h @@ -73,9 +73,9 @@ private: // vertex data S32 mNumVertices; - LLVector3 *mBaseCoords; - LLVector3 *mBaseNormals; - LLVector3 *mBaseBinormals; + LLVector4a *mBaseCoords; + LLVector4a *mBaseNormals; + LLVector4a *mBaseBinormals; LLVector2 *mTexCoords; LLVector2 *mDetailTexCoords; F32 *mWeights; @@ -217,41 +217,41 @@ public: } // Get coords - const LLVector4 *getCoords() const{ + const LLVector4a *getCoords() const{ return mCoords; } // non const version - LLVector4 *getWritableCoords(); + LLVector4a *getWritableCoords(); // Get normals - const LLVector4 *getNormals() const{ + const LLVector4a *getNormals() const{ return mNormals; } // Get normals - const LLVector3 *getBinormals() const{ + const LLVector4a *getBinormals() const{ return mBinormals; } // Get base mesh normals - const LLVector3 *getBaseNormals() const{ + const LLVector4a *getBaseNormals() const{ llassert(mSharedData); return mSharedData->mBaseNormals; } // Get base mesh normals - const LLVector3 *getBaseBinormals() const{ + const LLVector4a *getBaseBinormals() const{ llassert(mSharedData); return mSharedData->mBaseBinormals; } // intermediate morphed normals and output normals - LLVector4 *getWritableNormals(); - LLVector3 *getScaledNormals(); + LLVector4a *getWritableNormals(); + LLVector4a *getScaledNormals(); - LLVector3 *getWritableBinormals(); - LLVector3 *getScaledBinormals(); + LLVector4a *getWritableBinormals(); + LLVector4a *getScaledBinormals(); // Get texCoords const LLVector2 *getTexCoords() const { @@ -275,9 +275,9 @@ public: F32 *getWritableWeights() const; - LLVector4 *getWritableClothingWeights(); + LLVector4a *getWritableClothingWeights(); - const LLVector4 *getClothingWeights() + const LLVector4a *getClothingWeights() { return mClothingWeights; } @@ -341,17 +341,17 @@ protected: // Single array of floats for allocation / deletion F32 *mVertexData; // deformed vertices (resulting from application of morph targets) - LLVector4 *mCoords; + LLVector4a *mCoords; // deformed normals (resulting from application of morph targets) - LLVector3 *mScaledNormals; + LLVector4a *mScaledNormals; // output normals (after normalization) - LLVector4 *mNormals; + LLVector4a *mNormals; // deformed binormals (resulting from application of morph targets) - LLVector3 *mScaledBinormals; + LLVector4a *mScaledBinormals; // output binormals (after normalization) - LLVector3 *mBinormals; + LLVector4a *mBinormals; // weight values that mark verts as clothing/skin - LLVector4 *mClothingWeights; + LLVector4a *mClothingWeights; // output texture coordinates LLVector2 *mTexCoords; @@ -400,12 +400,24 @@ protected: // LLPolySkeletalDeformation // A set of joint scale data for deforming the avatar mesh //----------------------------------------------------------------------------- + +LL_ALIGN_PREFIX(16) class LLPolySkeletalDistortion : public LLViewerVisualParam { public: LLPolySkeletalDistortion(LLVOAvatar *avatarp); ~LLPolySkeletalDistortion(); + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + // Special: These functions are overridden by child classes LLPolySkeletalDistortionInfo* getInfo() const { return (LLPolySkeletalDistortionInfo*)mInfo; } // This sets mInfo and calls initialization functions @@ -419,20 +431,21 @@ public: // LLViewerVisualParam Virtual functions /*virtual*/ F32 getTotalDistortion() { return 0.1f; } - /*virtual*/ const LLVector3& getAvgDistortion() { return mDefaultVec; } + /*virtual*/ const LLVector4a& getAvgDistortion() { return mDefaultVec; } /*virtual*/ F32 getMaxDistortion() { return 0.1f; } - /*virtual*/ LLVector3 getVertexDistortion(S32 index, LLPolyMesh *poly_mesh){return LLVector3(0.001f, 0.001f, 0.001f);} - /*virtual*/ const LLVector3* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh){index = 0; poly_mesh = NULL; return &mDefaultVec;}; - /*virtual*/ const LLVector3* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh){index = 0; poly_mesh = NULL; return NULL;}; + /*virtual*/ LLVector4a getVertexDistortion(S32 index, LLPolyMesh *poly_mesh){return LLVector4a(0.001f, 0.001f, 0.001f);} + /*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh){index = 0; poly_mesh = NULL; return &mDefaultVec;}; + /*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh){index = 0; poly_mesh = NULL; return NULL;}; protected: + LL_ALIGN_16(LLVector4a mDefaultVec); + typedef std::map<LLJoint*, LLVector3> joint_vec_map_t; joint_vec_map_t mJointScales; joint_vec_map_t mJointOffsets; - LLVector3 mDefaultVec; // Backlink only; don't make this an LLPointer. LLVOAvatar *mAvatar; -}; +} LL_ALIGN_POSTFIX(16); #endif // LL_LLPOLYMESH_H diff --git a/indra/newview/llpolymorph.cpp b/indra/newview/llpolymorph.cpp index cefd7df3fe..495fdc348c 100644 --- a/indra/newview/llpolymorph.cpp +++ b/indra/newview/llpolymorph.cpp @@ -48,7 +48,7 @@ LLPolyMorphData::LLPolyMorphData(const std::string& morph_name) mNumIndices = 0; mCurrentIndex = 0; mTotalDistortion = 0.f; - mAvgDistortion.zeroVec(); + mAvgDistortion.clear(); mMaxDistortion = 0.f; mVertexIndices = NULL; mCoords = NULL; @@ -73,9 +73,11 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) : { const S32 numVertices = mNumIndices; - mCoords = new LLVector3[numVertices]; - mNormals = new LLVector3[numVertices]; - mBinormals = new LLVector3[numVertices]; + U32 size = sizeof(LLVector4a)*numVertices; + + mCoords = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) ); + mNormals = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) ); + mBinormals = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) ); mTexCoords = new LLVector2[numVertices]; mVertexIndices = new U32[numVertices]; @@ -89,17 +91,12 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) : } } - //----------------------------------------------------------------------------- // ~LLPolyMorphData() //----------------------------------------------------------------------------- LLPolyMorphData::~LLPolyMorphData() { - delete [] mVertexIndices; - delete [] mCoords; - delete [] mNormals; - delete [] mBinormals; - delete [] mTexCoords; + freeData(); } //----------------------------------------------------------------------------- @@ -119,18 +116,27 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) } //------------------------------------------------------------------------- + // free any existing data + //------------------------------------------------------------------------- + freeData(); + + //------------------------------------------------------------------------- // allocate vertices //------------------------------------------------------------------------- - mCoords = new LLVector3[numVertices]; - mNormals = new LLVector3[numVertices]; - mBinormals = new LLVector3[numVertices]; + + U32 size = sizeof(LLVector4a)*numVertices; + + mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(size)); + mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(size)); + mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(size)); + mTexCoords = new LLVector2[numVertices]; // Actually, we are allocating more space than we need for the skiplist mVertexIndices = new U32[numVertices]; mNumIndices = 0; mTotalDistortion = 0.f; mMaxDistortion = 0.f; - mAvgDistortion.zeroVec(); + mAvgDistortion.clear(); mMesh = mesh; //------------------------------------------------------------------------- @@ -152,36 +158,36 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) } - numRead = fread(&mCoords[v].mV, sizeof(F32), 3, fp); - llendianswizzle(&mCoords[v].mV, sizeof(F32), 3); + numRead = fread(&mCoords[v], sizeof(F32), 3, fp); + llendianswizzle(&mCoords[v], sizeof(F32), 3); if (numRead != 3) { llwarns << "Can't read morph target vertex coordinates" << llendl; return FALSE; } - F32 magnitude = mCoords[v].magVec(); + F32 magnitude = mCoords[v].getLength3().getF32(); mTotalDistortion += magnitude; - mAvgDistortion.mV[VX] += fabs(mCoords[v].mV[VX]); - mAvgDistortion.mV[VY] += fabs(mCoords[v].mV[VY]); - mAvgDistortion.mV[VZ] += fabs(mCoords[v].mV[VZ]); + LLVector4a t; + t.setAbs(mCoords[v]); + mAvgDistortion.add(t); if (magnitude > mMaxDistortion) { mMaxDistortion = magnitude; } - numRead = fread(&mNormals[v].mV, sizeof(F32), 3, fp); - llendianswizzle(&mNormals[v].mV, sizeof(F32), 3); + numRead = fread(&mNormals[v], sizeof(F32), 3, fp); + llendianswizzle(&mNormals[v], sizeof(F32), 3); if (numRead != 3) { llwarns << "Can't read morph target normal" << llendl; return FALSE; } - numRead = fread(&mBinormals[v].mV, sizeof(F32), 3, fp); - llendianswizzle(&mBinormals[v].mV, sizeof(F32), 3); + numRead = fread(&mBinormals[v], sizeof(F32), 3, fp); + llendianswizzle(&mBinormals[v], sizeof(F32), 3); if (numRead != 3) { llwarns << "Can't read morph target binormal" << llendl; @@ -200,13 +206,49 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) mNumIndices++; } - mAvgDistortion = mAvgDistortion * (1.f/(F32)mNumIndices); - mAvgDistortion.normVec(); + mAvgDistortion.mul(1.f/(F32)mNumIndices); + mAvgDistortion.normalize3fast(); return TRUE; } //----------------------------------------------------------------------------- +// freeData() +//----------------------------------------------------------------------------- +void LLPolyMorphData::freeData() +{ + if (mCoords != NULL) + { + ll_aligned_free_16(mCoords); + mCoords = NULL; + } + + if (mNormals != NULL) + { + ll_aligned_free_16(mNormals); + mNormals = NULL; + } + + if (mBinormals != NULL) + { + ll_aligned_free_16(mBinormals); + mBinormals = NULL; + } + + if (mTexCoords != NULL) + { + delete [] mTexCoords; + mTexCoords = NULL; + } + + if (mVertexIndices != NULL) + { + delete [] mVertexIndices; + mVertexIndices = NULL; + } +} + +//----------------------------------------------------------------------------- // LLPolyMorphTargetInfo() //----------------------------------------------------------------------------- LLPolyMorphTargetInfo::LLPolyMorphTargetInfo() @@ -367,9 +409,9 @@ BOOL LLPolyMorphTarget::parseData(LLXmlTreeNode* node) //----------------------------------------------------------------------------- // getVertexDistortion() //----------------------------------------------------------------------------- -LLVector3 LLPolyMorphTarget::getVertexDistortion(S32 requested_index, LLPolyMesh *mesh) +LLVector4a LLPolyMorphTarget::getVertexDistortion(S32 requested_index, LLPolyMesh *mesh) { - if (!mMorphData || mMesh != mesh) return LLVector3::zero; + if (!mMorphData || mMesh != mesh) return LLVector4a::getZero(); for(U32 index = 0; index < mMorphData->mNumIndices; index++) { @@ -379,17 +421,17 @@ LLVector3 LLPolyMorphTarget::getVertexDistortion(S32 requested_index, LLPolyMesh } } - return LLVector3::zero; + return LLVector4a::getZero(); } //----------------------------------------------------------------------------- // getFirstDistortion() //----------------------------------------------------------------------------- -const LLVector3 *LLPolyMorphTarget::getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) +const LLVector4a *LLPolyMorphTarget::getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) { - if (!mMorphData) return &LLVector3::zero; + if (!mMorphData) return &LLVector4a::getZero(); - LLVector3* resultVec; + LLVector4a* resultVec; mMorphData->mCurrentIndex = 0; if (mMorphData->mNumIndices) { @@ -411,11 +453,11 @@ const LLVector3 *LLPolyMorphTarget::getFirstDistortion(U32 *index, LLPolyMesh ** //----------------------------------------------------------------------------- // getNextDistortion() //----------------------------------------------------------------------------- -const LLVector3 *LLPolyMorphTarget::getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) +const LLVector4a *LLPolyMorphTarget::getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) { - if (!mMorphData) return &LLVector3::zero; + if (!mMorphData) return &LLVector4a::getZero(); - LLVector3* resultVec; + LLVector4a* resultVec; mMorphData->mCurrentIndex++; if (mMorphData->mCurrentIndex < mMorphData->mNumIndices) { @@ -451,7 +493,7 @@ F32 LLPolyMorphTarget::getTotalDistortion() //----------------------------------------------------------------------------- // getAvgDistortion() //----------------------------------------------------------------------------- -const LLVector3& LLPolyMorphTarget::getAvgDistortion() +const LLVector4a& LLPolyMorphTarget::getAvgDistortion() { if (mMorphData) { @@ -459,7 +501,7 @@ const LLVector3& LLPolyMorphTarget::getAvgDistortion() } else { - return LLVector3::zero; + return LLVector4a::getZero(); } } @@ -481,6 +523,8 @@ F32 LLPolyMorphTarget::getMaxDistortion() //----------------------------------------------------------------------------- // apply() //----------------------------------------------------------------------------- +static LLFastTimer::DeclareTimer FTM_APPLY_MORPH_TARGET("Apply Morph"); + void LLPolyMorphTarget::apply( ESex avatar_sex ) { if (!mMorphData || mNumMorphMasksPending > 0) @@ -488,6 +532,8 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) return; } + LLFastTimer t(FTM_APPLY_MORPH_TARGET); + mLastSex = avatar_sex; // Check for NaN condition (NaN is detected if a variable doesn't equal itself. @@ -508,15 +554,15 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) if (delta_weight != 0.f) { llassert(!mMesh->isLOD()); - LLVector4 *coords = mMesh->getWritableCoords(); + LLVector4a *coords = mMesh->getWritableCoords(); - LLVector3 *scaled_normals = mMesh->getScaledNormals(); - LLVector4 *normals = mMesh->getWritableNormals(); + LLVector4a *scaled_normals = mMesh->getScaledNormals(); + LLVector4a *normals = mMesh->getWritableNormals(); - LLVector3 *scaled_binormals = mMesh->getScaledBinormals(); - LLVector3 *binormals = mMesh->getWritableBinormals(); + LLVector4a *scaled_binormals = mMesh->getScaledBinormals(); + LLVector4a *binormals = mMesh->getWritableBinormals(); - LLVector4 *clothing_weights = mMesh->getWritableClothingWeights(); + LLVector4a *clothing_weights = mMesh->getWritableClothingWeights(); LLVector2 *tex_coords = mMesh->getWritableTexCoords(); F32 *maskWeightArray = (mVertMask) ? mVertMask->getMorphMaskWeights() : NULL; @@ -531,31 +577,38 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) maskWeight = maskWeightArray[vert_index_morph]; } - coords[vert_index_mesh] += LLVector4(mMorphData->mCoords[vert_index_morph] * delta_weight * maskWeight); + + LLVector4a pos = mMorphData->mCoords[vert_index_morph]; + pos.mul(delta_weight*maskWeight); + coords[vert_index_mesh].add(pos); if (getInfo()->mIsClothingMorph && clothing_weights) { - LLVector3 clothing_offset = mMorphData->mCoords[vert_index_morph] * delta_weight * maskWeight; - LLVector4* clothing_weight = &clothing_weights[vert_index_mesh]; - clothing_weight->mV[VX] += clothing_offset.mV[VX]; - clothing_weight->mV[VY] += clothing_offset.mV[VY]; - clothing_weight->mV[VZ] += clothing_offset.mV[VZ]; - clothing_weight->mV[VW] = maskWeight; + LLVector4a clothing_offset = mMorphData->mCoords[vert_index_morph]; + clothing_offset.mul(delta_weight * maskWeight); + LLVector4a* clothing_weight = &clothing_weights[vert_index_mesh]; + clothing_weight->add(clothing_offset); + clothing_weight->getF32ptr()[VW] = maskWeight; } // calculate new normals based on half angles - scaled_normals[vert_index_mesh] += mMorphData->mNormals[vert_index_morph] * delta_weight * maskWeight * NORMAL_SOFTEN_FACTOR; - LLVector3 normalized_normal = scaled_normals[vert_index_mesh]; - normalized_normal.normVec(); - normals[vert_index_mesh] = LLVector4(normalized_normal); + LLVector4a norm = mMorphData->mNormals[vert_index_morph]; + norm.mul(delta_weight*maskWeight*NORMAL_SOFTEN_FACTOR); + scaled_normals[vert_index_mesh].add(norm); + norm = scaled_normals[vert_index_mesh]; + norm.normalize3fast(); + normals[vert_index_mesh] = norm; // calculate new binormals - scaled_binormals[vert_index_mesh] += mMorphData->mBinormals[vert_index_morph] * delta_weight * maskWeight * NORMAL_SOFTEN_FACTOR; - LLVector3 tangent = scaled_binormals[vert_index_mesh] % normalized_normal; - LLVector3 normalized_binormal = normalized_normal % tangent; - normalized_binormal.normVec(); - binormals[vert_index_mesh] = normalized_binormal; - + LLVector4a binorm = mMorphData->mBinormals[vert_index_morph]; + binorm.mul(delta_weight*maskWeight*NORMAL_SOFTEN_FACTOR); + scaled_binormals[vert_index_mesh].add(binorm); + LLVector4a tangent; + tangent.setCross3(scaled_binormals[vert_index_mesh], norm); + LLVector4a& normalized_binormal = binormals[vert_index_mesh]; + normalized_binormal.setCross3(norm, tangent); + normalized_binormal.normalize3fast(); + tex_coords[vert_index_mesh] += mMorphData->mTexCoords[vert_index_morph] * delta_weight * maskWeight; } @@ -582,7 +635,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) //----------------------------------------------------------------------------- void LLPolyMorphTarget::applyMask(U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert) { - LLVector4 *clothing_weights = getInfo()->mIsClothingMorph ? mMesh->getWritableClothingWeights() : NULL; + LLVector4a *clothing_weights = getInfo()->mIsClothingMorph ? mMesh->getWritableClothingWeights() : NULL; if (!mVertMask) { @@ -596,29 +649,47 @@ void LLPolyMorphTarget::applyMask(U8 *maskTextureData, S32 width, S32 height, S3 if (maskWeights) { - LLVector4 *coords = mMesh->getWritableCoords(); - LLVector3 *scaled_normals = mMesh->getScaledNormals(); - LLVector3 *scaled_binormals = mMesh->getScaledBinormals(); + LLVector4a *coords = mMesh->getWritableCoords(); + LLVector4a *scaled_normals = mMesh->getScaledNormals(); + LLVector4a *scaled_binormals = mMesh->getScaledBinormals(); LLVector2 *tex_coords = mMesh->getWritableTexCoords(); + LLVector4Logical clothing_mask; + clothing_mask.clear(); + clothing_mask.setElement<0>(); + clothing_mask.setElement<1>(); + clothing_mask.setElement<2>(); + + for(U32 vert = 0; vert < mMorphData->mNumIndices; vert++) { F32 lastMaskWeight = mLastWeight * maskWeights[vert]; S32 out_vert = mMorphData->mVertexIndices[vert]; // remove effect of existing masked morph - coords[out_vert] -= LLVector4(mMorphData->mCoords[vert]) * lastMaskWeight; - scaled_normals[out_vert] -= mMorphData->mNormals[vert] * lastMaskWeight * NORMAL_SOFTEN_FACTOR; - scaled_binormals[out_vert] -= mMorphData->mBinormals[vert] * lastMaskWeight * NORMAL_SOFTEN_FACTOR; + LLVector4a t; + t = mMorphData->mCoords[vert]; + t.mul(lastMaskWeight); + coords[out_vert].sub(t); + + t = mMorphData->mNormals[vert]; + t.mul(lastMaskWeight*NORMAL_SOFTEN_FACTOR); + scaled_normals[out_vert].sub(t); + + t = mMorphData->mBinormals[vert]; + t.mul(lastMaskWeight*NORMAL_SOFTEN_FACTOR); + scaled_binormals[out_vert].sub(t); + tex_coords[out_vert] -= mMorphData->mTexCoords[vert] * lastMaskWeight; if (clothing_weights) { - LLVector3 clothing_offset = mMorphData->mCoords[vert] * lastMaskWeight; - LLVector4* clothing_weight = &clothing_weights[out_vert]; - clothing_weight->mV[VX] -= clothing_offset.mV[VX]; - clothing_weight->mV[VY] -= clothing_offset.mV[VY]; - clothing_weight->mV[VZ] -= clothing_offset.mV[VZ]; + LLVector4a clothing_offset = mMorphData->mCoords[vert]; + clothing_offset.mul(lastMaskWeight); + LLVector4a* clothing_weight = &clothing_weights[out_vert]; + LLVector4a t; + t.setSub(*clothing_weight, clothing_offset); + clothing_weight->setSelectWithMask(clothing_mask, t, *clothing_weight); } } } @@ -654,7 +725,7 @@ LLPolyVertexMask::~LLPolyVertexMask() //----------------------------------------------------------------------------- // generateMask() //----------------------------------------------------------------------------- -void LLPolyVertexMask::generateMask(U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4 *clothing_weights) +void LLPolyVertexMask::generateMask(U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4a *clothing_weights) { // RN debug output that uses Image Debugger (http://www.cs.unc.edu/~baxter/projects/imdebug/) // BOOL debugImg = FALSE; @@ -698,7 +769,7 @@ void LLPolyVertexMask::generateMask(U8 *maskTextureData, S32 width, S32 height, if (clothing_weights) { - clothing_weights[vertIndex].mV[VW] = mWeights[index]; + clothing_weights[vertIndex].getF32ptr()[VW] = mWeights[index]; } } mWeightsGenerated = TRUE; diff --git a/indra/newview/llpolymorph.h b/indra/newview/llpolymorph.h index 8a024f2e9e..24940c52e0 100644 --- a/indra/newview/llpolymorph.h +++ b/indra/newview/llpolymorph.h @@ -41,6 +41,7 @@ class LLWearable; //----------------------------------------------------------------------------- // LLPolyMorphData() //----------------------------------------------------------------------------- +LL_ALIGN_PREFIX(16) class LLPolyMorphData { public: @@ -48,6 +49,16 @@ public: ~LLPolyMorphData(); LLPolyMorphData(const LLPolyMorphData &rhs); + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + BOOL loadBinary(LLFILE* fp, LLPolyMeshSharedData *mesh); const std::string& getName() { return mName; } @@ -58,16 +69,20 @@ public: U32 mNumIndices; U32* mVertexIndices; U32 mCurrentIndex; - LLVector3* mCoords; - LLVector3* mNormals; - LLVector3* mBinormals; + LLVector4a* mCoords; + LLVector4a* mNormals; + LLVector4a* mBinormals; LLVector2* mTexCoords; F32 mTotalDistortion; // vertex distortion summed over entire morph F32 mMaxDistortion; // maximum single vertex distortion in a given morph - LLVector3 mAvgDistortion; // average vertex distortion, to infer directionality of the morph + LL_ALIGN_16(LLVector4a mAvgDistortion); // average vertex distortion, to infer directionality of the morph LLPolyMeshSharedData* mMesh; -}; + +private: + void freeData(); +} LL_ALIGN_POSTFIX(16); + //----------------------------------------------------------------------------- // LLPolyVertexMask() @@ -78,7 +93,7 @@ public: LLPolyVertexMask(LLPolyMorphData* morph_data); ~LLPolyVertexMask(); - void generateMask(U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4 *clothing_weights); + void generateMask(U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4a *clothing_weights); F32* getMorphMaskWeights(); @@ -157,11 +172,11 @@ public: // LLViewerVisualParam Virtual functions /*virtual*/ F32 getTotalDistortion(); - /*virtual*/ const LLVector3& getAvgDistortion(); + /*virtual*/ const LLVector4a& getAvgDistortion(); /*virtual*/ F32 getMaxDistortion(); - /*virtual*/ LLVector3 getVertexDistortion(S32 index, LLPolyMesh *poly_mesh); - /*virtual*/ const LLVector3* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh); - /*virtual*/ const LLVector3* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh); + /*virtual*/ LLVector4a getVertexDistortion(S32 index, LLPolyMesh *poly_mesh); + /*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh); + /*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh); void applyMask(U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert); void addPendingMorphMask() { mNumMorphMasksPending++; } diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index 18626e3273..04934b13f1 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -464,7 +464,9 @@ LLMultiPreview::LLMultiPreview() void LLMultiPreview::onOpen(const LLSD& key) { - LLPreview* frontmost_preview = (LLPreview*)mTabContainer->getCurrentPanel(); + // Floater could be something else than LLPreview, eg LLFloaterProfile. + LLPreview* frontmost_preview = dynamic_cast<LLPreview*>(mTabContainer->getCurrentPanel()); + if (frontmost_preview && frontmost_preview->getAssetStatus() == LLPreview::PREVIEW_ASSET_UNLOADED) { frontmost_preview->loadAsset(); @@ -477,8 +479,13 @@ void LLMultiPreview::handleReshape(const LLRect& new_rect, bool by_user) { if(new_rect.getWidth() != getRect().getWidth() || new_rect.getHeight() != getRect().getHeight()) { - LLPreview* frontmost_preview = (LLPreview*)mTabContainer->getCurrentPanel(); - if (frontmost_preview) frontmost_preview->userResized(); + // Floater could be something else than LLPreview, eg LLFloaterProfile. + LLPreview* frontmost_preview = dynamic_cast<LLPreview*>(mTabContainer->getCurrentPanel()); + + if (frontmost_preview) + { + frontmost_preview->userResized(); + } } LLFloater::handleReshape(new_rect, by_user); } @@ -486,7 +493,9 @@ void LLMultiPreview::handleReshape(const LLRect& new_rect, bool by_user) void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click) { - LLPreview* opened_preview = (LLPreview*)opened_floater; + // Floater could be something else than LLPreview, eg LLFloaterProfile. + LLPreview* opened_preview = dynamic_cast<LLPreview*>(opened_floater); + if (opened_preview && opened_preview->getAssetStatus() == LLPreview::PREVIEW_ASSET_UNLOADED) { opened_preview->loadAsset(); diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 5aba654796..e533be7f24 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -314,7 +314,11 @@ BOOL LLFloaterScriptSearch::handleKeyHere(KEY key, MASK mask) { if (mEditorCore) { - return mEditorCore->handleKeyHere(key, mask); + BOOL handled = mEditorCore->handleKeyHere(key, mask); + if (!handled) + { + LLFloater::handleKeyHere(key, mask); + } } return FALSE; @@ -836,7 +840,7 @@ void LLScriptEdCore::onBtnDynamicHelp() if (!live_help_floater) { live_help_floater = new LLFloater(LLSD()); - live_help_floater->buildFromFile("floater_lsl_guide.xml", NULL); + live_help_floater->buildFromFile("floater_lsl_guide.xml"); LLFloater* parent = dynamic_cast<LLFloater*>(getParent()); llassert(parent); if (parent) diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index f86e583b9e..989f0b0e60 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -96,7 +96,7 @@ BOOL LLProgressView::postBuild() getChild<LLTextBox>("message_text")->setClickedCallback(onClickMessage, this); // hidden initially, until we need it - LLPanel::setVisible(FALSE); + setVisible(FALSE); LLNotifications::instance().getChannel("AlertModal")->connectChanged(boost::bind(&LLProgressView::onAlertModal, this, _1)); @@ -265,7 +265,7 @@ void LLProgressView::draw() gFocusMgr.releaseFocusIfNeeded( this ); // turn off panel that hosts intro so we see the world - LLPanel::setVisible(FALSE); + setVisible(FALSE); // stop observing events since we no longer care mMediaCtrl->remObserver( this ); diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index d340b304ca..154555b261 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -39,7 +39,7 @@ #include "lldockablefloater.h" #include "llsyswellwindow.h" -#include "llimfloater.h" +#include "llfloaterimsession.h" #include "llscriptfloater.h" #include "llrootview.h" @@ -253,12 +253,26 @@ void LLScreenChannel::addToast(const LLToast::Params& p) { bool store_toast = false, show_toast = false; - mDisplayToastsAlways ? show_toast = true : show_toast = mWasStartUpToastShown && (mShowToasts || p.force_show); + if (mDisplayToastsAlways) + { + show_toast = true; + } + else + { + show_toast = mWasStartUpToastShown && (mShowToasts || p.force_show); + } store_toast = !show_toast && p.can_be_stored && mCanStoreToasts; if(!show_toast && !store_toast) { - mRejectToastSignal(p.notif_id); + LLNotificationPtr notification = LLNotifications::instance().find(p.notif_id); + + if (notification && + (!notification->canLogToIM() || !notification->hasFormElements())) + { + // only cancel notification if it isn't being used in IM session + LLNotifications::instance().cancel(notification); + } return; } @@ -371,7 +385,7 @@ void LLScreenChannel::storeToast(ToastElem& toast_elem) const LLToast* toast = toast_elem.getToast(); if (toast) { - mStoredToastList.push_back(toast_elem); + mStoredToastList.push_back(toast_elem); mOnStoreToast(toast->getPanel(), toast->getNotificationID()); } } @@ -410,14 +424,14 @@ void LLScreenChannel::loadStoredToastByNotificationIDToChannel(LLUUID id) LLToast* toast = it->getToast(); if (toast) { - if(toast->getVisible()) - { - // toast is already in channel - return; - } + if(toast->getVisible()) + { + // toast is already in channel + return; + } - toast->setIsHidden(false); - toast->startTimer(); + toast->setIsHidden(false); + toast->startTimer(); mToastList.push_back(*it); } @@ -425,34 +439,12 @@ void LLScreenChannel::loadStoredToastByNotificationIDToChannel(LLUUID id) } //-------------------------------------------------------------------------- -void LLScreenChannel::removeStoredToastByNotificationID(LLUUID id) -{ - // *TODO: may be remove this function - std::vector<ToastElem>::iterator it = find(mStoredToastList.begin(), mStoredToastList.end(), id); - - if( it == mStoredToastList.end() ) - return; - - const LLToast* toast = it->getToast(); - if (toast) - { - mRejectToastSignal(toast->getNotificationID()); - } - - // Call find() once more, because the mStoredToastList could have been changed - // in mRejectToastSignal callback and the iterator could have become invalid. - it = find(mStoredToastList.begin(), mStoredToastList.end(), id); - if (it != mStoredToastList.end()) - { - mStoredToastList.erase(it); - } -} - -//-------------------------------------------------------------------------- void LLScreenChannel::killToastByNotificationID(LLUUID id) { // searching among toasts on a screen std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), id); + LLNotificationPtr notification = LLNotifications::instance().find(id); + if (!notification) return; if( it != mToastList.end()) { @@ -465,42 +457,67 @@ void LLScreenChannel::killToastByNotificationID(LLUUID id) // the toast will be destroyed. if(toast && toast->isNotificationValid()) { - mRejectToastSignal(toast->getNotificationID()); + if (!notification->canLogToIM() || !notification->hasFormElements()) + { + // only cancel notification if it isn't being used in IM session + LLNotifications::instance().cancel(notification); + } } else { - - deleteToast(toast); - mToastList.erase(it); - redrawToasts(); + removeToastByNotificationID(id); } - return; } - - // searching among stored toasts - it = find(mStoredToastList.begin(), mStoredToastList.end(), id); - - if (it != mStoredToastList.end()) + else { - LLToast* toast = it->getToast(); - if (toast) + // searching among stored toasts + it = find(mStoredToastList.begin(), mStoredToastList.end(), id); + + if( it != mStoredToastList.end() ) { - // send signal to a listener to let him perform some action on toast rejecting - mRejectToastSignal(toast->getNotificationID()); - deleteToast(toast); + LLToast* toast = it->getToast(); + if (toast) + { + if (!notification->canLogToIM() || !notification->hasFormElements()) + { + // only cancel notification if it isn't being used in IM session + LLNotifications::instance().cancel(notification); + } + deleteToast(toast); + } + } + + // Call find() once more, because the mStoredToastList could have been changed + // via notification cancellation and the iterator could have become invalid. + it = find(mStoredToastList.begin(), mStoredToastList.end(), id); + if (it != mStoredToastList.end()) + { + mStoredToastList.erase(it); } } +} + +void LLScreenChannel::removeToastByNotificationID(LLUUID id) +{ + std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), id); + while( it != mToastList.end()) + { + deleteToast(it->getToast()); + mToastList.erase(it); + redrawToasts(); + // find next toast with matching id + it = find(mToastList.begin(), mToastList.end(), id); + } - // Call find() once more, because the mStoredToastList could have been changed - // in mRejectToastSignal callback and the iterator could have become invalid. it = find(mStoredToastList.begin(), mStoredToastList.end(), id); if (it != mStoredToastList.end()) { + deleteToast(it->getToast()); mStoredToastList.erase(it); } - } + void LLScreenChannel::killMatchedToasts(const Matcher& matcher) { std::list<const LLToast*> to_delete = findToasts(matcher); @@ -521,11 +538,11 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel) LLToast* toast = it->getToast(); if (toast) { - LLPanel* old_panel = toast->getPanel(); - toast->removeChild(old_panel); - delete old_panel; - toast->insertPanel(panel); - toast->startTimer(); + LLPanel* old_panel = toast->getPanel(); + toast->removeChild(old_panel); + delete old_panel; + toast->insertPanel(panel); + toast->startTimer(); } redrawToasts(); } @@ -571,9 +588,13 @@ void LLScreenChannel::showToastsBottom() LLDockableFloater* floater = dynamic_cast<LLDockableFloater*>(LLDockableFloater::getInstanceHandle().get()); - for(it = mToastList.rbegin(); it != mToastList.rend(); ++it) + // Use a local variable instead of mToastList. + // mToastList can be modified during recursive calls and then all iteratos will be invalidated. + std::vector<ToastElem> vToastList( mToastList ); + + for(it = vToastList.rbegin(); it != vToastList.rend(); ++it) { - if(it != mToastList.rbegin()) + if(it != vToastList.rbegin()) { LLToast* toast = (it-1)->getToast(); if (!toast) @@ -601,7 +622,7 @@ void LLScreenChannel::showToastsBottom() if(floater && floater->overlapsScreenChannel()) { - if(it == mToastList.rbegin()) + if(it == vToastList.rbegin()) { // move first toast above docked floater S32 shift = floater->getRect().getHeight(); @@ -624,7 +645,7 @@ void LLScreenChannel::showToastsBottom() if(!stop_showing_toasts) { - if( it != mToastList.rend()-1) + if( it != vToastList.rend()-1) { S32 toast_top = toast->getRect().mTop + gSavedSettings.getS32("ToastGap"); stop_showing_toasts = toast_top > getRect().mTop; @@ -632,7 +653,8 @@ void LLScreenChannel::showToastsBottom() } // at least one toast should be visible - if(it == mToastList.rbegin()) + + if(it == vToastList.rbegin()) { stop_showing_toasts = false; } @@ -655,10 +677,11 @@ void LLScreenChannel::showToastsBottom() } // Dismiss toasts we don't have space for (STORM-391). - if(it != mToastList.rend()) + if(it != vToastList.rend()) { mHiddenToastsNum = 0; - for(; it != mToastList.rend(); it++) + + for(; it != vToastList.rend(); it++) { LLToast* toast = it->getToast(); if (toast) @@ -679,7 +702,7 @@ void LLScreenChannel::showToastsCentre() return; } - LLRect toast_rect; + LLRect toast_rect; S32 bottom = (getRect().mTop - getRect().mBottom)/2 + toast->getRect().getHeight()/2; std::vector<ToastElem>::reverse_iterator it; @@ -714,9 +737,13 @@ void LLScreenChannel::showToastsTop() LLDockableFloater* floater = dynamic_cast<LLDockableFloater*>(LLDockableFloater::getInstanceHandle().get()); - for(it = mToastList.rbegin(); it != mToastList.rend(); ++it) + // Use a local variable instead of mToastList. + // mToastList can be modified during recursive calls and then all iteratos will be invalidated. + std::vector<ToastElem> vToastList( mToastList ); + + for(it = vToastList.rbegin(); it != vToastList.rend(); ++it) { - if(it != mToastList.rbegin()) + if(it != vToastList.rbegin()) { LLToast* toast = (it-1)->getToast(); if (!toast) @@ -744,7 +771,7 @@ void LLScreenChannel::showToastsTop() if(floater && floater->overlapsScreenChannel()) { - if(it == mToastList.rbegin()) + if(it == vToastList.rbegin()) { // move first toast above docked floater S32 shift = -floater->getRect().getHeight(); @@ -767,7 +794,7 @@ void LLScreenChannel::showToastsTop() if(!stop_showing_toasts) { - if( it != mToastList.rend()-1) + if( it != vToastList.rend()-1) { S32 toast_bottom = toast->getRect().mBottom - gSavedSettings.getS32("ToastGap"); stop_showing_toasts = toast_bottom < channel_rect.mBottom; @@ -775,7 +802,7 @@ void LLScreenChannel::showToastsTop() } // at least one toast should be visible - if(it == mToastList.rbegin()) + if(it == vToastList.rbegin()) { stop_showing_toasts = false; } @@ -799,10 +826,12 @@ void LLScreenChannel::showToastsTop() // Dismiss toasts we don't have space for (STORM-391). std::vector<LLToast*> toasts_to_hide; - if(it != mToastList.rend()) + + if(it != vToastList.rend()) { mHiddenToastsNum = 0; - for(; it != mToastList.rend(); it++) + + for(; it != vToastList.rend(); it++) { LLToast* toast = it->getToast(); if (toast) diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index 56a9cf8b4b..e5f4807ab7 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -84,6 +84,7 @@ public: // kill or modify a toast by its ID virtual void killToastByNotificationID(LLUUID id) {}; virtual void modifyToastNotificationByID(LLUUID id, LLSD data) {}; + virtual void removeToastByNotificationID(LLUUID id){}; // hide all toasts from screen, but not remove them from a channel virtual void hideToastsFromScreen() {}; @@ -175,6 +176,7 @@ public: void addToast(const LLToast::Params& p); // kill or modify a toast by its ID void killToastByNotificationID(LLUUID id); + void removeToastByNotificationID(LLUUID id); void killMatchedToasts(const Matcher& matcher); void modifyToastByNotificationID(LLUUID id, LLPanel* panel); // hide all toasts from screen, but not remove them from a channel @@ -195,8 +197,6 @@ public: void loadStoredToastsToChannel(); // finds a toast among stored by its Notification ID and throws it on a screen to a channel void loadStoredToastByNotificationIDToChannel(LLUUID id); - // removes a toast from stored finding it by its Notification ID - void removeStoredToastByNotificationID(LLUUID id); // removes from channel all toasts that belongs to the certain IM session void removeToastsBySessionID(LLUUID id); // remove all storable toasts from screen and store them @@ -227,16 +227,12 @@ public: // Channel's signals // signal on storing of faded toasts event - typedef boost::function<void (LLPanel* info_panel, const LLUUID id)> store_tost_callback_t; - typedef boost::signals2::signal<void (LLPanel* info_panel, const LLUUID id)> store_tost_signal_t; - store_tost_signal_t mOnStoreToast; - boost::signals2::connection setOnStoreToastCallback(store_tost_callback_t cb) { return mOnStoreToast.connect(cb); } - // signal on rejecting of a toast event - typedef boost::function<void (LLUUID id)> reject_tost_callback_t; - typedef boost::signals2::signal<void (LLUUID id)> reject_tost_signal_t; - reject_tost_signal_t mRejectToastSignal; boost::signals2::connection setOnRejectToastCallback(reject_tost_callback_t cb) { return mRejectToastSignal.connect(cb); } + typedef boost::signals2::signal<void (LLPanel* info_panel, const LLUUID id)> store_toast_signal_t; + boost::signals2::connection addOnStoreToastCallback(store_toast_signal_t::slot_type cb) { return mOnStoreToast.connect(cb); } private: + store_toast_signal_t mOnStoreToast; + class ToastElem { public: diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 6f98be1cb8..0e0da6bdc7 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -41,7 +41,7 @@ #include "lltoastscripttextbox.h" #include "lltrans.h" #include "llviewerwindow.h" -#include "llimfloater.h" +#include "llfloaterimsession.h" ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -95,7 +95,12 @@ bool LLScriptFloater::toggle(const LLUUID& notification_id) show(notification_id); } - LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(notification_id, true); + LLChicletPanel * chiclet_panelp = LLChicletBar::getInstance()->getChicletPanel(); + if (NULL != chiclet_panelp) + { + chiclet_panelp->setChicletToggleState(notification_id, true); + } + return true; } @@ -206,10 +211,14 @@ void LLScriptFloater::setVisible(BOOL visible) if(!visible) { - LLIMChiclet* chiclet = LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(getNotificationId()); - if(chiclet) + LLChicletPanel * chiclet_panelp = LLChicletBar::getInstance()->getChicletPanel(); + if (NULL != chiclet_panelp) { - chiclet->setToggleState(false); + LLIMChiclet * chicletp = chiclet_panelp->findChiclet<LLIMChiclet>(getNotificationId()); + if(NULL != chicletp) + { + chicletp->setToggleState(false); + } } } } @@ -218,15 +227,19 @@ void LLScriptFloater::onMouseDown() { if(getNotificationId().notNull()) { - // Remove new message icon - LLIMChiclet* chiclet = LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(getNotificationId()); - if (chiclet == NULL) + LLChicletPanel * chiclet_panelp = LLChicletBar::getInstance()->getChicletPanel(); + if (NULL != chiclet_panelp) { - llerror("Dock chiclet for LLScriptFloater doesn't exist", 0); - } - else - { - chiclet->setShowNewMessagesIcon(false); + LLIMChiclet * chicletp = chiclet_panelp->findChiclet<LLIMChiclet>(getNotificationId()); + // Remove new message icon + if (NULL == chicletp) + { + llerror("Dock chiclet for LLScriptFloater doesn't exist", 0); + } + else + { + chicletp->setShowNewMessagesIcon(false); + } } } } @@ -262,7 +275,11 @@ void LLScriptFloater::onFocusLost() { if(getNotificationId().notNull()) { - LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(getNotificationId(), false); + LLChicletPanel * chiclet_panelp = LLChicletBar::getInstance()->getChicletPanel(); + if (NULL != chiclet_panelp) + { + chiclet_panelp->setChicletToggleState(getNotificationId(), false); + } } } @@ -271,7 +288,11 @@ void LLScriptFloater::onFocusReceived() // first focus will be received before setObjectId() call - don't toggle chiclet if(getNotificationId().notNull()) { - LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(getNotificationId(), true); + LLChicletPanel * chiclet_panelp = LLChicletBar::getInstance()->getChicletPanel(); + if (NULL != chiclet_panelp) + { + chiclet_panelp->setChicletToggleState(getNotificationId(), true); + } } } @@ -279,28 +300,30 @@ void LLScriptFloater::dockToChiclet(bool dock) { if (getDockControl() == NULL) { - LLChiclet* chiclet = LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLChiclet>(getNotificationId()); - if (chiclet == NULL) - { - llwarns << "Dock chiclet for LLScriptFloater doesn't exist" << llendl; - return; - } - else + LLChicletPanel * chiclet_panelp = LLChicletBar::getInstance()->getChicletPanel(); + if (NULL != chiclet_panelp) { - LLChicletBar::getInstance()->getChicletPanel()->scrollToChiclet(chiclet); - } + LLChiclet * chicletp = chiclet_panelp->findChiclet<LLChiclet>(getNotificationId()); + if (NULL == chicletp) + { + llwarns << "Dock chiclet for LLScriptFloater doesn't exist" << llendl; + return; + } - // Stop saving position while we dock floater - bool save = getSavePosition(); - setSavePosition(false); + chiclet_panelp->scrollToChiclet(chicletp); - setDockControl(new LLDockControl(chiclet, this, getDockTongue(), - LLDockControl::BOTTOM)); + // Stop saving position while we dock floater + bool save = getSavePosition(); + setSavePosition(false); - setDocked(dock); + setDockControl(new LLDockControl(chicletp, this, getDockTongue(), + LLDockControl::BOTTOM)); - // Restore saving - setSavePosition(save); + setDocked(dock); + + // Restore saving + setSavePosition(save); + } } } @@ -347,11 +370,15 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) script_notification_map_t::const_iterator it = findUsingObjectId(object_id); if(it != mNotifications.end()) { - LLIMChiclet* chiclet = LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(it->first); - if(chiclet) + LLChicletPanel * chiclet_panelp = LLChicletBar::getInstance()->getChicletPanel(); + if (NULL != chiclet_panelp) { - // Pass the new_message icon state further. - set_new_message = chiclet->getShowNewMessagesIcon(); + LLIMChiclet * chicletp = chiclet_panelp->findChiclet<LLIMChiclet>(it->first); + if(NULL != chicletp) + { + // Pass the new_message icon state further. + set_new_message = chicletp->getShowNewMessagesIcon(); + } } LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", it->first); @@ -367,14 +394,18 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) mNotifications.insert(std::make_pair(notification_id, object_id)); - // Create inventory offer chiclet for offer type notifications - if( OBJ_GIVE_INVENTORY == obj_type ) + LLChicletPanel * chiclet_panelp = LLChicletBar::getInstance()->getChicletPanel(); + if (NULL != chiclet_panelp) { - LLChicletBar::instance().getChicletPanel()->createChiclet<LLInvOfferChiclet>(notification_id); - } - else - { - LLChicletBar::getInstance()->getChicletPanel()->createChiclet<LLScriptChiclet>(notification_id); + // Create inventory offer chiclet for offer type notifications + if( OBJ_GIVE_INVENTORY == obj_type ) + { + chiclet_panelp->createChiclet<LLInvOfferChiclet>(notification_id); + } + else + { + chiclet_panelp->createChiclet<LLScriptChiclet>(notification_id); + } } LLIMWellWindow::getInstance()->addObjectRow(notification_id, set_new_message); @@ -410,7 +441,11 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) // remove related chiclet if (LLChicletBar::instanceExists()) { - LLChicletBar::getInstance()->getChicletPanel()->removeChiclet(notification_id); + LLChicletPanel * chiclet_panelp = LLChicletBar::getInstance()->getChicletPanel(); + if (NULL != chiclet_panelp) + { + chiclet_panelp->removeChiclet(notification_id); + } } LLIMWellWindow* im_well_window = LLIMWellWindow::findInstance(); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 3b52dd552f..343316d30a 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -211,7 +211,6 @@ LLSelectMgr::LLSelectMgr() mGridMode = GRID_MODE_WORLD; gSavedSettings.setS32("GridMode", (S32)GRID_MODE_WORLD); - mGridValid = FALSE; mSelectedObjects = new LLObjectSelection(); mHoverObjects = new LLObjectSelection(); @@ -390,7 +389,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, // don't include an avatar. LLViewerObject* root = obj; - while(!root->isAvatar() && root->getParent() && !root->isJointChild()) + while(!root->isAvatar() && root->getParent()) { LLViewerObject* parent = (LLViewerObject*)root->getParent(); if (parent->isAvatar()) @@ -684,7 +683,7 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s // don't include an avatar. LLViewerObject* root = object; - while(!root->isAvatar() && root->getParent() && !root->isJointChild()) + while(!root->isAvatar() && root->getParent()) { LLViewerObject* parent = (LLViewerObject*)root->getParent(); if (parent->isAvatar()) @@ -1170,7 +1169,6 @@ void LLSelectMgr::setGridMode(EGridMode mode) mGridMode = mode; gSavedSettings.setS32("GridMode", mode); updateSelectionCenter(); - mGridValid = FALSE; } void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &scale) @@ -1271,7 +1269,6 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & origin = mGridOrigin; rotation = mGridRotation; scale = mGridScale; - mGridValid = TRUE; } //----------------------------------------------------------------------------- @@ -1397,7 +1394,7 @@ void LLSelectMgr::promoteSelectionToRoot() } LLViewerObject* parentp = object; - while(parentp->getParent() && !(parentp->isRootEdit() || parentp->isJointChild())) + while(parentp->getParent() && !(parentp->isRootEdit())) { parentp = (LLViewerObject*)parentp->getParent(); } @@ -2941,116 +2938,148 @@ BOOL LLSelectMgr::selectGetRootsCopy() return TRUE; } -//----------------------------------------------------------------------------- -// selectGetCreator() -// Creator information only applies to root objects. -//----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name) +struct LLSelectGetFirstTest { - BOOL identical = TRUE; - BOOL first = TRUE; - LLUUID first_id; - for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin(); - iter != getSelection()->root_object_end(); iter++ ) + LLSelectGetFirstTest() : mIdentical(true), mFirst(true) { } + virtual ~LLSelectGetFirstTest() { } + + // returns false to break out of the iteration. + bool checkMatchingNode(LLSelectNode* node) { - LLSelectNode* node = *iter; - if (!node->mValid) + if (!node || !node->mValid) { - return FALSE; + return false; } - if (first) + if (mFirst) { - first_id = node->mPermissions->getCreator(); - first = FALSE; + mFirstValue = getValueFromNode(node); + mFirst = false; } else { - if ( !(first_id == node->mPermissions->getCreator() ) ) + if ( mFirstValue != getValueFromNode(node) ) + { + mIdentical = false; + // stop testing once we know not all selected are identical. + return false; + } + } + // continue testing. + return true; + } + + bool mIdentical; + LLUUID mFirstValue; + +protected: + virtual const LLUUID& getValueFromNode(LLSelectNode* node) = 0; + +private: + bool mFirst; +}; + +void LLSelectMgr::getFirst(LLSelectGetFirstTest* test) +{ + if (gSavedSettings.getBOOL("EditLinkedParts")) + { + for (LLObjectSelection::valid_iterator iter = getSelection()->valid_begin(); + iter != getSelection()->valid_end(); ++iter ) + { + if (!test->checkMatchingNode(*iter)) { - identical = FALSE; break; } } } - if (first_id.isNull()) + else + { + for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin(); + iter != getSelection()->root_object_end(); ++iter ) + { + if (!test->checkMatchingNode(*iter)) + { + break; + } + } + } +} + +//----------------------------------------------------------------------------- +// selectGetCreator() +// Creator information only applies to roots unless editing linked parts. +//----------------------------------------------------------------------------- +struct LLSelectGetFirstCreator : public LLSelectGetFirstTest +{ +protected: + virtual const LLUUID& getValueFromNode(LLSelectNode* node) + { + return node->mPermissions->getCreator(); + } +}; + +BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name) +{ + LLSelectGetFirstCreator test; + getFirst(&test); + + if (test.mFirstValue.isNull()) { name = LLTrans::getString("AvatarNameNobody"); return FALSE; } - result_id = first_id; + result_id = test.mFirstValue; - if (identical) + if (test.mIdentical) { - name = LLSLURL("agent", first_id, "inspect").getSLURLString(); + name = LLSLURL("agent", test.mFirstValue, "inspect").getSLURLString(); } else { name = LLTrans::getString("AvatarNameMultiple"); } - return identical; + return test.mIdentical; } - //----------------------------------------------------------------------------- // selectGetOwner() -// Owner information only applies to roots. +// Owner information only applies to roots unless editing linked parts. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name) +struct LLSelectGetFirstOwner : public LLSelectGetFirstTest { - BOOL identical = TRUE; - BOOL first = TRUE; - BOOL first_group_owned = FALSE; - LLUUID first_id; - for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin(); - iter != getSelection()->root_object_end(); iter++ ) +protected: + virtual const LLUUID& getValueFromNode(LLSelectNode* node) { - LLSelectNode* node = *iter; - if (!node->mValid) - { - return FALSE; - } - - if (first) - { - node->mPermissions->getOwnership(first_id, first_group_owned); - first = FALSE; - } - else - { - LLUUID owner_id; - BOOL is_group_owned = FALSE; - if (!(node->mPermissions->getOwnership(owner_id, is_group_owned)) - || owner_id != first_id || is_group_owned != first_group_owned) - { - identical = FALSE; - break; - } - } + // Don't use 'getOwnership' since we return a reference, not a copy. + // Will return LLUUID::null if unowned (which is not allowed and should never happen.) + return node->mPermissions->isGroupOwned() ? node->mPermissions->getGroup() : node->mPermissions->getOwner(); } - if (first_id.isNull()) +}; + +BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name) +{ + LLSelectGetFirstOwner test; + getFirst(&test); + + if (test.mFirstValue.isNull()) { return FALSE; } - result_id = first_id; + result_id = test.mFirstValue; - if (identical) + if (test.mIdentical) { - BOOL public_owner = (first_id.isNull() && !first_group_owned); - if (first_group_owned) - { - name = LLSLURL("group", first_id, "inspect").getSLURLString(); - } - else if(!public_owner) + bool group_owned = selectIsGroupOwned(); + if (group_owned) { - name = LLSLURL("agent", first_id, "inspect").getSLURLString(); + name = LLSLURL("group", test.mFirstValue, "inspect").getSLURLString(); } else { - name = LLTrans::getString("AvatarNameNobody"); + name = LLSLURL("agent", test.mFirstValue, "inspect").getSLURLString(); } } else @@ -3058,131 +3087,92 @@ BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name) name = LLTrans::getString("AvatarNameMultiple"); } - return identical; + return test.mIdentical; } - //----------------------------------------------------------------------------- // selectGetLastOwner() -// Owner information only applies to roots. +// Owner information only applies to roots unless editing linked parts. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name) +struct LLSelectGetFirstLastOwner : public LLSelectGetFirstTest { - BOOL identical = TRUE; - BOOL first = TRUE; - LLUUID first_id; - for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin(); - iter != getSelection()->root_object_end(); iter++ ) +protected: + virtual const LLUUID& getValueFromNode(LLSelectNode* node) { - LLSelectNode* node = *iter; - if (!node->mValid) - { - return FALSE; - } - - if (first) - { - first_id = node->mPermissions->getLastOwner(); - first = FALSE; - } - else - { - if ( !(first_id == node->mPermissions->getLastOwner() ) ) - { - identical = FALSE; - break; - } - } + return node->mPermissions->getLastOwner(); } - if (first_id.isNull()) +}; + +BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name) +{ + LLSelectGetFirstLastOwner test; + getFirst(&test); + + if (test.mFirstValue.isNull()) { return FALSE; } - result_id = first_id; + result_id = test.mFirstValue; - if (identical) + if (test.mIdentical) { - BOOL public_owner = (first_id.isNull()); - if(!public_owner) - { - name = LLSLURL("agent", first_id, "inspect").getSLURLString(); - } - else - { - name.assign("Public or Group"); - } + name = LLSLURL("agent", test.mFirstValue, "inspect").getSLURLString(); } else { name.assign( "" ); } - return identical; + return test.mIdentical; } - //----------------------------------------------------------------------------- // selectGetGroup() -// Group information only applies to roots. +// Group information only applies to roots unless editing linked parts. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id) +struct LLSelectGetFirstGroup : public LLSelectGetFirstTest { - BOOL identical = TRUE; - BOOL first = TRUE; - LLUUID first_id; - for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin(); - iter != getSelection()->root_object_end(); iter++ ) +protected: + virtual const LLUUID& getValueFromNode(LLSelectNode* node) { - LLSelectNode* node = *iter; - if (!node->mValid) - { - return FALSE; - } - - if (first) - { - first_id = node->mPermissions->getGroup(); - first = FALSE; - } - else - { - if ( !(first_id == node->mPermissions->getGroup() ) ) - { - identical = FALSE; - break; - } - } + return node->mPermissions->getGroup(); } +}; - result_id = first_id; +BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id) +{ + LLSelectGetFirstGroup test; + getFirst(&test); - return identical; + result_id = test.mFirstValue; + return test.mIdentical; } //----------------------------------------------------------------------------- // selectIsGroupOwned() -// Only operates on root nodes. -// Returns TRUE if all have valid data and they are all group owned. +// Only operates on root nodes unless editing linked parts. +// Returns TRUE if the first selected is group owned. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectIsGroupOwned() +struct LLSelectGetFirstGroupOwner : public LLSelectGetFirstTest { - BOOL found_one = FALSE; - for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin(); - iter != getSelection()->root_object_end(); iter++ ) +protected: + virtual const LLUUID& getValueFromNode(LLSelectNode* node) { - LLSelectNode* node = *iter; - if (!node->mValid) - { - return FALSE; - } - found_one = TRUE; - if (!node->mPermissions->isGroupOwned()) + if (node->mPermissions->isGroupOwned()) { - return FALSE; + return node->mPermissions->getGroup(); } - } - return found_one ? TRUE : FALSE; + return LLUUID::null; + } +}; + +BOOL LLSelectMgr::selectIsGroupOwned() +{ + LLSelectGetFirstGroupOwner test; + getFirst(&test); + + return test.mFirstValue.notNull() ? TRUE : FALSE; } //----------------------------------------------------------------------------- @@ -4474,8 +4464,7 @@ struct LLSelectMgrApplyFlags : public LLSelectedObjectFunctor virtual bool apply(LLViewerObject* object) { if ( object->permModify() && // preemptive permissions check - object->isRoot() && // don't send for child objects - !object->isJointChild()) + object->isRoot()) // don't send for child objects { object->setFlags( mFlags, mState); } @@ -4988,7 +4977,11 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data } func(id); LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(&func); - if (node) + if (!node) + { + llwarns << "Couldn't find object " << id << " selected." << llendl; + } + else { if (node->mInventorySerial != inv_serial) { @@ -5059,13 +5052,6 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data dialog_refresh_all(); - // silly hack to allow 'save into inventory' - if(gPopupMenuView->getVisible()) - { - gPopupMenuView->setItemEnabled(SAVE_INTO_INVENTORY, - enable_save_into_inventory(NULL)); - } - // hack for left-click buy object LLToolPie::selectionPropertiesReceived(); } @@ -6330,8 +6316,6 @@ void LLSelectMgr::updateSelectionCenter() // matches the root prim's (affecting the orientation of the manipulators). bbox.addBBoxAgent( (mSelectedObjects->getFirstRootObject(TRUE))->getBoundingBoxAgent() ); - std::vector < LLViewerObject *> jointed_objects; - for (LLObjectSelection::iterator iter = mSelectedObjects->begin(); iter != mSelectedObjects->end(); iter++) { @@ -6349,11 +6333,6 @@ void LLSelectMgr::updateSelectionCenter() } bbox.addBBoxAgent( object->getBoundingBoxAgent() ); - - if (object->isJointChild()) - { - jointed_objects.push_back(object); - } } LLVector3 bbox_center_agent = bbox.getCenterAgent(); @@ -6643,19 +6622,19 @@ void LLSelectMgr::setAgentHUDZoom(F32 target_zoom, F32 current_zoom) bool LLObjectSelection::is_root::operator()(LLSelectNode *node) { LLViewerObject* object = node->getObject(); - return (object != NULL) && !node->mIndividualSelection && (object->isRootEdit() || object->isJointChild()); + return (object != NULL) && !node->mIndividualSelection && (object->isRootEdit()); } bool LLObjectSelection::is_valid_root::operator()(LLSelectNode *node) { LLViewerObject* object = node->getObject(); - return (object != NULL) && node->mValid && !node->mIndividualSelection && (object->isRootEdit() || object->isJointChild()); + return (object != NULL) && node->mValid && !node->mIndividualSelection && (object->isRootEdit()); } bool LLObjectSelection::is_root_object::operator()(LLSelectNode *node) { LLViewerObject* object = node->getObject(); - return (object != NULL) && (object->isRootEdit() || object->isJointChild()); + return (object != NULL) && (object->isRootEdit()); } LLObjectSelection::LLObjectSelection() : diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index ecbb20df1b..cc78e35869 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -343,6 +343,9 @@ typedef LLSafeHandle<LLObjectSelection> LLObjectSelectionHandle; extern template class LLSelectMgr* LLSingleton<class LLSelectMgr>::getInstance(); #endif +// For use with getFirstTest() +struct LLSelectGetFirstTest; + class LLSelectMgr : public LLEditMenuHandler, public LLSingleton<LLSelectMgr> { public: @@ -745,6 +748,9 @@ private: static void packGodlikeHead(void* user_data); static bool confirmDelete(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle handle); + // Get the first ID that matches test and whether or not all ids are identical in selected objects. + void getFirst(LLSelectGetFirstTest* test); + public: // Observer/callback support for when object selection changes or // properties are received/updated @@ -763,8 +769,6 @@ private: LLVector3 mGridOrigin; LLVector3 mGridScale; EGridMode mGridMode; - BOOL mGridValid; - BOOL mTEMode; // render te LLVector3d mSelectionCenterGlobal; diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 853656905c..adb97ac800 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -38,7 +38,7 @@ #include "llfiltereditor.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" -#include "llfoldervieweventlistener.h" +#include "llfolderviewmodel.h" #include "lloutfitobserver.h" #include "llpaneleditwearable.h" #include "llpaneloutfitsinventory.h" @@ -267,11 +267,11 @@ void LLSidepanelAppearance::onOpenOutfitButtonClicked() if (inventory_panel) { LLFolderView* root = inventory_panel->getRootFolder(); - LLFolderViewItem *outfit_folder = root->getItemByID(outfit_link->getLinkedUUID()); + LLFolderViewItem *outfit_folder = inventory_panel->getItemByID(outfit_link->getLinkedUUID()); if (outfit_folder) { outfit_folder->setOpen(!outfit_folder->isOpen()); - root->setSelectionFromRoot(outfit_folder,TRUE); + root->setSelection(outfit_folder,TRUE); root->scrollToShowSelection(); } } @@ -456,10 +456,10 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) void LLSidepanelAppearance::editWearable(LLWearable *wearable, LLView *data, BOOL disable_camera_switch) { LLFloaterSidePanelContainer::showPanel("appearance", LLSD()); - LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(data); if (panel) { + panel->showOutfitsInventoryPanel(); panel->showWearableEditPanel(wearable, disable_camera_switch); } } diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 4f9ab318a5..8915bb2fef 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -36,6 +36,7 @@ #include "llfirstuse.h" #include "llfloatersidepanelcontainer.h" #include "llfoldertype.h" +#include "llfolderview.h" #include "llhttpclient.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" @@ -259,9 +260,8 @@ void LLSidepanelInventory::updateInbox() // const bool do_not_create_folder = false; - const bool do_not_find_in_library = false; - const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, do_not_create_folder, do_not_find_in_library); + const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, do_not_create_folder); // Set up observer to listen for creation of inbox if at least one of them doesn't exist if (inbox_id.isNull()) @@ -383,10 +383,10 @@ void LLSidepanelInventory::onToggleInboxBtn() { inboxPanel->setTargetDim(gSavedPerAccountSettings.getS32("InventoryInboxHeight")); if (inboxPanel->isInVisibleChain()) - { - gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); - } + { + gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } +} else { gSavedPerAccountSettings.setS32("InventoryInboxHeight", inboxPanel->getTargetDim()); @@ -448,7 +448,7 @@ void LLSidepanelInventory::onInfoButtonClicked() void LLSidepanelInventory::onShareButtonClicked() { - LLAvatarActions::shareWithAvatars(); + LLAvatarActions::shareWithAvatars(this); } void LLSidepanelInventory::onShopButtonClicked() @@ -472,7 +472,7 @@ void LLSidepanelInventory::performActionOnSelection(const std::string &action) } } - current_item->getListener()->performAction(mPanelMainInventory->getActivePanel()->getModel(), action); + static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->performAction(mPanelMainInventory->getActivePanel()->getModel(), action); } void LLSidepanelInventory::onWearButtonClicked() @@ -662,7 +662,7 @@ LLInventoryItem *LLSidepanelInventory::getSelectedItem() return NULL; } } - const LLUUID &item_id = current_item->getListener()->getUUID(); + const LLUUID &item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID(); LLInventoryItem *item = gInventory.getItem(item_id); return item; } @@ -671,7 +671,7 @@ U32 LLSidepanelInventory::getSelectedCount() { int count = 0; - std::set<LLUUID> selection_list = mPanelMainInventory->getActivePanel()->getRootFolder()->getSelectionList(); + std::set<LLFolderViewItem*> selection_list = mPanelMainInventory->getActivePanel()->getRootFolder()->getSelectionList(); count += selection_list.size(); if ((count == 0) && mInboxEnabled && (mInventoryPanelInbox != NULL)) @@ -722,9 +722,9 @@ void LLSidepanelInventory::clearSelections(bool clearMain, bool clearInbox) updateVerbs(); } -std::set<LLUUID> LLSidepanelInventory::getInboxSelectionList() +std::set<LLFolderViewItem*> LLSidepanelInventory::getInboxSelectionList() { - std::set<LLUUID> inventory_selected_uuids; + std::set<LLFolderViewItem*> inventory_selected_uuids; if (mInboxEnabled && (mInventoryPanelInbox != NULL)) { diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index a33607f50d..e8b2808d4f 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -63,7 +63,7 @@ public: BOOL isMainInventoryPanelActive() const; void clearSelections(bool clearMain, bool clearInbox); - std::set<LLUUID> getInboxSelectionList(); + std::set<LLFolderViewItem*> getInboxSelectionList(); void showItemInfoPanel(); void showTaskInfoPanel(); diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 1ce05da849..92c2863ffd 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -352,7 +352,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) getChildView("BtnCreator")->setEnabled(FALSE); getChildView("LabelCreatorTitle")->setEnabled(FALSE); getChildView("LabelCreatorName")->setEnabled(FALSE); - getChild<LLUICtrl>("LabelCreatorName")->setValue(getString("unknown")); + getChild<LLUICtrl>("LabelCreatorName")->setValue(getString("unknown_multiple")); } //////////////// diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index c351b1a128..5532bdc71a 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -101,6 +101,8 @@ BOOL LLSidepanelTaskInfo::postBuild() mDetailsBtn = getChild<LLButton>("details_btn"); mDetailsBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onDetailsButtonClicked, this)); + mDeedBtn = getChild<LLButton>("button deed"); + mLabelGroupName = getChild<LLNameBox>("Group Name Proxy"); childSetCommitCallback("Object Name", LLSidepanelTaskInfo::onCommitName,this); @@ -263,7 +265,7 @@ void LLSidepanelTaskInfo::disableAll() void LLSidepanelTaskInfo::refresh() { - LLButton* btn_deed_to_group = getChild<LLButton>("button deed"); + LLButton* btn_deed_to_group = mDeedBtn; if (btn_deed_to_group) { std::string deedText; diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index 124229af06..05edcda5ed 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -113,6 +113,7 @@ private: LLButton* mPayBtn; LLButton* mBuyBtn; LLButton* mDetailsBtn; + LLButton* mDeedBtn; protected: LLViewerObject* getObject(); diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 325a2d3004..3ed6e24498 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -55,7 +55,7 @@ #include "llviewershadermgr.h" static LLFastTimer::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling"); -static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); +static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound Partition"); const F32 SG_OCCLUSION_FUDGE = 0.25f; #define SG_DISCARD_TOLERANCE 0.01f @@ -68,6 +68,7 @@ const F32 SG_OCCLUSION_FUDGE = 0.25f; #define assert_states_valid(x) #endif +extern bool gShiftFrame; static U32 sZombieGroups = 0; U32 LLSpatialGroup::sNodeCount = 0; @@ -375,7 +376,6 @@ LLSpatialGroup::~LLSpatialGroup() } } - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); clearDrawMap(); clearAtlasList() ; } @@ -529,6 +529,7 @@ void LLSpatialGroup::setVisible() void LLSpatialGroup::validate() { + ll_assert_aligned(this,64); #if LL_OCTREE_PARANOIA_CHECK sg_assert(!isState(DIRTY)); @@ -541,7 +542,7 @@ void LLSpatialGroup::validate() validateDrawMap(); - for (element_iter i = getData().begin(); i != getData().end(); ++i) + for (element_iter i = getDataBegin(); i != getDataEnd(); ++i) { LLDrawable* drawable = *i; sg_assert(drawable->getSpatialGroup() == this); @@ -613,8 +614,6 @@ void LLSpatialGroup::validateDrawMap() BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - drawablep->updateSpatialExtents(); OctreeNode* parent = mOctreeNode->getOctParent(); @@ -636,7 +635,6 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate) BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_octree) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); if (!from_octree) { mOctreeNode->insert(drawablep); @@ -662,7 +660,6 @@ BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_oc void LLSpatialGroup::rebuildGeom() { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); if (!isDead()) { mSpatialPartition->rebuildGeom(this); @@ -758,7 +755,7 @@ BOOL LLSpatialGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& ma { const OctreeNode* node = mOctreeNode; - if (node->getData().empty()) + if (node->isEmpty()) { //don't do anything if there are no objects if (empty && mOctreeNode->getParent()) { //only root is allowed to be empty @@ -775,14 +772,14 @@ BOOL LLSpatialGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& ma clearState(OBJECT_DIRTY); //initialize bounding box to first element - OctreeNode::const_element_iter i = node->getData().begin(); + OctreeNode::const_element_iter i = node->getDataBegin(); LLDrawable* drawablep = *i; const LLVector4a* minMax = drawablep->getSpatialExtents(); newMin = minMax[0]; newMax = minMax[1]; - for (++i; i != node->getData().end(); ++i) + for (++i; i != node->getDataEnd(); ++i) { drawablep = *i; minMax = drawablep->getSpatialExtents(); @@ -874,7 +871,6 @@ LLSpatialGroup* LLSpatialGroup::getParent() BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); unbound(); if (mOctreeNode && !from_octree) { @@ -911,7 +907,6 @@ BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree) void LLSpatialGroup::shift(const LLVector4a &offset) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); LLVector4a t = mOctreeNode->getCenter(); t.add(offset); mOctreeNode->setCenter(t); @@ -923,7 +918,10 @@ void LLSpatialGroup::shift(const LLVector4a &offset) mObjectExtents[0].add(offset); mObjectExtents[1].add(offset); - //if (!mSpatialPartition->mRenderByGroup) + if (!mSpatialPartition->mRenderByGroup && + mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_TREE && + mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_TERRAIN && + mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_BRIDGE) { setState(GEOM_DIRTY); gPipeline.markRebuild(this, TRUE); @@ -963,8 +961,6 @@ void LLSpatialGroup::setState(U32 state) void LLSpatialGroup::setState(U32 state, S32 mode) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - llassert(state <= LLSpatialGroup::STATE_MASK); if (mode > STATE_MODE_SINGLE) @@ -1021,8 +1017,6 @@ void LLSpatialGroup::clearState(U32 state, S32 mode) { llassert(state <= LLSpatialGroup::STATE_MASK); - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - if (mode > STATE_MODE_SINGLE) { if (mode == STATE_MODE_DIFF) @@ -1079,8 +1073,6 @@ public: void LLSpatialGroup::setOcclusionState(U32 state, S32 mode) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - if (mode > STATE_MODE_SINGLE) { if (mode == STATE_MODE_DIFF) @@ -1145,8 +1137,6 @@ public: void LLSpatialGroup::clearOcclusionState(U32 state, S32 mode) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - if (mode > STATE_MODE_SINGLE) { if (mode == STATE_MODE_DIFF) @@ -1195,8 +1185,9 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) : mCurUpdatingSlotp(NULL), mCurUpdatingTexture (NULL) { + ll_assert_aligned(this,16); + sNodeCount++; - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); mViewAngle.splat(0.f); mLastUpdateViewAngle.splat(-1.f); @@ -1238,13 +1229,18 @@ void LLSpatialGroup::updateDistance(LLCamera &camera) return; } + if (gShiftFrame) + { + return; + } + #if !LL_RELEASE_FOR_DOWNLOAD if (isState(LLSpatialGroup::OBJECT_DIRTY)) { llerrs << "Spatial group dirty on distance update." << llendl; } #endif - if (!getData().empty()) + if (!isEmpty()) { mRadius = mSpatialPartition->mRenderByGroup ? mObjectBounds[1].getLength3().getF32() : (F32) mOctreeNode->getSize().getLength3().getF32(); @@ -1377,7 +1373,6 @@ BOOL LLSpatialGroup::changeLOD() void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); addObject(drawablep, FALSE, TRUE); unbound(); setState(OBJECT_DIRTY); @@ -1385,17 +1380,15 @@ void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep void LLSpatialGroup::handleRemoval(const TreeNode* node, LLDrawable* drawable) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); removeObject(drawable, TRUE); setState(OBJECT_DIRTY); } void LLSpatialGroup::handleDestruction(const TreeNode* node) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); setState(DEAD); - for (element_iter i = getData().begin(); i != getData().end(); ++i) + for (element_iter i = getDataBegin(); i != getDataEnd(); ++i) { LLDrawable* drawable = *i; if (drawable->getSpatialGroup() == this) @@ -1434,7 +1427,6 @@ void LLSpatialGroup::handleStateChange(const TreeNode* node) void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); if (child->getListenerCount() == 0) { new LLSpatialGroup(child, mSpatialPartition); @@ -1482,7 +1474,7 @@ void LLSpatialGroup::destroyGL(bool keep_occlusion) } - for (LLSpatialGroup::element_iter i = getData().begin(); i != getData().end(); ++i) + for (LLSpatialGroup::element_iter i = getDataBegin(); i != getDataEnd(); ++i) { LLDrawable* drawable = *i; for (S32 j = 0; j < drawable->getNumFaces(); j++) @@ -1780,7 +1772,6 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera) LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 buffer_usage) : mRenderByGroup(render_by_group), mBridge(NULL) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); mOcclusionEnabled = TRUE; mDrawableType = 0; mPartitionType = LLViewerRegion::PARTITION_NONE; @@ -1804,8 +1795,6 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 LLSpatialPartition::~LLSpatialPartition() { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - delete mOctree; mOctree = NULL; } @@ -1813,8 +1802,6 @@ LLSpatialPartition::~LLSpatialPartition() LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - drawablep->updateSpatialExtents(); //keep drawable from being garbage collected @@ -1836,14 +1823,16 @@ LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible) BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - - drawablep->setSpatialGroup(NULL); - if (!curp->removeObject(drawablep)) { OCT_ERRS << "Failed to remove drawable from octree!" << llendl; } + else + { + drawablep->setSpatialGroup(NULL); + } + + drawablep->setSpatialGroup(NULL); assert_octree_valid(mOctree); @@ -1852,8 +1841,6 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - // sanity check submitted by open source user bushing Spatula // who was seeing crashing here. (See VWR-424 reported by Bunny Mayne) if (!drawablep) @@ -1910,7 +1897,6 @@ public: void LLSpatialPartition::shift(const LLVector4a &offset) { //shift octree node bounding boxes by offset - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); LLSpatialShift shifter(offset); shifter.traverse(mOctree); } @@ -2114,7 +2100,7 @@ public: virtual void processGroup(LLSpatialGroup* group) { - llassert(!group->isState(LLSpatialGroup::DIRTY) && !group->getData().empty()) + llassert(!group->isState(LLSpatialGroup::DIRTY) && !group->isEmpty()) if (mRes < 2) { @@ -2181,7 +2167,7 @@ public: { LLSpatialGroup::OctreeNode* branch = group->mOctreeNode; - for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getData().begin(); i != branch->getData().end(); ++i) + for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) { LLDrawable* drawable = *i; @@ -2305,7 +2291,7 @@ public: LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0); group->destroyGL(); - for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i) + for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawable = *i; if (drawable->getVObj().notNull() && !group->mSpatialPartition->mRenderByGroup) @@ -2324,7 +2310,6 @@ public: void LLSpatialPartition::restoreGL() { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); } void LLSpatialPartition::resetVertexBuffers() @@ -2367,7 +2352,6 @@ BOOL LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera) S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* results, BOOL for_select) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); #if LL_OCTREE_PARANOIA_CHECK ((LLSpatialGroup*)mOctree->getListener(0))->checkStates(); #endif @@ -2615,7 +2599,7 @@ void renderOctree(LLSpatialGroup* group) gGL.flush(); glLineWidth(1.f); gGL.flush(); - for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i) + for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawable = *i; if (!group->mSpatialPartition->isBridge()) @@ -2661,7 +2645,7 @@ void renderOctree(LLSpatialGroup* group) } else { - if (group->mBufferUsage == GL_STATIC_DRAW_ARB && !group->getData().empty() + if (group->mBufferUsage == GL_STATIC_DRAW_ARB && !group->isEmpty() && group->mSpatialPartition->mRenderByGroup) { col.setVec(0.8f, 0.4f, 0.1f, 0.1f); @@ -2729,7 +2713,7 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); BOOL render_objects = (!LLPipeline::sUseOcclusion || !group->isOcclusionState(LLSpatialGroup::OCCLUDED)) && group->isVisible() && - !group->getData().empty(); + !group->isEmpty(); if (render_objects) { @@ -2762,7 +2746,7 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera) void renderCrossHairs(LLVector3 position, F32 size, LLColor4 color) { - gGL.diffuseColor4fv(color.mV); + gGL.color4fv(color.mV); gGL.begin(LLRender::LINES); { gGL.vertex3fv((position - LLVector3(size, 0.f, 0.f)).mV); @@ -3460,7 +3444,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume) void renderPhysicsShapes(LLSpatialGroup* group) { - for (LLSpatialGroup::OctreeNode::const_element_iter i = group->getData().begin(); i != group->getData().end(); ++i) + for (LLSpatialGroup::OctreeNode::const_element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawable = *i; LLVOVolume* volume = drawable->getVOVolume(); @@ -3484,6 +3468,8 @@ void renderPhysicsShapes(LLSpatialGroup* group) LLViewerObject* object = drawable->getVObj(); if (object && object->getPCode() == LLViewerObject::LL_VO_SURFACE_PATCH) { + gGL.pushMatrix(); + gGL.multMatrix((F32*) object->getRegion()->mRenderMatrix.mMatrix); //push face vertices for terrain for (S32 i = 0; i < drawable->getNumFaces(); ++i) { @@ -3505,6 +3491,7 @@ void renderPhysicsShapes(LLSpatialGroup* group) } } } + gGL.popMatrix(); } } } @@ -3809,7 +3796,7 @@ public: LLVector3 center, size; - if (branch->getData().empty()) + if (branch->isEmpty()) { gGL.diffuseColor3f(1.f,0.2f,0.f); center.set(branch->getCenter().getF32ptr()); @@ -3845,8 +3832,8 @@ public: } gGL.begin(LLRender::TRIANGLES); - for (LLOctreeNode<LLVolumeTriangle>::const_element_iter iter = branch->getData().begin(); - iter != branch->getData().end(); + for (LLOctreeNode<LLVolumeTriangle>::const_element_iter iter = branch->getDataBegin(); + iter != branch->getDataEnd(); ++iter) { const LLVolumeTriangle* tri = *iter; @@ -4010,7 +3997,7 @@ void renderAgentTarget(LLVOAvatar* avatar) if (avatar->isSelf()) { renderCrossHairs(avatar->getPositionAgent(), 0.2f, LLColor4(1, 0, 0, 0.8f)); - renderCrossHairs(avatar->mDrawable->getPositionAgent(), 0.2f, LLColor4(1, 0, 0, 0.8f)); + renderCrossHairs(avatar->mDrawable->getPositionAgent(), 0.2f, LLColor4(0, 1, 0, 0.8f)); renderCrossHairs(avatar->mRoot.getWorldPosition(), 0.2f, LLColor4(1, 1, 1, 0.8f)); renderCrossHairs(avatar->mPelvisp->getWorldPosition(), 0.2f, LLColor4(0, 0, 1, 0.8f)); } @@ -4083,7 +4070,7 @@ public: if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_BBOXES)) { - if (!group->getData().empty()) + if (!group->isEmpty()) { gGL.diffuseColor3f(0,0,1); drawBoxOutline(group->mObjectBounds[0], @@ -4091,7 +4078,7 @@ public: } } - for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getData().begin(); i != branch->getData().end(); ++i) + for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) { LLDrawable* drawable = *i; @@ -4280,7 +4267,7 @@ public: return; } - for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getData().begin(); i != branch->getData().end(); ++i) + for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) { LLDrawable* drawable = *i; @@ -4422,8 +4409,6 @@ void LLSpatialPartition::renderDebug() sCurMaxTexPriority = 0.f; } - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - LLGLDisable cullface(GL_CULL_FACE); LLGLEnable blend(GL_BLEND); gGL.setSceneBlendType(LLRender::BT_ALPHA); @@ -4504,7 +4489,7 @@ public: virtual void visit(const LLSpatialGroup::OctreeNode* branch) { - for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getData().begin(); i != branch->getData().end(); ++i) + for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) { check(*i); } @@ -4690,28 +4675,70 @@ LLVertexBuffer* LLGeometryManager::createVertexBuffer(U32 type_mask, U32 usage) LLCullResult::LLCullResult() { + mVisibleGroupsAllocated = 0; + mAlphaGroupsAllocated = 0; + mOcclusionGroupsAllocated = 0; + mDrawableGroupsAllocated = 0; + mVisibleListAllocated = 0; + mVisibleBridgeAllocated = 0; + + mVisibleGroups.clear(); + mVisibleGroups.push_back(NULL); + mVisibleGroupsEnd = &mVisibleGroups[0]; + mAlphaGroups.clear(); + mAlphaGroups.push_back(NULL); + mAlphaGroupsEnd = &mAlphaGroups[0]; + mOcclusionGroups.clear(); + mOcclusionGroups.push_back(NULL); + mOcclusionGroupsEnd = &mOcclusionGroups[0]; + mDrawableGroups.clear(); + mDrawableGroups.push_back(NULL); + mDrawableGroupsEnd = &mDrawableGroups[0]; + mVisibleList.clear(); + mVisibleList.push_back(NULL); + mVisibleListEnd = &mVisibleList[0]; + mVisibleBridge.clear(); + mVisibleBridge.push_back(NULL); + mVisibleBridgeEnd = &mVisibleBridge[0]; + + for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++) + { + mRenderMap[i].clear(); + mRenderMap[i].push_back(NULL); + mRenderMapEnd[i] = &mRenderMap[i][0]; + mRenderMapAllocated[i] = 0; + } + clear(); } +template <class T, class V> +void LLCullResult::pushBack(T& head, U32& count, V* val) +{ + head[count] = val; + head.push_back(NULL); + count++; +} + void LLCullResult::clear() { mVisibleGroupsSize = 0; - mVisibleGroupsEnd = mVisibleGroups.begin(); + mVisibleGroupsEnd = &mVisibleGroups[0]; mAlphaGroupsSize = 0; - mAlphaGroupsEnd = mAlphaGroups.begin(); + mAlphaGroupsEnd = &mAlphaGroups[0]; mOcclusionGroupsSize = 0; - mOcclusionGroupsEnd = mOcclusionGroups.begin(); + mOcclusionGroupsEnd = &mOcclusionGroups[0]; mDrawableGroupsSize = 0; - mDrawableGroupsEnd = mDrawableGroups.begin(); + mDrawableGroupsEnd = &mDrawableGroups[0]; mVisibleListSize = 0; - mVisibleListEnd = mVisibleList.begin(); + mVisibleListEnd = &mVisibleList[0]; mVisibleBridgeSize = 0; - mVisibleBridgeEnd = mVisibleBridge.begin(); + mVisibleBridgeEnd = &mVisibleBridge[0]; for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++) @@ -4721,176 +4748,176 @@ void LLCullResult::clear() mRenderMap[i][j] = 0; } mRenderMapSize[i] = 0; - mRenderMapEnd[i] = mRenderMap[i].begin(); + mRenderMapEnd[i] = &(mRenderMap[i][0]); } } -LLCullResult::sg_list_t::iterator LLCullResult::beginVisibleGroups() +LLCullResult::sg_iterator LLCullResult::beginVisibleGroups() { - return mVisibleGroups.begin(); + return &mVisibleGroups[0]; } -LLCullResult::sg_list_t::iterator LLCullResult::endVisibleGroups() +LLCullResult::sg_iterator LLCullResult::endVisibleGroups() { return mVisibleGroupsEnd; } -LLCullResult::sg_list_t::iterator LLCullResult::beginAlphaGroups() +LLCullResult::sg_iterator LLCullResult::beginAlphaGroups() { - return mAlphaGroups.begin(); + return &mAlphaGroups[0]; } -LLCullResult::sg_list_t::iterator LLCullResult::endAlphaGroups() +LLCullResult::sg_iterator LLCullResult::endAlphaGroups() { return mAlphaGroupsEnd; } -LLCullResult::sg_list_t::iterator LLCullResult::beginOcclusionGroups() +LLCullResult::sg_iterator LLCullResult::beginOcclusionGroups() { - return mOcclusionGroups.begin(); + return &mOcclusionGroups[0]; } -LLCullResult::sg_list_t::iterator LLCullResult::endOcclusionGroups() +LLCullResult::sg_iterator LLCullResult::endOcclusionGroups() { return mOcclusionGroupsEnd; } -LLCullResult::sg_list_t::iterator LLCullResult::beginDrawableGroups() +LLCullResult::sg_iterator LLCullResult::beginDrawableGroups() { - return mDrawableGroups.begin(); + return &mDrawableGroups[0]; } -LLCullResult::sg_list_t::iterator LLCullResult::endDrawableGroups() +LLCullResult::sg_iterator LLCullResult::endDrawableGroups() { return mDrawableGroupsEnd; } -LLCullResult::drawable_list_t::iterator LLCullResult::beginVisibleList() +LLCullResult::drawable_iterator LLCullResult::beginVisibleList() { - return mVisibleList.begin(); + return &mVisibleList[0]; } -LLCullResult::drawable_list_t::iterator LLCullResult::endVisibleList() +LLCullResult::drawable_iterator LLCullResult::endVisibleList() { return mVisibleListEnd; } -LLCullResult::bridge_list_t::iterator LLCullResult::beginVisibleBridge() +LLCullResult::bridge_iterator LLCullResult::beginVisibleBridge() { - return mVisibleBridge.begin(); + return &mVisibleBridge[0]; } -LLCullResult::bridge_list_t::iterator LLCullResult::endVisibleBridge() +LLCullResult::bridge_iterator LLCullResult::endVisibleBridge() { return mVisibleBridgeEnd; } -LLCullResult::drawinfo_list_t::iterator LLCullResult::beginRenderMap(U32 type) +LLCullResult::drawinfo_iterator LLCullResult::beginRenderMap(U32 type) { - return mRenderMap[type].begin(); + return &mRenderMap[type][0]; } -LLCullResult::drawinfo_list_t::iterator LLCullResult::endRenderMap(U32 type) +LLCullResult::drawinfo_iterator LLCullResult::endRenderMap(U32 type) { return mRenderMapEnd[type]; } void LLCullResult::pushVisibleGroup(LLSpatialGroup* group) { - if (mVisibleGroupsSize < mVisibleGroups.size()) + if (mVisibleGroupsSize < mVisibleGroupsAllocated) { mVisibleGroups[mVisibleGroupsSize] = group; } else { - mVisibleGroups.push_back(group); + pushBack(mVisibleGroups, mVisibleGroupsAllocated, group); } ++mVisibleGroupsSize; - mVisibleGroupsEnd = mVisibleGroups.begin()+mVisibleGroupsSize; + mVisibleGroupsEnd = &mVisibleGroups[mVisibleGroupsSize]; } void LLCullResult::pushAlphaGroup(LLSpatialGroup* group) { - if (mAlphaGroupsSize < mAlphaGroups.size()) + if (mAlphaGroupsSize < mAlphaGroupsAllocated) { mAlphaGroups[mAlphaGroupsSize] = group; } else { - mAlphaGroups.push_back(group); + pushBack(mAlphaGroups, mAlphaGroupsAllocated, group); } ++mAlphaGroupsSize; - mAlphaGroupsEnd = mAlphaGroups.begin()+mAlphaGroupsSize; + mAlphaGroupsEnd = &mAlphaGroups[mAlphaGroupsSize]; } void LLCullResult::pushOcclusionGroup(LLSpatialGroup* group) { - if (mOcclusionGroupsSize < mOcclusionGroups.size()) + if (mOcclusionGroupsSize < mOcclusionGroupsAllocated) { mOcclusionGroups[mOcclusionGroupsSize] = group; } else { - mOcclusionGroups.push_back(group); + pushBack(mOcclusionGroups, mOcclusionGroupsAllocated, group); } ++mOcclusionGroupsSize; - mOcclusionGroupsEnd = mOcclusionGroups.begin()+mOcclusionGroupsSize; + mOcclusionGroupsEnd = &mOcclusionGroups[mOcclusionGroupsSize]; } void LLCullResult::pushDrawableGroup(LLSpatialGroup* group) { - if (mDrawableGroupsSize < mDrawableGroups.size()) + if (mDrawableGroupsSize < mDrawableGroupsAllocated) { mDrawableGroups[mDrawableGroupsSize] = group; } else { - mDrawableGroups.push_back(group); + pushBack(mDrawableGroups, mDrawableGroupsAllocated, group); } ++mDrawableGroupsSize; - mDrawableGroupsEnd = mDrawableGroups.begin()+mDrawableGroupsSize; + mDrawableGroupsEnd = &mDrawableGroups[mDrawableGroupsSize]; } void LLCullResult::pushDrawable(LLDrawable* drawable) { - if (mVisibleListSize < mVisibleList.size()) + if (mVisibleListSize < mVisibleListAllocated) { mVisibleList[mVisibleListSize] = drawable; } else { - mVisibleList.push_back(drawable); + pushBack(mVisibleList, mVisibleListAllocated, drawable); } ++mVisibleListSize; - mVisibleListEnd = mVisibleList.begin()+mVisibleListSize; + mVisibleListEnd = &mVisibleList[mVisibleListSize]; } void LLCullResult::pushBridge(LLSpatialBridge* bridge) { - if (mVisibleBridgeSize < mVisibleBridge.size()) + if (mVisibleBridgeSize < mVisibleBridgeAllocated) { mVisibleBridge[mVisibleBridgeSize] = bridge; } else { - mVisibleBridge.push_back(bridge); + pushBack(mVisibleBridge, mVisibleBridgeAllocated, bridge); } ++mVisibleBridgeSize; - mVisibleBridgeEnd = mVisibleBridge.begin()+mVisibleBridgeSize; + mVisibleBridgeEnd = &mVisibleBridge[mVisibleBridgeSize]; } void LLCullResult::pushDrawInfo(U32 type, LLDrawInfo* draw_info) { - if (mRenderMapSize[type] < mRenderMap[type].size()) + if (mRenderMapSize[type] < mRenderMapAllocated[type]) { mRenderMap[type][mRenderMapSize[type]] = draw_info; } else { - mRenderMap[type].push_back(draw_info); + pushBack(mRenderMap[type], mRenderMapAllocated[type], draw_info); } ++mRenderMapSize[type]; - mRenderMapEnd[type] = mRenderMap[type].begin() + mRenderMapSize[type]; + mRenderMapEnd[type] = &(mRenderMap[type][mRenderMapSize[type]]); } diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index f0e4f15a83..b1706d9d35 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -68,6 +68,16 @@ protected: ~LLDrawInfo(); public: + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + LLDrawInfo(const LLDrawInfo& rhs) { @@ -106,7 +116,7 @@ public: F32 mPartSize; F32 mVSize; LLSpatialGroup* mGroup; - LLFace* mFace; //associated face + LL_ALIGN_16(LLFace* mFace); //associated face F32 mDistance; U32 mDrawMode; @@ -181,7 +191,7 @@ public: }; }; -LL_ALIGN_PREFIX(64) +LL_ALIGN_PREFIX(16) class LLSpatialGroup : public LLOctreeListener<LLDrawable> { friend class LLSpatialPartition; @@ -193,6 +203,16 @@ public: *this = rhs; } + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + const LLSpatialGroup& operator=(const LLSpatialGroup& rhs) { llerrs << "Illegal operation!" << llendl; @@ -325,8 +345,15 @@ public: void dirtyGeom() { setState(GEOM_DIRTY); } void dirtyMesh() { setState(MESH_DIRTY); } + + //octree wrappers to make code more readable element_list& getData() { return mOctreeNode->getData(); } + element_iter getDataBegin() { return mOctreeNode->getDataBegin(); } + element_iter getDataEnd() { return mOctreeNode->getDataEnd(); } + bool hasElement(LLDrawable* drawablep) { return std::find(mOctreeNode->getDataBegin(), mOctreeNode->getDataEnd(), drawablep) != mOctreeNode->getDataEnd(); } + U32 getElementCount() const { return mOctreeNode->getElementCount(); } + bool isEmpty() const { return mOctreeNode->isEmpty(); } void drawObjectBox(LLColor4 col); @@ -370,12 +397,12 @@ public: V4_COUNT = 10 } eV4Index; - LLVector4a mBounds[2]; // bounding box (center, size) of this node and all its children (tight fit to objects) - LLVector4a mExtents[2]; // extents (min, max) of this node and all its children - LLVector4a mObjectExtents[2]; // extents (min, max) of objects in this node - LLVector4a mObjectBounds[2]; // bounding box (center, size) of objects in this node - LLVector4a mViewAngle; - LLVector4a mLastUpdateViewAngle; + LL_ALIGN_16(LLVector4a mBounds[2]); // bounding box (center, size) of this node and all its children (tight fit to objects) + LL_ALIGN_16(LLVector4a mExtents[2]); // extents (min, max) of this node and all its children + LL_ALIGN_16(LLVector4a mObjectExtents[2]); // extents (min, max) of objects in this node + LL_ALIGN_16(LLVector4a mObjectBounds[2]); // bounding box (center, size) of objects in this node + LL_ALIGN_16(LLVector4a mViewAngle); + LL_ALIGN_16(LLVector4a mLastUpdateViewAngle); F32 mObjectBoxSize; //cached mObjectBounds[1].getLength3() @@ -547,29 +574,34 @@ public: typedef std::vector<LLSpatialBridge*> bridge_list_t; typedef std::vector<LLDrawInfo*> drawinfo_list_t; + typedef LLSpatialGroup** sg_iterator; + typedef LLSpatialBridge** bridge_iterator; + typedef LLDrawInfo** drawinfo_iterator; + typedef LLDrawable** drawable_iterator; + void clear(); - sg_list_t::iterator beginVisibleGroups(); - sg_list_t::iterator endVisibleGroups(); + sg_iterator beginVisibleGroups(); + sg_iterator endVisibleGroups(); - sg_list_t::iterator beginAlphaGroups(); - sg_list_t::iterator endAlphaGroups(); + sg_iterator beginAlphaGroups(); + sg_iterator endAlphaGroups(); bool hasOcclusionGroups() { return mOcclusionGroupsSize > 0; } - sg_list_t::iterator beginOcclusionGroups(); - sg_list_t::iterator endOcclusionGroups(); + sg_iterator beginOcclusionGroups(); + sg_iterator endOcclusionGroups(); - sg_list_t::iterator beginDrawableGroups(); - sg_list_t::iterator endDrawableGroups(); + sg_iterator beginDrawableGroups(); + sg_iterator endDrawableGroups(); - drawable_list_t::iterator beginVisibleList(); - drawable_list_t::iterator endVisibleList(); + drawable_iterator beginVisibleList(); + drawable_iterator endVisibleList(); - bridge_list_t::iterator beginVisibleBridge(); - bridge_list_t::iterator endVisibleBridge(); + bridge_iterator beginVisibleBridge(); + bridge_iterator endVisibleBridge(); - drawinfo_list_t::iterator beginRenderMap(U32 type); - drawinfo_list_t::iterator endRenderMap(U32 type); + drawinfo_iterator beginRenderMap(U32 type); + drawinfo_iterator endRenderMap(U32 type); void pushVisibleGroup(LLSpatialGroup* group); void pushAlphaGroup(LLSpatialGroup* group); @@ -589,28 +621,41 @@ public: void assertDrawMapsEmpty(); private: + + template <class T, class V> void pushBack(T &head, U32& count, V* val); + U32 mVisibleGroupsSize; U32 mAlphaGroupsSize; U32 mOcclusionGroupsSize; U32 mDrawableGroupsSize; U32 mVisibleListSize; U32 mVisibleBridgeSize; + + U32 mVisibleGroupsAllocated; + U32 mAlphaGroupsAllocated; + U32 mOcclusionGroupsAllocated; + U32 mDrawableGroupsAllocated; + U32 mVisibleListAllocated; + U32 mVisibleBridgeAllocated; + U32 mRenderMapSize[LLRenderPass::NUM_RENDER_TYPES]; sg_list_t mVisibleGroups; - sg_list_t::iterator mVisibleGroupsEnd; + sg_iterator mVisibleGroupsEnd; sg_list_t mAlphaGroups; - sg_list_t::iterator mAlphaGroupsEnd; + sg_iterator mAlphaGroupsEnd; sg_list_t mOcclusionGroups; - sg_list_t::iterator mOcclusionGroupsEnd; + sg_iterator mOcclusionGroupsEnd; sg_list_t mDrawableGroups; - sg_list_t::iterator mDrawableGroupsEnd; + sg_iterator mDrawableGroupsEnd; drawable_list_t mVisibleList; - drawable_list_t::iterator mVisibleListEnd; + drawable_iterator mVisibleListEnd; bridge_list_t mVisibleBridge; - bridge_list_t::iterator mVisibleBridgeEnd; + bridge_iterator mVisibleBridgeEnd; drawinfo_list_t mRenderMap[LLRenderPass::NUM_RENDER_TYPES]; - drawinfo_list_t::iterator mRenderMapEnd[LLRenderPass::NUM_RENDER_TYPES]; + U32 mRenderMapAllocated[LLRenderPass::NUM_RENDER_TYPES]; + drawinfo_iterator mRenderMapEnd[LLRenderPass::NUM_RENDER_TYPES]; + }; diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 07d2f1ad6f..8783d99b11 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -31,12 +31,15 @@ #include "llagent.h" #include "llappviewer.h" #include "llimview.h" +#include "llgroupmgr.h" #include "llsdutil.h" #include "lluicolortable.h" #include "llviewerobjectlist.h" #include "llvoavatar.h" #include "llworld.h" +extern LLControlGroup gSavedSettings; + const LLColor4 INACTIVE_COLOR(0.3f, 0.3f, 0.3f, 0.5f); const LLColor4 ACTIVE_COLOR(0.5f, 0.5f, 0.5f, 1.f); @@ -84,6 +87,19 @@ bool LLSpeaker::isInVoiceChannel() return mStatus <= LLSpeaker::STATUS_VOICE_ACTIVE || mStatus == LLSpeaker::STATUS_MUTED; } +LLSpeakerUpdateSpeakerEvent::LLSpeakerUpdateSpeakerEvent(LLSpeaker* source) +: LLEvent(source, "Speaker update speaker event"), + mSpeakerID (source->mID) +{ +} + +LLSD LLSpeakerUpdateSpeakerEvent::getValue() +{ + LLSD ret; + ret["id"] = mSpeakerID; + return ret; +} + LLSpeakerUpdateModeratorEvent::LLSpeakerUpdateModeratorEvent(LLSpeaker* source) : LLEvent(source, "Speaker add moderator event"), mSpeakerID (source->mID), @@ -241,16 +257,63 @@ bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_ return true; } +bool LLSpeakersDelayActionsStorage::isTimerStarted(const LLUUID& speaker_id) +{ + return (mActionTimersMap.size() > 0) && (mActionTimersMap.find(speaker_id) != mActionTimersMap.end()); +} + +// +// ModerationResponder +// + +class ModerationResponder : public LLHTTPClient::Responder +{ +public: + ModerationResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + + if ( gIMMgr ) + { + //403 == you're not a mod + //should be disabled if you're not a moderator + if ( 403 == status ) + { + gIMMgr->showSessionEventError( + "mute", + "not_a_mod_error", + mSessionID); + } + else + { + gIMMgr->showSessionEventError( + "mute", + "generic_request_error", + mSessionID); + } + } + } + +private: + LLUUID mSessionID; +}; // // LLSpeakerMgr // LLSpeakerMgr::LLSpeakerMgr(LLVoiceChannel* channelp) : - mVoiceChannel(channelp) -, mVoiceModerated(false) -, mModerateModeHandledFirstTime(false) + mVoiceChannel(channelp), + mVoiceModerated(false), + mModerateModeHandledFirstTime(false), + mSpeakerListUpdated(false) { + mGetListTime.reset(); static LLUICachedControl<F32> remove_delay ("SpeakerParticipantRemoveDelay", 10.0); mSpeakerDelayRemover = new LLSpeakersDelayActionsStorage(boost::bind(&LLSpeakerMgr::removeSpeaker, this, _1), remove_delay); @@ -263,7 +326,11 @@ LLSpeakerMgr::~LLSpeakerMgr() LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::string& name, LLSpeaker::ESpeakerStatus status, LLSpeaker::ESpeakerType type) { - if (id.isNull()) return NULL; + LLUUID session_id = getSessionID(); + if (id.isNull() || (id == session_id)) + { + return NULL; + } LLPointer<LLSpeaker> speakerp; if (mSpeakers.find(id) == mSpeakers.end()) @@ -345,12 +412,10 @@ void LLSpeakerMgr::update(BOOL resort_ok) // update status of all current speakers BOOL voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()); - for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end();) + for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); speaker_it++) { LLUUID speaker_id = speaker_it->first; LLSpeaker* speakerp = speaker_it->second; - - speaker_map_t::iterator cur_speaker_it = speaker_it++; if (voice_channel_active && LLVoiceClient::getInstance()->getVoiceEnabled(speaker_id)) { @@ -374,6 +439,7 @@ void LLSpeakerMgr::update(BOOL resort_ok) { speakerp->mLastSpokeTime = mSpeechTimer.getElapsedTimeF32(); speakerp->mHasSpoken = TRUE; + fireEvent(new LLSpeakerUpdateSpeakerEvent(speakerp), "update_speaker"); } speakerp->mStatus = LLSpeaker::STATUS_SPEAKING; // interpolate between active color and full speaking color based on power of speech output @@ -448,24 +514,89 @@ void LLSpeakerMgr::update(BOOL resort_ok) void LLSpeakerMgr::updateSpeakerList() { - // are we bound to the currently active voice channel? + // Are we bound to the currently active voice channel? 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) + std::set<LLUUID> participants; + LLVoiceClient::getInstance()->getParticipantList(participants); + // If we are, add all voice client participants to our list of known speakers + for (std::set<LLUUID>::iterator participant_it = participants.begin(); participant_it != participants.end(); ++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)); - - } } + else + { + // If not, check if the list is empty, except if it's Nearby Chat (session_id NULL). + LLUUID session_id = getSessionID(); + if (!session_id.isNull() && !mSpeakerListUpdated) + { + // If the list is empty, we update it with whatever we have locally so that it doesn't stay empty too long. + // *TODO: Fix the server side code that sometimes forgets to send back the list of participants after a chat started. + // (IOW, fix why we get no ChatterBoxSessionAgentListUpdates message after the initial ChatterBoxSessionStartReply) + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); + if (session->isGroupSessionType() && (mSpeakers.size() <= 1)) + { + const F32 load_group_timeout = gSavedSettings.getF32("ChatLoadGroupTimeout"); + // For groups, we need to hit the group manager. + // Note: The session uuid and the group uuid are actually one and the same. If that was to change, this will fail. + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(session_id); + if (!gdatap && (mGetListTime.getElapsedTimeF32() >= load_group_timeout)) + { + // Request the data the first time around + LLGroupMgr::getInstance()->sendCapGroupMembersRequest(session_id); + } + else if (gdatap && gdatap->isMemberDataComplete() && !gdatap->mMembers.empty()) + { + // Add group members when we get the complete list (note: can take a while before we get that list) + LLGroupMgrGroupData::member_list_t::iterator member_it = gdatap->mMembers.begin(); + const S32 load_group_max_members = gSavedSettings.getS32("ChatLoadGroupMaxMembers"); + S32 updated = 0; + while (member_it != gdatap->mMembers.end()) + { + LLGroupMemberData* member = member_it->second; + LLUUID id = member_it->first; + // Add only members who are online and not already in the list + if ((member->getOnlineStatus() == "Online") && (mSpeakers.find(id) == mSpeakers.end())) + { + LLPointer<LLSpeaker> speakerp = setSpeaker(id, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); + speakerp->mIsModerator = ((member->getAgentPowers() & GP_SESSION_MODERATOR) == GP_SESSION_MODERATOR); + updated++; + } + ++member_it; + // Limit the number of "manually updated" participants to a reasonable number to avoid severe fps drop + // *TODO : solve the perf issue of having several hundreds of widgets in the conversation list + if (updated >= load_group_max_members) + break; + } + mSpeakerListUpdated = true; + } + } + else if (mSpeakers.size() == 0) + { + // For all other session type (ad-hoc, P2P, avaline), we use the initial participants targets list + for (uuid_vec_t::iterator it = session->mInitialTargetIDs.begin();it!=session->mInitialTargetIDs.end();++it) + { + // Add buddies if they are on line, add any other avatar. + if (!LLAvatarTracker::instance().isBuddy(*it) || LLAvatarTracker::instance().isBuddyOnline(*it)) + { + setSpeaker(*it, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); + } + } + mSpeakerListUpdated = true; + } + else + { + // The list has been updated the normal way (i.e. by a ChatterBoxSessionAgentListUpdates received from the server) + mSpeakerListUpdated = true; + } + } + } + // Always add the current agent (it has to be there...). Will do nothing if already there. + setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); } void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp) @@ -530,6 +661,10 @@ const LLUUID LLSpeakerMgr::getSessionID() return mVoiceChannel->getSessionID(); } +bool LLSpeakerMgr::isSpeakerToBeRemoved(const LLUUID& speaker_id) +{ + return mSpeakerDelayRemover && mSpeakerDelayRemover->isTimerStarted(speaker_id); +} void LLSpeakerMgr::setSpeakerTyping(const LLUUID& speaker_id, BOOL typing) { @@ -548,6 +683,7 @@ void LLSpeakerMgr::speakerChatted(const LLUUID& speaker_id) { speakerp->mLastSpokeTime = mSpeechTimer.getElapsedTimeF32(); speakerp->mHasSpoken = TRUE; + fireEvent(new LLSpeakerUpdateSpeakerEvent(speakerp), "update_speaker"); } } @@ -718,43 +854,6 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) } } -class ModerationResponder : public LLHTTPClient::Responder -{ -public: - ModerationResponder(const LLUUID& session_id) - { - mSessionID = session_id; - } - - virtual void error(U32 status, const std::string& reason) - { - llwarns << status << ": " << reason << llendl; - - if ( gIMMgr ) - { - //403 == you're not a mod - //should be disabled if you're not a moderator - if ( 403 == status ) - { - gIMMgr->showSessionEventError( - "mute", - "not_a_mod_error", - mSessionID); - } - else - { - gIMMgr->showSessionEventError( - "mute", - "generic_request_error", - mSessionID); - } - } - } - -private: - LLUUID mSessionID; -}; - void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id) { LLPointer<LLSpeaker> speakerp = findSpeaker(speaker_id); diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index b9358cf37c..e953dd0e1a 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -29,7 +29,6 @@ #include "llevent.h" #include "lleventtimer.h" -#include "llspeakers.h" #include "llvoicechannel.h" class LLSpeakerMgr; @@ -80,6 +79,15 @@ public: BOOL mModeratorMutedText; }; +class LLSpeakerUpdateSpeakerEvent : public LLOldEvents::LLEvent +{ +public: + LLSpeakerUpdateSpeakerEvent(LLSpeaker* source); + /*virtual*/ LLSD getValue(); +private: + const LLUUID& mSpeakerID; +}; + class LLSpeakerUpdateModeratorEvent : public LLOldEvents::LLEvent { public: @@ -185,6 +193,8 @@ public: void unsetActionTimer(const LLUUID& speaker_id); void removeAllTimers(); + + bool isTimerStarted(const LLUUID& speaker_id); private: /** * Callback of the each instance of LLSpeakerActionTimer. @@ -229,6 +239,7 @@ public: void getSpeakerList(speaker_list_t* speaker_list, BOOL include_text); LLVoiceChannel* getVoiceChannel() { return mVoiceChannel; } const LLUUID getSessionID(); + bool isSpeakerToBeRemoved(const LLUUID& speaker_id); /** * Removes avaline speaker. @@ -252,6 +263,8 @@ protected: typedef std::map<LLUUID, LLPointer<LLSpeaker> > speaker_map_t; speaker_map_t mSpeakers; + bool mSpeakerListUpdated; + LLTimer mGetListTime; speaker_list_t mSpeakersSorted; LLFrameTimer mSpeechTimer; diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index 9b38bf22ff..07e9371124 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -74,6 +74,16 @@ public: */ void unregisterSpeakingIndicator(const LLUUID& speaker_id, const LLSpeakingIndicator* const speaking_indicator); + /** + * Callback of changing voice participant list (from LLVoiceClientParticipantObserver). + * + * Switches off indicators had been switched on and switches on indicators of current participants list. + * There is only a few indicators in lists should be switched off/on. + * So, method does not calculate difference between these list it only switches off already + * switched on indicators and switches on indicators of voice channel participants + */ + void onParticipantsChanged(); + private: typedef std::set<LLUUID> speaker_ids_t; typedef std::multimap<LLUUID, LLSpeakingIndicator*> speaking_indicators_mmap_t; @@ -94,16 +104,6 @@ private: void sOnCurrentChannelChanged(const LLUUID& session_id); /** - * Callback of changing voice participant list (from LLVoiceClientParticipantObserver). - * - * Switches off indicators had been switched on and switches on indicators of current participants list. - * There is only a few indicators in lists should be switched off/on. - * So, method does not calculate difference between these list it only switches off already - * switched on indicators and switches on indicators of voice channel participants - */ - void onParticipantsChanged(); - - /** * Changes state of indicators specified by LLUUIDs * * @param speakers_uuids - avatars' LLUUIDs whose speaking indicators should be switched @@ -237,28 +237,18 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea { was_found = true; LLSpeakingIndicator* indicator = (*it_indicator).second; + was_switched_on = was_switched_on || switch_on; - BOOL switch_current_on = switch_on; - - // we should show indicator for specified voice session only if this is current channel. EXT-5562. - if (switch_current_on && indicator->getTargetSessionID().notNull()) - { - switch_current_on = indicator->getTargetSessionID() == session_id; - LL_DEBUGS("SpeakingIndicator") << "Session: " << session_id << ", target: " << indicator->getTargetSessionID() << ", the same? = " << switch_current_on << LL_ENDL; - } - was_switched_on = was_switched_on || switch_current_on; - - indicator->switchIndicator(switch_current_on); - + indicator->switchIndicator(switch_on); } if (was_found) { - LL_DEBUGS("SpeakingIndicator") << mSpeakingIndicators.count(*it_uuid) << " indicators where found" << LL_ENDL; + LL_DEBUGS("SpeakingIndicator") << mSpeakingIndicators.count(*it_uuid) << " indicators were found" << LL_ENDL; if (switch_on && !was_switched_on) { - LL_DEBUGS("SpeakingIndicator") << "but non of them where switched on" << LL_ENDL; + LL_DEBUGS("SpeakingIndicator") << "but none of them were switched on" << LL_ENDL; } if (was_switched_on) @@ -314,5 +304,13 @@ void LLSpeakingIndicatorManager::unregisterSpeakingIndicator(const LLUUID& speak } } +void LLSpeakingIndicatorManager::updateSpeakingIndicators() +{ + if(SpeakingIndicatorManager::instanceExists()) + { + SpeakingIndicatorManager::instance().onParticipantsChanged(); + } +} + // EOF diff --git a/indra/newview/llspeakingindicatormanager.h b/indra/newview/llspeakingindicatormanager.h index b0a147865b..e5afcd1cb7 100644 --- a/indra/newview/llspeakingindicatormanager.h +++ b/indra/newview/llspeakingindicatormanager.h @@ -78,6 +78,11 @@ namespace LLSpeakingIndicatorManager * @param speaking_indicator instance of the speaker indicator to be unregistered. */ void unregisterSpeakingIndicator(const LLUUID& speaker_id, const LLSpeakingIndicator* const speaking_indicator); + + /** + * Switch on/off registered speaking indicator according to the most current voice client status + */ + void updateSpeakingIndicators(); } #endif // LL_LLSPEAKINGINDICATORMANAGER_H diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 218c35029e..37e6ded986 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -54,7 +54,7 @@ #include "llfloaterreg.h" #include "llfocusmgr.h" #include "llhttpsender.h" -#include "llimfloater.h" +#include "llfloaterimsession.h" #include "lllocationhistory.h" #include "llimageworker.h" @@ -63,7 +63,8 @@ #include "llmemorystream.h" #include "llmessageconfig.h" #include "llmoveview.h" -#include "llnearbychat.h" +#include "llfloaterimcontainer.h" +#include "llfloaterimnearbychat.h" #include "llnotifications.h" #include "llnotificationsutil.h" #include "llteleporthistory.h" @@ -94,6 +95,7 @@ #include "llcallingcard.h" #include "llconsole.h" #include "llcontainerview.h" +#include "llconversationlog.h" #include "lldebugview.h" #include "lldrawable.h" #include "lleventnotifier.h" @@ -312,8 +314,6 @@ void update_texture_fetch() // true when all initialization done. bool idle_startup() { - LLMemType mt1(LLMemType::MTYPE_STARTUP); - const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay"); static LLTimer timeout; static S32 timeout_count = 0; @@ -362,6 +362,15 @@ bool idle_startup() if ( STATE_FIRST == LLStartUp::getStartupState() ) { + static bool first_call = true; + if (first_call) + { + // Other phases get handled when startup state changes, + // need to capture the initial state as well. + LLStartUp::getPhases().startPhase(LLStartUp::getStartupStateString()); + first_call = false; + } + gViewerWindow->showCursor(); gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); @@ -721,12 +730,14 @@ bool idle_startup() if (STATE_LOGIN_SHOW == LLStartUp::getStartupState()) { - LL_DEBUGS("AppInit") << "Initializing Window" << LL_ENDL; + LL_DEBUGS("AppInit") << "Initializing Window, show_connect_box = " + << show_connect_box << LL_ENDL; // if we've gone backwards in the login state machine, to this state where we show the UI // AND the debug setting to exit in this case is true, then go ahead and bail quickly if ( mLoginStatePastUI && gSavedSettings.getBOOL("QuitOnLoginActivated") ) { + LL_DEBUGS("AppInit") << "taking QuitOnLoginActivated exit" << LL_ENDL; // no requirement for notification here - just exit LLAppViewer::instance()->earlyExitNoNotify(); } @@ -739,6 +750,7 @@ bool idle_startup() // this startup phase more than once. if (gLoginMenuBarView == NULL) { + LL_DEBUGS("AppInit") << "initializing menu bar" << LL_ENDL; display_startup(); initialize_edit_menu(); initialize_spellcheck_menu(); @@ -749,11 +761,13 @@ bool idle_startup() if (show_connect_box) { + LL_DEBUGS("AppInit") << "show_connect_box on" << LL_ENDL; // 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. if (gUserCredential.isNull()) { + LL_DEBUGS("AppInit") << "loading credentials from gLoginHandler" << LL_ENDL; display_startup(); gUserCredential = gLoginHandler.initializeLoginInfo(); display_startup(); @@ -770,17 +784,28 @@ bool idle_startup() login_show(); display_startup(); // connect dialog is already shown, so fill in the names - if (gUserCredential.notNull()) - { - LLPanelLogin::setFields( gUserCredential, gRememberPassword); - } + if (gUserCredential.notNull()) + { + LLPanelLogin::setFields( gUserCredential, gRememberPassword); + } display_startup(); LLPanelLogin::giveFocus(); + if (gSavedSettings.getBOOL("FirstLoginThisInstall")) + { + LL_INFOS("AppInit") << "FirstLoginThisInstall, calling show_first_run_dialog()" << LL_ENDL; + show_first_run_dialog(); + } + else + { + LL_DEBUGS("AppInit") << "FirstLoginThisInstall off" << LL_ENDL; + } + LLStartUp::setStartupState( STATE_LOGIN_WAIT ); // Wait for user input } else { + LL_DEBUGS("AppInit") << "show_connect_box off, skipping to STATE_LOGIN_CLEANUP" << LL_ENDL; // skip directly to message template verification LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); } @@ -892,6 +917,13 @@ bool idle_startup() // Overwrite default user settings with user settings LLAppViewer::instance()->loadSettingsFromDirectory("Account"); + // Convert 'LogInstantMessages' into 'KeepConversationLogTranscripts' for backward compatibility (CHUI-743). + LLControlVariablePtr logInstantMessagesControl = gSavedPerAccountSettings.getControl("LogInstantMessages"); + if (logInstantMessagesControl.notNull()) + { + gSavedPerAccountSettings.setS32("KeepConversationLogTranscripts", logInstantMessagesControl->getValue() ? 2 : 1); + } + // Need to set the LastLogoff time here if we don't have one. LastLogoff is used for "Recent Items" calculation // and startup time is close enough if we don't have a real value. if (gSavedPerAccountSettings.getU32("LastLogoff") == 0) @@ -1268,6 +1300,8 @@ bool idle_startup() display_startup(); LLStartUp::setStartupState( STATE_MULTIMEDIA_INIT ); + LLConversationLog::getInstance(); + return FALSE; } @@ -1378,14 +1412,9 @@ bool idle_startup() LLVoiceClient::getInstance()->updateSettings(); display_startup(); - //gCacheName is required for nearby chat history loading - //so I just moved nearby history loading a few states further - if (gSavedPerAccountSettings.getBOOL("LogShowHistory")) - { - LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); - if (nearby_chat) nearby_chat->loadHistory(); - } - display_startup(); + // create a container's instance for start a controlling conversation windows + // by the voice's events + LLFloaterIMContainer::getInstance(); // *Note: this is where gWorldMap used to be initialized. @@ -1395,7 +1424,7 @@ bool idle_startup() display_startup(); //reset statistics - LLViewerStats::getInstance()->resetStats(); + LLViewerStats::instance().resetStats(); display_startup(); // @@ -1496,7 +1525,7 @@ bool idle_startup() } //--------------------------------------------------------------------- - // Agent Send + // World Wait //--------------------------------------------------------------------- if(STATE_WORLD_WAIT == LLStartUp::getStartupState()) { @@ -1822,6 +1851,10 @@ bool idle_startup() // Set the show start location to true, now that the user has logged // on with this install. gSavedSettings.setBOOL("ShowStartLocation", TRUE); + + // Open Conversation floater on first login. + LLFloaterReg::toggleInstanceOrBringToFront("im_container"); + } display_startup(); @@ -1924,7 +1957,7 @@ bool idle_startup() llinfos << "gAgentStartLocation : " << gAgentStartLocation << llendl; LLSLURL start_slurl = LLStartUp::getStartSLURL(); LL_DEBUGS("AppInit") << "start slurl "<<start_slurl.asString()<<LL_ENDL; - + if (((start_slurl.getType() == LLSLURL::LOCATION) && (gAgentStartLocation == "url")) || ((start_slurl.getType() == LLSLURL::LAST_LOCATION) && (gAgentStartLocation == "last")) || ((start_slurl.getType() == LLSLURL::HOME_LOCATION) && (gAgentStartLocation == "home"))) @@ -2144,7 +2177,6 @@ bool idle_startup() display_startup(); // Unmute audio if desired and setup volumes. - // Unmute audio if desired and setup volumes. // This is a not-uncommon crash site, so surround it with // llinfos output to aid diagnosis. LL_INFOS("AppInit") << "Doing first audio_update_volume..." << LL_ENDL; @@ -2165,7 +2197,6 @@ bool idle_startup() LLAgentPicksInfo::getInstance()->requestNumberOfPicks(); - LLIMFloater::initIMFloater(); display_startup(); llassert(LLPathfindingManager::getInstance() != NULL); @@ -2271,7 +2302,7 @@ bool login_alert_status(const LLSD& notification, const LLSD& response) // break; case 2: // Teleport // Restart the login process, starting at our home locaton - LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME)); + LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME)); LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); break; default: @@ -2704,9 +2735,10 @@ void LLStartUp::setStartupState( EStartupState state ) getStartupStateString() << " to " << startupStateToString(state) << LL_ENDL; - sPhases->stopPhase(getStartupStateString()); + getPhases().stopPhase(getStartupStateString()); gStartupState = state; - sPhases->startPhase(getStartupStateString()); + getPhases().startPhase(getStartupStateString()); + postStartupState(); } @@ -2779,7 +2811,7 @@ void LLStartUp::initNameCache() // Start cache in not-running state until we figure out if we have // capabilities for display name lookup - LLAvatarNameCache::initClass(false); + LLAvatarNameCache::initClass(false,gSavedSettings.getBOOL("UsePeopleAPI")); LLAvatarNameCache::setUseDisplayNames(gSavedSettings.getBOOL("UseDisplayNames")); } @@ -3281,11 +3313,8 @@ bool process_login_success_response() { // replace the default help URL format gSavedSettings.setString("HelpURLFormat",text); - - // don't fall back to Standalone's pre-connection static help - gSavedSettings.setBOOL("HelpUseLocal", false); } - + std::string home_location = response["home"]; if(!home_location.empty()) { diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 89240c982f..ff69c6e9fd 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -469,7 +469,7 @@ void LLStatusBar::onMouseEnterVolume() LLRect vol_btn_rect = volbtn->getRect(); LLRect volume_pulldown_rect = mPanelVolumePulldown->getRect(); volume_pulldown_rect.setLeftTopAndSize(vol_btn_rect.mLeft - - (volume_pulldown_rect.getWidth() - vol_btn_rect.getWidth())/2, + (volume_pulldown_rect.getWidth() - vol_btn_rect.getWidth()), vol_btn_rect.mBottom, volume_pulldown_rect.getWidth(), volume_pulldown_rect.getHeight()); diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index 65393cc168..ec11a23eb8 100644 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -56,13 +56,12 @@ #include "lldrawable.h" extern LLPipeline gPipeline; +extern bool gShiftFrame; LLColor4U MAX_WATER_COLOR(0, 48, 96, 240); S32 LLSurface::sTextureSize = 256; -S32 LLSurface::sTexelsUpdated = 0; -F32 LLSurface::sTextureUpdateTime = 0.f; // ---------------- LLSurface:: Public Members --------------- @@ -294,7 +293,7 @@ void LLSurface::initTextures() mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp); gPipeline.createObject(mWaterObjp); LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle()); - water_pos_global += LLVector3d(128.0, 128.0, DEFAULT_WATER_HEIGHT); + water_pos_global += LLVector3d(128.0, 128.0, DEFAULT_WATER_HEIGHT); // region doesn't have a valid water height yet mWaterObjp->setPositionGlobal(water_pos_global); } } @@ -621,6 +620,11 @@ void LLSurface::moveZ(const S32 x, const S32 y, const F32 delta) void LLSurface::updatePatchVisibilities(LLAgent &agent) { + if (gShiftFrame) + { + return; + } + LLVector3 pos_region = mRegionp->getPosRegionFromGlobal(gAgentCamera.getCameraPositionGlobal()); LLSurfacePatch *patchp; @@ -641,7 +645,6 @@ void LLSurface::updatePatchVisibilities(LLAgent &agent) BOOL LLSurface::idleUpdate(F32 max_update_time) { - LLMemType mt_ius(LLMemType::MTYPE_IDLE_UPDATE_SURFACE); if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TERRAIN)) { return FALSE; diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h index 8052fb0d18..9d24bf8771 100644 --- a/indra/newview/llsurface.h +++ b/indra/newview/llsurface.h @@ -169,9 +169,6 @@ public: F32 mDetailTextureScale; // Number of times to repeat detail texture across this surface - static F32 sTextureUpdateTime; - static S32 sTexelsUpdated; - protected: void createSTexture(); void createWaterTexture(); diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index 5077c2c7e1..a9ba2bce9c 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -43,6 +43,7 @@ #include "lldrawpool.h" #include "noise.h" +extern bool gShiftFrame; extern U64 gFrameTime; extern LLPipeline gPipeline; @@ -218,7 +219,7 @@ void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3 pos_agent.mV[VX] += x * mSurfacep->getMetersPerGrid(); pos_agent.mV[VY] += y * mSurfacep->getMetersPerGrid(); pos_agent.mV[VZ] = *(mDataZ + point_offset); - *vertex = pos_agent; + *vertex = pos_agent-mVObjp->getRegion()->getOriginAgent(); LLVector3 rel_pos = pos_agent - mSurfacep->getOriginAgent(); LLVector3 tex_pos = rel_pos * (1.f/surface_stride); @@ -366,10 +367,13 @@ void LLSurfacePatch::updateCameraDistanceRegion(const LLVector3 &pos_region) { if (LLPipeline::sDynamicLOD) { - LLVector3 dv = pos_region; - dv -= mCenterRegion; - mVisInfo.mDistance = llmax(0.f, (F32)(dv.magVec() - mRadius))/ - llmax(LLVOSurfacePatch::sLODFactor, 0.1f); + if (!gShiftFrame) + { + LLVector3 dv = pos_region; + dv -= mCenterRegion; + mVisInfo.mDistance = llmax(0.f, (F32)(dv.magVec() - mRadius))/ + llmax(LLVOSurfacePatch::sLODFactor, 0.1f); + } } else { diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 0cb6c85012..e92bd766ca 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -23,29 +23,18 @@ * $/LicenseInfo$ */ - #include "llviewerprecompiledheaders.h" // must be first include - #include "llsyswellwindow.h" -#include "llagent.h" -#include "llavatarnamecache.h" - -#include "llflatlistview.h" -#include "llfloaterreg.h" -#include "llnotifications.h" - -#include "llscriptfloater.h" -#include "llviewercontrol.h" -#include "llviewerwindow.h" - #include "llchiclet.h" #include "llchicletbar.h" -#include "lltoastpanel.h" +#include "llflatlistview.h" +#include "llfloaterreg.h" #include "llnotificationmanager.h" #include "llnotificationsutil.h" +#include "llscriptfloater.h" #include "llspeakers.h" -#include "lltoolbarview.h" +#include "lltoastpanel.h" //--------------------------------------------------------------------------------- LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLTransientDockableFloater(NULL, true, key), @@ -68,10 +57,6 @@ BOOL LLSysWellWindow::postBuild() // get a corresponding channel initChannel(); - // click on SysWell Window should clear "new message" state (and 'Lit' status). EXT-3147. - // mouse up callback is not called in this case. - setMouseDownCallback(boost::bind(&LLSysWellWindow::releaseNewMessagesState, this)); - return LLTransientDockableFloater::postBuild(); } @@ -98,9 +83,12 @@ void LLSysWellWindow::onStartUpToastClick(S32 x, S32 y, MASK mask) void LLSysWellWindow::setSysWellChiclet(LLSysWellChiclet* chiclet) { mSysWellChiclet = chiclet; - if(mSysWellChiclet) - mSysWellChiclet->updateWidget(isWindowEmpty()); + if(NULL != mSysWellChiclet) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + } } + //--------------------------------------------------------------------------------- LLSysWellWindow::~LLSysWellWindow() { @@ -111,7 +99,10 @@ void LLSysWellWindow::removeItemByID(const LLUUID& id) { if(mMessageList->removeItemByValue(id)) { - mSysWellChiclet->updateWidget(isWindowEmpty()); + if (NULL != mSysWellChiclet) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + } reshapeWindow(); } else @@ -165,11 +156,6 @@ void LLSysWellWindow::setVisible(BOOL visible) mChannel->updateShowToastsState(); mChannel->redrawToasts(); } - - if (visible) - { - releaseNewMessagesState(); - } } //--------------------------------------------------------------------------------- @@ -219,14 +205,6 @@ void LLSysWellWindow::reshapeWindow() } } -void LLSysWellWindow::releaseNewMessagesState() -{ - if (NULL != mSysWellChiclet) - { - mSysWellChiclet->setNewMessagesState(false); - } -} - //--------------------------------------------------------------------------------- bool LLSysWellWindow::isWindowEmpty() { @@ -234,121 +212,6 @@ bool LLSysWellWindow::isWindowEmpty() } /************************************************************************/ -/* RowPanel implementation */ -/************************************************************************/ - -//--------------------------------------------------------------------------------- -LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& sessionId, - S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId) : - LLPanel(LLPanel::Params()), mChiclet(NULL), mParent(parent) -{ - buildFromFile( "panel_activeim_row.xml", NULL); - - // Choose which of the pre-created chiclets (IM/group) to use. - // The other one gets hidden. - - LLIMChiclet::EType im_chiclet_type = LLIMChiclet::getIMSessionType(sessionId); - switch (im_chiclet_type) - { - case LLIMChiclet::TYPE_GROUP: - mChiclet = getChild<LLIMGroupChiclet>("group_chiclet"); - break; - case LLIMChiclet::TYPE_AD_HOC: - mChiclet = getChild<LLAdHocChiclet>("adhoc_chiclet"); - break; - case LLIMChiclet::TYPE_UNKNOWN: // assign mChiclet a non-null value anyway - case LLIMChiclet::TYPE_IM: - mChiclet = getChild<LLIMP2PChiclet>("p2p_chiclet"); - break; - } - - // Initialize chiclet. - mChiclet->setChicletSizeChangedCallback(boost::bind(&LLIMWellWindow::RowPanel::onChicletSizeChanged, this, mChiclet, _2)); - mChiclet->enableCounterControl(true); - mChiclet->setCounter(chicletCounter); - mChiclet->setSessionId(sessionId); - mChiclet->setIMSessionName(name); - mChiclet->setOtherParticipantId(otherParticipantId); - mChiclet->setVisible(true); - - if (im_chiclet_type == LLIMChiclet::TYPE_IM) - { - LLAvatarNameCache::get(otherParticipantId, - boost::bind(&LLIMWellWindow::RowPanel::onAvatarNameCache, - this, _1, _2)); - } - else - { - LLTextBox* contactName = getChild<LLTextBox>("contact_name"); - contactName->setValue(name); - } - - mCloseBtn = getChild<LLButton>("hide_btn"); - mCloseBtn->setCommitCallback(boost::bind(&LLIMWellWindow::RowPanel::onClosePanel, this)); -} - -//--------------------------------------------------------------------------------- -void LLIMWellWindow::RowPanel::onAvatarNameCache(const LLUUID& agent_id, - const LLAvatarName& av_name) -{ - LLTextBox* contactName = getChild<LLTextBox>("contact_name"); - contactName->setValue( av_name.getCompleteName() ); -} - -//--------------------------------------------------------------------------------- -void LLIMWellWindow::RowPanel::onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param) -{ - LLTextBox* text = getChild<LLTextBox>("contact_name"); - S32 new_text_left = mChiclet->getRect().mRight + CHICLET_HPAD; - LLRect text_rect = text->getRect(); - text_rect.mLeft = new_text_left; - text->setShape(text_rect); -} - -//--------------------------------------------------------------------------------- -LLIMWellWindow::RowPanel::~RowPanel() -{ -} - -//--------------------------------------------------------------------------------- -void LLIMWellWindow::RowPanel::onClosePanel() -{ - gIMMgr->leaveSession(mChiclet->getSessionId()); - // This row panel will be removed from the list in LLSysWellWindow::sessionRemoved(). -} - -//--------------------------------------------------------------------------------- -void LLIMWellWindow::RowPanel::onMouseEnter(S32 x, S32 y, MASK mask) -{ - setTransparentColor(LLUIColorTable::instance().getColor("SysWellItemSelected")); -} - -//--------------------------------------------------------------------------------- -void LLIMWellWindow::RowPanel::onMouseLeave(S32 x, S32 y, MASK mask) -{ - setTransparentColor(LLUIColorTable::instance().getColor("SysWellItemUnselected")); -} - -//--------------------------------------------------------------------------------- -// virtual -BOOL LLIMWellWindow::RowPanel::handleMouseDown(S32 x, S32 y, MASK mask) -{ - // Pass the mouse down event to the chiclet (EXT-596). - if (!mChiclet->pointInView(x, y) && !mCloseBtn->getRect().pointInRect(x, y)) // prevent double call of LLIMChiclet::onMouseDown() - { - mChiclet->onMouseDown(); - return TRUE; - } - - return LLPanel::handleMouseDown(x, y, mask); -} - -// virtual -BOOL LLIMWellWindow::RowPanel::handleRightMouseDown(S32 x, S32 y, MASK mask) -{ - return mChiclet->handleRightMouseDown(x, y, mask); -} -/************************************************************************/ /* ObjectRowPanel implementation */ /************************************************************************/ @@ -356,7 +219,7 @@ LLIMWellWindow::ObjectRowPanel::ObjectRowPanel(const LLUUID& notification_id, bo : LLPanel() , mChiclet(NULL) { - buildFromFile( "panel_active_object_row.xml", NULL); + buildFromFile( "panel_active_object_row.xml"); initChiclet(notification_id); @@ -433,13 +296,19 @@ BOOL LLIMWellWindow::ObjectRowPanel::handleRightMouseDown(S32 x, S32 y, MASK mas ////////////////////////////////////////////////////////////////////////// // PUBLIC METHODS +LLNotificationWellWindow::WellNotificationChannel::WellNotificationChannel(LLNotificationWellWindow* well_window) +: LLNotificationChannel(LLNotificationChannel::Params().name(well_window->getPathname())), + mWellWindow(well_window) +{ + connectToChannel("Notifications"); + connectToChannel("Group Notifications"); + connectToChannel("Offer"); +} + LLNotificationWellWindow::LLNotificationWellWindow(const LLSD& key) -: LLSysWellWindow(key) +: LLSysWellWindow(key) { - // init connections to the list's update events - connectListUpdaterToSignal("notify"); - connectListUpdaterToSignal("groupnotify"); - connectListUpdaterToSignal("offer"); + mNotificationUpdates.reset(new WellNotificationChannel(this)); } // static @@ -481,7 +350,6 @@ void LLNotificationWellWindow::addItem(LLSysWellItem::Params p) { mSysWellChiclet->updateWidget(isWindowEmpty()); reshapeWindow(); - new_item->setOnItemCloseCallback(boost::bind(&LLNotificationWellWindow::onItemClose, this, _1)); new_item->setOnItemClickCallback(boost::bind(&LLNotificationWellWindow::onItemClick, this, _1)); } @@ -519,7 +387,7 @@ void LLNotificationWellWindow::initChannel() LLSysWellWindow::initChannel(); if(mChannel) { - mChannel->setOnStoreToastCallback(boost::bind(&LLNotificationWellWindow::onStoreToast, this, _1, _2)); + mChannel->addOnStoreToastCallback(boost::bind(&LLNotificationWellWindow::onStoreToast, this, _1, _2)); } } @@ -546,20 +414,6 @@ void LLNotificationWellWindow::onStoreToast(LLPanel* info_panel, LLUUID id) addItem(p); } -void LLNotificationWellWindow::connectListUpdaterToSignal(std::string notification_type) -{ - LLNotificationsUI::LLNotificationManager* manager = LLNotificationsUI::LLNotificationManager::getInstance(); - LLNotificationsUI::LLEventHandler* n_handler = manager->getHandlerForNotification(notification_type); - if(n_handler) - { - n_handler->setNotificationIDCallback(boost::bind(&LLNotificationWellWindow::removeItemByID, this, _1)); - } - else - { - llwarns << "LLSysWellWindow::connectListUpdaterToSignal() - could not get a handler for '" << notification_type <<"' type of notifications" << llendl; - } -} - void LLNotificationWellWindow::onItemClick(LLSysWellItem* item) { LLUUID id = item->getID(); @@ -574,7 +428,10 @@ void LLNotificationWellWindow::onItemClose(LLSysWellItem* item) mChannel->killToastByNotificationID(id); } - +void LLNotificationWellWindow::onAdd( LLNotificationPtr notify ) +{ + removeItemByID(notify->getID()); +} /************************************************************************/ /* LLIMWellWindow implementation */ @@ -585,12 +442,10 @@ void LLNotificationWellWindow::onItemClose(LLSysWellItem* item) LLIMWellWindow::LLIMWellWindow(const LLSD& key) : LLSysWellWindow(key) { - LLIMMgr::getInstance()->addSessionObserver(this); } LLIMWellWindow::~LLIMWellWindow() { - LLIMMgr::getInstance()->removeSessionObserver(this); } // static @@ -611,47 +466,11 @@ BOOL LLIMWellWindow::postBuild() BOOL rv = LLSysWellWindow::postBuild(); setTitle(getString("title_im_well_window")); - LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findIMChiclet, this, _1)); LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findObjectChiclet, this, _1)); return rv; } -//virtual -void LLIMWellWindow::sessionAdded(const LLUUID& session_id, - const std::string& name, const LLUUID& other_participant_id) -{ - LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); - if (!session) return; - - // no need to spawn chiclets for participants in P2P calls called through Avaline - if (session->isP2P() && session->isOtherParticipantAvaline()) return; - - if (mMessageList->getItemByValue(session_id)) return; - - addIMRow(session_id, 0, name, other_participant_id); - reshapeWindow(); -} - -//virtual -void LLIMWellWindow::sessionRemoved(const LLUUID& sessionId) -{ - delIMRow(sessionId); - reshapeWindow(); -} - -//virtual -void LLIMWellWindow::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) -{ - //for outgoing ad-hoc and group im sessions only - LLChiclet* chiclet = findIMChiclet(old_session_id); - if (chiclet) - { - chiclet->setSessionId(new_session_id); - mMessageList->updateValue(old_session_id, new_session_id); - } -} - LLChiclet* LLIMWellWindow::findObjectChiclet(const LLUUID& notification_id) { if (!mMessageList) return NULL; @@ -668,85 +487,13 @@ LLChiclet* LLIMWellWindow::findObjectChiclet(const LLUUID& notification_id) ////////////////////////////////////////////////////////////////////////// // PRIVATE METHODS -LLChiclet* LLIMWellWindow::findIMChiclet(const LLUUID& sessionId) -{ - if (!mMessageList) return NULL; - - LLChiclet* res = NULL; - RowPanel* panel = mMessageList->getTypedItemByValue<RowPanel>(sessionId); - if (panel != NULL) - { - res = panel->mChiclet; - } - - return res; -} - -//--------------------------------------------------------------------------------- -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->addItem(item, sessionId)) - { - mSysWellChiclet->updateWidget(isWindowEmpty()); - } - else - { - llwarns << "Unable to add IM Row into the list, sessionID: " << sessionId - << ", name: " << name - << ", other participant ID: " << otherParticipantId - << llendl; - - item->die(); - } -} - -//--------------------------------------------------------------------------------- -void LLIMWellWindow::delIMRow(const LLUUID& sessionId) -{ - //fix for EXT-3252 - //without this line LLIMWellWindow receive onFocusLost - //and hide itself. It was becaue somehow LLIMChicklet was in focus group for - //LLIMWellWindow... - //But I didn't find why this happen.. - gFocusMgr.clearLastFocusForGroup(this); - - if (mMessageList->removeItemByValue(sessionId)) - { - mSysWellChiclet->updateWidget(isWindowEmpty()); - } - else - { - llwarns << "Unable to remove IM Row from the list, sessionID: " << sessionId - << llendl; - } - - // remove all toasts that belong to this session from a screen - if(mChannel) - mChannel->removeToastsBySessionID(sessionId); - - // hide chiclet window if there are no items left - if(isWindowEmpty()) - { - setVisible(FALSE); - } - else - { - setFocus(true); - } -} void LLIMWellWindow::addObjectRow(const LLUUID& notification_id, bool new_message/* = false*/) { if (mMessageList->getItemByValue(notification_id) == NULL) { ObjectRowPanel* item = new ObjectRowPanel(notification_id, new_message); - if (mMessageList->addItem(item, notification_id)) - { - mSysWellChiclet->updateWidget(isWindowEmpty()); - } - else + if (!mMessageList->addItem(item, notification_id)) { llwarns << "Unable to add Object Row into the list, notificationID: " << notification_id << llendl; item->die(); @@ -757,14 +504,7 @@ void LLIMWellWindow::addObjectRow(const LLUUID& notification_id, bool new_messag void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id) { - if (mMessageList->removeItemByValue(notification_id)) - { - if (mSysWellChiclet) - { - mSysWellChiclet->updateWidget(isWindowEmpty()); - } - } - else + if (!mMessageList->removeItemByValue(notification_id)) { llwarns << "Unable to remove Object Row from the list, notificationID: " << notification_id << llendl; } @@ -777,21 +517,6 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id) } } - -void LLIMWellWindow::addIMRow(const LLUUID& session_id) -{ - if (hasIMRow(session_id)) return; - - LLIMModel* im_model = LLIMModel::getInstance(); - addIMRow(session_id, 0, im_model->getName(session_id), im_model->getOtherParticipantID(session_id)); - reshapeWindow(); -} - -bool LLIMWellWindow::hasIMRow(const LLUUID& session_id) -{ - return mMessageList->getItemByValue(session_id); -} - void LLIMWellWindow::closeAll() { // Generate an ignorable alert dialog if there is an active voice IM sesion @@ -836,13 +561,6 @@ void LLIMWellWindow::closeAllImpl() { LLPanel* panel = mMessageList->getItemByValue(*iter); - RowPanel* im_panel = dynamic_cast <RowPanel*> (panel); - if (im_panel) - { - gIMMgr->leaveSession(*iter); - continue; - } - ObjectRowPanel* obj_panel = dynamic_cast <ObjectRowPanel*> (panel); if (obj_panel) { @@ -867,4 +585,4 @@ bool LLIMWellWindow::confirmCloseAll(const LLSD& notification, const LLSD& respo return false; } -// EOF + diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 272e9cfcb1..cc5c057d8b 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -27,29 +27,26 @@ #ifndef LL_LLSYSWELLWINDOW_H #define LL_LLSYSWELLWINDOW_H +#include "llimview.h" +#include "llnotifications.h" +#include "llscreenchannel.h" #include "llsyswellitem.h" - #include "lltransientdockablefloater.h" -#include "llbutton.h" -#include "llscreenchannel.h" -#include "llscrollcontainer.h" -#include "llimview.h" - -#include "boost/shared_ptr.hpp" class LLAvatarName; -class LLFlatListView; class LLChiclet; +class LLFlatListView; class LLIMChiclet; class LLScriptChiclet; class LLSysWellChiclet; - class LLSysWellWindow : public LLTransientDockableFloater { public: + LOG_CLASS(LLSysWellWindow); + LLSysWellWindow(const LLSD& key); - ~LLSysWellWindow(); + virtual ~LLSysWellWindow(); BOOL postBuild(); // other interface functions @@ -84,7 +81,6 @@ protected: virtual const std::string& getAnchorViewName() = 0; void reshapeWindow(); - void releaseNewMessagesState(); // pointer to a corresponding channel's instance LLNotificationsUI::LLScreenChannel* mChannel; @@ -111,7 +107,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void setVisible(BOOL visible); - + /*virtual*/ void onAdd(LLNotificationPtr notify); // Operating with items void addItem(LLSysWellItem::Params p); @@ -119,6 +115,18 @@ public: void closeAll(); protected: + struct WellNotificationChannel : public LLNotificationChannel + { + WellNotificationChannel(LLNotificationWellWindow*); + void onDelete(LLNotificationPtr notify) + { + mWellWindow->removeItemByID(notify->getID()); + } + + LLNotificationWellWindow* mWellWindow; + }; + + LLNotificationChannelPtr mNotificationUpdates; /*virtual*/ const std::string& getAnchorViewName() { return NOTIFICATION_WELL_ANCHOR_NAME; } private: @@ -126,12 +134,8 @@ private: void initChannel(); void clearScreenChannels(); - void onStoreToast(LLPanel* info_panel, LLUUID id); - // connect counter and list updaters to the corresponding signals - void connectListUpdaterToSignal(std::string notification_type); - // Handlers void onItemClick(LLSysWellItem* item); void onItemClose(LLSysWellItem* item); @@ -146,7 +150,7 @@ private: * * It contains a list list of all active IM sessions. */ -class LLIMWellWindow : public LLSysWellWindow, LLIMSessionObserver, LLInitClass<LLIMWellWindow> +class LLIMWellWindow : public LLSysWellWindow, LLInitClass<LLIMWellWindow> { public: LLIMWellWindow(const LLSD& key); @@ -158,57 +162,19 @@ public: /*virtual*/ BOOL postBuild(); - // LLIMSessionObserver observe triggers - /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id); - /*virtual*/ void sessionRemoved(const LLUUID& session_id); - /*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); - void addObjectRow(const LLUUID& notification_id, bool new_message = false); void removeObjectRow(const LLUUID& notification_id); - - void addIMRow(const LLUUID& session_id); - bool hasIMRow(const LLUUID& session_id); - void closeAll(); protected: /*virtual*/ const std::string& getAnchorViewName() { return IM_WELL_ANCHOR_NAME; } private: - LLChiclet * findIMChiclet(const LLUUID& sessionId); LLChiclet* findObjectChiclet(const LLUUID& notification_id); - void addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId); - void delIMRow(const LLUUID& sessionId); bool confirmCloseAll(const LLSD& notification, const LLSD& response); void closeAllImpl(); - /** - * Scrolling row panel. - */ - class RowPanel: public LLPanel - { - public: - RowPanel(const LLSysWellWindow* parent, const LLUUID& sessionId, S32 chicletCounter, - const std::string& name, const LLUUID& otherParticipantId); - virtual ~RowPanel(); - void onMouseEnter(S32 x, S32 y, MASK mask); - void onMouseLeave(S32 x, S32 y, MASK mask); - BOOL handleMouseDown(S32 x, S32 y, MASK mask); - BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); - - private: - static const S32 CHICLET_HPAD = 10; - void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); - void onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param); - void onClosePanel(); - public: - LLIMChiclet* mChiclet; - private: - LLButton* mCloseBtn; - const LLSysWellWindow* mParent; - }; - class ObjectRowPanel: public LLPanel { public: diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 467115c928..ad09af6594 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -510,7 +510,13 @@ void LLTexLayerSetBuffer::doUpload() BOOL valid = FALSE; LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C; S32 file_size = 0; - U8* data = LLVFile::readFile(gVFS, asset_id, LLAssetType::AT_TEXTURE, &file_size); + + //data buffer MUST be allocated using LLImageBase + LLVFile file(gVFS, asset_id, LLAssetType::AT_TEXTURE); + file_size = file.getSize(); + U8* data = integrity_test->allocateData(file_size); + file.read(data, file_size); + if (data) { valid = integrity_test->validate(data, file_size); // integrity_test will delete 'data' diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h index 74c22b0cdf..c812199796 100644 --- a/indra/newview/lltexlayerparams.h +++ b/indra/newview/lltexlayerparams.h @@ -58,6 +58,7 @@ protected: // LLTexLayerParamAlpha // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +LL_ALIGN_PREFIX(16) class LLTexLayerParamAlpha : public LLTexLayerParam { public: @@ -65,6 +66,16 @@ public: LLTexLayerParamAlpha( LLVOAvatar* avatar ); /*virtual*/ ~LLTexLayerParamAlpha(); + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const; // LLVisualParam Virtual functions @@ -76,11 +87,11 @@ public: // LLViewerVisualParam Virtual functions /*virtual*/ F32 getTotalDistortion() { return 1.f; } - /*virtual*/ const LLVector3& getAvgDistortion() { return mAvgDistortionVec; } + /*virtual*/ const LLVector4a& getAvgDistortion() { return mAvgDistortionVec; } /*virtual*/ F32 getMaxDistortion() { return 3.f; } - /*virtual*/ LLVector3 getVertexDistortion(S32 index, LLPolyMesh *poly_mesh) { return LLVector3(1.f, 1.f, 1.f);} - /*virtual*/ const LLVector3* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) { index = 0; poly_mesh = NULL; return &mAvgDistortionVec;}; - /*virtual*/ const LLVector3* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) { index = 0; poly_mesh = NULL; return NULL;}; + /*virtual*/ LLVector4a getVertexDistortion(S32 index, LLPolyMesh *poly_mesh) { return LLVector4a(1.f, 1.f, 1.f);} + /*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) { index = 0; poly_mesh = NULL; return &mAvgDistortionVec;}; + /*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) { index = 0; poly_mesh = NULL; return NULL;}; // New functions BOOL render( S32 x, S32 y, S32 width, S32 height ); @@ -94,7 +105,7 @@ private: LLPointer<LLImageRaw> mStaticImageRaw; BOOL mNeedsCreateTexture; BOOL mStaticImageInvalid; - LLVector3 mAvgDistortionVec; + LL_ALIGN_16(LLVector4a mAvgDistortionVec); F32 mCachedEffectiveWeight; public: @@ -104,7 +115,7 @@ public: typedef std::list< LLTexLayerParamAlpha* > param_alpha_ptr_list_t; static param_alpha_ptr_list_t sInstances; -}; +} LL_ALIGN_POSTFIX(16); class LLTexLayerParamAlphaInfo : public LLViewerVisualParamInfo { friend class LLTexLayerParamAlpha; @@ -128,6 +139,8 @@ private: // LLTexLayerParamColor // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +LL_ALIGN_PREFIX(16) class LLTexLayerParamColor : public LLTexLayerParam { public: @@ -141,6 +154,17 @@ public: LLTexLayerParamColor( LLTexLayerInterface* layer ); LLTexLayerParamColor( LLVOAvatar* avatar ); + + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + /* virtual */ ~LLTexLayerParamColor(); /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const; @@ -155,19 +179,19 @@ public: // LLViewerVisualParam Virtual functions /*virtual*/ F32 getTotalDistortion() { return 1.f; } - /*virtual*/ const LLVector3& getAvgDistortion() { return mAvgDistortionVec; } + /*virtual*/ const LLVector4a& getAvgDistortion() { return mAvgDistortionVec; } /*virtual*/ F32 getMaxDistortion() { return 3.f; } - /*virtual*/ LLVector3 getVertexDistortion(S32 index, LLPolyMesh *poly_mesh) { return LLVector3(1.f, 1.f, 1.f); } - /*virtual*/ const LLVector3* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) { index = 0; poly_mesh = NULL; return &mAvgDistortionVec;}; - /*virtual*/ const LLVector3* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) { index = 0; poly_mesh = NULL; return NULL;}; + /*virtual*/ LLVector4a getVertexDistortion(S32 index, LLPolyMesh *poly_mesh) { return LLVector4a(1.f, 1.f, 1.f); } + /*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) { index = 0; poly_mesh = NULL; return &mAvgDistortionVec;}; + /*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) { index = 0; poly_mesh = NULL; return NULL;}; // New functions LLColor4 getNetColor() const; protected: virtual void onGlobalColorChanged(bool upload_bake) {} private: - LLVector3 mAvgDistortionVec; -}; + LL_ALIGN_16(LLVector4a mAvgDistortionVec); +} LL_ALIGN_POSTFIX(16); class LLTexLayerParamColorInfo : public LLViewerVisualParamInfo { diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 8632890bbb..305f6fca0f 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -50,6 +50,8 @@ const S32 TEXTURE_CACHE_ENTRY_SIZE = FIRST_PACKET_SIZE;//1024; const F32 TEXTURE_CACHE_PURGE_AMOUNT = .20f; // % amount to reduce the cache by when it exceeds its limit const F32 TEXTURE_CACHE_LRU_SIZE = .10f; // % amount for LRU list (low overhead to regenerate) +const S32 TEXTURE_FAST_CACHE_ENTRY_OVERHEAD = sizeof(S32) * 4; //w, h, c, level +const S32 TEXTURE_FAST_CACHE_ENTRY_SIZE = 16 * 16 * 4 + TEXTURE_FAST_CACHE_ENTRY_OVERHEAD; class LLTextureCacheWorker : public LLWorkerClass { @@ -283,9 +285,12 @@ public: LLTextureCacheRemoteWorker(LLTextureCache* cache, U32 priority, const LLUUID& id, U8* data, S32 datasize, S32 offset, S32 imagesize, // for writes + LLPointer<LLImageRaw> raw, S32 discardlevel, LLTextureCache::Responder* responder) : LLTextureCacheWorker(cache, priority, id, data, datasize, offset, imagesize, responder), - mState(INIT) + mState(INIT), + mRawImage(raw), + mRawDiscardLevel(discardlevel) { } @@ -303,6 +308,8 @@ private: }; e_state mState; + LLPointer<LLImageRaw> mRawImage; + S32 mRawDiscardLevel; }; @@ -559,6 +566,11 @@ bool LLTextureCacheRemoteWorker::doWrite() if(idx < 0) { idx = mCache->setHeaderCacheEntry(mID, entry, mImageSize, mDataSize); // create the new entry. + if(idx >= 0) + { + //write to the fast cache. + llassert_always(mCache->writeToFastCache(idx, mRawImage, mRawDiscardLevel)); + } } else { @@ -658,6 +670,7 @@ bool LLTextureCacheRemoteWorker::doWrite() // Nothing else to do at that point... done = true; } + mRawImage = NULL; // Clean up and exit return done; @@ -744,10 +757,14 @@ LLTextureCache::LLTextureCache(bool threaded) mWorkersMutex(NULL), mHeaderMutex(NULL), mListMutex(NULL), + mFastCacheMutex(NULL), mHeaderAPRFile(NULL), mReadOnly(TRUE), //do not allow to change the texture cache until setReadOnly() is called. mTexturesSizeTotal(0), - mDoPurge(FALSE) + mDoPurge(FALSE), + mFastCachep(NULL), + mFastCachePoolp(NULL), + mFastCachePadBuffer(NULL) { } @@ -755,6 +772,9 @@ LLTextureCache::~LLTextureCache() { clearDeleteList() ; writeUpdatedEntries() ; + delete mFastCachep; + delete mFastCachePoolp; + FREE_MEM(LLImageBase::getPrivatePool(), mFastCachePadBuffer); } ////////////////////////////////////////////////////////////////////////////// @@ -879,15 +899,15 @@ BOOL LLTextureCache::isInLocal(const LLUUID& id) ////////////////////////////////////////////////////////////////////////////// //static -const S32 MAX_REASONABLE_FILE_SIZE = 512*1024*1024; // 512 MB -F32 LLTextureCache::sHeaderCacheVersion = 1.4f; -U32 LLTextureCache::sCacheMaxEntries = MAX_REASONABLE_FILE_SIZE / TEXTURE_CACHE_ENTRY_SIZE; +F32 LLTextureCache::sHeaderCacheVersion = 1.7f; +U32 LLTextureCache::sCacheMaxEntries = 1024 * 1024; //~1 million textures. S64 LLTextureCache::sCacheMaxTexturesSize = 0; // no limit const char* entries_filename = "texture.entries"; const char* cache_filename = "texture.cache"; const char* old_textures_dirname = "textures"; //change the location of the texture cache to prevent from being deleted by old version viewers. const char* textures_dirname = "texturecache"; +const char* fast_cache_filename = "FastCache.cache"; void LLTextureCache::setDirNames(ELLPath location) { @@ -896,6 +916,7 @@ void LLTextureCache::setDirNames(ELLPath location) mHeaderEntriesFileName = gDirUtilp->getExpandedFilename(location, textures_dirname, entries_filename); mHeaderDataFileName = gDirUtilp->getExpandedFilename(location, textures_dirname, cache_filename); mTexturesDirName = gDirUtilp->getExpandedFilename(location, textures_dirname); + mFastCacheFileName = gDirUtilp->getExpandedFilename(location, textures_dirname, fast_cache_filename); } void LLTextureCache::purgeCache(ELLPath location) @@ -938,8 +959,8 @@ S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL texture_cache { llassert_always(getPending() == 0) ; //should not start accessing the texture cache before initialized. - S64 header_size = (max_size * 2) / 10; - S64 max_entries = header_size / TEXTURE_CACHE_ENTRY_SIZE; + S64 header_size = (max_size / 100) * 36; //0.36 * max_size + S64 max_entries = header_size / (TEXTURE_CACHE_ENTRY_SIZE + TEXTURE_FAST_CACHE_ENTRY_SIZE); sCacheMaxEntries = (S32)(llmin((S64)sCacheMaxEntries, max_entries)); header_size = sCacheMaxEntries * TEXTURE_CACHE_ENTRY_SIZE; max_size -= header_size; @@ -981,6 +1002,7 @@ S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL texture_cache purgeTextures(true); // calc mTexturesSize and make some room in the texture cache if we need it llassert_always(getPending() == 0) ; //should not start accessing the texture cache before initialized. + openFastCache(true); return max_size; // unused cache space } @@ -1751,7 +1773,7 @@ LLTextureCache::handle_t LLTextureCache::readFromCache(const LLUUID& id, U32 pri LLMutexLock lock(&mWorkersMutex); LLTextureCacheWorker* worker = new LLTextureCacheRemoteWorker(this, priority, id, NULL, size, offset, - 0, responder); + 0, NULL, 0, responder); handle_t handle = worker->read(); mReaders[handle] = worker; return handle; @@ -1789,6 +1811,7 @@ bool LLTextureCache::readComplete(handle_t handle, bool abort) LLTextureCache::handle_t LLTextureCache::writeToCache(const LLUUID& id, U32 priority, U8* data, S32 datasize, S32 imagesize, + LLPointer<LLImageRaw> rawimage, S32 discardlevel, WriteResponder* responder) { if (mReadOnly) @@ -1807,12 +1830,174 @@ LLTextureCache::handle_t LLTextureCache::writeToCache(const LLUUID& id, U32 prio LLMutexLock lock(&mWorkersMutex); LLTextureCacheWorker* worker = new LLTextureCacheRemoteWorker(this, priority, id, data, datasize, 0, - imagesize, responder); + imagesize, rawimage, discardlevel, responder); handle_t handle = worker->write(); mWriters[handle] = worker; return handle; } +//called in the main thread +LLPointer<LLImageRaw> LLTextureCache::readFromFastCache(const LLUUID& id, S32& discardlevel) +{ + U32 offset; + { + LLMutexLock lock(&mHeaderMutex); + id_map_t::const_iterator iter = mHeaderIDMap.find(id); + if(iter == mHeaderIDMap.end()) + { + return NULL; //not in the cache + } + + offset = iter->second; + } + offset *= TEXTURE_FAST_CACHE_ENTRY_SIZE; + + U8* data; + S32 head[4]; + { + LLMutexLock lock(&mFastCacheMutex); + + openFastCache(); + + mFastCachep->seek(APR_SET, offset); + + if(mFastCachep->read(head, TEXTURE_FAST_CACHE_ENTRY_OVERHEAD) != TEXTURE_FAST_CACHE_ENTRY_OVERHEAD) + { + //cache corrupted or under thread race condition + closeFastCache(); + return NULL; + } + + S32 image_size = head[0] * head[1] * head[2]; + if(!image_size) //invalid + { + closeFastCache(); + return NULL; + } + discardlevel = head[3]; + + data = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), image_size); + if(mFastCachep->read(data, image_size) != image_size) + { + FREE_MEM(LLImageBase::getPrivatePool(), data); + closeFastCache(); + return NULL; + } + + closeFastCache(); + } + LLPointer<LLImageRaw> raw = new LLImageRaw(data, head[0], head[1], head[2], true); + + return raw; +} + +//return the fast cache location +bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 discardlevel) +{ + //rescale image if needed + S32 w, h, c; + w = raw->getWidth(); + h = raw->getHeight(); + c = raw->getComponents(); + S32 i = 0 ; + + while(((w >> i) * (h >> i) * c) > TEXTURE_FAST_CACHE_ENTRY_SIZE - TEXTURE_FAST_CACHE_ENTRY_OVERHEAD) + { + ++i ; + } + + if(i) + { + w >>= i; + h >>= i; + if(w * h *c > 0) //valid + { + LLPointer<LLImageRaw> newraw = new LLImageRaw(raw->getData(), raw->getWidth(), raw->getHeight(), raw->getComponents()); + newraw->scale(w, h) ; + raw = newraw; + + discardlevel += i ; + } + } + + //copy data + memcpy(mFastCachePadBuffer, &w, sizeof(S32)); + memcpy(mFastCachePadBuffer + sizeof(S32), &h, sizeof(S32)); + memcpy(mFastCachePadBuffer + sizeof(S32) * 2, &c, sizeof(S32)); + memcpy(mFastCachePadBuffer + sizeof(S32) * 3, &discardlevel, sizeof(S32)); + if(w * h * c > 0) //valid + { + memcpy(mFastCachePadBuffer + TEXTURE_FAST_CACHE_ENTRY_OVERHEAD, raw->getData(), w * h * c); + } + S32 offset = id * TEXTURE_FAST_CACHE_ENTRY_SIZE; + + { + LLMutexLock lock(&mFastCacheMutex); + + openFastCache(); + + mFastCachep->seek(APR_SET, offset); + + //no need to do this assertion check. When it fails, let it fail quietly. + //this failure could happen because other viewer removes the fast cache file when clearing cache. + //--> llassert_always(mFastCachep->write(mFastCachePadBuffer, TEXTURE_FAST_CACHE_ENTRY_SIZE) == TEXTURE_FAST_CACHE_ENTRY_SIZE); + mFastCachep->write(mFastCachePadBuffer, TEXTURE_FAST_CACHE_ENTRY_SIZE); + + closeFastCache(true); + } + + return true; +} + +void LLTextureCache::openFastCache(bool first_time) +{ + if(!mFastCachep) + { + if(first_time) + { + if(!mFastCachePadBuffer) + { + mFastCachePadBuffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), TEXTURE_FAST_CACHE_ENTRY_SIZE); + } + mFastCachePoolp = new LLVolatileAPRPool(); + if (LLAPRFile::isExist(mFastCacheFileName, mFastCachePoolp)) + { + mFastCachep = new LLAPRFile(mFastCacheFileName, APR_READ|APR_WRITE|APR_BINARY, mFastCachePoolp) ; + } + else + { + mFastCachep = new LLAPRFile(mFastCacheFileName, APR_CREATE|APR_READ|APR_WRITE|APR_BINARY, mFastCachePoolp) ; + } + } + else + { + mFastCachep = new LLAPRFile(mFastCacheFileName, APR_READ|APR_WRITE|APR_BINARY, mFastCachePoolp) ; + } + + mFastCacheTimer.reset(); + } + return; +} + +void LLTextureCache::closeFastCache(bool forced) +{ + static const F32 timeout = 10.f ; //seconds + + if(!mFastCachep) + { + return ; + } + + if(!forced && mFastCacheTimer.getElapsedTimeF32() < timeout) + { + return ; + } + + delete mFastCachep; + mFastCachep = NULL; + return; +} + bool LLTextureCache::writeComplete(handle_t handle, bool abort) { lockWorkers(); diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index dd0cc9b4bd..e3fc957fd2 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -36,6 +36,7 @@ class LLImageFormatted; class LLTextureCacheWorker; +class LLImageRaw; class LLTextureCache : public LLWorkerThread { @@ -113,8 +114,9 @@ public: handle_t readFromCache(const LLUUID& id, U32 priority, S32 offset, S32 size, ReadResponder* responder); bool readComplete(handle_t handle, bool abort); - handle_t writeToCache(const LLUUID& id, U32 priority, U8* data, S32 datasize, S32 imagesize, + handle_t writeToCache(const LLUUID& id, U32 priority, U8* data, S32 datasize, S32 imagesize, LLPointer<LLImageRaw> rawimage, S32 discardlevel, WriteResponder* responder); + LLPointer<LLImageRaw> readFromFastCache(const LLUUID& id, S32& discardlevel); bool writeComplete(handle_t handle, bool abort = false); void prioritizeWrite(handle_t handle); @@ -171,12 +173,18 @@ private: void lockHeaders() { mHeaderMutex.lock(); } void unlockHeaders() { mHeaderMutex.unlock(); } + void openFastCache(bool first_time = false); + void closeFastCache(bool forced = false); + bool writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 discardlevel); + private: // Internal LLMutex mWorkersMutex; LLMutex mHeaderMutex; LLMutex mListMutex; + LLMutex mFastCacheMutex; LLAPRFile* mHeaderAPRFile; + LLVolatileAPRPool* mFastCachePoolp; typedef std::map<handle_t, LLTextureCacheWorker*> handle_map_t; handle_map_t mReaders; @@ -193,12 +201,17 @@ private: // HEADERS (Include first mip) std::string mHeaderEntriesFileName; std::string mHeaderDataFileName; + std::string mFastCacheFileName; EntriesInfo mHeaderEntriesInfo; std::set<S32> mFreeList; // deleted entries std::set<LLUUID> mLRU; - typedef std::map<LLUUID,S32> id_map_t; + typedef std::map<LLUUID, S32> id_map_t; id_map_t mHeaderIDMap; + LLAPRFile* mFastCachep; + LLFrameTimer mFastCacheTimer; + U8* mFastCachePadBuffer; + // BODIES (TEXTURES minus headers) std::string mTexturesDirName; typedef std::map<LLUUID,S32> size_map_t; diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index ec36cf48c2..007eb8e33f 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -39,7 +39,7 @@ #include "llfocusmgr.h" #include "llviewertexture.h" #include "llfolderview.h" -#include "llfoldervieweventlistener.h" +#include "llfolderviewmodel.h" #include "llinventory.h" #include "llinventoryfunctions.h" #include "llinventorymodelbackgroundfetch.h" @@ -58,6 +58,7 @@ #include "lltoolmgr.h" #include "lltoolpipette.h" #include "llfiltereditor.h" +#include "llwindow.h" #include "lltool.h" #include "llviewerwindow.h" @@ -186,7 +187,7 @@ protected: F32 mContextConeOpacity; LLSaveFolderState mSavedFolderState; BOOL mSelectedItemPinned; - + LLRadioGroup* mModeSelector; LLScrollListCtrl* mLocalScrollCtrl; @@ -372,7 +373,7 @@ BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask) { if (!root_folder->getCurSelectedItem()) { - LLFolderViewItem* itemp = root_folder->getItemByID(gInventory.getRootFolderID()); + LLFolderViewItem* itemp = mInventoryPanel->getItemByID(gInventory.getRootFolderID()); if (itemp) { root_folder->setSelection(itemp, FALSE, FALSE); @@ -454,7 +455,7 @@ BOOL LLFloaterTexturePicker::postBuild() // Commented out to scroll to currently selected texture. See EXT-5403. // // store this filter as the default one - // mInventoryPanel->getRootFolder()->getFilter()->markDefault(); + // mInventoryPanel->getRootFolder()->getFilter().markDefault(); // Commented out to stop opening all folders with textures // mInventoryPanel->openDefaultFolderForType(LLFolderType::FT_TEXTURE); @@ -637,11 +638,10 @@ void LLFloaterTexturePicker::draw() LLFolderView* folder_view = mInventoryPanel->getRootFolder(); if (!folder_view) return; - LLInventoryFilter* filter = folder_view->getFilter(); - if (!filter) return; + LLFolderViewFilter& filter = static_cast<LLFolderViewModelInventory*>(folder_view->getFolderViewModel())->getFilter(); - bool is_filter_active = folder_view->getCompletedFilterGeneration() < filter->getCurrentGeneration() && - filter->isNotDefault(); + bool is_filter_active = folder_view->getViewModelItem()->getLastFilterGeneration() < filter.getCurrentGeneration() && + filter.isNotDefault(); // After inventory panel filter is applied we have to update // constraint rect for the selected item because of folder view @@ -651,26 +651,12 @@ void LLFloaterTexturePicker::draw() if (!is_filter_active && !mSelectedItemPinned) { folder_view->setPinningSelectedItem(mSelectedItemPinned); - folder_view->dirtyFilter(); - folder_view->arrangeFromRoot(); - + folder_view->getViewModelItem()->dirtyFilter(); mSelectedItemPinned = TRUE; } } } -// static -/* -void LLFloaterTexturePicker::onSaveAnotherCopyDialog( S32 option, void* userdata ) -{ - LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata; - if( 0 == option ) - { - self->copyToInventoryFinal(); - } -} -*/ - const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL copyable_only) { LLViewerInventoryCategory::cat_array_t cats; @@ -815,7 +801,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem if (items.size()) { LLFolderViewItem* first_item = items.front(); - LLInventoryItem* itemp = gInventory.getItem(first_item->getListener()->getUUID()); + LLInventoryItem* itemp = gInventory.getItem(static_cast<LLFolderViewModelItemInventory*>(first_item->getViewModelItem())->getUUID()); mNoCopyTextureSelected = FALSE; if (itemp) { @@ -1011,7 +997,7 @@ void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string ) else if (mInventoryPanel->getFilterSubString().empty()) { // first letter in search term, save existing folder open state - if (!mInventoryPanel->getRootFolder()->isFilterModified()) + if (!mInventoryPanel->getFilter().isNotDefault()) { mSavedFolderState.setApply(FALSE); mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState); @@ -1325,7 +1311,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op, LLUUID id) // (i.e. op == TEXTURE_SELECT) or texture changes via DnD. else if (mCommitOnSelection || op == TEXTURE_SELECT) mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? - + if(floaterp->isDirty() || id.notNull()) // mModelView->setDirty does not work. { setTentative( FALSE ); @@ -1337,10 +1323,10 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op, LLUUID id) } else { - mImageItemID = floaterp->findItemID(floaterp->getAssetID(), FALSE); - lldebugs << "mImageItemID: " << mImageItemID << llendl; - mImageAssetID = floaterp->getAssetID(); - lldebugs << "mImageAssetID: " << mImageAssetID << llendl; + mImageItemID = floaterp->findItemID(floaterp->getAssetID(), FALSE); + lldebugs << "mImageItemID: " << mImageItemID << llendl; + mImageAssetID = floaterp->getAssetID(); + lldebugs << "mImageAssetID: " << mImageAssetID << llendl; } if (op == TEXTURE_SELECT && mOnSelectCallback) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 7e6dfbc9d9..7de66b139f 100644..100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2000&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2012, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -28,12 +28,12 @@ #include <iostream> #include <map> +#include <algorithm> #include "llstl.h" #include "lltexturefetch.h" -#include "llcurl.h" #include "lldir.h" #include "llhttpclient.h" #include "llhttpstatuscodes.h" @@ -50,32 +50,219 @@ #include "llviewertexture.h" #include "llviewerregion.h" #include "llviewerstats.h" +#include "llviewerstatsrecorder.h" #include "llviewerassetstats.h" #include "llworld.h" #include "llsdutil.h" #include "llstartup.h" -#include "llviewerstats.h" +#include "llsdserialize.h" + +#include "httprequest.h" +#include "httphandler.h" +#include "httpresponse.h" +#include "bufferarray.h" +#include "bufferstream.h" bool LLTextureFetchDebugger::sDebuggerEnabled = false ; LLStat LLTextureFetch::sCacheHitRate("texture_cache_hits", 128); LLStat LLTextureFetch::sCacheReadLatency("texture_cache_read_latency", 128); + ////////////////////////////////////////////////////////////////////////////// -class LLTextureFetchWorker : public LLWorkerClass +// +// Introduction +// +// This is an attempt to document what's going on in here after-the-fact. +// It's a sincere attempt to be accurate but there will be mistakes. +// +// +// Purpose +// +// What is this module trying to do? It accepts requests to load textures +// at a given priority and discard level and notifies the caller when done +// (successfully or not). Additional constraints are: +// +// * Support a local texture cache. Don't hit network when possible +// to avoid it. +// * Use UDP or HTTP as directed or as fallback. HTTP is tried when +// not disabled and a URL is available. UDP when a URL isn't +// available or HTTP attempts fail. +// * Asynchronous (using threads). Main thread is not to be blocked or +// burdened. +// * High concurrency. Many requests need to be in-flight and at various +// stages of completion. +// * Tolerate frequent re-prioritizations of requests. Priority is +// a reflection of a camera's viewpoint and as that viewpoint changes, +// objects and textures become more and less relevant and that is +// expressed at this level by priority changes and request cancelations. +// +// The caller interfaces that fall out of the above and shape the +// implementation are: +// * createRequest - Load j2c image via UDP or HTTP at given discard level and priority +// * deleteRequest - Request removal of prior request +// * getRequestFinished - Test if request is finished returning data to caller +// * updateRequestPriority - Change priority of existing request +// * getFetchState - Retrieve progress on existing request +// +// Everything else in here is mostly plumbing, metrics and debug. +// +// +// The Work Queue +// +// The two central classes are LLTextureFetch and LLTextureFetchWorker. +// LLTextureFetch combines threading with a priority queue of work +// requests. The priority queue is sorted by a U32 priority derived +// from the F32 priority in the APIs. The *only* work request that +// receives service time by this thread is the highest priority +// request. All others wait until it is complete or a dynamic priority +// change has re-ordered work. +// +// LLTextureFetchWorker implements the work request and is 1:1 with +// texture fetch requests. Embedded in each is a state machine that +// walks it through the cache, HTTP, UDP, image decode and retry +// steps of texture acquisition. +// +// +// Threads +// +// Several threads are actively invoking code in this module. They +// include: +// +// 1. Tmain Main thread of execution +// 2. Ttf LLTextureFetch's worker thread provided by LLQueuedThread +// 3. Tcurl LLCurl's worker thread (should disappear over time) +// 4. Ttc LLTextureCache's worker thread +// 5. Tid Image decoder's worker thread +// 6. Thl HTTP library's worker thread +// +// +// Mutexes/Condition Variables +// +// 1. Mt Mutex defined for LLThread's condition variable (base class of +// LLTextureFetch) +// 2. Ct Condition variable for LLThread and used by lock/unlockData(). +// 3. Mwtd Special LLWorkerThread mutex used for request deletion +// operations (base class of LLTextureFetch) +// 4. Mfq LLTextureFetch's mutex covering request and command queue +// data. +// 5. Mfnq LLTextureFetch's mutex covering udp and http request +// queue data. +// 6. Mwc Mutex covering LLWorkerClass's members (base class of +// LLTextureFetchWorker). One per request. +// 7. Mw LLTextureFetchWorker's mutex. One per request. +// +// +// Lock Ordering Rules +// +// Not an exhaustive list but shows the order of lock acquisition +// needed to prevent deadlocks. 'A < B' means acquire 'A' before +// acquiring 'B'. +// +// 1. Mw < Mfnq +// (there are many more...) +// +// +// Method and Member Definitions +// +// With the above, we'll try to document what threads can call what +// methods (using T* for any), what locks must be held on entry and +// are taken out during execution and what data is covered by which +// lock (if any). This latter category will be especially prone to +// error so be skeptical. +// +// A line like: "// Locks: M<xxx>" indicates a method that must +// be invoked by a caller holding the 'M<xxx>' lock. Similarly, +// "// Threads: T<xxx>" means that a caller should be running in +// the indicated thread. +// +// For data members, a trailing comment like "// M<xxx>" means that +// the data member is covered by the specified lock. Absence of a +// comment can mean the member is unlocked or that I didn't bother +// to do the archaeology. In the case of LLTextureFetchWorker, +// most data members added by the leaf class are actually covered +// by the Mw lock. You may also see "// T<xxx>" which means that +// the member's usage is restricted to one thread (except for +// perhaps construction and destruction) and so explicit locking +// isn't used. +// +// In code, a trailing comment like "// [-+]M<xxx>" indicates a +// lock acquision or release point. +// +// +// Worker Lifecycle +// +// The threading and responder model makes it very likely that +// other components are holding on to a pointer to a worker request. +// So, uncoordinated deletions of requests is a guarantee of memory +// corruption in a short time. So destroying a request involves +// invocations's of LLQueuedThread/LLWorkerThread's abort/stop +// logic that removes workers and puts them ona delete queue for +// 2-phase destruction. That second phase is deferrable by calls +// to deleteOK() which only allow final destruction (via dtor) +// once deleteOK has determined that the request is in a safe +// state. +// +// +// Worker State Machine +// +// (ASCII art needed) +// +// +// Priority Scheme +// +// [PRIORITY_LOW, PRIORITY_NORMAL) - for WAIT_HTTP_RESOURCE state +// and other wait states +// [PRIORITY_HIGH, PRIORITY_URGENT) - External event delivered, +// rapidly transitioning through states, +// no waiting allowed +// +// By itself, the above work queue model would fail the concurrency +// and liveness requirements of the interface. A high priority +// request could find itself on the head and stalled for external +// reasons (see VWR-28996). So a few additional constraints are +// required to keep things running: +// * Anything that can make forward progress must be kept at a +// higher priority than anything that can't. +// * On completion of external events, the associated request +// needs to be elevated beyond the normal range to handle +// any data delivery and release any external resource. +// +// This effort is made to keep higher-priority entities moving +// forward in their state machines at every possible step of +// processing. It's not entirely proven that this produces the +// experiencial benefits promised. +// + + +////////////////////////////////////////////////////////////////////////////// + +// Tuning/Parameterization Constants + +static const S32 HTTP_REQUESTS_IN_QUEUE_HIGH_WATER = 40; // Maximum requests to have active in HTTP +static const S32 HTTP_REQUESTS_IN_QUEUE_LOW_WATER = 20; // Active level at which to refill + + +////////////////////////////////////////////////////////////////////////////// + +class LLTextureFetchWorker : public LLWorkerClass, public LLCore::HttpHandler + { friend class LLTextureFetch; - friend class HTTPGetResponder; friend class LLTextureFetchDebugger; private: class CacheReadResponder : public LLTextureCache::ReadResponder { public: + + // Threads: Ttf CacheReadResponder(LLTextureFetch* fetcher, const LLUUID& id, LLImageFormatted* image) : mFetcher(fetcher), mID(id) { setImage(image); } + + // Threads: Ttc virtual void completed(bool success) { LLTextureFetchWorker* worker = mFetcher->getWorker(mID); @@ -92,10 +279,14 @@ private: class CacheWriteResponder : public LLTextureCache::WriteResponder { public: + + // Threads: Ttf CacheWriteResponder(LLTextureFetch* fetcher, const LLUUID& id) : mFetcher(fetcher), mID(id) { } + + // Threads: Ttc virtual void completed(bool success) { LLTextureFetchWorker* worker = mFetcher->getWorker(mID); @@ -112,10 +303,14 @@ private: class DecodeResponder : public LLImageDecodeThread::Responder { public: + + // Threads: Ttf DecodeResponder(LLTextureFetch* fetcher, const LLUUID& id, LLTextureFetchWorker* worker) : mFetcher(fetcher), mID(id), mWorker(worker) { } + + // Threads: Tid virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux) { LLTextureFetchWorker* worker = mFetcher->getWorker(mID); @@ -148,22 +343,35 @@ private: }; public: + + // Threads: Ttf /*virtual*/ bool doWork(S32 param); // Called from LLWorkerThread::processRequest() + + // Threads: Ttf /*virtual*/ void finishWork(S32 param, bool completed); // called from finishRequest() (WORK THREAD) - /*virtual*/ bool deleteOK(); // called from update() (WORK THREAD) + + // Threads: Tmain + /*virtual*/ bool deleteOK(); // called from update() ~LLTextureFetchWorker(); - // void relese() { --mActiveCount; } - S32 callbackHttpGet(const LLChannelDescriptors& channels, - const LLIOPipe::buffer_ptr_t& buffer, - bool partial, bool success); + // Threads: Ttf + // Locks: Mw + S32 callbackHttpGet(LLCore::HttpResponse * response, + bool partial, bool success); + + // Threads: Ttc void callbackCacheRead(bool success, LLImageFormatted* image, S32 imagesize, BOOL islocal); + + // Threads: Ttc void callbackCacheWrite(bool success); + + // Threads: Tid void callbackDecoded(bool success, LLImageRaw* raw, LLImageRaw* aux); - void setGetStatus(U32 status, const std::string& reason) + // Threads: T* + void setGetStatus(LLCore::HttpStatus status, const std::string& reason) { LLMutexLock lock(&mWorkMutex); @@ -175,33 +383,93 @@ public: bool getCanUseHTTP() const { return mCanUseHTTP; } LLTextureFetch & getFetcher() { return *mFetcher; } + + // Inherited from LLCore::HttpHandler + // Threads: Ttf + virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response); protected: LLTextureFetchWorker(LLTextureFetch* fetcher, const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, S32 discard, S32 size); private: + + // Threads: Tmain /*virtual*/ void startWork(S32 param); // called from addWork() (MAIN THREAD) + + // Threads: Tmain /*virtual*/ void endWork(S32 param, bool aborted); // called from doWork() (MAIN THREAD) + // Locks: Mw void resetFormattedData(); + // Locks: Mw void setImagePriority(F32 priority); + + // Locks: Mw (ctor invokes without lock) void setDesiredDiscard(S32 discard, S32 size); + + // Threads: T* + // Locks: Mw bool insertPacket(S32 index, U8* data, S32 size); + + // Locks: Mw void clearPackets(); + + // Locks: Mw void setupPacketData(); + + // Locks: Mw (ctor invokes without lock) U32 calcWorkPriority(); + + // Locks: Mw void removeFromCache(); + + // Threads: Ttf + // Locks: Mw bool processSimulatorPackets(); + + // Threads: Ttf bool writeToCacheComplete(); + // Threads: Ttf + void recordTextureStart(bool is_http); + + // Threads: Ttf + void recordTextureDone(bool is_http); + void lockWorkMutex() { mWorkMutex.lock(); } void unlockWorkMutex() { mWorkMutex.unlock(); } + // Threads: Ttf + // Locks: Mw + bool acquireHttpSemaphore() + { + llassert(! mHttpHasResource); + if (mFetcher->mHttpSemaphore <= 0) + { + return false; + } + mHttpHasResource = true; + mFetcher->mHttpSemaphore--; + return true; + } + + // Threads: Ttf + // Locks: Mw + void releaseHttpSemaphore() + { + llassert(mHttpHasResource); + mHttpHasResource = false; + mFetcher->mHttpSemaphore++; + } + private: enum e_state // mState { + // *NOTE: Do not change the order/value of state variables, some code + // depends upon specific ordering/adjacency. + // NOTE: Affects LLTextureBar::draw in lltextureview.cpp (debug hack) INVALID = 0, INIT, @@ -209,8 +477,10 @@ private: CACHE_POST, LOAD_FROM_NETWORK, LOAD_FROM_SIMULATOR, - SEND_HTTP_REQ, - WAIT_HTTP_REQ, + WAIT_HTTP_RESOURCE, // Waiting for HTTP resources + WAIT_HTTP_RESOURCE2, // Waiting for HTTP resources + SEND_HTTP_REQ, // Commit to sending as HTTP + WAIT_HTTP_REQ, // Request sent, wait for completion DECODE_IMAGE, DECODE_IMAGE_UPDATE, WRITE_TO_CACHE, @@ -254,9 +524,8 @@ private: F32 mCacheReadTime; LLTextureCache::handle_t mCacheReadHandle; LLTextureCache::handle_t mCacheWriteHandle; - U8* mBuffer; - S32 mBufferSize; S32 mRequestedSize; + S32 mRequestedOffset; S32 mDesiredSize; S32 mFileSize; S32 mCachedSize; @@ -271,10 +540,9 @@ private: BOOL mInCache; bool mCanUseHTTP ; bool mCanUseNET ; //can get from asset server. - S32 mHTTPFailCount; S32 mRetryAttempt; S32 mActiveCount; - U32 mGetStatus; + LLCore::HttpStatus mGetStatus; std::string mGetReason; // Work Data @@ -294,105 +562,19 @@ private: U8 mImageCodec; LLViewerAssetStats::duration_t mMetricsStartTime; -}; - -////////////////////////////////////////////////////////////////////////////// - -class HTTPGetResponder : public LLCurl::Responder -{ - LOG_CLASS(HTTPGetResponder); -public: - HTTPGetResponder(LLTextureFetch* fetcher, const LLUUID& id, U64 startTime, S32 requestedSize, U32 offset, bool redir) - : mFetcher(fetcher), mID(id), mStartTime(startTime), mRequestedSize(requestedSize), mOffset(offset), mFollowRedir(redir) - { - } - ~HTTPGetResponder() - { - } - - virtual void completedRaw(U32 status, const std::string& reason, - const LLChannelDescriptors& channels, - const LLIOPipe::buffer_ptr_t& buffer) - { - static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog"); - static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator"); - static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ; - if (log_to_viewer_log || log_to_sim) - { - mFetcher->mTextureInfo.setRequestStartTime(mID, mStartTime); - U64 timeNow = LLTimer::getTotalTime(); - mFetcher->mTextureInfo.setRequestType(mID, LLTextureInfoDetails::REQUEST_TYPE_HTTP); - mFetcher->mTextureInfo.setRequestSize(mID, mRequestedSize); - mFetcher->mTextureInfo.setRequestOffset(mID, mOffset); - mFetcher->mTextureInfo.setRequestCompleteTimeAndLog(mID, timeNow); - } - - lldebugs << "HTTP COMPLETE: " << mID << llendl; - LLTextureFetchWorker* worker = mFetcher->getWorker(mID); - if (worker) - { - bool success = false; - bool partial = false; - if (HTTP_OK <= status && status < HTTP_MULTIPLE_CHOICES) - { - success = true; - if (HTTP_PARTIAL_CONTENT == status) // partial information - { - partial = true; - } - } - - if (!success) - { - worker->setGetStatus(status, reason); -// llwarns << "CURL GET FAILED, status:" << status << " reason:" << reason << llendl; - } - - S32 data_size = worker->callbackHttpGet(channels, buffer, partial, success); - - if(log_texture_traffic && data_size > 0) - { - LLViewerTexture* tex = LLViewerTextureManager::findTexture(mID) ; - if(tex) - { - gTotalTextureBytesPerBoostLevel[tex->getBoostLevel()] += data_size ; - } - } - - mFetcher->removeFromHTTPQueue(mID, data_size); - - if (worker->mMetricsStartTime) - { - LLViewerAssetStatsFF::record_response_thread1(LLViewerAssetType::AT_TEXTURE, - true, - LLImageBase::TYPE_AVATAR_BAKE == worker->mType, - LLViewerAssetStatsFF::get_timestamp() - worker->mMetricsStartTime); - worker->mMetricsStartTime = 0; - } - LLViewerAssetStatsFF::record_dequeue_thread1(LLViewerAssetType::AT_TEXTURE, - true, - LLImageBase::TYPE_AVATAR_BAKE == worker->mType); - } - else - { - mFetcher->removeFromHTTPQueue(mID); - llwarns << "Worker not found: " << mID << llendl; - } - } - - virtual bool followRedir() - { - return mFollowRedir; - } - -private: - LLTextureFetch* mFetcher; - LLUUID mID; - U64 mStartTime; - S32 mRequestedSize; - U32 mOffset; - bool mFollowRedir; + LLCore::HttpHandle mHttpHandle; // Handle of any active request + LLCore::BufferArray * mHttpBufferArray; // Refcounted pointer to response data + int mHttpPolicyClass; + bool mHttpActive; // Active request to http library + unsigned int mHttpReplySize; // Actual received data size + unsigned int mHttpReplyOffset; // Actual received data offset + bool mHttpHasResource; // Counts against Fetcher's mHttpSemaphore + + // State history + U32 mCacheReadCount; + U32 mCacheWriteCount; + U32 mResourceWaitCount; // Requests entering WAIT_HTTP_RESOURCE2 }; ////////////////////////////////////////////////////////////////////////////// @@ -628,13 +810,15 @@ const char* LLTextureFetchWorker::sStateDescs[] = { "CACHE_POST", "LOAD_FROM_NETWORK", "LOAD_FROM_SIMULATOR", + "WAIT_HTTP_RESOURCE", + "WAIT_HTTP_RESOURCE2", "SEND_HTTP_REQ", "WAIT_HTTP_REQ", "DECODE_IMAGE", "DECODE_IMAGE_UPDATE", "WRITE_TO_CACHE", "WAIT_ON_WRITE", - "DONE", + "DONE" }; // static @@ -650,6 +834,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, S32 discard, // Desired discard S32 size) // Desired size : LLWorkerClass(fetcher, "TextureFetch"), + LLCore::HttpHandler(), mState(INIT), mWriteToCacheState(NOT_WRITE), mFetcher(fetcher), @@ -667,9 +852,8 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, mCacheReadTime(0.f), mCacheReadHandle(LLTextureCache::nullHandle()), mCacheWriteHandle(LLTextureCache::nullHandle()), - mBuffer(NULL), - mBufferSize(0), mRequestedSize(0), + mRequestedOffset(0), mDesiredSize(TEXTURE_CACHE_ENTRY_SIZE), mFileSize(0), mCachedSize(0), @@ -683,19 +867,27 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, mInLocalCache(FALSE), mInCache(FALSE), mCanUseHTTP(true), - mHTTPFailCount(0), mRetryAttempt(0), mActiveCount(0), - mGetStatus(0), mWorkMutex(NULL), mFirstPacket(0), mLastPacket(-1), mTotalPackets(0), mImageCodec(IMG_CODEC_INVALID), - mMetricsStartTime(0) + mMetricsStartTime(0), + mHttpHandle(LLCORE_HTTP_HANDLE_INVALID), + mHttpBufferArray(NULL), + mHttpPolicyClass(mFetcher->mHttpPolicyClass), + mHttpActive(false), + mHttpReplySize(0U), + mHttpReplyOffset(0U), + mHttpHasResource(false), + mCacheReadCount(0U), + mCacheWriteCount(0U), + mResourceWaitCount(0U) { mCanUseNET = mUrl.empty() ; - + calcWorkPriority(); mType = host.isOk() ? LLImageBase::TYPE_AVATAR_BAKE : LLImageBase::TYPE_NORMAL; // llinfos << "Create: " << mID << " mHost:" << host << " Discard=" << discard << llendl; @@ -714,7 +906,20 @@ LLTextureFetchWorker::~LLTextureFetchWorker() // << " Requested=" << mRequestedDiscard // << " Desired=" << mDesiredDiscard << llendl; llassert_always(!haveWork()); - lockWorkMutex(); + + lockWorkMutex(); // +Mw (should be useless) + if (mHttpHasResource) + { + // Last-chance catchall to recover the resource. Using an + // atomic datatype solely because this can be running in + // another thread. + releaseHttpSemaphore(); + } + if (mHttpActive) + { + // Issue a cancel on a live request... + mFetcher->getHttpRequest().requestCancel(mHttpHandle, NULL); + } if (mCacheReadHandle != LLTextureCache::nullHandle() && mFetcher->mTextureCache) { mFetcher->mTextureCache->readComplete(mCacheReadHandle, true); @@ -725,10 +930,18 @@ LLTextureFetchWorker::~LLTextureFetchWorker() } mFormattedImage = NULL; clearPackets(); - unlockWorkMutex(); - mFetcher->removeFromHTTPQueue(mID); + if (mHttpBufferArray) + { + mHttpBufferArray->release(); + mHttpBufferArray = NULL; + } + unlockWorkMutex(); // -Mw + mFetcher->removeFromHTTPQueue(mID, 0); + mFetcher->removeHttpWaiter(mID); + mFetcher->updateStateStats(mCacheReadCount, mCacheWriteCount, mResourceWaitCount); } +// Locks: Mw void LLTextureFetchWorker::clearPackets() { for_each(mPackets.begin(), mPackets.end(), DeletePointer()); @@ -738,6 +951,7 @@ void LLTextureFetchWorker::clearPackets() mFirstPacket = 0; } +// Locks: Mw void LLTextureFetchWorker::setupPacketData() { S32 data_size = 0; @@ -770,6 +984,7 @@ void LLTextureFetchWorker::setupPacketData() } } +// Locks: Mw (ctor invokes without lock) U32 LLTextureFetchWorker::calcWorkPriority() { //llassert_always(mImagePriority >= 0 && mImagePriority <= LLViewerFetchedTexture::maxDecodePriority()); @@ -779,7 +994,7 @@ U32 LLTextureFetchWorker::calcWorkPriority() return mWorkPriority; } -// mWorkMutex is locked +// Locks: Mw (ctor invokes without lock) void LLTextureFetchWorker::setDesiredDiscard(S32 discard, S32 size) { bool prioritize = false; @@ -815,6 +1030,7 @@ void LLTextureFetchWorker::setDesiredDiscard(S32 discard, S32 size) } } +// Locks: Mw void LLTextureFetchWorker::setImagePriority(F32 priority) { // llassert_always(priority >= 0 && priority <= LLViewerTexture::maxDecodePriority()); @@ -828,32 +1044,37 @@ void LLTextureFetchWorker::setImagePriority(F32 priority) } } +// Locks: Mw void LLTextureFetchWorker::resetFormattedData() { - FREE_MEM(LLImageBase::getPrivatePool(), mBuffer); - mBuffer = NULL; - mBufferSize = 0; + if (mHttpBufferArray) + { + mHttpBufferArray->release(); + mHttpBufferArray = NULL; + } if (mFormattedImage.notNull()) { mFormattedImage->deleteData(); } + mHttpReplySize = 0; + mHttpReplyOffset = 0; mHaveAllData = FALSE; } -// Called from MAIN thread +// Threads: Tmain void LLTextureFetchWorker::startWork(S32 param) { llassert(mFormattedImage.isNull()); } -#include "llviewertexturelist.h" // debug - -// Called from LLWorkerThread::processRequest() +// Threads: Ttf bool LLTextureFetchWorker::doWork(S32 param) { - static const F32 FETCHING_TIMEOUT = 120.f;//seconds - - LLMutexLock lock(&mWorkMutex); + static const LLCore::HttpStatus http_not_found(HTTP_NOT_FOUND); // 404 + static const LLCore::HttpStatus http_service_unavail(HTTP_SERVICE_UNAVAILABLE); // 503 + static const LLCore::HttpStatus http_not_sat(HTTP_REQUESTED_RANGE_NOT_SATISFIABLE); // 416; + + LLMutexLock lock(&mWorkMutex); // +Mw if ((mFetcher->isQuitting() || getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) { @@ -897,15 +1118,20 @@ bool LLTextureFetchWorker::doWork(S32 param) mLoadedDiscard = -1; mDecodedDiscard = -1; mRequestedSize = 0; + mRequestedOffset = 0; mFileSize = 0; mCachedSize = 0; mLoaded = FALSE; mSentRequest = UNSENT; mDecoded = FALSE; mWritten = FALSE; - FREE_MEM(LLImageBase::getPrivatePool(), mBuffer); - mBuffer = NULL; - mBufferSize = 0; + if (mHttpBufferArray) + { + mHttpBufferArray->release(); + mHttpBufferArray = NULL; + } + mHttpReplySize = 0; + mHttpReplyOffset = 0; mHaveAllData = FALSE; clearPackets(); // TODO: Shouldn't be necessary mCacheReadHandle = LLTextureCache::nullHandle(); @@ -938,22 +1164,24 @@ bool LLTextureFetchWorker::doWork(S32 param) setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it // read file from local disk + ++mCacheReadCount; 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); mCacheReadTimer.reset(); } - else if (mUrl.empty()) + else if (mUrl.empty() && mFetcher->canLoadFromCache()) { setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it + ++mCacheReadCount; CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); mCacheReadHandle = mFetcher->mTextureCache->readFromCache(mID, cache_priority, offset, size, responder); mCacheReadTimer.reset(); } - else if(mCanUseHTTP) + else if(!mUrl.empty() && mCanUseHTTP) { if (!(mUrl.compare(0, 7, "http://") == 0)) { @@ -961,7 +1189,7 @@ bool LLTextureFetchWorker::doWork(S32 param) llwarns << "Unknown URL Type: " << mUrl << llendl; } setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); - mState = SEND_HTTP_REQ; + mState = WAIT_HTTP_RESOURCE; } else { @@ -981,6 +1209,9 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { + // + //This should never happen + // return false; } } @@ -1020,6 +1251,7 @@ bool LLTextureFetchWorker::doWork(S32 param) LL_DEBUGS("Texture") << mID << ": Not in Cache" << LL_ENDL; mState = LOAD_FROM_NETWORK; } + // fall through LLTextureFetch::sCacheHitRate.addValue(0.f); } @@ -1060,7 +1292,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } if (mCanUseHTTP && !mUrl.empty()) { - mState = LLTextureFetchWorker::SEND_HTTP_REQ; + mState = WAIT_HTTP_RESOURCE; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); if(mWriteToCacheState != NOT_WRITE) { @@ -1077,13 +1309,7 @@ bool LLTextureFetchWorker::doWork(S32 param) mRequestedDiscard = mDesiredDiscard; mSentRequest = QUEUED; mFetcher->addToNetworkQueue(this); - if (! mMetricsStartTime) - { - mMetricsStartTime = LLViewerAssetStatsFF::get_timestamp(); - } - LLViewerAssetStatsFF::record_enqueue_thread1(LLViewerAssetType::AT_TEXTURE, - false, - LLImageBase::TYPE_AVATAR_BAKE == mType); + recordTextureStart(false); setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); return false; @@ -1094,12 +1320,7 @@ bool LLTextureFetchWorker::doWork(S32 param) //llassert_always(mFetcher->mNetworkQueue.find(mID) != mFetcher->mNetworkQueue.end()); // Make certain this is in the network queue //mFetcher->addToNetworkQueue(this); - //if (! mMetricsStartTime) - //{ - // mMetricsStartTime = LLViewerAssetStatsFF::get_timestamp(); - //} - //LLViewerAssetStatsFF::record_enqueue_thread1(LLViewerAssetType::AT_TEXTURE, false, - // LLImageBase::TYPE_AVATAR_BAKE == mType); + //recordTextureStart(false); //setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); return false; } @@ -1124,196 +1345,250 @@ bool LLTextureFetchWorker::doWork(S32 param) setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); mState = DECODE_IMAGE; mWriteToCacheState = SHOULD_WRITE; - - if (mMetricsStartTime) - { - LLViewerAssetStatsFF::record_response_thread1(LLViewerAssetType::AT_TEXTURE, - false, - LLImageBase::TYPE_AVATAR_BAKE == mType, - LLViewerAssetStatsFF::get_timestamp() - mMetricsStartTime); - mMetricsStartTime = 0; - } - LLViewerAssetStatsFF::record_dequeue_thread1(LLViewerAssetType::AT_TEXTURE, - false, - LLImageBase::TYPE_AVATAR_BAKE == mType); + recordTextureDone(false); } else { mFetcher->addToNetworkQueue(this); // failsafe - if (! mMetricsStartTime) - { - mMetricsStartTime = LLViewerAssetStatsFF::get_timestamp(); - } - LLViewerAssetStatsFF::record_enqueue_thread1(LLViewerAssetType::AT_TEXTURE, - false, - LLImageBase::TYPE_AVATAR_BAKE == mType); setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); + recordTextureStart(false); + } + return false; + } + + if (mState == WAIT_HTTP_RESOURCE) + { + // NOTE: + // control the number of the http requests issued for: + // 1, not openning too many file descriptors at the same time; + // 2, control the traffic of http so udp gets bandwidth. + // + // If it looks like we're busy, keep this request here. + // Otherwise, advance into the HTTP states. + if (mFetcher->getHttpWaitersCount() || ! acquireHttpSemaphore()) + { + mState = WAIT_HTTP_RESOURCE2; + setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); + mFetcher->addHttpWaiter(this->mID); + ++mResourceWaitCount; + return false; } + + mState = SEND_HTTP_REQ; + // *NOTE: You must invoke releaseHttpSemaphore() if you transition + // to a state other than SEND_HTTP_REQ or WAIT_HTTP_REQ or abort + // the request. + } + + if (mState == WAIT_HTTP_RESOURCE2) + { + // Just idle it if we make it to the head... return false; } if (mState == SEND_HTTP_REQ) { - if(mCanUseHTTP) + if (! mCanUseHTTP) { - //NOTE: - //control the number of the http requests issued for: - //1, not openning too many file descriptors at the same time; - //2, control the traffic of http so udp gets bandwidth. - // - static const S32 MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE = 8 ; - if(mFetcher->getNumHTTPRequests() > MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE) - { - return false ; //wait. - } + releaseHttpSemaphore(); + return true; // abort + } - mFetcher->removeFromNetworkQueue(this, false); + mFetcher->removeFromNetworkQueue(this, false); - S32 cur_size = 0; - if (mFormattedImage.notNull()) + S32 cur_size = 0; + if (mFormattedImage.notNull()) + { + cur_size = mFormattedImage->getDataSize(); // amount of data we already have + if (mFormattedImage->getDiscardLevel() == 0) { - cur_size = mFormattedImage->getDataSize(); // amount of data we already have - if (mFormattedImage->getDiscardLevel() == 0) + if (cur_size > 0) { - if(cur_size > 0) - { - // We already have all the data, just decode it - mLoadedDiscard = mFormattedImage->getDiscardLevel(); - mState = DECODE_IMAGE; - return false; - } - else - { - return true ; //abort. - } + // We already have all the data, just decode it + mLoadedDiscard = mFormattedImage->getDiscardLevel(); + setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + mState = DECODE_IMAGE; + releaseHttpSemaphore(); + return false; } - } - mRequestedSize = mDesiredSize; - mRequestedDiscard = mDesiredDiscard; - mRequestedSize -= cur_size; - S32 offset = cur_size; - mBufferSize = cur_size; // This will get modified by callbackHttpGet() - - bool res = false; - if (!mUrl.empty()) - { - mRequestedTimer.reset(); - - mLoaded = FALSE; - mGetStatus = 0; - mGetReason.clear(); - LL_DEBUGS("Texture") << "HTTP GET: " << mID << " Offset: " << offset - << " Bytes: " << mRequestedSize - << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << mFetcher->mMaxBandwidth - << LL_ENDL; - setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); - mState = WAIT_HTTP_REQ; - - mFetcher->addToHTTPQueue(mID); - if (! mMetricsStartTime) + else { - mMetricsStartTime = LLViewerAssetStatsFF::get_timestamp(); + releaseHttpSemaphore(); + return true; // abort. } - LLViewerAssetStatsFF::record_enqueue_thread1(LLViewerAssetType::AT_TEXTURE, - true, - LLImageBase::TYPE_AVATAR_BAKE == mType); - - // Will call callbackHttpGet when curl request completes - std::vector<std::string> headers; - headers.push_back("Accept: image/x-j2c"); - res = mFetcher->mCurlGetRequest->getByteRange(mUrl, headers, offset, mRequestedSize, - new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, offset, true)); } - if (!res) - { - llwarns << "HTTP GET request failed for " << mID << llendl; - resetFormattedData(); - ++mHTTPFailCount; - return true; // failed - } - // fall through } - else //can not use http fetch. + mRequestedSize = mDesiredSize; + mRequestedDiscard = mDesiredDiscard; + mRequestedSize -= cur_size; + mRequestedOffset = cur_size; + if (mRequestedOffset) { - return true ; //abort + // Texture fetching often issues 'speculative' loads that + // start beyond the end of the actual asset. Some cache/web + // systems, e.g. Varnish, will respond to this not with a + // 416 but with a 200 and the entire asset in the response + // body. By ensuring that we always have a partially + // satisfiable Range request, we avoid that hit to the network. + // We just have to deal with the overlapping data which is made + // somewhat harder by the fact that grid services don't necessarily + // return the Content-Range header on 206 responses. *Sigh* + mRequestedOffset -= 1; + mRequestedSize += 1; } + + mHttpHandle = LLCORE_HTTP_HANDLE_INVALID; + if (!mUrl.empty()) + { + mRequestedTimer.reset(); + mLoaded = FALSE; + mGetStatus = LLCore::HttpStatus(); + mGetReason.clear(); + LL_DEBUGS("Texture") << "HTTP GET: " << mID << " Offset: " << mRequestedOffset + << " Bytes: " << mRequestedSize + << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << mFetcher->mMaxBandwidth + << LL_ENDL; + + // Will call callbackHttpGet when curl request completes + mHttpHandle = mFetcher->mHttpRequest->requestGetByteRange(mHttpPolicyClass, + mWorkPriority, + mUrl, + mRequestedOffset, + mRequestedSize, + mFetcher->mHttpOptions, + mFetcher->mHttpHeaders, + this); + } + if (LLCORE_HTTP_HANDLE_INVALID == mHttpHandle) + { + llwarns << "HTTP GET request failed for " << mID << llendl; + resetFormattedData(); + releaseHttpSemaphore(); + return true; // failed + } + + mHttpActive = true; + mFetcher->addToHTTPQueue(mID); + recordTextureStart(true); + setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); + mState = WAIT_HTTP_REQ; + + // fall through } if (mState == WAIT_HTTP_REQ) { + // *NOTE: As stated above, all transitions out of this state should + // call releaseHttpSemaphore(). if (mLoaded) { S32 cur_size = mFormattedImage.notNull() ? mFormattedImage->getDataSize() : 0; if (mRequestedSize < 0) { - S32 max_attempts; - if (mGetStatus == HTTP_NOT_FOUND) + if (http_not_found == mGetStatus) { - mHTTPFailCount = max_attempts = 1; // Don't retry + if(mWriteToCacheState == NOT_WRITE) //map tiles + { + mState = DONE; + releaseHttpSemaphore(); + return true; // failed, means no map tile on the empty region. + } + llwarns << "Texture missing from server (404): " << mUrl << llendl; - //roll back to try UDP - if(mCanUseNET) + // roll back to try UDP + if (mCanUseNET) { - mState = INIT ; - mCanUseHTTP = false ; + mState = INIT; + mCanUseHTTP = false; + mUrl.clear(); setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); - return false ; + releaseHttpSemaphore(); + return false; } } - else if (mGetStatus == HTTP_SERVICE_UNAVAILABLE) + else if (http_service_unavail == mGetStatus) { - // *TODO: Should probably introduce a timer here to delay future HTTP requsts - // for a short time (~1s) to ease server load? Ideally the server would queue - // requests instead of returning 503... we already limit the number pending. - ++mHTTPFailCount; - max_attempts = mHTTPFailCount+1; // Keep retrying LL_INFOS_ONCE("Texture") << "Texture server busy (503): " << mUrl << LL_ENDL; } + else if (http_not_sat == mGetStatus) + { + // Allowed, we'll accept whatever data we have as complete. + mHaveAllData = TRUE; + } else { - const S32 HTTP_MAX_RETRY_COUNT = 3; - max_attempts = HTTP_MAX_RETRY_COUNT + 1; - ++mHTTPFailCount; llinfos << "HTTP GET failed for: " << mUrl - << " Status: " << mGetStatus << " Reason: '" << mGetReason << "'" - << " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << llendl; + << " Status: " << mGetStatus.toHex() + << " Reason: '" << mGetReason << "'" + << llendl; } - if (mHTTPFailCount >= max_attempts) + mUrl.clear(); + if (cur_size > 0) { - if (cur_size > 0) - { - // Use available data - mLoadedDiscard = mFormattedImage->getDiscardLevel(); - mState = DECODE_IMAGE; - return false; - } - else - { - resetFormattedData(); - mState = DONE; - return true; // failed - } - } - else - { - mState = SEND_HTTP_REQ; - return false; // retry + // Use available data + mLoadedDiscard = mFormattedImage->getDiscardLevel(); + setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + mState = DECODE_IMAGE; + releaseHttpSemaphore(); + return false; } + + // Fail harder + resetFormattedData(); + mState = DONE; + releaseHttpSemaphore(); + return true; // failed + } + + // Clear the url since we're done with the fetch + // Note: mUrl is used to check is fetching is required so failure to clear it will force an http fetch + // next time the texture is requested, even if the data have already been fetched. + if(mWriteToCacheState != NOT_WRITE) + { + mUrl.clear(); } - llassert_always(mBufferSize == cur_size + mRequestedSize); - if(!mBufferSize)//no data received. + if (! mHttpBufferArray || ! mHttpBufferArray->size()) { - FREE_MEM(LLImageBase::getPrivatePool(), mBuffer); - mBuffer = NULL; + // no data received. + if (mHttpBufferArray) + { + mHttpBufferArray->release(); + mHttpBufferArray = NULL; + } - //abort. + // abort. mState = DONE; + releaseHttpSemaphore(); return true; } + S32 append_size(mHttpBufferArray->size()); + S32 total_size(cur_size + append_size); + S32 src_offset(0); + llassert_always(append_size == mRequestedSize); + if (mHttpReplyOffset && mHttpReplyOffset != cur_size) + { + // In case of a partial response, our offset may + // not be trivially contiguous with the data we have. + // Get back into alignment. + if (mHttpReplyOffset > cur_size) + { + LL_WARNS("Texture") << "Partial HTTP response produces break in image data for texture " + << mID << ". Aborting load." << LL_ENDL; + mState = DONE; + releaseHttpSemaphore(); + return true; + } + src_offset = cur_size - mHttpReplyOffset; + append_size -= src_offset; + total_size -= src_offset; + mRequestedSize -= src_offset; // Make requested values reflect useful part + mRequestedOffset += src_offset; + } + if (mFormattedImage.isNull()) { // For now, create formatted image based on extension @@ -1325,44 +1600,49 @@ bool LLTextureFetchWorker::doWork(S32 param) } } - if (mHaveAllData && mRequestedDiscard == 0) //the image file is fully loaded. + if (mHaveAllData) //the image file is fully loaded. { - mFileSize = mBufferSize; + mFileSize = total_size; } else //the file size is unknown. { - mFileSize = mBufferSize + 1 ; //flag the file is not fully loaded. + mFileSize = total_size + 1 ; //flag the file is not fully loaded. } - U8* buffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), mBufferSize); + U8 * buffer = (U8 *) ALLOCATE_MEM(LLImageBase::getPrivatePool(), total_size); if (cur_size > 0) { memcpy(buffer, mFormattedImage->getData(), cur_size); } - memcpy(buffer + cur_size, mBuffer, mRequestedSize); // append + mHttpBufferArray->read(src_offset, (char *) buffer + cur_size, append_size); + // NOTE: setData releases current data and owns new data (buffer) - mFormattedImage->setData(buffer, mBufferSize); - // delete temp data - FREE_MEM(LLImageBase::getPrivatePool(), mBuffer); // Note: not 'buffer' (assigned in setData()) - mBuffer = NULL; - mBufferSize = 0; + mFormattedImage->setData(buffer, total_size); + + // Done with buffer array + mHttpBufferArray->release(); + mHttpBufferArray = NULL; + mHttpReplySize = 0; + mHttpReplyOffset = 0; + mLoadedDiscard = mRequestedDiscard; mState = DECODE_IMAGE; - if(mWriteToCacheState != NOT_WRITE) + if (mWriteToCacheState != NOT_WRITE) { mWriteToCacheState = SHOULD_WRITE ; } setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + releaseHttpSemaphore(); return false; } else { - if(FETCHING_TIMEOUT < mRequestedTimer.getElapsedTimeF32()) - { - //timeout, abort. - mState = DONE; - return true; - } + // *HISTORY: There was a texture timeout test here originally that + // would cancel a request that was over 120 seconds old. That's + // probably not a good idea. Particularly rich regions can take + // an enormous amount of time to load textures. We'll revisit the + // various possible timeout components (total request time, connection + // time, I/O time, with and without retries, etc.) in the future. setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); return false; @@ -1372,11 +1652,12 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mState == DECODE_IMAGE) { static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled"); - if(textures_decode_disabled) + + setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it + if (textures_decode_disabled) { // for debug use, don't decode mState = DONE; - setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); return true; } @@ -1384,7 +1665,6 @@ bool LLTextureFetchWorker::doWork(S32 param) { // We aborted, don't decode mState = DONE; - setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); return true; } @@ -1394,7 +1674,6 @@ bool LLTextureFetchWorker::doWork(S32 param) //abort, don't decode mState = DONE; - setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); return true; } if (mLoadedDiscard < 0) @@ -1403,10 +1682,9 @@ bool LLTextureFetchWorker::doWork(S32 param) //abort, don't decode mState = DONE; - setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); return true; } - setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it + mRawImage = NULL; mAuxImage = NULL; llassert_always(mFormattedImage.notNull()); @@ -1492,10 +1770,11 @@ bool LLTextureFetchWorker::doWork(S32 param) U32 cache_priority = mWorkPriority; mWritten = FALSE; mState = WAIT_ON_WRITE; + ++mCacheWriteCount; CacheWriteResponder* responder = new CacheWriteResponder(mFetcher, mID); mCacheWriteHandle = mFetcher->mTextureCache->writeToCache(mID, cache_priority, mFormattedImage->getData(), datasize, - mFileSize, responder); + mFileSize, mRawImage, mDecodedDiscard, responder); // fall through } @@ -1536,9 +1815,84 @@ bool LLTextureFetchWorker::doWork(S32 param) } return false; -} +} // -Mw + +// Threads: Ttf +// virtual +void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response) +{ + static LLCachedControl<bool> log_to_viewer_log(gSavedSettings, "LogTextureDownloadsToViewerLog"); + static LLCachedControl<bool> log_to_sim(gSavedSettings, "LogTextureDownloadsToSimulator"); + static LLCachedControl<bool> log_texture_traffic(gSavedSettings, "LogTextureNetworkTraffic") ; + + LLMutexLock lock(&mWorkMutex); // +Mw + + mHttpActive = false; + + if (log_to_viewer_log || log_to_sim) + { + U64 timeNow = LLTimer::getTotalTime(); + mFetcher->mTextureInfo.setRequestStartTime(mID, mMetricsStartTime); + mFetcher->mTextureInfo.setRequestType(mID, LLTextureInfoDetails::REQUEST_TYPE_HTTP); + mFetcher->mTextureInfo.setRequestSize(mID, mRequestedSize); + mFetcher->mTextureInfo.setRequestOffset(mID, mRequestedOffset); + mFetcher->mTextureInfo.setRequestCompleteTimeAndLog(mID, timeNow); + } + + bool success = true; + bool partial = false; + LLCore::HttpStatus status(response->getStatus()); + + lldebugs << "HTTP COMPLETE: " << mID + << " status: " << status.toHex() + << " '" << status.toString() << "'" + << llendl; +// unsigned int offset(0), length(0), full_length(0); +// response->getRange(&offset, &length, &full_length); +// llwarns << "HTTP COMPLETE: " << mID << " handle: " << handle +// << " status: " << status.toULong() << " '" << status.toString() << "'" +// << " req offset: " << mRequestedOffset << " req length: " << mRequestedSize +// << " offset: " << offset << " length: " << length +// << llendl; + + if (! status) + { + success = false; + std::string reason(status.toString()); + setGetStatus(status, reason); + llwarns << "CURL GET FAILED, status: " << status.toHex() + << " reason: " << reason << llendl; + } + else + { + // A warning about partial (HTTP 206) data. Some grid services + // do *not* return a 'Content-Range' header in the response to + // Range requests with a 206 status. We're forced to assume + // we get what we asked for in these cases until we can fix + // the services. + static const LLCore::HttpStatus par_status(HTTP_PARTIAL_CONTENT); + + partial = (par_status == status); + } + + S32 data_size = callbackHttpGet(response, partial, success); + + if (log_texture_traffic && data_size > 0) + { + LLViewerTexture* tex = LLViewerTextureManager::findTexture(mID); + if (tex) + { + gTotalTextureBytesPerBoostLevel[tex->getBoostLevel()] += data_size ; + } + } + + mFetcher->removeFromHTTPQueue(mID, data_size); + + recordTextureDone(true); +} // -Mw + -// Called from MAIN thread +// Threads: Tmain void LLTextureFetchWorker::endWork(S32 param, bool aborted) { if (mDecodeHandle != 0) @@ -1551,6 +1905,8 @@ void LLTextureFetchWorker::endWork(S32 param, bool aborted) ////////////////////////////////////////////////////////////////////////////// +// Threads: Ttf + // virtual void LLTextureFetchWorker::finishWork(S32 param, bool completed) { @@ -1567,10 +1923,37 @@ void LLTextureFetchWorker::finishWork(S32 param, bool completed) } } +// LLQueuedThread's update() method is asking if it's okay to +// delete this worker. You'll notice we're not locking in here +// which is a slight concern. Caller is expected to have made +// this request 'quiet' by whatever means... +// +// Threads: Tmain + // virtual bool LLTextureFetchWorker::deleteOK() { bool delete_ok = true; + + if (mHttpActive) + { + // HTTP library has a pointer to this worker + // and will dereference it to do notification. + delete_ok = false; + } + + if (WAIT_HTTP_RESOURCE2 == mState) + { + if (mFetcher->isHttpWaiter(mID)) + { + // Don't delete the worker out from under the releaseHttpWaiters() + // method. Keep the pointers valid, clean up after that method + // has recognized the cancelation and removed the UUID from the + // waiter list. + delete_ok = false; + } + } + // Allow any pending reads or writes to complete if (mCacheReadHandle != LLTextureCache::nullHandle()) { @@ -1605,6 +1988,7 @@ bool LLTextureFetchWorker::deleteOK() return delete_ok; } +// Threads: Ttf void LLTextureFetchWorker::removeFromCache() { if (!mInLocalCache) @@ -1616,6 +2000,8 @@ void LLTextureFetchWorker::removeFromCache() ////////////////////////////////////////////////////////////////////////////// +// Threads: Ttf +// Locks: Mw bool LLTextureFetchWorker::processSimulatorPackets() { if (mFormattedImage.isNull() || mRequestedSize < 0) @@ -1676,14 +2062,13 @@ bool LLTextureFetchWorker::processSimulatorPackets() ////////////////////////////////////////////////////////////////////////////// -S32 LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels, - const LLIOPipe::buffer_ptr_t& buffer, - bool partial, bool success) +// Threads: Ttf +// Locks: Mw +S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, + bool partial, bool success) { S32 data_size = 0 ; - LLMutexLock lock(&mWorkMutex); - if (mState != WAIT_HTTP_REQ) { llwarns << "callbackHttpGet for unrequested fetch worker: " << mID @@ -1698,27 +2083,69 @@ S32 LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels, if (success) { // get length of stream: - data_size = buffer->countAfter(channels.in(), NULL); - + LLCore::BufferArray * body(response->getBody()); + data_size = body ? body->size() : 0; + LL_DEBUGS("Texture") << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL; if (data_size > 0) { + LLViewerStatsRecorder::instance().textureFetch(data_size); // *TODO: set the formatted image data here directly to avoid the copy - mBuffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), data_size); - buffer->readAfter(channels.in(), NULL, mBuffer, data_size); - mBufferSize += data_size; - if (data_size < mRequestedSize && mRequestedDiscard == 0) + + // Hold on to body for later copy + llassert_always(NULL == mHttpBufferArray); + body->addRef(); + mHttpBufferArray = body; + + if (partial) + { + unsigned int offset(0), length(0), full_length(0); + response->getRange(&offset, &length, &full_length); + if (! offset && ! length) + { + // This is the case where we receive a 206 status but + // there wasn't a useful Content-Range header in the response. + // This could be because it was badly formatted but is more + // likely due to capabilities services which scrub headers + // from responses. Assume we got what we asked for... + mHttpReplySize = data_size; + mHttpReplyOffset = mRequestedOffset; + } + else + { + mHttpReplySize = length; + mHttpReplyOffset = offset; + } + } + + if (! partial) + { + // Response indicates this is the entire asset regardless + // of our asking for a byte range. Mark it so and drop + // any partial data we might have so that the current + // response body becomes the entire dataset. + if (data_size <= mRequestedOffset) + { + LL_WARNS("Texture") << "Fetched entire texture " << mID + << " when it was expected to be marked complete. mImageSize: " + << mFileSize << " datasize: " << mFormattedImage->getDataSize() + << LL_ENDL; + } + mHaveAllData = TRUE; + llassert_always(mDecodeHandle == 0); + mFormattedImage = NULL; // discard any previous data we had + } + else if (data_size < mRequestedSize) { mHaveAllData = TRUE; } else if (data_size > mRequestedSize) { - // *TODO: This shouldn't be happening any more + // *TODO: This shouldn't be happening any more (REALLY don't expect this anymore) llwarns << "data_size = " << data_size << " > requested: " << mRequestedSize << llendl; mHaveAllData = TRUE; llassert_always(mDecodeHandle == 0); mFormattedImage = NULL; // discard any previous data we had - mBufferSize = data_size; } } else @@ -1733,18 +2160,21 @@ S32 LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels, { mRequestedSize = -1; // error } + mLoaded = TRUE; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + LLViewerStatsRecorder::instance().log(0.2f); return data_size ; } ////////////////////////////////////////////////////////////////////////////// +// Threads: Ttc void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* image, S32 imagesize, BOOL islocal) { - LLMutexLock lock(&mWorkMutex); + LLMutexLock lock(&mWorkMutex); // +Mw if (mState != LOAD_FROM_TEXTURE_CACHE) { // llwarns << "Read callback for " << mID << " with state = " << mState << llendl; @@ -1764,11 +2194,12 @@ void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* ima } mLoaded = TRUE; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); -} +} // -Mw +// Threads: Ttc void LLTextureFetchWorker::callbackCacheWrite(bool success) { - LLMutexLock lock(&mWorkMutex); + LLMutexLock lock(&mWorkMutex); // +Mw if (mState != WAIT_ON_WRITE) { // llwarns << "Write callback for " << mID << " with state = " << mState << llendl; @@ -1776,13 +2207,14 @@ void LLTextureFetchWorker::callbackCacheWrite(bool success) } mWritten = TRUE; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); -} +} // -Mw ////////////////////////////////////////////////////////////////////////////// +// Threads: Tid void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImageRaw* aux) { - LLMutexLock lock(&mWorkMutex); + LLMutexLock lock(&mWorkMutex); // +Mw if (mDecodeHandle == 0) { return; // aborted, ignore @@ -1815,10 +2247,11 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag // llinfos << mID << " : DECODE COMPLETE " << llendl; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); mCacheReadTime = mCacheReadTimer.getElapsedTimeF32(); -} +} // -Mw ////////////////////////////////////////////////////////////////////////////// +// Threads: Ttf bool LLTextureFetchWorker::writeToCacheComplete() { // Complete write to cache @@ -1841,6 +2274,36 @@ bool LLTextureFetchWorker::writeToCacheComplete() } +// Threads: Ttf +void LLTextureFetchWorker::recordTextureStart(bool is_http) +{ + if (! mMetricsStartTime) + { + mMetricsStartTime = LLViewerAssetStatsFF::get_timestamp(); + } + LLViewerAssetStatsFF::record_enqueue_thread1(LLViewerAssetType::AT_TEXTURE, + is_http, + LLImageBase::TYPE_AVATAR_BAKE == mType); +} + + +// Threads: Ttf +void LLTextureFetchWorker::recordTextureDone(bool is_http) +{ + if (mMetricsStartTime) + { + LLViewerAssetStatsFF::record_response_thread1(LLViewerAssetType::AT_TEXTURE, + is_http, + LLImageBase::TYPE_AVATAR_BAKE == mType, + LLViewerAssetStatsFF::get_timestamp() - mMetricsStartTime); + mMetricsStartTime = 0; + } + LLViewerAssetStatsFF::record_dequeue_thread1(LLViewerAssetType::AT_TEXTURE, + is_http, + LLImageBase::TYPE_AVATAR_BAKE == mType); +} + + ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // public @@ -1858,12 +2321,21 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image mTextureBandwidth(0), mHTTPTextureBits(0), mTotalHTTPRequests(0), - mCurlGetRequest(NULL), mQAMode(qa_mode), + mHttpRequest(NULL), + mHttpOptions(NULL), + mHttpHeaders(NULL), + mHttpMetricsHeaders(NULL), + mHttpPolicyClass(LLCore::HttpRequest::DEFAULT_POLICY_ID), + mHttpSemaphore(HTTP_REQUESTS_IN_QUEUE_HIGH_WATER), + mTotalCacheReadCount(0U), + mTotalCacheWriteCount(0U), + mTotalResourceWaitCount(0U), mFetchDebugger(NULL), + mFetchSource(LLTextureFetch::FROM_ALL), + mOriginFetchSource(LLTextureFetch::FROM_ALL), mFetcherLocked(FALSE) { - mCurlPOSTRequestCount = 0; mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), gSavedSettings.getU32("TextureLoggingThreshold")); @@ -1871,12 +2343,27 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image if(LLTextureFetchDebugger::isEnabled()) { mFetchDebugger = new LLTextureFetchDebugger(this, cache, imagedecodethread) ; + mFetchSource = (e_tex_source)gSavedSettings.getS32("TextureFetchSource"); + if(mFetchSource < 0 && mFetchSource >= INVALID_SOURCE) + { + mFetchSource = LLTextureFetch::FROM_ALL; + gSavedSettings.setS32("TextureFetchSource", 0); + } + mOriginFetchSource = mFetchSource; } + + mHttpRequest = new LLCore::HttpRequest; + mHttpOptions = new LLCore::HttpOptions; + mHttpHeaders = new LLCore::HttpHeaders; + mHttpHeaders->mHeaders.push_back("Accept: image/x-j2c"); + mHttpMetricsHeaders = new LLCore::HttpHeaders; + mHttpMetricsHeaders->mHeaders.push_back("Content-Type: application/llsd+xml"); + mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicyDefault(); } LLTextureFetch::~LLTextureFetch() { - clearDeleteList() ; + clearDeleteList(); while (! mCommands.empty()) { @@ -1884,10 +2371,34 @@ LLTextureFetch::~LLTextureFetch() mCommands.erase(mCommands.begin()); delete req; } + + if (mHttpOptions) + { + mHttpOptions->release(); + mHttpOptions = NULL; + } + + if (mHttpHeaders) + { + mHttpHeaders->release(); + mHttpHeaders = NULL; + } + + if (mHttpMetricsHeaders) + { + mHttpMetricsHeaders->release(); + mHttpMetricsHeaders = NULL; + } + + mHttpWaitResource.clear(); - // ~LLQueuedThread() called here + delete mHttpRequest; + mHttpRequest = NULL; delete mFetchDebugger; + mFetchDebugger = NULL; + + // ~LLQueuedThread() called here } bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, @@ -1940,6 +2451,8 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con } else { + // If the requester knows nothing about the file, we fetch the smallest + // amount of data at the lowest resolution (highest discard level) possible. desired_size = TEXTURE_CACHE_ENTRY_SIZE; desired_discard = MAX_DISCARD_LEVEL; } @@ -1951,7 +2464,7 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con { return false; // need to wait for previous aborted request to complete } - worker->lockWorkMutex(); + worker->lockWorkMutex(); // +Mw worker->mActiveCount++; worker->mNeedsAux = needs_aux; worker->setImagePriority(priority); @@ -1960,41 +2473,44 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con if (!worker->haveWork()) { worker->mState = LLTextureFetchWorker::INIT; - worker->unlockWorkMutex(); + worker->unlockWorkMutex(); // -Mw worker->addWork(0, LLWorkerThread::PRIORITY_HIGH | worker->mWorkPriority); } else { - worker->unlockWorkMutex(); + worker->unlockWorkMutex(); // -Mw } } else { worker = new LLTextureFetchWorker(this, url, id, host, priority, desired_discard, desired_size); - lockQueue() ; + lockQueue(); // +Mfq mRequestMap[id] = worker; - unlockQueue() ; + unlockQueue(); // -Mfq - worker->lockWorkMutex(); + worker->lockWorkMutex(); // +Mw worker->mActiveCount++; worker->mNeedsAux = needs_aux; worker->setCanUseHTTP(can_use_http) ; - worker->unlockWorkMutex(); + worker->unlockWorkMutex(); // -Mw } // llinfos << "REQUESTED: " << id << " Discard: " << desired_discard << llendl; return true; } + +// Threads: T* (but Ttf in practice) + // protected void LLTextureFetch::addToNetworkQueue(LLTextureFetchWorker* worker) { - lockQueue() ; + lockQueue(); // +Mfq bool in_request_map = (mRequestMap.find(worker->mID) != mRequestMap.end()) ; - unlockQueue() ; + unlockQueue(); // -Mfq - LLMutexLock lock(&mNetworkQueueMutex); + LLMutexLock lock(&mNetworkQueueMutex); // +Mfnq if (in_request_map) { // only add to the queue if in the request map @@ -2006,44 +2522,52 @@ void LLTextureFetch::addToNetworkQueue(LLTextureFetchWorker* worker) { iter1->second.erase(worker->mID); } -} +} // -Mfnq +// Threads: T* void LLTextureFetch::removeFromNetworkQueue(LLTextureFetchWorker* worker, bool cancel) { - LLMutexLock lock(&mNetworkQueueMutex); + LLMutexLock lock(&mNetworkQueueMutex); // +Mfnq size_t erased = mNetworkQueue.erase(worker->mID); if (cancel && erased > 0) { mCancelQueue[worker->mHost].insert(worker->mID); } -} +} // -Mfnq +// Threads: T* +// // protected void LLTextureFetch::addToHTTPQueue(const LLUUID& id) { - LLMutexLock lock(&mNetworkQueueMutex); + LLMutexLock lock(&mNetworkQueueMutex); // +Mfnq mHTTPTextureQueue.insert(id); mTotalHTTPRequests++; -} +} // -Mfnq +// Threads: T* void LLTextureFetch::removeFromHTTPQueue(const LLUUID& id, S32 received_size) { - LLMutexLock lock(&mNetworkQueueMutex); + LLMutexLock lock(&mNetworkQueueMutex); // +Mfnq mHTTPTextureQueue.erase(id); mHTTPTextureBits += received_size * 8; // Approximate - does not include header bits -} +} // -Mfnq +// NB: If you change deleteRequest() you should probably make +// parallel changes in removeRequest(). They're functionally +// identical with only argument variations. +// +// Threads: T* void LLTextureFetch::deleteRequest(const LLUUID& id, bool cancel) { - lockQueue() ; + lockQueue(); // +Mfq LLTextureFetchWorker* worker = getWorkerAfterLock(id); if (worker) { size_t erased_1 = mRequestMap.erase(worker->mID); - unlockQueue() ; + unlockQueue(); // -Mfq llassert_always(erased_1 > 0) ; - removeFromNetworkQueue(worker, cancel); llassert_always(!(worker->getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) ; @@ -2051,15 +2575,25 @@ void LLTextureFetch::deleteRequest(const LLUUID& id, bool cancel) } else { - unlockQueue() ; + unlockQueue(); // -Mfq } } +// NB: If you change removeRequest() you should probably make +// parallel changes in deleteRequest(). They're functionally +// identical with only argument variations. +// +// Threads: T* void LLTextureFetch::removeRequest(LLTextureFetchWorker* worker, bool cancel) { - lockQueue() ; + if(!worker) + { + return; + } + + lockQueue(); // +Mfq size_t erased_1 = mRequestMap.erase(worker->mID); - unlockQueue() ; + unlockQueue(); // -Mfq llassert_always(erased_1 > 0) ; removeFromNetworkQueue(worker, cancel); @@ -2068,34 +2602,57 @@ void LLTextureFetch::removeRequest(LLTextureFetchWorker* worker, bool cancel) worker->scheduleDelete(); } +void LLTextureFetch::deleteAllRequests() +{ + while(1) + { + lockQueue(); + if(mRequestMap.empty()) + { + unlockQueue() ; + break; + } + + LLTextureFetchWorker* worker = mRequestMap.begin()->second; + unlockQueue() ; + + removeRequest(worker, true); + } +} + +// Threads: T* S32 LLTextureFetch::getNumRequests() { - lockQueue() ; + lockQueue(); // +Mfq S32 size = (S32)mRequestMap.size(); - unlockQueue() ; + unlockQueue(); // -Mfq - return size ; + return size; } +// Threads: T* S32 LLTextureFetch::getNumHTTPRequests() { - mNetworkQueueMutex.lock() ; + mNetworkQueueMutex.lock(); // +Mfq S32 size = (S32)mHTTPTextureQueue.size(); - mNetworkQueueMutex.unlock() ; + mNetworkQueueMutex.unlock(); // -Mfq - return size ; + return size; } +// Threads: T* U32 LLTextureFetch::getTotalNumHTTPRequests() { - mNetworkQueueMutex.lock() ; - U32 size = mTotalHTTPRequests ; - mNetworkQueueMutex.unlock() ; + mNetworkQueueMutex.lock(); // +Mfq + U32 size = mTotalHTTPRequests; + mNetworkQueueMutex.unlock(); // -Mfq - return size ; + return size; } // call lockQueue() first! +// Threads: T* +// Locks: Mfq LLTextureFetchWorker* LLTextureFetch::getWorkerAfterLock(const LLUUID& id) { LLTextureFetchWorker* res = NULL; @@ -2107,14 +2664,16 @@ LLTextureFetchWorker* LLTextureFetch::getWorkerAfterLock(const LLUUID& id) return res; } +// Threads: T* LLTextureFetchWorker* LLTextureFetch::getWorker(const LLUUID& id) { - LLMutexLock lock(&mQueueMutex) ; + LLMutexLock lock(&mQueueMutex); // +Mfq - return getWorkerAfterLock(id) ; -} + return getWorkerAfterLock(id); +} // -Mfq +// Threads: T* bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux) { @@ -2137,7 +2696,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, } else if (worker->checkWork()) { - worker->lockWorkMutex(); + worker->lockWorkMutex(); // +Mw discard_level = worker->mDecodedDiscard; raw = worker->mRawImage; aux = worker->mAuxImage; @@ -2148,11 +2707,11 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, } res = true; LL_DEBUGS("Texture") << id << ": Request Finished. State: " << worker->mState << " Discard: " << discard_level << LL_ENDL; - worker->unlockWorkMutex(); + worker->unlockWorkMutex(); // -Mw } else { - worker->lockWorkMutex(); + worker->lockWorkMutex(); // +Mw if ((worker->mDecodedDiscard >= 0) && (worker->mDecodedDiscard < discard_level || discard_level < 0) && (worker->mState >= LLTextureFetchWorker::WAIT_ON_WRITE)) @@ -2162,7 +2721,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, raw = worker->mRawImage; aux = worker->mAuxImage; } - worker->unlockWorkMutex(); + worker->unlockWorkMutex(); // -Mw } } else @@ -2172,15 +2731,16 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, return res; } +// Threads: T* bool LLTextureFetch::updateRequestPriority(const LLUUID& id, F32 priority) { bool res = false; LLTextureFetchWorker* worker = getWorker(id); if (worker) { - worker->lockWorkMutex(); + worker->lockWorkMutex(); // +Mw worker->setImagePriority(priority); - worker->unlockWorkMutex(); + worker->unlockWorkMutex(); // -Mw res = true; } return res; @@ -2195,24 +2755,24 @@ bool LLTextureFetch::updateRequestPriority(const LLUUID& id, F32 priority) // in step, at least until this can be refactored and // the redundancy eliminated. // -// May be called from any thread +// Threads: T* //virtual S32 LLTextureFetch::getPending() { S32 res; - lockData(); + lockData(); // +Ct { - LLMutexLock lock(&mQueueMutex); + LLMutexLock lock(&mQueueMutex); // +Mfq res = mRequestQueue.size(); - res += mCurlPOSTRequestCount; res += mCommands.size(); - } - unlockData(); + } // -Mfq + unlockData(); // -Ct return res; } +// Locks: Ct // virtual bool LLTextureFetch::runCondition() { @@ -2227,49 +2787,52 @@ bool LLTextureFetch::runCondition() bool have_no_commands(false); { - LLMutexLock lock(&mQueueMutex); + LLMutexLock lock(&mQueueMutex); // +Mfq have_no_commands = mCommands.empty(); - } - - bool have_no_curl_requests(0 == mCurlPOSTRequestCount); + } // -Mfq return ! (have_no_commands - && have_no_curl_requests && (mRequestQueue.empty() && mIdleThread)); // From base class } ////////////////////////////////////////////////////////////////////////////// -// MAIN THREAD (unthreaded envs), WORKER THREAD (threaded envs) +// Threads: Ttf void LLTextureFetch::commonUpdate() { + // Release waiters + releaseHttpWaiters(); + // Run a cross-thread command, if any. cmdDoWork(); - // Update Curl on same thread as mCurlGetRequest was constructed - S32 processed = mCurlGetRequest->process(); - if (processed > 0) + // Deliver all completion notifications + LLCore::HttpStatus status = mHttpRequest->update(0); + if (! status) { - lldebugs << "processed: " << processed << " messages." << llendl; + LL_INFOS_ONCE("Texture") << "Problem during HTTP servicing. Reason: " + << status.toString() + << LL_ENDL; } } -// MAIN THREAD +// Threads: Tmain + //virtual S32 LLTextureFetch::update(F32 max_time_ms) { static LLCachedControl<F32> band_width(gSavedSettings,"ThrottleBandwidthKBPS"); { - mNetworkQueueMutex.lock() ; - mMaxBandwidth = band_width ; + mNetworkQueueMutex.lock(); // +Mfnq + mMaxBandwidth = band_width; - gTextureList.sTextureBits += mHTTPTextureBits ; - mHTTPTextureBits = 0 ; + gTextureList.sTextureBits += mHTTPTextureBits; + mHTTPTextureBits = 0; - mNetworkQueueMutex.unlock() ; + mNetworkQueueMutex.unlock(); // -Mfnq } S32 res = LLWorkerThread::update(max_time_ms); @@ -2281,7 +2844,7 @@ S32 LLTextureFetch::update(F32 max_time_ms) // won't work so don't bother trying if (LLStartUp::getStartupState() > STATE_AGENT_SEND) { - sendRequestListToSimulators(); + sendRequestListToSimulators(); } } @@ -2290,10 +2853,17 @@ S32 LLTextureFetch::update(F32 max_time_ms) commonUpdate(); } + if (mFetchDebugger) + { + mFetchDebugger->tryToStopDebug(); //check if need to stop debugger. + } + return res; } -//called in the MAIN thread after the TextureCacheThread shuts down. +// called in the MAIN thread after the TextureCacheThread shuts down. +// +// Threads: Tmain void LLTextureFetch::shutDownTextureCacheThread() { if(mTextureCache) @@ -2303,7 +2873,9 @@ void LLTextureFetch::shutDownTextureCacheThread() } } -//called in the MAIN thread after the ImageDecodeThread shuts down. +// called in the MAIN thread after the ImageDecodeThread shuts down. +// +// Threads: Tmain void LLTextureFetch::shutDownImageDecodeThread() { if(mImageDecodeThread) @@ -2313,35 +2885,27 @@ void LLTextureFetch::shutDownImageDecodeThread() } } -// WORKER THREAD +// Threads: Ttf void LLTextureFetch::startThread() { - // Construct mCurlGetRequest from Worker Thread - mCurlGetRequest = new LLCurlRequest(); - - if(mFetchDebugger) - { - mFetchDebugger->setCurlGetRequest(mCurlGetRequest); - } } -// WORKER THREAD +// Threads: Ttf void LLTextureFetch::endThread() { - // Destroy mCurlGetRequest from Worker Thread - delete mCurlGetRequest; - mCurlGetRequest = NULL; - if(mFetchDebugger) - { - mFetchDebugger->setCurlGetRequest(NULL); - } + LL_INFOS("Texture") << "CacheReads: " << mTotalCacheReadCount + << ", CacheWrites: " << mTotalCacheWriteCount + << ", ResWaits: " << mTotalResourceWaitCount + << ", TotalHTTPReq: " << getTotalNumHTTPRequests() + << LL_ENDL; } -// WORKER THREAD +// Threads: Ttf void LLTextureFetch::threadedUpdate() { - llassert_always(mCurlGetRequest); - + llassert_always(mHttpRequest); + +#if 0 // Limit update frequency const F32 PROCESS_TIME = 0.05f; static LLFrameTimer process_timer; @@ -2350,9 +2914,10 @@ void LLTextureFetch::threadedUpdate() return; } process_timer.reset(); +#endif commonUpdate(); - + #if 0 const F32 INFO_TIME = 1.0f; static LLFrameTimer info_timer; @@ -2366,11 +2931,11 @@ void LLTextureFetch::threadedUpdate() } } #endif - } ////////////////////////////////////////////////////////////////////////////// +// Threads: Tmain void LLTextureFetch::sendRequestListToSimulators() { // All requests @@ -2396,48 +2961,48 @@ void LLTextureFetch::sendRequestListToSimulators() typedef std::map< LLHost, request_list_t > work_request_map_t; work_request_map_t requests; { - LLMutexLock lock2(&mNetworkQueueMutex); - for (queue_t::iterator iter = mNetworkQueue.begin(); iter != mNetworkQueue.end(); ) - { - queue_t::iterator curiter = iter++; - LLTextureFetchWorker* req = getWorker(*curiter); - if (!req) + LLMutexLock lock2(&mNetworkQueueMutex); // +Mfnq + for (queue_t::iterator iter = mNetworkQueue.begin(); iter != mNetworkQueue.end(); ) { - mNetworkQueue.erase(curiter); - continue; // paranoia - } - if ((req->mState != LLTextureFetchWorker::LOAD_FROM_NETWORK) && - (req->mState != LLTextureFetchWorker::LOAD_FROM_SIMULATOR)) - { - // We already received our URL, remove from the queue - llwarns << "Worker: " << req->mID << " in mNetworkQueue but in wrong state: " << req->mState << llendl; - mNetworkQueue.erase(curiter); - continue; - } - if (req->mID == mDebugID) - { - mDebugCount++; // for setting breakpoints - } - if (req->mSentRequest == LLTextureFetchWorker::SENT_SIM && - req->mTotalPackets > 0 && - req->mLastPacket >= req->mTotalPackets-1) - { - // We have all the packets... make sure this is high priority + queue_t::iterator curiter = iter++; + LLTextureFetchWorker* req = getWorker(*curiter); + if (!req) + { + mNetworkQueue.erase(curiter); + continue; // paranoia + } + if ((req->mState != LLTextureFetchWorker::LOAD_FROM_NETWORK) && + (req->mState != LLTextureFetchWorker::LOAD_FROM_SIMULATOR)) + { + // We already received our URL, remove from the queue + llwarns << "Worker: " << req->mID << " in mNetworkQueue but in wrong state: " << req->mState << llendl; + mNetworkQueue.erase(curiter); + continue; + } + if (req->mID == mDebugID) + { + mDebugCount++; // for setting breakpoints + } + if (req->mSentRequest == LLTextureFetchWorker::SENT_SIM && + req->mTotalPackets > 0 && + req->mLastPacket >= req->mTotalPackets-1) + { + // We have all the packets... make sure this is high priority // req->setPriority(LLWorkerThread::PRIORITY_HIGH | req->mWorkPriority); - continue; - } - F32 elapsed = req->mRequestedTimer.getElapsedTimeF32(); - { - F32 delta_priority = llabs(req->mRequestedPriority - req->mImagePriority); - if ((req->mSimRequestedDiscard != req->mDesiredDiscard) || - (delta_priority > MIN_DELTA_PRIORITY && elapsed >= MIN_REQUEST_TIME) || - (elapsed >= SIM_LAZY_FLUSH_TIMEOUT)) + continue; + } + F32 elapsed = req->mRequestedTimer.getElapsedTimeF32(); { - requests[req->mHost].insert(req); + F32 delta_priority = llabs(req->mRequestedPriority - req->mImagePriority); + if ((req->mSimRequestedDiscard != req->mDesiredDiscard) || + (delta_priority > MIN_DELTA_PRIORITY && elapsed >= MIN_REQUEST_TIME) || + (elapsed >= SIM_LAZY_FLUSH_TIMEOUT)) + { + requests[req->mHost].insert(req); + } } } - } - } + } // -Mfnq for (work_request_map_t::iterator iter1 = requests.begin(); iter1 != requests.end(); ++iter1) @@ -2460,9 +3025,9 @@ void LLTextureFetch::sendRequestListToSimulators() if (req->mSentRequest != LLTextureFetchWorker::SENT_SIM) { // Initialize packet data based on data read from cache - req->lockWorkMutex(); + req->lockWorkMutex(); // +Mw req->setupPacketData(); - req->unlockWorkMutex(); + req->unlockWorkMutex(); // -Mw } if (0 == sim_request_count) { @@ -2491,12 +3056,12 @@ void LLTextureFetch::sendRequestListToSimulators() mTextureInfo.setRequestType(req->mID, LLTextureInfoDetails::REQUEST_TYPE_UDP); } - req->lockWorkMutex(); + req->lockWorkMutex(); // +Mw req->mSentRequest = LLTextureFetchWorker::SENT_SIM; req->mSimRequestedDiscard = req->mDesiredDiscard; req->mRequestedPriority = req->mImagePriority; req->mRequestedTimer.reset(); - req->unlockWorkMutex(); + req->unlockWorkMutex(); // -Mw sim_request_count++; if (sim_request_count >= IMAGES_PER_REQUEST) { @@ -2517,55 +3082,57 @@ void LLTextureFetch::sendRequestListToSimulators() // Send cancelations { - LLMutexLock lock2(&mNetworkQueueMutex); - if (gMessageSystem && !mCancelQueue.empty()) - { - for (cancel_queue_t::iterator iter1 = mCancelQueue.begin(); - iter1 != mCancelQueue.end(); ++iter1) + LLMutexLock lock2(&mNetworkQueueMutex); // +Mfnq + if (gMessageSystem && !mCancelQueue.empty()) { - LLHost host = iter1->first; - if (host == LLHost::invalid) - { - host = gAgent.getRegionHost(); - } - S32 request_count = 0; - for (queue_t::iterator iter2 = iter1->second.begin(); - iter2 != iter1->second.end(); ++iter2) + for (cancel_queue_t::iterator iter1 = mCancelQueue.begin(); + iter1 != mCancelQueue.end(); ++iter1) { - if (0 == request_count) + LLHost host = iter1->first; + if (host == LLHost::invalid) { - gMessageSystem->newMessageFast(_PREHASH_RequestImage); - gMessageSystem->nextBlockFast(_PREHASH_AgentData); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + host = gAgent.getRegionHost(); } - gMessageSystem->nextBlockFast(_PREHASH_RequestImage); - gMessageSystem->addUUIDFast(_PREHASH_Image, *iter2); - gMessageSystem->addS8Fast(_PREHASH_DiscardLevel, -1); - gMessageSystem->addF32Fast(_PREHASH_DownloadPriority, 0); - gMessageSystem->addU32Fast(_PREHASH_Packet, 0); - gMessageSystem->addU8Fast(_PREHASH_Type, 0); + S32 request_count = 0; + for (queue_t::iterator iter2 = iter1->second.begin(); + iter2 != iter1->second.end(); ++iter2) + { + if (0 == request_count) + { + gMessageSystem->newMessageFast(_PREHASH_RequestImage); + gMessageSystem->nextBlockFast(_PREHASH_AgentData); + gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + } + gMessageSystem->nextBlockFast(_PREHASH_RequestImage); + gMessageSystem->addUUIDFast(_PREHASH_Image, *iter2); + gMessageSystem->addS8Fast(_PREHASH_DiscardLevel, -1); + gMessageSystem->addF32Fast(_PREHASH_DownloadPriority, 0); + gMessageSystem->addU32Fast(_PREHASH_Packet, 0); + gMessageSystem->addU8Fast(_PREHASH_Type, 0); // llinfos << "CANCELING IMAGE REQUEST: " << (*iter2) << llendl; - request_count++; - if (request_count >= IMAGES_PER_REQUEST) + request_count++; + if (request_count >= IMAGES_PER_REQUEST) + { + gMessageSystem->sendSemiReliable(host, NULL, NULL); + request_count = 0; + } + } + if (request_count > 0 && request_count < IMAGES_PER_REQUEST) { gMessageSystem->sendSemiReliable(host, NULL, NULL); - request_count = 0; } } - if (request_count > 0 && request_count < IMAGES_PER_REQUEST) - { - gMessageSystem->sendSemiReliable(host, NULL, NULL); - } + mCancelQueue.clear(); } - mCancelQueue.clear(); - } - } + } // -Mfnq } ////////////////////////////////////////////////////////////////////////////// +// Threads: T* +// Locks: Mw bool LLTextureFetchWorker::insertPacket(S32 index, U8* data, S32 size) { mRequestedTimer.reset(); @@ -2598,6 +3165,7 @@ bool LLTextureFetchWorker::insertPacket(S32 index, U8* data, S32 size) return true; } +// Threads: T* bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8 codec, U16 packets, U32 totalbytes, U16 data_size, U8* data) { @@ -2632,15 +3200,19 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8 } if (!res) { + mNetworkQueueMutex.lock(); // +Mfnq ++mBadPacketCount; - mNetworkQueueMutex.lock() ; mCancelQueue[host].insert(id); - mNetworkQueueMutex.unlock() ; + mNetworkQueueMutex.unlock(); // -Mfnq return false; } + LLViewerStatsRecorder::instance().textureFetch(data_size); + LLViewerStatsRecorder::instance().log(0.1f); + worker->lockWorkMutex(); + // Copy header data into image object worker->mImageCodec = codec; worker->mTotalPackets = packets; @@ -2650,10 +3222,12 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8 res = worker->insertPacket(0, data, data_size); worker->setPriority(LLWorkerThread::PRIORITY_HIGH | worker->mWorkPriority); worker->mState = LLTextureFetchWorker::LOAD_FROM_SIMULATOR; - worker->unlockWorkMutex(); + worker->unlockWorkMutex(); // -Mw return res; } + +// Threads: T* bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U16 packet_num, U16 data_size, U8* data) { LLTextureFetchWorker* worker = getWorker(id); @@ -2678,14 +3252,18 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 } if (!res) { + mNetworkQueueMutex.lock(); // +Mfnq ++mBadPacketCount; - mNetworkQueueMutex.lock() ; mCancelQueue[host].insert(id); - mNetworkQueueMutex.unlock() ; + mNetworkQueueMutex.unlock(); // -Mfnq return false; } + + LLViewerStatsRecorder::instance().textureFetch(data_size); + LLViewerStatsRecorder::instance().log(0.1f); worker->lockWorkMutex(); + res = worker->insertPacket(packet_num, data, data_size); @@ -2702,7 +3280,7 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 removeFromNetworkQueue(worker, true); // failsafe } - if(packet_num >= (worker->mTotalPackets - 1)) + if (packet_num >= (worker->mTotalPackets - 1)) { static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog"); static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator"); @@ -2714,12 +3292,14 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 mTextureInfo.setRequestCompleteTimeAndLog(id, timeNow); } } - worker->unlockWorkMutex(); + worker->unlockWorkMutex(); // -Mw return res; } ////////////////////////////////////////////////////////////////////////////// + +// Threads: T* BOOL LLTextureFetch::isFromLocalCache(const LLUUID& id) { BOOL from_cache = FALSE ; @@ -2727,14 +3307,15 @@ BOOL LLTextureFetch::isFromLocalCache(const LLUUID& id) LLTextureFetchWorker* worker = getWorker(id); if (worker) { - worker->lockWorkMutex() ; - from_cache = worker->mInLocalCache ; - worker->unlockWorkMutex() ; + worker->lockWorkMutex(); // +Mw + from_cache = worker->mInLocalCache; + worker->unlockWorkMutex(); // -Mw } return from_cache ; } +// Threads: T* 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, bool& can_use_http) { @@ -2748,7 +3329,7 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r LLTextureFetchWorker* worker = getWorker(id); if (worker && worker->haveWork()) { - worker->lockWorkMutex(); + worker->lockWorkMutex(); // +Mw state = worker->mState; fetch_dtime = worker->mFetchTimer.getElapsedTimeF32(); request_dtime = worker->mRequestedTimer.getElapsedTimeF32(); @@ -2775,7 +3356,7 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r } fetch_priority = worker->getPriority(); can_use_http = worker->getCanUseHTTP() ; - worker->unlockWorkMutex(); + worker->unlockWorkMutex(); // -Mw } data_progress_p = data_progress; requested_priority_p = requested_priority; @@ -2799,12 +3380,219 @@ void LLTextureFetch::dump() << " STATE: " << worker->sStateDescs[worker->mState] << llendl; } + + llinfos << "LLTextureFetch ACTIVE_HTTP:" << llendl; + for (queue_t::const_iterator iter(mHTTPTextureQueue.begin()); + mHTTPTextureQueue.end() != iter; + ++iter) + { + llinfos << " ID: " << (*iter) << llendl; + } + + llinfos << "LLTextureFetch WAIT_HTTP_RESOURCE:" << llendl; + for (wait_http_res_queue_t::const_iterator iter(mHttpWaitResource.begin()); + mHttpWaitResource.end() != iter; + ++iter) + { + llinfos << " ID: " << (*iter) << llendl; + } +} + +////////////////////////////////////////////////////////////////////////////// + +// HTTP Resource Waiting Methods + +// Threads: Ttf +void LLTextureFetch::addHttpWaiter(const LLUUID & tid) +{ + mNetworkQueueMutex.lock(); // +Mfnq + mHttpWaitResource.insert(tid); + mNetworkQueueMutex.unlock(); // -Mfnq +} + +// Threads: Ttf +void LLTextureFetch::removeHttpWaiter(const LLUUID & tid) +{ + mNetworkQueueMutex.lock(); // +Mfnq + wait_http_res_queue_t::iterator iter(mHttpWaitResource.find(tid)); + if (mHttpWaitResource.end() != iter) + { + mHttpWaitResource.erase(iter); + } + mNetworkQueueMutex.unlock(); // -Mfnq +} + +// Threads: T* +bool LLTextureFetch::isHttpWaiter(const LLUUID & tid) +{ + mNetworkQueueMutex.lock(); // +Mfnq + wait_http_res_queue_t::iterator iter(mHttpWaitResource.find(tid)); + const bool ret(mHttpWaitResource.end() != iter); + mNetworkQueueMutex.unlock(); // -Mfnq + return ret; +} + +// Release as many requests as permitted from the WAIT_HTTP_RESOURCE2 +// state to the SEND_HTTP_REQ state based on their current priority. +// +// This data structures and code associated with this looks a bit +// indirect and naive but it's done in the name of safety. An +// ordered container may become invalid from time to time due to +// priority changes caused by actions in other threads. State itself +// could also suffer the same fate with canceled operations. Even +// done this way, I'm not fully trusting we're truly safe. This +// module is due for a major refactoring and we'll deal with it then. +// +// Threads: Ttf +// Locks: -Mw (must not hold any worker when called) +void LLTextureFetch::releaseHttpWaiters() +{ + // Use mHttpSemaphore rather than mHTTPTextureQueue.size() + // to avoid a lock. + if (mHttpSemaphore < (HTTP_REQUESTS_IN_QUEUE_HIGH_WATER - HTTP_REQUESTS_IN_QUEUE_LOW_WATER)) + return; + + // Quickly make a copy of all the LLUIDs. Get off the + // mutex as early as possible. + typedef std::vector<LLUUID> uuid_vec_t; + uuid_vec_t tids; + + { + LLMutexLock lock(&mNetworkQueueMutex); // +Mfnq + + if (mHttpWaitResource.empty()) + return; + tids.reserve(mHttpWaitResource.size()); + tids.assign(mHttpWaitResource.begin(), mHttpWaitResource.end()); + } // -Mfnq + + // Now lookup the UUUIDs to find valid requests and sort + // them in priority order, highest to lowest. We're going + // to modify priority later as a side-effect of releasing + // these objects. That, in turn, would violate the partial + // ordering assumption of std::set, std::map, etc. so we + // don't use those containers. We use a vector and an explicit + // sort to keep the containers valid later. + typedef std::vector<LLTextureFetchWorker *> worker_list_t; + worker_list_t tids2; + + tids2.reserve(tids.size()); + for (uuid_vec_t::iterator iter(tids.begin()); + tids.end() != iter; + ++iter) + { + LLTextureFetchWorker * worker(getWorker(* iter)); + if (worker) + { + tids2.push_back(worker); + } + else + { + // If worker isn't found, this should be due to a request + // for deletion. We signal our recognition that this + // uuid shouldn't be used for resource waiting anymore by + // erasing it from the resource waiter list. That allows + // deleteOK to do final deletion on the worker. + removeHttpWaiter(* iter); + } + } + tids.clear(); + + // Sort into priority order, if necessary and only as much as needed + if (tids2.size() > mHttpSemaphore) + { + LLTextureFetchWorker::Compare compare; + std::partial_sort(tids2.begin(), tids2.begin() + mHttpSemaphore, tids2.end(), compare); + } + + // Release workers up to the high water mark. Since we aren't + // holding any locks at this point, we can be in competition + // with other callers. Do defensive things like getting + // refreshed counts of requests and checking if someone else + // has moved any worker state around.... + for (worker_list_t::iterator iter2(tids2.begin()); tids2.end() != iter2; ++iter2) + { + LLTextureFetchWorker * worker(* iter2); + + worker->lockWorkMutex(); // +Mw + if (LLTextureFetchWorker::WAIT_HTTP_RESOURCE2 != worker->mState) + { + // Not in expected state, remove it, try the next one + worker->unlockWorkMutex(); // -Mw + LL_WARNS("Texture") << "Resource-waited texture " << worker->mID + << " in unexpected state: " << worker->mState + << ". Removing from wait list." + << LL_ENDL; + removeHttpWaiter(worker->mID); + continue; + } + + if (! worker->acquireHttpSemaphore()) + { + // Out of active slots, quit + worker->unlockWorkMutex(); // -Mw + break; + } + + worker->mState = LLTextureFetchWorker::SEND_HTTP_REQ; + worker->setPriority(LLWorkerThread::PRIORITY_HIGH | worker->mWorkPriority); + worker->unlockWorkMutex(); // -Mw + + removeHttpWaiter(worker->mID); + } +} + +// Threads: T* +void LLTextureFetch::cancelHttpWaiters() +{ + mNetworkQueueMutex.lock(); // +Mfnq + mHttpWaitResource.clear(); + mNetworkQueueMutex.unlock(); // -Mfnq +} + +// Threads: T* +int LLTextureFetch::getHttpWaitersCount() +{ + mNetworkQueueMutex.lock(); // +Mfnq + int ret(mHttpWaitResource.size()); + mNetworkQueueMutex.unlock(); // -Mfnq + return ret; +} + + +// Threads: T* +void LLTextureFetch::updateStateStats(U32 cache_read, U32 cache_write, U32 res_wait) +{ + LLMutexLock lock(&mQueueMutex); // +Mfq + + mTotalCacheReadCount += cache_read; + mTotalCacheWriteCount += cache_write; + mTotalResourceWaitCount += res_wait; +} // -Mfq + + +// Threads: T* +void LLTextureFetch::getStateStats(U32 * cache_read, U32 * cache_write, U32 * res_wait) +{ + U32 ret1(0U), ret2(0U), ret3(0U); + + { + LLMutexLock lock(&mQueueMutex); // +Mfq + ret1 = mTotalCacheReadCount; + ret2 = mTotalCacheWriteCount; + ret3 = mTotalResourceWaitCount; + } // -Mfq + + *cache_read = ret1; + *cache_write = ret2; + *res_wait = ret3; } ////////////////////////////////////////////////////////////////////////////// // cross-thread command methods +// Threads: T* void LLTextureFetch::commandSetRegion(U64 region_handle) { TFReqSetRegion * req = new TFReqSetRegion(region_handle); @@ -2812,6 +3600,7 @@ void LLTextureFetch::commandSetRegion(U64 region_handle) cmdEnqueue(req); } +// Threads: T* void LLTextureFetch::commandSendMetrics(const std::string & caps_url, const LLUUID & session_id, const LLUUID & agent_id, @@ -2822,6 +3611,7 @@ void LLTextureFetch::commandSendMetrics(const std::string & caps_url, cmdEnqueue(req); } +// Threads: T* void LLTextureFetch::commandDataBreak() { // The pedantically correct way to implement this is to create a command @@ -2832,30 +3622,33 @@ void LLTextureFetch::commandDataBreak() LLTextureFetch::svMetricsDataBreak = true; } +// Threads: T* void LLTextureFetch::cmdEnqueue(TFRequest * req) { - lockQueue(); + lockQueue(); // +Mfq mCommands.push_back(req); - unlockQueue(); + unlockQueue(); // -Mfq unpause(); } +// Threads: T* LLTextureFetch::TFRequest * LLTextureFetch::cmdDequeue() { TFRequest * ret = 0; - lockQueue(); + lockQueue(); // +Mfq if (! mCommands.empty()) { ret = mCommands.front(); mCommands.erase(mCommands.begin()); } - unlockQueue(); + unlockQueue(); // -Mfq return ret; } +// Threads: Ttf void LLTextureFetch::cmdDoWork() { if (mDebugPause) @@ -2879,6 +3672,38 @@ void LLTextureFetch::cmdDoWork() namespace { + +// Example of a simple notification handler for metrics +// delivery notification. Earlier versions of the code used +// a Responder that tried harder to detect delivery breaks +// but it really isn't that important. If someone wants to +// revisit that effort, here is a place to start. +class AssetReportHandler : public LLCore::HttpHandler +{ +public: + + // Threads: Ttf + virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response) + { + LLCore::HttpStatus status(response->getStatus()); + + if (status) + { + LL_DEBUGS("Texture") << "Successfully delivered asset metrics to grid." + << LL_ENDL; + } + else + { + LL_WARNS("Texture") << "Error delivering asset metrics to grid. Status: " + << status.toHex() + << ", Reason: " << status.toString() << LL_ENDL; + } + } +}; // end class AssetReportHandler + +AssetReportHandler stats_handler; + + /** * Implements the 'Set Region' command. * @@ -2909,73 +3734,8 @@ TFReqSendMetrics::~TFReqSendMetrics() bool TFReqSendMetrics::doWork(LLTextureFetch * fetcher) { - /* - * HTTP POST responder. Doesn't do much but tries to - * detect simple breaks in recording the metrics stream. - * - * The 'volatile' modifiers don't indicate signals, - * mmap'd memory or threads, really. They indicate that - * the referenced data is part of a pseudo-closure for - * this responder rather than being required for correct - * operation. - * - * We don't try very hard with the POST request. We give - * it one shot and that's more-or-less it. With a proper - * refactoring of the LLQueuedThread usage, these POSTs - * could be put in a request object and made more reliable. - */ - class lcl_responder : public LLCurl::Responder - { - public: - lcl_responder(LLTextureFetch * fetcher, - S32 expected_sequence, - volatile const S32 & live_sequence, - volatile bool & reporting_break, - volatile bool & reporting_started) - : LLCurl::Responder(), - mFetcher(fetcher), - mExpectedSequence(expected_sequence), - mLiveSequence(live_sequence), - mReportingBreak(reporting_break), - mReportingStarted(reporting_started) - { - mFetcher->incrCurlPOSTCount(); - } - - ~lcl_responder() - { - mFetcher->decrCurlPOSTCount(); - } - - // virtual - void error(U32 status_num, const std::string & reason) - { - if (mLiveSequence == mExpectedSequence) - { - mReportingBreak = true; - } - LL_WARNS("Texture") << "Break in metrics stream due to POST failure to metrics collection service. Reason: " - << reason << LL_ENDL; - } - - // virtual - void result(const LLSD & content) - { - if (mLiveSequence == mExpectedSequence) - { - mReportingBreak = false; - mReportingStarted = true; - } - } - - private: - LLTextureFetch * mFetcher; - S32 mExpectedSequence; - volatile const S32 & mLiveSequence; - volatile bool & mReportingBreak; - volatile bool & mReportingStarted; - - }; // class lcl_responder + static const U32 report_priority(1); + static LLCore::HttpHandler * const handler(fetcher->isQAMode() || true ? &stats_handler : NULL); if (! gViewerAssetStatsThread1) return true; @@ -3003,21 +3763,26 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher) // Update sequence number if (S32_MAX == ++report_sequence) report_sequence = 0; - + reporting_started = true; + // Limit the size of the stats report if necessary. merged_llsd["truncated"] = truncate_viewer_metrics(10, merged_llsd); if (! mCapsURL.empty()) { - LLCurlRequest::headers_t headers; - fetcher->getCurlRequest().post(mCapsURL, - headers, - merged_llsd, - new lcl_responder(fetcher, - report_sequence, - report_sequence, - LLTextureFetch::svMetricsDataBreak, - reporting_started)); + LLCore::BufferArray * ba = new LLCore::BufferArray; + LLCore::BufferArrayStream bas(ba); + LLSDSerialize::toXML(merged_llsd, bas); + + fetcher->getHttpRequest().requestPost(fetcher->getPolicyClass(), + report_priority, + mCapsURL, + ba, + NULL, + fetcher->getMetricsHeaders(), + handler); + ba->release(); + LLTextureFetch::svMetricsDataBreak = false; } else { @@ -3075,6 +3840,7 @@ truncate_viewer_metrics(int max_regions, LLSD & metrics) } // end of anonymous namespace + /////////////////////////////////////////////////////////////////////////////////////////// //Start LLTextureFetchDebugger /////////////////////////////////////////////////////////////////////////////////////////// @@ -3128,47 +3894,17 @@ private: S32 mID; }; -class LLDebuggerHTTPResponder : public LLCurl::Responder -{ -public: - LLDebuggerHTTPResponder(LLTextureFetchDebugger* debugger, S32 index) - : mDebugger(debugger), mIndex(index) - { - } - virtual void completedRaw(U32 status, const std::string& reason, - const LLChannelDescriptors& channels, - const LLIOPipe::buffer_ptr_t& buffer) - { - bool success = false; - bool partial = false; - if (HTTP_OK <= status && status < HTTP_MULTIPLE_CHOICES) - { - success = true; - if (HTTP_PARTIAL_CONTENT == status) // partial information - { - partial = true; - } - } - if (!success) - { - llinfos << "Fetch Debugger : CURL GET FAILED, index = " << mIndex << ", status:" << status << " reason:" << reason << llendl; - } - mDebugger->callbackHTTP(mIndex, channels, buffer, partial, success); - } - virtual bool followRedir() - { - return true; - } -private: - LLTextureFetchDebugger* mDebugger; - S32 mIndex; -}; LLTextureFetchDebugger::LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextureCache* cache, LLImageDecodeThread* imagedecodethread) : + LLCore::HttpHandler(), mFetcher(fetcher), mTextureCache(cache), mImageDecodeThread(imagedecodethread), - mCurlGetRequest(NULL) + mHttpHeaders(NULL), + mHttpPolicyClass(fetcher->getPolicyClass()), + mNbCurlCompleted(0), + mTempIndex(0), + mHistoryListIndex(0) { init(); } @@ -3176,7 +3912,13 @@ LLTextureFetchDebugger::LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextur LLTextureFetchDebugger::~LLTextureFetchDebugger() { mFetchingHistory.clear(); - stopDebug(); + mStopDebug = TRUE; + tryToStopDebug(); + if (mHttpHeaders) + { + mHttpHeaders->release(); + mHttpHeaders = NULL; + } } void LLTextureFetchDebugger::init() @@ -3188,9 +3930,12 @@ void LLTextureFetchDebugger::init() mDecodingTime = -1.f; mHTTPTime = -1.f; mGLCreationTime = -1.f; + mTotalFetchingTime = 0.f; mRefetchVisCacheTime = -1.f; mRefetchVisHTTPTime = -1.f; + mRefetchAllCacheTime = -1.f; + mRefetchAllHTTPTime = -1.f; mNumFetchedTextures = 0; mNumCacheHits = 0; @@ -3204,10 +3949,65 @@ void LLTextureFetchDebugger::init() mRenderedDecodedData = 0; mFetchedPixels = 0; mRenderedPixels = 0; - mRefetchedData = 0; - mRefetchedPixels = 0; + mRefetchedVisData = 0; + mRefetchedVisPixels = 0; + mRefetchedAllData = 0; + mRefetchedAllPixels = 0; mFreezeHistory = FALSE; + mStopDebug = FALSE; + mClearHistory = FALSE; + mRefetchNonVis = FALSE; + + mNbCurlRequests = 0; + + if (! mHttpHeaders) + { + mHttpHeaders = new LLCore::HttpHeaders; + mHttpHeaders->mHeaders.push_back("Accept: image/x-j2c"); + } +} + +void LLTextureFetchDebugger::startWork(e_debug_state state) +{ + switch(state) + { + case IDLE: + break; + case START_DEBUG: + startDebug(); + break; + case READ_CACHE: + debugCacheRead(); + break; + case WRITE_CACHE: + debugCacheWrite(); + break; + case DECODING: + debugDecoder(); + break; + case HTTP_FETCHING: + debugHTTP(); + break; + case GL_TEX: + debugGLTextureCreation(); + break; + case REFETCH_VIS_CACHE: + debugRefetchVisibleFromCache(); + break; + case REFETCH_VIS_HTTP: + debugRefetchVisibleFromHTTP(); + break; + case REFETCH_ALL_CACHE: + debugRefetchAllFromCache(); + break; + case REFETCH_ALL_HTTP: + debugRefetchAllFromHTTP(); + break; + default: + break; + } + return; } void LLTextureFetchDebugger::startDebug() @@ -3215,25 +4015,39 @@ void LLTextureFetchDebugger::startDebug() //lock the fetcher mFetcher->lockFetcher(true); mFreezeHistory = TRUE; + mFetcher->resetLoadSource(); //clear the current fetching queue gTextureList.clearFetchingRequests(); + mState = START_DEBUG; +} + +bool LLTextureFetchDebugger::processStartDebug(F32 max_time) +{ + mTimer.reset(); + //wait for all works to be done while(1) { S32 pending = 0; pending += LLAppViewer::getTextureCache()->update(1); pending += LLAppViewer::getImageDecodeThread()->update(1); - pending += LLAppViewer::getTextureFetch()->update(1); + // pending += LLAppViewer::getTextureFetch()->update(1); // This causes infinite recursion in some cases + pending += mNbCurlRequests; if(!pending) { break; } + + if(mTimer.getElapsedTimeF32() > max_time) + { + return false; + } } //collect statistics - mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime; + mTotalFetchingTime = gTextureTimer.getElapsedTimeF32() - mTotalFetchingTime; std::set<LLUUID> fetched_textures; S32 size = mFetchingHistory.size(); @@ -3268,10 +4082,17 @@ void LLTextureFetchDebugger::startDebug() } mNumFetchedTextures = fetched_textures.size(); + + return true; } -void LLTextureFetchDebugger::stopDebug() +void LLTextureFetchDebugger::tryToStopDebug() { + if(!mStopDebug) + { + return; + } + //clear the current debug work S32 size = mFetchingHistory.size(); switch(mState) @@ -3283,7 +4104,7 @@ void LLTextureFetchDebugger::stopDebug() { mTextureCache->readComplete(mFetchingHistory[i].mCacheHandle, true); } - } + } break; case WRITE_CACHE: for(S32 i = 0 ; i < size; i++) @@ -3300,37 +4121,72 @@ void LLTextureFetchDebugger::stopDebug() break; case GL_TEX: break; + case REFETCH_VIS_CACHE: + break; + case REFETCH_VIS_HTTP: + break; + case REFETCH_ALL_CACHE: + mRefetchList.clear(); + break; + case REFETCH_ALL_HTTP: + mRefetchList.clear(); + break; default: break; } - while(1) + if(update(0.005f)) { - if(update()) + //unlock the fetcher + mFetcher->lockFetcher(false); + mFetcher->resetLoadSource(); + mFreezeHistory = FALSE; + mStopDebug = FALSE; + + if(mClearHistory) { - break; + mFetchingHistory.clear(); + mHandleToFetchIndex.clear(); + init(); + mTotalFetchingTime = gTextureTimer.getElapsedTimeF32(); //reset } } - - //unlock the fetcher - mFetcher->lockFetcher(false); - mFreezeHistory = FALSE; - mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32(); //reset } //called in the main thread and when the fetching queue is empty void LLTextureFetchDebugger::clearHistory() { - mFetchingHistory.clear(); - init(); + mClearHistory = TRUE; } void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker) { + if(worker->mRawImage.isNull() || worker->mFormattedImage.isNull()) + { + return; + } + if(mFreezeHistory) { - mRefetchedPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight(); - mRefetchedData += worker->mFormattedImage->getDataSize(); + if(mState == REFETCH_VIS_CACHE || mState == REFETCH_VIS_HTTP) + { + mRefetchedVisPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight(); + mRefetchedVisData += worker->mFormattedImage->getDataSize(); + } + else + { + mRefetchedAllPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight(); + mRefetchedAllData += worker->mFormattedImage->getDataSize(); + + LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(worker->mID); + if(tex && mRefetchList[tex].begin() != mRefetchList[tex].end()) + { + if(worker->mDecodedDiscard == mFetchingHistory[mRefetchList[tex][0]].mDecodedLevel) + { + mRefetchList[tex].erase(mRefetchList[tex].begin()); + } + } + } return; } @@ -3342,9 +4198,8 @@ void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker) mDecodedData += worker->mRawImage->getDataSize(); mFetchedPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight(); - mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize())); - //mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mHaveAllData ? 0 : worker->mLoadedDiscard, worker->mFormattedImage->getComponents(), - //worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize())); + mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mDecodedDiscard, + worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize())); } void LLTextureFetchDebugger::lockCache() @@ -3361,6 +4216,7 @@ void LLTextureFetchDebugger::debugCacheRead() llassert_always(mState == IDLE); mTimer.reset(); mState = READ_CACHE; + mCacheReadTime = -1.f; S32 size = mFetchingHistory.size(); for(S32 i = 0 ; i < size ; i++) @@ -3396,6 +4252,7 @@ void LLTextureFetchDebugger::debugCacheWrite() llassert_always(mState == IDLE); mTimer.reset(); mState = WRITE_CACHE; + mCacheWriteTime = -1.f; S32 size = mFetchingHistory.size(); for(S32 i = 0 ; i < size ; i++) @@ -3405,7 +4262,7 @@ void LLTextureFetchDebugger::debugCacheWrite() mFetchingHistory[i].mCacheHandle = mTextureCache->writeToCache(mFetchingHistory[i].mID, LLWorkerThread::PRIORITY_NORMAL, mFetchingHistory[i].mFormattedImage->getData(), mFetchingHistory[i].mFetchedSize, mFetchingHistory[i].mDecodedLevel == 0 ? mFetchingHistory[i].mFetchedSize : mFetchingHistory[i].mFetchedSize + 1, - new LLDebuggerCacheWriteResponder(this, i)); + NULL, 0, new LLDebuggerCacheWriteResponder(this, i)); } } } @@ -3424,6 +4281,7 @@ void LLTextureFetchDebugger::debugDecoder() llassert_always(mState == IDLE); mTimer.reset(); mState = DECODING; + mDecodingTime = -1.f; S32 size = mFetchingHistory.size(); for(S32 i = 0 ; i < size ; i++) @@ -3459,13 +4317,14 @@ void LLTextureFetchDebugger::debugHTTP() mTimer.reset(); mState = HTTP_FETCHING; + mHTTPTime = -1.f; S32 size = mFetchingHistory.size(); for (S32 i = 0 ; i < size ; i++) { mFetchingHistory[i].mCurlState = FetchEntry::CURL_NOT_DONE; mFetchingHistory[i].mCurlReceivedSize = 0; - mFetchingHistory[i].mHTTPFailCount = 0; + mFetchingHistory[i].mFormattedImage = NULL; } mNbCurlRequests = 0; mNbCurlCompleted = 0; @@ -3475,34 +4334,60 @@ void LLTextureFetchDebugger::debugHTTP() S32 LLTextureFetchDebugger::fillCurlQueue() { - if (mNbCurlRequests == 24) + if(mStopDebug) //stop + { + mNbCurlCompleted = mFetchingHistory.size(); + return 0; + } + if (mNbCurlRequests > HTTP_REQUESTS_IN_QUEUE_LOW_WATER) + { return mNbCurlRequests; + } S32 size = mFetchingHistory.size(); for (S32 i = 0 ; i < size ; i++) { if (mFetchingHistory[i].mCurlState != FetchEntry::CURL_NOT_DONE) + { continue; + } std::string texture_url = mHTTPUrl + "/?texture_id=" + mFetchingHistory[i].mID.asString().c_str(); S32 requestedSize = mFetchingHistory[i].mRequestedSize; // We request the whole file if the size was not set. requestedSize = llmax(0,requestedSize); // We request the whole file if the size was set to an absurdly high value (meaning all file) requestedSize = (requestedSize == 33554432 ? 0 : requestedSize); - std::vector<std::string> headers; - headers.push_back("Accept: image/x-j2c"); - bool res = mCurlGetRequest->getByteRange(texture_url, headers, 0, requestedSize, new LLDebuggerHTTPResponder(this, i)); - if (res) + + LLCore::HttpHandle handle = mFetcher->getHttpRequest().requestGetByteRange(mHttpPolicyClass, + LLWorkerThread::PRIORITY_LOWBITS, + texture_url, + 0, + requestedSize, + NULL, + mHttpHeaders, + this); + if (LLCORE_HTTP_HANDLE_INVALID != handle) { + mHandleToFetchIndex[handle] = i; + mFetchingHistory[i].mHttpHandle = handle; mFetchingHistory[i].mCurlState = FetchEntry::CURL_IN_PROGRESS; mNbCurlRequests++; - // Hack - if (mNbCurlRequests == 24) + if (mNbCurlRequests >= HTTP_REQUESTS_IN_QUEUE_HIGH_WATER) // emulate normal pipeline + { break; + } } else { - break; + // Failed to queue request, log it and mark it done. + LLCore::HttpStatus status(mFetcher->getHttpRequest().getStatus()); + + LL_WARNS("Texture") << "Couldn't issue HTTP request in debugger for texture " + << mFetchingHistory[i].mID + << ", status: " << status.toHex() + << " reason: " << status.toString() + << LL_ENDL; + mFetchingHistory[i].mCurlState = FetchEntry::CURL_DONE; } } //llinfos << "Fetch Debugger : Having " << mNbCurlRequests << " requests through the curl thread." << llendl; @@ -3513,7 +4398,7 @@ void LLTextureFetchDebugger::debugGLTextureCreation() { llassert_always(mState == IDLE); mState = GL_TEX; - std::vector<LLViewerFetchedTexture*> tex_list; + mTempTexList.clear(); S32 size = mFetchingHistory.size(); for(S32 i = 0 ; i < size ; i++) @@ -3524,28 +4409,54 @@ void LLTextureFetchDebugger::debugGLTextureCreation() if(tex && !tex->isForSculptOnly()) { tex->destroyGLTexture() ; - tex_list.push_back(tex); + mTempTexList.push_back(tex); } } } + + mGLCreationTime = -1.f; + mTempIndex = 0; + mHistoryListIndex = 0; + + return; +} +bool LLTextureFetchDebugger::processGLCreation(F32 max_time) +{ mTimer.reset(); - S32 j = 0 ; - S32 size1 = tex_list.size(); - for(S32 i = 0 ; i < size && j < size1; i++) + + bool done = true; + S32 size = mFetchingHistory.size(); + S32 size1 = mTempTexList.size(); + for(; mHistoryListIndex < size && mTempIndex < size1; mHistoryListIndex++) { - if(mFetchingHistory[i].mRawImage.notNull()) + if(mFetchingHistory[mHistoryListIndex].mRawImage.notNull()) { - if(mFetchingHistory[i].mID == tex_list[j]->getID()) + if(mFetchingHistory[mHistoryListIndex].mID == mTempTexList[mTempIndex]->getID()) { - tex_list[j]->createGLTexture(mFetchingHistory[i].mDecodedLevel, mFetchingHistory[i].mRawImage, 0, TRUE, tex_list[j]->getBoostLevel()); - j++; + mTempTexList[mTempIndex]->createGLTexture(mFetchingHistory[mHistoryListIndex].mDecodedLevel, + mFetchingHistory[mHistoryListIndex].mRawImage, 0, TRUE, mTempTexList[mTempIndex]->getBoostLevel()); + mTempIndex++; } } + + if(mTimer.getElapsedTimeF32() > max_time) + { + done = false; + break; + } } - mGLCreationTime = mTimer.getElapsedTimeF32() ; - return; + if(mGLCreationTime < 0.f) + { + mGLCreationTime = mTimer.getElapsedTimeF32() ; + } + else + { + mGLCreationTime += mTimer.getElapsedTimeF32() ; + } + + return done; } //clear fetching results of all textures. @@ -3562,15 +4473,62 @@ void LLTextureFetchDebugger::clearTextures() } } +void LLTextureFetchDebugger::makeRefetchList() +{ + mRefetchList.clear(); + S32 size = mFetchingHistory.size(); + for(S32 i = 0 ; i < size; i++) + { + LLViewerFetchedTexture* tex = LLViewerTextureManager::getFetchedTexture(mFetchingHistory[i].mID); + if(tex && tex->isJustBound()) //visible + { + continue; //the texture fetch pipeline will take care of visible textures. + } + + mRefetchList[tex].push_back(i); + } +} + +void LLTextureFetchDebugger::scanRefetchList() +{ + if(mStopDebug) + { + return; + } + if(!mRefetchNonVis) + { + return; + } + + for(std::map< LLPointer<LLViewerFetchedTexture>, std::vector<S32> >::iterator iter = mRefetchList.begin(); + iter != mRefetchList.end(); ) + { + if(iter->second.empty()) + { + gTextureList.setDebugFetching(iter->first, -1); + mRefetchList.erase(iter++); // This is the correct method to "erase and move on" in an std::map + } + else + { + gTextureList.setDebugFetching(iter->first, mFetchingHistory[iter->second[0]].mDecodedLevel); + ++iter; + } + } +} + void LLTextureFetchDebugger::debugRefetchVisibleFromCache() { llassert_always(mState == IDLE); mState = REFETCH_VIS_CACHE; clearTextures(); - + mFetcher->setLoadSource(LLTextureFetch::FROM_ALL); + mTimer.reset(); mFetcher->lockFetcher(false); + mRefetchVisCacheTime = -1.f; + mRefetchedVisData = 0; + mRefetchedVisPixels = 0; } void LLTextureFetchDebugger::debugRefetchVisibleFromHTTP() @@ -3578,17 +4536,60 @@ void LLTextureFetchDebugger::debugRefetchVisibleFromHTTP() llassert_always(mState == IDLE); mState = REFETCH_VIS_HTTP; - clearCache(); clearTextures(); + mFetcher->setLoadSource(LLTextureFetch::FROM_HTTP_ONLY); + + mTimer.reset(); + mFetcher->lockFetcher(false); + mRefetchVisHTTPTime = -1.f; + mRefetchedVisData = 0; + mRefetchedVisPixels = 0; +} + +void LLTextureFetchDebugger::debugRefetchAllFromCache() +{ + llassert_always(mState == IDLE); + mState = REFETCH_ALL_CACHE; + + clearTextures(); + makeRefetchList(); + mFetcher->setLoadSource(LLTextureFetch::FROM_ALL); + + mTimer.reset(); + mFetcher->lockFetcher(false); + mRefetchAllCacheTime = -1.f; + mRefetchedAllData = 0; + mRefetchedAllPixels = 0; + mRefetchNonVis = FALSE; +} + +void LLTextureFetchDebugger::debugRefetchAllFromHTTP() +{ + llassert_always(mState == IDLE); + mState = REFETCH_ALL_HTTP; + + clearTextures(); + makeRefetchList(); + mFetcher->setLoadSource(LLTextureFetch::FROM_HTTP_ONLY); mTimer.reset(); mFetcher->lockFetcher(false); + mRefetchAllHTTPTime = -1.f; + mRefetchedAllData = 0; + mRefetchedAllPixels = 0; + mRefetchNonVis = TRUE; } -bool LLTextureFetchDebugger::update() +bool LLTextureFetchDebugger::update(F32 max_time) { switch(mState) { + case START_DEBUG: + if(processStartDebug(max_time)) + { + mState = IDLE; + } + break; case READ_CACHE: if(!mTextureCache->update(1)) { @@ -3614,8 +4615,8 @@ bool LLTextureFetchDebugger::update() } break; case HTTP_FETCHING: - mCurlGetRequest->process(); - LLCurl::getCurlThread()->update(1); + // Do some notifications... + mFetcher->getHttpRequest().update(10); if (!fillCurlQueue() && mNbCurlCompleted == mFetchingHistory.size()) { mHTTPTime = mTimer.getElapsedTimeF32() ; @@ -3623,22 +4624,59 @@ bool LLTextureFetchDebugger::update() } break; case GL_TEX: - mState = IDLE; + if(processGLCreation(max_time)) + { + mState = IDLE; + mTempTexList.clear(); + } break; case REFETCH_VIS_CACHE: if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) { - mRefetchVisCacheTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime; + mRefetchVisCacheTime = mTimer.getElapsedTimeF32() ; mState = IDLE; mFetcher->lockFetcher(true); + mFetcher->resetLoadSource(); } break; case REFETCH_VIS_HTTP: if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) { - mRefetchVisHTTPTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime; + mRefetchVisHTTPTime = mTimer.getElapsedTimeF32() ; + mState = IDLE; + mFetcher->lockFetcher(true); + mFetcher->resetLoadSource(); + } + break; + case REFETCH_ALL_CACHE: + scanRefetchList(); + if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) + { + if(!mRefetchNonVis) + { + mRefetchNonVis = TRUE; //start to fetch non-vis + scanRefetchList(); + break; + } + + mRefetchAllCacheTime = mTimer.getElapsedTimeF32() ; + mState = IDLE; + mFetcher->lockFetcher(true); + mFetcher->resetLoadSource(); + mRefetchList.clear(); + mRefetchNonVis = FALSE; + } + break; + case REFETCH_ALL_HTTP: + scanRefetchList(); + if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) + { + mRefetchAllHTTPTime = mTimer.getElapsedTimeF32() ; mState = IDLE; mFetcher->lockFetcher(true); + mFetcher->resetLoadSource(); + mRefetchList.clear(); + mRefetchNonVis = FALSE; } break; default: @@ -3649,6 +4687,28 @@ bool LLTextureFetchDebugger::update() return mState == IDLE; } +void LLTextureFetchDebugger::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response) +{ + handle_fetch_map_t::iterator iter(mHandleToFetchIndex.find(handle)); + if (mHandleToFetchIndex.end() == iter) + { + llinfos << "Fetch Debugger : Couldn't find handle " << handle << " in fetch list." << llendl; + return; + } + + S32 fetch_ind(iter->second); + mHandleToFetchIndex.erase(iter); + if (fetch_ind >= mFetchingHistory.size() || mFetchingHistory[fetch_ind].mHttpHandle != handle) + { + llinfos << "Fetch Debugger : Handle and fetch object in disagreement. Punting." << llendl; + } + else + { + callbackHTTP(mFetchingHistory[fetch_ind], response); + mFetchingHistory[fetch_ind].mHttpHandle = LLCORE_HTTP_HANDLE_INVALID; // Not valid after notification + } +} + void LLTextureFetchDebugger::callbackCacheRead(S32 id, bool success, LLImageFormatted* image, S32 imagesize, BOOL islocal) { @@ -3675,52 +4735,50 @@ void LLTextureFetchDebugger::callbackDecoded(S32 id, bool success, LLImageRaw* r } } -void LLTextureFetchDebugger::callbackHTTP(S32 id, const LLChannelDescriptors& channels, - const LLIOPipe::buffer_ptr_t& buffer, - bool partial, bool success) +void LLTextureFetchDebugger::callbackHTTP(FetchEntry & fetch, LLCore::HttpResponse * response) { + static const LLCore::HttpStatus par_status(HTTP_PARTIAL_CONTENT); + + LLCore::HttpStatus status(response->getStatus()); mNbCurlRequests--; - if (success) + mNbCurlCompleted++; + fetch.mCurlState = FetchEntry::CURL_DONE; + if (status) { - mFetchingHistory[id].mCurlState = FetchEntry::CURL_DONE; - mNbCurlCompleted++; - - S32 data_size = buffer->countAfter(channels.in(), NULL); - mFetchingHistory[id].mCurlReceivedSize += data_size; - //llinfos << "Fetch Debugger : got results for " << id << ", data_size = " << data_size << ", received = " << mFetchingHistory[id].mCurlReceivedSize << ", requested = " << mFetchingHistory[id].mRequestedSize << ", partial = " << partial << llendl; - if ((mFetchingHistory[id].mCurlReceivedSize >= mFetchingHistory[id].mRequestedSize) || !partial || (mFetchingHistory[id].mRequestedSize == 600)) + const bool partial(par_status == status); + LLCore::BufferArray * ba(response->getBody()); // *Not* holding reference to body + + S32 data_size = ba ? ba->size() : 0; + fetch.mCurlReceivedSize += data_size; + //llinfos << "Fetch Debugger : got results for " << fetch.mID << ", data_size = " << data_size << ", received = " << fetch.mCurlReceivedSize << ", requested = " << fetch.mRequestedSize << ", partial = " << partial << llendl; + if ((fetch.mCurlReceivedSize >= fetch.mRequestedSize) || !partial || (fetch.mRequestedSize == 600)) { U8* d_buffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), data_size); - buffer->readAfter(channels.in(), NULL, d_buffer, data_size); + if (ba) + { + ba->read(0, d_buffer, data_size); + } - llassert_always(mFetchingHistory[id].mFormattedImage.isNull()); + llassert_always(fetch.mFormattedImage.isNull()); { // For now, create formatted image based on extension - std::string texture_url = mHTTPUrl + "/?texture_id=" + mFetchingHistory[id].mID.asString().c_str(); + std::string texture_url = mHTTPUrl + "/?texture_id=" + fetch.mID.asString().c_str(); std::string extension = gDirUtilp->getExtension(texture_url); - mFetchingHistory[id].mFormattedImage = LLImageFormatted::createFromType(LLImageBase::getCodecFromExtension(extension)); - if (mFetchingHistory[id].mFormattedImage.isNull()) + fetch.mFormattedImage = LLImageFormatted::createFromType(LLImageBase::getCodecFromExtension(extension)); + if (fetch.mFormattedImage.isNull()) { - mFetchingHistory[id].mFormattedImage = new LLImageJ2C; // default + fetch.mFormattedImage = new LLImageJ2C; // default } } - mFetchingHistory[id].mFormattedImage->setData(d_buffer, data_size); + fetch.mFormattedImage->setData(d_buffer, data_size); } } else //failed { - mFetchingHistory[id].mHTTPFailCount++; - if(mFetchingHistory[id].mHTTPFailCount < 5) - { - // Fetch will have to be redone - mFetchingHistory[id].mCurlState = FetchEntry::CURL_NOT_DONE; - } - else //skip - { - mFetchingHistory[id].mCurlState = FetchEntry::CURL_DONE; - mNbCurlCompleted++; - } + llinfos << "Fetch Debugger : CURL GET FAILED, ID = " << fetch.mID + << ", status: " << status.toHex() + << " reason: " << status.toString() << llendl; } } diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 107e1623b0..5ea3c14e1a 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2000&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2012, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,19 +27,26 @@ #ifndef LL_LLTEXTUREFETCH_H #define LL_LLTEXTUREFETCH_H +#include <vector> +#include <map> + #include "lldir.h" #include "llimage.h" #include "lluuid.h" #include "llworkerthread.h" -#include "llcurl.h" #include "lltextureinfo.h" #include "llapr.h" #include "llimageworker.h" -//#include "lltexturecache.h" +#include "llstat.h" +#include "llcurl.h" +#include "llstat.h" +#include "httprequest.h" +#include "httpoptions.h" +#include "httpheaders.h" +#include "httphandler.h" class LLViewerTexture; class LLTextureFetchWorker; -class HTTPGetResponder; class LLImageDecodeThread; class LLHost; class LLViewerAssetStats; @@ -47,10 +54,10 @@ class LLTextureFetchDebugger; class LLTextureCache; // Interface class + class LLTextureFetch : public LLWorkerThread { friend class LLTextureFetchWorker; - friend class HTTPGetResponder; public: LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded, bool qa_mode); @@ -58,72 +65,201 @@ public: class TFRequest; - /*virtual*/ S32 update(F32 max_time_ms); - void shutDownTextureCacheThread() ; //called in the main thread after the TextureCacheThread shuts down. - void shutDownImageDecodeThread() ; //called in the main thread after the ImageDecodeThread shuts down. + // Threads: Tmain + /*virtual*/ S32 update(F32 max_time_ms); + + // called in the main thread after the TextureCacheThread shuts down. + // Threads: Tmain + void shutDownTextureCacheThread(); + //called in the main thread after the ImageDecodeThread shuts down. + // Threads: Tmain + void shutDownImageDecodeThread(); + + // Threads: T* (but Tmain mostly) 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, bool can_use_http); + + // Requests that a fetch operation be deleted from the queue. + // If @cancel is true, also stops any I/O operations pending. + // Actual delete will be scheduled and performed later. + // + // Note: This *looks* like an override/variant of the + // base class's deleteRequest() but is functionally quite + // different. + // + // Threads: T* void deleteRequest(const LLUUID& id, bool cancel); + + void deleteAllRequests(); + + // Threads: T* bool getRequestFinished(const LLUUID& id, S32& discard_level, LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux); + + // Threads: T* bool updateRequestPriority(const LLUUID& id, F32 priority); + // Threads: T* bool receiveImageHeader(const LLHost& host, const LLUUID& id, U8 codec, U16 packets, U32 totalbytes, U16 data_size, U8* data); + + // Threads: T* bool receiveImagePacket(const LLHost& host, const LLUUID& id, U16 packet_num, U16 data_size, U8* data); + // Threads: T* (but not safe) void setTextureBandwidth(F32 bandwidth) { mTextureBandwidth = bandwidth; } + + // Threads: T* (but not safe) F32 getTextureBandwidth() { return mTextureBandwidth; } - // Debug + // Threads: T* BOOL isFromLocalCache(const LLUUID& id); + + // @return Magic number giving the internal state of the + // request. We should make these codes public if we're + // going to return them as a status value. + // + // Threads: T* 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, bool& can_use_http); + + // Debug utility - generally not safe void dump(); - S32 getNumRequests() ; - S32 getNumHTTPRequests() ; - U32 getTotalNumHTTPRequests() ; + + // Threads: T* + S32 getNumRequests(); + + // Threads: T* + S32 getNumHTTPRequests(); + + // Threads: T* + U32 getTotalNumHTTPRequests(); - // Public for access by callbacks + // Threads: T* S32 getPending(); + + // Threads: T* void lockQueue() { mQueueMutex.lock(); } + + // Threads: T* void unlockQueue() { mQueueMutex.unlock(); } + + // Threads: T* LLTextureFetchWorker* getWorker(const LLUUID& id); + + // Threads: T* + // Locks: Mfq LLTextureFetchWorker* getWorkerAfterLock(const LLUUID& id); - LLTextureInfo* getTextureInfo() { return &mTextureInfo; } - // Commands available to other threads to control metrics gathering operations. + + // Threads: T* void commandSetRegion(U64 region_handle); + + // Threads: T* void commandSendMetrics(const std::string & caps_url, const LLUUID & session_id, const LLUUID & agent_id, LLViewerAssetStats * main_stats); + + // Threads: T* void commandDataBreak(); - LLCurlRequest & getCurlRequest() { return *mCurlGetRequest; } + // Threads: T* + LLCore::HttpRequest & getHttpRequest() { return *mHttpRequest; } + + // Threads: T* + LLCore::HttpRequest::policy_t getPolicyClass() const { return mHttpPolicyClass; } + + // Return a pointer to the shared metrics headers definition. + // Does not increment the reference count, caller is required + // to do that to hold a reference for any length of time. + // + // Threads: T* + LLCore::HttpHeaders * getMetricsHeaders() const { return mHttpMetricsHeaders; } bool isQAMode() const { return mQAMode; } - // Curl POST counter maintenance - inline void incrCurlPOSTCount() { mCurlPOSTRequestCount++; } - inline void decrCurlPOSTCount() { mCurlPOSTRequestCount--; } + // ---------------------------------- + // HTTP resource waiting methods + + // Threads: T* + void addHttpWaiter(const LLUUID & tid); + + // Threads: T* + void removeHttpWaiter(const LLUUID & tid); + + // Threads: T* + bool isHttpWaiter(const LLUUID & tid); + // If there are slots, release one or more LLTextureFetchWorker + // requests from resource wait state (WAIT_HTTP_RESOURCE) to + // active (SEND_HTTP_REQ). + // + // Because this will modify state of many workers, you may not + // hold any Mw lock while calling. This makes it a little + // inconvenient to use but that's the rule. + // + // Threads: T* + // Locks: -Mw (must not hold any worker when called) + void releaseHttpWaiters(); + + // Threads: T* + void cancelHttpWaiters(); + + // Threads: T* + int getHttpWaitersCount(); + // ---------------------------------- + // Stats management + + // Add given counts to the global totals for the states/requests + // Threads: T* + void updateStateStats(U32 cache_read, U32 cache_write, U32 res_wait); + + // Return the global counts + // Threads: T* + void getStateStats(U32 * cache_read, U32 * cache_write, U32 * res_wait); + + // ---------------------------------- + protected: + // Threads: T* (but Ttf in practice) void addToNetworkQueue(LLTextureFetchWorker* worker); + + // Threads: T* void removeFromNetworkQueue(LLTextureFetchWorker* worker, bool cancel); + + // Threads: T* void addToHTTPQueue(const LLUUID& id); - void removeFromHTTPQueue(const LLUUID& id, S32 received_size = 0); - void removeRequest(LLTextureFetchWorker* worker, bool cancel); + // XXX possible delete + // Threads: T* + void removeFromHTTPQueue(const LLUUID& id, S32 received_size); + + // Identical to @deleteRequest but with different arguments + // (caller already has the worker pointer). + // + // Threads: T* + void removeRequest(LLTextureFetchWorker* worker, bool cancel); + // Overrides from the LLThread tree + // Locks: Ct bool runCondition(); private: + // Threads: Tmain void sendRequestListToSimulators(); + + // Threads: Ttf /*virtual*/ void startThread(void); + + // Threads: Ttf /*virtual*/ void endThread(void); + + // Threads: Ttf /*virtual*/ void threadedUpdate(void); + + // Threads: Ttf void commonUpdate(); // Metrics command helpers @@ -134,6 +270,8 @@ private: * Takes ownership of the TFRequest object. * * Method locks the command queue. + * + * Threads: T* */ void cmdEnqueue(TFRequest *); @@ -144,6 +282,8 @@ private: * Caller acquires ownership of the object and must dispose of it. * * Method locks the command queue. + * + * Threads: T* */ TFRequest * cmdDequeue(); @@ -153,6 +293,8 @@ private: * additional commands. * * Method locks the command queue. + * + * Threads: Ttf */ void cmdDoWork(); @@ -172,43 +314,64 @@ private: LLTextureCache* mTextureCache; LLImageDecodeThread* mImageDecodeThread; - LLCurlRequest* mCurlGetRequest; // Map of all requests by UUID typedef std::map<LLUUID,LLTextureFetchWorker*> map_t; - map_t mRequestMap; + map_t mRequestMap; // Mfq // Set of requests that require network data typedef std::set<LLUUID> queue_t; - queue_t mNetworkQueue; - queue_t mHTTPTextureQueue; + queue_t mNetworkQueue; // Mfnq + queue_t mHTTPTextureQueue; // Mfnq typedef std::map<LLHost,std::set<LLUUID> > cancel_queue_t; - cancel_queue_t mCancelQueue; - F32 mTextureBandwidth; - F32 mMaxBandwidth; + cancel_queue_t mCancelQueue; // Mfnq + F32 mTextureBandwidth; // <none> + F32 mMaxBandwidth; // Mfnq LLTextureInfo mTextureInfo; - U32 mHTTPTextureBits; + // XXX possible delete + U32 mHTTPTextureBits; // Mfnq + // XXX possible delete //debug use - U32 mTotalHTTPRequests ; + U32 mTotalHTTPRequests; // Out-of-band cross-thread command queue. This command queue // is logically tied to LLQueuedThread's list of // QueuedRequest instances and so must be covered by the // same locks. typedef std::vector<TFRequest *> command_queue_t; - command_queue_t mCommands; + command_queue_t mCommands; // Mfq // If true, modifies some behaviors that help with QA tasks. const bool mQAMode; - // Count of POST requests outstanding. We maintain the count - // indirectly in the CURL request responder's ctor and dtor and - // use it when determining whether or not to sleep the thread. Can't - // use the LLCurl module's request counter as it isn't thread compatible. - // *NOTE: Don't mix Atomic and static, apr_initialize must be called first. - LLAtomic32<S32> mCurlPOSTRequestCount; + // Interfaces and objects into the core http library used + // to make our HTTP requests. These replace the various + // LLCurl interfaces used in the past. + LLCore::HttpRequest * mHttpRequest; // Ttf + LLCore::HttpOptions * mHttpOptions; // Ttf + LLCore::HttpHeaders * mHttpHeaders; // Ttf + LLCore::HttpHeaders * mHttpMetricsHeaders; // Ttf + LLCore::HttpRequest::policy_t mHttpPolicyClass; // T* + + // We use a resource semaphore to keep HTTP requests in + // WAIT_HTTP_RESOURCE2 if there aren't sufficient slots in the + // transport. This keeps them near where they can be cheaply + // reprioritized rather than dumping them all across a thread + // where it's more expensive to get at them. Requests in either + // SEND_HTTP_REQ or WAIT_HTTP_REQ charge against the semaphore + // and tracking state transitions is critical to liveness. + LLAtomicS32 mHttpSemaphore; // Ttf + Tmain + + typedef std::set<LLUUID> wait_http_res_queue_t; + wait_http_res_queue_t mHttpWaitResource; // Mfnq + + // Cumulative stats on the states/requests issued by + // textures running through here. + U32 mTotalCacheReadCount; // Mfq + U32 mTotalCacheWriteCount; // Mfq + U32 mTotalResourceWaitCount; // Mfq public: // A probabilistically-correct indicator that the current @@ -216,19 +379,35 @@ public: // reporting due to either startup or a problem POSTing data. static volatile bool svMetricsDataBreak; +public: + //debug use + enum e_tex_source + { + FROM_ALL = 0, + FROM_HTTP_ONLY, + INVALID_SOURCE + }; private: //debug use LLTextureFetchDebugger* mFetchDebugger; bool mFetcherLocked; + + e_tex_source mFetchSource; + e_tex_source mOriginFetchSource; public: //debug use LLTextureFetchDebugger* getFetchDebugger() { return mFetchDebugger;} void lockFetcher(bool lock) { mFetcherLocked = lock;} + + void setLoadSource(e_tex_source source) {mFetchSource = source;} + void resetLoadSource() {mFetchSource = mOriginFetchSource;} + bool canLoadFromCache() { return mFetchSource != FROM_HTTP_ONLY;} }; //debug use -class LLTextureFetchDebugger +class LLViewerFetchedTexture; +class LLTextureFetchDebugger : public LLCore::HttpHandler { friend class LLTextureFetch; public: @@ -239,6 +418,7 @@ public: enum e_debug_state { IDLE = 0, + START_DEBUG, READ_CACHE, WRITE_CACHE, DECODING, @@ -271,12 +451,13 @@ private: LLPointer<LLImageRaw> mRawImage; e_curl_state mCurlState; S32 mCurlReceivedSize; - S32 mHTTPFailCount; + LLCore::HttpHandle mHttpHandle; FetchEntry() : mDecodedLevel(-1), mFetchedSize(0), - mDecodedSize(0) + mDecodedSize(0), + mHttpHandle(LLCORE_HTTP_HANDLE_INVALID) {} FetchEntry(LLUUID& id, S32 r_size, /*S32 f_discard, S32 c,*/ S32 level, S32 f_size, S32 d_size) : mID(id), @@ -285,10 +466,14 @@ private: mFetchedSize(f_size), mDecodedSize(d_size), mNeedsAux(false), - mHTTPFailCount(0) + mHttpHandle(LLCORE_HTTP_HANDLE_INVALID) {} }; - std::vector<FetchEntry> mFetchingHistory; + typedef std::vector<FetchEntry> fetch_list_t; + fetch_list_t mFetchingHistory; + + typedef std::map<LLCore::HttpHandle, S32> handle_fetch_map_t; + handle_fetch_map_t mHandleToFetchIndex; e_debug_state mState; @@ -301,13 +486,16 @@ private: F32 mTotalFetchingTime; F32 mRefetchVisCacheTime; F32 mRefetchVisHTTPTime; + F32 mRefetchAllCacheTime; + F32 mRefetchAllHTTPTime; LLTimer mTimer; LLTextureFetch* mFetcher; LLTextureCache* mTextureCache; LLImageDecodeThread* mImageDecodeThread; - LLCurlRequest* mCurlGetRequest; + LLCore::HttpHeaders* mHttpHeaders; + LLCore::HttpRequest::policy_t mHttpPolicyClass; S32 mNumFetchedTextures; S32 mNumCacheHits; @@ -321,42 +509,44 @@ private: U32 mRenderedDecodedData; U32 mFetchedPixels; U32 mRenderedPixels; - U32 mRefetchedData; - U32 mRefetchedPixels; + U32 mRefetchedVisData; + U32 mRefetchedVisPixels; + U32 mRefetchedAllData; + U32 mRefetchedAllPixels; BOOL mFreezeHistory; + BOOL mStopDebug; + BOOL mClearHistory; + BOOL mRefetchNonVis; std::string mHTTPUrl; S32 mNbCurlRequests; S32 mNbCurlCompleted; + std::map< LLPointer<LLViewerFetchedTexture>, std::vector<S32> > mRefetchList; + std::vector< LLPointer<LLViewerFetchedTexture> > mTempTexList; + S32 mTempIndex; + S32 mHistoryListIndex; + public: - bool update(); //called in the main thread once per frame + bool update(F32 max_time); //called in the main thread once per frame //fetching history void clearHistory(); void addHistoryEntry(LLTextureFetchWorker* worker); - void setCurlGetRequest(LLCurlRequest* request) { mCurlGetRequest = request;} - - void startDebug(); - void stopDebug(); //stop everything - void debugCacheRead(); - void debugCacheWrite(); - void debugHTTP(); - void debugDecoder(); - void debugGLTextureCreation(); - void debugRefetchVisibleFromCache(); - void debugRefetchVisibleFromHTTP(); + // Inherited from LLCore::HttpHandler + // Threads: Ttf + virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response); + void startWork(e_debug_state state); + void setStopDebug() {mStopDebug = TRUE;} + void tryToStopDebug(); //stop everything void callbackCacheRead(S32 id, bool success, LLImageFormatted* image, S32 imagesize, BOOL islocal); void callbackCacheWrite(S32 id, bool success); void callbackDecoded(S32 id, bool success, LLImageRaw* raw, LLImageRaw* aux); - void callbackHTTP(S32 id, const LLChannelDescriptors& channels, - const LLIOPipe::buffer_ptr_t& buffer, - bool partial, bool success); - + void callbackHTTP(FetchEntry & fetch, LLCore::HttpResponse * response); e_debug_state getState() {return mState;} S32 getNumFetchedTextures() {return mNumFetchedTextures;} @@ -372,8 +562,10 @@ public: U32 getRenderedDecodedData() {return mRenderedDecodedData;} U32 getFetchedPixels() {return mFetchedPixels;} U32 getRenderedPixels() {return mRenderedPixels;} - U32 getRefetchedData() {return mRefetchedData;} - U32 getRefetchedPixels() {return mRefetchedPixels;} + U32 getRefetchedVisData() {return mRefetchedVisData;} + U32 getRefetchedVisPixels() {return mRefetchedVisPixels;} + U32 getRefetchedAllData() {return mRefetchedAllData;} + U32 getRefetchedAllPixels() {return mRefetchedAllPixels;} F32 getCacheReadTime() {return mCacheReadTime;} F32 getCacheWriteTime() {return mCacheWriteTime;} @@ -383,11 +575,15 @@ public: F32 getTotalFetchingTime() {return mTotalFetchingTime;} F32 getRefetchVisCacheTime() {return mRefetchVisCacheTime;} F32 getRefetchVisHTTPTime() {return mRefetchVisHTTPTime;} + F32 getRefetchAllCacheTime() {return mRefetchAllCacheTime;} + F32 getRefetchAllHTTPTime() {return mRefetchAllHTTPTime;} private: void init(); void clearTextures();//clear fetching results of all textures. void clearCache(); + void makeRefetchList(); + void scanRefetchList(); void lockFetcher(); void unlockFetcher(); @@ -400,6 +596,20 @@ private: S32 fillCurlQueue(); + void startDebug(); + void debugCacheRead(); + void debugCacheWrite(); + void debugHTTP(); + void debugDecoder(); + void debugGLTextureCreation(); + void debugRefetchVisibleFromCache(); + void debugRefetchVisibleFromHTTP(); + void debugRefetchAllFromCache(); + void debugRefetchAllFromHTTP(); + + bool processStartDebug(F32 max_time); + bool processGLCreation(F32 max_time); + private: static bool sDebuggerEnabled; public: diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 52d085dd2c..16c42dbd43 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2012, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -74,7 +74,7 @@ static std::string title_string4(" W x H (Dis) Mem"); static S32 title_x1 = 0; static S32 title_x2 = 460; static S32 title_x3 = title_x2 + 40; -static S32 title_x4 = title_x3 + 50; +static S32 title_x4 = title_x3 + 46; static S32 texture_bar_height = 8; //////////////////////////////////////////////////////////////////////////// @@ -232,6 +232,8 @@ void LLTextureBar::draw() { "DSK", LLColor4::blue }, // CACHE_POST { "NET", LLColor4::green }, // LOAD_FROM_NETWORK { "SIM", LLColor4::green }, // LOAD_FROM_SIMULATOR + { "HTW", LLColor4::green }, // WAIT_HTTP_RESOURCE + { "HTW", LLColor4::green }, // WAIT_HTTP_RESOURCE2 { "REQ", LLColor4::yellow },// SEND_HTTP_REQ { "HTP", LLColor4::green }, // WAIT_HTTP_REQ { "DEC", LLColor4::yellow },// DECODE_IMAGE @@ -239,7 +241,7 @@ void LLTextureBar::draw() { "WRT", LLColor4::purple },// WRITE_TO_CACHE { "WRT", LLColor4::orange },// WAIT_ON_WRITE { "END", LLColor4::red }, // DONE -#define LAST_STATE 12 +#define LAST_STATE 14 { "CRE", LLColor4::magenta }, // LAST_STATE+1 { "FUL", LLColor4::green }, // LAST_STATE+2 { "BAD", LLColor4::red }, // LAST_STATE+3 @@ -345,7 +347,7 @@ void LLTextureBar::draw() // draw the image size at the end { - std::string num_str = llformat("%3dx%3d (%d) %7d", mImagep->getWidth(), mImagep->getHeight(), + std::string num_str = llformat("%3dx%3d (%2d) %7d", mImagep->getWidth(), mImagep->getHeight(), mImagep->getDiscardLevel(), mImagep->hasGLTexture() ? mImagep->getTextureMemory() : 0); LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, title_x4, getRect().getHeight(), color, LLFontGL::LEFT, LLFontGL::TOP); @@ -514,14 +516,18 @@ void LLGLTexMemBar::draw() S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024); F32 total_object_downloaded = (F32)gTotalObjectBytes / (1024 * 1024); - U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests() ; + U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests(); //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; LLColor4 text_color(1.f, 1.f, 1.f, 0.75f); LLColor4 color; - - std::string text = ""; + // Gray background using completely magic numbers + gGL.color4f(0.f, 0.f, 0.f, 0.25f); + // const LLRect & rect(getRect()); + // gl_rect_2d(-4, v_offset, rect.mRight - rect.mLeft + 2, v_offset + line_height*4); + + std::string text = ""; LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*6, text_color, LLFontGL::LEFT, LLFontGL::TOP); @@ -531,14 +537,26 @@ void LLGLTexMemBar::draw() bound_mem, max_bound_mem, LLRenderTarget::sBytesAllocated/(1024*1024), - LLImageRaw::sGlobalRawMemory >> 20, discard_bias, - cache_usage, cache_max_usage); + LLImageRaw::sGlobalRawMemory >> 20, + discard_bias, + cache_usage, + cache_max_usage); + //, cache_entries, cache_max_entries + LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*4, text_color, LLFontGL::LEFT, LLFontGL::TOP); - text = llformat("Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d", - total_texture_downloaded, total_object_downloaded, total_http_requests); - //, cache_entries, cache_max_entries + U32 cache_read(0U), cache_write(0U), res_wait(0U); + LLAppViewer::getTextureFetch()->getStateStats(&cache_read, &cache_write, &res_wait); + + text = llformat("Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d Cread: %u Cwrite: %u Rwait: %u", + total_texture_downloaded, + total_object_downloaded, + total_http_requests, + cache_read, + cache_write, + res_wait); + LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*3, text_color, LLFontGL::LEFT, LLFontGL::TOP); diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 0eec7f0afd..9dfb29b905 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -118,7 +118,7 @@ LLToast::LLToast(const LLToast::Params& p) { mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs)); - buildFromFile("panel_toast.xml", NULL); + buildFromFile("panel_toast.xml"); setCanDrag(FALSE); diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index e1d99b1bcb..ea62f758f8 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -169,6 +169,7 @@ public: // get/set Toast's flags or states // get information whether the notification corresponding to the toast is valid or not bool isNotificationValid(); + // get toast's Notification ID const LLUUID getNotificationID() const { return mNotificationID;} // get toast's Session ID @@ -212,7 +213,7 @@ private: //LLRootHandle<LLToast> mHandle; - LLPanel* mWrapperPanel; + LLPanel* mWrapperPanel; // timer counts a lifetime of a toast std::auto_ptr<LLToastLifeTimer> mTimer; @@ -220,8 +221,8 @@ private: F32 mToastLifetime; // in seconds F32 mToastFadingTime; // in seconds - LLPanel* mPanel; - LLButton* mHideBtn; + LLPanel* mPanel; + LLButton* mHideBtn; LLColor4 mBgColor; bool mCanFade; diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 8fef2ed6d1..3f75f8da5e 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -357,6 +357,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal if (mLineEditor) { mLineEditor->selectAll(); + mLineEditor->setFocus(TRUE); } if(mDefaultOption >= 0) { diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index 75178a6ef8..4dc0d424ac 100644 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -51,7 +51,7 @@ const S32 LLToastGroupNotifyPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 7; -LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification) +LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notification) : LLToastPanel(notification), mInventoryOffer(NULL) { @@ -69,10 +69,8 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification //header title std::string from_name = payload["sender_name"].asString(); - if (LLAvatarNameCache::useDisplayNames()) - { - from_name = LLCacheName::buildUsername(from_name); - } + from_name = LLCacheName::buildUsername(from_name); + std::stringstream from; from << from_name << "/" << groupData.mName; LLTextBox* pTitleText = getChild<LLTextBox>("title"); @@ -112,7 +110,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification style.font = date_font; pMessageText->appendText(timeStr + "\n", TRUE, style); - style.font = pMessageText->getDefaultFont(); + style.font = pMessageText->getFont(); pMessageText->appendText(message, TRUE, style); //attachment diff --git a/indra/newview/lltoastgroupnotifypanel.h b/indra/newview/lltoastgroupnotifypanel.h index 7794ec9f63..dfdc6ae559 100644 --- a/indra/newview/lltoastgroupnotifypanel.h +++ b/indra/newview/lltoastgroupnotifypanel.h @@ -47,13 +47,10 @@ class LLToastGroupNotifyPanel public: void close(); - static bool onNewNotification(const LLSD& notification); - - // Non-transient messages. You can specify non-default button // layouts (like one for script dialogs) by passing various // numbers in for "layout". - LLToastGroupNotifyPanel(LLNotificationPtr& notification); + LLToastGroupNotifyPanel(const LLNotificationPtr& notification); /*virtual*/ ~LLToastGroupNotifyPanel(); protected: diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index e0cb200ef5..75e6e3d13a 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -104,9 +104,9 @@ LLToastIMPanel::~LLToastIMPanel() } //virtual -BOOL LLToastIMPanel::handleMouseDown(S32 x, S32 y, MASK mask) +BOOL LLToastIMPanel::handleMouseUp(S32 x, S32 y, MASK mask) { - if (LLPanel::handleMouseDown(x,y,mask) == FALSE) + if (LLPanel::handleMouseUp(x,y,mask) == FALSE) { mNotification->respond(mNotification->getResponseTemplate()); } diff --git a/indra/newview/lltoastimpanel.h b/indra/newview/lltoastimpanel.h index a803387576..3eb11fb3bc 100644 --- a/indra/newview/lltoastimpanel.h +++ b/indra/newview/lltoastimpanel.h @@ -41,18 +41,18 @@ public: struct Params { LLNotificationPtr notification; - LLUUID avatar_id; - LLUUID session_id; - std::string from; - std::string time; - std::string message; + LLUUID avatar_id, + session_id; + std::string from, + time, + message; Params() {} }; LLToastIMPanel(LLToastIMPanel::Params &p); virtual ~LLToastIMPanel(); - /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask); private: void showInspector(); diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index d629f3abac..4ef5ad845c 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -40,11 +40,14 @@ #include "lltrans.h" #include "llnotificationsutil.h" #include "llviewermessage.h" -#include "llimfloater.h" +#include "llfloaterimsession.h" const S32 BOTTOM_PAD = VPAD * 3; const S32 IGNORE_BTN_TOP_DELTA = 3*VPAD;//additional ignore_btn padding S32 BUTTON_WIDTH = 90; +// *TODO: magic numbers(???) - copied from llnotify.cpp(250) +const S32 MAX_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE; + //static const LLFontGL* LLToastNotifyPanel::sFont = NULL; @@ -52,172 +55,12 @@ const LLFontGL* LLToastNotifyPanel::sFontSmall = NULL; LLToastNotifyPanel::button_click_signal_t LLToastNotifyPanel::sButtonClickSignal; -LLToastNotifyPanel::LLToastNotifyPanel(const LLNotificationPtr& notification, const LLRect& rect, bool show_images) : -LLToastPanel(notification), -mTextBox(NULL), -mInfoPanel(NULL), -mControlPanel(NULL), -mNumOptions(0), -mNumButtons(0), -mAddedDefaultBtn(false), -mCloseNotificationOnDestroy(true) +LLToastNotifyPanel::LLToastNotifyPanel(const LLNotificationPtr& notification, const LLRect& rect, bool show_images) +: LLToastPanel(notification), + LLInstanceTracker<LLToastNotifyPanel, LLUUID>(notification->getID()) { - buildFromFile( "panel_notification.xml"); - if(rect != LLRect::null) - { - this->setShape(rect); - } - mInfoPanel = getChild<LLPanel>("info_panel"); - mControlPanel = getChild<LLPanel>("control_panel"); - BUTTON_WIDTH = gSavedSettings.getS32("ToastButtonWidth"); - // customize panel's attributes - // is it intended for displaying a tip? - mIsTip = notification->getType() == "notifytip"; - // is it a script dialog? - mIsScriptDialog = (notification->getName() == "ScriptDialog" || notification->getName() == "ScriptDialogGroup"); - // is it a caution? - // - // caution flag can be set explicitly by specifying it in the notification payload, or it can be set implicitly if the - // notify xml template specifies that it is a caution - // tip-style notification handle 'caution' differently -they display the tip in a different color - mIsCaution = notification->getPriority() >= NOTIFICATION_PRIORITY_HIGH; - - // setup parameters - // get a notification message - mMessage = notification->getMessage(); - // init font variables - if (!sFont) - { - sFont = LLFontGL::getFontSansSerif(); - sFontSmall = LLFontGL::getFontSansSerifSmall(); - } - // initialize - setFocusRoot(!mIsTip); - // get a form for the notification - LLNotificationFormPtr form(notification->getForm()); - // get number of elements - mNumOptions = form->getNumElements(); - - // customize panel's outfit - // preliminary adjust panel's layout - //move to the end - //mIsTip ? adjustPanelForTipNotice() : adjustPanelForScriptNotice(form); - - // adjust text options according to the notification type - // add a caution textbox at the top of a caution notification - if (mIsCaution && !mIsTip) - { - mTextBox = getChild<LLTextBox>("caution_text_box"); - } - else - { - mTextBox = getChild<LLTextEditor>("text_editor_box"); - } - - // *TODO: magic numbers(???) - copied from llnotify.cpp(250) - const S32 MAX_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE; - - mTextBox->setMaxTextLength(MAX_LENGTH); - mTextBox->setVisible(TRUE); - mTextBox->setPlainText(!show_images); - mTextBox->setValue(notification->getMessage()); - - // add buttons for a script notification - if (mIsTip) - { - adjustPanelForTipNotice(); + init(rect, show_images); } - else - { - std::vector<index_button_pair_t> buttons; - buttons.reserve(mNumOptions); - S32 buttons_width = 0; - // create all buttons and accumulate they total width to reshape mControlPanel - for (S32 i = 0; i < mNumOptions; i++) - { - LLSD form_element = form->getElement(i); - if (form_element["type"].asString() != "button") - { - // not a button. - continue; - } - if (form_element["name"].asString() == TEXTBOX_MAGIC_TOKEN) - { - // a textbox pretending to be a button. - continue; - } - LLButton* new_button = createButton(form_element, TRUE); - buttons_width += new_button->getRect().getWidth(); - S32 index = form_element["index"].asInteger(); - buttons.push_back(index_button_pair_t(index,new_button)); - } - if (buttons.empty()) - { - addDefaultButton(); - } - else - { - const S32 button_panel_width = mControlPanel->getRect().getWidth();// do not change width of the panel - S32 button_panel_height = mControlPanel->getRect().getHeight(); - //try get an average h_pad to spread out buttons - S32 h_pad = (button_panel_width - buttons_width) / (S32(buttons.size())); - if(h_pad < 2*HPAD) - { - /* - * Probably it is a scriptdialog toast - * for a scriptdialog toast h_pad can be < 2*HPAD if we have a lot of buttons. - * In last case set default h_pad to avoid heaping of buttons - */ - S32 button_per_row = button_panel_width / BUTTON_WIDTH; - h_pad = (button_panel_width % BUTTON_WIDTH) / (button_per_row - 1);// -1 because we do not need space after last button in a row - if(h_pad < 2*HPAD) // still not enough space between buttons ? - { - h_pad = 2*HPAD; - } - } - if (mIsScriptDialog) - { - // we are using default width for script buttons so we can determinate button_rows - //to get a number of rows we divide the required width of the buttons to button_panel_width - S32 button_rows = llceil(F32(buttons.size() - 1) * (BUTTON_WIDTH + h_pad) / button_panel_width); - //S32 button_rows = (buttons.size() - 1) * (BUTTON_WIDTH + h_pad) / button_panel_width; - //reserve one row for the ignore_btn - button_rows++; - //calculate required panel height for scripdialog notification. - button_panel_height = button_rows * (BTN_HEIGHT + VPAD) + IGNORE_BTN_TOP_DELTA + BOTTOM_PAD; - } - else - { - // in common case buttons can have different widths so we need to calculate button_rows according to buttons_width - //S32 button_rows = llceil(F32(buttons.size()) * (buttons_width + h_pad) / button_panel_width); - S32 button_rows = llceil(F32((buttons.size() - 1) * h_pad + buttons_width) / button_panel_width); - //calculate required panel height - button_panel_height = button_rows * (BTN_HEIGHT + VPAD) + BOTTOM_PAD; - } - - // we need to keep min width and max height to make visible all buttons, because width of the toast can not be changed - adjustPanelForScriptNotice(button_panel_width, button_panel_height); - updateButtonsLayout(buttons, h_pad); - // save buttons for later use in disableButtons() - mButtons.assign(buttons.begin(), buttons.end()); - } - } - // adjust panel's height to the text size - mInfoPanel->setFollowsAll(); - snapToMessageHeight(mTextBox, MAX_LENGTH); - - if(notification->isReusable()) - { - mButtonClickConnection = sButtonClickSignal.connect( - boost::bind(&LLToastNotifyPanel::onToastPanelButtonClicked, this, _1, _2)); - - if(notification->isRespondedTo()) - { - // User selected an option in toast, now disable required buttons in IM window - disableRespondedOptions(notification); - } - } -} void LLToastNotifyPanel::addDefaultButton() { LLSD form_element; @@ -235,7 +78,6 @@ void LLToastNotifyPanel::addDefaultButton() } LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, BOOL is_option) { - InstanceAndS32* userdata = new InstanceAndS32; userdata->mSelf = this; userdata->mButtonName = is_option ? form_element["name"].asString() : ""; @@ -245,14 +87,15 @@ LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, BOOL is_opt LLButton::Params p; bool make_small_btn = form_element["index"].asInteger() == -1 || form_element["index"].asInteger() == -2; const LLFontGL* font = make_small_btn ? sFontSmall: sFont; // for block and ignore buttons in script dialog - p.name(form_element["name"].asString()); - p.label(form_element["text"].asString()); - p.font(font); + p.name = form_element["name"].asString(); + p.label = form_element["text"].asString(); + p.font = font; p.rect.height = BTN_HEIGHT; p.click_callback.function(boost::bind(&LLToastNotifyPanel::onClickButton, userdata)); p.rect.width = BUTTON_WIDTH; p.auto_resize = false; p.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM); + p.enabled = !form_element.has("enabled") || form_element["enabled"].asBoolean(); if (mIsCaution) { p.image_color(LLUIColorTable::instance().getColor("ButtonCautionImageColor")); @@ -287,16 +130,11 @@ LLToastNotifyPanel::~LLToastNotifyPanel() mButtonClickConnection.disconnect(); std::for_each(mBtnCallbackData.begin(), mBtnCallbackData.end(), DeletePointer()); - if (mCloseNotificationOnDestroy && LLNotificationsUtil::find(mNotification->getID()) != NULL) - { - // let reusable notification be deleted - mNotification->setReusable(false); - if (!mNotification->isPersistent()) + if (mIsTip) { LLNotifications::getInstance()->cancel(mNotification); } } -} void LLToastNotifyPanel::updateButtonsLayout(const std::vector<index_button_pair_t>& buttons, S32 h_pad) { @@ -334,32 +172,24 @@ void LLToastNotifyPanel::updateButtonsLayout(const std::vector<index_button_pair } U32 ignore_btn_width = 0; + U32 mute_btn_pad = 0; if (mIsScriptDialog && ignore_btn != NULL) { LLRect ignore_btn_rect(ignore_btn->getRect()); - S32 buttons_per_row = max_width / BUTTON_WIDTH; //assume that h_pad far less than BUTTON_WIDTH - S32 ignore_btn_left = buttons_per_row * BUTTON_WIDTH + (buttons_per_row - 1) * h_pad - ignore_btn_rect.getWidth(); - if (ignore_btn_left + ignore_btn_rect.getWidth() > max_width)// make sure that the ignore button is in panel - { - ignore_btn_left = max_width - ignore_btn_rect.getWidth() - 2 * HPAD; - } + S32 ignore_btn_left = max_width - ignore_btn_rect.getWidth(); ignore_btn_rect.setOriginAndSize(ignore_btn_left, BOTTOM_PAD,// always move ignore button at the bottom ignore_btn_rect.getWidth(), ignore_btn_rect.getHeight()); ignore_btn->setRect(ignore_btn_rect); ignore_btn_width = ignore_btn_rect.getWidth(); mControlPanel->addChild(ignore_btn, -1); + mute_btn_pad = 4 * HPAD; //only use a 4 * HPAD padding if an ignore button exists } if (mIsScriptDialog && mute_btn != NULL) { LLRect mute_btn_rect(mute_btn->getRect()); - S32 buttons_per_row = max_width / BUTTON_WIDTH; //assume that h_pad far less than BUTTON_WIDTH // Place mute (Block) button to the left of the ignore button. - S32 mute_btn_left = buttons_per_row * BUTTON_WIDTH + (buttons_per_row - 1) * h_pad - mute_btn_rect.getWidth() - ignore_btn_width - (h_pad / 2); - if (mute_btn_left + mute_btn_rect.getWidth() > max_width) // make sure that the mute button is in panel - { - mute_btn_left = max_width - mute_btn_rect.getWidth() - 2 * HPAD; - } + S32 mute_btn_left = max_width - mute_btn_rect.getWidth() - ignore_btn_width - mute_btn_pad; mute_btn_rect.setOriginAndSize(mute_btn_left, BOTTOM_PAD,// always move mute button at the bottom mute_btn_rect.getWidth(), mute_btn_rect.getHeight()); mute_btn->setRect(mute_btn_rect); @@ -393,210 +223,278 @@ void LLToastNotifyPanel::adjustPanelForTipNotice() } } -typedef std::set<std::string> button_name_set_t; -typedef std::map<std::string, button_name_set_t> disable_button_map_t; - -disable_button_map_t initUserGiveItemDisableButtonMap() +// static +void LLToastNotifyPanel::onClickButton(void* data) { - // see EXT-5905 for disable rules - - disable_button_map_t disable_map; - button_name_set_t buttons; - - buttons.insert("Show"); - disable_map.insert(std::make_pair("Show", buttons)); + InstanceAndS32* self_and_button = (InstanceAndS32*)data; + LLToastNotifyPanel* self = self_and_button->mSelf; + std::string button_name = self_and_button->mButtonName; - buttons.insert("Discard"); - disable_map.insert(std::make_pair("Discard", buttons)); + LLSD response = self->mNotification->getResponseTemplate(); + if (!self->mAddedDefaultBtn && !button_name.empty()) + { + response[button_name] = true; + } - buttons.insert("Mute"); - disable_map.insert(std::make_pair("Mute", buttons)); + // disable all buttons + self->mControlPanel->setEnabled(FALSE); - return disable_map; + // this might repost notification with new form data/enabled buttons + self->mNotification->respond(response); } -disable_button_map_t initTeleportOfferedDisableButtonMap() +void LLToastNotifyPanel::init( LLRect rect, bool show_images ) { - disable_button_map_t disable_map; - button_name_set_t buttons; - - buttons.insert("Teleport"); - buttons.insert("Cancel"); - - disable_map.insert(std::make_pair("Teleport", buttons)); - disable_map.insert(std::make_pair("Cancel", buttons)); + deleteAllChildren(); + + mTextBox = NULL; + mInfoPanel = NULL; + mControlPanel = NULL; + mNumOptions = 0; + mNumButtons = 0; + mAddedDefaultBtn = false; + + LLRect current_rect = getRect(); + + setXMLFilename(""); + buildFromFile("panel_notification.xml"); + + if(rect != LLRect::null) + { + this->setShape(rect); + } + mInfoPanel = getChild<LLPanel>("info_panel"); + + mControlPanel = getChild<LLPanel>("control_panel"); + BUTTON_WIDTH = gSavedSettings.getS32("ToastButtonWidth"); + // customize panel's attributes + // is it intended for displaying a tip? + mIsTip = mNotification->getType() == "notifytip"; + // is it a script dialog? + mIsScriptDialog = (mNotification->getName() == "ScriptDialog" || mNotification->getName() == "ScriptDialogGroup"); + // is it a caution? + // + // caution flag can be set explicitly by specifying it in the notification payload, or it can be set implicitly if the + // notify xml template specifies that it is a caution + // tip-style notification handle 'caution' differently -they display the tip in a different color + mIsCaution = mNotification->getPriority() >= NOTIFICATION_PRIORITY_HIGH; + + // setup parameters + // get a notification message + mMessage = mNotification->getMessage(); + // init font variables + if (!sFont) + { + sFont = LLFontGL::getFontSansSerif(); + sFontSmall = LLFontGL::getFontSansSerifSmall(); + } + // initialize + setFocusRoot(!mIsTip); + // get a form for the notification + LLNotificationFormPtr form(mNotification->getForm()); + // get number of elements + mNumOptions = form->getNumElements(); + + // customize panel's outfit + // preliminary adjust panel's layout + //move to the end + //mIsTip ? adjustPanelForTipNotice() : adjustPanelForScriptNotice(form); + + // adjust text options according to the notification type + // add a caution textbox at the top of a caution notification + if (mIsCaution && !mIsTip) + { + mTextBox = getChild<LLTextBox>("caution_text_box"); + } + else + { + mTextBox = getChild<LLTextEditor>("text_editor_box"); + } + + mTextBox->setMaxTextLength(MAX_LENGTH); + mTextBox->setVisible(TRUE); + mTextBox->setPlainText(!show_images); + mTextBox->setValue(mNotification->getMessage()); + + // add buttons for a script notification + if (mIsTip) + { + adjustPanelForTipNotice(); + } + else + { + std::vector<index_button_pair_t> buttons; + buttons.reserve(mNumOptions); + S32 buttons_width = 0; + // create all buttons and accumulate they total width to reshape mControlPanel + for (S32 i = 0; i < mNumOptions; i++) + { + LLSD form_element = form->getElement(i); + if (form_element["type"].asString() != "button") + { + // not a button. + continue; + } + if (form_element["name"].asString() == TEXTBOX_MAGIC_TOKEN) + { + // a textbox pretending to be a button. + continue; + } + LLButton* new_button = createButton(form_element, TRUE); + buttons_width += new_button->getRect().getWidth(); + S32 index = form_element["index"].asInteger(); + buttons.push_back(index_button_pair_t(index,new_button)); + } + if (buttons.empty()) + { + addDefaultButton(); + } + else + { + const S32 button_panel_width = mControlPanel->getRect().getWidth();// do not change width of the panel + S32 button_panel_height = mControlPanel->getRect().getHeight(); + //try get an average h_pad to spread out buttons + S32 h_pad = (button_panel_width - buttons_width) / (S32(buttons.size())); + if(h_pad < 2*HPAD) + { + /* + * Probably it is a scriptdialog toast + * for a scriptdialog toast h_pad can be < 2*HPAD if we have a lot of buttons. + * In last case set default h_pad to avoid heaping of buttons + */ + S32 button_per_row = button_panel_width / BUTTON_WIDTH; + h_pad = (button_panel_width % BUTTON_WIDTH) / (button_per_row - 1);// -1 because we do not need space after last button in a row + if(h_pad < 2*HPAD) // still not enough space between buttons ? + { + h_pad = 2*HPAD; + } + } + if (mIsScriptDialog) + { + // we are using default width for script buttons so we can determinate button_rows + //to get a number of rows we divide the required width of the buttons to button_panel_width + S32 button_rows = llceil(F32(buttons.size() - 1) * (BUTTON_WIDTH + h_pad) / button_panel_width); + //S32 button_rows = (buttons.size() - 1) * (BUTTON_WIDTH + h_pad) / button_panel_width; + //reserve one row for the ignore_btn + button_rows++; + //calculate required panel height for scripdialog notification. + button_panel_height = button_rows * (BTN_HEIGHT + VPAD) + IGNORE_BTN_TOP_DELTA + BOTTOM_PAD; + } + else + { + // in common case buttons can have different widths so we need to calculate button_rows according to buttons_width + //S32 button_rows = llceil(F32(buttons.size()) * (buttons_width + h_pad) / button_panel_width); + S32 button_rows = llceil(F32((buttons.size() - 1) * h_pad + buttons_width) / button_panel_width); + //calculate required panel height + button_panel_height = button_rows * (BTN_HEIGHT + VPAD) + BOTTOM_PAD; + } + + // we need to keep min width and max height to make visible all buttons, because width of the toast can not be changed + adjustPanelForScriptNotice(button_panel_width, button_panel_height); + updateButtonsLayout(buttons, h_pad); + // save buttons for later use in disableButtons() + //mButtons.assign(buttons.begin(), buttons.end()); + } + } + + //.xml file intially makes info panel only follow left/right/top. This is so that when control buttons are added the info panel + //can shift upward making room for the buttons inside mControlPanel. After the buttons are added, the info panel can then be set to follow 'all'. + mInfoPanel->setFollowsAll(); + snapToMessageHeight(mTextBox, MAX_LENGTH); - return disable_map; + // reshape the panel to its previous size + if (current_rect.notEmpty()) + { + reshape(current_rect.getWidth(), current_rect.getHeight()); + } } -disable_button_map_t initFriendshipOfferedDisableButtonMap() -{ - disable_button_map_t disable_map; - button_name_set_t buttons; - - buttons.insert("Accept"); - buttons.insert("Decline"); - - disable_map.insert(std::make_pair("Accept", buttons)); - disable_map.insert(std::make_pair("Decline", buttons)); +////////////////////////////////////////////////////////////////////////// - return disable_map; +LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect /* = LLRect::null */, + bool show_images /* = true */, LLTextBase* parent_text) +: mSessionID(session_id), LLToastNotifyPanel(pNotification, rect, show_images), + mParentText(parent_text) +{ + compactButtons(); } -button_name_set_t getButtonDisableList(const std::string& notification_name, const std::string& button_name) +LLIMToastNotifyPanel::~LLIMToastNotifyPanel() { - static disable_button_map_t user_give_item_disable_map = initUserGiveItemDisableButtonMap(); - static disable_button_map_t teleport_offered_disable_map = initTeleportOfferedDisableButtonMap(); - static disable_button_map_t friendship_offered_disable_map = initFriendshipOfferedDisableButtonMap(); - - disable_button_map_t::const_iterator it; - disable_button_map_t::const_iterator it_end; - disable_button_map_t search_map; - - if("UserGiveItem" == notification_name) - { - search_map = user_give_item_disable_map; - } - else if(("TeleportOffered" == notification_name) || ("TeleportOffered_MaturityExceeded" == notification_name)) - { - search_map = teleport_offered_disable_map; - } - else if("OfferFriendship" == notification_name) - { - search_map = friendship_offered_disable_map; - } - - it = search_map.find(button_name); - it_end = search_map.end(); - - if(it_end != it) - { - return it->second; - } - return button_name_set_t(); } -void LLToastNotifyPanel::disableButtons(const std::string& notification_name, const std::string& selected_button) +void LLIMToastNotifyPanel::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) { - button_name_set_t buttons = getButtonDisableList(notification_name, selected_button); - - std::vector<index_button_pair_t>::const_iterator it = mButtons.begin(); - for ( ; it != mButtons.end(); it++) - { - LLButton* btn = it->second; - if(buttons.find(btn->getName()) != buttons.end()) - { - btn->setEnabled(FALSE); - } - } + LLToastPanel::reshape(width, height, called_from_parent); + snapToMessageHeight(); } -// static -void LLToastNotifyPanel::onClickButton(void* data) +void LLIMToastNotifyPanel::snapToMessageHeight() { - InstanceAndS32* self_and_button = (InstanceAndS32*)data; - LLToastNotifyPanel* self = self_and_button->mSelf; - std::string button_name = self_and_button->mButtonName; - - LLSD response = self->mNotification->getResponseTemplate(); - if (!self->mAddedDefaultBtn && !button_name.empty()) + if(!mTextBox) { - response[button_name] = true; + return; } - - bool is_reusable = self->mNotification->isReusable(); - // When we call respond(), LLOfferInfo will delete itself in inventory_offer_callback(), - // lets copy it while it's still valid. - LLOfferInfo* old_info = static_cast<LLOfferInfo*>(self->mNotification->getResponder()); - LLOfferInfo* new_info = NULL; - if(is_reusable && old_info) - { - new_info = new LLOfferInfo(*old_info); - self->mNotification->setResponder(new_info); - } - - self->mNotification->respond(response); - if(is_reusable) - { - sButtonClickSignal(self->mNotification->getID(), button_name); - } - else + //Add message height if it is visible + if (mTextBox->getVisible()) { - // disable all buttons - self->mControlPanel->setEnabled(FALSE); - } -} + S32 new_panel_height = computeSnappedToMessageHeight(mTextBox, MAX_LENGTH); -void LLToastNotifyPanel::onToastPanelButtonClicked(const LLUUID& notification_id, const std::string btn_name) -{ - if(mNotification->getID() == notification_id) - { - disableButtons(mNotification->getName(), btn_name); + //reshape the panel with new height + if (new_panel_height != getRect().getHeight()) + { + LLToastNotifyPanel::reshape( getRect().getWidth(), new_panel_height); + } } } -void LLToastNotifyPanel::disableRespondedOptions(const LLNotificationPtr& notification) +void LLIMToastNotifyPanel::compactButtons() { - LLSD response = notification->getResponse(); - for (LLSD::map_const_iterator response_it = response.beginMap(); - response_it != response.endMap(); ++response_it) + //we can't set follows in xml since it broke toasts behavior + setFollows(FOLLOWS_LEFT|FOLLOWS_RIGHT|FOLLOWS_TOP); + + const child_list_t* children = getControlPanel()->getChildList(); + S32 offset = 0; + // Children were added by addChild() which uses push_front to insert them into list, + // so to get buttons in correct order reverse iterator is used (EXT-5906) + for (child_list_t::const_reverse_iterator it = children->rbegin(); it != children->rend(); it++) { - if (response_it->second.isBoolean() && response_it->second.asBoolean()) + LLButton * button = dynamic_cast<LLButton*> (*it); + if (button != NULL) { - // that after multiple responses there can be many pressed buttons - // need to process them all - disableButtons(notification->getName(), response_it->first); + button->setOrigin( offset,button->getRect().mBottom); + button->setLeftHPad(2 * HPAD); + button->setRightHPad(2 * HPAD); + // set zero width before perform autoResize() + button->setRect(LLRect(button->getRect().mLeft, + button->getRect().mTop, + button->getRect().mLeft, + button->getRect().mBottom)); + button->setAutoResize(true); + button->autoResize(); + offset += HPAD + button->getRect().getWidth(); + button->setFollowsNone(); } } -} - - -////////////////////////////////////////////////////////////////////////// -LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect /* = LLRect::null */, - bool show_images /* = true */) - : mSessionID(session_id), LLToastNotifyPanel(pNotification, rect, show_images) -{ - mTextBox->setFollowsAll(); + if (mParentText) + { + mParentText->needsReflow(); + } } -LLIMToastNotifyPanel::~LLIMToastNotifyPanel() -{ - // We shouldn't delete notification when IM floater exists - // since that notification will be reused by IM floater. - // This may happened when IM floater reloads messages, exactly when user - // changes layout of IM chat log(disable/enable plaintext mode). - // See EXT-6500 - LLIMFloater* im_floater = LLIMFloater::findInstance(mSessionID); - if (im_floater != NULL && !im_floater->isDead()) +void LLIMToastNotifyPanel::updateNotification() { - mCloseNotificationOnDestroy = false; + init(LLRect(), true); } -} -void LLIMToastNotifyPanel::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) +void LLIMToastNotifyPanel::init( LLRect rect, bool show_images ) { - S32 text_height = mTextBox->getTextBoundingRect().getHeight(); - S32 widget_height = mTextBox->getRect().getHeight(); - S32 delta = text_height - widget_height; - LLRect rc = getRect(); + LLToastNotifyPanel::init(LLRect(), show_images); - rc.setLeftTopAndSize(rc.mLeft, rc.mTop, width, height + delta); - height = rc.getHeight(); - width = rc.getWidth(); - - bool is_width_changed = width != getRect().getWidth(); - - LLToastPanel::reshape(width, height, called_from_parent); - - // Notification height required to display the text message depends on - // the width of the text box thus if panel width is changed the text box - // width is also changed then reshape() is called to adjust proper height. - if (is_width_changed) - { - reshape(width, height, called_from_parent); - } + compactButtons(); } // EOF + diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index db517ec858..d02171b512 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -47,7 +47,7 @@ class LLNotificationForm; * @deprecated this class will be removed after all toast panel types are * implemented in separate classes. */ -class LLToastNotifyPanel: public LLToastPanel +class LLToastNotifyPanel: public LLToastPanel, public LLInstanceTracker<LLToastNotifyPanel, LLUUID> { public: /** @@ -61,10 +61,14 @@ public: * implement right class for desired toast panel. @see LLGenericTipPanel as example. */ LLToastNotifyPanel(const LLNotificationPtr& pNotification, const LLRect& rect = LLRect::null, bool show_images = true); + + virtual void init( LLRect rect, bool show_images ); + virtual ~LLToastNotifyPanel(); LLPanel * getControlPanel() { return mControlPanel; } - void setCloseNotificationOnDestroy(bool close) { mCloseNotificationOnDestroy = close; } + virtual void updateNotification() {} + protected: LLButton* createButton(const LLSD& form_element, BOOL is_option); @@ -76,8 +80,6 @@ protected: }; std::vector<InstanceAndS32*> mBtnCallbackData; - bool mCloseNotificationOnDestroy; - typedef std::pair<int,LLButton*> index_button_pair_t; void adjustPanelForScriptNotice(S32 max_width, S32 max_height); void adjustPanelForTipNotice(); @@ -93,9 +95,9 @@ protected: /** * Disable specific button(s) based on notification name and clicked button */ - void disableButtons(const std::string& notification_name, const std::string& selected_button); + //void disableButtons(const std::string& notification_name, const std::string& selected_button); - std::vector<index_button_pair_t> mButtons; + //std::vector<index_button_pair_t> mButtons; // panel elements LLTextBase* mTextBox; @@ -118,7 +120,7 @@ protected: /** * Process response data. Will disable selected options */ - void disableRespondedOptions(const LLNotificationPtr& notification); + //void disableRespondedOptions(const LLNotificationPtr& notification); bool mIsTip; bool mAddedDefaultBtn; @@ -137,14 +139,27 @@ class LLIMToastNotifyPanel : public LLToastNotifyPanel { public: - LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect = LLRect::null, bool show_images = true); + LLIMToastNotifyPanel(LLNotificationPtr& pNotification, + const LLUUID& session_id, + const LLRect& rect = LLRect::null, + bool show_images = true, + LLTextBase* parent_text = NULL); + + void compactButtons(); + + virtual void updateNotification(); + virtual void init( LLRect rect, bool show_images ); ~LLIMToastNotifyPanel(); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); protected: + LLTextBase* mParentText; LLUUID mSessionID; + +private: + void snapToMessageHeight(); }; #endif /* LLTOASTNOTIFYPANEL_H_ */ diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index c33fde99c5..a30f841980 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -58,6 +58,25 @@ const LLUUID& LLToastPanel::getID() return mNotification->id(); } +S32 LLToastPanel::computeSnappedToMessageHeight(LLTextBase* message, S32 maxLineCount) +{ + S32 heightDelta = 0; + S32 maxTextHeight = message->getFont()->getLineHeight() * maxLineCount; + + LLRect messageRect = message->getRect(); + S32 oldTextHeight = messageRect.getHeight(); + + //Knowing the height is set to max allowed, getTextPixelHeight returns needed text height + //Perhaps we need to pass maxLineCount as parameter to getTextPixelHeight to avoid previous reshape. + S32 requiredTextHeight = message->getTextBoundingRect().getHeight(); + S32 newTextHeight = llmin(requiredTextHeight, maxTextHeight); + + heightDelta = newTextHeight - oldTextHeight; + S32 new_panel_height = llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT); + + return new_panel_height; +} + //snap to the message height if it is visible void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount) { @@ -69,22 +88,13 @@ void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount) //Add message height if it is visible if (message->getVisible()) { - S32 heightDelta = 0; - S32 maxTextHeight = message->getDefaultFont()->getLineHeight() * maxLineCount; - - LLRect messageRect = message->getRect(); - S32 oldTextHeight = messageRect.getHeight(); - - //Knowing the height is set to max allowed, getTextPixelHeight returns needed text height - //Perhaps we need to pass maxLineCount as parameter to getTextPixelHeight to avoid previous reshape. - S32 requiredTextHeight = message->getTextBoundingRect().getHeight(); - S32 newTextHeight = llmin(requiredTextHeight, maxTextHeight); - - //Calculate last delta height deducting previous heightDelta - heightDelta = newTextHeight - oldTextHeight - heightDelta; + S32 new_panel_height = computeSnappedToMessageHeight(message, maxLineCount); //reshape the panel with new height - reshape( getRect().getWidth(), llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT)); + if (new_panel_height != getRect().getHeight()) + { + reshape( getRect().getWidth(), new_panel_height); + } } } @@ -98,7 +108,7 @@ LLToastPanel* LLToastPanel::buidPanelFromNotification( if ("notifytip" == notification->getType()) { // if it is online/offline notification - if ("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName()) + if ("FriendOnlineOffline" == notification->getName()) { res = new LLPanelOnlineStatus(notification); } diff --git a/indra/newview/lltoastpanel.h b/indra/newview/lltoastpanel.h index 346e014d73..e4ab95007e 100644 --- a/indra/newview/lltoastpanel.h +++ b/indra/newview/lltoastpanel.h @@ -33,19 +33,13 @@ #include <string> -class LLToastPanelBase: public LLPanel -{ -public: - virtual void init(LLSD& data){}; -}; - /** * Base class for all panels that can be added to the toast. * All toast panels should contain necessary logic for representing certain notification * but shouldn't contain logic related to this panel lifetime control and positioning * on the parent view. */ -class LLToastPanel: public LLPanel { +class LLToastPanel : public LLPanel { public: LLToastPanel(const LLNotificationPtr&); virtual ~LLToastPanel() = 0; @@ -65,6 +59,7 @@ public: protected: LLNotificationPtr mNotification; void snapToMessageHeight(LLTextBase* message, S32 maxLineCount); + S32 computeSnappedToMessageHeight(LLTextBase* message, S32 maxLineCount); }; #endif /* LL_TOASTPANEL_H */ diff --git a/indra/newview/lltoastscriptquestion.cpp b/indra/newview/lltoastscriptquestion.cpp index feeb8ca77b..91ba8c0247 100644 --- a/indra/newview/lltoastscriptquestion.cpp +++ b/indra/newview/lltoastscriptquestion.cpp @@ -66,8 +66,8 @@ void LLToastScriptQuestion::snapToMessageHeight() if (mMessage->getVisible() && mFooter->getVisible()) { S32 heightDelta = 0; - S32 maxTextHeight = (mMessage->getDefaultFont()->getLineHeight() * MAX_LINES_COUNT) - + (mFooter->getDefaultFont()->getLineHeight() * MAX_LINES_COUNT); + S32 maxTextHeight = (mMessage->getFont()->getLineHeight() * MAX_LINES_COUNT) + + (mFooter->getFont()->getLineHeight() * MAX_LINES_COUNT); LLRect messageRect = mMessage->getRect(); LLRect footerRect = mFooter->getRect(); diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp index 2529ec865a..45fbabad59 100644 --- a/indra/newview/lltoastscripttextbox.cpp +++ b/indra/newview/lltoastscripttextbox.cpp @@ -65,7 +65,7 @@ LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification pMessageText->clear(); LLStyle::Params style; - style.font = pMessageText->getDefaultFont(); + style.font = pMessageText->getFont(); pMessageText->appendText(message, TRUE, style); //submit button diff --git a/indra/newview/lltoastscripttextbox.h b/indra/newview/lltoastscripttextbox.h index 8e69d8834d..7d33446248 100644 --- a/indra/newview/lltoastscripttextbox.h +++ b/indra/newview/lltoastscripttextbox.h @@ -39,8 +39,6 @@ class LLToastScriptTextbox public: void close(); - static bool onNewNotification(const LLSD& notification); - // Non-transient messages. You can specify non-default button // layouts (like one for script dialogs) by passing various // numbers in for "layout". diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 81ad96f39e..b2318f9158 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -76,7 +76,8 @@ LLToolBarView::LLToolBarView(const LLToolBarView::Params& p) mShowToolbars(true), mDragToolbarButton(NULL), mDragItem(NULL), - mToolbarsLoaded(false) + mToolbarsLoaded(false), + mBottomToolbarPanel(NULL) { for (S32 i = 0; i < TOOLBAR_COUNT; i++) { @@ -100,6 +101,7 @@ BOOL LLToolBarView::postBuild() mToolbars[TOOLBAR_LEFT] = getChild<LLToolBar>("toolbar_left"); mToolbars[TOOLBAR_RIGHT] = getChild<LLToolBar>("toolbar_right"); mToolbars[TOOLBAR_BOTTOM] = getChild<LLToolBar>("toolbar_bottom"); + mBottomToolbarPanel = getChild<LLView>("bottom_toolbar_panel"); for (int i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++) { @@ -239,8 +241,9 @@ bool LLToolBarView::loadToolbars(bool force_default) LLXUIParser parser; if (!err) { - parser.readXUI(root, toolbar_set, toolbar_file); + parser.readXUI(root, toolbar_set, toolbar_file); } + if (!err && !toolbar_set.validateBlock()) { llwarns << "Unable to validate toolbars from file: " << toolbar_file << llendl; @@ -252,8 +255,9 @@ bool LLToolBarView::loadToolbars(bool force_default) if (force_default) { llerrs << "Unable to load toolbars from default file : " << toolbar_file << llendl; - return false; - } + return false; + } + // Try to load the default toolbars return loadToolbars(true); } @@ -603,7 +607,7 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar) { BOOL handled = FALSE; - LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; + LLInventoryObject* inv_item = static_cast<LLInventoryObject*>(cargo_data); LLAssetType::EType type = inv_item->getType(); if (type == LLAssetType::AT_WIDGET) diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h index 9c4194ebed..7125dd9990 100644 --- a/indra/newview/lltoolbarview.h +++ b/indra/newview/lltoolbarview.h @@ -108,7 +108,8 @@ public: static BOOL handleDropTool(void* cargo_data, S32 x, S32 y, LLToolBar* toolbar); static void resetDragTool(LLToolBarButton* toolbarButton); LLInventoryObject* getDragItem(); - + LLView* getBottomToolbar() { return mBottomToolbarPanel; } + LLToolBar* getToolbar(EToolBarLocation toolbar) { return mToolbars[toolbar]; } bool isModified() const; protected: @@ -133,6 +134,7 @@ private: LLToolBarButton* mDragToolbarButton; LLInventoryObject* mDragItem; bool mShowToolbars; + LLView* mBottomToolbarPanel; }; extern LLToolBarView* gToolBarView; diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index c69999981c..94c97158a8 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -58,7 +58,6 @@ #include "llviewerwindow.h" #include "llvoavatarself.h" #include "llworld.h" -#include "llclipboard.h" // syntactic sugar #define callMemberFunction(object,ptrToMember) ((object).*(ptrToMember)) @@ -654,33 +653,41 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, sOperationId++; } + // For people drag and drop we don't need an actual inventory object, + // instead we need the current cargo id, which should be a person id. + bool is_uuid_dragged = (mSource == SOURCE_PEOPLE); + if (top_view) { handled = TRUE; for (mCurItemIndex = 0; mCurItemIndex < (S32)mCargoIDs.size(); mCurItemIndex++) { - LLInventoryObject* cargo = locateInventory(item, cat); + S32 local_x, local_y; + top_view->screenPointToLocal( x, y, &local_x, &local_y ); + EAcceptance item_acceptance = ACCEPT_NO; + LLInventoryObject* cargo = locateInventory(item, cat); if (cargo) { - S32 local_x, local_y; - top_view->screenPointToLocal( x, y, &local_x, &local_y ); - EAcceptance item_acceptance = ACCEPT_NO; handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, FALSE, mCargoTypes[mCurItemIndex], (void*)cargo, &item_acceptance, mToolTipMsg); - if (handled) - { - // use sort order to determine priority of acceptance - *acceptance = (EAcceptance)llmin((U32)item_acceptance, (U32)*acceptance); - } } - else + else if (is_uuid_dragged) { - return; + handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, FALSE, + mCargoTypes[mCurItemIndex], + (void*)&mCargoIDs[mCurItemIndex], + &item_acceptance, + mToolTipMsg); + } + if (handled) + { + // use sort order to determine priority of acceptance + *acceptance = (EAcceptance)llmin((U32)item_acceptance, (U32)*acceptance); } } @@ -697,20 +704,27 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, for (mCurItemIndex = 0; mCurItemIndex < (S32)mCargoIDs.size(); mCurItemIndex++) { - LLInventoryObject* cargo = locateInventory(item, cat); + S32 local_x, local_y; + EAcceptance item_acceptance; + top_view->screenPointToLocal( x, y, &local_x, &local_y ); + LLInventoryObject* cargo = locateInventory(item, cat); if (cargo) { - S32 local_x, local_y; - - EAcceptance item_acceptance; - top_view->screenPointToLocal( x, y, &local_x, &local_y ); handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, TRUE, mCargoTypes[mCurItemIndex], (void*)cargo, &item_acceptance, mToolTipMsg); } + else if (is_uuid_dragged) + { + handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, FALSE, + mCargoTypes[mCurItemIndex], + (void*)&mCargoIDs[mCurItemIndex], + &item_acceptance, + mToolTipMsg); + } } } if (handled) @@ -727,17 +741,27 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, for (mCurItemIndex = 0; mCurItemIndex < (S32)mCargoIDs.size(); mCurItemIndex++) { + EAcceptance item_acceptance = ACCEPT_NO; + LLInventoryObject* cargo = locateInventory(item, cat); // fix for EXT-3191 - if (NULL == cargo) return; - - EAcceptance item_acceptance = ACCEPT_NO; - handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE, - mCargoTypes[mCurItemIndex], - (void*)cargo, - &item_acceptance, - mToolTipMsg); + if (cargo) + { + handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE, + mCargoTypes[mCurItemIndex], + (void*)cargo, + &item_acceptance, + mToolTipMsg); + } + else if (is_uuid_dragged) + { + handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE, + mCargoTypes[mCurItemIndex], + (void*)&mCargoIDs[mCurItemIndex], + &item_acceptance, + mToolTipMsg); + } if (handled) { // use sort order to determine priority of acceptance @@ -757,17 +781,25 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, for (mCurItemIndex = 0; mCurItemIndex < (S32)mCargoIDs.size(); mCurItemIndex++) { - LLInventoryObject* cargo = locateInventory(item, cat); + EAcceptance item_acceptance; + LLInventoryObject* cargo = locateInventory(item, cat); if (cargo) { - EAcceptance item_acceptance; handled = handled && root_view->handleDragAndDrop(x, y, mask, TRUE, mCargoTypes[mCurItemIndex], (void*)cargo, &item_acceptance, mToolTipMsg); } + else if (is_uuid_dragged) + { + handled = handled && root_view->handleDragAndDrop(x, y, mask, TRUE, + mCargoTypes[mCurItemIndex], + (void*)&mCargoIDs[mCurItemIndex], + &item_acceptance, + mToolTipMsg); + } } } @@ -780,7 +812,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, if (!handled) { // Disallow drag and drop to 3D from the outbox - const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false); + const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); if (outbox_id.notNull()) { for (S32 item_index = 0; item_index < (S32)mCargoIDs.size(); item_index++) @@ -2509,7 +2541,13 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory( { item = NULL; cat = NULL; - if(mCargoIDs.empty()) return NULL; + + if (mCargoIDs.empty() + || (mSource == SOURCE_PEOPLE)) ///< There is no inventory item for people drag and drop. + { + return NULL; + } + if((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY)) { // The object should be in user inventory. @@ -2545,6 +2583,7 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory( { item = (LLViewerInventoryItem*)gToolBarView->getDragItem(); } + if(item) return item; if(cat) return cat; return NULL; diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index 41aee484db..f17300a76a 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -67,7 +67,8 @@ public: SOURCE_WORLD, SOURCE_NOTECARD, SOURCE_LIBRARY, - SOURCE_VIEWER + SOURCE_VIEWER, + SOURCE_PEOPLE }; void beginDrag(EDragAndDropType type, diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 3cd761b73b..f24891baf6 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -125,9 +125,10 @@ BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask) mPick.mKeyMask = mask; // claim not handled so UI focus stays same - - handleRightClickPick(); - + if(gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) + { + handleRightClickPick(); + } return FALSE; } @@ -972,33 +973,16 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l || !existing_inspector->getVisible() || existing_inspector->getKey()["avatar_id"].asUUID() != hover_object->getID()) { - // IDEVO: try to get display name + username + // Try to get display name + username std::string final_name; - std::string full_name; - if (!gCacheName->getFullName(hover_object->getID(), full_name)) - { - LLNameValue* firstname = hover_object->getNVPair("FirstName"); - LLNameValue* lastname = hover_object->getNVPair("LastName"); - if (firstname && lastname) - { - full_name = LLCacheName::buildFullName( - firstname->getString(), lastname->getString()); - } - else - { - full_name = LLTrans::getString("TooltipPerson"); - } - } - LLAvatarName av_name; - if (LLAvatarNameCache::useDisplayNames() && - LLAvatarNameCache::get(hover_object->getID(), &av_name)) + if (LLAvatarNameCache::get(hover_object->getID(), &av_name)) { final_name = av_name.getCompleteName(); } else { - final_name = full_name; + final_name = LLTrans::getString("TooltipPerson");; } // *HACK: We may select this object, so pretend it was clicked diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h index c58e1adb8c..db5ad9479c 100755 --- a/indra/newview/lltranslate.h +++ b/indra/newview/lltranslate.h @@ -263,8 +263,8 @@ public : EService mService; }; - typedef boost::intrusive_ptr<TranslationReceiver> TranslationReceiverPtr; - typedef boost::intrusive_ptr<KeyVerificationReceiver> KeyVerificationReceiverPtr; + typedef LLPointer<TranslationReceiver> TranslationReceiverPtr; + typedef LLPointer<KeyVerificationReceiver> KeyVerificationReceiverPtr; /** * Translate given text. diff --git a/indra/newview/llviewerassettype.cpp b/indra/newview/llviewerassettype.cpp index a4b1c2155f..08ba5a5f25 100644 --- a/indra/newview/llviewerassettype.cpp +++ b/indra/newview/llviewerassettype.cpp @@ -83,6 +83,8 @@ LLViewerAssetDictionary::LLViewerAssetDictionary() addEntry(LLViewerAssetType::AT_WIDGET, new ViewerAssetEntry(DAD_WIDGET)); + addEntry(LLViewerAssetType::AT_PERSON, new ViewerAssetEntry(DAD_PERSON)); + addEntry(LLViewerAssetType::AT_NONE, new ViewerAssetEntry(DAD_NONE)); }; diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 8d8c401dac..564bf7997a 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -30,6 +30,7 @@ #include "llagent.h" #include "llagentcamera.h" #include "llappviewer.h" +#include "lldeferredsounds.h" #include "llvieweraudio.h" #include "llviewercamera.h" #include "llviewercontrol.h" @@ -388,6 +389,12 @@ void audio_update_volume(bool force_update) gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelRolloff")); gAudiop->setMuted(mute_audio || progress_view_visible); + //Play any deferred sounds when unmuted + if(!gAudiop->getMuted()) + { + LLDeferredSounds::instance().playdeferredSounds(); + } + if (force_update) { audio_update_wind(true); diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h index 184033de42..b857c7fe89 100644 --- a/indra/newview/llviewercamera.h +++ b/indra/newview/llviewercamera.h @@ -51,9 +51,19 @@ const BOOL NOT_FOR_SELECTION = FALSE; extern template class LLViewerCamera* LLSingleton<class LLViewerCamera>::getInstance(); #endif +LL_ALIGN_PREFIX(16) class LLViewerCamera : public LLCamera, public LLSingleton<LLViewerCamera> { public: + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } typedef enum { @@ -137,6 +147,7 @@ protected: S16 mZoomSubregion; public: -}; +} LL_ALIGN_POSTFIX(16); + #endif // LL_LLVIEWERCAMERA_H diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index dec1615246..051f5f4485 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -72,6 +72,8 @@ #include "llpanellogin.h" #include "llpaneltopinfobar.h" #include "llspellcheck.h" +#include "llslurl.h" +#include "llstartup.h" #include "llupdaterservice.h" // Third party library includes @@ -496,6 +498,20 @@ bool handleForceShowGrid(const LLSD& newvalue) return true; } +bool handleLoginLocationChanged() +{ + /* + * This connects the default preference setting to the state of the login + * panel if it is displayed; if you open the preferences panel before + * logging in, and change the default login location there, the login + * panel immediately changes to match your new preference. + */ + std::string new_login_location = gSavedSettings.getString("LoginLocation"); + LL_DEBUGS("AppInit")<<new_login_location<<LL_ENDL; + LLStartUp::setStartSLURL(LLSLURL(new_login_location)); + return true; +} + bool handleSpellCheckChanged() { if (gSavedSettings.getBOOL("SpellCheck")) @@ -721,6 +737,7 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2)); gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&handleSpellCheckChanged)); gSavedSettings.getControl("SpellCheckDictionary")->getSignal()->connect(boost::bind(&handleSpellCheckChanged)); + gSavedSettings.getControl("LoginLocation")->getSignal()->connect(boost::bind(&handleLoginLocationChanged)); } #if TEST_CACHED_CONTROL diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 9ef012ece1..40577118ba 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -79,6 +79,7 @@ #include "llpostprocess.h" extern LLPointer<LLViewerTexture> gStartTexture; +extern bool gShiftFrame; LLPointer<LLViewerTexture> gDisconnectedImagep = NULL; @@ -162,9 +163,11 @@ void display_startup() glClear(GL_DEPTH_BUFFER_BIT); } +static LLFastTimer::DeclareTimer FTM_UPDATE_CAMERA("Update Camera"); + void display_update_camera() { - LLMemType mt_uc(LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA); + LLFastTimer t(FTM_UPDATE_CAMERA); // TODO: cut draw distance down if customizing avatar? // TODO: cut draw distance on per-parcel basis? @@ -214,18 +217,23 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_SKY("Update Sky"); static LLFastTimer::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures"); static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE("Update Images"); static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_CLASS("Class"); -static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Bump"); +static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Image Update Bump"); static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_LIST("List"); static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_DELETE("Delete"); +static LLFastTimer::DeclareTimer FTM_RESIZE_WINDOW("Resize Window"); +static LLFastTimer::DeclareTimer FTM_HUD_UPDATE("HUD Update"); +static LLFastTimer::DeclareTimer FTM_DISPLAY_UPDATE_GEOM("Update Geom"); +static LLFastTimer::DeclareTimer FTM_TEXTURE_UNBIND("Texture Unbind"); +static LLFastTimer::DeclareTimer FTM_TELEPORT_DISPLAY("Teleport Display"); // Paint the display! void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { - LLMemType mt_render(LLMemType::MTYPE_RENDER); LLFastTimer t(FTM_RENDER); if (gWindowResized) { //skip render on frames where window has been resized + LLFastTimer t(FTM_RESIZE_WINDOW); gGL.flush(); glClear(GL_COLOR_BUFFER_BIT); gViewerWindow->getWindow()->swapBuffers(); @@ -362,6 +370,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (gTeleportDisplay) { + LLFastTimer t(FTM_TELEPORT_DISPLAY); LLAppViewer::instance()->pingMainloopTimeout("Display:Teleport"); const F32 TELEPORT_ARRIVAL_DELAY = 2.f; // Time to preload the world before raising the curtain after we've actually already arrived. @@ -570,7 +579,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (!gDisconnected) { - LLMemType mt_du(LLMemType::MTYPE_DISPLAY_UPDATE); LLAppViewer::instance()->pingMainloopTimeout("Display:Update"); if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD)) { //don't draw hud objects in this frame @@ -591,14 +599,14 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // *TODO: merge these two methods { - LLMemType mt_uh(LLMemType::MTYPE_DISPLAY_UPDATE_HUD); + LLFastTimer t(FTM_HUD_UPDATE); LLHUDManager::getInstance()->updateEffects(); LLHUDObject::updateAll(); stop_glerror(); } { - LLMemType mt_ug(LLMemType::MTYPE_DISPLAY_UPDATE_GEOM); + LLFastTimer t(FTM_DISPLAY_UPDATE_GEOM); const F32 max_geom_update_time = 0.005f*10.f*gFrameIntervalSeconds; // 50 ms/second update time gPipeline.createObjects(max_geom_update_time); gPipeline.processPartitionQ(); @@ -607,6 +615,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) } gPipeline.updateGL(); + stop_glerror(); S32 water_clip = 0; @@ -658,8 +667,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLAppViewer::instance()->pingMainloopTimeout("Display:Swap"); { - LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SWAP); - if (gResizeScreenTexture) { gResizeScreenTexture = FALSE; @@ -718,7 +725,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) //if (!for_snapshot) { - LLMemType mt_gw(LLMemType::MTYPE_DISPLAY_GEN_REFLECTION); LLAppViewer::instance()->pingMainloopTimeout("Display:Imagery"); gPipeline.generateWaterReflection(*LLViewerCamera::getInstance()); gPipeline.generateHighlight(*LLViewerCamera::getInstance()); @@ -738,7 +744,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLAppViewer::instance()->pingMainloopTimeout("Display:UpdateImages"); { - LLMemType mt_iu(LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE); LLFastTimer t(FTM_IMAGE_UPDATE); { @@ -782,7 +787,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLAppViewer::instance()->pingMainloopTimeout("Display:StateSort"); { LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; - LLMemType mt_ss(LLMemType::MTYPE_DISPLAY_STATE_SORT); gPipeline.stateSort(*LLViewerCamera::getInstance(), result); stop_glerror(); @@ -804,7 +808,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLPipeline::sUseOcclusion = occlusion; { - LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SKY); LLAppViewer::instance()->pingMainloopTimeout("Display:Sky"); LLFastTimer t(FTM_UPDATE_SKY); gSky.updateSky(); @@ -893,7 +896,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) && !gRestoreGL) { LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; - LLMemType mt_rg(LLMemType::MTYPE_DISPLAY_RENDER_GEOM); if (gSavedSettings.getBOOL("RenderDepthPrePass") && LLGLSLShader::sNoFixedFunction) { @@ -938,19 +940,22 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) stop_glerror(); } - for (U32 i = 0; i < gGLManager.mNumTextureImageUnits; i++) - { //dummy cleanup of any currently bound textures - if (gGL.getTexUnit(i)->getCurrType() != LLTexUnit::TT_NONE) - { - gGL.getTexUnit(i)->unbind(gGL.getTexUnit(i)->getCurrType()); - gGL.getTexUnit(i)->disable(); + { + LLFastTimer t(FTM_TEXTURE_UNBIND); + for (U32 i = 0; i < gGLManager.mNumTextureImageUnits; i++) + { //dummy cleanup of any currently bound textures + if (gGL.getTexUnit(i)->getCurrType() != LLTexUnit::TT_NONE) + { + gGL.getTexUnit(i)->unbind(gGL.getTexUnit(i)->getCurrType()); + gGL.getTexUnit(i)->disable(); + } } } + LLAppViewer::instance()->pingMainloopTimeout("Display:RenderFlush"); if (to_texture) { - LLMemType mt_rf(LLMemType::MTYPE_DISPLAY_RENDER_FLUSH); if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender) { gPipeline.mDeferredScreen.flush(); @@ -1011,11 +1016,12 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) display_stats(); LLAppViewer::instance()->pingMainloopTimeout("Display:Done"); + + gShiftFrame = false; } void render_hud_attachments() { - LLMemType mt_ra(LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS); gGL.matrixMode(LLRender::MM_PROJECTION); gGL.pushMatrix(); gGL.matrixMode(LLRender::MM_MODELVIEW); @@ -1032,7 +1038,6 @@ void render_hud_attachments() if (LLPipeline::sShowHUDAttachments && !gDisconnected && setup_hud_matrices()) { LLCamera hud_cam = *LLViewerCamera::getInstance(); - LLVector3 origin = hud_cam.getOrigin(); hud_cam.setOrigin(-1.f,0,0); hud_cam.setAxes(LLVector3(1,0,0), LLVector3(0,1,0), LLVector3(0,0,1)); LLViewerCamera::updateFrustumPlanes(hud_cam, TRUE); @@ -1205,7 +1210,6 @@ static LLFastTimer::DeclareTimer FTM_SWAP("Swap"); void render_ui(F32 zoom_factor, int subfield) { - LLMemType mt_ru(LLMemType::MTYPE_DISPLAY_RENDER_UI); LLGLState::checkStates(); glh::matrix4f saved_view = glh_get_current_modelview(); diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp index 5741fab29a..6bd5631df6 100644 --- a/indra/newview/llviewerdisplayname.cpp +++ b/indra/newview/llviewerdisplayname.cpp @@ -53,6 +53,7 @@ namespace LLViewerDisplayName sNameChangedSignal.connect(cb); } + void doNothing() { } } class LLSetDisplayNameResponder : public LLHTTPClient::Responder @@ -97,7 +98,7 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl // People API expects array of [ "old value", "new value" ] LLSD change_array = LLSD::emptyArray(); - change_array.append(av_name.mDisplayName); + change_array.append(av_name.getDisplayName()); change_array.append(display_name); llinfos << "Set name POST to " << cap_url << llendl; @@ -139,9 +140,9 @@ public: LLUUID agent_id = gAgent.getID(); // Flush stale data LLAvatarNameCache::erase( agent_id ); - // Queue request for new data - LLAvatarName ignored; - LLAvatarNameCache::get( agent_id, &ignored ); + // Queue request for new data: nothing to do on callback though... + // Note: no need to disconnect the callback as it never gets out of scope + LLAvatarNameCache::get(agent_id, boost::bind(&LLViewerDisplayName::doNothing)); // Kill name tag, as it is wrong LLVOAvatar::invalidateNameTag( agent_id ); } @@ -189,8 +190,8 @@ class LLDisplayNameUpdate : public LLHTTPNode LLSD args; args["OLD_NAME"] = old_display_name; - args["SLID"] = av_name.mUsername; - args["NEW_NAME"] = av_name.mDisplayName; + args["SLID"] = av_name.getUserName(); + args["NEW_NAME"] = av_name.getDisplayName(); LLNotificationsUtil::add("DisplayNameUpdate", args); if (agent_id == gAgent.getID()) { diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 1f7cf0cdd4..c6b28b9e5e 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -32,7 +32,6 @@ #include "llviewerfloaterreg.h" #include "llfloaterautoreplacesettings.h" #include "llcompilequeue.h" -#include "llcallfloater.h" #include "llfasttimerview.h" #include "llfloaterabout.h" #include "llfloaterauction.h" @@ -50,6 +49,9 @@ #include "llfloaterbump.h" #include "llfloaterbvhpreview.h" #include "llfloatercamera.h" +#include "llfloaterchatvoicevolume.h" +#include "llfloaterconversationlog.h" +#include "llfloaterconversationpreview.h" #include "llfloaterdeleteenvpreset.h" #include "llfloaterdisplayname.h" #include "llfloatereditdaycycle.h" @@ -69,7 +71,7 @@ #include "llfloatermediasettings.h" #include "llfloaterhud.h" #include "llfloaterimagepreview.h" -#include "llimfloater.h" +#include "llfloaterimsession.h" #include "llfloaterinspect.h" #include "llfloaterinventory.h" #include "llfloaterjoystick.h" @@ -114,17 +116,18 @@ #include "llfloatertranslationsettings.h" #include "llfloateruipreview.h" #include "llfloatervoiceeffect.h" +#include "llfloatervoicevolume.h" #include "llfloaterwhitelistentry.h" #include "llfloaterwindowsize.h" #include "llfloaterworldmap.h" -#include "llimfloatercontainer.h" +#include "llfloaterimcontainer.h" #include "llinspectavatar.h" #include "llinspectgroup.h" #include "llinspectobject.h" #include "llinspectremoteobject.h" #include "llinspecttoast.h" #include "llmoveview.h" -#include "llnearbychat.h" +#include "llfloaterimnearbychat.h" #include "llpanelblockedlist.h" #include "llpanelclassified.h" #include "llpreviewanim.h" @@ -137,7 +140,6 @@ #include "llscriptfloater.h" #include "llfloatermodelpreview.h" #include "llcommandhandler.h" -#include "llnearbychatbar.h" // *NOTE: Please add files in alphabetical order to keep merges easy. @@ -190,9 +192,10 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>); LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>); - LLFloaterReg::add("chat_bar", "floater_chat_bar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChatBar>); - + LLFloaterReg::add("chat_voice", "floater_voice_chat_volume.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChatVoiceVolume>); + LLFloaterReg::add("nearby_chat", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterIMNearbyChat::buildFloater); LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>); + LLFloaterReg::add("conversation", "floater_conversation_log.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterConversationLog>); LLFloaterReg::add("destinations", "floater_destinations.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDestinations>); @@ -214,8 +217,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("help_browser", "floater_help_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHelpBrowser>); LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHUD>); - LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloater>); - LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloaterContainer>); + LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterIMSession>); + LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterIMContainer>); LLFloaterReg::add("im_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMWellWindow>); LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIncomingCallDialog>); LLFloaterReg::add("inventory", "floater_my_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>); @@ -224,6 +227,7 @@ void LLViewerFloaterReg::registerFloaters() LLInspectGroupUtil::registerFloater(); LLInspectObjectUtil::registerFloater(); LLInspectRemoteObjectUtil::registerFloater(); + LLFloaterVoiceVolumeUtil::registerFloater(); LLNotificationsUI::registerFloater(); LLFloaterDisplayNameUtil::registerFloater(); @@ -268,6 +272,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>); LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterJoystick>); LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewAnim>, "preview"); + LLFloaterReg::add("preview_conversation", "floater_conversation_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterConversationPreview>); LLFloaterReg::add("preview_gesture", "floater_preview_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewGesture>, "preview"); LLFloaterReg::add("preview_notecard", "floater_preview_notecard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewNotecard>, "preview"); LLFloaterReg::add("preview_script", "floater_script_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewLSL>, "preview"); @@ -316,7 +321,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_script", "floater_script_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptPreview>, "upload"); LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload"); - LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>); LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceEffect>); LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp index a179b61cff..a179b61cff 100644..100755 --- a/indra/newview/llviewerfoldertype.cpp +++ b/indra/newview/llviewerfoldertype.cpp diff --git a/indra/newview/llviewergesture.cpp b/indra/newview/llviewergesture.cpp index a32a78cbf9..3f35a5001d 100644 --- a/indra/newview/llviewergesture.cpp +++ b/indra/newview/llviewergesture.cpp @@ -33,6 +33,7 @@ #include "llviewerinventory.h" #include "sound_ids.h" // for testing +#include "llfloaterreg.h" #include "llkeyboard.h" // for key shortcuts for testing #include "llinventorymodel.h" #include "llvoavatar.h" @@ -40,7 +41,7 @@ #include "llviewermessage.h" // send_guid_sound_trigger #include "llviewernetwork.h" #include "llagent.h" -#include "llnearbychatbar.h" +#include "llfloaterimnearbychat.h" // Globals LLViewerGestureList gGestureList; @@ -130,7 +131,8 @@ void LLViewerGesture::doTrigger( BOOL send_chat ) { // Don't play nodding animation, since that might not blend // with the gesture animation. - LLNearbyChatBar::getInstance()->sendChatFromViewer(mOutputString, CHAT_TYPE_NORMAL, FALSE); + (LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))-> + sendChatFromViewer(mOutputString, CHAT_TYPE_NORMAL, FALSE); } } diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index a8a918f259..04c2e27c9d 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -71,12 +71,6 @@ LLHelpHandler gHelpHandler; std::string LLViewerHelp::getURL(const std::string &topic) { - // allow overriding the help server with a local help file - if( gSavedSettings.getBOOL("HelpUseLocal") ) - { - return "__local"; - } - // if the help topic is empty, use the default topic std::string help_topic = topic; if (help_topic.empty()) diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index b47a41c44c..a187318eb7 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1030,12 +1030,7 @@ void CreateGestureCallback::fire(const LLUUID& inv_item) gFloaterView->adjustToFitScreen(preview, FALSE); } -void AddFavoriteLandmarkCallback::fire(const LLUUID& inv_item_id) -{ - if (mTargetLandmarkId.isNull()) return; - gInventory.rearrangeFavoriteLandmarks(inv_item_id, mTargetLandmarkId); -} LLInventoryCallbackManager gInventoryCallbacks; @@ -1308,7 +1303,7 @@ const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably const std::string NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not) // ! REFACTOR ! Really need to refactor this so that it's not a bunch of if-then statements... -void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, const LLSD& userdata, const LLUUID& default_parent_uuid) +void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge, const LLSD& userdata, const LLUUID& default_parent_uuid) { std::string type_name = userdata.asString(); @@ -1332,7 +1327,7 @@ void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, cons LLUUID category = gInventory.createNewCategory(parent_id, preferred_type, LLStringUtil::null); gInventory.notifyObservers(); - root->setSelectionByID(category, TRUE); + panel->setSelectionByID(category, TRUE); } else if ("lsl" == type_name) { @@ -1375,7 +1370,7 @@ void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, cons llwarns << "Can't create unrecognized type " << type_name << llendl; } } - root->setNeedsAutoRename(TRUE); + panel->getRootFolder()->setNeedsAutoRename(TRUE); } LLAssetType::EType LLViewerInventoryItem::getType() const @@ -1449,348 +1444,6 @@ const std::string& LLViewerInventoryItem::getName() const return LLInventoryItem::getName(); } -/** - * Class to store sorting order of favorites landmarks in a local file. EXT-3985. - * It replaced previously implemented solution to store sort index in landmark's name as a "<N>@" prefix. - * Data are stored in user home directory. - */ -class LLFavoritesOrderStorage : public LLSingleton<LLFavoritesOrderStorage> - , public LLDestroyClass<LLFavoritesOrderStorage> -{ - LOG_CLASS(LLFavoritesOrderStorage); -public: - /** - * Sets sort index for specified with LLUUID favorite landmark - */ - void setSortIndex(const LLUUID& inv_item_id, S32 sort_index); - - /** - * Gets sort index for specified with LLUUID favorite landmark - */ - S32 getSortIndex(const LLUUID& inv_item_id); - void removeSortIndex(const LLUUID& inv_item_id); - - void getSLURL(const LLUUID& asset_id); - - /** - * Implementation of LLDestroyClass. Calls cleanup() instance method. - * - * It is important this callback is called before gInventory is cleaned. - * For now it is called from LLAppViewer::cleanup() -> LLAppViewer::disconnectViewer(), - * Inventory is cleaned later from LLAppViewer::cleanup() after LLAppViewer::disconnectViewer() is called. - * @see cleanup() - */ - static void destroyClass(); - - const static S32 NO_INDEX; -private: - friend class LLSingleton<LLFavoritesOrderStorage>; - LLFavoritesOrderStorage() : mIsDirty(false) { load(); } - ~LLFavoritesOrderStorage() { save(); } - - /** - * Removes sort indexes for items which are not in Favorites bar for now. - */ - void cleanup(); - - const static std::string SORTING_DATA_FILE_NAME; - - void load(); - void save(); - - void saveFavoritesSLURLs(); - - // Remove record of current user's favorites from file on disk. - void removeFavoritesRecordOfUser(); - - void onLandmarkLoaded(const LLUUID& asset_id, LLLandmark* landmark); - void storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl); - - typedef std::map<LLUUID, S32> sort_index_map_t; - sort_index_map_t mSortIndexes; - - typedef std::map<LLUUID, std::string> slurls_map_t; - slurls_map_t mSLURLs; - - bool mIsDirty; - - struct IsNotInFavorites - { - IsNotInFavorites(const LLInventoryModel::item_array_t& items) - : mFavoriteItems(items) - { - - } - - /** - * Returns true if specified item is not found among inventory items - */ - bool operator()(const sort_index_map_t::value_type& id_index_pair) const - { - LLPointer<LLViewerInventoryItem> item = gInventory.getItem(id_index_pair.first); - if (item.isNull()) return true; - - LLInventoryModel::item_array_t::const_iterator found_it = - std::find(mFavoriteItems.begin(), mFavoriteItems.end(), item); - - return found_it == mFavoriteItems.end(); - } - private: - LLInventoryModel::item_array_t mFavoriteItems; - }; - -}; - -const std::string LLFavoritesOrderStorage::SORTING_DATA_FILE_NAME = "landmarks_sorting.xml"; -const S32 LLFavoritesOrderStorage::NO_INDEX = -1; - -void LLFavoritesOrderStorage::setSortIndex(const LLUUID& inv_item_id, S32 sort_index) -{ - mSortIndexes[inv_item_id] = sort_index; - mIsDirty = true; -} - -S32 LLFavoritesOrderStorage::getSortIndex(const LLUUID& inv_item_id) -{ - sort_index_map_t::const_iterator it = mSortIndexes.find(inv_item_id); - if (it != mSortIndexes.end()) - { - return it->second; - } - return NO_INDEX; -} - -void LLFavoritesOrderStorage::removeSortIndex(const LLUUID& inv_item_id) -{ - mSortIndexes.erase(inv_item_id); - mIsDirty = true; -} - -void LLFavoritesOrderStorage::getSLURL(const LLUUID& asset_id) -{ - slurls_map_t::iterator slurl_iter = mSLURLs.find(asset_id); - if (slurl_iter != mSLURLs.end()) return; // SLURL for current landmark is already cached - - LLLandmark* lm = gLandmarkList.getAsset(asset_id, - boost::bind(&LLFavoritesOrderStorage::onLandmarkLoaded, this, asset_id, _1)); - if (lm) - { - onLandmarkLoaded(asset_id, lm); - } -} - -// static -void LLFavoritesOrderStorage::destroyClass() -{ - LLFavoritesOrderStorage::instance().cleanup(); - if (gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin")) - { - LLFavoritesOrderStorage::instance().saveFavoritesSLURLs(); - } - else - { - LLFavoritesOrderStorage::instance().removeFavoritesRecordOfUser(); - } -} - -void LLFavoritesOrderStorage::load() -{ - // load per-resident sorting information - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); - - 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) - { - mSortIndexes.insert(std::make_pair(LLUUID(iter->first), (S32)iter->second.asInteger())); - } -} - -void LLFavoritesOrderStorage::saveFavoritesSLURLs() -{ - // Do not change the file if we are not logged in yet. - if (!LLLoginInstance::getInstance()->authSuccess()) - { - llwarns << "Cannot save favorites: not logged in" << llendl; - return; - } - - std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); - if (user_dir.empty()) - { - llwarns << "Cannot save favorites: empty user dir name" << llendl; - return; - } - - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); - llifstream in_file; - in_file.open(filename); - LLSD fav_llsd; - if (in_file.is_open()) - { - LLSDSerialize::fromXML(fav_llsd, in_file); - } - - const LLUUID fav_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); - - LLSD user_llsd; - for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++) - { - LLSD value; - value["name"] = (*it)->getName(); - value["asset_id"] = (*it)->getAssetUUID(); - - slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]); - if (slurl_iter != mSLURLs.end()) - { - lldebugs << "Saving favorite: idx=" << (*it)->getSortField() << ", SLURL=" << slurl_iter->second << ", value=" << value << llendl; - value["slurl"] = slurl_iter->second; - user_llsd[(*it)->getSortField()] = value; - } - else - { - llwarns << "Not saving favorite " << value["name"] << ": no matching SLURL" << llendl; - } - } - - LLAvatarName av_name; - LLAvatarNameCache::get( gAgentID, &av_name ); - lldebugs << "Saved favorites for " << av_name.getLegacyName() << llendl; - fav_llsd[av_name.getLegacyName()] = user_llsd; - - llofstream file; - file.open(filename); - LLSDSerialize::toPrettyXML(fav_llsd, file); -} - -void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() -{ - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); - LLSD fav_llsd; - llifstream file; - file.open(filename); - if (!file.is_open()) return; - LLSDSerialize::fromXML(fav_llsd, file); - - LLAvatarName av_name; - LLAvatarNameCache::get( gAgentID, &av_name ); - lldebugs << "Removed favorites for " << av_name.getLegacyName() << llendl; - if (fav_llsd.has(av_name.getLegacyName())) - { - fav_llsd.erase(av_name.getLegacyName()); - } - - llofstream out_file; - out_file.open(filename); - LLSDSerialize::toPrettyXML(fav_llsd, out_file); - -} - -void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmark* landmark) -{ - if (!landmark) return; - - LLVector3d pos_global; - if (!landmark->getGlobalPos(pos_global)) - { - // If global position was unknown on first getGlobalPos() call - // it should be set for the subsequent calls. - landmark->getGlobalPos(pos_global); - } - - if (!pos_global.isExactlyZero()) - { - LLLandmarkActions::getSLURLfromPosGlobal(pos_global, - boost::bind(&LLFavoritesOrderStorage::storeFavoriteSLURL, this, asset_id, _1)); - } -} - -void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl) -{ - lldebugs << "Saving landmark SLURL: " << slurl << llendl; - mSLURLs[asset_id] = slurl; -} - -void LLFavoritesOrderStorage::save() -{ - // nothing to save if clean - if (!mIsDirty) return; - - // If we quit from the login screen we will not have an SL account - // name. Don't try to save, otherwise we'll dump a file in - // C:\Program Files\SecondLife\ or similar. JC - std::string user_dir = gDirUtilp->getLindenUserDir(); - if (!user_dir.empty()) - { - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); - LLSD settings_llsd; - - for(sort_index_map_t::const_iterator iter = mSortIndexes.begin(); iter != mSortIndexes.end(); ++iter) - { - settings_llsd[iter->first.asString()] = iter->second; - } - - llofstream file; - file.open(filename); - LLSDSerialize::toPrettyXML(settings_llsd, file); - } -} - -void LLFavoritesOrderStorage::cleanup() -{ - // nothing to clean - if (!mIsDirty) return; - - const LLUUID fav_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); - - IsNotInFavorites is_not_in_fav(items); - - sort_index_map_t aTempMap; - //copy unremoved values from mSortIndexes to aTempMap - std::remove_copy_if(mSortIndexes.begin(), mSortIndexes.end(), - inserter(aTempMap, aTempMap.begin()), - is_not_in_fav); - - //Swap the contents of mSortIndexes and aTempMap - mSortIndexes.swap(aTempMap); -} - - -S32 LLViewerInventoryItem::getSortField() const -{ - return LLFavoritesOrderStorage::instance().getSortIndex(mUUID); -} - -void LLViewerInventoryItem::setSortField(S32 sortField) -{ - LLFavoritesOrderStorage::instance().setSortIndex(mUUID, sortField); - getSLURL(); -} - -void LLViewerInventoryItem::getSLURL() -{ - LLFavoritesOrderStorage::instance().getSLURL(mAssetUUID); -} - -const LLPermissions& LLViewerInventoryItem::getPermissions() const -{ - // Use the actual permissions of the symlink, not its parent. - return LLInventoryItem::getPermissions(); -} - const LLUUID& LLViewerInventoryItem::getCreatorUUID() const { if (const LLViewerInventoryItem *linked_item = getLinkedItem()) @@ -1861,17 +1514,6 @@ LLWearableType::EType LLViewerInventoryItem::getWearableType() const return LLWearableType::EType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK); } - -time_t LLViewerInventoryItem::getCreationDate() const -{ - return LLInventoryItem::getCreationDate(); -} - -U32 LLViewerInventoryItem::getCRC32() const -{ - return LLInventoryItem::getCRC32(); -} - // *TODO: mantipov: should be removed with LMSortPrefix patch in llinventorymodel.cpp, EXT-3985 static char getSeparator() { return '@'; } BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName) diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 7822ef4da6..3cf03c3bc5 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -34,7 +34,7 @@ #include <boost/signals2.hpp> // boost::signals2::trackable -class LLFolderView; +class LLInventoryPanel; class LLFolderBridge; class LLViewerInventoryCategory; @@ -60,10 +60,6 @@ public: virtual const LLUUID& getAssetUUID() const; virtual const LLUUID& getProtectedAssetUUID() const; // returns LLUUID::null if current agent does not have permission to expose this asset's UUID to the user virtual const std::string& getName() const; - virtual S32 getSortField() const; - virtual void setSortField(S32 sortField); - virtual void getSLURL(); //Caches SLURL for landmark. //*TODO: Find a better way to do it and remove this method from here. - virtual const LLPermissions& getPermissions() const; virtual const bool getIsFullPerm() const; // 'fullperm' in the popular sense: modify-ok & copy-ok & transfer-ok, no special god rules applied virtual const LLUUID& getCreatorUUID() const; virtual const std::string& getDescription() const; @@ -72,8 +68,11 @@ public: virtual bool isWearableType() const; virtual LLWearableType::EType getWearableType() const; virtual U32 getFlags() const; - virtual time_t getCreationDate() const; - virtual U32 getCRC32() const; // really more of a checksum. + + using LLInventoryItem::getPermissions; + using LLInventoryItem::getCreationDate; + using LLInventoryItem::setCreationDate; + using LLInventoryItem::getCRC32; static BOOL extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName); @@ -285,18 +284,6 @@ public: void fire(const LLUUID& inv_item); }; -class AddFavoriteLandmarkCallback : public LLInventoryCallback -{ -public: - AddFavoriteLandmarkCallback() : mTargetLandmarkId(LLUUID::null) {} - void setTargetLandmarkId(const LLUUID& target_uuid) { mTargetLandmarkId = target_uuid; } - -private: - void fire(const LLUUID& inv_item); - - LLUUID mTargetLandmarkId; -}; - // misc functions //void inventory_reliable_callback(void**, S32 status); @@ -372,7 +359,7 @@ void copy_inventory_from_notecard(const LLUUID& destination_id, U32 callback_id = 0); -void menu_create_inventory_item(LLFolderView* root, +void menu_create_inventory_item(LLInventoryPanel* root, LLFolderBridge* bridge, const LLSD& userdata, const LLUUID& default_parent_uuid = LLUUID::null); diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index f029ae5302..5d1aa870a3 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -729,8 +729,10 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_w F32* vw = (F32*) vertex_weightsp.get(); F32* cw = (F32*) clothing_weightsp.get(); - LLVector4a::memcpyNonAliased16(tc, (F32*) mMesh->getTexCoords(), num_verts*2*sizeof(F32)); - LLVector4a::memcpyNonAliased16(vw, (F32*) mMesh->getWeights(), num_verts*sizeof(F32)); + S32 tc_size = (num_verts*2*sizeof(F32)+0xF) & ~0xF; + LLVector4a::memcpyNonAliased16(tc, (F32*) mMesh->getTexCoords(), tc_size); + S32 vw_size = (num_verts*sizeof(F32)+0xF) & ~0xF; + LLVector4a::memcpyNonAliased16(vw, (F32*) mMesh->getWeights(), vw_size); LLVector4a::memcpyNonAliased16(cw, (F32*) mMesh->getClothingWeights(), num_verts*4*sizeof(F32)); } diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index 1aa9fd8a45..4ecdc31e21 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -27,11 +27,12 @@ #include "llviewerprecompiledheaders.h" #include "llappviewer.h" +#include "llfloaterreg.h" #include "llviewerkeyboard.h" #include "llmath.h" #include "llagent.h" #include "llagentcamera.h" -#include "llnearbychatbar.h" +#include "llfloaterimnearbychat.h" #include "llviewercontrol.h" #include "llfocusmgr.h" #include "llmorphview.h" @@ -534,7 +535,7 @@ void stop_moving( EKeystate s ) void start_chat( EKeystate s ) { // start chat - LLNearbyChatBar::startChat(NULL); + LLFloaterIMNearbyChat::startChat(NULL); } void start_gesture( EKeystate s ) @@ -543,15 +544,15 @@ void start_gesture( EKeystate s ) if (KEYSTATE_UP == s && ! (focus_ctrlp && focus_ctrlp->acceptsTextInput())) { - if (LLNearbyChatBar::getInstance()->getCurrentChat().empty()) + if ((LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))->getCurrentChat().empty()) { // No existing chat in chat editor, insert '/' - LLNearbyChatBar::startChat("/"); + LLFloaterIMNearbyChat::startChat("/"); } else { // Don't overwrite existing text in chat editor - LLNearbyChatBar::startChat(NULL); + LLFloaterIMNearbyChat::startChat(NULL); } } } diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 1eb4bedfaf..2df028de69 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -316,9 +316,13 @@ public: /* virtual */ void completedHeader(U32 status, const std::string& reason, const LLSD& content) { LL_WARNS("MediaAuth") << "status = " << status << ", reason = " << reason << LL_ENDL; - LL_WARNS("MediaAuth") << content << LL_ENDL; + + LLSD stripped_content = content; + stripped_content.erase("set-cookie"); + LL_WARNS("MediaAuth") << stripped_content << LL_ENDL; std::string cookie = content["set-cookie"].asString(); + LL_DEBUGS("MediaAuth") << "cookie = " << cookie << LL_ENDL; LLViewerMedia::getCookieStore()->setCookiesFromHost(cookie, mHost); @@ -1184,12 +1188,9 @@ void LLViewerMedia::clearAllCookies() LLDirIterator dir_iter(base_dir, "*_*"); while (dir_iter.next(filename)) { - target = base_dir; - target += filename; - target += gDirUtilp->getDirDelimiter(); - target += "browser_profile"; - target += gDirUtilp->getDirDelimiter(); - target += "cookies"; + target = gDirUtilp->add(base_dir, filename); + gDirUtilp->append(target, "browser_profile"); + gDirUtilp->append(target, "cookies"); lldebugs << "target = " << target << llendl; if(LLFile::isfile(target)) { @@ -1197,10 +1198,8 @@ void LLViewerMedia::clearAllCookies() } // Other accounts may have new-style cookie files too -- delete them as well - target = base_dir; - target += filename; - target += gDirUtilp->getDirDelimiter(); - target += PLUGIN_COOKIE_FILE_NAME; + target = gDirUtilp->add(base_dir, filename); + gDirUtilp->append(target, PLUGIN_COOKIE_FILE_NAME); lldebugs << "target = " << target << llendl; if(LLFile::isfile(target)) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d11e7e32c7..66db0ac8f3 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -59,6 +59,7 @@ #include "llbuycurrencyhtml.h" #include "llfloatergodtools.h" #include "llfloaterinventory.h" +#include "llfloaterimcontainer.h" #include "llfloaterland.h" #include "llfloaterpathfindingcharacters.h" #include "llfloaterpathfindinglinksets.h" @@ -83,6 +84,7 @@ #include "llinventoryfunctions.h" #include "llpanellogin.h" #include "llpanelblockedlist.h" +#include "llmenuoptionpathfindingrebakenavmesh.h" #include "llmoveview.h" #include "llparcel.h" #include "llrootview.h" @@ -106,6 +108,7 @@ #include "llviewerparcelmgr.h" #include "llviewerstats.h" #include "llvoavatarself.h" +#include "llvoicevivox.h" #include "llworldmap.h" #include "pipeline.h" #include "llviewerjoystick.h" @@ -165,7 +168,6 @@ LLContextMenu *gMenuAttachmentSelf = NULL; LLContextMenu *gMenuAttachmentOther = NULL; LLContextMenu *gMenuLand = NULL; -const std::string SAVE_INTO_INVENTORY("Save Object Back to My Inventory"); const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents"); LLMenuGL* gAttachSubMenu = NULL; @@ -178,9 +180,6 @@ LLContextMenu* gDetachPieMenu = NULL; LLContextMenu* gDetachScreenPieMenu = NULL; LLContextMenu* gDetachBodyPartPieMenus[8]; -LLMenuItemCallGL* gAFKMenu = NULL; -LLMenuItemCallGL* gBusyMenu = NULL; - // // Local prototypes @@ -310,7 +309,6 @@ void handle_grab_baked_texture(void*); BOOL enable_grab_baked_texture(void*); void handle_dump_region_object_cache(void*); -BOOL enable_save_into_inventory(void*); BOOL enable_save_into_task_inventory(void*); BOOL enable_detach(const LLSD& = LLSD()); @@ -341,7 +339,8 @@ LLMenuParcelObserver::~LLMenuParcelObserver() void LLMenuParcelObserver::changed() { - gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL)); + LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(); + gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID()== gAgent.getID())); BOOL buyable = enable_buy_land(NULL); gMenuHolder->childSetEnabled("Land Buy", buyable); @@ -470,8 +469,6 @@ void init_menus() gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", upload_cost); gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", upload_cost); - gAFKMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Away", TRUE); - gBusyMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Busy", TRUE); gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE); gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE); @@ -1316,22 +1313,6 @@ class LLAdvancedPrintAgentInfo : public view_listener_t } }; - - -//////////////////////////////// -// PRINT TEXTURE MEMORY STATS // -//////////////////////////////// - - -class LLAdvancedPrintTextureMemoryStats : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - output_statistics(NULL); - return true; - } -}; - ////////////////// // DEBUG CLICKS // ////////////////// @@ -1655,6 +1636,54 @@ class LLAdvancedForceParamsToDefault : public view_listener_t }; +////////////////////////// +// ANIMATION SPEED // +////////////////////////// + +// Utility function to set all AV time factors to the same global value +static void set_all_animation_time_factors(F32 time_factor) +{ + LLMotionController::setCurrentTimeFactor(time_factor); + for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); + iter != LLCharacter::sInstances.end(); ++iter) + { + (*iter)->setAnimTimeFactor(time_factor); + } +} + +class LLAdvancedAnimTenFaster : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + //llinfos << "LLAdvancedAnimTenFaster" << llendl; + F32 time_factor = LLMotionController::getCurrentTimeFactor(); + time_factor = llmin(time_factor + 0.1f, 2.f); // Upper limit is 200% speed + set_all_animation_time_factors(time_factor); + return true; + } +}; + +class LLAdvancedAnimTenSlower : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + //llinfos << "LLAdvancedAnimTenSlower" << llendl; + F32 time_factor = LLMotionController::getCurrentTimeFactor(); + time_factor = llmax(time_factor - 0.1f, 0.1f); // Lower limit is at 10% of normal speed + set_all_animation_time_factors(time_factor); + return true; + } +}; + +class LLAdvancedAnimResetAll : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + set_all_animation_time_factors(1.f); + return true; + } +}; + ////////////////////////// // RELOAD VERTEX SHADER // @@ -3263,15 +3292,6 @@ bool enable_freeze_eject(const LLSD& avatar_id) return new_value; } - -void login_done(S32 which, void *user) -{ - llinfos << "Login done " << which << llendl; - - LLPanelLogin::closePanel(); -} - - bool callback_leave_group(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -3463,6 +3483,20 @@ bool enable_sitdown_self() return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying(); } +class LLCheckPanelPeopleTab : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string panel_name = userdata.asString(); + + LLPanel *panel = LLFloaterSidePanelContainer::getPanel("people", panel_name); + if(panel && panel->isInVisibleChain()) + { + return true; + } + return false; + } +}; // Toggle one of "People" panel tabs in side tray. class LLTogglePanelPeopleTab : public view_listener_t { @@ -3475,7 +3509,8 @@ class LLTogglePanelPeopleTab : public view_listener_t if ( panel_name == "friends_panel" || panel_name == "groups_panel" - || panel_name == "nearby_panel") + || panel_name == "nearby_panel" + || panel_name == "blocked_panel") { return togglePeoplePanel(panel_name, param); } @@ -3911,25 +3946,27 @@ class LLViewToggleUI : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLNotification::Params params("ConfirmHideUI"); - params.functor.function(boost::bind(&LLViewToggleUI::confirm, this, _1, _2)); - LLSD substitutions; + if(gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) + { + LLNotification::Params params("ConfirmHideUI"); + params.functor.function(boost::bind(&LLViewToggleUI::confirm, this, _1, _2)); + LLSD substitutions; #if LL_DARWIN - substitutions["SHORTCUT"] = "Cmd+Shift+U"; + substitutions["SHORTCUT"] = "Cmd+Shift+U"; #else - substitutions["SHORTCUT"] = "Ctrl+Shift+U"; + substitutions["SHORTCUT"] = "Ctrl+Shift+U"; #endif - params.substitutions = substitutions; - if (gViewerWindow->getUIVisibility()) - { - // hiding, so show notification - LLNotifications::instance().add(params); - } - else - { - LLNotifications::instance().forceResponse(params, 0); + params.substitutions = substitutions; + if (!gSavedSettings.getBOOL("HideUIControls")) + { + // hiding, so show notification + LLNotifications::instance().add(params); + } + else + { + LLNotifications::instance().forceResponse(params, 0); + } } - return true; } @@ -3939,7 +3976,9 @@ class LLViewToggleUI : public view_listener_t if (option == 0) // OK { - gViewerWindow->setUIVisibility(!gViewerWindow->getUIVisibility()); + gViewerWindow->setUIVisibility(gSavedSettings.getBOOL("HideUIControls")); + LLPanelStandStopFlying::getInstance()->setVisible(gSavedSettings.getBOOL("HideUIControls")); + gSavedSettings.setBOOL("HideUIControls",!gSavedSettings.getBOOL("HideUIControls")); } } }; @@ -4834,18 +4873,6 @@ BOOL sitting_on_selection() return (gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == root_object); } -class LLToolsSaveToInventory : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - if(enable_save_into_inventory(NULL)) - { - derez_objects(DRD_SAVE_INTO_AGENT_INVENTORY, LLUUID::null); - } - return true; - } -}; - class LLToolsSaveToObjectInventory : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -4876,6 +4903,37 @@ class LLToolsEnablePathfindingView : public view_listener_t } }; +class LLToolsDoPathfindingRebakeRegion : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + bool hasPathfinding = (LLPathfindingManager::getInstance() != NULL); + + if (hasPathfinding) + { + LLMenuOptionPathfindingRebakeNavmesh::getInstance()->sendRequestRebakeNavmesh(); + } + + return hasPathfinding; + } +}; + +class LLToolsEnablePathfindingRebakeRegion : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + bool returnValue = false; + + if (LLPathfindingManager::getInstance() != NULL) + { + LLMenuOptionPathfindingRebakeNavmesh *rebakeInstance = LLMenuOptionPathfindingRebakeNavmesh::getInstance(); + returnValue = (rebakeInstance->canRebakeRegion() && + (rebakeInstance->getMode() == LLMenuOptionPathfindingRebakeNavmesh::kRebakeNavMesh_Available)); + } + return returnValue; + } +}; + // Round the position of all root objects to the grid class LLToolsSnapObjectXY : public view_listener_t { @@ -5499,16 +5557,6 @@ void toggle_debug_menus(void*) // gExportDialog = LLUploadDialog::modalUploadDialog("Exporting selected objects..."); // } // - -class LLCommunicateBlockList : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD()); - return true; - } -}; - class LLWorldSetHomeLocation : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -5582,18 +5630,18 @@ class LLWorldSetAway : public view_listener_t } }; -class LLWorldSetBusy : public view_listener_t +class LLWorldSetDoNotDisturb : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if (gAgent.getBusy()) + if (gAgent.isDoNotDisturb()) { - gAgent.clearBusy(); + gAgent.setDoNotDisturb(false); } else { - gAgent.setBusy(); - LLNotificationsUtil::add("BusyModeSet"); + gAgent.setDoNotDisturb(true); + LLNotificationsUtil::add("DoNotDisturbModeSet"); } return true; } @@ -5755,7 +5803,7 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { - gAgent.clearBusy(); + gAgent.setDoNotDisturb(false); } LLViewerObject* objectp = selection->getPrimaryObject(); @@ -5788,12 +5836,12 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec void handle_give_money_dialog() { - LLNotification::Params params("BusyModePay"); + LLNotification::Params params("DoNotDisturbModePay"); params.functor.function(boost::bind(complete_give_money, _1, _2, LLSelectMgr::getInstance()->getSelection())); - if (gAgent.getBusy()) + if (gAgent.isDoNotDisturb()) { - // warn users of being in busy mode during a transaction + // warn users of being in do not disturb mode during a transaction LLNotifications::instance().add(params); } else @@ -7107,50 +7155,6 @@ bool LLHasAsset::operator()(LLInventoryCategory* cat, return FALSE; } -BOOL enable_save_into_inventory(void*) -{ - // *TODO: clean this up - // find the last root - LLSelectNode* last_node = NULL; - for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin(); - iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++) - { - last_node = *iter; - } - -#ifdef HACKED_GODLIKE_VIEWER - return TRUE; -#else -# ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLGridManager::getInstance()->isInProductionGrid() - && gAgent.isGodlike()) - { - return TRUE; - } -# endif - // check all pre-req's for save into inventory. - if(last_node && last_node->mValid && !last_node->mItemID.isNull() - && (last_node->mPermissions->getOwner() == gAgent.getID()) - && (gInventory.getItem(last_node->mItemID) != NULL)) - { - LLViewerObject* obj = last_node->getObject(); - if( obj && !obj->isAttachment() ) - { - return TRUE; - } - } - return FALSE; -#endif -} - -class LLToolsEnableSaveToInventory : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - bool new_value = enable_save_into_inventory(NULL); - return new_value; - } -}; BOOL enable_save_into_task_inventory(void*) { @@ -7532,6 +7536,7 @@ class LLToolsUseSelectionForGrid : public view_listener_t } func; LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func); LLSelectMgr::getInstance()->setGridMode(GRID_MODE_REF_OBJECT); + LLFloaterTools::setGridMode((S32)GRID_MODE_REF_OBJECT); return true; } }; @@ -7608,6 +7613,20 @@ void handle_web_content_test(const LLSD& param) LLWeb::loadURLInternal(url); } +void handle_show_url(const LLSD& param) +{ + std::string url = param.asString(); + if(gSavedSettings.getBOOL("UseExternalBrowser")) + { + LLWeb::loadURLExternal(url); + } + else + { + LLWeb::loadURLInternal(url); + } + +} + void handle_buy_currency_test(void*) { std::string url = @@ -7861,6 +7880,22 @@ class LLViewCheckRenderType : public view_listener_t } }; +class LLViewStatusAway : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return (gAgent.isInitialized() && gAgent.getAFK()); + } +}; + +class LLViewStatusDoNotDisturb : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return (gAgent.isInitialized() && gAgent.isDoNotDisturb()); + } +}; + class LLViewShowHUDAttachments : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -8087,11 +8122,7 @@ class LLWorldPostProcess : public view_listener_t void handle_flush_name_caches() { - // Toggle display names on and off to flush - bool use_display_names = LLAvatarNameCache::useDisplayNames(); - LLAvatarNameCache::setUseDisplayNames(!use_display_names); - LLAvatarNameCache::setUseDisplayNames(use_display_names); - + LLAvatarNameCache::cleanupClass(); if (gCacheName) gCacheName->clear(); } @@ -8116,6 +8147,11 @@ public: } }; +void handle_voice_morphing_subscribe() +{ + LLWeb::loadURLExternal(LLTrans::getString("voice_morphing_url")); +} + class LLToggleUIHints : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -8249,6 +8285,7 @@ void initialize_menus() commit.add("Inventory.NewWindow", boost::bind(&LLFloaterInventory::showAgentInventory)); + enable.add("Conversation.IsConversationLoggingAllowed", boost::bind(&LLFloaterIMContainer::isConversationLoggingAllowed)); // Agent commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying)); @@ -8294,14 +8331,21 @@ void initialize_menus() view_listener_t::addMenu(new LLViewCheckShowHoverTips(), "View.CheckShowHoverTips"); view_listener_t::addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); view_listener_t::addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); + view_listener_t::addMenu(new LLViewStatusAway(), "View.Status.CheckAway"); + view_listener_t::addMenu(new LLViewStatusDoNotDisturb(), "View.Status.CheckDoNotDisturb"); view_listener_t::addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); - + // Me > Movement view_listener_t::addMenu(new LLAdvancedAgentFlyingInfo(), "Agent.getFlying"); - - // Communicate - view_listener_t::addMenu(new LLCommunicateBlockList(), "Communicate.BlockList"); - + + // Communicate > Voice morphing > Subscribe... + commit.add("Communicate.VoiceMorphing.Subscribe", boost::bind(&handle_voice_morphing_subscribe)); + LLVivoxVoiceClient * voice_clientp = LLVivoxVoiceClient::getInstance(); + enable.add("Communicate.VoiceMorphing.NoVoiceMorphing.Check" + , boost::bind(&LLVivoxVoiceClient::onCheckVoiceEffect, voice_clientp, "NoVoiceMorphing")); + commit.add("Communicate.VoiceMorphing.NoVoiceMorphing.Click" + , boost::bind(&LLVivoxVoiceClient::onClickVoiceEffect, voice_clientp, "NoVoiceMorphing")); + // World menu view_listener_t::addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun"); view_listener_t::addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark"); @@ -8309,7 +8353,7 @@ void initialize_menus() view_listener_t::addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation"); view_listener_t::addMenu(new LLWorldTeleportHome(), "World.TeleportHome"); view_listener_t::addMenu(new LLWorldSetAway(), "World.SetAway"); - view_listener_t::addMenu(new LLWorldSetBusy(), "World.SetBusy"); + view_listener_t::addMenu(new LLWorldSetDoNotDisturb(), "World.SetDoNotDisturb"); view_listener_t::addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark"); view_listener_t::addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation"); @@ -8342,7 +8386,6 @@ void initialize_menus() commit.add("Tools.LookAtSelection", boost::bind(&handle_look_at_selection, _2)); commit.add("Tools.BuyOrTake", boost::bind(&handle_buy_or_take)); commit.add("Tools.TakeCopy", boost::bind(&handle_take_copy)); - view_listener_t::addMenu(new LLToolsSaveToInventory(), "Tools.SaveToInventory"); view_listener_t::addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory"); view_listener_t::addMenu(new LLToolsSelectedScriptAction(), "Tools.SelectedScriptAction"); @@ -8354,11 +8397,12 @@ void initialize_menus() enable.add("Tools.EnableTakeCopy", boost::bind(&enable_object_take_copy)); enable.add("Tools.VisibleBuyObject", boost::bind(&tools_visible_buy_object)); enable.add("Tools.VisibleTakeObject", boost::bind(&tools_visible_take_object)); - view_listener_t::addMenu(new LLToolsEnableSaveToInventory(), "Tools.EnableSaveToInventory"); view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); view_listener_t::addMenu(new LLToolsEnablePathfinding(), "Tools.EnablePathfinding"); view_listener_t::addMenu(new LLToolsEnablePathfindingView(), "Tools.EnablePathfindingView"); + view_listener_t::addMenu(new LLToolsDoPathfindingRebakeRegion(), "Tools.DoPathfindingRebakeRegion"); + view_listener_t::addMenu(new LLToolsEnablePathfindingRebakeRegion(), "Tools.EnablePathfindingRebakeRegion"); // Help menu // most items use the ShowFloater method @@ -8425,6 +8469,7 @@ void initialize_menus() // Advanced > UI commit.add("Advanced.WebBrowserTest", boost::bind(&handle_web_browser_test, _2)); // sigh! this one opens the MEDIA browser commit.add("Advanced.WebContentTest", boost::bind(&handle_web_content_test, _2)); // this one opens the Web Content floater + commit.add("Advanced.ShowURL", boost::bind(&handle_show_url, _2)); view_listener_t::addMenu(new LLAdvancedBuyCurrencyTest(), "Advanced.BuyCurrencyTest"); view_listener_t::addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr"); view_listener_t::addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory"); @@ -8432,7 +8477,6 @@ void initialize_menus() commit.add("Advanced.DumpFocusHolder", boost::bind(&handle_dump_focus) ); view_listener_t::addMenu(new LLAdvancedPrintSelectedObjectInfo(), "Advanced.PrintSelectedObjectInfo"); view_listener_t::addMenu(new LLAdvancedPrintAgentInfo(), "Advanced.PrintAgentInfo"); - view_listener_t::addMenu(new LLAdvancedPrintTextureMemoryStats(), "Advanced.PrintTextureMemoryStats"); view_listener_t::addMenu(new LLAdvancedToggleDebugClicks(), "Advanced.ToggleDebugClicks"); view_listener_t::addMenu(new LLAdvancedCheckDebugClicks(), "Advanced.CheckDebugClicks"); view_listener_t::addMenu(new LLAdvancedCheckDebugViews(), "Advanced.CheckDebugViews"); @@ -8464,6 +8508,11 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedTestMale(), "Advanced.TestMale"); view_listener_t::addMenu(new LLAdvancedTestFemale(), "Advanced.TestFemale"); + // Advanced > Character > Animation Speed + view_listener_t::addMenu(new LLAdvancedAnimTenFaster(), "Advanced.AnimTenFaster"); + view_listener_t::addMenu(new LLAdvancedAnimTenSlower(), "Advanced.AnimTenSlower"); + view_listener_t::addMenu(new LLAdvancedAnimResetAll(), "Advanced.AnimResetAll"); + // Advanced > Character (toplevel) view_listener_t::addMenu(new LLAdvancedForceParamsToDefault(), "Advanced.ForceParamsToDefault"); view_listener_t::addMenu(new LLAdvancedReloadVertexShader(), "Advanced.ReloadVertexShader"); @@ -8551,6 +8600,7 @@ void initialize_menus() // we don't use boost::bind directly to delay side tray construction view_listener_t::addMenu( new LLTogglePanelPeopleTab(), "SideTray.PanelPeopleTab"); + view_listener_t::addMenu( new LLCheckPanelPeopleTab(), "SideTray.CheckPanelPeopleTab"); // Avatar pie menu view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute"); diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 3515aa4302..01534503f3 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -27,7 +27,7 @@ #ifndef LL_LLVIEWERMENU_H #define LL_LLVIEWERMENU_H -#include "llmenugl.h" +#include "../llui/llmenugl.h" #include "llsafehandle.h" class LLMessageSystem; @@ -49,7 +49,6 @@ void show_context_menu( S32 x, S32 y, MASK mask ); void show_build_mode_context_menu(S32 x, S32 y, MASK mask); void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y); void show_topinfobar_context_menu(LLView* ctrl, S32 x, S32 y); -BOOL enable_save_into_inventory(void*); void handle_reset_view(); void handle_cut(void*); void handle_copy(void*); @@ -159,8 +158,6 @@ protected: LLSafeHandle<LLObjectSelection> mObjectSelection; }; -extern const std::string SAVE_INTO_INVENTORY; - extern LLMenuBarGL* gMenuBarView; //extern LLView* gMenuBarHolder; extern LLMenuGL* gEditMenu; @@ -187,8 +184,6 @@ extern LLContextMenu* gDetachPieMenu; extern LLContextMenu* gAttachBodyPartPieMenus[8]; extern LLContextMenu* gDetachBodyPartPieMenus[8]; -extern LLMenuItemCallGL* gAFKMenu; -extern LLMenuItemCallGL* gBusyMenu; extern LLMenuItemCallGL* gMutePieMenu; extern LLMenuItemCallGL* gMuteObjectPieMenu; extern LLMenuItemCallGL* gBuyPassPieMenu; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index dc2ea4bd1f..be78603e2d 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -34,6 +34,7 @@ #include "llfilepicker.h" #include "llfloaterreg.h" #include "llbuycurrencyhtml.h" +#include "llfloatermap.h" #include "llfloatermodelpreview.h" #include "llfloatersnapshot.h" #include "llimage.h" @@ -475,7 +476,7 @@ class LLFileEnableCloseWindow : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = NULL != LLFloater::getClosableFloaterFromFocus(); + bool new_value = NULL != gFloaterView->getFrontmostClosableFloater(); return new_value; } }; @@ -484,8 +485,7 @@ class LLFileCloseWindow : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLFloater::closeFocusedFloater(); - + LLFloater::closeFrontmostFloater(); return true; } }; @@ -494,7 +494,7 @@ class LLFileEnableCloseAllWindows : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool open_children = gFloaterView->allChildrenClosed(); + bool open_children = gFloaterView->allChildrenClosed() && !LLFloaterSnapshot::getInstance()->isInVisibleChain(); return !open_children; } }; @@ -505,7 +505,7 @@ class LLFileCloseAllWindows : public view_listener_t { bool app_quitting = false; gFloaterView->closeAllChildren(app_quitting); - + LLFloaterSnapshot::getInstance()->closeFloater(app_quitting); return true; } }; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7d7d1f3047..a13c793899 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -65,10 +65,11 @@ #include "llfloatersnapshot.h" #include "llhudeffecttrail.h" #include "llhudmanager.h" +#include "llimview.h" #include "llinventoryfunctions.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" -#include "llnearbychat.h" +#include "llfloaterimnearbychat.h" #include "llnotifications.h" #include "llnotificationsutil.h" #include "llpanelgrouplandmoney.h" @@ -120,6 +121,8 @@ #pragma warning (disable:4702) #endif +extern void on_new_message(const LLSD& msg); + // // Constants // @@ -134,6 +137,7 @@ static const U32 LLREQUEST_PERMISSION_THROTTLE_LIMIT = 5; // requests static const F32 LLREQUEST_PERMISSION_THROTTLE_INTERVAL = 10.0f; // seconds extern BOOL gDebugClicks; +extern bool gShiftFrame; // function prototypes bool check_offer_throttle(const std::string& from_name, bool check_only); @@ -183,78 +187,82 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLMessageSystem* msg = gMessageSystem; const LLSD& payload = notification["payload"]; - - // add friend to recent people list - LLRecentPeople::instance().add(payload["from_id"]); - - switch(option) - { - case 0: - { - // accept - LLAvatarTracker::formFriendship(payload["from_id"]); - - const LLUUID fid = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); - - // This will also trigger an onlinenotification if the user is online - msg->newMessageFast(_PREHASH_AcceptFriendship); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_TransactionBlock); - msg->addUUIDFast(_PREHASH_TransactionID, payload["session_id"]); - msg->nextBlockFast(_PREHASH_FolderData); - msg->addUUIDFast(_PREHASH_FolderID, fid); - msg->sendReliable(LLHost(payload["sender"].asString())); - - LLSD payload = notification["payload"]; - payload["SUPPRESS_TOAST"] = true; - LLNotificationsUtil::add("FriendshipAcceptedByMe", - notification["substitutions"], payload); - break; - } - case 1: // Decline - { - LLSD payload = notification["payload"]; - payload["SUPPRESS_TOAST"] = true; - LLNotificationsUtil::add("FriendshipDeclinedByMe", - notification["substitutions"], payload); - } - // fall-through - case 2: // Send IM - decline and start IM session - { - // decline - // We no longer notify other viewers, but we DO still send - // the rejection to the simulator to delete the pending userop. - msg->newMessageFast(_PREHASH_DeclineFriendship); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_TransactionBlock); - msg->addUUIDFast(_PREHASH_TransactionID, payload["session_id"]); - msg->sendReliable(LLHost(payload["sender"].asString())); - - // start IM session - if(2 == option) - { - LLAvatarActions::startIM(payload["from_id"].asUUID()); - } - } - default: - // close button probably, possibly timed out - break; - } + LLNotificationPtr notification_ptr = LLNotifications::instance().find(notification["id"].asUUID()); + + // this will be skipped if the user offering friendship is blocked + if (notification_ptr) + { + // add friend to recent people list + LLRecentPeople::instance().add(payload["from_id"]); + + switch(option) + { + case 0: + { + // accept + LLAvatarTracker::formFriendship(payload["from_id"]); + + const LLUUID fid = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); + + // This will also trigger an onlinenotification if the user is online + msg->newMessageFast(_PREHASH_AcceptFriendship); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_TransactionBlock); + msg->addUUIDFast(_PREHASH_TransactionID, payload["session_id"]); + msg->nextBlockFast(_PREHASH_FolderData); + msg->addUUIDFast(_PREHASH_FolderID, fid); + msg->sendReliable(LLHost(payload["sender"].asString())); + + LLSD payload = notification["payload"]; + LLNotificationsUtil::add("FriendshipAcceptedByMe", + notification["substitutions"], payload); + break; + } + case 1: // Decline + { + LLSD payload = notification["payload"]; + LLNotificationsUtil::add("FriendshipDeclinedByMe", + notification["substitutions"], payload); + } + // fall-through + case 2: // Send IM - decline and start IM session + { + // decline + // We no longer notify other viewers, but we DO still send + // the rejection to the simulator to delete the pending userop. + msg->newMessageFast(_PREHASH_DeclineFriendship); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_TransactionBlock); + msg->addUUIDFast(_PREHASH_TransactionID, payload["session_id"]); + msg->sendReliable(LLHost(payload["sender"].asString())); + + // start IM session + if(2 == option) + { + LLAvatarActions::startIM(payload["from_id"].asUUID()); + } + } + default: + // close button probably, possibly timed out + break; + } + + LLNotificationFormPtr modified_form(new LLNotificationForm(*notification_ptr->getForm())); + modified_form->setElementEnabled("Accept", false); + modified_form->setElementEnabled("Decline", false); + notification_ptr->updateForm(modified_form); + notification_ptr->repost(); + } return false; } static LLNotificationFunctorRegistration friendship_offer_callback_reg("OfferFriendship", friendship_offer_callback); static LLNotificationFunctorRegistration friendship_offer_callback_reg_nm("OfferFriendshipNoMessage", friendship_offer_callback); -//const char BUSY_AUTO_RESPONSE[] = "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."; - -// // Functions // @@ -725,7 +733,7 @@ static void highlight_inventory_objects_in_panel(const std::vector<LLUUID>& item LLFolderView* fv = inventory_panel->getRootFolder(); if (fv) { - LLFolderViewItem* fv_item = fv->getItemByID(item_id); + LLFolderViewItem* fv_item = inventory_panel->getItemByID(item_id); if (fv_item) { LLFolderViewItem* fv_folder = fv_item->getParentFolder(); @@ -813,7 +821,13 @@ private: mSelectedItems.clear(); if (LLInventoryPanel::getActiveInventoryPanel()) { - mSelectedItems = LLInventoryPanel::getActiveInventoryPanel()->getRootFolder()->getSelectionList(); + std::set<LLFolderViewItem*> selection = LLInventoryPanel::getActiveInventoryPanel()->getRootFolder()->getSelectionList(); + for (std::set<LLFolderViewItem*>::iterator it = selection.begin(), end_it = selection.end(); + it != end_it; + ++it) + { + mSelectedItems.insert(static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID()); + } } mSelectedItems.erase(mMoveIntoFolderID); } @@ -848,7 +862,15 @@ private: } // get selected items (without destination folder) - selected_items_t selected_items = active_panel->getRootFolder()->getSelectionList(); + selected_items_t selected_items; + + std::set<LLFolderViewItem*> selection = LLInventoryPanel::getActiveInventoryPanel()->getRootFolder()->getSelectionList(); + for (std::set<LLFolderViewItem*>::iterator it = selection.begin(), end_it = selection.end(); + it != end_it; + ++it) + { + selected_items.insert(static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID()); + } selected_items.erase(mMoveIntoFolderID); // compare stored & current sets of selected items @@ -1154,7 +1176,7 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) } } } - + // Return "true" if we have a preview method for that asset type, "false" otherwise bool check_asset_previewable(const LLAssetType::EType asset_type) { @@ -1343,6 +1365,8 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id)); } +std::string LLOfferInfo::mResponderType = "offer_info"; + LLOfferInfo::LLOfferInfo() : LLNotificationResponderInterface() , mFromGroup(FALSE) @@ -1388,6 +1412,7 @@ LLOfferInfo::LLOfferInfo(const LLOfferInfo& info) LLSD LLOfferInfo::asLLSD() { LLSD sd; + sd["responder_type"] = mResponderType; sd["im_type"] = mIM; sd["from_id"] = mFromID; sd["from_group"] = mFromGroup; @@ -1477,16 +1502,15 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& itemp = (LLViewerInventoryItem*)gInventory.getItem(mObjectID); } + LLNotificationPtr notification_ptr = LLNotifications::instance().find(notification["id"].asUUID()); + // For muting, we need to add the mute, then decline the offer. // This must be done here because: // * callback may be called immediately, // * adding the mute sends a message, // * we can't build two messages at once. - if (2 == button) // Block + if (IOR_MUTE == button) // Block { - LLNotificationPtr notification_ptr = LLNotifications::instance().find(notification["id"].asUUID()); - - llassert(notification_ptr != NULL); if (notification_ptr != NULL) { gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback, _1, _2, _3)); @@ -1499,8 +1523,8 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // TODO: when task inventory offers can also be handled the new way, migrate the code that sets these strings here: from_string = chatHistory_string = mFromName; - bool busy = gAgent.getBusy(); - + LLNotificationFormPtr modified_form(notification_ptr ? new LLNotificationForm(*notification_ptr->getForm()) : new LLNotificationForm()); + switch(button) { case IOR_SHOW: @@ -1544,6 +1568,11 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& LL_WARNS("Messaging") << "inventory_offer_callback: unknown offer type" << LL_ENDL; break; } + + if (modified_form != NULL) + { + modified_form->setElementEnabled("Show", false); + } break; // end switch (mIM) @@ -1556,9 +1585,14 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& args["MESSAGE"] = log_message; LLNotificationsUtil::add("SystemMessageTip", args); } + break; case IOR_MUTE: + if (modified_form != NULL) + { + modified_form->setElementEnabled("Mute", false); + } // MUTE falls through to decline case IOR_DECLINE: { @@ -1588,12 +1622,13 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& { opener = discard_agent_offer; } - - - if (busy && (!mFromGroup && !mFromObject)) + + if (modified_form != NULL) { - busy_message(gMessageSystem, mFromID); + modified_form->setElementEnabled("Show", false); + modified_form->setElementEnabled("Discard", false); } + break; } default: @@ -1613,6 +1648,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& { delete this; } + return false; } @@ -1703,7 +1739,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const from_string = chatHistory_string = mFromName; } - bool busy = gAgent.getBusy(); + bool is_do_not_disturb = gAgent.isDoNotDisturb(); switch(button) { @@ -1776,9 +1812,9 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const LLNotificationsUtil::add("SystemMessageTip", args); } - if (busy && (!mFromGroup && !mFromObject)) + if (is_do_not_disturb && (!mFromGroup && !mFromObject)) { - busy_message(msg,mFromID); + send_do_not_disturb_message(msg,mFromID); } break; } @@ -1930,6 +1966,7 @@ void inventory_offer_handler(LLOfferInfo* info) p.substitutions(args).payload(payload).functor.responder(LLNotificationResponderPtr(info)); info->mPersist = true; p.name = "UserGiveItem"; + p.offer_from_agent = true; // Prefetch the item into your local inventory. LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID); @@ -1946,6 +1983,11 @@ void inventory_offer_handler(LLOfferInfo* info) // In viewer 2 we're now auto receiving inventory offers and messaging as such (not sending reject messages). info->send_auto_receive_response(); + if (gAgent.isDoNotDisturb()) + { + send_do_not_disturb_message(gMessageSystem, info->mFromID); + } + // Inform user that there is a script floater via toast system { payload["give_inventory_notification"] = TRUE; @@ -1990,6 +2032,18 @@ bool lure_callback(const LLSD& notification, const LLSD& response) lure_id); break; } + + LLNotificationPtr notification_ptr = LLNotifications::instance().find(notification["id"].asUUID()); + + if (notification_ptr) + { + LLNotificationFormPtr modified_form(new LLNotificationForm(*notification_ptr->getForm())); + modified_form->setElementEnabled("Teleport", false); + modified_form->setElementEnabled("Cancel", false); + notification_ptr->updateForm(modified_form); + notification_ptr->repost(); + } + return false; } static LLNotificationFunctorRegistration lure_callback_reg("TeleportOffered", lure_callback); @@ -2151,7 +2205,7 @@ static std::string clean_name_from_im(const std::string& name, EInstantMessage t case IM_SESSION_SEND: case IM_SESSION_LEAVE: //IM_FROM_TASK - case IM_BUSY_AUTO_RESPONSE: + case IM_DO_NOT_DISTURB_AUTO_RESPONSE: case IM_CONSOLE_AND_CHAT_HISTORY: case IM_LURE_USER: case IM_LURE_ACCEPTED: @@ -2192,16 +2246,7 @@ static std::string clean_name_from_task_im(const std::string& msg, // Don't try to clean up group names if (!from_group) { - if (LLAvatarNameCache::useDisplayNames()) - { - // ...just convert to username - final += LLCacheName::buildUsername(name); - } - else - { - // ...strip out legacy "Resident" name - final += LLCacheName::cleanFullName(name); - } + final += LLCacheName::buildUsername(name); } final += match[3].str(); return final; @@ -2209,13 +2254,13 @@ static std::string clean_name_from_task_im(const std::string& msg, return msg; } -void notification_display_name_callback(const LLUUID& id, +static void notification_display_name_callback(const LLUUID& id, const LLAvatarName& av_name, const std::string& name, LLSD& substitutions, const LLSD& payload) { - substitutions["NAME"] = av_name.mDisplayName; + substitutions["NAME"] = av_name.getDisplayName(); LLNotificationsUtil::add(name, substitutions, payload); } @@ -2233,7 +2278,7 @@ protected: }; // Callback for name resolution of a god/estate message -void god_message_name_cb(const LLAvatarName& av_name, LLChat chat, std::string message) +static void god_message_name_cb(const LLAvatarName& av_name, LLChat chat, std::string message) { LLSD args; args["NAME"] = av_name.getCompleteName(); @@ -2243,12 +2288,11 @@ void god_message_name_cb(const LLAvatarName& av_name, LLChat chat, std::string m // Treat like a system message and put in chat history. chat.mText = av_name.getCompleteName() + ": " + message; - LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); - if(nearby_chat) + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + if (nearby_chat) { nearby_chat->addMessage(chat); } - } void process_improved_im(LLMessageSystem *msg, void **user_data) @@ -2301,16 +2345,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // IDEVO convert new-style "Resident" names for display name = clean_name_from_im(name, dialog); - BOOL is_busy = gAgent.getBusy(); + BOOL is_do_not_disturb = gAgent.isDoNotDisturb(); BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat) // object IMs contain sender object id in session_id (STORM-1209) || dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id); - BOOL is_linden = LLMuteList::getInstance()->isLinden(name); BOOL is_owned_by_me = FALSE; BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true; BOOL accept_im_from_only_friend = gSavedSettings.getBOOL("VoiceCallsFriendsOnly"); - chat.mMuted = is_muted && !is_linden; + chat.mMuted = is_muted; chat.mFromID = from_id; chat.mFromName = name; chat.mSourceType = (from_id.isNull() || (name == std::string(SYSTEM_FROM))) ? CHAT_SOURCE_SYSTEM : CHAT_SOURCE_AGENT; @@ -2328,7 +2371,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLNotification::Params params; switch(dialog) - { + { case IM_CONSOLE_AND_CHAT_HISTORY: args["MESSAGE"] = message; payload["from_id"] = from_id; @@ -2339,7 +2382,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLPostponedNotification::add<LLPostponedIMSystemTipNotification>(params, from_id, false); break; - case IM_NOTHING_SPECIAL: + case IM_NOTHING_SPECIAL: // p2p IM // Don't show dialog, just do IM if (!gAgent.isGodlike() && gAgent.getRegion()->isPrelude() @@ -2348,29 +2391,18 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // do nothing -- don't distract newbies in // Prelude with global IMs } - else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) + else if (offline == IM_ONLINE + && is_do_not_disturb + && from_id.notNull() //not a system message + && to_id.notNull()) //not global message { - // return a standard "busy" message, but only do it to online IM + // return a standard "do not disturb" message, but only do it to online IM // (i.e. not other auto responses and not store-and-forward IM) if (!gIMMgr->hasSession(session_id)) { // if there is not a panel for this conversation (i.e. it is a new IM conversation // initiated by the other party) then... - std::string my_name; - LLAgentUI::buildFullname(my_name); - std::string response = gSavedPerAccountSettings.getString("BusyModeResponse"); - pack_instant_message( - gMessageSystem, - gAgent.getID(), - FALSE, - gAgent.getSessionID(), - from_id, - my_name, - response, - IM_ONLINE, - IM_BUSY_AUTO_RESPONSE, - session_id); - gAgent.sendReliableMessage(); + send_do_not_disturb_message(msg, from_id, session_id); } // now store incoming IM in chat history @@ -2385,6 +2417,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) from_id, name, buffer, + IM_OFFLINE == offline, LLStringUtil::null, dialog, parent_estate_id, @@ -2419,24 +2452,25 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; bool mute_im = is_muted; - if (accept_im_from_only_friend && !is_friend) + if(accept_im_from_only_friend&&!is_friend) { if (!gIMMgr->isNonFriendSessionNotified(session_id)) { std::string message = LLTrans::getString("IM_unblock_only_groups_friends"); - gIMMgr->addMessage(session_id, from_id, name, message); + gIMMgr->addMessage(session_id, from_id, name, message, IM_OFFLINE == offline); gIMMgr->addNotifiedNonFriendSessionID(session_id); } mute_im = true; } - if (!mute_im || is_linden) + if (!mute_im) { gIMMgr->addMessage( session_id, from_id, name, buffer, + IM_OFFLINE == offline, LLStringUtil::null, dialog, parent_estate_id, @@ -2581,7 +2615,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["sender_name"] = name; payload["group_id"] = group_id; payload["inventory_name"] = item_name; - payload["inventory_offer"] = info ? info->asLLSD() : LLSD(); + if(info && info->asLLSD()) + { + payload["inventory_offer"] = info->asLLSD(); + } LLSD args; args["SUBJECT"] = subj; @@ -2603,11 +2640,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) break; case IM_GROUP_INVITATION: { - //if (!is_linden && (is_busy || is_muted)) - if ((is_busy || is_muted)) + if (is_do_not_disturb || is_muted) { - LLMessageSystem *msg = gMessageSystem; - busy_message(msg,from_id); + send_do_not_disturb_message(msg, from_id); } else { @@ -2690,7 +2725,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) info->mFromName = name; info->mDesc = message; info->mHost = msg->getSender(); - //if (((is_busy && !is_owned_by_me) || is_muted)) + //if (((is_do_not_disturb && !is_owned_by_me) || is_muted)) if (is_muted) { // Prefetch the offered item so that it can be discarded by the appropriate observer. (EXT-4331) @@ -2701,9 +2736,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // Same as closing window info->forceResponse(IOR_DECLINE); } - else if (is_busy && dialog != IM_TASK_INVENTORY_OFFERED) // busy mode must not affect interaction with objects (STORM-565) + // old logic: busy mode must not affect interaction with objects (STORM-565) + // new logic: inventory offers from in-world objects should be auto-declined (CHUI-519) + else if (is_do_not_disturb && dialog == IM_TASK_INVENTORY_OFFERED) { - // Until throttling is implemented, busy mode should reject inventory instead of silently + // Until throttling is implemented, do not disturb mode should reject inventory instead of silently // accepting it. SEE SL-39554 info->forceResponse(IOR_DECLINE); } @@ -2746,49 +2783,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } break; - case IM_SESSION_SEND: - { - if (is_busy) - { - return; - } - - // Only show messages if we have a session open (which - // should happen after you get an "invitation" - if ( !gIMMgr->hasSession(session_id) ) - { - return; - } - - // standard message, not from system - std::string saved; - if(offline == IM_OFFLINE) - { - saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); - } - buffer = saved + message; - BOOL is_this_agent = FALSE; - if(from_id == gAgentID) - { - is_this_agent = TRUE; - } - gIMMgr->addMessage( - session_id, - from_id, - name, - buffer, - ll_safe_string((char*)binary_bucket), - IM_SESSION_INVITE, - parent_estate_id, - region_id, - position, - true); - } - break; - case IM_FROM_TASK: { - if (is_busy && !is_owned_by_me) + if (is_do_not_disturb && !is_owned_by_me) { return; } @@ -2840,13 +2837,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // Note: lie to Nearby Chat, pretending that this is NOT an IM, because // IMs from obejcts don't open IM sessions. - LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); if(!chat_from_system && nearby_chat) { chat.mOwnerID = from_id; LLSD args; args["slurl"] = location; - args["type"] = LLNotificationsUI::NT_NEARBYCHAT; // Look for IRC-style emotes here so object name formatting is correct std::string prefix = message.substr(0, 4); @@ -2885,8 +2881,78 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLPostponedNotification::add<LLPostponedServerObjectNotification>(params, from_id, from_group); } break; + + case IM_SESSION_SEND: // ad-hoc or group IMs + + // Only show messages if we have a session open (which + // should happen after you get an "invitation" + if ( !gIMMgr->hasSession(session_id) ) + { + return; + } + + else if (offline == IM_ONLINE && is_do_not_disturb) + { + + // return a standard "do not disturb" message, but only do it to online IM + // (i.e. not other auto responses and not store-and-forward IM) + if (!gIMMgr->hasSession(session_id)) + { + // if there is not a panel for this conversation (i.e. it is a new IM conversation + // initiated by the other party) then... + send_do_not_disturb_message(msg, from_id, session_id); + } + + // now store incoming IM in chat history + + buffer = message; + + LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; + + // add to IM panel, but do not bother the user + gIMMgr->addMessage( + session_id, + from_id, + name, + buffer, + IM_OFFLINE == offline, + ll_safe_string((char*)binary_bucket), + IM_SESSION_INVITE, + parent_estate_id, + region_id, + position, + true); + } + else + { + // standard message, not from system + std::string saved; + if(offline == IM_OFFLINE) + { + saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); + } + + buffer = saved + message; + + LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; + + gIMMgr->addMessage( + session_id, + from_id, + name, + buffer, + IM_OFFLINE == offline, + ll_safe_string((char*)binary_bucket), + IM_SESSION_INVITE, + parent_estate_id, + region_id, + position, + true); + } + break; + case IM_FROM_TASK_AS_ALERT: - if (is_busy && !is_owned_by_me) + if (is_do_not_disturb && !is_owned_by_me) { return; } @@ -2897,17 +2963,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLNotificationsUtil::add("ObjectMessage", args); } break; - case IM_BUSY_AUTO_RESPONSE: + case IM_DO_NOT_DISTURB_AUTO_RESPONSE: if (is_muted) { - LL_DEBUGS("Messaging") << "Ignoring busy response from " << from_id << LL_ENDL; + LL_DEBUGS("Messaging") << "Ignoring do-not-disturb response from " << from_id << LL_ENDL; return; } else { - // TODO: after LLTrans hits release, get "busy response" into translatable file - buffer = llformat("%s (%s): %s", name.c_str(), "busy response", message.c_str()); - gIMMgr->addMessage(session_id, from_id, name, buffer); + gIMMgr->addMessage(session_id, from_id, name, message); } break; @@ -2917,9 +2981,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { return; } - else if (is_busy) + else if (is_do_not_disturb) { - busy_message(msg,from_id); + send_do_not_disturb_message(msg, from_id); } else { @@ -3006,11 +3070,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { - LLNotification::Params params("TeleportOffered"); - params.substitutions = args; - params.payload = payload; - LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false); - } + LLNotification::Params params("TeleportOffered"); + params.substitutions = args; + params.payload = payload; + LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false); + } } } @@ -3101,10 +3165,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { - // do not show a message box, because you're about to be - // teleported. - LLNotifications::instance().forceResponse(LLNotification::Params("TeleportOffered").payload(payload), 0); - } + // do not show a message box, because you're about to be + // teleported. + LLNotifications::instance().forceResponse(LLNotification::Params("TeleportOffered").payload(payload), 0); + } } break; @@ -3140,17 +3204,16 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["online"] = (offline == IM_ONLINE); payload["sender"] = msg->getSender().getIPandPort(); - if (is_busy) - { - busy_message(msg, from_id); - LLNotifications::instance().forceResponse(LLNotification::Params("OfferFriendship").payload(payload), 1); - } - else if (is_muted) + if (is_muted) { LLNotifications::instance().forceResponse(LLNotification::Params("OfferFriendship").payload(payload), 1); } else { + if (is_do_not_disturb) + { + send_do_not_disturb_message(msg, from_id); + } args["NAME_SLURL"] = LLSLURL("agent", from_id, "about").getSLURLString(); if(message.empty()) { @@ -3183,12 +3246,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) args["NAME"] = name; LLSD payload; payload["from_id"] = from_id; - LLAvatarNameCache::get(from_id, boost::bind(¬ification_display_name_callback, - _1, - _2, - "FriendshipAccepted", - args, - payload)); + LLAvatarNameCache::get(from_id, boost::bind(¬ification_display_name_callback,_1,_2,"FriendshipAccepted",args,payload)); } break; @@ -3206,15 +3264,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } } -void busy_message (LLMessageSystem* msg, LLUUID from_id) +void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id) { - if (gAgent.getBusy()) + if (gAgent.isDoNotDisturb()) { std::string my_name; LLAgentUI::buildFullname(my_name); - std::string response = gSavedPerAccountSettings.getString("BusyModeResponse"); + std::string response = gSavedPerAccountSettings.getString("DoNotDisturbModeResponse"); pack_instant_message( - gMessageSystem, + msg, gAgent.getID(), FALSE, gAgent.getSessionID(), @@ -3222,7 +3280,8 @@ void busy_message (LLMessageSystem* msg, LLUUID from_id) my_name, response, IM_ONLINE, - IM_BUSY_AUTO_RESPONSE); + IM_DO_NOT_DISTURB_AUTO_RESPONSE, + session_id); gAgent.sendReliableMessage(); } } @@ -3257,7 +3316,7 @@ bool callingcard_offer_callback(const LLSD& notification, const LLSD& response) msg->nextBlockFast(_PREHASH_TransactionBlock); msg->addUUIDFast(_PREHASH_TransactionID, notification["payload"]["transaction_id"].asUUID()); msg->sendReliable(LLHost(notification["payload"]["sender"].asString())); - busy_message(msg, notification["payload"]["source_id"].asUUID()); + send_do_not_disturb_message(msg, notification["payload"]["source_id"].asUUID()); break; default: // close button probably, possibly timed out @@ -3299,7 +3358,7 @@ void process_offer_callingcard(LLMessageSystem* msg, void**) if(!source_name.empty()) { - if (gAgent.getBusy() + if (gAgent.isDoNotDisturb() || LLMuteList::getInstance()->isMuted(source_id, source_name, LLMute::flagTextChat)) { // automatically decline offer @@ -3339,9 +3398,9 @@ public : { } - static boost::intrusive_ptr<ChatTranslationReceiver> build(const std::string &from_lang, const std::string &to_lang, const std::string &mesg, const LLChat &chat, const LLSD &toast_args) + static ChatTranslationReceiver* build(const std::string &from_lang, const std::string &to_lang, const std::string &mesg, const LLChat &chat, const LLSD &toast_args) { - return boost::intrusive_ptr<ChatTranslationReceiver>(new ChatTranslationReceiver(from_lang, to_lang, mesg, chat, toast_args)); + return new ChatTranslationReceiver(from_lang, to_lang, mesg, chat, toast_args); } protected: @@ -3416,7 +3475,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) LLAvatarName av_name; if (LLAvatarNameCache::get(from_id, &av_name)) { - chat.mFromName = av_name.mDisplayName; + chat.mFromName = av_name.getDisplayName(); } else { @@ -3428,7 +3487,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) chat.mFromName = from_name; } - BOOL is_busy = gAgent.getBusy(); + BOOL is_do_not_disturb = gAgent.isDoNotDisturb(); BOOL is_muted = FALSE; BOOL is_linden = FALSE; @@ -3462,7 +3521,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // record last audible utterance if (is_audible - && (is_linden || (!is_muted && !is_busy))) + && (is_linden || (!is_muted && !is_do_not_disturb))) { if (chat.mChatType != CHAT_TYPE_START && chat.mChatType != CHAT_TYPE_STOP) @@ -3557,7 +3616,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, FALSE); ((LLVOAvatar*)chatter)->stopTyping(); - if (!is_muted && !is_busy) + if (!is_muted && !is_do_not_disturb) { visible_in_chat_bubble = gSavedSettings.getBOOL("UseChatBubbles"); std::string formated_msg = ""; @@ -3590,7 +3649,6 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // pass owner_id to chat so that we can display the remote // object inspect for an object that is chatting with you LLSD args; - args["type"] = LLNotificationsUI::NT_NEARBYCHAT; chat.mOwnerID = owner_id; if (gSavedSettings.getBOOL("TranslateChat") && chat.mSourceType != CHAT_SOURCE_SYSTEM) @@ -3609,6 +3667,11 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) { LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); } + + LLSD msg_notify = LLSD(LLSD::emptyMap()); + msg_notify["session_id"] = LLUUID(); + msg_notify["from_id"] = chat.mFromID; + on_new_message(msg_notify); } } @@ -3930,6 +3993,7 @@ void process_avatar_init_complete(LLMessageSystem* msg, void**) void process_agent_movement_complete(LLMessageSystem* msg, void**) { + gShiftFrame = true; gAgentMovementCompleted = true; LLUUID agent_id; @@ -4095,14 +4159,14 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) gAgent.setFlying(gAgent.canFly()); } - // force simulator to recognize busy state - if (gAgent.getBusy()) + // force simulator to recognize do not disturb state + if (gAgent.isDoNotDisturb()) { - gAgent.setBusy(); + gAgent.setDoNotDisturb(true); } else { - gAgent.clearBusy(); + gAgent.setDoNotDisturb(false); } if (isAgentAvatarValid()) @@ -4274,7 +4338,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) msg_number += 1; if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) { - //LL_INFOS("Messaging") << " head rot " << head_rotation << LL_ENDL; + //LL_INFOS("Messaging") << "head rot " << head_rotation << LL_ENDL; LL_INFOS("Messaging") << "msg " << msg_number << ", frame " << LLFrameTimer::getFrameCount() << ", head_rot_chg " << head_rot_chg << LL_ENDL; } if (cam_rot_chg.magVec() > ROTATION_THRESHOLD) @@ -4293,7 +4357,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) { LL_INFOS("Messaging") << "msg " << msg_number << ", frame " << LLFrameTimer::getFrameCount() << ", dcf = " << control_flag_change << LL_ENDL; } - */ +*/ duplicate_count = 0; } @@ -4418,7 +4482,6 @@ extern U32 gObjectBits; void process_object_update(LLMessageSystem *mesgsys, void **user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); // Update the data counters if (mesgsys->getReceiveCompressedSize()) { @@ -4435,7 +4498,6 @@ void process_object_update(LLMessageSystem *mesgsys, void **user_data) void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); // Update the data counters if (mesgsys->getReceiveCompressedSize()) { @@ -4452,7 +4514,6 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); // Update the data counters if (mesgsys->getReceiveCompressedSize()) { @@ -4470,7 +4531,6 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data) void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); if (mesgsys->getReceiveCompressedSize()) { gObjectBits += mesgsys->getReceiveCompressedSize() * 8; @@ -4483,7 +4543,7 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED); } -static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); +static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Kill Objects"); void process_kill_object(LLMessageSystem *mesgsys, void **user_data) @@ -5616,25 +5676,23 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg) _1, _2, _3, notification, final_args, payload)); } - else { - LLAvatarNameCache::get(name_id, - boost::bind(&money_balance_avatar_notify, - _1, _2, - notification, final_args, payload)); + else + { + LLAvatarNameCache::get(name_id, boost::bind(&money_balance_avatar_notify, _1, _2, notification, final_args, payload)); } } bool handle_prompt_for_maturity_level_change_callback(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - + if (0 == option) { // set the preference to the maturity of the region we're calling U8 preferredMaturity = static_cast<U8>(notification["payload"]["_region_access"].asInteger()); gSavedSettings.setU32("PreferredMaturity", static_cast<U32>(preferredMaturity)); } - + return false; } @@ -5697,7 +5755,7 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock) gAgent.clearTeleportRequest(); maturityLevelNotification = LLNotificationsUtil::add(notificationID+"_AdultsOnlyContent", llsdBlock); returnValue = true; - + notifySuffix = "_NotifyAdultsOnly"; } else if (gAgent.prefersPG() || gAgent.prefersMature()) @@ -5794,7 +5852,7 @@ bool handle_teleport_access_blocked(LLSD& llsdBlock) maturityLevelNotification = LLNotificationsUtil::add(notificationID+"_PreferencesOutOfSync", llsdBlock, llsdBlock, handle_prompt_for_maturity_level_change_callback); returnValue = true; } - } + } if ((maturityLevelNotification == NULL) || maturityLevelNotification->isIgnored()) { @@ -5960,8 +6018,8 @@ void process_alert_core(const std::string& message, BOOL modal) std::string alert_name(message.substr(ALERT_PREFIX.length())); if (!handle_special_alerts(alert_name)) { - LLNotificationsUtil::add(alert_name); - } + LLNotificationsUtil::add(alert_name); + } } else if (message.find(NOTIFY_PREFIX) == 0) { @@ -6796,7 +6854,6 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response) //*TODO please rewrite all keys to the same case, lower or upper payload["from_id"] = target_id; - payload["SUPPRESS_TOAST"] = true; LLNotificationsUtil::add("TeleportOfferSent", args, payload); // Add the recepient to the recent people list. @@ -6917,7 +6974,7 @@ void process_user_info_reply(LLMessageSystem* msg, void**) std::string dir_visibility; msg->getString( "UserData", "DirectoryVisibility", dir_visibility); - LLFloaterPreference::updateUserInfo(dir_visibility, im_via_email, email); + LLFloaterPreference::updateUserInfo(dir_visibility, im_via_email); LLFloaterSnapshot::setAgentEmail(email); } diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 594c22ed9c..3237f3fbdd 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -67,7 +67,6 @@ enum InventoryOfferResponse BOOL can_afford_transaction(S32 cost); void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_group = FALSE, S32 trx_type = TRANS_GIFT, const std::string& desc = LLStringUtil::null); -void busy_message (LLMessageSystem* msg, LLUUID from_id); void process_logout_reply(LLMessageSystem* msg, void**); void process_layer_data(LLMessageSystem *mesgsys, void **user_data); @@ -153,6 +152,8 @@ void send_group_notice(const LLUUID& group_id, const std::string& message, const LLInventoryItem* item); +void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id = LLUUID::null); + void handle_lure(const LLUUID& invitee); void handle_lure(const uuid_vec_t& ids); @@ -228,6 +229,7 @@ public: void forceResponse(InventoryOfferResponse response); + static std::string mResponderType; EInstantMessage mIM; LLUUID mFromID; BOOL mFromGroup; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 0a6c51b378..b1a60197a2 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -199,6 +199,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mID(id), mLocalID(0), mTotalCRC(0), + mListIndex(-1), mTEImages(NULL), mGLName(0), mbCanSelect(TRUE), @@ -236,7 +237,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mTimeDilation(1.f), mRotTime(0.f), mAngularVelocityRot(), - mJointInfo(NULL), + mPreviousRotation(), mState(0), mMedia(NULL), mClickAction(0), @@ -282,12 +283,6 @@ LLViewerObject::~LLViewerObject() mInventory = NULL; } - if (mJointInfo) - { - delete mJointInfo; - mJointInfo = NULL; - } - if (mPartSourcep) { mPartSourcep->setDead(); @@ -338,9 +333,6 @@ void LLViewerObject::markDead() if (getParent()) { ((LLViewerObject *)getParent())->removeChild(this); - // go ahead and delete any jointinfo's that we find - delete mJointInfo; - mJointInfo = NULL; } // Mark itself as dead @@ -743,7 +735,7 @@ void LLViewerObject::addThisAndNonJointChildren(std::vector<LLViewerObject*>& ob iter != mChildList.end(); iter++) { LLViewerObject* child = *iter; - if ( (!child->isAvatar()) && (!child->isJointChild())) + if ( (!child->isAvatar())) { child->addThisAndNonJointChildren(objects); } @@ -794,6 +786,12 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp) LLDrawable* old_parent = mDrawable->mParent; mDrawable->mParent = parentp; + if (parentp && mDrawable->isActive()) + { + parentp->makeActive(); + parentp->setState(LLDrawable::ACTIVE_CHILD); + } + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); if( (old_parent != parentp && old_parent) || (parentp && parentp->isActive())) @@ -878,7 +876,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, const EObjectUpdateType update_type, LLDataPacker *dp) { - LLMemType mt(LLMemType::MTYPE_OBJECT); U32 retval = 0x0; // If region is removed from the list it is also deleted. @@ -1234,12 +1231,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, coloru.mV[3] = 255 - coloru.mV[3]; mText->setColor(LLColor4(coloru)); mText->setString(temp_string); - - if (mDrawable.notNull()) - { - setChanged(MOVED | SILHOUETTE); - gPipeline.markMoved(mDrawable, FALSE); // undamped - } + + setChanged(MOVED | SILHOUETTE); } else if (mText.notNull()) { @@ -1296,26 +1289,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, } } - U8 joint_type = 0; - mesgsys->getU8Fast(_PREHASH_ObjectData, _PREHASH_JointType, joint_type, block_num); - if (joint_type) - { - // create new joint info - if (!mJointInfo) - { - mJointInfo = new LLVOJointInfo; - } - mJointInfo->mJointType = (EHavokJointType) joint_type; - mesgsys->getVector3Fast(_PREHASH_ObjectData, _PREHASH_JointPivot, mJointInfo->mPivot, block_num); - mesgsys->getVector3Fast(_PREHASH_ObjectData, _PREHASH_JointAxisOrAnchor, mJointInfo->mAxisOrAnchor, block_num); - } - else if (mJointInfo) - { - // this joint info is no longer needed - delete mJointInfo; - mJointInfo = NULL; - } - break; } @@ -1434,8 +1407,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, val = (U16 *) &data[count]; #endif new_angv.set(U16_to_F32(val[VX], -size, size), - U16_to_F32(val[VY], -size, size), - U16_to_F32(val[VZ], -size, size)); + U16_to_F32(val[VY], -size, size), + U16_to_F32(val[VZ], -size, size)); setAngularVelocity(new_angv); break; @@ -1461,8 +1434,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, new_rot.mQ[VW] = U8_to_F32(data[12], -1.f, 1.f); new_angv.set(U8_to_F32(data[13], -size, size), - U8_to_F32(data[14], -size, size), - U8_to_F32(data[15], -size, size)); + U8_to_F32(data[14], -size, size), + U8_to_F32(data[15], -size, size) ); setAngularVelocity(new_angv); break; } @@ -1536,8 +1509,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, dp->unpackU16(val[VY], "AccY"); dp->unpackU16(val[VZ], "AccZ"); new_angv.set(U16_to_F32(val[VX], -64.f, 64.f), - U16_to_F32(val[VY], -64.f, 64.f), - U16_to_F32(val[VZ], -64.f, 64.f)); + U16_to_F32(val[VY], -64.f, 64.f), + U16_to_F32(val[VZ], -64.f, 64.f)); setAngularVelocity(new_angv); } break; @@ -1966,14 +1939,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, cur_parentp->removeChild(this); - if (mJointInfo && !parent_id) - { - // since this object is no longer parent-relative - // we make sure we delete any joint info - delete mJointInfo; - mJointInfo = NULL; - } - setChanged(MOVED | SILHOUETTE); if (mDrawable.notNull()) @@ -2072,12 +2037,16 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, } } - if (new_rot != getRotation() - || new_angv != old_angv) + if ((new_rot != getRotation()) + || (new_angv != old_angv)) { - if (new_angv != old_angv) + if (new_rot != mPreviousRotation) { - if (flagUsePhysics() || new_angv.isExactlyZero()) + resetRot(); + } + else if (new_angv != old_angv) + { + if (flagUsePhysics()) { resetRot(); } @@ -2087,12 +2056,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, } } + // Remember the last rotation value + mPreviousRotation = new_rot; + // Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega) setRotation(new_rot * mAngularVelocityRot); setChanged(ROTATED | SILHOUETTE); } - if ( gShowObjectUpdates ) { LLColor4 color; @@ -2107,9 +2078,15 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, gPipeline.addDebugBlip(getPositionAgent(), color); } - if ((0.0f == vel_mag_sq) && - (0.0f == accel_mag_sq) && - (0.0f == getAngularVelocity().magVecSquared())) + const F32 MAG_CUTOFF = F_APPROXIMATELY_ZERO; + + llassert(vel_mag_sq >= 0.f); + llassert(accel_mag_sq >= 0.f); + llassert(getAngularVelocity().magVecSquared() >= 0.f); + + if ((MAG_CUTOFF >= vel_mag_sq) && + (MAG_CUTOFF >= accel_mag_sq) && + (MAG_CUTOFF >= getAngularVelocity().magVecSquared())) { mStatic = TRUE; // This object doesn't move! } @@ -2180,17 +2157,13 @@ BOOL LLViewerObject::isActive() const -BOOL LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - static LLFastTimer::DeclareTimer ftm("Viewer Object"); - LLFastTimer t(ftm); + //static LLFastTimer::DeclareTimer ftm("Viewer Object"); + //LLFastTimer t(ftm); - if (mDead) + if (!mDead) { - // It's dead. Don't update it. - return TRUE; - } - // CRO - don't velocity interp linked objects! // Leviathan - but DO velocity interp joints if (!mStatic && sVelocityInterpolate && !isSelected()) @@ -2199,88 +2172,12 @@ BOOL LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) F32 dt_raw = (F32)(time - mLastInterpUpdateSecs); F32 dt = mTimeDilation * dt_raw; - if (!mJointInfo) - { applyAngularVelocity(dt); - } - LLViewerObject *parentp = (LLViewerObject *) getParent(); - if (mJointInfo) - { - if (parentp) - { - // do parent-relative stuff - LLVector3 ang_vel = getAngularVelocity(); - F32 omega = ang_vel.magVecSquared(); - F32 angle = 0.0f; - LLQuaternion dQ; - if (omega > 0.00001f) + if (isAttachment()) { - omega = sqrt(omega); - angle = omega * dt; - dQ.setQuat(angle, ang_vel); - } - LLVector3 pos = getPosition(); - - if (HJT_HINGE == mJointInfo->mJointType) - { - // hinge = uniform circular motion - LLVector3 parent_pivot = getVelocity(); - LLVector3 parent_axis = getAcceleration(); - - angle = dt * (ang_vel * mJointInfo->mAxisOrAnchor); // AxisOrAnchor = axis - dQ.setQuat(angle, mJointInfo->mAxisOrAnchor); // AxisOrAnchor = axis - LLVector3 pivot_offset = pos - mJointInfo->mPivot; // pos in pivot-frame - pivot_offset = pivot_offset * dQ; // new rotated pivot-frame pos - pos = mJointInfo->mPivot + pivot_offset; // parent-frame - LLViewerObject::setPosition(pos); - LLQuaternion Q_PC = getRotation(); - setRotation(Q_PC * dQ); - mLastInterpUpdateSecs = time; - } - else if (HJT_POINT == mJointInfo->mJointType) - // || HJT_LPOINT == mJointInfo->mJointType) - { - // point-to-point = spin about axis and uniform circular motion - // of axis about the pivot point - // - // NOTE: this interpolation scheme is not quite good enough to - // reduce the bandwidth -- needs a gravitational correction. - // Similarly for hinges with axes that deviate from vertical. - - LLQuaternion Q_PC = getRotation(); - Q_PC = Q_PC * dQ; - setRotation(Q_PC); - - LLVector3 pivot_to_child = - mJointInfo->mAxisOrAnchor; // AxisOrAnchor = anchor - pos = mJointInfo->mPivot + pivot_to_child * Q_PC; - LLViewerObject::setPosition(pos); - mLastInterpUpdateSecs = time; - } - /* else if (HJT_WHEEL == mJointInfo->mJointInfo) - { - // wheel = uniform rotation about axis, with linear - // velocity interpolation (if any) - LLVector3 parent_axis = getAcceleration(); // HACK -- accel stores the parent-axis (parent-frame) - - LLQuaternion Q_PC = getRotation(); - - angle = dt * (parent_axis * ang_vel); - dQ.setQuat(angle, parent_axis); - - Q_PC = Q_PC * dQ; - setRotation(Q_PC); - - pos = getPosition() + dt * getVelocity(); - LLViewerObject::setPosition(pos); mLastInterpUpdateSecs = time; - }*/ - } - } - else if (isAttachment()) - { - mLastInterpUpdateSecs = time; - return TRUE; + return; } else { // Move object based on it's velocity and rotation @@ -2289,8 +2186,7 @@ BOOL LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) } updateDrawable(FALSE); - - return TRUE; + } } @@ -2450,8 +2346,6 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) BOOL LLViewerObject::setData(const U8 *datap, const U32 data_size) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - delete [] mData; if (datap) @@ -2493,8 +2387,6 @@ void LLViewerObject::doUpdateInventory( U8 key, bool is_new) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - LLViewerInventoryItem* old_item = NULL; if(TASK_INVENTORY_ITEM_KEY == key) { @@ -2578,8 +2470,6 @@ void LLViewerObject::saveScript( BOOL active, bool is_new) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - /* * XXXPAM Investigate not making this copy. Seems unecessary, but I'm unsure about the * interaction with doUpdateInventory() called below. @@ -2655,8 +2545,6 @@ void LLViewerObject::dirtyInventory() void LLViewerObject::registerInventoryListener(LLVOInventoryListener* listener, void* user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - LLInventoryCallbackInfo* info = new LLInventoryCallbackInfo; info->mListener = listener; info->mInventoryData = user_data; @@ -2754,8 +2642,6 @@ S32 LLFilenameAndTask::sCount = 0; // static void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - LLUUID task_id; msg->getUUIDFast(_PREHASH_InventoryData, _PREHASH_TaskID, task_id); LLViewerObject* object = gObjectList.findObject(task_id); @@ -2842,8 +2728,6 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS void LLViewerObject::loadTaskInvFile(const std::string& filename) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename); llifstream ifs(filename_and_local_path); if(ifs.good()) @@ -2967,8 +2851,6 @@ void LLViewerObject::updateInventory( U8 key, bool is_new) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - // This slices the object into what we're concerned about on the // viewer. The simulator will take the permissions and transfer // ownership. @@ -3880,15 +3762,6 @@ void LLViewerObject::setPositionEdit(const LLVector3 &pos_edit, BOOL damped) ((LLViewerObject *)getParent())->setPositionEdit(pos_edit - position_offset); updateDrawable(damped); } - else if (isJointChild()) - { - // compute new parent-relative position - LLViewerObject *parent = (LLViewerObject *) getParent(); - LLQuaternion inv_parent_rot = parent->getRotation(); - inv_parent_rot.transQuat(); - LLVector3 pos_parent = (pos_edit - parent->getPositionRegion()) * inv_parent_rot; - LLViewerObject::setPosition(pos_parent, damped); - } else { LLViewerObject::setPosition(pos_edit, damped); @@ -3902,8 +3775,7 @@ LLViewerObject* LLViewerObject::getRootEdit() const { const LLViewerObject* root = this; while (root->mParent - && !(root->mJointInfo - || ((LLViewerObject*)root->mParent)->isAvatar()) ) + && !((LLViewerObject*)root->mParent)->isAvatar()) { root = (LLViewerObject*)root->mParent; } @@ -3987,8 +3859,6 @@ std::string LLViewerObject::getMediaURL() const void LLViewerObject::setMediaURL(const std::string& media_url) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - if (!mMedia) { mMedia = new LLViewerObjectMedia; @@ -4038,8 +3908,6 @@ BOOL LLViewerObject::setMaterial(const U8 material) void LLViewerObject::setNumTEs(const U8 num_tes) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - U32 i; if (num_tes != getNumTEs()) { @@ -4612,19 +4480,11 @@ void LLViewerObject::clearIcon() LLViewerObject* LLViewerObject::getSubParent() { - if (isJointChild()) - { - return this; - } return (LLViewerObject*) getParent(); } const LLViewerObject* LLViewerObject::getSubParent() const { - if (isJointChild()) - { - return this; - } return (const LLViewerObject*) getParent(); } @@ -4803,9 +4663,11 @@ void LLViewerObject::deleteParticleSource() // virtual void LLViewerObject::updateDrawable(BOOL force_damped) { - if (mDrawable.notNull() && - !mDrawable->isState(LLDrawable::ON_MOVE_LIST) && - isChanged(MOVED)) + if (!isChanged(MOVED)) + { //most common case, having an empty if case here makes for better branch prediction + } + else if (mDrawable.notNull() && + !mDrawable->isState(LLDrawable::ON_MOVE_LIST)) { BOOL damped_motion = !isChanged(SHIFTED) && // not shifted between regions this frame and... @@ -5492,9 +5354,12 @@ BOOL LLViewerObject::setFlagsWithoutUpdate(U32 flags, BOOL state) void LLViewerObject::setPhysicsShapeType(U8 type) { mPhysicsShapeUnknown = false; + if (type != mPhysicsShapeType) + { mPhysicsShapeType = type; mCostStale = true; } +} void LLViewerObject::setPhysicsGravity(F32 gravity) { @@ -5520,7 +5385,6 @@ U8 LLViewerObject::getPhysicsShapeType() const { if (mPhysicsShapeUnknown) { - mPhysicsShapeUnknown = false; gObjectList.updatePhysicsFlags(this); } diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 83e34dc6ca..97cf0a4850 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -34,7 +34,6 @@ #include "llhudicon.h" #include "llinventory.h" #include "llrefcount.h" -#include "llmemtype.h" #include "llprimitive.h" #include "lluuid.h" #include "llvoinventorylistener.h" @@ -88,18 +87,6 @@ typedef void (*inventory_callback)(LLViewerObject*, S32 serial_num, void*); -// a small struct for keeping track of joints -struct LLVOJointInfo -{ - EHavokJointType mJointType; - LLVector3 mPivot; // parent-frame - // whether the below an axis or anchor (and thus its frame) - // depends on the joint type: - // HINGE ==> axis=parent-frame - // P2P ==> anchor=child-frame - LLVector3 mAxisOrAnchor; -}; - // for exporting textured materials from SL struct LLMaterialExportInfo { @@ -140,7 +127,6 @@ public: typedef const child_list_t const_child_list_t; LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, BOOL is_global = FALSE); - MEM_TYPE_NEW(LLMemType::MTYPE_OBJECT); virtual void markDead(); // Mark this object as dead, and clean up its references BOOL isDead() const {return mDead;} @@ -157,7 +143,7 @@ public: LLNameValue* getNVPair(const std::string& name) const; // null if no name value pair by that name // Object create and update functions - virtual BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + virtual void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); // Types of media we can associate enum { MEDIA_NONE = 0, MEDIA_SET = 1 }; @@ -188,8 +174,6 @@ public: virtual void updateRadius() {}; virtual F32 getVObjRadius() const; // default implemenation is mDrawable->getRadius() - BOOL isJointChild() const { return mJointInfo ? TRUE : FALSE; } - EHavokJointType getJointType() const { return mJointInfo ? mJointInfo->mJointType : HJT_INVALID; } // for jointed and other parent-relative hacks LLViewerObject* getSubParent(); const LLViewerObject* getSubParent() const; @@ -232,6 +216,8 @@ public: const LLUUID &getID() const { return mID; } U32 getLocalID() const { return mLocalID; } U32 getCRC() const { return mTotalCRC; } + S32 getListIndex() const { return mListIndex; } + void setListIndex(S32 idx) { mListIndex = idx; } virtual BOOL isFlexible() const { return FALSE; } virtual BOOL isSculpted() const { return FALSE; } @@ -606,6 +592,9 @@ public: // Last total CRC received from sim, used for caching U32 mTotalCRC; + // index into LLViewerObjectList::mActiveObjects or -1 if not in list + S32 mListIndex; + LLPointer<LLViewerTexture> *mTEImages; // Selection, picking and rendering variables @@ -734,8 +723,8 @@ protected: F32 mTimeDilation; // Time dilation sent with the object. F32 mRotTime; // Amount (in seconds) that object has rotated according to angular velocity (llSetTargetOmega) LLQuaternion mAngularVelocityRot; // accumulated rotation from the angular velocity computations + LLQuaternion mPreviousRotation; - LLVOJointInfo* mJointInfo; U8 mState; // legacy LLViewerObjectMedia* mMedia; // NULL if no media associated U8 mClickAction; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 28298cedf9..4049e31472 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -49,6 +49,8 @@ #include "llstring.h" #include "llhudnametag.h" #include "lldrawable.h" +#include "llflexibleobject.h" +#include "llviewertextureanim.h" #include "xform.h" #include "llsky.h" #include "llviewercamera.h" @@ -78,11 +80,9 @@ extern F32 gMinObjectDistance; extern BOOL gAnimateTextures; -void dialog_refresh_all(); +#define MAX_CONCURRENT_PHYSICS_REQUESTS 256 -#define CULL_VIS -//#define ORPHAN_SPAM -//#define IGNORE_DEAD +void dialog_refresh_all(); // Global lists of objects - should go away soon. LLViewerObjectList gObjectList; @@ -230,7 +230,6 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, LLDataPacker* dpp, BOOL just_created) { - LLMemType mt(LLMemType::MTYPE_OBJECT_PROCESS_UPDATE_CORE); LLMessageSystem* msg = gMessageSystem; // ignore returned flags @@ -283,7 +282,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, const EObjectUpdateType update_type, bool cached, bool compressed) { - LLMemType mt(LLMemType::MTYPE_OBJECT_PROCESS_UPDATE); LLFastTimer t(FTM_PROCESS_OBJECTS); LLVector3d camera_global = gAgentCamera.getCameraPositionGlobal(); @@ -334,6 +332,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, U64 region_handle; mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle); + LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle); if (!regionp) @@ -345,16 +344,14 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, U8 compressed_dpbuffer[2048]; LLDataPackerBinaryBuffer compressed_dp(compressed_dpbuffer, 2048); LLDataPacker *cached_dpp = NULL; - -#if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->beginObjectUpdateEvents(regionp); -#endif + LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance(); for (i = 0; i < num_objects; i++) { // timer is unused? LLTimer update_timer; BOOL justCreated = FALSE; + S32 msg_size = 0; if (cached) { @@ -362,6 +359,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, U32 crc; mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, id, i); mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_CRC, crc, i); + msg_size += sizeof(U32) * 2; // Lookup data packer and add this id to cache miss lists if necessary. U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE; @@ -377,9 +375,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, else { // Cache Miss. - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->recordCacheMissEvent(id, update_type, cache_miss_type); - #endif + recorder.cacheMissEvent(id, update_type, cache_miss_type, msg_size); continue; // no data packer, skip this object } @@ -422,6 +418,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, else if (update_type != OUT_FULL) // !compressed, !OUT_FULL ==> OUT_FULL_CACHED only? { mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); + msg_size += sizeof(U32); + getUUIDFromLocal(fullid, local_id, gMessageSystem->getSenderIP(), @@ -436,6 +434,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_FullID, fullid, i); mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); + msg_size += sizeof(LLUUID); + msg_size += sizeof(U32); // llinfos << "Full Update, obj " << local_id << ", global ID" << fullid << "from " << mesgsys->getSender() << llendl; } objectp = findObject(fullid); @@ -481,9 +481,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (update_type == OUT_TERSE_IMPROVED) { // llinfos << "terse update for an unknown object (compressed):" << fullid << llendl; - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); - #endif + recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } } @@ -495,22 +493,20 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (update_type != OUT_FULL) { //llinfos << "terse update for an unknown object:" << fullid << llendl; - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); - #endif + recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } mesgsys->getU8Fast(_PREHASH_ObjectData, _PREHASH_PCode, pcode, i); + msg_size += sizeof(U8); + } #ifdef IGNORE_DEAD if (mDeadObjects.find(fullid) != mDeadObjects.end()) { mNumDeadObjectUpdates++; //llinfos << "update for a dead object:" << fullid << llendl; - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); - #endif + recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } #endif @@ -519,9 +515,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (!objectp) { llinfos << "createObject failure for object: " << fullid << llendl; - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); - #endif + recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } justCreated = TRUE; @@ -547,12 +541,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { bCached = true; - #if LL_RECORD_VIEWER_STATS LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); - LLViewerStatsRecorder::instance()->recordCacheFullUpdate(local_id, update_type, result, objectp); - #else - objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); - #endif + recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size); } } else if (cached) // Cache hit only? @@ -568,16 +558,12 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } processUpdateCore(objectp, user_data, i, update_type, NULL, justCreated); } - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->recordObjectUpdateEvent(local_id, update_type, objectp); - #endif + recorder.objectUpdateEvent(local_id, update_type, objectp, msg_size); objectp->setLastUpdateType(update_type); objectp->setLastUpdateCached(bCached); } -#if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->endObjectUpdateEvents(); -#endif + recorder.log(0.2f); LLVOAvatar::cullAvatarsByPixelArea(); } @@ -866,8 +852,6 @@ private: void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - // Update globals LLViewerObject::setVelocityInterpolate( gSavedSettings.getBOOL("VelocityInterpolate") ); LLViewerObject::setPingInterpolate( gSavedSettings.getBOOL("PingInterpolate") ); @@ -909,28 +893,35 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) const F64 frame_time = LLFrameTimer::getElapsedSeconds(); - std::vector<LLViewerObject*> kill_list; - S32 num_active_objects = 0; LLViewerObject *objectp = NULL; // Make a copy of the list in case something in idleUpdate() messes with it - std::vector<LLViewerObject*> idle_list; + static std::vector<LLViewerObject*> idle_list; + + U32 idle_count = 0; static LLFastTimer::DeclareTimer idle_copy("Idle Copy"); { LLFastTimer t(idle_copy); - idle_list.reserve( mActiveObjects.size() ); - for (std::set<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin(); + for (std::vector<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin(); active_iter != mActiveObjects.end(); active_iter++) { objectp = *active_iter; if (objectp) { + if (idle_count >= idle_list.size()) + { idle_list.push_back( objectp ); } else + { + idle_list[idle_count] = objectp; + } + ++idle_count; + } + else { // There shouldn't be any NULL pointers in the list, but they have caused // crashes before. This may be idleUpdate() messing with the list. llwarns << "LLViewerObjectList::update has a NULL objectp" << llendl; @@ -938,10 +929,13 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) } } + std::vector<LLViewerObject*>::iterator idle_end = idle_list.begin()+idle_count; + if (gSavedSettings.getBOOL("FreezeTime")) { + for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin(); - iter != idle_list.end(); iter++) + iter != idle_end; iter++) { objectp = *iter; if (objectp->isAvatar()) @@ -953,26 +947,22 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) else { for (std::vector<LLViewerObject*>::iterator idle_iter = idle_list.begin(); - idle_iter != idle_list.end(); idle_iter++) + idle_iter != idle_end; idle_iter++) { objectp = *idle_iter; - if (!objectp->idleUpdate(agent, world, frame_time)) - { - // If Idle Update returns false, kill object! - kill_list.push_back(objectp); + llassert(objectp->isActive()); + objectp->idleUpdate(agent, world, frame_time); + } - else - { - num_active_objects++; + + //update flexible objects + LLVolumeImplFlexible::updateClass(); + + //update animated textures + LLViewerTextureAnim::updateClass(); } - } - for (std::vector<LLViewerObject*>::iterator kill_iter = kill_list.begin(); - kill_iter != kill_list.end(); kill_iter++) - { - objectp = *kill_iter; - killObject(objectp); - } - } + + fetchObjectCosts(); fetchPhysicsFlags(); @@ -1040,7 +1030,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) */ LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size()); - LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(num_active_objects); + LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(idle_count); LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled); LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled); } @@ -1061,8 +1051,6 @@ void LLViewerObjectList::fetchObjectCosts() LLSD id_list; U32 object_index = 0; - U32 count = 0; - for ( std::set<LLUUID>::iterator iter = mStaleObjectCost.begin(); iter != mStaleObjectCost.end(); @@ -1079,7 +1067,7 @@ void LLViewerObjectList::fetchObjectCosts() mStaleObjectCost.erase(iter++); - if (count++ >= 450) + if (object_index >= MAX_CONCURRENT_PHYSICS_REQUESTS) { break; } @@ -1124,7 +1112,7 @@ void LLViewerObjectList::fetchPhysicsFlags() for ( std::set<LLUUID>::iterator iter = mStalePhysicsFlags.begin(); iter != mStalePhysicsFlags.end(); - ++iter) + ) { // Check to see if a request for this object // has already been made. @@ -1134,12 +1122,14 @@ void LLViewerObjectList::fetchPhysicsFlags() mPendingPhysicsFlags.insert(*iter); id_list[object_index++] = *iter; } - } - // id_list should now contain all - // requests in mStalePhysicsFlags before, so clear - // it now - mStalePhysicsFlags.clear(); + mStalePhysicsFlags.erase(iter++); + + if (object_index >= MAX_CONCURRENT_PHYSICS_REQUESTS) + { + break; + } + } if ( id_list.size() > 0 ) { @@ -1173,7 +1163,6 @@ void LLViewerObjectList::clearDebugText() void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) { - LLMemType mt(LLMemType::MTYPE_OBJECT); if (mDeadObjects.find(objectp->mID) != mDeadObjects.end()) { llinfos << "Object " << objectp->mID << " already on dead list!" << llendl; @@ -1201,7 +1190,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) { //llinfos << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list in cleanupReferences." << llendl; objectp->setOnActiveList(FALSE); - mActiveObjects.erase(objectp); + removeFromActiveList(objectp); } if (objectp->isOnMap()) @@ -1378,9 +1367,29 @@ void LLViewerObjectList::cleanDeadObjects(BOOL use_timer) mNumDeadObjects = 0; } +void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp) +{ + S32 idx = objectp->getListIndex(); + if (idx != -1) + { //remove by moving last element to this object's position + llassert(mActiveObjects[idx] == objectp); + + objectp->setListIndex(-1); + + S32 last_index = mActiveObjects.size()-1; + + if (idx != last_index) + { + mActiveObjects[idx] = mActiveObjects[last_index]; + mActiveObjects[idx]->setListIndex(idx); + } + + mActiveObjects.pop_back(); + } +} + void LLViewerObjectList::updateActive(LLViewerObject *objectp) { - LLMemType mt(LLMemType::MTYPE_OBJECT); if (objectp->isDead()) { return; // We don't update dead objects! @@ -1392,16 +1401,38 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp) if (active) { //llinfos << "Adding " << objectp->mID << " " << objectp->getPCodeString() << " to active list." << llendl; - mActiveObjects.insert(objectp); + S32 idx = objectp->getListIndex(); + if (idx <= -1) + { + mActiveObjects.push_back(objectp); + objectp->setListIndex(mActiveObjects.size()-1); objectp->setOnActiveList(TRUE); } else { + llassert(idx < mActiveObjects.size()); + llassert(mActiveObjects[idx] == objectp); + + if (idx >= mActiveObjects.size() || + mActiveObjects[idx] != objectp) + { + llwarns << "Invalid object list index detected!" << llendl; + } + } + } + else + { //llinfos << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list." << llendl; - mActiveObjects.erase(objectp); + removeFromActiveList(objectp); objectp->setOnActiveList(FALSE); } } + + //post condition: if object is active, it must be on the active list + llassert(!active || std::find(mActiveObjects.begin(), mActiveObjects.end(), objectp) != mActiveObjects.end()); + + //post condition: if object is not active, it must not be on the active list + llassert(active || std::find(mActiveObjects.begin(), mActiveObjects.end(), objectp) == mActiveObjects.end()); } void LLViewerObjectList::updateObjectCost(LLViewerObject* object) @@ -1472,6 +1503,10 @@ void LLViewerObjectList::onPhysicsFlagsFetchFailure(const LLUUID& object_id) mPendingPhysicsFlags.erase(object_id); } +static LLFastTimer::DeclareTimer FTM_SHIFT_OBJECTS("Shift Objects"); +static LLFastTimer::DeclareTimer FTM_PIPELINE_SHIFT("Pipeline Shift"); +static LLFastTimer::DeclareTimer FTM_REGION_SHIFT("Region Shift"); + void LLViewerObjectList::shiftObjects(const LLVector3 &offset) { // This is called when we shift our origin when we cross region boundaries... @@ -1483,6 +1518,8 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) return; } + LLFastTimer t(FTM_SHIFT_OBJECTS); + LLViewerObject *objectp; for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) { @@ -1499,9 +1536,16 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) } } + { + LLFastTimer t(FTM_PIPELINE_SHIFT); gPipeline.shiftObjects(offset); + } + + { + LLFastTimer t(FTM_REGION_SHIFT); LLWorld::getInstance()->shiftRegions(offset); } +} void LLViewerObjectList::repartitionObjects() { @@ -1827,7 +1871,6 @@ void LLViewerObjectList::resetObjectBeacons() LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLViewerRegion *regionp) { - LLMemType mt(LLMemType::MTYPE_OBJECT); LLUUID fullid; fullid.generate(); @@ -1848,13 +1891,9 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi } -static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object"); - LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id, const LLHost &sender) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - LLFastTimer t(FTM_CREATE_OBJECT); LLUUID fullid; if (uuid == LLUUID::null) @@ -1918,7 +1957,6 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port) { - LLMemType mt(LLMemType::MTYPE_OBJECT); #ifdef ORPHAN_SPAM llinfos << "Orphaning object " << childp->getID() << " with parent " << parent_id << llendl; #endif diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 64925f46ae..449a4633ff 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -118,7 +118,9 @@ public: void dirtyAllObjectInventory(); + void removeFromActiveList(LLViewerObject* objectp); void updateActive(LLViewerObject *objectp); + void updateAvatarVisibility(); // Selection related stuff @@ -127,6 +129,7 @@ public: LLViewerObject *getSelectedObject(const U32 object_id); inline S32 getNumObjects() { return (S32) mObjects.size(); } + inline S32 getNumActiveObjects() { return (S32) mActiveObjects.size(); } void addToMap(LLViewerObject *objectp); void removeFromMap(LLViewerObject *objectp); @@ -197,7 +200,7 @@ protected: typedef std::vector<LLPointer<LLViewerObject> > vobj_list_t; vobj_list_t mObjects; - std::set<LLPointer<LLViewerObject> > mActiveObjects; + std::vector<LLPointer<LLViewerObject> > mActiveObjects; vobj_list_t mMapObjects; diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 2bb2e92279..77e382b8c7 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1658,9 +1658,6 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use // Request access list information for this land parcel_mgr.sendParcelAccessListRequest(AL_ACCESS | AL_BAN); - // Request the media url filter list for this land - parcel_mgr.requestParcelMediaURLFilter(); - // Request dwell for this land, if it's not public land. parcel_mgr.mSelectedDwell = DWELL_NAN; if (0 != local_id) @@ -1989,67 +1986,6 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 which) } } -class LLParcelMediaURLFilterResponder : public LLHTTPClient::Responder -{ - virtual void result(const LLSD& content) - { - LLViewerParcelMgr::getInstance()->receiveParcelMediaURLFilter(content); - } -}; - -void LLViewerParcelMgr::requestParcelMediaURLFilter() -{ - if (!mSelected) - { - return; - } - - LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth ); - if (!region) - { - return; - } - - LLParcel* parcel = mCurrentParcel; - if (!parcel) - { - llwarns << "no parcel" << llendl; - return; - } - - LLSD body; - body["local-id"] = parcel->getLocalID(); - body["list"] = parcel->getMediaURLFilterList(); - - std::string url = region->getCapability("ParcelMediaURLFilterList"); - if (!url.empty()) - { - LLHTTPClient::post(url, body, new LLParcelMediaURLFilterResponder); - } - else - { - llwarns << "can't get ParcelMediaURLFilterList cap" << llendl; - } -} - - -void LLViewerParcelMgr::receiveParcelMediaURLFilter(const LLSD &content) -{ - if (content.has("list")) - { - LLParcel* parcel = LLViewerParcelMgr::getInstance()->mCurrentParcel; - if (!parcel) return; - - if (content["local-id"].asInteger() == parcel->getLocalID()) - { - parcel->setMediaURLFilterList(content["list"]); - - LLViewerParcelMgr::getInstance()->notifyObservers(); - } - } -} - - void LLViewerParcelMgr::deedLandToGroup() { std::string group_name; diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h index 2a11549426..6183b7e90e 100644 --- a/indra/newview/llviewerparcelmgr.h +++ b/indra/newview/llviewerparcelmgr.h @@ -223,11 +223,6 @@ public: // Takes an Access List flag, like AL_ACCESS or AL_BAN void sendParcelAccessListRequest(U32 flags); - // asks for the parcel's media url filter list - void requestParcelMediaURLFilter(); - // receive the response - void receiveParcelMediaURLFilter(const LLSD &content); - // Dwell is not part of the usual parcel update information because the // simulator doesn't actually know the per-parcel dwell. Ack! We have // to get it out of the database. diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp index a0cf2fc803..a1c12c5cd6 100644 --- a/indra/newview/llviewerparceloverlay.cpp +++ b/indra/newview/llviewerparceloverlay.cpp @@ -828,7 +828,6 @@ void LLViewerParcelOverlay::updateGL() void LLViewerParcelOverlay::idleUpdate(bool force_update) { - LLMemType mt_iup(LLMemType::MTYPE_IDLE_UPDATE_PARCEL_OVERLAY); if (gGLManager.mIsDisabled) { return; diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 345023dbfa..6bd9f66b9c 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -79,7 +79,6 @@ LLViewerPart::LLViewerPart() : mVPCallback(NULL), mImagep(NULL) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mPartSourcep = NULL; ++LLViewerPartSim::sParticleCount2 ; @@ -87,7 +86,6 @@ LLViewerPart::LLViewerPart() : LLViewerPart::~LLViewerPart() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mPartSourcep = NULL; --LLViewerPartSim::sParticleCount2 ; @@ -95,7 +93,6 @@ LLViewerPart::~LLViewerPart() void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerTexture *imagep, LLVPCallback cb) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mPartID = LLViewerPart::sNextPartID; LLViewerPart::sNextPartID++; mFlags = 0x00f; @@ -120,7 +117,6 @@ void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerTexture * LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 box_side, bool hud) : mHud(hud) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mVOPartGroupp = NULL; mUniformParticles = TRUE; @@ -177,7 +173,6 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 bo LLViewerPartGroup::~LLViewerPartGroup() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); cleanup(); S32 count = (S32) mParticles.size(); @@ -192,7 +187,6 @@ LLViewerPartGroup::~LLViewerPartGroup() void LLViewerPartGroup::cleanup() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (mVOPartGroupp) { if (!mVOPartGroupp->isDead()) @@ -205,7 +199,6 @@ void LLViewerPartGroup::cleanup() BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if ((pos.mV[VX] < mMinObjPos.mV[VX]) || (pos.mV[VY] < mMinObjPos.mV[VY]) || (pos.mV[VZ] < mMinObjPos.mV[VZ])) @@ -233,8 +226,6 @@ BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size) BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - if (part->mFlags & LLPartData::LL_PART_HUD && !mHud) { return FALSE; @@ -261,7 +252,6 @@ BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size) void LLViewerPartGroup::updateParticles(const F32 lastdt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 dt; LLVector3 gravity(0.f, 0.f, GRAVITY); @@ -429,7 +419,6 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt) void LLViewerPartGroup::shift(const LLVector3 &offset) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mCenterAgent += offset; mMinObjPos += offset; mMaxObjPos += offset; @@ -442,8 +431,6 @@ void LLViewerPartGroup::shift(const LLVector3 &offset) void LLViewerPartGroup::removeParticlesByID(const U32 source_id) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - for (S32 i = 0; i < (S32)mParticles.size(); i++) { if(mParticles[i]->mPartSourcep->getID() == source_id) @@ -475,7 +462,6 @@ void LLViewerPartSim::checkParticleCount(U32 size) LLViewerPartSim::LLViewerPartSim() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); sMaxParticleCount = llmin(gSavedSettings.getS32("RenderMaxPartCount"), LL_MAX_PARTICLE_COUNT); static U32 id_seed = 0; mID = ++id_seed; @@ -484,7 +470,6 @@ LLViewerPartSim::LLViewerPartSim() void LLViewerPartSim::destroyClass() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); S32 i; S32 count; @@ -500,9 +485,9 @@ void LLViewerPartSim::destroyClass() mViewerPartSources.clear(); } +//static BOOL LLViewerPartSim::shouldAddPart() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (sParticleCount > PART_THROTTLE_THRESHOLD*sMaxParticleCount) { @@ -525,7 +510,6 @@ BOOL LLViewerPartSim::shouldAddPart() void LLViewerPartSim::addPart(LLViewerPart* part) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (sParticleCount < MAX_PART_COUNT) { put(part); @@ -541,7 +525,6 @@ void LLViewerPartSim::addPart(LLViewerPart* part) LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); const F32 MAX_MAG = 1000000.f*1000000.f; // 1 million LLViewerPartGroup *return_group = NULL ; if (part->mPosAgent.magVecSquared() > MAX_MAG || !part->mPosAgent.isFinite()) @@ -599,7 +582,6 @@ LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part) LLViewerPartGroup *LLViewerPartSim::createViewerPartGroup(const LLVector3 &pos_agent, const F32 desired_size, bool hud) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); //find a box that has a center position divisible by PART_SIM_BOX_SIDE that encompasses //pos_agent LLViewerPartGroup *groupp = new LLViewerPartGroup(pos_agent, desired_size, hud); @@ -632,8 +614,6 @@ static LLFastTimer::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles"); void LLViewerPartSim::updateSimulation() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - static LLFrameTimer update_timer; const F32 dt = llmin(update_timer.getElapsedTimeAndResetF32(), 0.1f); @@ -800,7 +780,6 @@ void LLViewerPartSim::updatePartBurstRate() void LLViewerPartSim::addPartSource(LLPointer<LLViewerPartSource> sourcep) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!sourcep) { llwarns << "Null part source!" << llendl; @@ -817,7 +796,6 @@ void LLViewerPartSim::removeLastCreatedSource() void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); for (group_list_t::iterator i = mViewerPartGroups.begin(); i != mViewerPartGroups.end(); ) { group_list_t::iterator iter = i++; @@ -832,7 +810,6 @@ void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp) void LLViewerPartSim::clearParticlesByID(const U32 system_id) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); for (group_list_t::iterator g = mViewerPartGroups.begin(); g != mViewerPartGroups.end(); ++g) { (*g)->removeParticlesByID(system_id); @@ -850,7 +827,6 @@ void LLViewerPartSim::clearParticlesByID(const U32 system_id) void LLViewerPartSim::clearParticlesByOwnerID(const LLUUID& task_id) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); for (source_list_t::iterator iter = mViewerPartSources.begin(); iter != mViewerPartSources.end(); ++iter) { if ((*iter)->getOwnerUUID() == task_id) diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h index c9959c63ec..c91fcf0691 100644 --- a/indra/newview/llviewerpartsim.h +++ b/indra/newview/llviewerpartsim.h @@ -142,7 +142,7 @@ public: void cleanupRegion(LLViewerRegion *regionp); - BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping) + static BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping) F32 maxRate() // Return maximum particle generation rate { if (sParticleCount >= MAX_PART_COUNT) diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp index 4af92e79ff..b311f659fb 100644 --- a/indra/newview/llviewerpartsource.cpp +++ b/indra/newview/llviewerpartsource.cpp @@ -90,7 +90,6 @@ void LLViewerPartSource::setStart() LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp) : LLViewerPartSource(LL_PART_SOURCE_SCRIPT) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); llassert(source_objp); mSourceObjectp = source_objp; mPosAgent = mSourceObjectp->getPositionAgent(); @@ -102,7 +101,6 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp) void LLViewerPartSourceScript::setDead() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mIsDead = TRUE; mSourceObjectp = NULL; mTargetObjectp = NULL; @@ -113,7 +111,6 @@ void LLViewerPartSourceScript::update(const F32 dt) if( mIsSuspended ) return; - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 old_update_time = mLastUpdateTime; mLastUpdateTime += dt; @@ -394,7 +391,6 @@ void LLViewerPartSourceScript::update(const F32 dt) // static LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, const S32 block_num) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!pssp) { if (LLPartSysData::isNullPS(block_num)) @@ -436,7 +432,6 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!pssp) { LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp); @@ -470,8 +465,6 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer /* static */ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::createPSS(LLViewerObject *source_objp, const LLPartSysData& particle_parameters) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp); new_pssp->mPartSysData = particle_parameters; @@ -487,13 +480,11 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::createPSS(LLViewer void LLViewerPartSourceScript::setImage(LLViewerTexture *imagep) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mImagep = imagep; } void LLViewerPartSourceScript::setTargetObject(LLViewerObject *objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mTargetObjectp = objp; } @@ -509,7 +500,6 @@ LLViewerPartSourceSpiral::LLViewerPartSourceSpiral(const LLVector3 &pos) : void LLViewerPartSourceSpiral::setDead() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mIsDead = TRUE; mSourceObjectp = NULL; } @@ -517,7 +507,6 @@ void LLViewerPartSourceSpiral::setDead() void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 frac = part.mLastUpdateTime/part.mMaxAge; LLVector3 center_pos; @@ -542,7 +531,6 @@ void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt) void LLViewerPartSourceSpiral::update(const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!mImagep) { mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c"); @@ -588,7 +576,6 @@ void LLViewerPartSourceSpiral::update(const F32 dt) void LLViewerPartSourceSpiral::setSourceObject(LLViewerObject *objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mSourceObjectp = objp; } @@ -612,7 +599,6 @@ LLViewerPartSourceBeam::~LLViewerPartSourceBeam() void LLViewerPartSourceBeam::setDead() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mIsDead = TRUE; mSourceObjectp = NULL; mTargetObjectp = NULL; @@ -626,7 +612,6 @@ void LLViewerPartSourceBeam::setColor(const LLColor4 &color) void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 frac = part.mLastUpdateTime/part.mMaxAge; LLViewerPartSource *ps = (LLViewerPartSource*)part.mPartSourcep; @@ -671,7 +656,6 @@ void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt) void LLViewerPartSourceBeam::update(const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); const F32 RATE = 0.025f; mLastUpdateTime += dt; @@ -743,13 +727,11 @@ void LLViewerPartSourceBeam::update(const F32 dt) void LLViewerPartSourceBeam::setSourceObject(LLViewerObject* objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mSourceObjectp = objp; } void LLViewerPartSourceBeam::setTargetObject(LLViewerObject* objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mTargetObjectp = objp; } @@ -764,7 +746,6 @@ LLViewerPartSourceChat::LLViewerPartSourceChat(const LLVector3 &pos) : void LLViewerPartSourceChat::setDead() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mIsDead = TRUE; mSourceObjectp = NULL; } @@ -772,7 +753,6 @@ void LLViewerPartSourceChat::setDead() void LLViewerPartSourceChat::updatePart(LLViewerPart &part, const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 frac = part.mLastUpdateTime/part.mMaxAge; LLVector3 center_pos; @@ -797,7 +777,6 @@ void LLViewerPartSourceChat::updatePart(LLViewerPart &part, const F32 dt) void LLViewerPartSourceChat::update(const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!mImagep) { mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c"); @@ -853,7 +832,6 @@ void LLViewerPartSourceChat::update(const F32 dt) void LLViewerPartSourceChat::setSourceObject(LLViewerObject *objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mSourceObjectp = objp; } diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index 6c8a827ba3..0316f79973 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -59,8 +59,6 @@ #include "indra_constants.h" #include "llinitparam.h" -//#include "linden_common.h" -//#include "llpreprocessor.h" #include "llallocator.h" #include "llapp.h" #include "llcriticaldamp.h" @@ -77,10 +75,8 @@ #include "llprocessor.h" #include "llrefcount.h" #include "llsafehandle.h" -//#include "llsecondlifeurls.h" #include "llsd.h" #include "llsingleton.h" -#include "llstat.h" #include "llstl.h" #include "llstrider.h" #include "llstring.h" @@ -88,11 +84,8 @@ #include "llthread.h" #include "lltimer.h" #include "lluuidhashmap.h" -//#include "processor.h" #include "stdenums.h" #include "stdtypes.h" -//#include "string_table.h" -//#include "timer.h" #include "timing.h" #include "u64.h" diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 493195aaa3..e4234a538d 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -255,10 +255,9 @@ public: } } - static boost::intrusive_ptr<BaseCapabilitiesComplete> build( U64 region_handle, S32 id ) + static BaseCapabilitiesComplete* build( U64 region_handle, S32 id ) { - return boost::intrusive_ptr<BaseCapabilitiesComplete>( - new BaseCapabilitiesComplete(region_handle, id) ); + return new BaseCapabilitiesComplete(region_handle, id); } private: @@ -720,7 +719,6 @@ void LLViewerRegion::dirtyHeights() BOOL LLViewerRegion::idleUpdate(F32 max_update_time) { - LLMemType mt_ivr(LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION); // did_update returns TRUE if we did at least one significant update BOOL did_update = mImpl->mLandp->idleUpdate(max_update_time); @@ -1343,11 +1341,8 @@ void LLViewerRegion::requestCacheMisses() mCacheDirty = TRUE ; // llinfos << "KILLDEBUG Sent cache miss full " << full_count << " crc " << crc_count << llendl; - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->beginObjectUpdateEvents(this); - LLViewerStatsRecorder::instance()->recordRequestCacheMissesEvent(full_count + crc_count); - LLViewerStatsRecorder::instance()->endObjectUpdateEvents(); - #endif + LLViewerStatsRecorder::instance().requestCacheMissesEvent(full_count + crc_count); + LLViewerStatsRecorder::instance().log(0.2f); } void LLViewerRegion::dumpCache() @@ -1487,7 +1482,8 @@ void LLViewerRegion::unpackRegionHandshake() // all of our terrain stuff, by if (compp->getParamsReady()) { - getLand().dirtyAllPatches(); + //this line creates frame stalls on region crossing and removing it appears to have no effect + //getLand().dirtyAllPatches(); } else { @@ -1523,11 +1519,9 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("CopyInventoryFromNotecard"); capabilityNames.append("CreateInventoryCategory"); capabilityNames.append("DispatchRegionInfo"); + capabilityNames.append("EnvironmentSettings"); capabilityNames.append("EstateChangeInfo"); capabilityNames.append("EventQueueGet"); - capabilityNames.append("EnvironmentSettings"); - capabilityNames.append("ObjectMedia"); - capabilityNames.append("ObjectMediaNavigate"); if (gSavedSettings.getBOOL("UseHTTPInventory")) { @@ -1538,22 +1532,23 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) } capabilityNames.append("GetDisplayNames"); - capabilityNames.append("GetTexture"); capabilityNames.append("GetMesh"); capabilityNames.append("GetObjectCost"); capabilityNames.append("GetObjectPhysicsData"); + capabilityNames.append("GetTexture"); + capabilityNames.append("GroupMemberData"); capabilityNames.append("GroupProposalBallot"); capabilityNames.append("HomeLocation"); capabilityNames.append("LandResources"); capabilityNames.append("MapLayer"); capabilityNames.append("MapLayerGod"); - capabilityNames.append("MeshUploadFlag"); + capabilityNames.append("MeshUploadFlag"); capabilityNames.append("NavMeshGenerationStatus"); capabilityNames.append("NewFileAgentInventory"); + capabilityNames.append("ObjectMedia"); + capabilityNames.append("ObjectMediaNavigate"); capabilityNames.append("ObjectNavMeshProperties"); capabilityNames.append("ParcelPropertiesUpdate"); - capabilityNames.append("ParcelMediaURLFilterList"); - capabilityNames.append("ParcelNavigateMedia"); capabilityNames.append("ParcelVoiceInfoRequest"); capabilityNames.append("ProductInfoRequest"); capabilityNames.append("ProvisionVoiceAccountRequest"); @@ -1567,10 +1562,9 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("SendUserReport"); capabilityNames.append("SendUserReportWithScreenshot"); capabilityNames.append("ServerReleaseNotes"); - capabilityNames.append("SimConsole"); - capabilityNames.append("SimulatorFeatures"); capabilityNames.append("SetDisplayName"); capabilityNames.append("SimConsoleAsync"); + capabilityNames.append("SimulatorFeatures"); capabilityNames.append("StartGroupProposal"); capabilityNames.append("TerrainNavMeshProperties"); capabilityNames.append("TextureStats"); @@ -1578,16 +1572,16 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("UpdateAgentInformation"); capabilityNames.append("UpdateAgentLanguage"); capabilityNames.append("UpdateGestureAgentInventory"); - capabilityNames.append("UpdateNotecardAgentInventory"); - capabilityNames.append("UpdateScriptAgent"); capabilityNames.append("UpdateGestureTaskInventory"); + capabilityNames.append("UpdateNotecardAgentInventory"); capabilityNames.append("UpdateNotecardTaskInventory"); + capabilityNames.append("UpdateScriptAgent"); capabilityNames.append("UpdateScriptTask"); capabilityNames.append("UploadBakedTexture"); capabilityNames.append("ViewerMetrics"); capabilityNames.append("ViewerStartAuction"); capabilityNames.append("ViewerStats"); - + // Please add new capabilities alphabetically to reduce // merge conflicts. } diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index d9918e633b..ba9818946c 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -529,9 +529,10 @@ void LLViewerShaderMgr::setShaders() { loaded = loadShadersInterface(); } - + if (loaded) - { + + { loaded = loadTransformShaders(); } @@ -2024,18 +2025,19 @@ BOOL LLViewerShaderMgr::loadShadersObject() if (success) { gObjectPreviewProgram.mName = "Simple Shader"; - gObjectPreviewProgram.mFeatures.calculatesLighting = true; - gObjectPreviewProgram.mFeatures.calculatesAtmospherics = true; - gObjectPreviewProgram.mFeatures.hasGamma = true; - gObjectPreviewProgram.mFeatures.hasAtmospherics = true; - gObjectPreviewProgram.mFeatures.hasLighting = true; + gObjectPreviewProgram.mFeatures.calculatesLighting = false; + gObjectPreviewProgram.mFeatures.calculatesAtmospherics = false; + gObjectPreviewProgram.mFeatures.hasGamma = false; + gObjectPreviewProgram.mFeatures.hasAtmospherics = false; + gObjectPreviewProgram.mFeatures.hasLighting = false; gObjectPreviewProgram.mFeatures.mIndexedTextureChannels = 0; gObjectPreviewProgram.mFeatures.disableTextureIndex = true; gObjectPreviewProgram.mShaderFiles.clear(); gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewF.glsl", GL_FRAGMENT_SHADER_ARB)); gObjectPreviewProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT]; success = gObjectPreviewProgram.createShader(NULL, NULL); + gObjectPreviewProgram.mFeatures.hasLighting = true; } if (success) diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 8fef13a6bc..35839ae459 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -290,19 +290,19 @@ LLViewerStats::~LLViewerStats() void LLViewerStats::resetStats() { - LLViewerStats::getInstance()->mKBitStat.reset(); - LLViewerStats::getInstance()->mLayersKBitStat.reset(); - LLViewerStats::getInstance()->mObjectKBitStat.reset(); - LLViewerStats::getInstance()->mTextureKBitStat.reset(); - LLViewerStats::getInstance()->mVFSPendingOperations.reset(); - LLViewerStats::getInstance()->mAssetKBitStat.reset(); - LLViewerStats::getInstance()->mPacketsInStat.reset(); - LLViewerStats::getInstance()->mPacketsLostStat.reset(); - LLViewerStats::getInstance()->mPacketsOutStat.reset(); - LLViewerStats::getInstance()->mFPSStat.reset(); - LLViewerStats::getInstance()->mTexturePacketsStat.reset(); - - LLViewerStats::getInstance()->mAgentPositionSnaps.reset(); + LLViewerStats& stats = LLViewerStats::instance(); + stats.mKBitStat.reset(); + stats.mLayersKBitStat.reset(); + stats.mObjectKBitStat.reset(); + stats.mTextureKBitStat.reset(); + stats.mVFSPendingOperations.reset(); + stats.mAssetKBitStat.reset(); + stats.mPacketsInStat.reset(); + stats.mPacketsLostStat.reset(); + stats.mPacketsOutStat.reset(); + stats.mFPSStat.reset(); + stats.mTexturePacketsStat.reset(); + stats.mAgentPositionSnaps.reset(); } @@ -327,55 +327,55 @@ void LLViewerStats::updateFrameStats(const F64 time_diff) { if (mPacketsLostPercentStat.getCurrent() > 5.0) { - incStat(LLViewerStats::ST_LOSS_05_SECONDS, time_diff); + incStat(ST_LOSS_05_SECONDS, time_diff); } if (mSimFPS.getCurrent() < 20.f && mSimFPS.getCurrent() > 0.f) { - incStat(LLViewerStats::ST_SIM_FPS_20_SECONDS, time_diff); + incStat(ST_SIM_FPS_20_SECONDS, time_diff); } if (mSimPhysicsFPS.getCurrent() < 20.f && mSimPhysicsFPS.getCurrent() > 0.f) { - incStat(LLViewerStats::ST_PHYS_FPS_20_SECONDS, time_diff); + incStat(ST_PHYS_FPS_20_SECONDS, time_diff); } if (time_diff >= 0.5) { - incStat(LLViewerStats::ST_FPS_2_SECONDS, time_diff); + incStat(ST_FPS_2_SECONDS, time_diff); } if (time_diff >= 0.125) { - incStat(LLViewerStats::ST_FPS_8_SECONDS, time_diff); + incStat(ST_FPS_8_SECONDS, time_diff); } if (time_diff >= 0.1) { - incStat(LLViewerStats::ST_FPS_10_SECONDS, time_diff); + incStat(ST_FPS_10_SECONDS, time_diff); } if (gFrameCount && mLastTimeDiff > 0.0) { // new "stutter" meter - setStat(LLViewerStats::ST_FPS_DROP_50_RATIO, - (getStat(LLViewerStats::ST_FPS_DROP_50_RATIO) * (F64)(gFrameCount - 1) + + setStat(ST_FPS_DROP_50_RATIO, + (getStat(ST_FPS_DROP_50_RATIO) * (F64)(gFrameCount - 1) + (time_diff >= 2.0 * mLastTimeDiff ? 1.0 : 0.0)) / gFrameCount); // old stats that were never really used - setStat(LLViewerStats::ST_FRAMETIME_JITTER, - (getStat(LLViewerStats::ST_FRAMETIME_JITTER) * (gFrameCount - 1) + + setStat(ST_FRAMETIME_JITTER, + (getStat(ST_FRAMETIME_JITTER) * (gFrameCount - 1) + fabs(mLastTimeDiff - time_diff) / mLastTimeDiff) / gFrameCount); F32 average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount; - setStat(LLViewerStats::ST_FRAMETIME_SLEW, - (getStat(LLViewerStats::ST_FRAMETIME_SLEW) * (gFrameCount - 1) + + setStat(ST_FRAMETIME_SLEW, + (getStat(ST_FRAMETIME_SLEW) * (gFrameCount - 1) + fabs(average_frametime - time_diff) / average_frametime) / gFrameCount); F32 max_bandwidth = gViewerThrottle.getMaxBandwidth(); F32 delta_bandwidth = gViewerThrottle.getCurrentBandwidth() - max_bandwidth; - setStat(LLViewerStats::ST_DELTA_BANDWIDTH, delta_bandwidth / 1024.f); + setStat(ST_DELTA_BANDWIDTH, delta_bandwidth / 1024.f); - setStat(LLViewerStats::ST_MAX_BANDWIDTH, max_bandwidth / 1024.f); + setStat(ST_MAX_BANDWIDTH, max_bandwidth / 1024.f); } @@ -403,155 +403,8 @@ void LLViewerStats::addToMessage(LLSD &body) const << "; Count = " << mAgentPositionSnaps.getCount() << llendl; } -// static -// const std::string LLViewerStats::statTypeToText(EStatType type) -// { -// if (type >= 0 && type < ST_COUNT) -// { -// return STAT_INFO[type].mName; -// } -// else -// { -// return "Unknown statistic"; -// } -// } - // *NOTE:Mani The following methods used to exist in viewer.cpp // Moving them here, but not merging them into LLViewerStats yet. -void reset_statistics() -{ - if (LLSurface::sTextureUpdateTime) - { - LLSurface::sTexelsUpdated = 0; - LLSurface::sTextureUpdateTime = 0.f; - } -} - - -void output_statistics(void*) -{ - llinfos << "Number of orphans: " << gObjectList.getOrphanCount() << llendl; - llinfos << "Number of dead objects: " << gObjectList.mNumDeadObjects << llendl; - llinfos << "Num images: " << gTextureList.getNumImages() << llendl; - llinfos << "Texture usage: " << LLImageGL::sGlobalTextureMemoryInBytes << llendl; - llinfos << "Texture working set: " << LLImageGL::sBoundTextureMemoryInBytes << llendl; - llinfos << "Raw usage: " << LLImageRaw::sGlobalRawMemory << llendl; - llinfos << "Formatted usage: " << LLImageFormatted::sGlobalFormattedMemory << llendl; - llinfos << "Zombie Viewer Objects: " << LLViewerObject::getNumZombieObjects() << llendl; - llinfos << "Number of lights: " << gPipeline.getLightCount() << llendl; - - llinfos << "Memory Usage:" << llendl; - llinfos << "--------------------------------" << llendl; - llinfos << "Pipeline:" << llendl; - llinfos << llendl; - -#if LL_SMARTHEAP - llinfos << "--------------------------------" << llendl; - { - llinfos << "sizeof(LLVOVolume) = " << sizeof(LLVOVolume) << llendl; - - U32 total_pool_size = 0; - U32 total_used_size = 0; - MEM_POOL_INFO pool_info; - MEM_POOL_STATUS pool_status; - U32 pool_num = 0; - for(pool_status = MemPoolFirst( &pool_info, 1 ); - pool_status != MEM_POOL_END; - pool_status = MemPoolNext( &pool_info, 1 ) ) - { - llinfos << "Pool #" << pool_num << llendl; - if( MEM_POOL_OK != pool_status ) - { - llwarns << "Pool not ok" << llendl; - continue; - } - - llinfos << "Pool blockSizeFS " << pool_info.blockSizeFS - << " pageSize " << pool_info.pageSize - << llendl; - - U32 pool_count = MemPoolCount(pool_info.pool); - llinfos << "Blocks " << pool_count << llendl; - - U32 pool_size = MemPoolSize( pool_info.pool ); - if( pool_size == MEM_ERROR_RET ) - { - llinfos << "MemPoolSize() failed (" << pool_num << ")" << llendl; - } - else - { - llinfos << "MemPool Size " << pool_size / 1024 << "K" << llendl; - } - - total_pool_size += pool_size; - - if( !MemPoolLock( pool_info.pool ) ) - { - llinfos << "MemPoolLock failed (" << pool_num << ") " << llendl; - continue; - } - - U32 used_size = 0; - MEM_POOL_ENTRY entry; - entry.entry = NULL; - while( MemPoolWalk( pool_info.pool, &entry ) == MEM_POOL_OK ) - { - if( entry.isInUse ) - { - used_size += entry.size; - } - } - - MemPoolUnlock( pool_info.pool ); - - llinfos << "MemPool Used " << used_size/1024 << "K" << llendl; - total_used_size += used_size; - pool_num++; - } - - llinfos << "Total Pool Size " << total_pool_size/1024 << "K" << llendl; - llinfos << "Total Used Size " << total_used_size/1024 << "K" << llendl; - - } -#endif - - llinfos << "--------------------------------" << llendl; - llinfos << "Avatar Memory (partly overlaps with above stats):" << llendl; - LLTexLayerStaticImageList::getInstance()->dumpByteCount(); - LLVOAvatarSelf::dumpScratchTextureByteCount(); - LLTexLayerSetBuffer::dumpTotalByteCount(); - LLVOAvatarSelf::dumpTotalLocalTextureByteCount(); - LLTexLayerParamAlpha::dumpCacheByteCount(); - LLVOAvatar::dumpBakedStatus(); - - llinfos << llendl; - - llinfos << "Object counts:" << llendl; - S32 i; - S32 obj_counts[256]; -// S32 app_angles[256]; - for (i = 0; i < 256; i++) - { - obj_counts[i] = 0; - } - for (i = 0; i < gObjectList.getNumObjects(); i++) - { - LLViewerObject *objectp = gObjectList.getObject(i); - if (objectp) - { - obj_counts[objectp->getPCode()]++; - } - } - for (i = 0; i < 256; i++) - { - if (obj_counts[i]) - { - llinfos << LLPrimitive::pCodeToString(i) << ":" << obj_counts[i] << llendl; - } - } -} - - U32 gTotalLandIn = 0, gTotalLandOut = 0; U32 gTotalWaterIn = 0, gTotalWaterOut = 0; @@ -569,20 +422,15 @@ U32 gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] extern U32 gVisCompared; extern U32 gVisTested; -std::map<S32,LLFrameTimer> gDebugTimers; -std::map<S32,std::string> gDebugTimerLabel; +LLFrameTimer gTextureTimer; -void init_statistics() -{ - // Label debug timers - gDebugTimerLabel[0] = "Texture"; -} - -void update_statistics(U32 frame_count) +void update_statistics() { gTotalWorldBytes += gVLManager.getTotalBytes(); gTotalObjectBytes += gObjectBits / 8; + LLViewerStats& stats = LLViewerStats::instance(); + // make sure we have a valid time delta for this frame if (gFrameIntervalSeconds > 0.f) { @@ -599,51 +447,47 @@ void update_statistics(U32 frame_count) LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TOOLBOX_SECONDS, gFrameIntervalSeconds); } } - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail()); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles")); -#if 0 // 1.9.2 - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_OBJECTS, (F64)gSavedSettings.getS32("VertexShaderLevelObject")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_AVATAR, (F64)gSavedSettings.getBOOL("VertexShaderLevelAvatar")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_ENVIRONMENT, (F64)gSavedSettings.getBOOL("VertexShaderLevelEnvironment")); -#endif - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_FRAME_SECS, gDebugView->mFastTimerView->getTime("Frame")); + stats.setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable")); + stats.setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail()); + stats.setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip")); + stats.setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles")); + + stats.setStat(LLViewerStats::ST_FRAME_SECS, gDebugView->mFastTimerView->getTime("Frame")); F64 idle_secs = gDebugView->mFastTimerView->getTime("Idle"); F64 network_secs = gDebugView->mFastTimerView->getTime("Network"); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_UPDATE_SECS, idle_secs - network_secs); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_NETWORK_SECS, network_secs); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_IMAGE_SECS, gDebugView->mFastTimerView->getTime("Update Images")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_REBUILD_SECS, gDebugView->mFastTimerView->getTime("Sort Draw State")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_RENDER_SECS, gDebugView->mFastTimerView->getTime("Geometry")); + stats.setStat(LLViewerStats::ST_UPDATE_SECS, idle_secs - network_secs); + stats.setStat(LLViewerStats::ST_NETWORK_SECS, network_secs); + stats.setStat(LLViewerStats::ST_IMAGE_SECS, gDebugView->mFastTimerView->getTime("Update Images")); + stats.setStat(LLViewerStats::ST_REBUILD_SECS, gDebugView->mFastTimerView->getTime("Sort Draw State")); + stats.setStat(LLViewerStats::ST_RENDER_SECS, gDebugView->mFastTimerView->getTime("Geometry")); LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost()); if (cdp) { - LLViewerStats::getInstance()->mSimPingStat.addValue(cdp->getPingDelay()); + stats.mSimPingStat.addValue(cdp->getPingDelay()); gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay())) / ((F32)gSimPingCount + 1); gSimPingCount++; } else { - LLViewerStats::getInstance()->mSimPingStat.addValue(10000); + stats.mSimPingStat.addValue(10000); } - LLViewerStats::getInstance()->mFPSStat.addValue(1); + stats.mFPSStat.addValue(1); F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits()); - LLViewerStats::getInstance()->mLayersKBitStat.addValue(layer_bits/1024.f); - LLViewerStats::getInstance()->mObjectKBitStat.addValue(gObjectBits/1024.f); - LLViewerStats::getInstance()->mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending()); - LLViewerStats::getInstance()->mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f); + stats.mLayersKBitStat.addValue(layer_bits/1024.f); + stats.mObjectKBitStat.addValue(gObjectBits/1024.f); + stats.mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending()); + stats.mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f); gTransferManager.resetTransferBitsIn(LLTCT_ASSET); if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) { - gDebugTimers[0].pause(); + gTextureTimer.pause(); } else { - gDebugTimers[0].unpause(); + gTextureTimer.unpause(); } { @@ -655,7 +499,7 @@ void update_statistics(U32 frame_count) visible_avatar_frames = 1.f; avg_visible_avatars = (avg_visible_avatars * (F32)(visible_avatar_frames - 1.f) + visible_avatars) / visible_avatar_frames; } - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_VISIBLE_AVATARS, (F64)avg_visible_avatars); + stats.setStat(LLViewerStats::ST_VISIBLE_AVATARS, (F64)avg_visible_avatars); } LLWorld::getInstance()->updateNetStats(); LLWorld::getInstance()->requestCacheMisses(); @@ -671,15 +515,14 @@ void update_statistics(U32 frame_count) static LLFrameTimer texture_stats_timer; if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq) { - LLViewerStats::getInstance()->mTextureKBitStat.addValue(LLViewerTextureList::sTextureBits/1024.f); - LLViewerStats::getInstance()->mTexturePacketsStat.addValue(LLViewerTextureList::sTexturePackets); + stats.mTextureKBitStat.addValue(LLViewerTextureList::sTextureBits/1024.f); + stats.mTexturePacketsStat.addValue(LLViewerTextureList::sTexturePackets); gTotalTextureBytes += LLViewerTextureList::sTextureBits / 8; LLViewerTextureList::sTextureBits = 0; LLViewerTextureList::sTexturePackets = 0; texture_stats_timer.reset(); } } - } class ViewerStatsResponder : public LLHTTPClient::Responder @@ -787,7 +630,7 @@ void send_stats() "%-6s Class %d ", gGLManager.mGLVendorShort.substr(0,6).c_str(), (S32)LLFeatureManager::getInstance()->getGPUClass()) - + LLFeatureManager::getInstance()->getGPUString(); + + gGLManager.getRawGLString(); system["gpu"] = gpu_desc; system["gpu_class"] = (S32)LLFeatureManager::getInstance()->getGPUClass(); @@ -798,7 +641,18 @@ void send_stats() S32 shader_level = 0; if (LLPipeline::sRenderDeferred) { - shader_level = 3; + if (LLPipeline::RenderShadowDetail > 0) + { + shader_level = 5; + } + else if (LLPipeline::RenderDeferredSSAO) + { + shader_level = 4; + } + else + { + shader_level = 3; + } } else if (gPipeline.canUseWindLightShadersOnObjects()) { @@ -857,10 +711,7 @@ void send_stats() S32 window_height = gViewerWindow->getWindowHeightRaw(); S32 window_size = (window_width * window_height) / 1024; misc["string_1"] = llformat("%d", window_size); - if (gDebugTimers.find(0) != gDebugTimers.end() && gFrameTimeSeconds > 0) - { - misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gDebugTimers[0].getElapsedTimeF32(), gFrameTimeSeconds); - } + misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds); // misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21 // misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21 @@ -949,15 +800,8 @@ LLSD LLViewerStats::PhaseMap::dumpPhases() for (phase_map_t::iterator iter = mPhaseMap.begin(); iter != mPhaseMap.end(); ++iter) { const std::string& phase_name = iter->first; - result[phase_name]["completed"] = !(iter->second.getStarted()); + result[phase_name]["completed"] = LLSD::Integer(!(iter->second.getStarted())); result[phase_name]["elapsed"] = iter->second.getElapsedTimeF32(); -#if 0 // global stats for each phase seem like overkill here - phase_stats_t::iterator stats_iter = sPhaseStats.find(phase_name); - if (stats_iter != sPhaseStats.end()) - { - result[phase_name]["stats"] = stats_iter->second.getData(); - } -#endif } return result; } diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 554e4d647e..e02a4ccdc7 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -33,92 +33,90 @@ class LLViewerStats : public LLSingleton<LLViewerStats> { public: - LLStat mKBitStat; - LLStat mLayersKBitStat; - LLStat mObjectKBitStat; - LLStat mAssetKBitStat; - LLStat mTextureKBitStat; - LLStat mVFSPendingOperations; - LLStat mObjectsDrawnStat; - LLStat mObjectsCulledStat; - LLStat mObjectsTestedStat; - LLStat mObjectsComparedStat; - LLStat mObjectsOccludedStat; - LLStat mFPSStat; - LLStat mPacketsInStat; - LLStat mPacketsLostStat; - LLStat mPacketsOutStat; - LLStat mPacketsLostPercentStat; - LLStat mTexturePacketsStat; - LLStat mActualInKBitStat; // From the packet ring (when faking a bad connection) - LLStat mActualOutKBitStat; // From the packet ring (when faking a bad connection) - LLStat mTrianglesDrawnStat; + LLStat mKBitStat, + mLayersKBitStat, + mObjectKBitStat, + mAssetKBitStat, + mTextureKBitStat, + mVFSPendingOperations, + mObjectsDrawnStat, + mObjectsCulledStat, + mObjectsTestedStat, + mObjectsComparedStat, + mObjectsOccludedStat, + mFPSStat, + mPacketsInStat, + mPacketsLostStat, + mPacketsOutStat, + mPacketsLostPercentStat, + mTexturePacketsStat, + mActualInKBitStat, // From the packet ring (when faking a bad connection) + mActualOutKBitStat, // From the packet ring (when faking a bad connection) + mTrianglesDrawnStat; // Simulator stats - LLStat mSimTimeDilation; - - LLStat mSimFPS; - LLStat mSimPhysicsFPS; - LLStat mSimAgentUPS; - LLStat mSimScriptEPS; - - LLStat mSimFrameMsec; - LLStat mSimNetMsec; - LLStat mSimSimOtherMsec; - LLStat mSimSimPhysicsMsec; - - LLStat mSimSimPhysicsStepMsec; - LLStat mSimSimPhysicsShapeUpdateMsec; - LLStat mSimSimPhysicsOtherMsec; - - LLStat mSimSimAIStepMsec; - LLStat mSimSimSkippedSilhouetteSteps; - LLStat mSimSimPctSteppedCharacters; - - LLStat mSimAgentMsec; - LLStat mSimImagesMsec; - LLStat mSimScriptMsec; - LLStat mSimSpareMsec; - LLStat mSimSleepMsec; - LLStat mSimPumpIOMsec; - - LLStat mSimMainAgents; - LLStat mSimChildAgents; - LLStat mSimObjects; - LLStat mSimActiveObjects; - LLStat mSimActiveScripts; - LLStat mSimPctScriptsRun; - - LLStat mSimInPPS; - LLStat mSimOutPPS; - LLStat mSimPendingDownloads; - LLStat mSimPendingUploads; - LLStat mSimPendingLocalUploads; - LLStat mSimTotalUnackedBytes; - - LLStat mPhysicsPinnedTasks; - LLStat mPhysicsLODTasks; - LLStat mPhysicsMemoryAllocated; - - LLStat mSimPingStat; - - LLStat mNumImagesStat; - LLStat mNumRawImagesStat; - LLStat mGLTexMemStat; - LLStat mGLBoundMemStat; - LLStat mRawMemStat; - LLStat mFormattedMemStat; - - LLStat mNumObjectsStat; - LLStat mNumActiveObjectsStat; - LLStat mNumNewObjectsStat; - LLStat mNumSizeCulledStat; - LLStat mNumVisCulledStat; + LLStat mSimTimeDilation, + + mSimFPS, + mSimPhysicsFPS, + mSimAgentUPS, + mSimScriptEPS, + + mSimFrameMsec, + mSimNetMsec, + mSimSimOtherMsec, + mSimSimPhysicsMsec, + + mSimSimPhysicsStepMsec, + mSimSimPhysicsShapeUpdateMsec, + mSimSimPhysicsOtherMsec, + mSimSimAIStepMsec, + mSimSimSkippedSilhouetteSteps, + mSimSimPctSteppedCharacters, + + mSimAgentMsec, + mSimImagesMsec, + mSimScriptMsec, + mSimSpareMsec, + mSimSleepMsec, + mSimPumpIOMsec, + + mSimMainAgents, + mSimChildAgents, + mSimObjects, + mSimActiveObjects, + mSimActiveScripts, + mSimPctScriptsRun, + + mSimInPPS, + mSimOutPPS, + mSimPendingDownloads, + mSimPendingUploads, + mSimPendingLocalUploads, + mSimTotalUnackedBytes, + + mPhysicsPinnedTasks, + mPhysicsLODTasks, + mPhysicsMemoryAllocated, + + mSimPingStat, + + mNumImagesStat, + mNumRawImagesStat, + mGLTexMemStat, + mGLBoundMemStat, + mRawMemStat, + mFormattedMemStat, + + mNumObjectsStat, + mNumActiveObjectsStat, + mNumNewObjectsStat, + mNumSizeCulledStat, + mNumVisCulledStat; void resetStats(); public: - // If you change this, please also add a corresponding text label - // in statTypeToText in llviewerstats.cpp + // If you change this, please also add a corresponding text label in llviewerstats.cpp enum EStatType { ST_VERSION = 0, @@ -183,7 +181,6 @@ public: ST_COUNT = 58 }; - LLViewerStats(); ~LLViewerStats(); @@ -310,14 +307,10 @@ private: static const F32 SEND_STATS_PERIOD = 300.0f; // The following are from (older?) statistics code found in appviewer. -void init_statistics(); -void reset_statistics(); -void output_statistics(void*); -void update_statistics(U32 frame_count); +void update_statistics(); void send_stats(); -extern std::map<S32,LLFrameTimer> gDebugTimers; -extern std::map<S32,std::string> gDebugTimerLabel; +extern LLFrameTimer gTextureTimer; extern U32 gTotalTextureBytes; extern U32 gTotalObjectBytes; extern U32 gTotalTextureBytesPerBoostLevel[] ; diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index e9d21b4848..91e485d01b 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -27,7 +27,6 @@ #include "llviewerprecompiledheaders.h" #include "llviewerstatsrecorder.h" -#if LL_RECORD_VIEWER_STATS #include "llfile.h" #include "llviewerregion.h" @@ -45,9 +44,8 @@ LLViewerStatsRecorder* LLViewerStatsRecorder::sInstance = NULL; LLViewerStatsRecorder::LLViewerStatsRecorder() : mObjectCacheFile(NULL), mTimer(), - mRegionp(NULL), - mStartTime(0.f), - mProcessingTime(0.f) + mStartTime(0.0), + mLastSnapshotTime(0.0) { if (NULL != sInstance) { @@ -61,112 +59,77 @@ LLViewerStatsRecorder::~LLViewerStatsRecorder() { if (mObjectCacheFile != NULL) { + // last chance snapshot + writeToLog(0.f); LLFile::close(mObjectCacheFile); mObjectCacheFile = NULL; } } -// static -void LLViewerStatsRecorder::initClass() -{ - sInstance = new LLViewerStatsRecorder(); -} - -// static -void LLViewerStatsRecorder::cleanupClass() -{ - delete sInstance; - sInstance = NULL; -} - - -void LLViewerStatsRecorder::initStatsRecorder(LLViewerRegion *regionp) -{ - if (mObjectCacheFile == NULL) - { - mStartTime = LLTimer::getTotalTime(); - mObjectCacheFile = LLFile::fopen(STATS_FILE_NAME, "wb"); - if (mObjectCacheFile) - { // Write column headers - std::ostringstream data_msg; - data_msg << "EventTime, " - << "ProcessingTime, " - << "CacheHits, " - << "CacheFullMisses, " - << "CacheCrcMisses, " - << "FullUpdates, " - << "TerseUpdates, " - << "CacheMissRequests, " - << "CacheMissResponses, " - << "CacheUpdateDupes, " - << "CacheUpdateChanges, " - << "CacheUpdateAdds, " - << "CacheUpdateReplacements, " - << "UpdateFailures" - << "\n"; - - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); - } - } -} - -void LLViewerStatsRecorder::beginObjectUpdateEvents(LLViewerRegion *regionp) -{ - initStatsRecorder(regionp); - mRegionp = regionp; - mProcessingTime = LLTimer::getTotalTime(); - clearStats(); -} - void LLViewerStatsRecorder::clearStats() { mObjectCacheHitCount = 0; + mObjectCacheHitSize = 0; mObjectCacheMissFullCount = 0; + mObjectCacheMissFullSize = 0; mObjectCacheMissCrcCount = 0; + mObjectCacheMissCrcSize = 0; mObjectFullUpdates = 0; + mObjectFullUpdatesSize = 0; mObjectTerseUpdates = 0; + mObjectTerseUpdatesSize = 0; mObjectCacheMissRequests = 0; mObjectCacheMissResponses = 0; + mObjectCacheMissResponsesSize = 0; mObjectCacheUpdateDupes = 0; mObjectCacheUpdateChanges = 0; mObjectCacheUpdateAdds = 0; mObjectCacheUpdateReplacements = 0; mObjectUpdateFailures = 0; + mObjectUpdateFailuresSize = 0; + mTextureFetchSize = 0; } -void LLViewerStatsRecorder::recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type) +void LLViewerStatsRecorder::recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size) { mObjectUpdateFailures++; + mObjectUpdateFailuresSize += msg_size; } -void LLViewerStatsRecorder::recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type) +void LLViewerStatsRecorder::recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type, S32 msg_size) { if (LLViewerRegion::CACHE_MISS_TYPE_FULL == cache_miss_type) { mObjectCacheMissFullCount++; + mObjectCacheMissFullSize += msg_size; } else { mObjectCacheMissCrcCount++; + mObjectCacheMissCrcSize += msg_size; } } -void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp) +void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp, S32 msg_size) { switch (update_type) { case OUT_FULL: mObjectFullUpdates++; + mObjectFullUpdatesSize += msg_size; break; case OUT_TERSE_IMPROVED: mObjectTerseUpdates++; + mObjectTerseUpdatesSize += msg_size; break; case OUT_FULL_COMPRESSED: mObjectCacheMissResponses++; + mObjectCacheMissResponsesSize += msg_size; break; case OUT_FULL_CACHED: mObjectCacheHitCount++; + mObjectCacheHitSize += msg_size; break; default: llwarns << "Unknown update_type" << llendl; @@ -174,7 +137,7 @@ void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectU }; } -void LLViewerStatsRecorder::recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp) +void LLViewerStatsRecorder::recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp, S32 msg_size) { switch (update_result) { @@ -201,9 +164,15 @@ void LLViewerStatsRecorder::recordRequestCacheMissesEvent(S32 count) mObjectCacheMissRequests += count; } -void LLViewerStatsRecorder::endObjectUpdateEvents() +void LLViewerStatsRecorder::writeToLog( F32 interval ) { - llinfos << "ILX: " + F64 delta_time = LLTimer::getTotalSeconds() - mLastSnapshotTime; + S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectCacheUpdateDupes + mObjectCacheUpdateChanges + mObjectCacheUpdateAdds + mObjectCacheUpdateReplacements + mObjectUpdateFailures; + + if ( delta_time < interval || total_objects == 0) return; + + mLastSnapshotTime = LLTimer::getTotalSeconds(); + lldebugs << "ILX: " << mObjectCacheHitCount << " hits, " << mObjectCacheMissFullCount << " full misses, " << mObjectCacheMissCrcCount << " crc misses, " @@ -218,41 +187,81 @@ void LLViewerStatsRecorder::endObjectUpdateEvents() << mObjectUpdateFailures << " update failures" << llendl; - S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectCacheUpdateDupes + mObjectCacheUpdateChanges + mObjectCacheUpdateAdds + mObjectCacheUpdateReplacements + mObjectUpdateFailures; - if (mObjectCacheFile != NULL && - total_objects > 0) + if (mObjectCacheFile == NULL) { - std::ostringstream data_msg; - F32 processing32 = (F32) ((LLTimer::getTotalTime() - mProcessingTime) / 1000.0); - - data_msg << getTimeSinceStart() - << ", " << processing32 - << ", " << mObjectCacheHitCount - << ", " << mObjectCacheMissFullCount - << ", " << mObjectCacheMissCrcCount - << ", " << mObjectFullUpdates - << ", " << mObjectTerseUpdates - << ", " << mObjectCacheMissRequests - << ", " << mObjectCacheMissResponses - << ", " << mObjectCacheUpdateDupes - << ", " << mObjectCacheUpdateChanges - << ", " << mObjectCacheUpdateAdds - << ", " << mObjectCacheUpdateReplacements - << ", " << mObjectUpdateFailures - << "\n"; + mStartTime = LLTimer::getTotalSeconds(); + mObjectCacheFile = LLFile::fopen(STATS_FILE_NAME, "wb"); + if (mObjectCacheFile) + { // Write column headers + std::ostringstream data_msg; + data_msg << "EventTime(ms)\t" + << "Cache Hits\t" + << "Cache Full Misses\t" + << "Cache Crc Misses\t" + << "Full Updates\t" + << "Terse Updates\t" + << "Cache Miss Requests\t" + << "Cache Miss Responses\t" + << "Cache Update Dupes\t" + << "Cache Update Changes\t" + << "Cache Update Adds\t" + << "Cache Update Replacements\t" + << "Update Failures\t" + << "Cache Hits bps\t" + << "Cache Full Misses bps\t" + << "Cache Crc Misses bps\t" + << "Full Updates bps\t" + << "Terse Updates bps\t" + << "Cache Miss Responses bps\t" + << "Texture Fetch bps\t" + << "\n"; - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + } + else + { + llwarns << "Couldn't open " << STATS_FILE_NAME << " for logging." << llendl; + return; + } } + std::ostringstream data_msg; + + data_msg << getTimeSinceStart() + << "\t " << mObjectCacheHitCount + << "\t" << mObjectCacheMissFullCount + << "\t" << mObjectCacheMissCrcCount + << "\t" << mObjectFullUpdates + << "\t" << mObjectTerseUpdates + << "\t" << mObjectCacheMissRequests + << "\t" << mObjectCacheMissResponses + << "\t" << mObjectCacheUpdateDupes + << "\t" << mObjectCacheUpdateChanges + << "\t" << mObjectCacheUpdateAdds + << "\t" << mObjectCacheUpdateReplacements + << "\t" << mObjectUpdateFailures + << "\t" << (mObjectCacheHitSize * 8 / delta_time) + << "\t" << (mObjectCacheMissFullSize * 8 / delta_time) + << "\t" << (mObjectCacheMissCrcSize * 8 / delta_time) + << "\t" << (mObjectFullUpdatesSize * 8 / delta_time) + << "\t" << (mObjectTerseUpdatesSize * 8 / delta_time) + << "\t" << (mObjectCacheMissResponsesSize * 8 / delta_time) + << "\t" << (mTextureFetchSize * 8 / delta_time) + << "\n"; + + fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); clearStats(); } F32 LLViewerStatsRecorder::getTimeSinceStart() { - return (F32) ((LLTimer::getTotalTime() - mStartTime) / 1000.0); + return (F32) (LLTimer::getTotalSeconds() - mStartTime); } -#endif +void LLViewerStatsRecorder::recordTextureFetch( S32 msg_size ) +{ + mTextureFetchSize += msg_size; +} diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h index 612ac380f7..d1744f4910 100644 --- a/indra/newview/llviewerstatsrecorder.h +++ b/indra/newview/llviewerstatsrecorder.h @@ -35,63 +35,111 @@ #define LL_RECORD_VIEWER_STATS 0 -#if LL_RECORD_VIEWER_STATS #include "llframetimer.h" #include "llviewerobject.h" #include "llviewerregion.h" class LLMutex; -class LLViewerRegion; class LLViewerObject; -class LLViewerStatsRecorder +class LLViewerStatsRecorder : public LLSingleton<LLViewerStatsRecorder> { public: + LOG_CLASS(LLViewerStatsRecorder); LLViewerStatsRecorder(); ~LLViewerStatsRecorder(); - static void initClass(); - static void cleanupClass(); - static LLViewerStatsRecorder* instance() {return sInstance; } + void objectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size) + { +#if LL_RECORD_VIEWER_STATS + recordObjectUpdateFailure(local_id, update_type, msg_size); +#endif + } - void initStatsRecorder(LLViewerRegion *regionp); + void cacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type, S32 msg_size) + { +#if LL_RECORD_VIEWER_STATS + recordCacheMissEvent(local_id, update_type, cache_miss_type, msg_size); +#endif + } - void beginObjectUpdateEvents(LLViewerRegion *regionp); - void recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type); - void recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type); - void recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp); - void recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp); - void recordRequestCacheMissesEvent(S32 count); - void endObjectUpdateEvents(); + void objectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp, S32 msg_size) + { +#if LL_RECORD_VIEWER_STATS + recordObjectUpdateEvent(local_id, update_type, objectp, msg_size); +#endif + } + + void cacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp, S32 msg_size) + { +#if LL_RECORD_VIEWER_STATS + recordCacheFullUpdate(local_id, update_type, update_result, objectp, msg_size); +#endif + } + + void requestCacheMissesEvent(S32 count) + { +#if LL_RECORD_VIEWER_STATS + recordRequestCacheMissesEvent(count); +#endif + } + + void textureFetch(S32 msg_size) + { +#if LL_RECORD_VIEWER_STATS + recordTextureFetch(msg_size); +#endif + } + + void log(F32 interval) + { +#if LL_RECORD_VIEWER_STATS + writeToLog(interval); +#endif + } F32 getTimeSinceStart(); private: + void recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size); + void recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type, S32 msg_size); + void recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp, S32 msg_size); + void recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp, S32 msg_size); + void recordRequestCacheMissesEvent(S32 count); + void recordTextureFetch(S32 msg_size); + void writeToLog(F32 interval); + static LLViewerStatsRecorder* sInstance; LLFILE * mObjectCacheFile; // File to write data into LLFrameTimer mTimer; - LLViewerRegion* mRegionp; F64 mStartTime; - F64 mProcessingTime; + F64 mLastSnapshotTime; S32 mObjectCacheHitCount; + S32 mObjectCacheHitSize; S32 mObjectCacheMissFullCount; + S32 mObjectCacheMissFullSize; S32 mObjectCacheMissCrcCount; + S32 mObjectCacheMissCrcSize; S32 mObjectFullUpdates; + S32 mObjectFullUpdatesSize; S32 mObjectTerseUpdates; + S32 mObjectTerseUpdatesSize; S32 mObjectCacheMissRequests; S32 mObjectCacheMissResponses; + S32 mObjectCacheMissResponsesSize; S32 mObjectCacheUpdateDupes; S32 mObjectCacheUpdateChanges; S32 mObjectCacheUpdateAdds; S32 mObjectCacheUpdateReplacements; S32 mObjectUpdateFailures; + S32 mObjectUpdateFailuresSize; + S32 mTextureFetchSize; void clearStats(); }; -#endif // LL_RECORD_VIEWER_STATS #endif // LLVIEWERSTATSRECORDER_H diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 99102309a1..122d8f4a96 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -1144,6 +1144,14 @@ void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item, llwchar wc { preview->setAuxItem( item ); preview->setNotecardInfo(mNotecardInventoryID, mObjectID); + if (preview->hasString("Title")) + { + LLStringUtil::format_map_t args; + args["[NAME]"] = item->getName(); + LLUIString title = preview->getString("Title", args); + preview->setTitle(title.getString()); + } + preview->getChild<LLUICtrl>("desc")->setValue(item->getDescription()); } } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 7f638a24bf..08fcb60d03 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -39,7 +39,6 @@ #include "llimagebmp.h" #include "llimagej2c.h" #include "llimagetga.h" -#include "llmemtype.h" #include "llstl.h" #include "llvfile.h" #include "llvfs.h" @@ -62,6 +61,7 @@ #include "llmediaentry.h" #include "llvovolume.h" #include "llviewermedia.h" +#include "lltexturecache.h" /////////////////////////////////////////////////////////////////////////////// // statics @@ -409,7 +409,11 @@ void LLViewerTextureManager::cleanup() void LLViewerTexture::initClass() { LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture() ; - sTexelPixelRatio = gSavedSettings.getF32("TexelPixelRatio"); + + if(gSavedSettings.getBOOL("TextureFetchDebuggerEnabled")) + { + sTexelPixelRatio = gSavedSettings.getF32("TexelPixelRatio"); + } } // static @@ -619,6 +623,7 @@ LLViewerTexture::~LLViewerTexture() void LLViewerTexture::init(bool firstinit) { mBoostLevel = LLViewerTexture::BOOST_NONE; + mSelectedTime = 0.f; mFullWidth = 0; mFullHeight = 0; @@ -674,11 +679,18 @@ void LLViewerTexture::setBoostLevel(S32 level) if(mBoostLevel != level) { mBoostLevel = level ; - if(mBoostLevel != LLViewerTexture::BOOST_NONE) + if(mBoostLevel != LLViewerTexture::BOOST_NONE && + mBoostLevel != LLViewerTexture::BOOST_SELECTED) { setNoDelete() ; } } + + if (mBoostLevel == LLViewerTexture::BOOST_SELECTED) + { + mSelectedTime = gFrameTimeSeconds; + } + } @@ -1236,7 +1248,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mIsMissingAsset = FALSE; mLoadedCallbackDesiredDiscardLevel = S8_MAX; - mPauseLoadedCallBacks = TRUE ; + mPauseLoadedCallBacks = FALSE ; mNeedsCreateTexture = FALSE; @@ -1253,6 +1265,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mRequestDeltaTime = 0.f; mForSculpt = FALSE ; mIsFetched = FALSE ; + mInFastCacheList = FALSE; mCachedRawImage = NULL ; mCachedRawDiscardLevel = -1 ; @@ -1266,6 +1279,8 @@ void LLViewerFetchedTexture::init(bool firstinit) mLastReferencedSavedRawImageTime = 0.0f ; mKeptSavedRawImageTime = 0.f ; mLastCallBackActiveTime = 0.f; + + mInDebug = FALSE; } LLViewerFetchedTexture::~LLViewerFetchedTexture() @@ -1310,14 +1325,47 @@ void LLViewerFetchedTexture::cleanup() mSavedRawDiscardLevel = -1; } +//access the fast cache +void LLViewerFetchedTexture::loadFromFastCache() +{ + if(!mInFastCacheList) + { + return; //no need to access the fast cache. + } + mInFastCacheList = FALSE; + + mRawImage = LLAppViewer::getTextureCache()->readFromFastCache(getID(), mRawDiscardLevel) ; + if(mRawImage.notNull()) + { + mFullWidth = mRawImage->getWidth() << mRawDiscardLevel; + mFullHeight = mRawImage->getHeight() << mRawDiscardLevel; + setTexelsPerImage(); + + if(mFullWidth > MAX_IMAGE_SIZE || mFullHeight > MAX_IMAGE_SIZE) + { + //discard all oversized textures. + destroyRawImage(); + setIsMissingAsset(); + mRawDiscardLevel = INVALID_DISCARD_LEVEL ; + } + else + { + mRequestedDiscardLevel = mDesiredDiscardLevel + 1; + mIsRawImageValid = TRUE; + addToCreateTexture() ; + } + } +} + void LLViewerFetchedTexture::setForSculpt() { static const S32 MAX_INTERVAL = 8 ; //frames mForSculpt = TRUE ; - if(isForSculptOnly() && !getBoundRecently()) + if(isForSculptOnly() && hasGLTexture() && !getBoundRecently()) { destroyGLTexture() ; //sculpt image does not need gl texture. + mTextureState = ACTIVE; } checkCachedRawSculptImage() ; setMaxVirtualSizeResetInterval(MAX_INTERVAL) ; @@ -1735,7 +1783,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() S32 ddiscard = MAX_DISCARD_LEVEL - (S32)desired; ddiscard = llclamp(ddiscard, 0, MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY); priority = (ddiscard + 1) * PRIORITY_DELTA_DISCARD_LEVEL_FACTOR; - setAdditionalDecodePriority(1.0f) ;//boost the textures without any data so far. + setAdditionalDecodePriority(0.1f) ;//boost the textures without any data so far. } else if ((mMinDiscardLevel > 0) && (cur_discard <= mMinDiscardLevel)) { @@ -1836,8 +1884,6 @@ F32 LLViewerFetchedTexture::maxDecodePriority() void LLViewerFetchedTexture::setDecodePriority(F32 priority) { - llassert(!mInImageList); - mDecodePriority = priority; if(mDecodePriority < F_ALMOST_ZERO) @@ -1865,13 +1911,34 @@ void LLViewerFetchedTexture::updateVirtualSize() for(U32 i = 0 ; i < mNumFaces ; i++) { LLFace* facep = mFaceList[i] ; - if(facep->getDrawable()->isRecentlyVisible()) + if( facep ) { - addTextureStats(facep->getVirtualSize()) ; - setAdditionalDecodePriority(facep->getImportanceToCamera()) ; + LLDrawable* drawable = facep->getDrawable(); + if (drawable) + { + if(drawable->isRecentlyVisible()) + { + if (getBoostLevel() == LLViewerTexture::BOOST_NONE && + drawable->getVObj() && drawable->getVObj()->isSelected()) + { + setBoostLevel(LLViewerTexture::BOOST_SELECTED); + } + addTextureStats(facep->getVirtualSize()) ; + setAdditionalDecodePriority(facep->getImportanceToCamera()) ; + } + } } } + //reset whether or not a face was selected after 10 seconds + const F32 SELECTION_RESET_TIME = 10.f; + + if (getBoostLevel() == LLViewerTexture::BOOST_SELECTED && + gFrameTimeSeconds - mSelectedTime > SELECTION_RESET_TIME) + { + setBoostLevel(LLViewerTexture::BOOST_NONE); + } + if(mMaxVirtualSizeResetCounter > 0) { mMaxVirtualSizeResetCounter--; @@ -1898,6 +1965,20 @@ S32 LLViewerFetchedTexture::getCurrentDiscardLevelForFetching() return current_discard ; } +bool LLViewerFetchedTexture::setDebugFetching(S32 debug_level) +{ + if(debug_level < 0) + { + mInDebug = FALSE; + return false; + } + mInDebug = TRUE; + + mDesiredDiscardLevel = debug_level; + + return true; +} + bool LLViewerFetchedTexture::updateFetch() { static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled"); @@ -1935,6 +2016,10 @@ bool LLViewerFetchedTexture::updateFetch() { return false; // process any raw image data in callbacks before replacing } + if(mInFastCacheList) + { + return false; + } S32 current_discard = getCurrentDiscardLevelForFetching() ; S32 desired_discard = getDesiredDiscardLevel(); @@ -2052,6 +2137,10 @@ bool LLViewerFetchedTexture::updateFetch() { make_request = false; } + else if(mDesiredDiscardLevel > getMaxDiscardLevel()) + { + make_request = false; + } else if (mNeedsCreateTexture || mIsMissingAsset) { make_request = false; @@ -2060,6 +2149,11 @@ bool LLViewerFetchedTexture::updateFetch() { make_request = false; } + else if(mCachedRawImage.notNull() && (current_discard < 0 || current_discard > mCachedRawDiscardLevel)) + { + make_request = false; + switchToCachedImage() ; //use the cached raw data first + } //else if (!isJustBound() && mCachedRawImageReady) //{ // make_request = false; @@ -2152,7 +2246,10 @@ bool LLViewerFetchedTexture::updateFetch() void LLViewerFetchedTexture::clearFetchedResults() { - llassert_always(!mNeedsCreateTexture && !mIsFetching); + if(mNeedsCreateTexture || mIsFetching) + { + return ; + } cleanup(); destroyGLTexture(); @@ -2167,11 +2264,13 @@ void LLViewerFetchedTexture::forceToDeleteRequest() { if (mHasFetcher) { - LLAppViewer::getTextureFetch()->deleteRequest(getID(), true); mHasFetcher = FALSE; mIsFetching = FALSE ; - resetTextureStats(); } + + resetTextureStats(); + + mDesiredDiscardLevel = getMaxDiscardLevel() + 1; } void LLViewerFetchedTexture::setIsMissingAsset() @@ -2182,7 +2281,8 @@ void LLViewerFetchedTexture::setIsMissingAsset() } else { - llwarns << mUrl << ": Marking image as missing" << llendl; + //it is normal no map tile on an empty region. + //llwarns << mUrl << ": Marking image as missing" << llendl; } if (mHasFetcher) { @@ -2214,10 +2314,18 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call mLoadedCallbackDesiredDiscardLevel = llmin(mLoadedCallbackDesiredDiscardLevel, (S8)discard_level) ; } - if(mPauseLoadedCallBacks && !pause) + if(mPauseLoadedCallBacks) + { + if(!pause) + { + unpauseLoadedCallbacks(src_callback_list) ; + } + } + else if(pause) { - unpauseLoadedCallbacks(src_callback_list) ; + pauseLoadedCallbacks(src_callback_list) ; } + LLLoadedCallbackEntry* entryp = new LLLoadedCallbackEntry(loaded_callback, discard_level, keep_imageraw, userdata, src_callback_list, this, pause); mLoadedCallbackList.push_back(entryp); diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index f1105c3705..2e7949e9a3 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -275,6 +275,7 @@ private: protected: LLUUID mID; S32 mBoostLevel; // enum describing priority level + F32 mSelectedTime; // time texture was last selected S32 mFullWidth; S32 mFullHeight; BOOL mUseMipMaps ; @@ -436,6 +437,8 @@ public: void setMinDiscardLevel(S32 discard) { mMinDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel,(S8)discard); } bool updateFetch(); + bool setDebugFetching(S32 debug_level); + bool isInDebug() {return mInDebug;} void clearFetchedResults(); //clear all fetched results, for debug use. @@ -498,6 +501,9 @@ public: void setCanUseHTTP(bool can_use_http) {mCanUseHTTP = can_use_http;} void forceToDeleteRequest(); + void loadFromFastCache(); + void setInFastCacheList(bool in_list) { mInFastCacheList = in_list; } + bool isInFastCacheList() { return mInFastCacheList; } protected: /*virtual*/ void switchToCachedImage(); S32 getCurrentDiscardLevelForFetching() ; @@ -516,6 +522,8 @@ private: private: BOOL mFullyLoaded; + BOOL mInDebug; + BOOL mInFastCacheList; protected: std::string mLocalFileName; diff --git a/indra/newview/llviewertextureanim.cpp b/indra/newview/llviewertextureanim.cpp index 9f1ac7c49c..2b364851a7 100644 --- a/indra/newview/llviewertextureanim.cpp +++ b/indra/newview/llviewertextureanim.cpp @@ -27,21 +27,37 @@ #include "llviewerprecompiledheaders.h" #include "llviewertextureanim.h" +#include "llvovolume.h" #include "llmath.h" #include "llerror.h" -LLViewerTextureAnim::LLViewerTextureAnim() : LLTextureAnim() +std::vector<LLViewerTextureAnim*> LLViewerTextureAnim::sInstanceList; + +LLViewerTextureAnim::LLViewerTextureAnim(LLVOVolume* vobj) : LLTextureAnim() { + mVObj = vobj; mLastFrame = -1.f; // Force an update initially mLastTime = 0.f; mOffS = mOffT = 0; mScaleS = mScaleT = 1; mRot = 0; + + mInstanceIndex = sInstanceList.size(); + sInstanceList.push_back(this); } LLViewerTextureAnim::~LLViewerTextureAnim() { + S32 end_idx = sInstanceList.size()-1; + + if (end_idx != mInstanceIndex) + { + sInstanceList[mInstanceIndex] = sInstanceList[end_idx]; + sInstanceList[mInstanceIndex]->mInstanceIndex = mInstanceIndex; + } + + sInstanceList.pop_back(); } void LLViewerTextureAnim::reset() @@ -50,6 +66,14 @@ void LLViewerTextureAnim::reset() mTimer.reset(); } +//static +void LLViewerTextureAnim::updateClass() +{ + for (std::vector<LLViewerTextureAnim*>::iterator iter = sInstanceList.begin(); iter != sInstanceList.end(); ++iter) + { + (*iter)->mVObj->animateTextures(); + } +} S32 LLViewerTextureAnim::animateTextures(F32 &off_s, F32 &off_t, F32 &scale_s, F32 &scale_t, diff --git a/indra/newview/llviewertextureanim.h b/indra/newview/llviewertextureanim.h index dd7bd0cb90..abbfabceb9 100644 --- a/indra/newview/llviewertextureanim.h +++ b/indra/newview/llviewertextureanim.h @@ -30,10 +30,18 @@ #include "lltextureanim.h" #include "llframetimer.h" +class LLVOVolume; + class LLViewerTextureAnim : public LLTextureAnim { +private: + static std::vector<LLViewerTextureAnim*> sInstanceList; + S32 mInstanceIndex; + public: - LLViewerTextureAnim(); + static void updateClass(); + + LLViewerTextureAnim(LLVOVolume* vobj); virtual ~LLViewerTextureAnim(); /*virtual*/ void reset(); @@ -51,6 +59,7 @@ public: F32 mRot; protected: + LLVOVolume* mVObj; LLFrameTimer mTimer; F64 mLastTime; F32 mLastFrame; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 9a6c0569a9..b9f5c432d0 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -58,7 +58,7 @@ #include "pipeline.h" #include "llappviewer.h" #include "llxuiparser.h" -#include "llagent.h" +#include "llviewerdisplay.h" //////////////////////////////////////////////////////////////////////////// @@ -67,12 +67,12 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; U32 LLViewerTextureList::sTextureBits = 0; U32 LLViewerTextureList::sTexturePackets = 0; S32 LLViewerTextureList::sNumImages = 0; -LLStat LLViewerTextureList::sNumImagesStat(32, TRUE); -LLStat LLViewerTextureList::sNumRawImagesStat(32, TRUE); -LLStat LLViewerTextureList::sGLTexMemStat(32, TRUE); -LLStat LLViewerTextureList::sGLBoundMemStat(32, TRUE); -LLStat LLViewerTextureList::sRawMemStat(32, TRUE); -LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE); +LLStat LLViewerTextureList::sNumImagesStat("Num Images", 32, TRUE); +LLStat LLViewerTextureList::sNumRawImagesStat("Num Raw Images", 32, TRUE); +LLStat LLViewerTextureList::sGLTexMemStat("GL Texture Mem", 32, TRUE); +LLStat LLViewerTextureList::sGLBoundMemStat("GL Bound Mem", 32, TRUE); +LLStat LLViewerTextureList::sRawMemStat("Raw Image Mem", 32, TRUE); +LLStat LLViewerTextureList::sFormattedMemStat("Formatted Image Mem", 32, TRUE); LLViewerTextureList gTextureList; static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); @@ -276,6 +276,7 @@ void LLViewerTextureList::shutdown() // Flush all of the references mLoadingStreamList.clear(); mCreateTextureList.clear(); + mFastCacheList.clear(); mUUIDMap.clear(); @@ -453,6 +454,8 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, LLGLenum primary_format, LLHost request_from_host) { + static LLCachedControl<bool> fast_cache_fetching_enabled(gSavedSettings, "FastCacheFetchEnabled"); + LLPointer<LLViewerFetchedTexture> imagep ; switch(texture_type) { @@ -490,6 +493,11 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, imagep->forceActive() ; } + if(fast_cache_fetching_enabled) + { + mFastCacheList.insert(imagep); + imagep->setInFastCacheList(true); + } return imagep ; } @@ -503,6 +511,7 @@ LLViewerFetchedTexture *LLViewerTextureList::findImage(const LLUUID &image_id) void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) { + assert_main_thread(); llassert_always(mInitialized) ; llassert(image); if (image->isInImageList()) @@ -519,6 +528,7 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image) { + assert_main_thread(); llassert_always(mInitialized) ; llassert(image); if (!image->isInImageList()) @@ -593,16 +603,24 @@ static LLFastTimer::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images"); static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_PRIORITIES("Prioritize"); static LLFastTimer::DeclareTimer FTM_IMAGE_CALLBACKS("Callbacks"); static LLFastTimer::DeclareTimer FTM_IMAGE_FETCH("Fetch"); +static LLFastTimer::DeclareTimer FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch"); static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create"); static LLFastTimer::DeclareTimer FTM_IMAGE_STATS("Stats"); void LLViewerTextureList::updateImages(F32 max_time) { - if(gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) + static BOOL cleared = FALSE; + if(gTeleportDisplay) { - clearFetchingRequests(); + if(!cleared) + { + clearFetchingRequests(); + gPipeline.clearRebuildGroups(); + cleared = TRUE; + } return; } + cleared = FALSE; LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec()); @@ -613,6 +631,11 @@ void LLViewerTextureList::updateImages(F32 max_time) LLViewerStats::getInstance()->mRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory)); LLViewerStats::getInstance()->mFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory)); + { + //loading from fast cache + LLFastTimer t(FTM_FAST_CACHE_IMAGE_FETCH); + max_time -= updateImagesLoadingFastCache(max_time); + } { LLFastTimer t(FTM_IMAGE_UPDATE_PRIORITIES); @@ -673,14 +696,13 @@ void LLViewerTextureList::clearFetchingRequests() return; } + LLAppViewer::getTextureFetch()->deleteAllRequests(); + for (image_priority_list_t::iterator iter = mImageList.begin(); iter != mImageList.end(); ++iter) { - LLViewerFetchedTexture* image = *iter; - if(image->hasFetcher()) - { - image->forceToDeleteRequest() ; - } + LLViewerFetchedTexture* imagep = *iter; + imagep->forceToDeleteRequest() ; } } @@ -688,10 +710,11 @@ void LLViewerTextureList::updateImagesDecodePriorities() { // Update the decode priority for N images each frame { - const size_t max_update_count = llmin((S32) (1024*gFrameIntervalSeconds) + 1, 32); //target 1024 textures per second - S32 update_counter = llmin(max_update_count, mUUIDMap.size()/10); + static const S32 MAX_PRIO_UPDATES = gSavedSettings.getS32("TextureFetchUpdatePriorities"); // default: 32 + const size_t max_update_count = llmin((S32) (MAX_PRIO_UPDATES*MAX_PRIO_UPDATES*gFrameIntervalSeconds) + 1, MAX_PRIO_UPDATES); + S32 update_counter = llmin(max_update_count, mUUIDMap.size()); uuid_map_t::iterator iter = mUUIDMap.upper_bound(mLastUpdateUUID); - while(update_counter > 0 && !mUUIDMap.empty()) + while ((update_counter-- > 0) && !mUUIDMap.empty()) { if (iter == mUUIDMap.end()) { @@ -699,7 +722,13 @@ void LLViewerTextureList::updateImagesDecodePriorities() } mLastUpdateUUID = iter->first; LLPointer<LLViewerFetchedTexture> imagep = iter->second; - ++iter; // safe to incrament now + ++iter; // safe to increment now + + if(imagep->isInDebug()) + { + update_counter--; + continue; //is in debug, ignore. + } // // Flush formatted images using a lazy flush @@ -754,7 +783,16 @@ void LLViewerTextureList::updateImagesDecodePriorities() imagep->setInactive() ; } } - + + if (!imagep->isInImageList()) + { + continue; + } + if(imagep->isInFastCacheList()) + { + continue; //wait for loading from the fast cache. + } + imagep->processTextureStats(); F32 old_priority = imagep->getDecodePriority(); F32 old_priority_test = llmax(old_priority, 0.0f); @@ -764,15 +802,35 @@ void LLViewerTextureList::updateImagesDecodePriorities() if ((decode_priority_test < old_priority_test * .8f) || (decode_priority_test > old_priority_test * 1.25f)) { - removeImageFromList(imagep); + mImageList.erase(imagep) ; imagep->setDecodePriority(decode_priority); - addImageToList(imagep); + mImageList.insert(imagep); } - update_counter--; } } } +void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level) +{ + if(!tex->setDebugFetching(debug_level)) + { + return; + } + + const F32 DEBUG_PRIORITY = 100000.f; + F32 old_priority_test = llmax(tex->getDecodePriority(), 0.0f); + F32 decode_priority_test = DEBUG_PRIORITY; + + // Ignore < 20% difference + if ((decode_priority_test < old_priority_test * .8f) || + (decode_priority_test > old_priority_test * 1.25f)) + { + removeImageFromList(tex); + tex->setDecodePriority(decode_priority_test); + addImageToList(tex); + } +} + /* static U8 get_image_type(LLViewerFetchedTexture* imagep, LLHost target_host) { @@ -827,6 +885,36 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) return create_timer.getElapsedTimeF32(); } +F32 LLViewerTextureList::updateImagesLoadingFastCache(F32 max_time) +{ + if (gGLManager.mIsDisabled) return 0.0f; + if(mFastCacheList.empty()) + { + return 0.f; + } + + // + // loading texture raw data from the fast cache directly. + // + + LLTimer timer; + image_list_t::iterator enditer = mFastCacheList.begin(); + for (image_list_t::iterator iter = mFastCacheList.begin(); + iter != mFastCacheList.end();) + { + image_list_t::iterator curiter = iter++; + enditer = iter; + LLViewerFetchedTexture *imagep = *curiter; + imagep->loadFromFastCache(); + if (timer.getElapsedTimeF32() > max_time) + { + break; + } + } + mFastCacheList.erase(mFastCacheList.begin(), enditer); + return timer.getElapsedTimeF32(); +} + void LLViewerTextureList::forceImmediateUpdate(LLViewerFetchedTexture* imagep) { if(!imagep) @@ -850,15 +938,24 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time) { LLTimer image_op_timer; - // Update the decode priority for N images each frame - // Make a list with 32 high priority entries + 256 cycled entries - const size_t max_priority_count = llmin((S32) (256*10.f*gFrameIntervalSeconds)+1, 32); - const size_t max_update_count = llmin((S32) (1024*10.f*gFrameIntervalSeconds)+1, 256); + // Update fetch for N images each frame + static const S32 MAX_HIGH_PRIO_COUNT = gSavedSettings.getS32("TextureFetchUpdateHighPriority"); // default: 32 + static const S32 MAX_UPDATE_COUNT = gSavedSettings.getS32("TextureFetchUpdateMaxMediumPriority"); // default: 256 + static const S32 MIN_UPDATE_COUNT = gSavedSettings.getS32("TextureFetchUpdateMinMediumPriority"); // default: 32 + static const F32 MIN_PRIORITY_THRESHOLD = gSavedSettings.getF32("TextureFetchUpdatePriorityThreshold"); // default: 0.0 + static const bool SKIP_LOW_PRIO = gSavedSettings.getBOOL("TextureFetchUpdateSkipLowPriority"); // default: false + + size_t max_priority_count = llmin((S32) (MAX_HIGH_PRIO_COUNT*MAX_HIGH_PRIO_COUNT*gFrameIntervalSeconds)+1, MAX_HIGH_PRIO_COUNT); + max_priority_count = llmin(max_priority_count, mImageList.size()); - // 32 high priority entries + size_t total_update_count = mUUIDMap.size(); + size_t max_update_count = llmin((S32) (MAX_UPDATE_COUNT*MAX_UPDATE_COUNT*gFrameIntervalSeconds)+1, MAX_UPDATE_COUNT); + max_update_count = llmin(max_update_count, total_update_count); + + // MAX_HIGH_PRIO_COUNT high priority entries typedef std::vector<LLViewerFetchedTexture*> entries_list_t; entries_list_t entries; - size_t update_counter = llmin(max_priority_count, mImageList.size()); + size_t update_counter = max_priority_count; image_priority_list_t::iterator iter1 = mImageList.begin(); while(update_counter > 0) { @@ -868,52 +965,47 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time) update_counter--; } - // 256 cycled entries - update_counter = llmin(max_update_count, mUUIDMap.size()); + // MAX_UPDATE_COUNT cycled entries + update_counter = max_update_count; if(update_counter > 0) { uuid_map_t::iterator iter2 = mUUIDMap.upper_bound(mLastFetchUUID); - uuid_map_t::iterator iter2p = iter2; - while(update_counter > 0) + while ((update_counter > 0) && (total_update_count > 0)) { if (iter2 == mUUIDMap.end()) { iter2 = mUUIDMap.begin(); } - entries.push_back(iter2->second); - iter2p = iter2++; - update_counter--; + LLViewerFetchedTexture* imagep = iter2->second; + // Skip the textures where there's really nothing to do so to give some times to others. Also skip the texture if it's already in the high prio set. + if (!SKIP_LOW_PRIO || (SKIP_LOW_PRIO && ((imagep->getDecodePriority() > MIN_PRIORITY_THRESHOLD) || imagep->hasFetcher()))) + { + entries.push_back(imagep); + update_counter--; + } + + iter2++; + total_update_count--; } - - mLastFetchUUID = iter2p->first; } S32 fetch_count = 0; - S32 min_count = max_priority_count + max_update_count/4; + size_t min_update_count = llmin(MIN_UPDATE_COUNT,(S32)(entries.size()-max_priority_count)); + S32 min_count = max_priority_count + min_update_count; for (entries_list_t::iterator iter3 = entries.begin(); iter3 != entries.end(); ) { LLViewerFetchedTexture* imagep = *iter3++; - - bool fetching = imagep->updateFetch(); - if (fetching) + fetch_count += (imagep->updateFetch() ? 1 : 0); + if (min_count <= min_update_count) { - fetch_count++; + mLastFetchUUID = imagep->getID(); } - if (min_count <= 0 && image_op_timer.getElapsedTimeF32() > max_time) + if ((min_count-- <= 0) && (image_op_timer.getElapsedTimeF32() > max_time)) { break; } - min_count--; - } - //if (fetch_count == 0) - //{ - // gDebugTimers[0].pause(); - //} - //else - //{ - // gDebugTimers[0].unpause(); - //} + } return image_op_timer.getElapsedTimeF32(); } @@ -936,6 +1028,9 @@ void LLViewerTextureList::decodeAllImages(F32 max_time) { LLTimer timer; + //loading from fast cache + updateImagesLoadingFastCache(max_time); + // Update texture stats and priorities std::vector<LLPointer<LLViewerFetchedTexture> > image_list; for (image_priority_list_t::iterator iter = mImageList.begin(); @@ -1282,7 +1377,6 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d { static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ; - LLMemType mt1(LLMemType::MTYPE_APPFMTIMAGE); LLFastTimer t(FTM_PROCESS_IMAGES); // Receives image packet, copy into image object, @@ -1583,49 +1677,43 @@ struct UIImageDeclarations : public LLInitParam::Block<UIImageDeclarations> bool LLUIImageList::initFromFile() { - // construct path to canonical textures.xml in default skin dir - std::string base_file_path = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "default", "textures", "textures.xml"); + // Look for textures.xml in all the right places. Pass + // constraint=LLDir::ALL_SKINS because we want to overlay textures.xml + // from all the skins directories. + std::vector<std::string> textures_paths = + gDirUtilp->findSkinnedFilenames(LLDir::TEXTURES, "textures.xml", LLDir::ALL_SKINS); + std::vector<std::string>::const_iterator pi(textures_paths.begin()), pend(textures_paths.end()); + if (pi == pend) + { + llwarns << "No textures.xml found in skins directories" << llendl; + return false; + } + // The first (most generic) file gets special validations LLXMLNodePtr root; - - if (!LLXMLNode::parseFile(base_file_path, root, NULL)) + if (!LLXMLNode::parseFile(*pi, root, NULL)) { - llwarns << "Unable to parse UI image list file " << base_file_path << llendl; + llwarns << "Unable to parse UI image list file " << *pi << llendl; return false; } if (!root->hasAttribute("version")) { - llwarns << "No valid version number in UI image list file " << base_file_path << llendl; + llwarns << "No valid version number in UI image list file " << *pi << llendl; return false; } UIImageDeclarations images; LLXUIParser parser; - parser.readXUI(root, images, base_file_path); - - // add components defined in current skin - std::string skin_update_path = gDirUtilp->getSkinDir() - + gDirUtilp->getDirDelimiter() - + "textures" - + gDirUtilp->getDirDelimiter() - + "textures.xml"; - LLXMLNodePtr update_root; - if (skin_update_path != base_file_path - && LLXMLNode::parseFile(skin_update_path, update_root, NULL)) - { - parser.readXUI(update_root, images, skin_update_path); - } - - // add components defined in user override of current skin - skin_update_path = gDirUtilp->getUserSkinDir() - + gDirUtilp->getDirDelimiter() - + "textures" - + gDirUtilp->getDirDelimiter() - + "textures.xml"; - if (skin_update_path != base_file_path - && LLXMLNode::parseFile(skin_update_path, update_root, NULL)) - { - parser.readXUI(update_root, images, skin_update_path); + parser.readXUI(root, images, *pi); + + // add components defined in the rest of the skin paths + while (++pi != pend) + { + LLXMLNodePtr update_root; + if (LLXMLNode::parseFile(*pi, update_root, NULL)) + { + parser.readXUI(update_root, images, *pi); + } } if (!images.validateBlock()) return false; diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index e89997fe28..3dda973d3f 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -111,6 +111,7 @@ public: void doPrefetchImages(); void clearFetchingRequests(); + void setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level); static S32 getMinVideoRamSetting(); static S32 getMaxVideoRamSetting(bool get_recommended = false); @@ -120,6 +121,7 @@ private: F32 updateImagesCreateTextures(F32 max_time); F32 updateImagesFetchTextures(F32 max_time); void updateImagesUpdateStats(); + F32 updateImagesLoadingFastCache(F32 max_time); void addImage(LLViewerFetchedTexture *image); void deleteImage(LLViewerFetchedTexture *image); @@ -173,6 +175,7 @@ public: image_list_t mLoadingStreamList; image_list_t mCreateTextureList; image_list_t mCallbackList; + image_list_t mFastCacheList; // Note: just raw pointers because they are never referenced, just compared against std::set<LLViewerFetchedTexture*> mDirtyTextureList; diff --git a/indra/newview/llviewervisualparam.h b/indra/newview/llviewervisualparam.h index dd7751acd7..2826e6c316 100644 --- a/indra/newview/llviewervisualparam.h +++ b/indra/newview/llviewervisualparam.h @@ -65,6 +65,7 @@ protected: // VIRTUAL CLASS // a viewer side interface class for a generalized parametric modification of the avatar mesh //----------------------------------------------------------------------------- +LL_ALIGN_PREFIX(16) class LLViewerVisualParam : public LLVisualParam { public: @@ -83,11 +84,11 @@ public: // New Virtual functions virtual F32 getTotalDistortion() = 0; - virtual const LLVector3& getAvgDistortion() = 0; + virtual const LLVector4a& getAvgDistortion() = 0; virtual F32 getMaxDistortion() = 0; - virtual LLVector3 getVertexDistortion(S32 index, LLPolyMesh *mesh) = 0; - virtual const LLVector3* getFirstDistortion(U32 *index, LLPolyMesh **mesh) = 0; - virtual const LLVector3* getNextDistortion(U32 *index, LLPolyMesh **mesh) = 0; + virtual LLVector4a getVertexDistortion(S32 index, LLPolyMesh *mesh) = 0; + virtual const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **mesh) = 0; + virtual const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **mesh) = 0; // interface methods F32 getDisplayOrder() const { return getInfo()->mEditGroupDisplayOrder; } @@ -104,6 +105,6 @@ public: BOOL getCrossWearable() const { return getInfo()->mCrossWearable; } -}; +} LL_ALIGN_POSTFIX(16); #endif // LL_LLViewerVisualParam_H diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 30bb787fa7..4afd90b44c 100644..100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -37,8 +37,10 @@ #include "llagent.h" #include "llagentcamera.h" +#include "llcommunicationchannel.h" #include "llfloaterreg.h" #include "llmeshrepository.h" +#include "llnotificationhandler.h" #include "llpanellogin.h" #include "llviewerkeyboard.h" #include "llviewermenu.h" @@ -56,6 +58,7 @@ // linden library includes #include "llaudioengine.h" // mute on minimize +#include "llchatentry.h" #include "indra_constants.h" #include "llassetstorage.h" #include "llerrorcontrol.h" @@ -77,6 +80,7 @@ #include "llmediaentry.h" #include "llurldispatcher.h" #include "raytrace.h" +#include "llstat.h" // newview includes #include "llagent.h" @@ -122,11 +126,12 @@ #include "llkeyboard.h" #include "lllineeditor.h" #include "llmenugl.h" +#include "llmenuoptionpathfindingrebakenavmesh.h" #include "llmodaldialog.h" #include "llmorphview.h" #include "llmoveview.h" #include "llnavigationbar.h" -#include "llpanelpathfindingrebakenavmesh.h" +#include "llnotificationhandler.h" #include "llpaneltopinfobar.h" #include "llpopupview.h" #include "llpreviewtexture.h" @@ -187,7 +192,7 @@ #include "llviewerjoystick.h" #include "llviewernetwork.h" #include "llpostprocess.h" -#include "llnearbychatbar.h" +#include "llfloaterimnearbychat.h" #include "llagentui.h" #include "llwearablelist.h" @@ -197,7 +202,6 @@ #include "llfloaternotificationsconsole.h" -#include "llnearbychat.h" #include "llwindowlistener.h" #include "llviewerwindowlistener.h" #include "llpaneltopinfobar.h" @@ -334,27 +338,24 @@ public: if (gSavedSettings.getBOOL("DebugShowTime")) { - const U32 y_inc2 = 15; - for (std::map<S32,LLFrameTimer>::reverse_iterator iter = gDebugTimers.rbegin(); - iter != gDebugTimers.rend(); ++iter) { - S32 idx = iter->first; - LLFrameTimer& timer = iter->second; + const U32 y_inc2 = 15; + LLFrameTimer& timer = gTextureTimer; F32 time = timer.getElapsedTimeF32(); S32 hours = (S32)(time / (60*60)); S32 mins = (S32)((time - hours*(60*60)) / 60); S32 secs = (S32)((time - hours*(60*60) - mins*60)); - std::string label = gDebugTimerLabel[idx]; - if (label.empty()) label = llformat("Debug: %d", idx); - addText(xpos, ypos, llformat(" %s: %d:%02d:%02d", label.c_str(), hours,mins,secs)); ypos += y_inc2; + addText(xpos, ypos, llformat("Texture: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc2; } + { F32 time = gFrameTimeSeconds; S32 hours = (S32)(time / (60*60)); S32 mins = (S32)((time - hours*(60*60)) / 60); S32 secs = (S32)((time - hours*(60*60) - mins*60)); addText(xpos, ypos, llformat("Time: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc; } + } #if LL_WINDOWS if (gSavedSettings.getBOOL("DebugShowMemory")) @@ -563,6 +564,9 @@ public: addText(xpos, ypos, llformat("%d Render Calls", gPipeline.mBatchCount)); ypos += y_inc; + addText(xpos, ypos, llformat("%d/%d Objects Active", gObjectList.getNumActiveObjects(), gObjectList.getNumObjects())); + ypos += y_inc; + addText(xpos, ypos, llformat("%d Matrix Ops", gPipeline.mMatrixOpCount)); ypos += y_inc; @@ -615,7 +619,7 @@ public: addText(xpos, ypos, llformat("%d/%d Mesh HTTP Requests/Retries", LLMeshRepository::sHTTPRequestCount, LLMeshRepository::sHTTPRetryCount)); ypos += y_inc; - + addText(xpos, ypos, llformat("%d/%d Mesh LOD Pending/Processing", LLMeshRepository::sLODPending, LLMeshRepository::sLODProcessing)); ypos += y_inc; @@ -1542,7 +1546,8 @@ LLViewerWindow::LLViewerWindow(const Params& p) mResDirty(false), mStatesDirty(false), mCurrResolutionIndex(0), - mProgressView(NULL) + mProgressView(NULL), + mMouseVelocityStat(new LLStat("Mouse Velocity")) { // gKeyboard is still NULL, so it doesn't do LLWindowListener any good to // pass its value right now. Instead, pass it a nullary function that @@ -1550,13 +1555,18 @@ LLViewerWindow::LLViewerWindow(const Params& p) // boost::lambda::var() constructs such a functor on the fly. mWindowListener.reset(new LLWindowListener(this, boost::lambda::var(gKeyboard))); mViewerWindowListener.reset(new LLViewerWindowListener(this)); - LLNotificationChannel::buildChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alert")); - LLNotificationChannel::buildChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alertmodal")); - LLNotifications::instance().getChannel("VW_alerts")->connectChanged(&LLViewerWindow::onAlert); - LLNotifications::instance().getChannel("VW_alertmodal")->connectChanged(&LLViewerWindow::onAlert); - LLNotifications::instance().setIgnoreAllNotifications(gSavedSettings.getBOOL("IgnoreAllNotifications")); + mSystemChannel.reset(new LLNotificationChannel("System", "Visible", LLNotificationFilters::includeEverything)); + mCommunicationChannel.reset(new LLCommunicationChannel("Communication", "Visible")); + mAlertsChannel.reset(new LLNotificationsUI::LLViewerAlertHandler("VW_alerts", "alert")); + mModalAlertsChannel.reset(new LLNotificationsUI::LLViewerAlertHandler("VW_alertmodal", "alertmodal")); + + bool ignore = gSavedSettings.getBOOL("IgnoreAllNotifications"); + LLNotifications::instance().setIgnoreAllNotifications(ignore); + if (ignore) + { llinfos << "NOTE: ALL NOTIFICATIONS THAT OCCUR WILL GET ADDED TO IGNORE LIST FOR LATER RUNS." << llendl; + } // Default to application directory. LLViewerWindow::sSnapshotBaseName = "Snapshot"; @@ -1685,8 +1695,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) LLFontGL::initClass( gSavedSettings.getF32("FontScreenDPI"), mDisplayScale.mV[VX], mDisplayScale.mV[VY], - gDirUtilp->getAppRODataDir(), - LLUI::getXUIPaths()); + gDirUtilp->getAppRODataDir()); // Create container for all sub-views LLView::Params rvp; @@ -1820,8 +1829,8 @@ void LLViewerWindow::initBase() gDebugView->init(); gToolTipView = getRootView()->getChild<LLToolTipView>("tooltip view"); - // Initialize busy response message when logged in - LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLFloaterPreference::initBusyResponse)); + // Initialize do not disturb response message when logged in + LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLFloaterPreference::initDoNotDisturbResponse)); // Add the progress bar view (startup view), which overrides everything mProgressView = getRootView()->findChild<LLProgressView>("progress_view"); @@ -1927,11 +1936,10 @@ void LLViewerWindow::initWorldUI() LLPanelStandStopFlying* panel_stand_stop_flying = LLPanelStandStopFlying::getInstance(); panel_ssf_container->addChild(panel_stand_stop_flying); - LLPanelPathfindingRebakeNavmesh *panel_rebake_navmesh = LLPanelPathfindingRebakeNavmesh::getInstance(); - panel_ssf_container->addChild(panel_rebake_navmesh); - panel_ssf_container->setVisible(TRUE); - + + LLMenuOptionPathfindingRebakeNavmesh::getInstance()->initialize(); + // Load and make the toolbars visible // Note: we need to load the toolbars only *after* the user is logged in and IW if (gToolBarView) @@ -1977,12 +1985,12 @@ void LLViewerWindow::shutdownViews() gMorphView->setVisible(FALSE); } llinfos << "Global views cleaned." << llendl ; - + // DEV-40930: Clear sModalStack. Otherwise, any LLModalDialog left open // will crump with LL_ERRS. LLModalDialog::shutdownModals(); llinfos << "LLModalDialog shut down." << llendl; - + // destroy the nav bar, not currently part of gViewerWindow // *TODO: Make LLNavigationBar part of gViewerWindow if (LLNavigationBar::instanceExists()) @@ -1990,16 +1998,18 @@ void LLViewerWindow::shutdownViews() delete LLNavigationBar::getInstance(); } llinfos << "LLNavigationBar destroyed." << llendl ; - + // destroy menus after instantiating navbar above, as it needs // access to gMenuHolder cleanup_menus(); llinfos << "menus destroyed." << llendl ; - + // Delete all child views. delete mRootView; mRootView = NULL; llinfos << "RootView deleted." << llendl ; + + LLMenuOptionPathfindingRebakeNavmesh::getInstance()->quit(); // Automatically deleted as children of mRootView. Fix the globals. gStatusBar = NULL; @@ -2068,6 +2078,8 @@ LLViewerWindow::~LLViewerWindow() delete mDebugText; mDebugText = NULL; + + delete mMouseVelocityStat; } @@ -2492,26 +2504,20 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } - // Traverses up the hierarchy + LLFloater* focused_floaterp = gFloaterView->getFocusedFloater(); + std::string focusedFloaterName = (focused_floaterp ? focused_floaterp->getInstanceName() : ""); + if( keyboard_focus ) { - LLNearbyChatBar* nearby_chat = LLFloaterReg::findTypedInstance<LLNearbyChatBar>("chat_bar"); - - if (nearby_chat) + if ((focusedFloaterName == "nearby_chat") || (focusedFloaterName == "im_container") || (focusedFloaterName == "impanel")) { - LLLineEditor* chat_editor = nearby_chat->getChatBox(); - - // arrow keys move avatar while chatting hack - if (chat_editor && chat_editor->hasFocus()) - { - // If text field is empty, there's no point in trying to move - // cursor with arrow keys, so allow movement - if (chat_editor->getText().empty() - || gSavedSettings.getBOOL("ArrowKeysAlwaysMove")) + if (gSavedSettings.getBOOL("ArrowKeysAlwaysMove")) { // let Control-Up and Control-Down through for chat line history, if (!(key == KEY_UP && mask == MASK_CONTROL) - && !(key == KEY_DOWN && mask == MASK_CONTROL)) + && !(key == KEY_DOWN && mask == MASK_CONTROL) + && !(key == KEY_UP && mask == MASK_ALT) + && !(key == KEY_DOWN && mask == MASK_ALT)) { switch(key) { @@ -2529,9 +2535,9 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) break; } } - } } } + if (keyboard_focus->handleKey(key, mask, FALSE)) { return TRUE; @@ -2562,11 +2568,19 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) { - LLLineEditor* chat_editor = LLFloaterReg::getTypedInstance<LLNearbyChatBar>("chat_bar")->getChatBox(); + // Initialize nearby chat if it's missing + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + if (!nearby_chat) + { + LLSD name("im_container"); + LLFloaterReg::toggleInstanceOrBringToFront(name); + } + + LLChatEntry* chat_editor = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")->getChatBox(); if (chat_editor) { // passing NULL here, character will be added later when it is handled by character handler. - LLNearbyChatBar::getInstance()->startChat(NULL); + nearby_chat->startChat(NULL); return TRUE; } } @@ -2595,7 +2609,10 @@ BOOL LLViewerWindow::handleUnicodeChar(llwchar uni_char, MASK mask) if ((uni_char == 13 && mask != MASK_CONTROL) || (uni_char == 3 && mask == MASK_NONE)) { - return gViewerKeyboard.handleKey(KEY_RETURN, mask, gKeyboard->getKeyRepeated(KEY_RETURN)); + if (mask != MASK_ALT) + { + return gViewerKeyboard.handleKey(KEY_RETURN, mask, gKeyboard->getKeyRepeated(KEY_RETURN)); + } } // let menus handle navigation (jump) keys @@ -2810,7 +2827,6 @@ void LLViewerWindow::updateUI() BOOL handled = FALSE; - BOOL handled_by_top_ctrl = FALSE; LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); LLView* captor_view = dynamic_cast<LLView*>(mouse_captor); @@ -2995,7 +3011,6 @@ void LLViewerWindow::updateUI() S32 local_x, local_y; top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleHover(local_x, local_y, mask); - handled_by_top_ctrl = TRUE; } if ( !handled ) @@ -3241,7 +3256,7 @@ void LLViewerWindow::updateMouseDelta() mouse_vel.setVec((F32) dx, (F32) dy); } - mMouseVelocityStat.addValue(mouse_vel.magVec()); + mMouseVelocityStat->addValue(mouse_vel.magVec()); } void LLViewerWindow::updateKeyboardFocus() @@ -4230,14 +4245,48 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei image_height = llmin(image_height, window_height); } + S32 original_width = 0; + S32 original_height = 0; + bool reset_deferred = false; + + LLRenderTarget scratch_space; + F32 scale_factor = 1.0f ; if (!keep_window_aspect || (image_width > window_width) || (image_height > window_height)) { - // if image cropping or need to enlarge the scene, compute a scale_factor - F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ; - snapshot_width = (S32)(ratio * image_width) ; - snapshot_height = (S32)(ratio * image_height) ; - scale_factor = llmax(1.0f, 1.0f / ratio) ; + if ((image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui) + { + if (scratch_space.allocate(image_width, image_height, GL_RGBA, true, true)) + { + original_width = gPipeline.mDeferredScreen.getWidth(); + original_height = gPipeline.mDeferredScreen.getHeight(); + + if (gPipeline.allocateScreenBuffer(image_width, image_height)) + { + window_width = image_width; + window_height = image_height; + snapshot_width = image_width; + snapshot_height = image_height; + reset_deferred = true; + mWorldViewRectRaw.set(0, image_height, image_width, 0); + scratch_space.bindTarget(); + } + else + { + scratch_space.release(); + gPipeline.allocateScreenBuffer(original_width, original_height); + } + } + } + + if (!reset_deferred) + { + // if image cropping or need to enlarge the scene, compute a scale_factor + F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ; + snapshot_width = (S32)(ratio * image_width) ; + snapshot_height = (S32)(ratio * image_height) ; + scale_factor = llmax(1.0f, 1.0f / ratio) ; + } } if (show_ui && scale_factor > 1.f) @@ -4426,11 +4475,20 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei gPipeline.resetDrawOrders(); } + if (reset_deferred) + { + mWorldViewRectRaw = window_rect; + scratch_space.flush(); + scratch_space.release(); + gPipeline.allocateScreenBuffer(original_width, original_height); + + } + if (high_res) { send_agent_resume(); } - + return ret; } @@ -4722,7 +4780,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) LLViewerDynamicTexture::restoreGL(); LLVOAvatar::restoreGL(); LLVOPartGroup::restoreGL(); - + gResizeScreenTexture = TRUE; gWindowResized = TRUE; @@ -4757,8 +4815,7 @@ void LLViewerWindow::initFonts(F32 zoom_factor) LLFontGL::initClass( gSavedSettings.getF32("FontScreenDPI"), mDisplayScale.mV[VX] * zoom_factor, mDisplayScale.mV[VY] * zoom_factor, - gDirUtilp->getAppRODataDir(), - LLUI::getXUIPaths()); + gDirUtilp->getAppRODataDir()); // Force font reloads, which can be very slow LLFontGL::loadDefaultFonts(); } @@ -4768,8 +4825,11 @@ void LLViewerWindow::requestResolutionUpdate() mResDirty = true; } +static LLFastTimer::DeclareTimer FTM_WINDOW_CHECK_SETTINGS("Window Settings"); + void LLViewerWindow::checkSettings() { + LLFastTimer t(FTM_WINDOW_CHECK_SETTINGS); if (mStatesDirty) { gGL.refreshState(); @@ -4947,7 +5007,7 @@ S32 LLViewerWindow::getChatConsoleBottomPad() S32 offset = 0; if(gToolBarView) - offset += gToolBarView->getChild<LLView>("bottom_toolbar_panel")->getRect().getHeight(); + offset += gToolBarView->getBottomToolbar()->getRect().getHeight(); return offset; } @@ -4984,25 +5044,6 @@ LLRect LLViewerWindow::getChatConsoleRect() //---------------------------------------------------------------------------- -//static -bool LLViewerWindow::onAlert(const LLSD& notify) -{ - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - if (gHeadlessClient) - { - llinfos << "Alert: " << notification->getName() << llendl; - } - - // If we're in mouselook, the mouse is hidden and so the user can't click - // the dialog buttons. In that case, change to First Person instead. - if( gAgentCamera.cameraMouselook() ) - { - gAgentCamera.changeCameraToDefault(); - } - return false; -} - void LLViewerWindow::setUIVisibility(bool visible) { mUIVisible = visible; @@ -5207,8 +5248,8 @@ void LLPickInfo::getSurfaceInfo() LLFace* facep = objectp->mDrawable->getFace(mObjectFace); if (facep) { - mUVCoords = facep->surfaceToTexture(mSTCoords, mIntersection, mNormal); - } + mUVCoords = facep->surfaceToTexture(mSTCoords, mIntersection, mNormal); + } } // and XY coords: diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 6efcaeaf18..b33488fd78 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -41,8 +41,8 @@ #include "llcursortypes.h" #include "llwindowcallbacks.h" #include "lltimer.h" -#include "llstat.h" #include "llmousehandler.h" +#include "llnotifications.h" #include "llhandle.h" #include "llinitparam.h" @@ -50,7 +50,7 @@ #include <boost/signals2.hpp> #include <boost/scoped_ptr.hpp> - +class LLStat; class LLView; class LLViewerObject; class LLUUID; @@ -251,7 +251,7 @@ public: S32 getCurrentMouseDX() const { return mCurrentMouseDelta.mX; } S32 getCurrentMouseDY() const { return mCurrentMouseDelta.mY; } LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; } - LLStat * getMouseVelocityStat() { return &mMouseVelocityStat; } + LLStat* getMouseVelocityStat() { return mMouseVelocityStat; } BOOL getLeftMouseDown() const { return mLeftMouseDown; } BOOL getMiddleMouseDown() const { return mMiddleMouseDown; } BOOL getRightMouseDown() const { return mRightMouseDown; } @@ -401,7 +401,6 @@ public: private: bool shouldShowToolTipFor(LLMouseHandler *mh); - static bool onAlert(const LLSD& notify); void switchToolByMask(MASK mask); void destroyWindow(); @@ -418,6 +417,11 @@ private: bool mActive; bool mUIVisible; + LLNotificationChannelPtr mSystemChannel; + LLNotificationChannelPtr mCommunicationChannel; + LLNotificationChannelPtr mAlertsChannel; + LLNotificationChannelPtr mModalAlertsChannel; + LLRect mWindowRectRaw; // whole window, including UI LLRect mWindowRectScaled; // whole window, scaled by UI size LLRect mWorldViewRectRaw; // area of screen for 3D world @@ -428,7 +432,7 @@ private: LLCoordGL mCurrentMousePoint; // last mouse position in GL coords LLCoordGL mLastMousePoint; // Mouse point at last frame. LLCoordGL mCurrentMouseDelta; //amount mouse moved this frame - LLStat mMouseVelocityStat; + LLStat* mMouseVelocityStat; BOOL mLeftMouseDown; BOOL mMiddleMouseDown; BOOL mRightMouseDown; diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp index ec932501e5..abb5153480 100644 --- a/indra/newview/llvlcomposition.cpp +++ b/indra/newview/llvlcomposition.cpp @@ -457,8 +457,6 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, texturep->createGLTexture(0, raw); } texturep->setSubImage(raw, tex_x_begin, tex_y_begin, tex_x_end - tex_x_begin, tex_y_end - tex_y_begin); - LLSurface::sTextureUpdateTime += gen_timer.getElapsedTimeF32(); - LLSurface::sTexelsUpdated += (tex_x_end - tex_x_begin) * (tex_y_end - tex_y_begin); for (S32 i = 0; i < 4; i++) { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 33dc12c473..d295fc60cd 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -62,6 +62,7 @@ #include "llhudmanager.h" #include "llhudnametag.h" #include "llhudtext.h" // for mText/mDebugText +#include "llinitparam.h" #include "llkeyframefallmotion.h" #include "llkeyframestandmotion.h" #include "llkeyframewalkmotion.h" @@ -191,6 +192,9 @@ const S32 MAX_BUBBLE_CHAT_LENGTH = DB_CHAT_MSG_STR_LEN; const S32 MAX_BUBBLE_CHAT_UTTERANCES = 12; const F32 CHAT_FADE_TIME = 8.0; const F32 BUBBLE_CHAT_TIME = CHAT_FADE_TIME * 3.f; +const F32 NAMETAG_UPDATE_THRESHOLD = 0.3f; +const F32 NAMETAG_VERTICAL_SCREEN_OFFSET = 25.f; +const F32 NAMETAG_VERT_OFFSET_WEIGHT = 0.17f; const LLColor4 DUMMY_COLOR = LLColor4(0.5,0.5,0.5,1.0); @@ -222,55 +226,62 @@ struct LLTextureMaskData **/ //------------------------------------------------------------------------ -// LLVOBoneInfo +// LLVOAvatarBoneInfo // Trans/Scale/Rot etc. info about each avatar bone. Used by LLVOAvatarSkeleton. //------------------------------------------------------------------------ -class LLVOAvatarBoneInfo +struct LLVOAvatarCollisionVolumeInfo : public LLInitParam::Block<LLVOAvatarCollisionVolumeInfo> { - friend class LLVOAvatar; - friend class LLVOAvatarSkeletonInfo; -public: - LLVOAvatarBoneInfo() : mIsJoint(FALSE) {} - ~LLVOAvatarBoneInfo() + LLVOAvatarCollisionVolumeInfo() + : name("name"), + pos("pos"), + rot("rot"), + scale("scale") + {} + + Mandatory<std::string> name; + Mandatory<LLVector3> pos, + rot, + scale; +}; + +struct LLVOAvatarChildJoint : public LLInitParam::ChoiceBlock<LLVOAvatarChildJoint> { - std::for_each(mChildList.begin(), mChildList.end(), DeletePointer()); - } - BOOL parseXml(LLXmlTreeNode* node); + Alternative<Lazy<struct LLVOAvatarBoneInfo, IS_A_BLOCK> > bone; + Alternative<LLVOAvatarCollisionVolumeInfo> collision_volume; -private: - std::string mName; - BOOL mIsJoint; - LLVector3 mPos; - LLVector3 mRot; - LLVector3 mScale; - LLVector3 mPivot; - typedef std::vector<LLVOAvatarBoneInfo*> child_list_t; - child_list_t mChildList; + LLVOAvatarChildJoint() + : bone("bone"), + collision_volume("collision_volume") + {} +}; + +struct LLVOAvatarBoneInfo : public LLInitParam::Block<LLVOAvatarBoneInfo, LLVOAvatarCollisionVolumeInfo> +{ + LLVOAvatarBoneInfo() + : pivot("pivot") + {} + + Mandatory<LLVector3> pivot; + Multiple<LLVOAvatarChildJoint> children; }; //------------------------------------------------------------------------ // LLVOAvatarSkeletonInfo // Overall avatar skeleton //------------------------------------------------------------------------ -class LLVOAvatarSkeletonInfo +struct LLVOAvatarSkeletonInfo : public LLInitParam::Block<LLVOAvatarSkeletonInfo> { - friend class LLVOAvatar; -public: - LLVOAvatarSkeletonInfo() : - mNumBones(0), mNumCollisionVolumes(0) {} - ~LLVOAvatarSkeletonInfo() - { - std::for_each(mBoneInfoList.begin(), mBoneInfoList.end(), DeletePointer()); - } - BOOL parseXml(LLXmlTreeNode* node); - S32 getNumBones() const { return mNumBones; } - S32 getNumCollisionVolumes() const { return mNumCollisionVolumes; } + LLVOAvatarSkeletonInfo() + : skeleton_root(""), + num_bones("num_bones"), + num_collision_volumes("num_collision_volumes"), + version("version") + {} -private: - S32 mNumBones; - S32 mNumCollisionVolumes; - typedef std::vector<LLVOAvatarBoneInfo*> bone_info_list_t; - bone_info_list_t mBoneInfoList; + Mandatory<std::string> version; + Mandatory<S32> num_bones, + num_collision_volumes; + Mandatory<LLVOAvatarChildJoint> skeleton_root; }; //----------------------------------------------------------------------------- @@ -595,7 +606,7 @@ private: // Static Data //----------------------------------------------------------------------------- LLXmlTree LLVOAvatar::sXMLTree; -LLXmlTree LLVOAvatar::sSkeletonXMLTree; +LLXMLNodePtr LLVOAvatar::sSkeletonXMLTree; LLVOAvatarSkeletonInfo* LLVOAvatar::sAvatarSkeletonInfo = NULL; LLVOAvatar::LLVOAvatarXmlInfo* LLVOAvatar::sAvatarXmlInfo = NULL; LLVOAvatarDictionary *LLVOAvatar::sAvatarDictionary = NULL; @@ -667,7 +678,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mNameString(), mTitle(), mNameAway(false), - mNameBusy(false), + mNameDoNotDisturb(false), mNameMute(false), mNameAppearance(false), mNameFriend(false), @@ -695,7 +706,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mLastRezzedStatus(-1) { - LLMemType mt(LLMemType::MTYPE_AVATAR); //VTResume(); // VTune // mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline @@ -805,18 +815,19 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c //------------------------------------------------------------------------ LLVOAvatar::~LLVOAvatar() { - if (!mFullyLoaded) - { + if (!mFullyLoaded) + { debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud"); - } - else - { + } + else + { debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding"); - } + } lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl; mRoot.removeAllChildren(); + mJointMap.clear(); deleteAndClearArray(mSkeleton); deleteAndClearArray(mCollisionVolumes); @@ -1213,18 +1224,6 @@ void LLVOAvatar::initClass() llerrs << "Error parsing skeleton file: " << skeleton_path << llendl; } - // Process XML data - - // avatar_skeleton.xml - if (sAvatarSkeletonInfo) - { //this can happen if a login attempt failed - delete sAvatarSkeletonInfo; - } - sAvatarSkeletonInfo = new LLVOAvatarSkeletonInfo; - if (!sAvatarSkeletonInfo->parseXml(sSkeletonXMLTree.getRoot())) - { - llerrs << "Error parsing skeleton XML file: " << skeleton_path << llendl; - } // parse avatar_lad.xml if (sAvatarXmlInfo) { //this can happen if a login attempt failed @@ -1273,7 +1272,7 @@ void LLVOAvatar::initClass() void LLVOAvatar::cleanupClass() { deleteAndClear(sAvatarXmlInfo); - sSkeletonXMLTree.cleanup(); + sSkeletonXMLTree = NULL; sXMLTree.cleanup(); } @@ -1356,7 +1355,7 @@ void LLVOAvatar::initInstance(void) if (LLCharacter::sInstances.size() == 1) { LLKeyframeMotion::setVFS(gStaticVFS); - registerMotion( ANIM_AGENT_BUSY, LLNullMotion::create ); + registerMotion( ANIM_AGENT_DO_NOT_DISTURB, LLNullMotion::create ); registerMotion( ANIM_AGENT_CROUCH, LLKeyframeStandMotion::create ); registerMotion( ANIM_AGENT_CROUCHWALK, LLKeyframeWalkMotion::create ); registerMotion( ANIM_AGENT_EXPRESS_AFRAID, LLEmote::create ); @@ -1459,8 +1458,6 @@ void LLVOAvatar::onShift(const LLVector4a& shift_vector) const LLVector3& shift = reinterpret_cast<const LLVector3&>(shift_vector); mLastAnimExtents[0] += shift; mLastAnimExtents[1] += shift; - mNeedsImpostorUpdate = TRUE; - mNeedsAnimUpdate = TRUE; } void LLVOAvatar::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax) @@ -1740,38 +1737,42 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector //----------------------------------------------------------------------------- BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - //------------------------------------------------------------------------- // parse the file //------------------------------------------------------------------------- - BOOL parsesuccess = sSkeletonXMLTree.parseFile( filename, FALSE ); - if (!parsesuccess) + LLXMLNodePtr skeleton_xml; + BOOL parsesuccess = LLXMLNode::parseFile(filename, skeleton_xml, NULL); + + if (!parsesuccess || skeleton_xml.isNull()) { llerrs << "Can't parse skeleton file: " << filename << llendl; return FALSE; } - // now sanity check xml file - LLXmlTreeNode* root = sSkeletonXMLTree.getRoot(); - if (!root) + // Process XML data + if (sAvatarSkeletonInfo) + { //this can happen if a login attempt failed + delete sAvatarSkeletonInfo; + } + sAvatarSkeletonInfo = new LLVOAvatarSkeletonInfo; + + LLXUIParser parser; + parser.readXUI(skeleton_xml, *sAvatarSkeletonInfo, filename); + if (!sAvatarSkeletonInfo->validateBlock()) { - llerrs << "No root node found in avatar skeleton file: " << filename << llendl; - return FALSE; + llerrs << "Error parsing skeleton XML file: " << filename << llendl; } - if( !root->hasName( "linden_skeleton" ) ) + if( !skeleton_xml->hasName( "linden_skeleton" ) ) { llerrs << "Invalid avatar skeleton file header: " << filename << llendl; return FALSE; } - std::string version; - static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version"); - if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") ) + if (sAvatarSkeletonInfo->version() != "1.0") { - llerrs << "Invalid avatar skeleton file version: " << version << " in file: " << filename << llendl; + llerrs << "Invalid avatar skeleton file version: " << sAvatarSkeletonInfo->version() << " in file: " << filename << llendl; return FALSE; } @@ -1780,14 +1781,11 @@ BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename) //----------------------------------------------------------------------------- // setupBone() -//----------------------------------------------------------------------------- -BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent, S32 &volume_num, S32 &joint_num) +//----------------------------------------------------------- +BOOL LLVOAvatar::setupBone(const LLVOAvatarChildJoint& info, LLViewerJoint* parent, S32 &volume_num, S32 &joint_num) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - LLViewerJoint* joint = NULL; - - if (info->mIsJoint) + if (info.bone.isChosen()) { joint = (LLViewerJoint*)getCharacterJoint(joint_num); if (!joint) @@ -1795,7 +1793,23 @@ BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent llwarns << "Too many bones" << llendl; return FALSE; } - joint->setName( info->mName ); + joint->setName( info.bone().name ); + joint->setPosition(info.bone().pos); + joint->setRotation(mayaQ(info.bone().rot().mV[VX], info.bone().rot().mV[VY], info.bone().rot().mV[VZ], LLQuaternion::XYZ)); + joint->setScale(info.bone().scale); + joint->setSkinOffset( info.bone().pivot ); + joint_num++; + + for (LLInitParam::ParamIterator<LLVOAvatarChildJoint>::const_iterator child_it = info.bone().children.begin(), + end_it = info.bone().children.end(); + child_it != end_it; + ++child_it) + { + if (!setupBone(*child_it, joint, volume_num, joint_num)) + { + return FALSE; + } + } } else // collision volume { @@ -1805,7 +1819,11 @@ BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent return FALSE; } joint = (LLViewerJoint*)(&mCollisionVolumes[volume_num]); - joint->setName( info->mName ); + joint->setName( info.collision_volume.name); + joint->setPosition(info.collision_volume.pos); + joint->setRotation(mayaQ(info.collision_volume.rot().mV[VX], info.collision_volume.rot().mV[VY], info.collision_volume.rot().mV[VZ], LLQuaternion::XYZ)); + joint->setScale(info.collision_volume.scale); + volume_num++; } // add to parent @@ -1814,34 +1832,8 @@ BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent parent->addChild( joint ); } - joint->setPosition(info->mPos); - joint->setRotation(mayaQ(info->mRot.mV[VX], info->mRot.mV[VY], - info->mRot.mV[VZ], LLQuaternion::XYZ)); - joint->setScale(info->mScale); - joint->setDefaultFromCurrentXform(); - if (info->mIsJoint) - { - joint->setSkinOffset( info->mPivot ); - joint_num++; - } - else // collision volume - { - volume_num++; - } - - // setup children - LLVOAvatarBoneInfo::child_list_t::const_iterator iter; - for (iter = info->mChildList.begin(); iter != info->mChildList.end(); ++iter) - { - LLVOAvatarBoneInfo *child_info = *iter; - if (!setupBone(child_info, joint, volume_num, joint_num)) - { - return FALSE; - } - } - return TRUE; } @@ -1850,41 +1842,35 @@ BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent //----------------------------------------------------------------------------- BOOL LLVOAvatar::buildSkeleton(const LLVOAvatarSkeletonInfo *info) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - //------------------------------------------------------------------------- // allocate joints //------------------------------------------------------------------------- - if (!allocateCharacterJoints(info->mNumBones)) + if (!allocateCharacterJoints(info->num_bones)) { - llerrs << "Can't allocate " << info->mNumBones << " joints" << llendl; + llerrs << "Can't allocate " << info->num_bones() << " joints" << llendl; return FALSE; } //------------------------------------------------------------------------- // allocate volumes //------------------------------------------------------------------------- - if (info->mNumCollisionVolumes) + if (info->num_collision_volumes) { - if (!allocateCollisionVolumes(info->mNumCollisionVolumes)) + if (!allocateCollisionVolumes(info->num_collision_volumes)) { - llerrs << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << llendl; + llerrs << "Can't allocate " << info->num_collision_volumes() << " collision volumes" << llendl; return FALSE; } } S32 current_joint_num = 0; S32 current_volume_num = 0; - LLVOAvatarSkeletonInfo::bone_info_list_t::const_iterator iter; - for (iter = info->mBoneInfoList.begin(); iter != info->mBoneInfoList.end(); ++iter) + + if (!setupBone(info->skeleton_root, NULL, current_volume_num, current_joint_num)) { - LLVOAvatarBoneInfo *info = *iter; - if (!setupBone(info, NULL, current_volume_num, current_joint_num)) - { llerrs << "Error parsing bone in skeleton file" << llendl; return FALSE; } - } return TRUE; } @@ -1922,8 +1908,6 @@ void LLVOAvatar::startDefaultMotions() //----------------------------------------------------------------------------- void LLVOAvatar::buildCharacter() { - LLMemType mt(LLMemType::MTYPE_AVATAR); - //------------------------------------------------------------------------- // remove all references to our existing skeleton // so we can rebuild it @@ -1934,6 +1918,7 @@ void LLVOAvatar::buildCharacter() // remove all of mRoot's children //------------------------------------------------------------------------- mRoot.removeAllChildren(); + mJointMap.clear(); mIsBuilt = FALSE; //------------------------------------------------------------------------- @@ -2072,8 +2057,6 @@ void LLVOAvatar::buildCharacter() //----------------------------------------------------------------------------- void LLVOAvatar::releaseMeshData() { - LLMemType mt(LLMemType::MTYPE_AVATAR); - if (sInstances.size() < AVATAR_RELEASE_THRESHOLD || mIsDummy) { return; @@ -2096,15 +2079,15 @@ void LLVOAvatar::releaseMeshData() LLFace* facep = mDrawable->getFace(0); if (facep) { - facep->setSize(0, 0); - for(S32 i = mNumInitFaces ; i < mDrawable->getNumFaces(); i++) - { - facep = mDrawable->getFace(i); + facep->setSize(0, 0); + for(S32 i = mNumInitFaces ; i < mDrawable->getNumFaces(); i++) + { + facep = mDrawable->getFace(i); if (facep) { - facep->setSize(0, 0); - } - } + facep->setSize(0, 0); + } + } } } @@ -2128,7 +2111,6 @@ void LLVOAvatar::releaseMeshData() void LLVOAvatar::restoreMeshData() { llassert(!isSelf()); - LLMemType mt(LLMemType::MTYPE_AVATAR); //llinfos << "Restoring" << llendl; mMeshValid = TRUE; @@ -2344,8 +2326,6 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, U32 block_num, const EObjectUpdateType update_type, LLDataPacker *dp) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - LLVector3 old_vel = getVelocity(); const BOOL has_name = !getNVPair("FirstName"); @@ -2353,11 +2333,11 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, U32 retval = LLViewerObject::processUpdateMessage(mesgsys, user_data, block_num, update_type, dp); // Print out arrival information once we have name of avatar. - if (has_name && getNVPair("FirstName")) - { - mDebugExistenceTimer.reset(); + if (has_name && getNVPair("FirstName")) + { + mDebugExistenceTimer.reset(); debugAvatarRezTime("AvatarRezArrivedNotification","avatar arrived"); - } + } if(retval & LLViewerObject::INVALID_UPDATE) { @@ -2390,7 +2370,7 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid) } } -static LLFastTimer::DeclareTimer FTM_AVATAR_UPDATE("Update Avatar"); +static LLFastTimer::DeclareTimer FTM_AVATAR_UPDATE("Avatar Update"); static LLFastTimer::DeclareTimer FTM_JOINT_UPDATE("Update Joints"); //------------------------------------------------------------------------ @@ -2423,20 +2403,19 @@ void LLVOAvatar::dumpAnimationState() //------------------------------------------------------------------------ // idleUpdate() //------------------------------------------------------------------------ -BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - LLMemType mt(LLMemType::MTYPE_AVATAR); LLFastTimer t(FTM_AVATAR_UPDATE); if (isDead()) { llinfos << "Warning! Idle on dead avatar" << llendl; - return TRUE; + return; } if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR))) { - return TRUE; + return; } checkTextureLoading() ; @@ -2519,8 +2498,6 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) idleUpdateNameTag( root_pos_last ); idleUpdateRenderCost(); - - return TRUE; } void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) @@ -2692,7 +2669,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) if (isImpostor() && !mNeedsImpostorUpdate) { - LLVector4a ext[2]; + LL_ALIGN_16(LLVector4a ext[2]); F32 distance; LLVector3 angle; @@ -2868,8 +2845,8 @@ void LLVOAvatar::idleUpdateLoadingEffect() { LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL; mFirstFullyVisible = FALSE; - LLAppearanceMgr::instance().onFirstFullyVisible(); - } + LLAppearanceMgr::instance().onFirstFullyVisible(); + } if (isFullyLoaded() && mFirstFullyVisible && !isSelf()) { LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL; @@ -3023,7 +3000,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) mVisibleChat = visible_chat; new_name = TRUE; } - + if (sRenderGroupTitles != mRenderGroupTitles) { mRenderGroupTitles = sRenderGroupTitles; @@ -3066,7 +3043,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) if (!mNameText) { mNameText = static_cast<LLHUDNameTag*>( LLHUDObject::addHUDObject( - LLHUDObject::LL_HUD_NAME_TAG) ); + LLHUDObject::LL_HUD_NAME_TAG) ); //mNameText->setMass(10.f); mNameText->setSourceObject(this); mNameText->setVertAlignment(LLHUDNameTag::ALIGN_VERT_TOP); @@ -3075,10 +3052,9 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f); sNumVisibleChatBubbles++; new_name = TRUE; - } + } - LLVector3 name_position = idleUpdateNameTagPosition(root_pos_last); - mNameText->setPositionAgent(name_position); + idleUpdateNameTagPosition(root_pos_last); idleUpdateNameTagText(new_name); idleUpdateNameTagAlpha(new_name, alpha); } @@ -3093,7 +3069,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) if (!firstname || !lastname) return; bool is_away = mSignaledAnimations.find(ANIM_AGENT_AWAY) != mSignaledAnimations.end(); - bool is_busy = mSignaledAnimations.find(ANIM_AGENT_BUSY) != mSignaledAnimations.end(); + bool is_do_not_disturb = mSignaledAnimations.find(ANIM_AGENT_DO_NOT_DISTURB) != mSignaledAnimations.end(); bool is_appearance = mSignaledAnimations.find(ANIM_AGENT_CUSTOMIZE) != mSignaledAnimations.end(); bool is_muted; if (isSelf()) @@ -3121,11 +3097,12 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) // Rebuild name tag if state change detected if (mNameString.empty() + || (mNameString.size() == 2 && mNameString[0] == 10 && mNameString[1] == 10) // *TODO : find out why mNameString is sometimes "" || new_name || (!title && !mTitle.empty()) || (title && mTitle != title->getString()) || is_away != mNameAway - || is_busy != mNameBusy + || is_do_not_disturb != mNameDoNotDisturb || is_muted != mNameMute || is_appearance != mNameAppearance || is_friend != mNameFriend @@ -3135,7 +3112,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) clearNameTag(); - if (is_away || is_muted || is_busy || is_appearance) + if (is_away || is_muted || is_do_not_disturb || is_appearance) { std::string line; if (is_away) @@ -3143,9 +3120,9 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) line += LLTrans::getString("AvatarAway"); line += ", "; } - if (is_busy) + if (is_do_not_disturb) { - line += LLTrans::getString("AvatarBusy"); + line += LLTrans::getString("AvatarDoNotDisturb"); line += ", "; } if (is_muted) @@ -3166,7 +3143,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) // trim last ", " line.resize( line.length() - 2 ); addNameTagLine(line, name_tag_color, LLFontGL::NORMAL, - LLFontGL::getFontSansSerifSmall()); + LLFontGL::getFontSansSerifSmall()); } if (sRenderGroupTitles @@ -3175,48 +3152,46 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) std::string title_str = title->getString(); LLStringFn::replace_ascii_controlchars(title_str,LL_UNKNOWN_CHAR); addNameTagLine(title_str, name_tag_color, LLFontGL::NORMAL, - LLFontGL::getFontSansSerifSmall()); + LLFontGL::getFontSansSerifSmall()); } static LLUICachedControl<bool> show_display_names("NameTagShowDisplayNames"); static LLUICachedControl<bool> show_usernames("NameTagShowUsernames"); - if (LLAvatarNameCache::useDisplayNames()) + if (LLAvatarName::useDisplayNames()) { LLAvatarName av_name; if (!LLAvatarNameCache::get(getID(), &av_name)) { - // ...call this function back when the name arrives - // and force a rebuild - LLAvatarNameCache::get(getID(), - boost::bind(&LLVOAvatar::clearNameTag, this)); + // Force a rebuild at next idle + // Note: do not connect a callback on idle(). + clearNameTag(); } // Might be blank if name not available yet, that's OK if (show_display_names) { - addNameTagLine(av_name.mDisplayName, name_tag_color, LLFontGL::NORMAL, - LLFontGL::getFontSansSerif()); + addNameTagLine(av_name.getDisplayName(), name_tag_color, LLFontGL::NORMAL, + LLFontGL::getFontSansSerif()); } // Suppress SLID display if display name matches exactly (ugh) - if (show_usernames && !av_name.mIsDisplayNameDefault) + if (show_usernames && !av_name.isDisplayNameDefault()) { // *HACK: Desaturate the color LLColor4 username_color = name_tag_color * 0.83f; - addNameTagLine(av_name.mUsername, username_color, LLFontGL::NORMAL, - LLFontGL::getFontSansSerifSmall()); + addNameTagLine(av_name.getUserName(), username_color, LLFontGL::NORMAL, + LLFontGL::getFontSansSerifSmall()); } } else { const LLFontGL* font = LLFontGL::getFontSansSerif(); - std::string full_name = - LLCacheName::buildFullName( firstname->getString(), lastname->getString() ); + std::string full_name = LLCacheName::buildFullName( firstname->getString(), lastname->getString() ); addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font); } mNameAway = is_away; - mNameBusy = is_busy; + mNameDoNotDisturb = is_do_not_disturb; mNameMute = is_muted; mNameAppearance = is_appearance; mNameFriend = is_friend; @@ -3231,7 +3206,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) mNameText->setFont(LLFontGL::getFontSansSerif()); mNameText->setTextAlignment(LLHUDNameTag::ALIGN_TEXT_LEFT); mNameText->setFadeDistance(CHAT_NORMAL_RADIUS * 2.f, 5.f); - + char line[MAX_STRING]; /* Flawfinder: ignore */ line[0] = '\0'; std::deque<LLChat>::iterator chat_iter = mChats.begin(); @@ -3251,13 +3226,13 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) LLFontGL::StyleFlags style; switch(chat_iter->mChatType) { - case CHAT_TYPE_WHISPER: + case CHAT_TYPE_WHISPER: style = LLFontGL::ITALIC; break; - case CHAT_TYPE_SHOUT: + case CHAT_TYPE_SHOUT: style = LLFontGL::BOLD; break; - default: + default: style = LLFontGL::NORMAL; break; } @@ -3284,13 +3259,13 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) S32 dot_count = (llfloor(mTypingTimer.getElapsedTimeF32() * 3.f) + 2) % 3 + 1; switch(dot_count) { - case 1: + case 1: mNameText->addLine(".", new_chat); break; - case 2: + case 2: mNameText->addLine("..", new_chat); break; - case 3: + case 3: mNameText->addLine("...", new_chat); break; } @@ -3329,6 +3304,7 @@ void LLVOAvatar::clearNameTag() mNameText->setLabel(""); mNameText->setString( "" ); } + mTimeVisible.reset(); } //static @@ -3354,34 +3330,45 @@ void LLVOAvatar::invalidateNameTags() if (avatar->isDead()) continue; avatar->clearNameTag(); - } } // Compute name tag position during idle update -LLVector3 LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last) +void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last) { LLQuaternion root_rot = mRoot.getWorldRotation(); + LLQuaternion inv_root_rot = ~root_rot; LLVector3 pixel_right_vec; LLVector3 pixel_up_vec; LLViewerCamera::getInstance()->getPixelVectors(root_pos_last, pixel_up_vec, pixel_right_vec); LLVector3 camera_to_av = root_pos_last - LLViewerCamera::getInstance()->getOrigin(); camera_to_av.normalize(); - LLVector3 local_camera_at = camera_to_av * ~root_rot; + LLVector3 local_camera_at = camera_to_av * inv_root_rot; LLVector3 local_camera_up = camera_to_av % LLViewerCamera::getInstance()->getLeftAxis(); local_camera_up.normalize(); - local_camera_up = local_camera_up * ~root_rot; + local_camera_up = local_camera_up * inv_root_rot; - local_camera_up.scaleVec(mBodySize * 0.5f); - local_camera_at.scaleVec(mBodySize * 0.5f); + LLVector3 avatar_ellipsoid(mBodySize.mV[VX] * 0.4f, + mBodySize.mV[VY] * 0.4f, + mBodySize.mV[VZ] * NAMETAG_VERT_OFFSET_WEIGHT); - LLVector3 name_position = mRoot.getWorldPosition(); - name_position[VZ] -= mPelvisToFoot; - name_position[VZ] += (mBodySize[VZ]* 0.55f); + local_camera_up.scaleVec(avatar_ellipsoid); + local_camera_at.scaleVec(avatar_ellipsoid); + + LLVector3 head_offset = (mHeadp->getLastWorldPosition() - mRoot.getLastWorldPosition()) * inv_root_rot; + + if (dist_vec(head_offset, mTargetRootToHeadOffset) > NAMETAG_UPDATE_THRESHOLD) + { + mTargetRootToHeadOffset = head_offset; + } + + mCurRootToHeadOffset = lerp(mCurRootToHeadOffset, mTargetRootToHeadOffset, LLCriticalDamp::getInterpolant(0.2f)); + + LLVector3 name_position = mRoot.getLastWorldPosition() + (mCurRootToHeadOffset * root_rot); name_position += (local_camera_up * root_rot) - (projected_vec(local_camera_at * root_rot, camera_to_av)); - name_position += pixel_up_vec * 15.f; + name_position += pixel_up_vec * NAMETAG_VERTICAL_SCREEN_OFFSET; - return name_position; + mNameText->setPositionAgent(name_position); } void LLVOAvatar::idleUpdateNameTagAlpha(BOOL new_name, F32 alpha) @@ -3404,20 +3391,18 @@ LLColor4 LLVOAvatar::getNameTagColor(bool is_friend) { color_name = "NameTagFriend"; } - else if (LLAvatarNameCache::useDisplayNames()) + else if (LLAvatarName::useDisplayNames()) { - // ...color based on whether username "matches" a computed display - // name + // ...color based on whether username "matches" a computed display name LLAvatarName av_name; - if (LLAvatarNameCache::get(getID(), &av_name) - && av_name.mIsDisplayNameDefault) + if (LLAvatarNameCache::get(getID(), &av_name) && av_name.isDisplayNameDefault()) { color_name = "NameTagMatch"; } else { color_name = "NameTagMismatch"; - } + } } else { @@ -3454,9 +3439,9 @@ bool LLVOAvatar::isVisuallyMuted() const static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit"); static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit"); - return LLMuteList::getInstance()->isMuted(getID()) || - (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) || - (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f); + return LLMuteList::getInstance()->isMuted(getID()) + || (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) + || (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f); } //------------------------------------------------------------------------ @@ -3465,8 +3450,6 @@ bool LLVOAvatar::isVisuallyMuted() const //------------------------------------------------------------------------ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - // clear debug text mDebugText.clear(); if (LLVOAvatar::sShowAnimationDebug) @@ -3497,8 +3480,6 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) } } - LLVector3d root_pos_global; - if (!mIsBuilt) { return FALSE; @@ -3513,7 +3494,6 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) mTimeVisible.reset(); } - //-------------------------------------------------------------------- // the rest should only be done occasionally for far away avatars //-------------------------------------------------------------------- @@ -3916,10 +3896,6 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) if ( playSound ) { -// F32 gain = clamp_rescale( mSpeedAccum, -// AUDIO_STEP_LO_SPEED, AUDIO_STEP_HI_SPEED, -// AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN ); - const F32 STEP_VOLUME = 0.1f; const LLUUID& step_sound_id = getStepSound(); @@ -4136,13 +4112,6 @@ void LLVOAvatar::updateVisibility() { releaseMeshData(); } - // this breaks off-screen chat bubbles - //if (mNameText) - //{ - // mNameText->markDead(); - // mNameText = NULL; - // sNumVisibleChatBubbles--; - //} } mVisible = visible; @@ -4158,46 +4127,6 @@ bool LLVOAvatar::shouldAlphaMask() } -U32 LLVOAvatar::renderSkinnedAttachments() -{ - /*U32 num_indices = 0; - - const U32 data_mask = LLVertexBuffer::MAP_VERTEX | - LLVertexBuffer::MAP_NORMAL | - LLVertexBuffer::MAP_TEXCOORD0 | - LLVertexBuffer::MAP_COLOR | - LLVertexBuffer::MAP_WEIGHT4; - - for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin(); - iter != mAttachmentPoints.end(); - ++iter) - { - LLViewerJointAttachment* attachment = iter->second; - for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); - attachment_iter != attachment->mAttachedObjects.end(); - ++attachment_iter) - { - const LLViewerObject* attached_object = (*attachment_iter); - if (attached_object && !attached_object->isHUDAttachment()) - { - const LLDrawable* drawable = attached_object->mDrawable; - if (drawable) - { - for (S32 i = 0; i < drawable->getNumFaces(); ++i) - { - LLFace* face = drawable->getFace(i); - if (face->isState(LLFace::RIGGED)) - { - - } - } - } - } - - return num_indices;*/ - return 0; -} - //----------------------------------------------------------------------------- // renderSkinned() //----------------------------------------------------------------------------- @@ -4218,11 +4147,11 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) { //LOD changed or new mesh created, allocate new vertex buffer if needed if (needs_rebuild || mDirtyMesh >= 2 || mVisibilityRank <= 4) { - updateMeshData(); + updateMeshData(); mDirtyMesh = 0; - mNeedsSkin = TRUE; - mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY); - } + mNeedsSkin = TRUE; + mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY); + } } if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_AVATAR) <= 0) @@ -4251,13 +4180,13 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) if (face) { LLVertexBuffer* vb = face->getVertexBuffer(); - if (vb) - { - vb->flush(); - } + if (vb) + { + vb->flush(); } } } + } else { mNeedsSkin = FALSE; @@ -4423,7 +4352,9 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass) } // Can't test for baked hair being defined, since that won't always be the case (not all viewers send baked hair) // TODO: 1.25 will be able to switch this logic back to calling isTextureVisible(); - if (getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE || LLDrawPoolAlpha::sShowDebugAlpha) + + if ( getImage(TEX_HAIR_BAKED, 0) + && getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE || LLDrawPoolAlpha::sShowDebugAlpha) { num_indices += mMeshLOD[MESH_ID_HAIR]->render(mAdjustedPixelArea, first_pass, mIsDummy); first_pass = FALSE; @@ -4567,7 +4498,20 @@ void LLVOAvatar::updateTextures() 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); + + // getTE can return 0. + // Not sure yet why it does, but of course it crashes when te->mScale? gets used. + // Put safeguard in place so this corner case get better handling and does not result in a crash. + F32 texel_area_ratio = 1.0f; + if( te ) + { + texel_area_ratio = fabs(te->mScaleS * te->mScaleT); + } + else + { + llwarns << "getTE( " << texture_index << " ) returned 0" <<llendl; + } + LLViewerFetchedTexture *imagep = NULL; for (U32 wearable_index = 0; wearable_index < num_wearables; wearable_index++) { @@ -4795,8 +4739,6 @@ const LLUUID& LLVOAvatar::getStepSound() const //----------------------------------------------------------------------------- void LLVOAvatar::processAnimationStateChanges() { - LLMemType mt(LLMemType::MTYPE_AVATAR); - if ( isAnyAnimationSignaled(AGENT_WALK_ANIMS, NUM_AGENT_WALK_ANIMS) ) { startMotion(ANIM_AGENT_WALK_ADJUST); @@ -4887,8 +4829,6 @@ void LLVOAvatar::processAnimationStateChanges() //----------------------------------------------------------------------------- BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL start ) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - BOOL result = FALSE; if ( start ) // start animation @@ -5023,8 +4963,6 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) //----------------------------------------------------------------------------- BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl; LLUUID remap_id = remapMotionID(id); @@ -5137,7 +5075,20 @@ const LLUUID& LLVOAvatar::getID() const // RN: avatar joints are multi-rooted to include screen-based attachments LLJoint *LLVOAvatar::getJoint( const std::string &name ) { - LLJoint* jointp = mRoot.findJoint(name); + joint_map_t::iterator iter = mJointMap.find(name); + + LLJoint* jointp = NULL; + + if (iter == mJointMap.end() || iter->second == NULL) + { //search for joint and cache found joint in lookup table + jointp = mRoot.findJoint(name); + mJointMap[name] = jointp; + } + else + { //return cached pointer + jointp = iter->second; + } + return jointp; } @@ -5840,8 +5791,6 @@ BOOL LLVOAvatar::isActive() const //----------------------------------------------------------------------------- void LLVOAvatar::setPixelAreaAndAngle(LLAgent &agent) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - if (mDrawable.isNull()) { return; @@ -5887,7 +5836,6 @@ BOOL LLVOAvatar::updateJointLODs() F32 avatar_num_factor = clamp_rescale((F32)sNumVisibleAvatars, 8, 25, 1.f, avatar_num_min_factor); F32 area_scale = 0.16f; - { if (isSelf()) { if(gAgentCamera.cameraCustomizeAvatar() || gAgentCamera.cameraMouselook()) @@ -5917,7 +5865,6 @@ BOOL LLVOAvatar::updateJointLODs() dirtyMesh(2); return TRUE; } - } return FALSE; } @@ -6206,14 +6153,9 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO ) if ( pVObj ) { const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( pVObj->getVolume()->getParams().getSculptID(), pVObj ); - if ( pSkinData ) - { - const int jointCnt = pSkinData->mJointNames.size(); - bool fullRig = ( jointCnt>=20 ) ? true : false; - if ( fullRig ) - { - const int bindCnt = pSkinData->mAlternateBindMatrix.size(); - if ( bindCnt > 0 ) + if (pSkinData + && pSkinData->mJointNames.size() > 20 // full rig + && pSkinData->mAlternateBindMatrix.size() > 0) { LLVOAvatar::resetJointPositionsToDefault(); //Need to handle the repositioning of the cam, updating rig data etc during outfit editing @@ -6228,8 +6170,6 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO ) } } } - } -} //----------------------------------------------------------------------------- // detachObject() //----------------------------------------------------------------------------- @@ -6378,11 +6318,7 @@ void LLVOAvatar::getOffObject() at_axis.mV[VZ] = 0.f; at_axis.normalize(); gAgent.resetAxes(at_axis); - - //reset orientation -// mRoot.setRotation(avWorldRot); gAgentCamera.setThirdPersonHeadOffset(LLVector3(0.f, 0.f, 1.f)); - gAgentCamera.setSitCamera(LLUUID::null); } } @@ -6432,7 +6368,6 @@ LLColor4 LLVOAvatar::getGlobalColor( const std::string& color_name ) const } else { -// return LLColor4( .5f, .5f, .5f, .5f ); return LLColor4( 0.f, 1.f, 1.f, 1.f ); // good debugging color } } @@ -6597,8 +6532,8 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > PAUSE); - if (!mPreviousFullyLoaded && !loading && mFullyLoaded) - { + if (!mPreviousFullyLoaded && !loading && mFullyLoaded) + { debugAvatarRezTime("AvatarRezNotification","fully loaded"); } @@ -6665,7 +6600,7 @@ void LLVOAvatar::updateMeshTextures() if(!isSelf()) { src_callback_list = &mCallbackTextureList ; - paused = mLoadedCallbacksPaused ; + paused = !isVisible(); } std::vector<BOOL> is_layer_baked; @@ -7191,10 +7126,6 @@ LLBBox LLVOAvatar::getHUDBBox() const return bbox; } -void LLVOAvatar::rebuildHUD() -{ -} - //----------------------------------------------------------------------------- // onFirstTEMessageReceived() //----------------------------------------------------------------------------- @@ -7210,7 +7141,7 @@ void LLVOAvatar::onFirstTEMessageReceived() if(!isSelf()) { src_callback_list = &mCallbackTextureList ; - paused = mLoadedCallbacksPaused ; + paused = !isVisible(); } for (U32 i = 0; i < mBakedTextureDatas.size(); i++) @@ -7286,8 +7217,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) return; } - LLMemType mt(LLMemType::MTYPE_AVATAR); - BOOL is_first_appearance_message = !mFirstAppearanceMessageReceived; mFirstAppearanceMessageReceived = TRUE; @@ -7320,7 +7249,10 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) && baked_index != BAKED_SKIRT) { setTEImage(mBakedTextureDatas[baked_index].mTextureIndex, - LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureIndex, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); + LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureIndex, + TRUE, + LLViewerTexture::BOOST_NONE, + LLViewerTexture::LOD_TEXTURE)); } } @@ -7488,7 +7420,6 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture if (!userdata) return; //llinfos << "onBakedTextureMasksLoaded: " << src_vi->getID() << llendl; - const LLMemType mt(LLMemType::MTYPE_AVATAR); const LLUUID id = src_vi->getID(); LLTextureMaskData* maskData = (LLTextureMaskData*) userdata; @@ -7579,7 +7510,7 @@ void LLVOAvatar::onInitialBakedTextureLoaded( BOOL success, LLViewerFetchedTextu LLUUID *avatar_idp = (LLUUID *)userdata; LLVOAvatar *selfp = (LLVOAvatar *)gObjectList.findObject(*avatar_idp); - + if (selfp) { LL_DEBUGS("Avatar") << selfp->avString() << "discard_level " << discard_level << " success " << success << " final " << final << LL_ENDL; @@ -7630,13 +7561,6 @@ void LLVOAvatar::onBakedTextureLoaded(BOOL success, // Called when baked texture is loaded and also when we start up with a baked texture void LLVOAvatar::useBakedTexture( const LLUUID& id ) { - - - /* if(id == head_baked->getID()) - mHeadBakedLoaded = TRUE; - mLastHeadBakedID = id; - mHeadMesh0.setTexture( head_baked ); - mHeadMesh1.setTexture( head_baked ); */ for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { LLViewerTexture* image_baked = getImage( mBakedTextureDatas[i].mTextureIndex, 0 ); @@ -7880,111 +7804,111 @@ LLVOAvatar::LLVOAvatarXmlInfo::~LLVOAvatarXmlInfo() std::for_each(mMorphMaskInfoList.begin(), mMorphMaskInfoList.end(), DeletePointer()); } -//----------------------------------------------------------------------------- -// LLVOAvatarBoneInfo::parseXml() -//----------------------------------------------------------------------------- -BOOL LLVOAvatarBoneInfo::parseXml(LLXmlTreeNode* node) -{ - if (node->hasName("bone")) - { - mIsJoint = TRUE; - static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); - if (!node->getFastAttributeString(name_string, mName)) - { - llwarns << "Bone without name" << llendl; - return FALSE; - } - } - else if (node->hasName("collision_volume")) - { - mIsJoint = FALSE; - static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); - if (!node->getFastAttributeString(name_string, mName)) - { - mName = "Collision Volume"; - } - } - else - { - llwarns << "Invalid node " << node->getName() << llendl; - return FALSE; - } - - static LLStdStringHandle pos_string = LLXmlTree::addAttributeString("pos"); - if (!node->getFastAttributeVector3(pos_string, mPos)) - { - llwarns << "Bone without position" << llendl; - return FALSE; - } - - static LLStdStringHandle rot_string = LLXmlTree::addAttributeString("rot"); - if (!node->getFastAttributeVector3(rot_string, mRot)) - { - llwarns << "Bone without rotation" << llendl; - return FALSE; - } - - static LLStdStringHandle scale_string = LLXmlTree::addAttributeString("scale"); - if (!node->getFastAttributeVector3(scale_string, mScale)) - { - llwarns << "Bone without scale" << llendl; - return FALSE; - } - - if (mIsJoint) - { - static LLStdStringHandle pivot_string = LLXmlTree::addAttributeString("pivot"); - if (!node->getFastAttributeVector3(pivot_string, mPivot)) - { - llwarns << "Bone without pivot" << llendl; - return FALSE; - } - } - - // parse children - LLXmlTreeNode* child; - for( child = node->getFirstChild(); child; child = node->getNextChild() ) - { - LLVOAvatarBoneInfo *child_info = new LLVOAvatarBoneInfo; - if (!child_info->parseXml(child)) - { - delete child_info; - return FALSE; - } - mChildList.push_back(child_info); - } - return TRUE; -} - -//----------------------------------------------------------------------------- -// LLVOAvatarSkeletonInfo::parseXml() -//----------------------------------------------------------------------------- -BOOL LLVOAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node) -{ - static LLStdStringHandle num_bones_string = LLXmlTree::addAttributeString("num_bones"); - if (!node->getFastAttributeS32(num_bones_string, mNumBones)) - { - llwarns << "Couldn't find number of bones." << llendl; - return FALSE; - } - - static LLStdStringHandle num_collision_volumes_string = LLXmlTree::addAttributeString("num_collision_volumes"); - node->getFastAttributeS32(num_collision_volumes_string, mNumCollisionVolumes); - - LLXmlTreeNode* child; - for( child = node->getFirstChild(); child; child = node->getNextChild() ) - { - LLVOAvatarBoneInfo *info = new LLVOAvatarBoneInfo; - if (!info->parseXml(child)) - { - delete info; - llwarns << "Error parsing bone in skeleton file" << llendl; - return FALSE; - } - mBoneInfoList.push_back(info); - } - return TRUE; -} +////----------------------------------------------------------------------------- +//// LLVOAvatarBoneInfo::parseXml() +////----------------------------------------------------------------------------- +//BOOL LLVOAvatarBoneInfo::parseXml(LLXmlTreeNode* node) +//{ +// if (node->hasName("bone")) +// { +// mIsJoint = TRUE; +// static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); +// if (!node->getFastAttributeString(name_string, mName)) +// { +// llwarns << "Bone without name" << llendl; +// return FALSE; +// } +// } +// else if (node->hasName("collision_volume")) +// { +// mIsJoint = FALSE; +// static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); +// if (!node->getFastAttributeString(name_string, mName)) +// { +// mName = "Collision Volume"; +// } +// } +// else +// { +// llwarns << "Invalid node " << node->getName() << llendl; +// return FALSE; +// } +// +// static LLStdStringHandle pos_string = LLXmlTree::addAttributeString("pos"); +// if (!node->getFastAttributeVector3(pos_string, mPos)) +// { +// llwarns << "Bone without position" << llendl; +// return FALSE; +// } +// +// static LLStdStringHandle rot_string = LLXmlTree::addAttributeString("rot"); +// if (!node->getFastAttributeVector3(rot_string, mRot)) +// { +// llwarns << "Bone without rotation" << llendl; +// return FALSE; +// } +// +// static LLStdStringHandle scale_string = LLXmlTree::addAttributeString("scale"); +// if (!node->getFastAttributeVector3(scale_string, mScale)) +// { +// llwarns << "Bone without scale" << llendl; +// return FALSE; +// } +// +// if (mIsJoint) +// { +// static LLStdStringHandle pivot_string = LLXmlTree::addAttributeString("pivot"); +// if (!node->getFastAttributeVector3(pivot_string, mPivot)) +// { +// llwarns << "Bone without pivot" << llendl; +// return FALSE; +// } +// } +// +// // parse children +// LLXmlTreeNode* child; +// for( child = node->getFirstChild(); child; child = node->getNextChild() ) +// { +// LLVOAvatarBoneInfo *child_info = new LLVOAvatarBoneInfo; +// if (!child_info->parseXml(child)) +// { +// delete child_info; +// return FALSE; +// } +// mChildList.push_back(child_info); +// } +// return TRUE; +//} +// +////----------------------------------------------------------------------------- +//// LLVOAvatarSkeletonInfo::parseXml() +////----------------------------------------------------------------------------- +//BOOL LLVOAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node) +//{ +// static LLStdStringHandle num_bones_string = LLXmlTree::addAttributeString("num_bones"); +// if (!node->getFastAttributeS32(num_bones_string, mNumBones)) +// { +// llwarns << "Couldn't find number of bones." << llendl; +// return FALSE; +// } +// +// static LLStdStringHandle num_collision_volumes_string = LLXmlTree::addAttributeString("num_collision_volumes"); +// node->getFastAttributeS32(num_collision_volumes_string, mNumCollisionVolumes); +// +// LLXmlTreeNode* child; +// for( child = node->getFirstChild(); child; child = node->getNextChild() ) +// { +// LLVOAvatarBoneInfo *info = new LLVOAvatarBoneInfo; +// if (!info->parseXml(child)) +// { +// delete info; +// llwarns << "Error parsing bone in skeleton file" << llendl; +// return FALSE; +// } +// mBoneInfoList.push_back(info); +// } +// return TRUE; +//} //----------------------------------------------------------------------------- // parseXmlSkeletonNode(): parses <skeleton> nodes from XML tree @@ -8694,6 +8618,12 @@ BOOL LLVOAvatar::isTextureDefined(LLVOAvatarDefines::ETextureIndex te, U32 index return FALSE; } + if( !getImage( te, index ) ) + { + llwarns << "getImage( " << te << ", " << index << " ) returned 0" << llendl; + return FALSE; + } + return (getImage(te, index)->getID() != IMG_DEFAULT_AVATAR && getImage(te, index)->getID() != IMG_DEFAULT); } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 6fb56a4c0b..c59a3a150c 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -67,8 +67,9 @@ class LLVoiceVisualizer; class LLHUDNameTag; class LLHUDEffectSpiral; class LLTexGlobalColor; -class LLVOAvatarBoneInfo; -class LLVOAvatarSkeletonInfo; +struct LLVOAvatarBoneInfo; +struct LLVOAvatarChildJoint; +struct LLVOAvatarSkeletonInfo; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LLVOAvatar @@ -93,6 +94,16 @@ protected: **/ public: + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + LLVOAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); virtual void markDead(); static void initClass(); // Initialize data that's only init'd once per class. @@ -124,7 +135,7 @@ public: U32 block_num, const EObjectUpdateType update_type, LLDataPacker *dp); - virtual BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + virtual void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); virtual BOOL updateLOD(); BOOL updateJointLODs(); void updateLODRiggedAttachments( void ); @@ -215,7 +226,7 @@ public: bool isBuilt() const { return mIsBuilt; } private: //aligned members - LLVector4a mImpostorExtents[2]; + LL_ALIGN_16(LLVector4a mImpostorExtents[2]); private: BOOL mSupportsAlphaLayers; // For backwards compatibility, TRUE for 1.23+ clients @@ -233,7 +244,7 @@ public: void idleUpdateWindEffect(); void idleUpdateNameTag(const LLVector3& root_pos_last); void idleUpdateNameTagText(BOOL new_name); - LLVector3 idleUpdateNameTagPosition(const LLVector3& root_pos_last); + void idleUpdateNameTagPosition(const LLVector3& root_pos_last); void idleUpdateNameTagAlpha(BOOL new_name, F32 alpha); LLColor4 getNameTagColor(bool is_friend); void clearNameTag(); @@ -353,15 +364,21 @@ public: F32 mLastPelvisToFoot; F32 mPelvisFixup; F32 mLastPelvisFixup; + LLVector3 mCurRootToHeadOffset; + LLVector3 mTargetRootToHeadOffset; LLVector3 mHeadOffset; // current head position LLViewerJoint mRoot; + + typedef std::map<std::string, LLJoint*> joint_map_t; + joint_map_t mJointMap; + protected: static BOOL parseSkeletonFile(const std::string& filename); void buildCharacter(); virtual BOOL loadAvatar(); - BOOL setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent, S32 ¤t_volume_num, S32 ¤t_joint_num); + BOOL setupBone(const LLVOAvatarChildJoint& info, LLViewerJoint* parent, S32 ¤t_volume_num, S32 ¤t_joint_num); BOOL buildSkeleton(const LLVOAvatarSkeletonInfo *info); private: BOOL mIsBuilt; // state of deferred character building @@ -405,7 +422,7 @@ public: //-------------------------------------------------------------------- private: static LLXmlTree sXMLTree; // avatar config file - static LLXmlTree sSkeletonXMLTree; // avatar skeleton file + static LLXMLNodePtr sSkeletonXMLTree; // avatar skeleton file /** Skeleton ** ** @@ -423,7 +440,6 @@ public: U32 renderRigid(); U32 renderSkinned(EAvatarRenderPass pass); F32 getLastSkinTime() { return mLastSkinTime; } - U32 renderSkinnedAttachments(); U32 renderTransparent(BOOL first_pass); void renderCollisionVolumes(); static void deleteCachedImages(bool clearAll=true); @@ -772,7 +788,6 @@ public: public: BOOL hasHUDAttachment() const; LLBBox getHUDBBox() const; - void rebuildHUD(); void resetHUDAttachments(); BOOL canAttachMoreObjects() const; BOOL canAttachMoreObjects(U32 n) const; @@ -927,7 +942,7 @@ private: std::string mNameString; // UTF-8 title + name + status std::string mTitle; bool mNameAway; - bool mNameBusy; + bool mNameDoNotDisturb; bool mNameMute; bool mNameAppearance; bool mNameFriend; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 6d672acc32..e32fd3c3c8 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -257,8 +257,6 @@ BOOL LLVOAvatarSelf::loadAvatarSelf() BOOL LLVOAvatarSelf::buildSkeletonSelf(const LLVOAvatarSkeletonInfo *info) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - // add special-purpose "screen" joint mScreenp = new LLViewerJoint("mScreen", NULL); // for now, put screen at origin, as it is only used during special @@ -652,8 +650,6 @@ BOOL LLVOAvatarSelf::loadLayersets() // virtual BOOL LLVOAvatarSelf::updateCharacter(LLAgent &agent) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - // update screen joint size if (mScreenp) { @@ -668,15 +664,13 @@ BOOL LLVOAvatarSelf::updateCharacter(LLAgent &agent) } // virtual -BOOL LLVOAvatarSelf::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOAvatarSelf::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - if (!isAgentAvatarValid()) + if (isAgentAvatarValid()) { - return TRUE; + LLVOAvatar::idleUpdate(agent, world, time); + idleUpdateTractorBeam(); } - LLVOAvatar::idleUpdate(agent, world, time); - idleUpdateTractorBeam(); - return TRUE; } // virtual @@ -1010,8 +1004,6 @@ void LLVOAvatarSelf::idleUpdateTractorBeam() // virtual void LLVOAvatarSelf::restoreMeshData() { - LLMemType mt(LLMemType::MTYPE_AVATAR); - //llinfos << "Restoring" << llendl; mMeshValid = TRUE; updateJointLODs(); @@ -2132,9 +2124,7 @@ LLSD LLVOAvatarSelf::metricsData() { // runway - add region info LLSD result; - result["id"] = getID(); result["rez_status"] = LLVOAvatar::rezStatusToString(getRezzedStatus()); - result["is_self"] = isSelf(); std::vector<S32> rez_counts; LLVOAvatar::getNearbyRezzedStats(rez_counts); result["nearby"] = LLSD::emptyMap(); @@ -2148,7 +2138,6 @@ LLSD LLVOAvatarSelf::metricsData() result["timers"]["ruth"] = mRuthTimer.getElapsedTimeF32(); result["timers"]["invisible"] = mInvisibleTimer.getElapsedTimeF32(); result["timers"]["fully_loaded"] = mFullyLoadedTimer.getElapsedTimeF32(); - result["phases"] = getPhases().dumpPhases(); result["startup"] = LLStartUp::getPhases().dumpPhases(); return result; @@ -2157,7 +2146,12 @@ LLSD LLVOAvatarSelf::metricsData() class ViewerAppearanceChangeMetricsResponder: public LLCurl::Responder { public: - ViewerAppearanceChangeMetricsResponder() + ViewerAppearanceChangeMetricsResponder( S32 expected_sequence, + volatile const S32 & live_sequence, + volatile bool & reporting_started): + mExpectedSequence(expected_sequence), + mLiveSequence(live_sequence), + mReportingStarted(reporting_started) { } @@ -2176,14 +2170,44 @@ public: error(status,reason); } } + + // virtual + void error(U32 status_num, const std::string & reason) + { + } + + // virtual + void result(const LLSD & content) + { + if (mLiveSequence == mExpectedSequence) + { + mReportingStarted = true; + } + } + +private: + S32 mExpectedSequence; + volatile const S32 & mLiveSequence; + volatile bool & mReportingStarted; }; void LLVOAvatarSelf::sendAppearanceChangeMetrics() { // gAgentAvatarp->stopAllPhases(); + static volatile bool reporting_started(false); + static volatile S32 report_sequence(0); LLSD msg = metricsData(); msg["message"] = "ViewerAppearanceChangeMetrics"; + msg["session_id"] = gAgentSessionID; + msg["agent_id"] = gAgentID; + msg["sequence"] = report_sequence; + msg["initial"] = !reporting_started; + msg["break"] = false; + + // Update sequence number + if (S32_MAX == ++report_sequence) + report_sequence = 0; LL_DEBUGS("Avatar") << avString() << "message: " << ll_pretty_print_sd(msg) << LL_ENDL; std::string caps_url; @@ -2196,8 +2220,10 @@ void LLVOAvatarSelf::sendAppearanceChangeMetrics() { LLCurlRequest::headers_t headers; LLHTTPClient::post(caps_url, - msg, - new ViewerAppearanceChangeMetricsResponder); + msg, + new ViewerAppearanceChangeMetricsResponder(report_sequence, + report_sequence, + reporting_started)); } } diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 543891ca63..7bd0c0bf93 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -49,6 +49,16 @@ class LLVOAvatarSelf : **/ public: + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + LLVOAvatarSelf(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); virtual ~LLVOAvatarSelf(); virtual void markDead(); @@ -75,7 +85,7 @@ protected: //-------------------------------------------------------------------- public: /*virtual*/ void updateRegion(LLViewerRegion *regionp); - /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); //-------------------------------------------------------------------- // LLCharacter interface and related diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 44968342bf..4dca87652d 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -277,17 +277,17 @@ BOOL LLVOGrass::isActive() const return TRUE; } -BOOL LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_GRASS))) { - return TRUE; + return; } if (!mDrawable) { // So drones work. - return TRUE; + return; } if(LLVOTree::isTreeRenderingStopped()) //stop rendering grass @@ -297,14 +297,14 @@ BOOL LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) mNumBlades = 0 ; gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); } - return TRUE ; + return; } else if(!mNumBlades)//restart grass rendering { mNumBlades = GRASS_MAX_BLADES ; gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); - return TRUE ; + return; } if (mPatch && (mLastPatchUpdateTime != mPatch->getLastUpdateTime())) @@ -312,7 +312,7 @@ BOOL LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); } - return TRUE; + return; } @@ -622,7 +622,7 @@ void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count mFaceList.clear(); LLViewerCamera* camera = LLViewerCamera::getInstance(); - for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i) + for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawablep = *i; @@ -675,7 +675,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_GRASS_VB("Grass VB"); void LLGrassPartition::getGeometry(LLSpatialGroup* group) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); LLFastTimer ftm(FTM_REBUILD_GRASS_VB); std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater()); diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h index 00a59facf7..b9835b8802 100644 --- a/indra/newview/llvograss.h +++ b/indra/newview/llvograss.h @@ -73,7 +73,7 @@ public: void plantBlades(); /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. - BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); /*virtual*/ BOOL lineSegmentIntersect(const LLVector3& start, const LLVector3& end, S32 face = -1, // which face to check, -1 = ALL_SIDES diff --git a/indra/newview/llvoground.cpp b/indra/newview/llvoground.cpp index 6da54435e3..97b7418b40 100644 --- a/indra/newview/llvoground.cpp +++ b/indra/newview/llvoground.cpp @@ -49,18 +49,8 @@ LLVOGround::~LLVOGround() { } -BOOL LLVOGround::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOGround::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_GROUND))) - { - return TRUE; - } - - /*if (mDrawable) - { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); - }*/ - return TRUE; } diff --git a/indra/newview/llvoground.h b/indra/newview/llvoground.h index 73b097327e..290579b4da 100644 --- a/indra/newview/llvoground.h +++ b/indra/newview/llvoground.h @@ -41,7 +41,7 @@ protected: public: LLVOGround(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); - /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); // Graphical stuff for objects - maybe broken out into render class // later? diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index bd12328a6b..ceff75a0cc 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -414,7 +414,7 @@ void LLVoiceChannel::doSetState(const EState& new_state) mState = new_state; if (!mStateChangedCallback.empty()) - mStateChangedCallback(old_state, mState, mCallDirection, mCallEndedByAgent); + mStateChangedCallback(old_state, mState, mCallDirection, mCallEndedByAgent, mSessionID); } //static diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index b8597ee5cb..fed44974fd 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -52,7 +52,7 @@ public: OUTGOING_CALL } EDirection; - typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state, const EDirection& direction, bool ended_by_agent)> state_changed_signal_t; + typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state, const EDirection& direction, bool ended_by_agent, const LLUUID& session_id)> state_changed_signal_t; // on current channel changed signal typedef boost::function<void(const LLUUID& session_id)> channel_changed_callback_t; diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 730f022c50..b46c55321c 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -541,6 +541,7 @@ void LLVoiceClient::setMuteMic(bool muted) { mMuteMic = muted; updateMicMuteLogic(); + mMicroChangedSignal(); } @@ -551,6 +552,7 @@ void LLVoiceClient::setUserPTTState(bool ptt) { mUserPTTState = ptt; updateMicMuteLogic(); + mMicroChangedSignal(); } bool LLVoiceClient::getUserPTTState() diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index c9aeea35a9..714dd6a9f2 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -303,6 +303,9 @@ public: LLVoiceClient(); ~LLVoiceClient(); + typedef boost::signals2::signal<void(void)> micro_changed_signal_t; + micro_changed_signal_t mMicroChangedSignal; + void init(LLPumpIO *pump); // Call this once at application startup (creates connector) void terminate(); // Call this to clean up during shutdown @@ -401,6 +404,8 @@ public: void keyUp(KEY key, MASK mask); void middleMouseState(bool down); + boost::signals2::connection MicroChangedCallback(const micro_changed_signal_t::slot_type& cb ) { return mMicroChangedSignal.connect(cb); } + ///////////////////////////// // Accessors for data related to nearby speakers @@ -456,6 +461,7 @@ protected: LLVoiceModuleInterface* mVoiceModule; LLPumpIO *m_servicePump; + LLCachedControl<bool> mVoiceEffectEnabled; LLCachedControl<std::string> mVoiceEffectDefault; diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp index 47060720e7..b497f80560 100644 --- a/indra/newview/llvoicevisualizer.cpp +++ b/indra/newview/llvoicevisualizer.cpp @@ -73,17 +73,6 @@ const F32 DEFAULT_MAXIMUM_GESTICULATION_AMPLITUDE = 1.0f; const F32 ONE_HALF = 1.0f; // to clarify intent and reduce magic numbers in the code. const LLVector3 WORLD_UPWARD_DIRECTION = LLVector3( 0.0f, 0.0f, 1.0f ); // Z is up in SL - -//------------------------------------------------------------------ -// handles parameter updates -//------------------------------------------------------------------ -static bool handleVoiceVisualizerPrefsChanged(const LLSD& newvalue) -{ - // Note: Ignore the specific event value, we look up the ones we want - LLVoiceVisualizer::setPreferences(); - return true; -} - //------------------------------------------------------------------ // Initialize the statics //------------------------------------------------------------------ @@ -106,7 +95,7 @@ F32 LLVoiceVisualizer::sAahPowerTransfersf = 0.0f; // constructor //----------------------------------------------- LLVoiceVisualizer::LLVoiceVisualizer( const U8 type ) -:LLHUDEffect( type ) + : LLHUDEffect(type) { mCurrentTime = mTimer.getTotalSeconds(); mPreviousTime = mCurrentTime; @@ -150,12 +139,12 @@ LLVoiceVisualizer::LLVoiceVisualizer( const U8 type ) setPreferences(); // Set up our listener to get updates on all prefs values we care about. - gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _2)); - gSavedSettings.getControl("LipSyncOohAahRate")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _2)); - gSavedSettings.getControl("LipSyncOoh")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _2)); - gSavedSettings.getControl("LipSyncAah")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _2)); - gSavedSettings.getControl("LipSyncOohPowerTransfer")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _2)); - gSavedSettings.getControl("LipSyncAahPowerTransfer")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _2)); + gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&LLVoiceVisualizer::handleVoiceVisualizerPrefsChanged, _2)); + gSavedSettings.getControl("LipSyncOohAahRate")->getSignal()->connect(boost::bind(&LLVoiceVisualizer::handleVoiceVisualizerPrefsChanged, _2)); + gSavedSettings.getControl("LipSyncOoh")->getSignal()->connect(boost::bind(&LLVoiceVisualizer::handleVoiceVisualizerPrefsChanged, _2)); + gSavedSettings.getControl("LipSyncAah")->getSignal()->connect(boost::bind(&LLVoiceVisualizer::handleVoiceVisualizerPrefsChanged, _2)); + gSavedSettings.getControl("LipSyncOohPowerTransfer")->getSignal()->connect(boost::bind(&LLVoiceVisualizer::handleVoiceVisualizerPrefsChanged, _2)); + gSavedSettings.getControl("LipSyncAahPowerTransfer")->getSignal()->connect(boost::bind(&LLVoiceVisualizer::handleVoiceVisualizerPrefsChanged, _2)); sPrefsInitialized = true; } @@ -217,6 +206,15 @@ void LLVoiceVisualizer::setSpeakingAmplitude( F32 a ) }//--------------------------------------------------- +//------------------------------------------------------------------ +// handles parameter updates +//------------------------------------------------------------------ +bool LLVoiceVisualizer::handleVoiceVisualizerPrefsChanged(const LLSD& newvalue) +{ + // Note: Ignore the specific event value, we look up the ones we want + LLVoiceVisualizer::setPreferences(); + return true; +} //--------------------------------------------------- void LLVoiceVisualizer::setPreferences( ) @@ -526,10 +524,6 @@ void LLVoiceVisualizer::render() }//--------------------------------------------------- - - - - //--------------------------------------------------- void LLVoiceVisualizer::setVoiceSourceWorldPosition( const LLVector3 &p ) { @@ -615,11 +609,3 @@ void LLVoiceVisualizer::markDead() LLHUDEffect::markDead(); }//------------------------------------------------------------------ - - - - - - - - diff --git a/indra/newview/llvoicevisualizer.h b/indra/newview/llvoicevisualizer.h index e434c7f3f1..36c78252d1 100644 --- a/indra/newview/llvoicevisualizer.h +++ b/indra/newview/llvoicevisualizer.h @@ -71,10 +71,8 @@ class LLVoiceVisualizer : public LLHUDEffect // public methods //--------------------------------------------------- public: - LLVoiceVisualizer ( const U8 type ); //constructor + LLVoiceVisualizer( const U8 type ); //constructor ~LLVoiceVisualizer(); //destructor - - friend class LLHUDObject; void setVoiceSourceWorldPosition( const LLVector3 &p ); // this should be the position of the speaking avatar's head void setMinGesticulationAmplitude( F32 ); // the lower range of meaningful amplitude for setting gesticulation level @@ -85,8 +83,6 @@ class LLVoiceVisualizer : public LLHUDEffect void setStopSpeaking(); // tell me when the av stops speaking bool getCurrentlySpeaking(); // the get for the above set VoiceGesticulationLevel getCurrentGesticulationLevel(); // based on voice amplitude, I'll give you the current "energy level" of avatar speech - static void setPreferences( ); - static void lipStringToF32s ( std::string& in_string, F32*& out_F32s, U32& count_F32s ); // convert a string of digits to an array of floats void lipSyncOohAah( F32& ooh, F32& aah ); void render(); // inherited from HUD Effect void packData(LLMessageSystem *mesgsys); // inherited from HUD Effect @@ -108,7 +104,10 @@ class LLVoiceVisualizer : public LLHUDEffect // private members //--------------------------------------------------- private: - + static bool handleVoiceVisualizerPrefsChanged(const LLSD& newvalue); + static void setPreferences( ); + static void lipStringToF32s ( std::string& in_string, F32*& out_F32s, U32& count_F32s ); // convert a string of digits to an array of floats + struct SoundSymbol { F32 mWaveExpansion [ NUM_VOICE_SYMBOL_WAVES ]; diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 820d1d73e1..f3342b7ff1 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -34,6 +34,7 @@ #include "llvoavatarself.h" #include "llbufferstream.h" #include "llfile.h" +#include "llmenugl.h" #ifdef LL_STANDALONE # include "expat.h" #else @@ -70,6 +71,9 @@ #define USE_SESSION_GROUPS 0 +extern LLMenuBarGL* gMenuBarView; +extern void handle_voice_morphing_subscribe(); + const F32 VOLUME_SCALE_VIVOX = 0.01f; const F32 SPEAKING_TIMEOUT = 1.f; @@ -291,6 +295,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() : mCaptureDeviceDirty(false), mRenderDeviceDirty(false), mSpatialCoordsDirty(false), + mIsInitialized(false), mMuteMic(false), mMuteMicDirty(false), @@ -315,7 +320,9 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() : mCaptureBufferRecording(false), mCaptureBufferRecorded(false), mCaptureBufferPlaying(false), - mPlayRequestCount(0) + mPlayRequestCount(0), + + mAvatarNameCacheConnection() { mSpeakerVolume = scale_speaker_volume(0); @@ -348,6 +355,10 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() : LLVivoxVoiceClient::~LLVivoxVoiceClient() { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } } //--------------------------------------------------- @@ -520,7 +531,7 @@ void LLVivoxVoiceClient::requestVoiceAccountProvision(S32 retries) { LLViewerRegion *region = gAgent.getRegion(); - if ( region && mVoiceEnabled ) + if ( region && (mVoiceEnabled || !mIsInitialized)) { std::string url = region->getCapability("ProvisionVoiceAccountRequest"); @@ -691,7 +702,7 @@ void LLVivoxVoiceClient::stateMachine() setVoiceEnabled(false); } - if(mVoiceEnabled) + if(mVoiceEnabled || !mIsInitialized) { updatePosition(); } @@ -736,7 +747,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateDisabled case stateDisabled: - if(mTuningMode || (mVoiceEnabled && !mAccountName.empty())) + if(mTuningMode || ((mVoiceEnabled || !mIsInitialized) && !mAccountName.empty())) { setState(stateStart); } @@ -891,7 +902,7 @@ void LLVivoxVoiceClient::stateMachine() mTuningExitState = stateIdle; setState(stateMicTuningStart); } - else if(!mVoiceEnabled) + else if(!mVoiceEnabled && mIsInitialized) { // We never started up the connector. This will shut down the daemon. setState(stateConnectorStopped); @@ -1085,7 +1096,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateConnectorStart case stateConnectorStart: - if(!mVoiceEnabled) + if(!mVoiceEnabled && mIsInitialized) { // We were never logged in. This will shut down the connector. setState(stateLoggedOut); @@ -1103,7 +1114,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateConnectorStarted case stateConnectorStarted: // connector handle received - if(!mVoiceEnabled) + if(!mVoiceEnabled && mIsInitialized) { // We were never logged in. This will shut down the connector. setState(stateLoggedOut); @@ -1247,7 +1258,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateCreatingSessionGroup case stateCreatingSessionGroup: - if(mSessionTerminateRequested || !mVoiceEnabled) + if(mSessionTerminateRequested || !mVoiceEnabled && mIsInitialized) { // *TODO: Question: is this the right way out of this state setState(stateSessionTerminated); @@ -1263,7 +1274,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateRetrievingParcelVoiceInfo case stateRetrievingParcelVoiceInfo: // wait until parcel voice info is received. - if(mSessionTerminateRequested || !mVoiceEnabled) + if(mSessionTerminateRequested || !mVoiceEnabled && mIsInitialized) { // if a terminate request has been received, // bail and go to the stateSessionTerminated @@ -1283,7 +1294,7 @@ void LLVivoxVoiceClient::stateMachine() // 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) + if(mSessionTerminateRequested || !mVoiceEnabled && mIsInitialized) { // TODO: Question: Is this the right way out of this state? setState(stateSessionTerminated); @@ -1364,7 +1375,7 @@ void LLVivoxVoiceClient::stateMachine() } // joinedAudioSession() will transition from here to stateSessionJoined. - if(!mVoiceEnabled) + if(!mVoiceEnabled && mIsInitialized) { // User bailed out during connect -- jump straight to teardown. setState(stateSessionTerminated); @@ -1411,7 +1422,7 @@ void LLVivoxVoiceClient::stateMachine() notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINED); } - else if(!mVoiceEnabled) + else if(!mVoiceEnabled && mIsInitialized) { // User bailed out during connect -- jump straight to teardown. setState(stateSessionTerminated); @@ -1431,7 +1442,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateRunning case stateRunning: // steady state // Disabling voice or disconnect requested. - if(!mVoiceEnabled || mSessionTerminateRequested) + if(!mVoiceEnabled && mIsInitialized || mSessionTerminateRequested) { leaveAudioSession(); } @@ -1478,6 +1489,8 @@ void LLVivoxVoiceClient::stateMachine() mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); sendPositionalUpdate(); } + + mIsInitialized = true; } break; @@ -1511,7 +1524,7 @@ void LLVivoxVoiceClient::stateMachine() // Always reset the terminate request flag when we get here. mSessionTerminateRequested = false; - if(mVoiceEnabled && !mRelogRequested) + if((mVoiceEnabled || !mIsInitialized) && !mRelogRequested) { // Just leaving a channel, go back to stateNoChannel (the "logged in but have no channel" state). setState(stateNoChannel); @@ -1539,7 +1552,7 @@ void LLVivoxVoiceClient::stateMachine() mAccountHandle.clear(); cleanUp(); - if(mVoiceEnabled && !mRelogRequested) + if((mVoiceEnabled || !mIsInitialized) && !mRelogRequested) { // User was logged out, but wants to be logged in. Send a new login request. setState(stateNeedsLogin); @@ -2665,7 +2678,7 @@ void LLVivoxVoiceClient::checkFriend(const LLUUID& id) // *NOTE: For now, we feed legacy names to Vivox because I don't know // if their service can support a mix of new and old clients with // different sorts of names. - std::string name = av_name.getLegacyName(); + std::string name = av_name.getAccountName(); const LLRelationship* relationInfo = LLAvatarTracker::instance().getBuddyInfo(id); bool canSeeMeOnline = false; @@ -3712,8 +3725,7 @@ void LLVivoxVoiceClient::participantUpdatedEvent( 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() + So, we have to call LLSpeakerMgr::update() here. */ LLVoiceChannel* voice_cnl = LLVoiceChannel::getCurrentVoiceChannel(); @@ -3939,7 +3951,7 @@ void LLVivoxVoiceClient::messageEvent( sessionState *session = findSession(sessionHandle); if(session) { - bool is_busy = gAgent.getBusy(); + bool is_do_not_disturb = gAgent.isDoNotDisturb(); bool is_muted = LLMuteList::getInstance()->isMuted(session->mCallerID, session->mName, LLMute::flagTextChat); bool is_linden = LLMuteList::getInstance()->isLinden(session->mName); bool quiet_chat = false; @@ -3953,10 +3965,10 @@ void LLVivoxVoiceClient::messageEvent( chat.mFromName = session->mName; chat.mSourceType = CHAT_SOURCE_AGENT; - if(is_busy && !is_linden) + if(is_do_not_disturb && !is_linden) { quiet_chat = true; - // TODO: Question: Return busy mode response here? Or maybe when session is started instead? + // TODO: Question: Return do not disturb 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; @@ -3964,6 +3976,7 @@ void LLVivoxVoiceClient::messageEvent( session->mCallerID, session->mName.c_str(), message.c_str(), + false, LLStringUtil::null, // default arg IM_NOTHING_SPECIAL, // default arg 0, // default arg @@ -6189,18 +6202,19 @@ void LLVivoxVoiceClient::notifyFriendObservers() void LLVivoxVoiceClient::lookupName(const LLUUID &id) { - LLAvatarNameCache::get(id, - boost::bind(&LLVivoxVoiceClient::onAvatarNameCache, - this, _1, _2)); + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(id, boost::bind(&LLVivoxVoiceClient::onAvatarNameCache, this, _1, _2)); } void LLVivoxVoiceClient::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) { - // For Vivox, we use the legacy name because I'm uncertain whether or - // not their service can tolerate switching to Username or Display Name - std::string legacy_name = av_name.getLegacyName(); - avatarNameResolved(agent_id, legacy_name); + mAvatarNameCacheConnection.disconnect(); + std::string display_name = av_name.getDisplayName(); + avatarNameResolved(agent_id, display_name); } void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string &name) @@ -6729,10 +6743,106 @@ void LLVivoxVoiceClient::removeObserver(LLVoiceEffectObserver* observer) mVoiceFontObservers.erase(observer); } +// method checks the item in VoiceMorphing menu for appropriate current voice font +bool LLVivoxVoiceClient::onCheckVoiceEffect(const std::string& voice_effect_name) +{ + LLVoiceEffectInterface * effect_interfacep = LLVoiceClient::instance().getVoiceEffectInterface(); + if (NULL != effect_interfacep) + { + const LLUUID& currect_voice_effect_id = effect_interfacep->getVoiceEffect(); + + if (currect_voice_effect_id.isNull()) + { + if (voice_effect_name == "NoVoiceMorphing") + { + return true; + } + } + else + { + const LLSD& voice_effect_props = effect_interfacep->getVoiceEffectProperties(currect_voice_effect_id); + if (voice_effect_props["name"].asString() == voice_effect_name) + { + return true; + } + } + } + + return false; +} + +// method changes voice font for selected VoiceMorphing menu item +void LLVivoxVoiceClient::onClickVoiceEffect(const std::string& voice_effect_name) +{ + LLVoiceEffectInterface * effect_interfacep = LLVoiceClient::instance().getVoiceEffectInterface(); + if (NULL != effect_interfacep) + { + if (voice_effect_name == "NoVoiceMorphing") + { + effect_interfacep->setVoiceEffect(LLUUID()); + return; + } + const voice_effect_list_t& effect_list = effect_interfacep->getVoiceEffectList(); + if (!effect_list.empty()) + { + for (voice_effect_list_t::const_iterator it = effect_list.begin(); it != effect_list.end(); ++it) + { + if (voice_effect_name == it->first) + { + effect_interfacep->setVoiceEffect(it->second); + return; + } + } + } + } +} + +// it updates VoiceMorphing menu items in accordance with purchased properties +void LLVivoxVoiceClient::updateVoiceMorphingMenu() +{ + if (mVoiceFontListDirty) + { + LLVoiceEffectInterface * effect_interfacep = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interfacep) + { + const voice_effect_list_t& effect_list = effect_interfacep->getVoiceEffectList(); + if (!effect_list.empty()) + { + LLMenuGL * voice_morphing_menup = gMenuBarView->findChildMenuByName("VoiceMorphing", TRUE); + + if (NULL != voice_morphing_menup) + { + S32 items = voice_morphing_menup->getItemCount(); + if (items > 0) + { + voice_morphing_menup->erase(1, items - 3, false); + + S32 pos = 1; + for (voice_effect_list_t::const_iterator it = effect_list.begin(); it != effect_list.end(); ++it) + { + LLMenuItemCheckGL::Params p; + p.name = it->first; + p.label = it->first; + p.on_check.function(boost::bind(&LLVivoxVoiceClient::onCheckVoiceEffect, this, it->first)); + p.on_click.function(boost::bind(&LLVivoxVoiceClient::onClickVoiceEffect, this, it->first)); + LLMenuItemCheckGL * voice_effect_itemp = LLUICtrlFactory::create<LLMenuItemCheckGL>(p); + voice_morphing_menup->insert(pos++, voice_effect_itemp, false); + } + + voice_morphing_menup->needsArrange(); + } + } + } + } + } +} + void LLVivoxVoiceClient::notifyVoiceFontObservers() { LL_DEBUGS("Voice") << "Notifying voice effect observers. Lists changed: " << mVoiceFontListDirty << LL_ENDL; + updateVoiceMorphingMenu(); + for (voice_font_observer_set_t::iterator it = mVoiceFontObservers.begin(); it != mVoiceFontObservers.end(); ) diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 1142a1a49c..574027de42 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -246,6 +246,8 @@ public: //@} + bool onCheckVoiceEffect(const std::string& voice_effect_name); + void onClickVoiceEffect(const std::string& voice_effect_name); protected: ////////////////////// @@ -641,6 +643,7 @@ protected: void lookupName(const LLUUID &id); void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name); void avatarNameResolved(const LLUUID &id, const std::string &name); + boost::signals2::connection mAvatarNameCacheConnection; ///////////////////////////// // Voice fonts @@ -741,6 +744,8 @@ private: std::string mRenderDevice; bool mCaptureDeviceDirty; bool mRenderDeviceDirty; + + bool mIsInitialized; bool checkParcelChanged(bool update = false); @@ -851,6 +856,7 @@ private: void accountGetTemplateFontsSendMessage(); void sessionSetVoiceFontSendMessage(sessionState *session); + void updateVoiceMorphingMenu(); void notifyVoiceFontObservers(); typedef enum e_voice_font_type diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index e21358b65a..0b34bbb90f 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -52,8 +52,7 @@ LLPointer<LLVertexBuffer> LLVOPartGroup::sVB = NULL; S32 LLVOPartGroup::sVBSlotFree[]; S32* LLVOPartGroup::sVBSlotCursor = NULL; -//static -void LLVOPartGroup::restoreGL() +void LLVOPartGroup::initClass() { for (S32 i = 0; i < LL_MAX_PARTICLE_COUNT; ++i) { @@ -61,7 +60,11 @@ void LLVOPartGroup::restoreGL() } sVBSlotCursor = sVBSlotFree; +} +//static +void LLVOPartGroup::restoreGL() +{ sVB = new LLVertexBuffer(VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); U32 count = LL_MAX_PARTICLE_COUNT; sVB->allocateBuffer(count*4, count*6, true); @@ -149,8 +152,8 @@ bool ll_is_part_idx_allocated(S32 idx, S32* start, S32* end) void LLVOPartGroup::freeVBSlot(S32 idx) { llassert(idx < LL_MAX_PARTICLE_COUNT && idx >= 0); - llassert(sVBSlotCursor > sVBSlotFree); - llassert(ll_is_part_idx_allocated(idx, sVBSlotCursor, sVBSlotFree+LL_MAX_PARTICLE_COUNT)); + //llassert(sVBSlotCursor > sVBSlotFree); + //llassert(ll_is_part_idx_allocated(idx, sVBSlotCursor, sVBSlotFree+LL_MAX_PARTICLE_COUNT)); if (sVBSlotCursor > sVBSlotFree) { @@ -193,9 +196,8 @@ void LLVOPartGroup::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) mDrawable->setPositionGroup(pos); } -BOOL LLVOPartGroup::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOPartGroup::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - return TRUE; } void LLVOPartGroup::setPixelAreaAndAngle(LLAgent &agent) @@ -554,7 +556,7 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co mFaceList.clear(); LLViewerCamera* camera = LLViewerCamera::getInstance(); - for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i) + for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawablep = *i; @@ -597,7 +599,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_GEOM("Particle Geom"); void LLParticlePartition::getGeometry(LLSpatialGroup* group) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); LLFastTimer ftm(FTM_REBUILD_PARTICLE_GEOM); std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater()); @@ -626,7 +627,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) LLFace* facep = *i; LLAlphaObject* object = (LLAlphaObject*) facep->getViewerObject(); - if (facep->getIndicesStart() == 0xFFFFFFFF) + if (!facep->isState(LLFace::PARTICLE)) { //set the indices of this face S32 idx = LLVOPartGroup::findAvailableVBSlot(); if (idx >= 0) @@ -635,6 +636,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) facep->setIndicesIndex(idx*6); facep->setVertexBuffer(LLVOPartGroup::sVB); facep->setPoolType(LLDrawPool::POOL_ALPHA); + facep->setState(LLFace::PARTICLE); } else { diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h index 6160bceb24..42c1252d01 100644 --- a/indra/newview/llvopartgroup.h +++ b/indra/newview/llvopartgroup.h @@ -45,6 +45,7 @@ public: static S32 sVBSlotFree[LL_MAX_PARTICLE_COUNT]; static S32* sVBSlotCursor; + static void initClass(); static void restoreGL(); static void destroyGL(); static S32 findAvailableVBSlot(); @@ -62,7 +63,7 @@ public: LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. - BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); virtual F32 getBinRadius(); virtual void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax); diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 312034022e..31358df85f 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -1052,9 +1052,8 @@ void LLVOSky::calcAtmospherics(void) mFadeColor.setAlpha(0); } -BOOL LLVOSky::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOSky::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - return TRUE; } BOOL LLVOSky::updateSky() diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 6e6898d80a..2a150eccb9 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -461,7 +461,7 @@ public: void cleanupGL(); void restoreGL(); - /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); BOOL updateSky(); // Graphical stuff for objects - maybe broken out into render class diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 94a3111f4c..cb905d02da 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -80,9 +80,9 @@ public: glNormalPointer(GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_NORMAL], (void*)(base + mOffsets[TYPE_NORMAL])); } if (data_mask & MAP_TEXCOORD3) - { //substitute tex coord 0 for tex coord 3 + { //substitute tex coord 1 for tex coord 3 glClientActiveTextureARB(GL_TEXTURE3_ARB); - glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], (void*)(base + mOffsets[TYPE_TEXCOORD0])); + glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], (void*)(base + mOffsets[TYPE_TEXCOORD1])); glClientActiveTextureARB(GL_TEXTURE0_ARB); } if (data_mask & MAP_TEXCOORD2) diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 3556bde9a8..6687ce432f 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -339,11 +339,11 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys, return retval; } -BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TREE))) { - return TRUE; + return; } S32 trunk_LOD = sMAX_NUM_TREE_LOD_LEVELS ; @@ -374,7 +374,7 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) // *TODO: I don't know what's so special about trees // that they don't get REBUILD_POSITION automatically // at a higher level. - const LLVector3 &this_position = getPositionAgent(); + const LLVector3 &this_position = getPositionRegion(); if (this_position != mLastPosition) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_POSITION); @@ -393,8 +393,6 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) } mTrunkLOD = trunk_LOD; - - return TRUE; } const F32 TREE_BLEND_MIN = 1.f; @@ -843,10 +841,10 @@ void LLVOTree::updateMesh() LLMatrix4 matrix; // Translate to tree base HACK - adjustment in Z plants tree underground - const LLVector3 &pos_agent = getPositionAgent(); + const LLVector3 &pos_region = getPositionRegion(); //gGL.translatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f); LLMatrix4 trans_mat; - trans_mat.setTranslation(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f); + trans_mat.setTranslation(pos_region.mV[VX], pos_region.mV[VY], pos_region.mV[VZ] - 0.1f); trans_mat *= matrix; // Rotate to tree position and bend for current trunk/wind diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h index 0554935539..52debc85ab 100644 --- a/indra/newview/llvotree.h +++ b/indra/newview/llvotree.h @@ -59,7 +59,7 @@ public: void **user_data, U32 block_num, const EObjectUpdateType update_type, LLDataPacker *dp); - /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); // Graphical stuff for objects - maybe broken out into render class later? /*virtual*/ void render(LLAgent &agent); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 0abe73d55e..d94cd01a0b 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -329,7 +329,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, { if (!mTextureAnimp) { - mTextureAnimp = new LLViewerTextureAnim(); + mTextureAnimp = new LLViewerTextureAnim(this); } else { @@ -431,7 +431,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, { if (!mTextureAnimp) { - mTextureAnimp = new LLViewerTextureAnim(); + mTextureAnimp = new LLViewerTextureAnim(this); } else { @@ -499,183 +499,144 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, void LLVOVolume::animateTextures() { - F32 off_s = 0.f, off_t = 0.f, scale_s = 1.f, scale_t = 1.f, rot = 0.f; - S32 result = mTextureAnimp->animateTextures(off_s, off_t, scale_s, scale_t, rot); - - if (result) + if (!mDead) { - if (!mTexAnimMode) - { - mFaceMappingChanged = TRUE; - gPipeline.markTextured(mDrawable); - } - mTexAnimMode = result | mTextureAnimp->mMode; - - S32 start=0, end=mDrawable->getNumFaces()-1; - if (mTextureAnimp->mFace >= 0 && mTextureAnimp->mFace <= end) - { - start = end = mTextureAnimp->mFace; - } - - for (S32 i = start; i <= end; i++) + F32 off_s = 0.f, off_t = 0.f, scale_s = 1.f, scale_t = 1.f, rot = 0.f; + S32 result = mTextureAnimp->animateTextures(off_s, off_t, scale_s, scale_t, rot); + + if (result) { - LLFace* facep = mDrawable->getFace(i); - if (!facep) continue; - if(facep->getVirtualSize() <= MIN_TEX_ANIM_SIZE && facep->mTextureMatrix) continue; - - const LLTextureEntry* te = facep->getTextureEntry(); - - if (!te) + if (!mTexAnimMode) { - continue; + mFaceMappingChanged = TRUE; + gPipeline.markTextured(mDrawable); } - - if (!(result & LLViewerTextureAnim::ROTATE)) + mTexAnimMode = result | mTextureAnimp->mMode; + + S32 start=0, end=mDrawable->getNumFaces()-1; + if (mTextureAnimp->mFace >= 0 && mTextureAnimp->mFace <= end) { - te->getRotation(&rot); + start = end = mTextureAnimp->mFace; } - if (!(result & LLViewerTextureAnim::TRANSLATE)) - { - te->getOffset(&off_s,&off_t); - } - if (!(result & LLViewerTextureAnim::SCALE)) + + for (S32 i = start; i <= end; i++) { - te->getScale(&scale_s, &scale_t); - } + LLFace* facep = mDrawable->getFace(i); + if (!facep) continue; + if(facep->getVirtualSize() <= MIN_TEX_ANIM_SIZE && facep->mTextureMatrix) continue; - if (!facep->mTextureMatrix) - { - facep->mTextureMatrix = new LLMatrix4(); - } + const LLTextureEntry* te = facep->getTextureEntry(); + + if (!te) + { + continue; + } + + if (!(result & LLViewerTextureAnim::ROTATE)) + { + te->getRotation(&rot); + } + if (!(result & LLViewerTextureAnim::TRANSLATE)) + { + te->getOffset(&off_s,&off_t); + } + if (!(result & LLViewerTextureAnim::SCALE)) + { + te->getScale(&scale_s, &scale_t); + } - LLMatrix4& tex_mat = *facep->mTextureMatrix; - tex_mat.setIdentity(); - LLVector3 trans ; + if (!facep->mTextureMatrix) + { + facep->mTextureMatrix = new LLMatrix4(); + } + + LLMatrix4& tex_mat = *facep->mTextureMatrix; + tex_mat.setIdentity(); + LLVector3 trans ; - if(facep->isAtlasInUse()) - { - // - //if use atlas for animated texture - //apply the following transform to the animation matrix. - // - - F32 tcoord_xoffset = 0.f ; - F32 tcoord_yoffset = 0.f ; - F32 tcoord_xscale = 1.f ; - F32 tcoord_yscale = 1.f ; if(facep->isAtlasInUse()) { - const LLVector2* tmp = facep->getTexCoordOffset() ; - tcoord_xoffset = tmp->mV[0] ; - tcoord_yoffset = tmp->mV[1] ; + // + //if use atlas for animated texture + //apply the following transform to the animation matrix. + // + + F32 tcoord_xoffset = 0.f ; + F32 tcoord_yoffset = 0.f ; + F32 tcoord_xscale = 1.f ; + F32 tcoord_yscale = 1.f ; + if(facep->isAtlasInUse()) + { + const LLVector2* tmp = facep->getTexCoordOffset() ; + tcoord_xoffset = tmp->mV[0] ; + tcoord_yoffset = tmp->mV[1] ; - tmp = facep->getTexCoordScale() ; - tcoord_xscale = tmp->mV[0] ; - tcoord_yscale = tmp->mV[1] ; - } - trans.set(LLVector3(tcoord_xoffset + tcoord_xscale * (off_s+0.5f), tcoord_yoffset + tcoord_yscale * (off_t+0.5f), 0.f)); + tmp = facep->getTexCoordScale() ; + tcoord_xscale = tmp->mV[0] ; + tcoord_yscale = tmp->mV[1] ; + } + trans.set(LLVector3(tcoord_xoffset + tcoord_xscale * (off_s+0.5f), tcoord_yoffset + tcoord_yscale * (off_t+0.5f), 0.f)); - tex_mat.translate(LLVector3(-(tcoord_xoffset + tcoord_xscale * 0.5f), -(tcoord_yoffset + tcoord_yscale * 0.5f), 0.f)); - } - else //non atlas - { - trans.set(LLVector3(off_s+0.5f, off_t+0.5f, 0.f)); - tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f)); - } + tex_mat.translate(LLVector3(-(tcoord_xoffset + tcoord_xscale * 0.5f), -(tcoord_yoffset + tcoord_yscale * 0.5f), 0.f)); + } + else //non atlas + { + trans.set(LLVector3(off_s+0.5f, off_t+0.5f, 0.f)); + tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f)); + } - LLVector3 scale(scale_s, scale_t, 1.f); - LLQuaternion quat; - quat.setQuat(rot, 0, 0, -1.f); + LLVector3 scale(scale_s, scale_t, 1.f); + LLQuaternion quat; + quat.setQuat(rot, 0, 0, -1.f); - tex_mat.rotate(quat); + tex_mat.rotate(quat); - LLMatrix4 mat; - mat.initAll(scale, LLQuaternion(), LLVector3()); - tex_mat *= mat; + LLMatrix4 mat; + mat.initAll(scale, LLQuaternion(), LLVector3()); + tex_mat *= mat; - tex_mat.translate(trans); + tex_mat.translate(trans); + } } - } - else - { - if (mTexAnimMode && mTextureAnimp->mRate == 0) + else { - U8 start, count; - - if (mTextureAnimp->mFace == -1) - { - start = 0; - count = getNumTEs(); - } - else + if (mTexAnimMode && mTextureAnimp->mRate == 0) { - start = (U8) mTextureAnimp->mFace; - count = 1; - } + U8 start, count; - for (S32 i = start; i < start + count; i++) - { - if (mTexAnimMode & LLViewerTextureAnim::TRANSLATE) + if (mTextureAnimp->mFace == -1) { - setTEOffset(i, mTextureAnimp->mOffS, mTextureAnimp->mOffT); + start = 0; + count = getNumTEs(); } - if (mTexAnimMode & LLViewerTextureAnim::SCALE) + else { - setTEScale(i, mTextureAnimp->mScaleS, mTextureAnimp->mScaleT); + start = (U8) mTextureAnimp->mFace; + count = 1; } - if (mTexAnimMode & LLViewerTextureAnim::ROTATE) + + for (S32 i = start; i < start + count; i++) { - setTERotation(i, mTextureAnimp->mRot); + if (mTexAnimMode & LLViewerTextureAnim::TRANSLATE) + { + setTEOffset(i, mTextureAnimp->mOffS, mTextureAnimp->mOffT); + } + if (mTexAnimMode & LLViewerTextureAnim::SCALE) + { + setTEScale(i, mTextureAnimp->mScaleS, mTextureAnimp->mScaleT); + } + if (mTexAnimMode & LLViewerTextureAnim::ROTATE) + { + setTERotation(i, mTextureAnimp->mRot); + } } - } - gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; - mTexAnimMode = 0; - } - } -} -BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) -{ - LLViewerObject::idleUpdate(agent, world, time); - - static LLFastTimer::DeclareTimer ftm("Volume Idle"); - LLFastTimer t(ftm); - - if (mDead || mDrawable.isNull()) - { - return TRUE; - } - - /////////////////////// - // - // Do texture animation stuff - // - - if (mTextureAnimp && gAnimateTextures) - { - animateTextures(); - } - - // Dispatch to implementation - if (mVolumeImpl) - { - mVolumeImpl->doIdleUpdate(agent, world, time); - } - - const S32 MAX_ACTIVE_OBJECT_QUIET_FRAMES = 40; - - if (mDrawable->isActive()) - { - if (mDrawable->isRoot() && - mDrawable->mQuietCount++ > MAX_ACTIVE_OBJECT_QUIET_FRAMES && - (!mDrawable->getParent() || !mDrawable->getParent()->isActive())) - { - mDrawable->makeStatic(); + gPipeline.markTextured(mDrawable); + mFaceMappingChanged = TRUE; + mTexAnimMode = 0; + } } } - - return TRUE; } void LLVOVolume::updateTextures() @@ -698,7 +659,8 @@ void LLVOVolume::updateTextures() } } - } + + } } BOOL LLVOVolume::isVisible() const @@ -860,7 +822,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) } } - S32 texture_discard = mSculptTexture->getDiscardLevel(); //try to match the texture + S32 texture_discard = mSculptTexture->getCachedRawImageLevel(); //try to match the texture S32 current_discard = getVolume() ? getVolume()->getSculptLevel() : -2 ; if (texture_discard >= 0 && //texture has some data available @@ -916,8 +878,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) BOOL LLVOVolume::isActive() const { - return !mStatic || mTextureAnimp || (mVolumeImpl && mVolumeImpl->isActive()) || - (mDrawable.notNull() && mDrawable->isActive()); + return !mStatic; } BOOL LLVOVolume::setMaterial(const U8 material) @@ -1167,7 +1128,7 @@ void LLVOVolume::sculpt() S8 sculpt_components = 0; const U8* sculpt_data = NULL; - S32 discard_level = mSculptTexture->getDiscardLevel() ; + S32 discard_level = mSculptTexture->getCachedRawImageLevel() ; LLImageRaw* raw_image = mSculptTexture->getCachedRawImage() ; S32 max_discard = mSculptTexture->getMaxDiscardLevel(); @@ -1177,17 +1138,29 @@ void LLVOVolume::sculpt() S32 current_discard = getVolume()->getSculptLevel() ; if(current_discard < -2) { - llwarns << "WARNING!!: Current discard of sculpty at " << current_discard - << " is less than -2." << llendl; + static S32 low_sculpty_discard_warning_count = 100; + if (++low_sculpty_discard_warning_count >= 100) + { // Log first time, then every 100 afterwards otherwise this can flood the logs + llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID() + << " at " << current_discard + << " is less than -2." << llendl; + low_sculpty_discard_warning_count = 0; + } // corrupted volume... don't update the sculpty return; } else if (current_discard > MAX_DISCARD_LEVEL) { - llwarns << "WARNING!!: Current discard of sculpty at " << current_discard - << " is more than than allowed max of " << MAX_DISCARD_LEVEL << llendl; - + static S32 high_sculpty_discard_warning_count = 100; + if (++high_sculpty_discard_warning_count >= 100) + { // Log first time, then every 100 afterwards otherwise this can flood the logs + llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID() + << " at " << current_discard + << " is more than than allowed max of " << MAX_DISCARD_LEVEL << llendl; + high_sculpty_discard_warning_count = 0; + } + // corrupted volume... don't update the sculpty return; } @@ -1266,6 +1239,13 @@ BOOL LLVOVolume::calcLOD() if (mDrawable->isState(LLDrawable::RIGGED)) { LLVOAvatar* avatar = getAvatar(); + + // Not sure how this can really happen, but alas it does. Better exit here than crashing. + if( !avatar || !avatar->mDrawable ) + { + return FALSE; + } + distance = avatar->mDrawable->mDistanceWRTCamera; radius = avatar->getBinRadius(); } @@ -1374,7 +1354,8 @@ BOOL LLVOVolume::setDrawableParent(LLDrawable* parentp) void LLVOVolume::updateFaceFlags() { - for (S32 i = 0; i < getVolume()->getNumFaces(); i++) + // There's no guarantee that getVolume()->getNumFaces() == mDrawable->getNumFaces() + for (S32 i = 0; i < getVolume()->getNumFaces() && i < mDrawable->getNumFaces(); i++) { LLFace *face = mDrawable->getFace(i); if (face) @@ -1475,7 +1456,10 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global) volume = getVolume(); } - for (S32 i = 0; i < getVolume()->getNumVolumeFaces(); i++) + // There's no guarantee that getVolume()->getNumFaces() == mDrawable->getNumFaces() + for (S32 i = 0; + i < getVolume()->getNumVolumeFaces() && i < mDrawable->getNumFaces() && i < getNumTEs(); + i++) { LLFace *face = mDrawable->getFace(i); if (!face) @@ -1511,7 +1495,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global) updateRadius(); mDrawable->movePartition(); - + return res; } @@ -1776,6 +1760,11 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) void LLVOVolume::updateFaceSize(S32 idx) { + if( mDrawable->getNumFaces() <= idx ) + { + return; + } + LLFace* facep = mDrawable->getFace(idx); if (facep) { @@ -2466,7 +2455,12 @@ void LLVOVolume::addMediaImpl(LLViewerMediaImpl* media_impl, S32 texture_index) //add the face to show the media if it is in playing if(mDrawable) { - LLFace* facep = mDrawable->getFace(texture_index) ; + LLFace* facep(NULL); + if( texture_index < mDrawable->getNumFaces() ) + { + facep = mDrawable->getFace(texture_index) ; + } + if(facep) { LLViewerMediaTexture* media_tex = LLViewerTextureManager::findMediaTexture(mMediaImplList[texture_index]->getMediaTextureID()) ; @@ -3601,7 +3595,6 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e if (LLFloater::isVisible(gFloaterTools) && getAvatar()->isSelf()) { updateRiggedVolume(); - genBBoxes(FALSE); volume = mRiggedVolume; transform = false; } @@ -3865,6 +3858,7 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons LLVector4a* pos = dst_face.mPositions; + if( pos && weight && dst_face.mExtents ) { LLFastTimer t(FTM_SKIN_RIGGED); @@ -4000,7 +3994,6 @@ static LLFastTimer::DeclareTimer FTM_REGISTER_FACE("Register Face"); void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type) { LLFastTimer t(FTM_REGISTER_FACE); - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); if (facep->getViewerObject()->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects) { @@ -4043,10 +4036,6 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, else { model_mat = &(drawable->getRegion()->mRenderMatrix); - if (model_mat->isIdentity()) - { - model_mat = NULL; - } } //drawable->getVObj()->setDebugText(llformat("%d", drawable->isState(LLDrawable::ANIMATED_CHILD))); @@ -4251,7 +4240,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) LLFastTimer t(FTM_REBUILD_VOLUME_FACE_LIST); //get all the faces into a list - for (LLSpatialGroup::element_iter drawable_iter = group->getData().begin(); drawable_iter != group->getData().end(); ++drawable_iter) + for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { LLDrawable* drawablep = *drawable_iter; @@ -4657,7 +4646,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if (!LLPipeline::sDelayVBUpdate) { //drawables have been rebuilt, clear rebuild status - for (LLSpatialGroup::element_iter drawable_iter = group->getData().begin(); drawable_iter != group->getData().end(); ++drawable_iter) + for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { LLDrawable* drawablep = *drawable_iter; drawablep->clearState(LLDrawable::REBUILD_ALL); @@ -4697,7 +4686,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) std::set<LLVertexBuffer*> mapped_buffers; - for (LLSpatialGroup::element_iter drawable_iter = group->getData().begin(); drawable_iter != group->getData().end(); ++drawable_iter) + for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { LLDrawable* drawablep = *drawable_iter; @@ -4721,8 +4710,14 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) if (buff) { llassert(!face->isState(LLFace::RIGGED)); - face->getGeometryVolume(*volume, face->getTEOffset(), - vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), face->getGeomIndex()); + + if (!face->getGeometryVolume(*volume, face->getTEOffset(), + vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), face->getGeomIndex())) + { //something's gone wrong with the vertex buffer accounting, rebuild this group + group->dirtyGeom(); + gPipeline.markRebuild(group, TRUE); + } + if (buff->isLocked()) { @@ -4759,7 +4754,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) if(num_mapped_veretx_buffer != LLVertexBuffer::sMappedCount) { llwarns << "Not all mapped vertex buffers are unmapped!" << llendl ; - for (LLSpatialGroup::element_iter drawable_iter = group->getData().begin(); drawable_iter != group->getData().end(); ++drawable_iter) + for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { LLDrawable* drawablep = *drawable_iter; for (S32 i = 0; i < drawablep->getNumFaces(); ++i) @@ -4921,11 +4916,19 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: facep->setTextureIndex(cur_tex); texture_list.push_back(tex); - //if (can_batch_texture(facep)) - { + if (can_batch_texture(facep)) + { //populate texture_list with any textures that can be batched + //move i to the next unbatchable face while (i != faces.end()) { facep = *i; + + if (!can_batch_texture(facep)) + { //face is bump mapped or has an animated texture matrix -- can't + //batch more than 1 texture at a time + break; + } + if (facep->getTexture() != tex) { if (distance_sort) @@ -4951,12 +4954,6 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: cur_tex++; } - if (!can_batch_texture(facep)) - { //face is bump mapped or has an animated texture matrix -- can't - //batch more than 1 texture at a time - break; - } - if (cur_tex >= texture_index_channels) { //cut batches when index channels are depleted break; @@ -5056,8 +5053,11 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: llassert(!facep->isState(LLFace::RIGGED)); - facep->getGeometryVolume(*volume, te_idx, - vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), index_offset,true); + if (!facep->getGeometryVolume(*volume, te_idx, + vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), index_offset,true)) + { + llwarns << "Failed to get geometry for face!" << llendl; + } if (drawablep->isState(LLDrawable::ANIMATED_CHILD)) { @@ -5227,7 +5227,7 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun //for each drawable - for (LLSpatialGroup::element_iter drawable_iter = group->getData().begin(); drawable_iter != group->getData().end(); ++drawable_iter) + for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { LLDrawable* drawablep = *drawable_iter; diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 25fe085421..5482c80f2b 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -68,7 +68,7 @@ class LLVolumeInterface public: virtual ~LLVolumeInterface() { } virtual LLVolumeInterfaceType getInterfaceType() const = 0; - virtual BOOL doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) = 0; + virtual void doIdleUpdate() = 0; virtual BOOL doUpdateGeometry(LLDrawable *drawable) = 0; virtual LLVector3 getPivotPosition() const = 0; virtual void onSetVolume(const LLVolumeParams &volume_params, const S32 detail) = 0; @@ -114,8 +114,7 @@ public: void deleteFaces(); void animateTextures(); - /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); - + BOOL isVisible() const ; /*virtual*/ BOOL isActive() const; /*virtual*/ BOOL isAttachment() const; diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index 942eff6171..e8a1c3d1d6 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -100,17 +100,8 @@ void LLVOWater::updateTextures() } // Never gets called -BOOL LLVOWater::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOWater::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - /*if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_WATER))) - { - return TRUE; - } - if (mDrawable) - { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); - }*/ - return TRUE; } LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline) diff --git a/indra/newview/llvowater.h b/indra/newview/llvowater.h index ed709dd840..cf9323ef2e 100644 --- a/indra/newview/llvowater.h +++ b/indra/newview/llvowater.h @@ -58,7 +58,7 @@ public: static void initClass(); static void cleanupClass(); - /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); /*virtual*/ void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax); diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index afd902201b..7f17fd3e56 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -92,9 +92,9 @@ void LLVOWLSky::initSunDirection(LLVector3 const & sun_direction, { } -BOOL LLVOWLSky::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +void LLVOWLSky::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - return TRUE; + } BOOL LLVOWLSky::isActive(void) const @@ -301,7 +301,7 @@ void LLVOWLSky::restoreGL() gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); } -static LLFastTimer::DeclareTimer FTM_GEO_SKY("Sky Geometry"); +static LLFastTimer::DeclareTimer FTM_GEO_SKY("Windlight Sky Geometry"); BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) { diff --git a/indra/newview/llvowlsky.h b/indra/newview/llvowlsky.h index 825e13a203..729dced15e 100644 --- a/indra/newview/llvowlsky.h +++ b/indra/newview/llvowlsky.h @@ -53,7 +53,7 @@ public: void initSunDirection(LLVector3 const & sun_direction, LLVector3 const & sun_angular_velocity); - /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + /*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); /*virtual*/ BOOL isActive(void) const; /*virtual*/ LLDrawable * createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index e386112334..4f52ff9778 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -100,7 +100,7 @@ void LLWaterParamManager::loadPresetsFromDir(const std::string& dir) break; // no more files } - std::string path = dir + file; + std::string path = gDirUtilp->add(dir, file); if (!loadPreset(path)) { llwarns << "Error loading water preset from " << path << llendl; diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index 2425b96678..be3e3ff30e 100644 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -105,10 +105,16 @@ LLEnvironmentRequestResponder::LLEnvironmentRequestResponder() return; } - if (unvalidated_content[0]["regionID"].asUUID() != gAgent.getRegion()->getRegionID()) + LLUUID regionId; + if( gAgent.getRegion() ) + { + regionId = gAgent.getRegion()->getRegionID(); + } + + if (unvalidated_content[0]["regionID"].asUUID() != regionId ) { LL_WARNS("WindlightCaps") << "Not in the region from where this data was received (wanting " - << gAgent.getRegion()->getRegionID() << " but got " << unvalidated_content[0]["regionID"].asUUID() + << regionId << " but got " << unvalidated_content[0]["regionID"].asUUID() << ") - ignoring..." << LL_ENDL; return; } diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index 49d9d44d74..6077208799 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -283,7 +283,7 @@ void LLWLParamManager::loadPresetsFromDir(const std::string& dir) break; // no more files } - std::string path = dir + file; + std::string path = gDirUtilp->add(dir, file); if (!loadPreset(path)) { llwarns << "Error loading sky preset from " << path << llendl; diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index b061c90d98..793becf0c8 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -138,7 +138,6 @@ 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) @@ -644,7 +643,6 @@ void LLWorld::updateVisibilities() void LLWorld::updateRegions(F32 max_update_time) { - LLMemType mt_ur(LLMemType::MTYPE_IDLE_UPDATE_REGIONS); LLTimer update_timer; BOOL did_one = FALSE; @@ -657,7 +655,10 @@ void LLWorld::updateRegions(F32 max_update_time) if (did_one && max_time <= 0.f) break; max_time = llmin(max_time, max_update_time*.1f); - did_one |= regionp->idleUpdate(max_update_time); + if (regionp->idleUpdate(max_update_time)) + { + did_one = TRUE; + } } } @@ -837,6 +838,9 @@ void LLWorld::updateWaterObjects() } mHoleWaterObjects.clear(); + // Use the water height of the region we're on for areas where there is no region + F32 water_height = gAgent.getRegion()->getWaterHeight(); + // Now, get a list of the holes S32 x, y; for (x = min_x; x <= max_x; x += rwidth) @@ -845,12 +849,12 @@ void LLWorld::updateWaterObjects() { U64 region_handle = to_region_handle(x, y); if (!getRegionFromHandle(region_handle)) - { + { // No region at that area, so make water LLVOWater* waterp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, gAgent.getRegion()); waterp->setUseTexture(FALSE); waterp->setPositionGlobal(LLVector3d(x + rwidth/2, y + rwidth/2, - 256.f+DEFAULT_WATER_HEIGHT)); + 256.f + water_height)); waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, 512.f)); gPipeline.createObject(waterp); mHoleWaterObjects.push_back(waterp); @@ -907,7 +911,7 @@ void LLWorld::updateWaterObjects() } waterp->setRegion(gAgent.getRegion()); - LLVector3d water_pos(water_center_x, water_center_y, 256.f+DEFAULT_WATER_HEIGHT) ; + LLVector3d water_pos(water_center_x, water_center_y, 256.f + water_height) ; LLVector3 water_scale((F32) dim[0], (F32) dim[1], 512.f); //stretch out to horizon @@ -1188,7 +1192,7 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi { LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter; - if (!pVOAvatar->isDead() && !pVOAvatar->isSelf()) + if (!pVOAvatar->isDead() && !pVOAvatar->mIsDummy) { LLVector3d pos_global = pVOAvatar->getPositionGlobal(); LLUUID uuid = pVOAvatar->getID(); diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index a3ccf87cfc..11b2770ec0 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -965,8 +965,6 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& S32 text_x = x; S32 text_y = (S32)(y - sTrackCircleImage->getHeight()/2 - font->getLineHeight()); - BOOL is_in_window = true; - if( x < 0 || y < 0 || x >= getRect().getWidth() @@ -979,7 +977,6 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& text_x = sTrackingArrowX; text_y = sTrackingArrowY; } - is_in_window = false; } else if (LLTracker::getTrackingStatus() == LLTracker::TRACKING_LOCATION && LLTracker::getTrackedLocationType() != LLTracker::LOCATION_NOTHING) @@ -1320,7 +1317,7 @@ void LLWorldMapView::drawTrackingCircle( const LLRect& rect, S32 x, S32 y, const gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); - gGL.translatef((F32)x, (F32)y, 0.f); + gGL.translatef((F32)x * LLUI::sGLScaleFactor.mV[VX], (F32)y * LLUI::sGLScaleFactor.mV[VY], 0.f); gl_washer_segment_2d(inner_radius, outer_radius, start_theta, end_theta, 40, color, color); gGL.popMatrix(); diff --git a/indra/newview/macutil_Prefix.h b/indra/newview/macutil_Prefix.h index fd8e927a08..b54a764a62 100644 --- a/indra/newview/macutil_Prefix.h +++ b/indra/newview/macutil_Prefix.h @@ -33,7 +33,7 @@ */ #include <Carbon/Carbon.h> +#include "fix_macros.h" -#undef check #undef verify #undef require diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index f01626c0fc..9f0e2906d0 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -35,7 +35,6 @@ #include "llviewercontrol.h" #include "llfasttimer.h" #include "llfontgl.h" -#include "llmemtype.h" #include "llnamevalue.h" #include "llpointer.h" #include "llprimitive.h" @@ -120,6 +119,8 @@ //#define DEBUG_INDICES #endif +bool gShiftFrame = false; + //cached settings BOOL LLPipeline::RenderAvatarVP; BOOL LLPipeline::VertexShaderEnable; @@ -217,7 +218,7 @@ BOOL gDebugPipeline = FALSE; LLPipeline gPipeline; const LLMatrix4* gGLLastMatrix = NULL; -LLFastTimer::DeclareTimer FTM_RENDER_GEOMETRY("Geometry"); +LLFastTimer::DeclareTimer FTM_RENDER_GEOMETRY("Render Geometry"); LLFastTimer::DeclareTimer FTM_RENDER_GRASS("Grass"); LLFastTimer::DeclareTimer FTM_RENDER_INVISIBLE("Invisible"); LLFastTimer::DeclareTimer FTM_RENDER_OCCLUSION("Occlusion"); @@ -234,8 +235,13 @@ LLFastTimer::DeclareTimer FTM_RENDER_BUMP("Bump"); LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT("Fullbright"); LLFastTimer::DeclareTimer FTM_RENDER_GLOW("Glow"); LLFastTimer::DeclareTimer FTM_GEO_UPDATE("Geo Update"); +LLFastTimer::DeclareTimer FTM_PIPELINE_CREATE("Pipeline Create"); LLFastTimer::DeclareTimer FTM_POOLRENDER("RenderPool"); LLFastTimer::DeclareTimer FTM_POOLS("Pools"); +LLFastTimer::DeclareTimer FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)"); +LLFastTimer::DeclareTimer FTM_DEFERRED_POOLS("Pools (Deferred)"); +LLFastTimer::DeclareTimer FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)"); +LLFastTimer::DeclareTimer FTM_POST_DEFERRED_POOLS("Pools (Post)"); LLFastTimer::DeclareTimer FTM_RENDER_BLOOM_FBO("First FBO"); LLFastTimer::DeclareTimer FTM_STATESORT("Sort Draw State"); LLFastTimer::DeclareTimer FTM_PIPELINE("Pipeline"); @@ -442,10 +448,21 @@ LLPipeline::LLPipeline() : mLightFunc = 0; } -void LLPipeline::init() +void LLPipeline::connectRefreshCachedSettingsSafe(const std::string name) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_INIT); + LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl(name); + if ( cntrl_ptr.isNull() ) + { + llwarns << "Global setting name not found:" << name << llendl; + } + else + { + cntrl_ptr->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); + } +} +void LLPipeline::init() +{ refreshCachedSettings(); gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity"); @@ -526,88 +543,86 @@ void LLPipeline::init() // // Update all settings to trigger a cached settings refresh // - - gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderUseFarClip")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderAvatarMaxVisible")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderDelayVBUpdate")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - - gSavedSettings.getControl("UseOcclusion")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - - gSavedSettings.getControl("VertexShaderEnable")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderAvatarVP")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("WindLightUseAtmosShaders")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderDeferredSunWash")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderFSAASamples")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderResolutionDivisor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderUIBuffer")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowDetail")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderDeferredSSAO")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowResolutionScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderLocalLights")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderDelayCreation")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderAnimateRes")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("FreezeTime")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("DebugBeaconLineWidth")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderHighlightBrightness")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderHighlightColor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderHighlightThickness")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderSpotLightsInNondeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("PreviewAmbientColor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("PreviewDiffuse0")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("PreviewSpecular0")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("PreviewDiffuse1")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("PreviewSpecular1")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("PreviewDiffuse2")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("PreviewSpecular2")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("PreviewDirection0")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("PreviewDirection1")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("PreviewDirection2")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderGlowMinLuminance")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderGlowMaxExtractAlpha")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderGlowWarmthAmount")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderGlowLumWeights")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderGlowWarmthWeights")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderGlowResolutionPow")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderGlowIterations")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderGlowWidth")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderGlowStrength")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderDepthOfField")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("CameraFocusTransitionTime")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("CameraFNumber")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("CameraFocalLength")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("CameraFieldOfView")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowNoise")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowBlurSize")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderSSAOScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderSSAOMaxScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderSSAOFactor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderSSAOEffect")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowOffsetError")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowBiasError")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowBias")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderSpotShadowOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderSpotShadowBias")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderEdgeDepthCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderEdgeNormCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowGaussian")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowBlurDistFactor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderDeferredAtmospheric")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderReflectionDetail")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderHighlightFadeTime")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowClipPlanes")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowOrthoClipPlanes")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowNearDist")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderFarClip")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowSplitExponent")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowErrorCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("RenderShadowFOVCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("CameraOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("CameraMaxCoF")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("CameraDoFResScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); + connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaDeferred"); + connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaNonDeferred"); + connectRefreshCachedSettingsSafe("RenderUseFarClip"); + connectRefreshCachedSettingsSafe("RenderAvatarMaxVisible"); + connectRefreshCachedSettingsSafe("RenderDelayVBUpdate"); + connectRefreshCachedSettingsSafe("UseOcclusion"); + connectRefreshCachedSettingsSafe("VertexShaderEnable"); + connectRefreshCachedSettingsSafe("RenderAvatarVP"); + connectRefreshCachedSettingsSafe("WindLightUseAtmosShaders"); + connectRefreshCachedSettingsSafe("RenderDeferred"); + connectRefreshCachedSettingsSafe("RenderDeferredSunWash"); + connectRefreshCachedSettingsSafe("RenderFSAASamples"); + connectRefreshCachedSettingsSafe("RenderResolutionDivisor"); + connectRefreshCachedSettingsSafe("RenderUIBuffer"); + connectRefreshCachedSettingsSafe("RenderShadowDetail"); + connectRefreshCachedSettingsSafe("RenderDeferredSSAO"); + connectRefreshCachedSettingsSafe("RenderShadowResolutionScale"); + connectRefreshCachedSettingsSafe("RenderLocalLights"); + connectRefreshCachedSettingsSafe("RenderDelayCreation"); + connectRefreshCachedSettingsSafe("RenderAnimateRes"); + connectRefreshCachedSettingsSafe("FreezeTime"); + connectRefreshCachedSettingsSafe("DebugBeaconLineWidth"); + connectRefreshCachedSettingsSafe("RenderHighlightBrightness"); + connectRefreshCachedSettingsSafe("RenderHighlightColor"); + connectRefreshCachedSettingsSafe("RenderHighlightThickness"); + connectRefreshCachedSettingsSafe("RenderSpotLightsInNondeferred"); + connectRefreshCachedSettingsSafe("PreviewAmbientColor"); + connectRefreshCachedSettingsSafe("PreviewDiffuse0"); + connectRefreshCachedSettingsSafe("PreviewSpecular0"); + connectRefreshCachedSettingsSafe("PreviewDiffuse1"); + connectRefreshCachedSettingsSafe("PreviewSpecular1"); + connectRefreshCachedSettingsSafe("PreviewDiffuse2"); + connectRefreshCachedSettingsSafe("PreviewSpecular2"); + connectRefreshCachedSettingsSafe("PreviewDirection0"); + connectRefreshCachedSettingsSafe("PreviewDirection1"); + connectRefreshCachedSettingsSafe("PreviewDirection2"); + connectRefreshCachedSettingsSafe("RenderGlowMinLuminance"); + connectRefreshCachedSettingsSafe("RenderGlowMaxExtractAlpha"); + connectRefreshCachedSettingsSafe("RenderGlowWarmthAmount"); + connectRefreshCachedSettingsSafe("RenderGlowLumWeights"); + connectRefreshCachedSettingsSafe("RenderGlowWarmthWeights"); + connectRefreshCachedSettingsSafe("RenderGlowResolutionPow"); + connectRefreshCachedSettingsSafe("RenderGlowIterations"); + connectRefreshCachedSettingsSafe("RenderGlowWidth"); + connectRefreshCachedSettingsSafe("RenderGlowStrength"); + connectRefreshCachedSettingsSafe("RenderDepthOfField"); + connectRefreshCachedSettingsSafe("CameraFocusTransitionTime"); + connectRefreshCachedSettingsSafe("CameraFNumber"); + connectRefreshCachedSettingsSafe("CameraFocalLength"); + connectRefreshCachedSettingsSafe("CameraFieldOfView"); + connectRefreshCachedSettingsSafe("RenderShadowNoise"); + connectRefreshCachedSettingsSafe("RenderShadowBlurSize"); + connectRefreshCachedSettingsSafe("RenderSSAOScale"); + connectRefreshCachedSettingsSafe("RenderSSAOMaxScale"); + connectRefreshCachedSettingsSafe("RenderSSAOFactor"); + connectRefreshCachedSettingsSafe("RenderSSAOEffect"); + connectRefreshCachedSettingsSafe("RenderShadowOffsetError"); + connectRefreshCachedSettingsSafe("RenderShadowBiasError"); + connectRefreshCachedSettingsSafe("RenderShadowOffset"); + connectRefreshCachedSettingsSafe("RenderShadowBias"); + connectRefreshCachedSettingsSafe("RenderSpotShadowOffset"); + connectRefreshCachedSettingsSafe("RenderSpotShadowBias"); + connectRefreshCachedSettingsSafe("RenderEdgeDepthCutoff"); + connectRefreshCachedSettingsSafe("RenderEdgeNormCutoff"); + connectRefreshCachedSettingsSafe("RenderShadowGaussian"); + connectRefreshCachedSettingsSafe("RenderShadowBlurDistFactor"); + connectRefreshCachedSettingsSafe("RenderDeferredAtmospheric"); + connectRefreshCachedSettingsSafe("RenderReflectionDetail"); + connectRefreshCachedSettingsSafe("RenderHighlightFadeTime"); + connectRefreshCachedSettingsSafe("RenderShadowClipPlanes"); + connectRefreshCachedSettingsSafe("RenderShadowOrthoClipPlanes"); + connectRefreshCachedSettingsSafe("RenderShadowNearDist"); + connectRefreshCachedSettingsSafe("RenderFarClip"); + connectRefreshCachedSettingsSafe("RenderShadowSplitExponent"); + connectRefreshCachedSettingsSafe("RenderShadowErrorCutoff"); + connectRefreshCachedSettingsSafe("RenderShadowFOVCutoff"); + connectRefreshCachedSettingsSafe("CameraOffset"); + connectRefreshCachedSettingsSafe("CameraMaxCoF"); + connectRefreshCachedSettingsSafe("CameraDoFResScale"); + connectRefreshCachedSettingsSafe("RenderAutoHideSurfaceAreaLimit"); gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); } @@ -688,6 +703,8 @@ void LLPipeline::cleanup() mInitialized = FALSE; mDeferredVB = NULL; + + mCubeVB = NULL; } //============================================================================ @@ -713,7 +730,7 @@ void LLPipeline::destroyGL() { glDeleteQueriesARB(1, &mMeshDirtyQueryObject); mMeshDirtyQueryObject = 0; -} + } } static LLFastTimer::DeclareTimer FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); @@ -744,7 +761,16 @@ void LLPipeline::resizeScreenTexture() GLuint resX = gViewerWindow->getWorldViewWidthRaw(); GLuint resY = gViewerWindow->getWorldViewHeightRaw(); - allocateScreenBuffer(resX,resY); + if (!allocateScreenBuffer(resX,resY)) + { //FAILSAFE: screen buffer allocation failed, disable deferred rendering if it's enabled + //NOTE: if the session closes successfully after this call, deferred rendering will be + // disabled on future sessions + if (LLPipeline::sRenderDeferred) + { + gSavedSettings.setBOOL("RenderDeferred", FALSE); + LLPipeline::refreshCachedSettings(); + } + } } } @@ -759,18 +785,57 @@ void LLPipeline::allocatePhysicsBuffer() } } -void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) +bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) { refreshCachedSettings(); - U32 samples = RenderFSAASamples; + + bool save_settings = sRenderDeferred; + if (save_settings) + { + // Set this flag in case we crash while resizing window or allocating space for deferred rendering targets + gSavedSettings.setBOOL("RenderInitError", TRUE); + gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); + } + + eFBOStatus ret = doAllocateScreenBuffer(resX, resY); + + if (save_settings) + { + // don't disable shaders on next session + gSavedSettings.setBOOL("RenderInitError", FALSE); + gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); + } + + if (ret == FBO_FAILURE) + { //FAILSAFE: screen buffer allocation failed, disable deferred rendering if it's enabled + //NOTE: if the session closes successfully after this call, deferred rendering will be + // disabled on future sessions + if (LLPipeline::sRenderDeferred) + { + gSavedSettings.setBOOL("RenderDeferred", FALSE); + LLPipeline::refreshCachedSettings(); + } + } - //try to allocate screen buffers at requested resolution and samples + return ret == FBO_SUCCESS_FULLRES; +} + + +LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY) +{ + // try to allocate screen buffers at requested resolution and samples // - on failure, shrink number of samples and try again // - if not multisampled, shrink resolution and try again (favor X resolution over Y) // Make sure to call "releaseScreenBuffers" after each failure to cleanup the partially loaded state + U32 samples = RenderFSAASamples; + + eFBOStatus ret = FBO_SUCCESS_FULLRES; if (!allocateScreenBuffer(resX, resY, samples)) { + //failed to allocate at requested specification, return false + ret = FBO_FAILURE; + releaseScreenBuffers(); //reduce number of samples while (samples > 0) @@ -778,7 +843,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) samples /= 2; if (allocateScreenBuffer(resX, resY, samples)) { //success - return; + return FBO_SUCCESS_LOWRES; } releaseScreenBuffers(); } @@ -791,22 +856,23 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) resY /= 2; if (allocateScreenBuffer(resX, resY, samples)) { - return; + return FBO_SUCCESS_LOWRES; } releaseScreenBuffers(); resX /= 2; if (allocateScreenBuffer(resX, resY, samples)) { - return; + return FBO_SUCCESS_LOWRES; } releaseScreenBuffers(); } llwarns << "Unable to allocate screen buffer at any resolution!" << llendl; } -} + return ret; +} bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) { @@ -834,10 +900,6 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) if (LLPipeline::sRenderDeferred) { - // Set this flag in case we crash while resizing window or allocating space for deferred rendering targets - gSavedSettings.setBOOL("RenderInitError", TRUE); - gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); - S32 shadow_detail = RenderShadowDetail; BOOL ssao = RenderDeferredSSAO; @@ -849,7 +911,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) if (!mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false; if (samples > 0) { - if (!mFXAABuffer.allocate(nhpo2(resX), nhpo2(resY), GL_RGBA, FALSE, FALSE, LLTexUnit::TT_TEXTURE, FALSE, samples)) return false; + if (!mFXAABuffer.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_TEXTURE, FALSE, samples)) return false; } else { @@ -872,7 +934,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) U32 sun_shadow_map_width = ((U32(resX*scale)+1)&~1); // must be even to avoid a stripe in the horizontal shadow blur for (U32 i = 0; i < 4; i++) { - if (!mShadow[i].allocate(sun_shadow_map_width,U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false; + if (!mShadow[i].allocate(sun_shadow_map_width,U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_TEXTURE)) return false; } } else @@ -883,7 +945,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) } } - U32 width = nhpo2(U32(resX*scale))/2; + U32 width = (U32) (resX*scale); U32 height = width; if (shadow_detail > 1) @@ -902,9 +964,11 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) } } - // don't disable shaders on next session - gSavedSettings.setBOOL("RenderInitError", FALSE); - gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); + //HACK make screenbuffer allocations start failing after 30 seconds + if (gSavedSettings.getBOOL("SimulateFBOFailure")) + { + return false; + } } else { @@ -1109,7 +1173,6 @@ void LLPipeline::releaseScreenBuffers() void LLPipeline::createGLBuffers() { stop_glerror(); - LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS); assertInitialized(); updateRenderDeferred(); @@ -1246,7 +1309,6 @@ void LLPipeline::createLUTBuffers() void LLPipeline::restoreGL() { - LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_RESTORE_GL); assertInitialized(); if (mVertexShadersEnabled) @@ -1308,7 +1370,6 @@ BOOL LLPipeline::canUseAntiAliasing() const void LLPipeline::unloadShaders() { - LLMemType mt_us(LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS); LLViewerShaderMgr::instance()->unloadShaders(); mVertexShadersLoaded = 0; @@ -1340,7 +1401,6 @@ S32 LLPipeline::getMaxLightingDetail() const S32 LLPipeline::setLightingDetail(S32 level) { - LLMemType mt_ld(LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL); refreshCachedSettings(); if (level < 0) @@ -1371,7 +1431,7 @@ public: { LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); - if (!group->isState(LLSpatialGroup::GEOM_DIRTY) && !group->getData().empty()) + if (!group->isState(LLSpatialGroup::GEOM_DIRTY) && !group->isEmpty()) { for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) { @@ -1502,7 +1562,6 @@ LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerTexture *tex0) LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0) { - LLMemType mt(LLMemType::MTYPE_PIPELINE); LLDrawPool *poolp = findPool(type, tex0); if (poolp) { @@ -1519,7 +1578,6 @@ LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0) // static LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* imagep) { - LLMemType mt(LLMemType::MTYPE_PIPELINE); U32 type = getPoolTypeFromTE(te, imagep); return gPipeline.getPool(type, imagep); } @@ -1527,8 +1585,6 @@ LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* //static U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* imagep) { - LLMemType mt_gpt(LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE); - if (!te || !imagep) { return 0; @@ -1557,7 +1613,6 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima void LLPipeline::addPool(LLDrawPool *new_poolp) { - LLMemType mt_a(LLMemType::MTYPE_PIPELINE_ADD_POOL); assertInitialized(); mPools.insert(new_poolp); addToQuickLookup( new_poolp ); @@ -1565,7 +1620,6 @@ void LLPipeline::addPool(LLDrawPool *new_poolp) void LLPipeline::allocDrawable(LLViewerObject *vobj) { - LLMemType mt_ad(LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE); LLDrawable *drawable = new LLDrawable(); vobj->mDrawable = drawable; @@ -1662,10 +1716,23 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) } -U32 LLPipeline::addObject(LLViewerObject *vobj) +//static +void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar) { - LLMemType mt_ao(LLMemType::MTYPE_PIPELINE_ADD_OBJECT); + LLFastTimer t(FTM_REMOVE_FROM_LIGHT_SET); + for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin(); + iter != gPipeline.mNearbyLights.end(); iter++) + { + if (iter->drawable->getVObj()->isAttachment() && iter->drawable->getVObj()->getAvatar() == muted_avatar) + { + gPipeline.mLights.erase(iter->drawable); + gPipeline.mNearbyLights.erase(iter); + } + } +} +U32 LLPipeline::addObject(LLViewerObject *vobj) +{ if (RenderDelayCreation) { mCreateQ.push_back(vobj); @@ -1680,8 +1747,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj) void LLPipeline::createObjects(F32 max_dtime) { - LLFastTimer ftm(FTM_GEO_UPDATE); - LLMemType mt(LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS); + LLFastTimer ftm(FTM_PIPELINE_CREATE); LLTimer update_timer; @@ -1841,6 +1907,10 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list) drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED); if (done) { + if (drawablep->isRoot()) + { + drawablep->makeStatic(); + } drawablep->clearState(LLDrawable::ON_MOVE_LIST); if (drawablep->isState(LLDrawable::ANIMATED_CHILD)) { //will likely not receive any future world matrix updates @@ -1863,7 +1933,6 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_MOVE("Update Move"); void LLPipeline::updateMove() { LLFastTimer t(FTM_UPDATE_MOVE); - LLMemType mt_um(LLMemType::MTYPE_PIPELINE_UPDATE_MOVE); if (FreezeTime) { @@ -1972,11 +2041,12 @@ void LLPipeline::grabReferences(LLCullResult& result) void LLPipeline::clearReferences() { sCull = NULL; + mGroupSaveQ1.clear(); } void check_references(LLSpatialGroup* group, LLDrawable* drawable) { - for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i) + for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { if (drawable == *i) { @@ -1998,7 +2068,7 @@ void check_references(LLDrawable* drawable, LLFace* face) void check_references(LLSpatialGroup* group, LLFace* face) { - for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i) + for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawable = *i; check_references(drawable, face); @@ -2010,25 +2080,25 @@ void LLPipeline::checkReferences(LLFace* face) #if 0 if (sCull) { - for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) { LLSpatialGroup* group = *iter; check_references(group, face); } - for (LLCullResult::sg_list_t::iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter) { LLSpatialGroup* group = *iter; check_references(group, face); } - for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter) { LLSpatialGroup* group = *iter; check_references(group, face); } - for (LLCullResult::drawable_list_t::iterator iter = sCull->beginVisibleList(); iter != sCull->endVisibleList(); ++iter) + for (LLCullResult::drawable_iterator iter = sCull->beginVisibleList(); iter != sCull->endVisibleList(); ++iter) { LLDrawable* drawable = *iter; check_references(drawable, face); @@ -2042,25 +2112,25 @@ void LLPipeline::checkReferences(LLDrawable* drawable) #if 0 if (sCull) { - for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) { LLSpatialGroup* group = *iter; check_references(group, drawable); } - for (LLCullResult::sg_list_t::iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter) { LLSpatialGroup* group = *iter; check_references(group, drawable); } - for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter) { LLSpatialGroup* group = *iter; check_references(group, drawable); } - for (LLCullResult::drawable_list_t::iterator iter = sCull->beginVisibleList(); iter != sCull->endVisibleList(); ++iter) + for (LLCullResult::drawable_iterator iter = sCull->beginVisibleList(); iter != sCull->endVisibleList(); ++iter) { if (drawable == *iter) { @@ -2093,19 +2163,19 @@ void LLPipeline::checkReferences(LLDrawInfo* draw_info) #if 0 if (sCull) { - for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) { LLSpatialGroup* group = *iter; check_references(group, draw_info); } - for (LLCullResult::sg_list_t::iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter) { LLSpatialGroup* group = *iter; check_references(group, draw_info); } - for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter) { LLSpatialGroup* group = *iter; check_references(group, draw_info); @@ -2119,7 +2189,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group) #if 0 if (sCull) { - for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) { if (group == *iter) { @@ -2127,7 +2197,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group) } } - for (LLCullResult::sg_list_t::iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter) { if (group == *iter) { @@ -2135,7 +2205,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group) } } - for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter) { if (group == *iter) { @@ -2216,7 +2286,6 @@ static LLFastTimer::DeclareTimer FTM_CULL("Object Culling"); void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip, LLPlane* planep) { LLFastTimer t(FTM_CULL); - LLMemType mt_uc(LLMemType::MTYPE_PIPELINE_UPDATE_CULL); grabReferences(result); @@ -2374,7 +2443,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera) { - if (group->getData().empty()) + if (group->isEmpty()) { return; } @@ -2477,7 +2546,7 @@ void LLPipeline::doOcclusion(LLCamera& camera) } mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX); - for (LLCullResult::sg_list_t::iterator iter = sCull->beginOcclusionGroups(); iter != sCull->endOcclusionGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginOcclusionGroups(); iter != sCull->endOcclusionGroups(); ++iter) { LLSpatialGroup* group = *iter; group->doOcclusion(&camera); @@ -2513,14 +2582,19 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority) static LLFastTimer::DeclareTimer FTM_SEED_VBO_POOLS("Seed VBO Pool"); +static LLFastTimer::DeclareTimer FTM_UPDATE_GL("Update GL"); + void LLPipeline::updateGL() { - while (!LLGLUpdate::sGLQ.empty()) { - LLGLUpdate* glu = LLGLUpdate::sGLQ.front(); - glu->updateGL(); - glu->mInQ = FALSE; - LLGLUpdate::sGLQ.pop_front(); + LLFastTimer t(FTM_UPDATE_GL); + while (!LLGLUpdate::sGLQ.empty()) + { + LLGLUpdate* glu = LLGLUpdate::sGLQ.front(); + glu->updateGL(); + glu->mInQ = FALSE; + LLGLUpdate::sGLQ.pop_front(); + } } { //seed VBO Pools @@ -2529,11 +2603,70 @@ void LLPipeline::updateGL() } } +static LLFastTimer::DeclareTimer FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups"); + +void LLPipeline::clearRebuildGroups() +{ + LLSpatialGroup::sg_vector_t hudGroups; + + mGroupQ1Locked = true; + // Iterate through all drawables on the priority build queue, + for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ1.begin(); + iter != mGroupQ1.end(); ++iter) + { + LLSpatialGroup* group = *iter; + + // If the group contains HUD objects, save the group + if (group->isHUDGroup()) + { + hudGroups.push_back(group); + } + // Else, no HUD objects so clear the build state + else + { + group->clearState(LLSpatialGroup::IN_BUILD_Q1); + } + } + + // Clear the group + mGroupQ1.clear(); + + // Copy the saved HUD groups back in + mGroupQ1.assign(hudGroups.begin(), hudGroups.end()); + mGroupQ1Locked = false; + + // Clear the HUD groups + hudGroups.clear(); + + mGroupQ2Locked = true; + for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ2.begin(); + iter != mGroupQ2.end(); ++iter) + { + LLSpatialGroup* group = *iter; + + // If the group contains HUD objects, save the group + if (group->isHUDGroup()) + { + hudGroups.push_back(group); + } + // Else, no HUD objects so clear the build state + else + { + group->clearState(LLSpatialGroup::IN_BUILD_Q2); + } + } + // Clear the group + mGroupQ2.clear(); + + // Copy the saved HUD groups back in + mGroupQ2.assign(hudGroups.begin(), hudGroups.end()); + mGroupQ2Locked = false; +} + void LLPipeline::rebuildPriorityGroups() { + LLFastTimer t(FTM_REBUILD_PRIORITY_GROUPS); LLTimer update_timer; - LLMemType mt(LLMemType::MTYPE_PIPELINE); - assertInitialized(); gMeshRepo.notifyLoadedMeshes(); @@ -2548,11 +2681,14 @@ void LLPipeline::rebuildPriorityGroups() group->clearState(LLSpatialGroup::IN_BUILD_Q1); } + mGroupSaveQ1 = mGroupQ1; mGroupQ1.clear(); mGroupQ1Locked = false; } - + +static LLFastTimer::DeclareTimer FTM_REBUILD_GROUPS("Rebuild Groups"); + void LLPipeline::rebuildGroups() { if (mGroupQ2.empty()) @@ -2560,6 +2696,7 @@ void LLPipeline::rebuildGroups() return; } + LLFastTimer t(FTM_REBUILD_GROUPS); mGroupQ2Locked = true; // Iterate through some drawables on the non-priority build queue S32 size = (S32) mGroupQ2.size(); @@ -2601,7 +2738,6 @@ void LLPipeline::rebuildGroups() void LLPipeline::updateGeom(F32 max_dtime) { LLTimer update_timer; - LLMemType mt(LLMemType::MTYPE_PIPELINE_UPDATE_GEOM); LLPointer<LLDrawable> drawablep; LLFastTimer t(FTM_GEO_UPDATE); @@ -2695,8 +2831,6 @@ void LLPipeline::updateGeom(F32 max_dtime) void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_VISIBLE); - if(drawablep && !drawablep->isDead()) { if (drawablep->isSpatialBridge()) @@ -2736,8 +2870,6 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) { - LLMemType mt_mm(LLMemType::MTYPE_PIPELINE_MARK_MOVED); - if (!drawablep) { //llerrs << "Sending null drawable to moved list!" << llendl; @@ -2782,8 +2914,6 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) void LLPipeline::markShift(LLDrawable *drawablep) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_SHIFT); - if (!drawablep || drawablep->isDead()) { return; @@ -2803,10 +2933,12 @@ void LLPipeline::markShift(LLDrawable *drawablep) } } +static LLFastTimer::DeclareTimer FTM_SHIFT_DRAWABLE("Shift Drawable"); +static LLFastTimer::DeclareTimer FTM_SHIFT_OCTREE("Shift Octree"); +static LLFastTimer::DeclareTimer FTM_SHIFT_HUD("Shift HUD"); + void LLPipeline::shiftObjects(const LLVector3 &offset) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS); - assertInitialized(); glClear(GL_DEPTH_BUFFER_BIT); @@ -2815,42 +2947,51 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) LLVector4a offseta; offseta.load3(offset.mV); - for (LLDrawable::drawable_vector_t::iterator iter = mShiftList.begin(); - iter != mShiftList.end(); iter++) { - LLDrawable *drawablep = *iter; - if (drawablep->isDead()) + LLFastTimer t(FTM_SHIFT_DRAWABLE); + + for (LLDrawable::drawable_vector_t::iterator iter = mShiftList.begin(); + iter != mShiftList.end(); iter++) { - continue; - } - drawablep->shiftPos(offseta); - drawablep->clearState(LLDrawable::ON_SHIFT_LIST); + LLDrawable *drawablep = *iter; + if (drawablep->isDead()) + { + continue; + } + drawablep->shiftPos(offseta); + drawablep->clearState(LLDrawable::ON_SHIFT_LIST); + } + mShiftList.resize(0); } - mShiftList.resize(0); - for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); - iter != LLWorld::getInstance()->getRegionList().end(); ++iter) + { - LLViewerRegion* region = *iter; - for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++) + LLFastTimer t(FTM_SHIFT_OCTREE); + for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); + iter != LLWorld::getInstance()->getRegionList().end(); ++iter) { - LLSpatialPartition* part = region->getSpatialPartition(i); - if (part) + LLViewerRegion* region = *iter; + for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++) { - part->shift(offseta); + LLSpatialPartition* part = region->getSpatialPartition(i); + if (part) + { + part->shift(offseta); + } } } } - LLHUDText::shiftAll(offset); - LLHUDNameTag::shiftAll(offset); + { + LLFastTimer t(FTM_SHIFT_HUD); + LLHUDText::shiftAll(offset); + LLHUDNameTag::shiftAll(offset); + } display_update_camera(); } void LLPipeline::markTextured(LLDrawable *drawablep) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_TEXTURED); - if (drawablep && !drawablep->isDead() && assertInitialized()) { mRetexturedList.insert(drawablep); @@ -2876,8 +3017,10 @@ void LLPipeline::markPartitionMove(LLDrawable* drawable) } } +static LLFastTimer::DeclareTimer FTM_PROCESS_PARTITIONQ("PartitionQ"); void LLPipeline::processPartitionQ() { + LLFastTimer t(FTM_PROCESS_PARTITIONQ); for (LLDrawable::drawable_list_t::iterator iter = mPartitionQ.begin(); iter != mPartitionQ.end(); ++iter) { LLDrawable* drawable = *iter; @@ -2899,8 +3042,6 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group) void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) { - LLMemType mt(LLMemType::MTYPE_PIPELINE); - if (group && !group->isDead() && group->mSpatialPartition) { if (group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_HUD) @@ -2940,8 +3081,6 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, BOOL priority) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_REBUILD); - if (drawablep && !drawablep->isDead() && assertInitialized()) { if (!drawablep->isState(LLDrawable::BUILT)) @@ -2988,12 +3127,11 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } LLFastTimer ftm(FTM_STATESORT); - LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); //LLVertexBuffer::unbind(); grabReferences(result); - for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter) { LLSpatialGroup* group = *iter; group->checkOcclusion(); @@ -3004,7 +3142,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) else { group->setVisible(); - for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i) + for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { markVisible(*i, camera); } @@ -3019,9 +3157,9 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD) { LLSpatialGroup* last_group = NULL; - for (LLCullResult::bridge_list_t::iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i) + for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i) { - LLCullResult::bridge_list_t::iterator cur_iter = i; + LLCullResult::bridge_iterator cur_iter = i; LLSpatialBridge* bridge = *cur_iter; LLSpatialGroup* group = bridge->getSpatialGroup(); @@ -3051,7 +3189,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } } - for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) + for (LLCullResult::sg_iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) { LLSpatialGroup* group = *iter; group->checkOcclusion(); @@ -3073,7 +3211,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) { LLFastTimer ftm(FTM_STATESORT_DRAWABLE); - for (LLCullResult::drawable_list_t::iterator iter = sCull->beginVisibleList(); + for (LLCullResult::drawable_iterator iter = sCull->beginVisibleList(); iter != sCull->endVisibleList(); ++iter) { LLDrawable *drawablep = *iter; @@ -3089,10 +3227,9 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); if (group->changeLOD()) { - for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i) + for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawablep = *i; stateSort(drawablep, camera); @@ -3108,7 +3245,6 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); if (bridge->getSpatialGroup()->changeLOD()) { bool force_update = false; @@ -3118,8 +3254,6 @@ void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera) void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); - if (!drawablep || drawablep->isDead() || !hasRenderType(drawablep->getRenderType())) @@ -3209,13 +3343,13 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) } -void forAllDrawables(LLCullResult::sg_list_t::iterator begin, - LLCullResult::sg_list_t::iterator end, +void forAllDrawables(LLCullResult::sg_iterator begin, + LLCullResult::sg_iterator end, void (*func)(LLDrawable*)) { - for (LLCullResult::sg_list_t::iterator i = begin; i != end; ++i) + for (LLCullResult::sg_iterator i = begin; i != end; ++i) { - for (LLSpatialGroup::element_iter j = (*i)->getData().begin(); j != (*i)->getData().end(); ++j) + for (LLSpatialGroup::element_iter j = (*i)->getDataBegin(); j != (*i)->getDataEnd(); ++j) { func(*j); } @@ -3410,14 +3544,13 @@ void renderSoundHighlights(LLDrawable* drawablep) void LLPipeline::postSort(LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_POST_SORT); LLFastTimer ftm(FTM_STATESORT_POSTSORT); assertInitialized(); llpushcallstacks ; //rebuild drawable geometry - for (LLCullResult::sg_list_t::iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i) + for (LLCullResult::sg_iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i) { LLSpatialGroup* group = *i; if (!sUseOcclusion || @@ -3433,9 +3566,9 @@ void LLPipeline::postSort(LLCamera& camera) rebuildPriorityGroups(); llpushcallstacks ; - + //build render map - for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) + for (LLCullResult::sg_iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) { LLSpatialGroup* group = *i; if (sUseOcclusion && @@ -3505,7 +3638,7 @@ void LLPipeline::postSort(LLCamera& camera) } } } - + //flush particle VB LLVOPartGroup::sVB->flush(); @@ -3662,7 +3795,6 @@ void LLPipeline::postSort(LLCamera& camera) void render_hud_elements() { - LLMemType mt_rhe(LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS); LLFastTimer t(FTM_RENDER_UI); gPipeline.disableLights(); @@ -3717,8 +3849,6 @@ void render_hud_elements() void LLPipeline::renderHighlights() { - LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_HL); - assertInitialized(); // Draw 3D UI elements here (before we clear the Z buffer in POOL_HUD) @@ -3882,7 +4012,6 @@ U32 LLPipeline::sCurRenderPoolType = 0 ; void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_GEOM); LLFastTimer t(FTM_RENDER_GEOMETRY); assertInitialized(); @@ -4135,10 +4264,9 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) { LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomDeferred"); - LLMemType mt_rgd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED); LLFastTimer t(FTM_RENDER_GEOMETRY); - LLFastTimer t2(FTM_POOLS); + LLFastTimer t2(FTM_DEFERRED_POOLS); LLGLEnable cull(GL_CULL_FACE); @@ -4180,7 +4308,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) pool_set_t::iterator iter2 = iter1; if (hasRenderType(poolp->getType()) && poolp->getNumDeferredPasses() > 0) { - LLFastTimer t(FTM_POOLRENDER); + LLFastTimer t(FTM_DEFERRED_POOLRENDER); gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); @@ -4232,8 +4360,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) void LLPipeline::renderGeomPostDeferred(LLCamera& camera) { - LLMemType mt_rgpd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF); - LLFastTimer t(FTM_POOLS); + LLFastTimer t(FTM_POST_DEFERRED_POOLS); U32 cur_type = 0; LLGLEnable cull(GL_CULL_FACE); @@ -4267,7 +4394,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera) pool_set_t::iterator iter2 = iter1; if (hasRenderType(poolp->getType()) && poolp->getNumPostDeferredPasses() > 0) { - LLFastTimer t(FTM_POOLRENDER); + LLFastTimer t(FTM_POST_DEFERRED_POOLRENDER); gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); @@ -4328,7 +4455,6 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera) void LLPipeline::renderGeomShadow(LLCamera& camera) { - LLMemType mt_rgs(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW); U32 cur_type = 0; LLGLEnable cull(GL_CULL_FACE); @@ -4457,7 +4583,7 @@ void LLPipeline::renderPhysicsDisplay() } } - for (LLCullResult::bridge_list_t::const_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i) + for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i) { LLSpatialBridge* bridge = *i; if (!bridge->isDead() && hasRenderType(bridge->mDrawableType)) @@ -4482,8 +4608,6 @@ void LLPipeline::renderPhysicsDisplay() void LLPipeline::renderDebug() { - LLMemType mt(LLMemType::MTYPE_PIPELINE); - assertInitialized(); bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD); @@ -4879,7 +5003,7 @@ void LLPipeline::renderDebug() } } - for (LLCullResult::bridge_list_t::const_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i) + for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i) { LLSpatialBridge* bridge = *i; if (!bridge->isDead() && hasRenderType(bridge->mDrawableType)) @@ -5131,9 +5255,11 @@ void LLPipeline::renderDebug() } } +static LLFastTimer::DeclareTimer FTM_REBUILD_POOLS("Rebuild Pools"); + void LLPipeline::rebuildPools() { - LLMemType mt(LLMemType::MTYPE_PIPELINE_REBUILD_POOLS); + LLFastTimer t(FTM_REBUILD_POOLS); assertInitialized(); @@ -5164,17 +5290,10 @@ void LLPipeline::rebuildPools() } max_count--; } - - if (isAgentAvatarValid()) - { - gAgentAvatarp->rebuildHUD(); - } } void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP); - assertInitialized(); switch( new_poolp->getType() ) @@ -5340,7 +5459,6 @@ void LLPipeline::removePool( LLDrawPool* poolp ) void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp ) { assertInitialized(); - LLMemType mt(LLMemType::MTYPE_PIPELINE); switch( poolp->getType() ) { case LLDrawPool::POOL_SIMPLE: @@ -5656,7 +5774,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera) // crazy cast so that we can overwrite the fade value // even though gcc enforces sets as const // (fade value doesn't affect sort so this is safe) - Light* farthest_light = ((Light*) (&(*(mNearbyLights.rbegin())))); + Light* farthest_light = (const_cast<Light*>(&(*(mNearbyLights.rbegin())))); if (light->dist < farthest_light->dist) { if (farthest_light->fade >= 0.f) @@ -5999,7 +6117,7 @@ void LLPipeline::enableLightsPreview() LLVector4 light_pos(dir0, 0.0f); - LLLightState* light = gGL.getLight(0); + LLLightState* light = gGL.getLight(1); light->enable(); light->setPosition(light_pos); @@ -6011,7 +6129,7 @@ void LLPipeline::enableLightsPreview() light_pos = LLVector4(dir1, 0.f); - light = gGL.getLight(1); + light = gGL.getLight(2); light->enable(); light->setPosition(light_pos); light->setDiffuse(diffuse1); @@ -6021,7 +6139,7 @@ void LLPipeline::enableLightsPreview() light->setSpotCutoff(180.f); light_pos = LLVector4(dir2, 0.f); - light = gGL.getLight(2); + light = gGL.getLight(3); light->enable(); light->setPosition(light_pos); light->setDiffuse(diffuse2); @@ -6681,23 +6799,26 @@ void LLPipeline::resetVertexBuffers(LLDrawable* drawable) LLFace* facep = drawable->getFace(i); if (facep) { - facep->clearVertexBuffer(); + facep->clearVertexBuffer(); + } } } -} void LLPipeline::resetVertexBuffers() -{ +{ mResetVertexBuffers = true; } +static LLFastTimer::DeclareTimer FTM_RESET_VB("Reset VB"); + void LLPipeline::doResetVertexBuffers() { if (!mResetVertexBuffers) { return; } - + + LLFastTimer t(FTM_RESET_VB); mResetVertexBuffers = false; mCubeVB = NULL; @@ -6720,6 +6841,8 @@ void LLPipeline::doResetVertexBuffers() gSky.resetVertexBuffers(); + LLVOPartGroup::destroyGL(); + if ( LLPathingLib::getInstance() ) { LLPathingLib::getInstance()->cleanupVBOManager(); @@ -6758,7 +6881,6 @@ void LLPipeline::doResetVertexBuffers() void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture) { - LLMemType mt_ro(LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS); assertInitialized(); gGL.loadMatrix(gGLModelView); gGLLastMatrix = NULL; @@ -6831,7 +6953,6 @@ static LLFastTimer::DeclareTimer FTM_RENDER_BLOOM("Bloom"); void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) { - LLMemType mt_ru(LLMemType::MTYPE_PIPELINE_RENDER_BLOOM); if (!(gPipeline.canUseVertexShaders() && sRenderGlow)) { @@ -6983,11 +7104,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) gGlowProgram.unbind(); - if (LLRenderTarget::sUseFBO) + /*if (LLRenderTarget::sUseFBO) { LLFastTimer ftm(FTM_RENDER_BLOOM_FBO); glBindFramebuffer(GL_FRAMEBUFFER, 0); - } + }*/ gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft; gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom; @@ -7054,15 +7175,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) } else { - LLViewerObject* obj = gAgentCamera.getFocusObject(); - if (obj) - { //focus on alt-zoom target - focus_point = LLVector3(gAgentCamera.getFocusGlobal()-gAgent.getRegion()->getOriginGlobal()); - } - else - { //focus on your avatar - focus_point = gAgent.getPositionAgent(); - } + //focus on alt-zoom target + focus_point = LLVector3(gAgentCamera.getFocusGlobal()-gAgent.getRegion()->getOriginGlobal()); } } @@ -7563,7 +7677,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n for (U32 i = 0; i < 4; i++) { - channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE); + channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_TEXTURE); stop_glerror(); if (channel > -1) { @@ -7573,8 +7687,8 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n gGL.getTexUnit(channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); stop_glerror(); - glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB); - glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL); stop_glerror(); } } @@ -7654,13 +7768,13 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n matrix_nondiag, matrix_nondiag, matrix_diag}; shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_SSAO_EFFECT_MAT, 1, GL_FALSE, ssao_effect_mat); - F32 shadow_offset_error = 1.f + RenderShadowOffsetError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]); - F32 shadow_bias_error = 1.f + RenderShadowBiasError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]); + //F32 shadow_offset_error = 1.f + RenderShadowOffsetError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]); + F32 shadow_bias_error = RenderShadowBiasError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2])/3000.f; shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, mDeferredScreen.getWidth(), mDeferredScreen.getHeight()); shader.uniform1f(LLShaderMgr::DEFERRED_NEAR_CLIP, LLViewerCamera::getInstance()->getNear()*2.f); - shader.uniform1f (LLShaderMgr::DEFERRED_SHADOW_OFFSET, RenderShadowOffset*shadow_offset_error); - shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_BIAS, RenderShadowBias*shadow_bias_error); + shader.uniform1f (LLShaderMgr::DEFERRED_SHADOW_OFFSET, RenderShadowOffset); //*shadow_offset_error); + shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_BIAS, RenderShadowBias+shadow_bias_error); shader.uniform1f(LLShaderMgr::DEFERRED_SPOT_SHADOW_OFFSET, RenderSpotShadowOffset); shader.uniform1f(LLShaderMgr::DEFERRED_SPOT_SHADOW_BIAS, RenderSpotShadowBias); @@ -7870,10 +7984,6 @@ void LLPipeline::renderDeferredLighting() gGL.popMatrix(); stop_glerror(); - //copy depth and stencil from deferred screen - //mScreen.copyContents(mDeferredScreen, 0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight(), - // 0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST); - mScreen.bindTarget(); // clear color buffer here - zeroing alpha (glow) is important or it will accumulate against sky glClearColor(0,0,0,0); @@ -7951,7 +8061,7 @@ void LLPipeline::renderDeferredLighting() } mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX); - + LLGLDepthTest depth(GL_TRUE, GL_FALSE); for (LLDrawable::drawable_set_t::iterator iter = mLights.begin(); iter != mLights.end(); ++iter) { @@ -7997,7 +8107,7 @@ void LLPipeline::renderDeferredLighting() } sVisibleLightCount++; - + if (camera->getOrigin().mV[0] > c[0] + s + 0.2f || camera->getOrigin().mV[0] < c[0] - s - 0.2f || camera->getOrigin().mV[1] > c[1] + s + 0.2f || @@ -8384,9 +8494,9 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader) for (U32 i = 0; i < 4; i++) { - if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE) > -1) + if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i) > -1) { - glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE); } } @@ -8645,8 +8755,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) } last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate; - LLRenderTarget::unbindTarget(); - LLPipeline::sReflectionRender = FALSE; if (!LLRenderTarget::sUseFBO) @@ -8803,6 +8911,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera gGL.setColorMask(false, false); LLFastTimer ftm(FTM_SHADOW_SIMPLE); + gGL.getTexUnit(0)->disable(); for (U32 i = 0; i < sizeof(types)/sizeof(U32); ++i) { @@ -9122,6 +9231,8 @@ void LLPipeline::generateHighlight(LLCamera& camera) } +static LLFastTimer::DeclareTimer FTM_GEN_SUN_SHADOW("Gen Sun Shadow"); + void LLPipeline::generateSunShadow(LLCamera& camera) { if (!sRenderDeferred || RenderShadowDetail <= 0) @@ -9129,6 +9240,8 @@ void LLPipeline::generateSunShadow(LLCamera& camera) return; } + LLFastTimer t(FTM_GEN_SUN_SHADOW); + BOOL skip_avatar_update = FALSE; if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson) { @@ -9878,7 +9991,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture) { - for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) + for (LLCullResult::sg_iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) { LLSpatialGroup* group = *i; if (!group->isDead() && @@ -9891,9 +10004,14 @@ void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL textu } } +static LLFastTimer::DeclareTimer FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible"); +static LLFastTimer::DeclareTimer FTM_IMPOSTOR_SETUP("Impostor Setup"); +static LLFastTimer::DeclareTimer FTM_IMPOSTOR_BACKGROUND("Impostor Background"); +static LLFastTimer::DeclareTimer FTM_IMPOSTOR_ALLOCATE("Impostor Allocate"); +static LLFastTimer::DeclareTimer FTM_IMPOSTOR_RESIZE("Impostor Resize"); + void LLPipeline::generateImpostor(LLVOAvatar* avatar) { - LLMemType mt_gi(LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR); LLGLState::checkStates(); LLGLState::checkTextureChannels(); LLGLState::checkClientArrays(); @@ -9946,101 +10064,114 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) sImpostorRender = TRUE; LLViewerCamera* viewer_camera = LLViewerCamera::getInstance(); - markVisible(avatar->mDrawable, *viewer_camera); - LLVOAvatar::sUseImpostors = FALSE; - LLVOAvatar::attachment_map_t::iterator iter; - for (iter = avatar->mAttachmentPoints.begin(); - iter != avatar->mAttachmentPoints.end(); - ++iter) { - LLViewerJointAttachment *attachment = iter->second; - for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); - attachment_iter != attachment->mAttachedObjects.end(); - ++attachment_iter) + LLFastTimer t(FTM_IMPOSTOR_MARK_VISIBLE); + markVisible(avatar->mDrawable, *viewer_camera); + LLVOAvatar::sUseImpostors = FALSE; + + LLVOAvatar::attachment_map_t::iterator iter; + for (iter = avatar->mAttachmentPoints.begin(); + iter != avatar->mAttachmentPoints.end(); + ++iter) { - if (LLViewerObject* attached_object = (*attachment_iter)) + LLViewerJointAttachment *attachment = iter->second; + for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); + attachment_iter != attachment->mAttachedObjects.end(); + ++attachment_iter) { - markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera); + if (LLViewerObject* attached_object = (*attachment_iter)) + { + markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera); + } } } } stateSort(*LLViewerCamera::getInstance(), result); - const LLVector4a* ext = avatar->mDrawable->getSpatialExtents(); - LLVector3 pos(avatar->getRenderPosition()+avatar->getImpostorOffset()); - LLCamera camera = *viewer_camera; - - camera.lookAt(viewer_camera->getOrigin(), pos, viewer_camera->getUpAxis()); - LLVector2 tdim; + U32 resY = 0; + U32 resX = 0; + { + LLFastTimer t(FTM_IMPOSTOR_SETUP); + const LLVector4a* ext = avatar->mDrawable->getSpatialExtents(); + LLVector3 pos(avatar->getRenderPosition()+avatar->getImpostorOffset()); - LLVector4a half_height; - half_height.setSub(ext[1], ext[0]); - half_height.mul(0.5f); + camera.lookAt(viewer_camera->getOrigin(), pos, viewer_camera->getUpAxis()); + + LLVector4a half_height; + half_height.setSub(ext[1], ext[0]); + half_height.mul(0.5f); - LLVector4a left; - left.load3(camera.getLeftAxis().mV); - left.mul(left); - left.normalize3fast(); + LLVector4a left; + left.load3(camera.getLeftAxis().mV); + left.mul(left); + left.normalize3fast(); - LLVector4a up; - up.load3(camera.getUpAxis().mV); - up.mul(up); - up.normalize3fast(); + LLVector4a up; + up.load3(camera.getUpAxis().mV); + up.mul(up); + up.normalize3fast(); - tdim.mV[0] = fabsf(half_height.dot3(left).getF32()); - tdim.mV[1] = fabsf(half_height.dot3(up).getF32()); + tdim.mV[0] = fabsf(half_height.dot3(left).getF32()); + tdim.mV[1] = fabsf(half_height.dot3(up).getF32()); - gGL.matrixMode(LLRender::MM_PROJECTION); - gGL.pushMatrix(); + gGL.matrixMode(LLRender::MM_PROJECTION); + gGL.pushMatrix(); - F32 distance = (pos-camera.getOrigin()).length(); - F32 fov = atanf(tdim.mV[1]/distance)*2.f*RAD_TO_DEG; - F32 aspect = tdim.mV[0]/tdim.mV[1]; - glh::matrix4f persp = gl_perspective(fov, aspect, 1.f, 256.f); - glh_set_current_projection(persp); - gGL.loadMatrix(persp.m); + F32 distance = (pos-camera.getOrigin()).length(); + F32 fov = atanf(tdim.mV[1]/distance)*2.f*RAD_TO_DEG; + F32 aspect = tdim.mV[0]/tdim.mV[1]; + glh::matrix4f persp = gl_perspective(fov, aspect, 1.f, 256.f); + glh_set_current_projection(persp); + gGL.loadMatrix(persp.m); - gGL.matrixMode(LLRender::MM_MODELVIEW); - gGL.pushMatrix(); - glh::matrix4f mat; - camera.getOpenGLTransform(mat.m); + gGL.matrixMode(LLRender::MM_MODELVIEW); + gGL.pushMatrix(); + glh::matrix4f mat; + camera.getOpenGLTransform(mat.m); - mat = glh::matrix4f((GLfloat*) OGL_TO_CFR_ROTATION) * mat; + mat = glh::matrix4f((GLfloat*) OGL_TO_CFR_ROTATION) * mat; - gGL.loadMatrix(mat.m); - glh_set_current_modelview(mat); + gGL.loadMatrix(mat.m); + glh_set_current_modelview(mat); - glClearColor(0.0f,0.0f,0.0f,0.0f); - gGL.setColorMask(true, true); + glClearColor(0.0f,0.0f,0.0f,0.0f); + gGL.setColorMask(true, true); - // get the number of pixels per angle - F32 pa = gViewerWindow->getWindowHeightRaw() / (RAD_TO_DEG * viewer_camera->getView()); + // get the number of pixels per angle + F32 pa = gViewerWindow->getWindowHeightRaw() / (RAD_TO_DEG * viewer_camera->getView()); - //get resolution based on angle width and height of impostor (double desired resolution to prevent aliasing) - U32 resY = llmin(nhpo2((U32) (fov*pa)), (U32) 512); - U32 resX = llmin(nhpo2((U32) (atanf(tdim.mV[0]/distance)*2.f*RAD_TO_DEG*pa)), (U32) 512); + //get resolution based on angle width and height of impostor (double desired resolution to prevent aliasing) + resY = llmin(nhpo2((U32) (fov*pa)), (U32) 512); + resX = llmin(nhpo2((U32) (atanf(tdim.mV[0]/distance)*2.f*RAD_TO_DEG*pa)), (U32) 512); - if (!avatar->mImpostor.isComplete() || resX != avatar->mImpostor.getWidth() || - resY != avatar->mImpostor.getHeight()) - { - avatar->mImpostor.allocate(resX,resY,GL_RGBA,TRUE,FALSE); + if (!avatar->mImpostor.isComplete()) + { + LLFastTimer t(FTM_IMPOSTOR_ALLOCATE); + avatar->mImpostor.allocate(resX,resY,GL_RGBA,TRUE,FALSE); + + if (LLPipeline::sRenderDeferred) + { + addDeferredAttachments(avatar->mImpostor); + } - if (LLPipeline::sRenderDeferred) + gGL.getTexUnit(0)->bind(&avatar->mImpostor); + gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + } + else if(resX != avatar->mImpostor.getWidth() || + resY != avatar->mImpostor.getHeight()) { - addDeferredAttachments(avatar->mImpostor); + LLFastTimer t(FTM_IMPOSTOR_RESIZE); + avatar->mImpostor.resize(resX,resY,GL_RGBA); } - - gGL.getTexUnit(0)->bind(&avatar->mImpostor); - gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - } - avatar->mImpostor.bindTarget(); + avatar->mImpostor.bindTarget(); + } if (LLPipeline::sRenderDeferred) { @@ -10057,6 +10188,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) } { //create alpha mask based on depth buffer (grey out if muted) + LLFastTimer t(FTM_IMPOSTOR_BACKGROUND); if (LLPipeline::sRenderDeferred) { GLuint buff = GL_COLOR_ATTACHMENT0; @@ -10142,22 +10274,22 @@ BOOL LLPipeline::hasRenderBatches(const U32 type) const return sCull->getRenderMapSize(type) > 0; } -LLCullResult::drawinfo_list_t::iterator LLPipeline::beginRenderMap(U32 type) +LLCullResult::drawinfo_iterator LLPipeline::beginRenderMap(U32 type) { return sCull->beginRenderMap(type); } -LLCullResult::drawinfo_list_t::iterator LLPipeline::endRenderMap(U32 type) +LLCullResult::drawinfo_iterator LLPipeline::endRenderMap(U32 type) { return sCull->endRenderMap(type); } -LLCullResult::sg_list_t::iterator LLPipeline::beginAlphaGroups() +LLCullResult::sg_iterator LLPipeline::beginAlphaGroups() { return sCull->beginAlphaGroups(); } -LLCullResult::sg_list_t::iterator LLPipeline::endAlphaGroups() +LLCullResult::sg_iterator LLPipeline::endAlphaGroups() { return sCull->endAlphaGroups(); } diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index ef1fd3279d..36abeca295 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -119,8 +119,25 @@ public: void createGLBuffers(); void createLUTBuffers(); - void allocateScreenBuffer(U32 resX, U32 resY); + //allocate the largest screen buffer possible up to resX, resY + //returns true if full size buffer allocated, false if some other size is allocated + bool allocateScreenBuffer(U32 resX, U32 resY); + + typedef enum { + FBO_SUCCESS_FULLRES = 0, + FBO_SUCCESS_LOWRES, + FBO_FAILURE + } eFBOStatus; + +private: + //implementation of above, wrapped for easy error handling + eFBOStatus doAllocateScreenBuffer(U32 resX, U32 resY); +public: + + //attempt to allocate screen buffers at resX, resY + //returns true if allocation successful, false otherwise bool allocateScreenBuffer(U32 resX, U32 resY, U32 samples); + void allocatePhysicsBuffer(); void resetVertexBuffers(LLDrawable* drawable); @@ -151,6 +168,8 @@ public: void unlinkDrawable(LLDrawable*); + static void removeMutedAVsLights(LLVOAvatar*); + // Object related methods void markVisible(LLDrawable *drawablep, LLCamera& camera); void markOccluder(LLSpatialGroup* group); @@ -223,6 +242,7 @@ public: void updateGL(); void rebuildPriorityGroups(); void rebuildGroups(); + void clearRebuildGroups(); //calculate pixel area of given box from vantage point of given camera static F32 calcPixelArea(LLVector3 center, LLVector3 size, LLCamera& camera); @@ -294,10 +314,10 @@ public: void setLight(LLDrawable *drawablep, BOOL is_light); BOOL hasRenderBatches(const U32 type) const; - LLCullResult::drawinfo_list_t::iterator beginRenderMap(U32 type); - LLCullResult::drawinfo_list_t::iterator endRenderMap(U32 type); - LLCullResult::sg_list_t::iterator beginAlphaGroups(); - LLCullResult::sg_list_t::iterator endAlphaGroups(); + LLCullResult::drawinfo_iterator beginRenderMap(U32 type); + LLCullResult::drawinfo_iterator endRenderMap(U32 type); + LLCullResult::sg_iterator beginAlphaGroups(); + LLCullResult::sg_iterator endAlphaGroups(); void addTrianglesDrawn(S32 index_count, U32 render_type = LLRender::TRIANGLES); @@ -382,6 +402,7 @@ private: BOOL updateDrawableGeom(LLDrawable* drawable, BOOL priority); void assertInitializedDoError(); bool assertInitialized() { const bool is_init = isInit(); if (!is_init) assertInitializedDoError(); return is_init; }; + void connectRefreshCachedSettingsSafe(const std::string name); void hideDrawable( LLDrawable *pDrawable ); void unhideDrawable( LLDrawable *pDrawable ); public: @@ -664,6 +685,8 @@ protected: LLSpatialGroup::sg_vector_t mGroupQ1; //priority LLSpatialGroup::sg_vector_t mGroupQ2; // non-priority + LLSpatialGroup::sg_vector_t mGroupSaveQ1; // a place to save mGroupQ1 until it is safe to unref + LLSpatialGroup::sg_vector_t mMeshDirtyGroup; //groups that need rebuildMesh called U32 mMeshDirtyQueryObject; diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 9bf2922033..0de217fc0d 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -1,103 +1,106 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <colors> - <!-- Named Colors --> - <color - name="EmphasisColor" - value="0.38 0.694 0.573 1" /> - <color - name="EmphasisColor_13" - value="0.38 0.694 0.573 0.13" /> - <color - name="EmphasisColor_35" - value="0.38 0.694 0.573 0.35" /> - <color - name="White" - value="1 1 1 1" /> - <color - name="White_05" - value="1 1 1 0.05" /> - <color - name="White_10" - value="1 1 1 0.1" /> - <color - name="White_25" - value="1 1 1 0.25" /> - <color - name="White_50" - value="1 1 1 0.5" /> - <color - name="LtGray" - value="0.75 0.75 0.75 1" /> - <color - name="LtGray_35" - value="0.75 0.75 0.75 0.35" /> - <color - name="LtGray_50" - value="0.75 0.75 0.75 0.50" /> - <color - name="Gray" - value="0.5 0.5 0.5 1" /> - <color - name="DkGray" - value="0.125 0.125 0.125 1" /> - <color - name="DkGray_66" - value="0.125 0.125 0.125 .66" /> - <color - name="DkGray2" - value="0.169 0.169 0.169 1" /> - <color - name="MouseGray" - value="0.191 0.191 0.191 1" /> - <color - name="Black" - value="0 0 0 1" /> - <colork - name="Black_10" - value="0 0 0 0.1" /> - <color - name="Black_25" - value="0 0 0 0.25" /> - <color - name="Black_50" - value="0 0 0 0.5" /> - <color - name="FrogGreen" - value="0.26 0.345 0.263 1" /> - <color - name="Red" - value="1 0 0 1" /> - <color - name="Blue" - value="0 0 1 1" /> - <color - name="Yellow" - value="1 1 0 1" /> - <color - name="Green" - value="0 1 0 1" /> - <color - name="Transparent" - value="0 0 0 0" /> - <color - name="Purple" - value="1 0 1 1" /> - <color - name="Lime" - value=".8 1 .73 1" /> - <color - name="LtYellow" - value="1 1 .79 1" /> - <color - name="DrYellow" - value="1 0.86 0 1" /> - <color - name="LtOrange" - value="1 .85 .73 1" /> - <color - name="MdBlue" - value=".07 .38 .51 1" /> + <!-- Named Colors --> + <color + name="EmphasisColor" + value="0.38 0.694 0.573 1" /> + <color + name="EmphasisColor_13" + value="0.38 0.694 0.573 0.13" /> + <color + name="EmphasisColor_35" + value="0.38 0.694 0.573 0.35" /> + <color + name="BeaconColor" + value="0.749 0.298 0 1" /> + <color + name="White" + value="1 1 1 1" /> + <color + name="White_05" + value="1 1 1 0.05" /> + <color + name="White_10" + value="1 1 1 0.1" /> + <color + name="White_25" + value="1 1 1 0.25" /> + <color + name="White_50" + value="1 1 1 0.5" /> + <color + name="LtGray" + value="0.75 0.75 0.75 1" /> + <color + name="LtGray_35" + value="0.75 0.75 0.75 0.35" /> + <color + name="LtGray_50" + value="0.75 0.75 0.75 0.50" /> + <color + name="Gray" + value="0.5 0.5 0.5 1" /> + <color + name="DkGray" + value="0.125 0.125 0.125 1" /> + <color + name="DkGray_66" + value="0.125 0.125 0.125 .66" /> + <color + name="DkGray2" + value="0.169 0.169 0.169 1" /> + <color + name="MouseGray" + value="0.191 0.191 0.191 1" /> + <color + name="Black" + value="0 0 0 1" /> + <colork + name="Black_10" + value="0 0 0 0.1" /> + <color + name="Black_25" + value="0 0 0 0.25" /> + <color + name="Black_50" + value="0 0 0 0.5" /> + <color + name="FrogGreen" + value="0.26 0.345 0.263 1" /> + <color + name="Red" + value="1 0 0 1" /> + <color + name="Blue" + value="0 0 1 1" /> + <color + name="Yellow" + value="1 1 0 1" /> + <color + name="Green" + value="0 1 0 1" /> + <color + name="Transparent" + value="0 0 0 0" /> + <color + name="Purple" + value="1 0 1 1" /> + <color + name="Lime" + value=".8 1 .73 1" /> + <color + name="LtYellow" + value="1 1 .79 1" /> + <color + name="DrYellow" + value="1 0.86 0 1" /> + <color + name="LtOrange" + value="1 .85 .73 1" /> + <color + name="MdBlue" + value=".07 .38 .51 1" /> <color name="LtRed" value="1 0.2 0.2 1" /> @@ -115,527 +118,530 @@ value="0 0 1 0.8" /> <!-- This color name makes potentially unused colors show up bright purple. - Leave this here until all Unused? are removed below, otherwise - the viewer generates many warnings on startup. --> + Leave this here until all Unused? are removed below, otherwise + the viewer generates many warnings on startup. --> <color - name="Unused?" - value=".831 1 0 1" /> + name="Unused?" + value=".831 1 0 1" /> <!-- UI Definitions --> - <color - name="AccordionHeaderTextColor" - reference="LtGray" /> - <color - name="AgentChatColor" - reference="White" /> - <color - name="AlertBoxColor" - value="0.24 0.24 0.24 1" /> - <color - name="AlertCautionBoxColor" - value="1 0.82 0.46 1" /> - <color - name="AlertCautionTextColor" - reference="LtYellow" /> - <color - name="AvatarListItemIconDefaultColor" - reference="White" /> - <color - name="AvatarListItemIconOnlineColor" - reference="White" /> - <color - name="AvatarListItemIconOfflineColor" - value="0.5 0.5 0.5 0.5" /> - <color - name="AvatarListItemIconVoiceInvitedColor" - reference="AvatarListItemIconOfflineColor" /> - <color - name="AvatarListItemIconVoiceJoinedColor" - reference="AvatarListItemIconOnlineColor" /> - <color - name="AvatarListItemIconVoiceLeftColor" - reference="AvatarListItemIconOfflineColor" /> - <color - name="BadgeImageColor" - value="1.0 0.40 0.0 1.0" /> - <color - name="BadgeBorderColor" - value="0.9 0.9 0.9 1.0" /> - <color - name="BadgeLabelColor" - reference="White" /> - <color - name="ButtonBorderColor" - reference="Unused?" /> - <color - name="ButtonCautionImageColor" - reference="Unused?" /> - <color - name="ButtonColor" - reference="Unused?" /> - <color - name="ButtonFlashBgColor" - reference="Unused?" /> - <color - name="ButtonImageColor" - reference="White" /> - <color - name="ButtonLabelColor" - reference="LtGray" /> - <color - name="ButtonLabelDisabledColor" - reference="White_25" /> - <color - name="ButtonLabelSelectedColor" - reference="White" /> - <color - name="ButtonLabelSelectedDisabledColor" - reference="White_25" /> - <color - name="ButtonSelectedBgColor" - reference="Unused?" /> - <color - name="ButtonSelectedColor" - reference="Unused?" /> - <color - name="ButtonUnselectedBgColor" - reference="Unused?" /> - <color - name="ButtonUnselectedFgColor" - reference="Unused?" /> - <color - name="ChatHistoryBgColor" - reference="Transparent" /> - <color - name="ChatHistoryTextColor" - reference="LtGray" /> - <color - name="ChicletFlashColor" - value="0.114 0.65 0.1" /> - <color - name="ColorDropShadow" - reference="Black_50" /> - <color - name="ColorPaletteEntry01" - reference="Black" /> - <color - name="ColorPaletteEntry02" - reference="Gray" /> - <color - name="ColorPaletteEntry03" - value="0.5 0 0 1" /> - <color - name="ColorPaletteEntry04" - value="0.5 0.5 0 1" /> - <color - name="ColorPaletteEntry05" - value="0 0.5 0 1" /> - <color - name="ColorPaletteEntry06" - value="0 0.5 0.5 1" /> - <color - name="ColorPaletteEntry07" - value="0 0 0.5 1" /> - <color - name="ColorPaletteEntry08" - value="0.5 0 0.5 1" /> - <color - name="ColorPaletteEntry09" - value="0.5 0.5 0 1" /> - <color - name="ColorPaletteEntry10" - value="0 0.25 0.25 1" /> - <color - name="ColorPaletteEntry11" - value="0 0.5 1 1" /> - <color - name="ColorPaletteEntry12" - value="0 0.25 0.5 1" /> - <color - name="ColorPaletteEntry13" - value="0.5 0 1 1" /> - <color - name="ColorPaletteEntry14" - value="0.5 0.25 0 1" /> - <color - name="ColorPaletteEntry15" - reference="White" /> - <color - name="ColorPaletteEntry16" - reference="LtYellow" /> - <color - name="ColorPaletteEntry17" - reference="White" /> - <color - name="ColorPaletteEntry18" - reference="LtGray" /> - <color - name="ColorPaletteEntry19" - reference="Red" /> - <color - name="ColorPaletteEntry20" - reference="Yellow" /> - <color - name="ColorPaletteEntry21" - reference="Green" /> - <color - name="ColorPaletteEntry22" - value="0 1 1 1" /> - <color - name="ColorPaletteEntry23" - reference="Blue" /> - <color - name="ColorPaletteEntry24" - reference="Purple" /> - <color - name="ColorPaletteEntry25" - value="1 1 0.5 1" /> - <color - name="ColorPaletteEntry26" - value="0 1 0.5 1" /> - <color - name="ColorPaletteEntry27" - value="0.5 1 1 1" /> - <color - name="ColorPaletteEntry28" - value="0.5 0.5 1 1" /> - <color - name="ColorPaletteEntry29" - value="1 0 0.5 1" /> - <color - name="ColorPaletteEntry30" - value="1 0.5 0 1" /> - <color - name="ColorPaletteEntry31" - reference="White" /> - <color - name="ColorPaletteEntry32" - reference="White" /> - <color - name="ComboListBgColor" - reference="DkGray" /> - <color - name="ConsoleBackground" - reference="Black" /> - <color - name="ContextSilhouetteColor" - reference="EmphasisColor" /> - <color - name="DefaultHighlightDark" - reference="White_10" /> - <color - name="DefaultHighlightLight" - reference="White_25" /> - <color - name="DefaultShadowDark" - reference="Black_50" /> - <color - name="DefaultShadowLight" - reference="Black_50" /> - <color - name="EffectColor" - reference="White" /> - <color - name="FilterBackgroundColor" - reference="Black" /> - <color - name="FilterTextColor" - value="0.38 0.69 0.57 1" /> - <color - name="FloaterButtonImageColor" - reference="LtGray" /> - <color - name="FloaterDefaultBackgroundColor" - reference="DkGray_66" /> - <color - name="FloaterFocusBackgroundColor" - reference="DkGray2" /> - <color - name="FloaterFocusBorderColor" - reference="Black_50" /> - <color - name="FloaterUnfocusBorderColor" - reference="Black_50" /> - <color - name="FocusColor" - reference="EmphasisColor" /> - <color - name="FolderViewLoadingMessageTextColor" - value="0.3344 0.5456 0.5159 1" /> - <color - name="GridFocusPointColor" - reference="White_50" /> - <color - name="GridlineBGColor" - value="0.92 0.92 1 0.78" /> - <color - name="GridlineColor" - reference="White" /> - <color - name="GridlineShadowColor" - value="0 0 0 0.31" /> - <color - name="GroupNotifyBoxColor" - value="0.3344 0.5456 0.5159 1" /> - <color - name="GroupNotifyTextColor" - reference="White"/> - <color - name="GroupNotifyDimmedTextColor" - reference="LtGray" /> - <color - name="GroupOverTierColor" - value="0.43 0.06 0.06 1" /> - <color - name="HTMLLinkColor" - reference="EmphasisColor" /> - <color - name="HealthTextColor" - reference="White" /> - <color - name="HelpBgColor" - reference="Unused?" /> - <color - name="HelpFgColor" - reference="Unused?" /> - <color - name="HelpScrollHighlightColor" - reference="Unused?" /> - <color - name="HelpScrollShadowColor" - reference="Unused?" /> - <color - name="HelpScrollThumbColor" - reference="Unused?" /> - <color - name="HelpScrollTrackColor" - reference="Unused?" /> - <color - name="HighlightChildColor" - reference="Yellow" /> - <color - name="HighlightInspectColor" - value="1 0 1 1" /> - <color - name="HighlightParentColor" - value="0.67 0.83 0.96 1" /> - <color - name="IMHistoryBgColor" - reference="Unused?" /> - <color - name="IMHistoryTextColor" - reference="Unused?" /> - <color - name="IconDisabledColor" - reference="White_25" /> - <color - name="IconEnabledColor" - reference="White" /> - <color - name="InventoryBackgroundColor" - reference="DkGray2" /> - <color - name="InventoryFocusOutlineColor" - reference="White_25" /> - <color - name="InventoryItemSuffixColor" - reference="White_25" /> - <color - name="InventoryItemLibraryColor" - reference="EmphasisColor" /> - <color - name="InventoryItemLinkColor" - reference="LtGray_50" /> - <color - name="InventoryMouseOverColor" - reference="LtGray_35" /> - <color - name="InventorySearchStatusColor" - reference="EmphasisColor" /> - <color - name="LabelDisabledColor" - reference="White_25" /> - <color - name="LabelSelectedColor" - reference="White" /> - <color - name="LabelSelectedDisabledColor" - reference="White_25" /> - <color - name="LabelTextColor" - reference="LtGray" /> - <color - name="LoginProgressBarBgColor" - reference="Unused?" /> - <color - name="LoginProgressBarFgColor" - reference="Unused?" /> - <color - name="LoginProgressBoxBorderColor" - value="0 0.12 0.24 0" /> - <color - name="LoginProgressBoxCenterColor" - value="0 0 0 0.78" /> - <color - name="LoginProgressBoxShadowColor" - value="0 0 0 0.78" /> - <color - name="LoginProgressBoxTextColor" - reference="White" /> - <color - name="MapAvatarColor" - reference="Green" /> - <color - name="MapAvatarFriendColor" - reference="Yellow" /> - <color - name="MapAvatarSelfColor" - value="0.53125 0 0.498047 1" /> - <color - name="MapFrustumColor" - reference="White_10" /> - <color - name="MapFrustumRotatingColor" - value="1 1 1 0.2" /> - <color - name="MapTrackColor" - reference="Red" /> - <color - name="MapTrackDisabledColor" - value="0.5 0 0 1" /> - <color - name="MenuBarBgColor" - reference="DkGray" /> - <color - name="MenuBarGodBgColor" - reference="FrogGreen" /> - <color - name="MenuDefaultBgColor" - reference="DkGray2" /> - <color - name="MenuItemDisabledColor" - reference="LtGray_50" /> - <color - name="MenuItemEnabledColor" - reference="LtGray" /> - <color - name="MenuItemHighlightBgColor" - reference="EmphasisColor_35" /> - <color - name="MenuItemHighlightFgColor" - reference="White" /> - <color - name="MenuNonProductionBgColor" - reference="Black" /> - <color - name="MenuNonProductionGodBgColor" - value="0.263 0.325 0.345 1" /> - <color - name="MenuPopupBgColor" - reference="DkGray2" /> - <color - name="ModelUploaderLabels" - value="1 0.6 0 1" /> - <color - name="MultiSliderDisabledThumbColor" - reference="Black" /> - <color - name="MultiSliderThumbCenterColor" - reference="White" /> - <color - name="MultiSliderThumbCenterSelectedColor" - reference="Green" /> - <color - name="MultiSliderThumbOutlineColor" - reference="Unused?" /> - <color - name="MultiSliderTrackColor" - reference="LtGray" /> - <color - name="MultiSliderTriangleColor" - reference="Yellow" /> + <color + name="AccordionHeaderTextColor" + reference="LtGray" /> + <color + name="AgentChatColor" + reference="White" /> + <color + name="AlertBoxColor" + value="0.24 0.24 0.24 1" /> + <color + name="AlertCautionBoxColor" + value="1 0.82 0.46 1" /> + <color + name="AlertCautionTextColor" + reference="LtYellow" /> + <color + name="AvatarListItemIconDefaultColor" + reference="White" /> + <color + name="AvatarListItemIconOnlineColor" + reference="White" /> + <color + name="AvatarListItemIconOfflineColor" + value="0.5 0.5 0.5 0.5" /> + <color + name="AvatarListItemIconVoiceInvitedColor" + reference="AvatarListItemIconOfflineColor" /> + <color + name="AvatarListItemIconVoiceJoinedColor" + reference="AvatarListItemIconOnlineColor" /> + <color + name="AvatarListItemIconVoiceLeftColor" + reference="AvatarListItemIconOfflineColor" /> + <color + name="BadgeImageColor" + value="1.0 0.40 0.0 1.0" /> + <color + name="BadgeBorderColor" + value="0.9 0.9 0.9 1.0" /> + <color + name="BadgeLabelColor" + reference="White" /> + <color + name="ButtonBorderColor" + reference="Unused?" /> + <color + name="ButtonCautionImageColor" + reference="Unused?" /> + <color + name="ButtonColor" + reference="Unused?" /> + <color + name="ButtonFlashBgColor" + reference="Unused?" /> + <color + name="ButtonImageColor" + reference="White" /> + <color + name="ButtonLabelColor" + reference="LtGray" /> + <color + name="ButtonLabelDisabledColor" + reference="White_25" /> + <color + name="ButtonLabelSelectedColor" + reference="White" /> + <color + name="ButtonLabelSelectedDisabledColor" + reference="White_25" /> + <color + name="ButtonSelectedBgColor" + reference="Unused?" /> + <color + name="ButtonSelectedColor" + reference="Unused?" /> + <color + name="ButtonUnselectedBgColor" + reference="Unused?" /> + <color + name="ButtonUnselectedFgColor" + reference="Unused?" /> + <color + name="ChatHistoryBgColor" + reference="Transparent" /> + <color + name="ChatHistoryTextColor" + reference="LtGray" /> + <color + name="ChicletFlashColor" + value="0.114 0.65 0.1" /> + <color + name="ColorDropShadow" + reference="Black_50" /> + <color + name="ColorPaletteEntry01" + reference="Black" /> + <color + name="ColorPaletteEntry02" + reference="Gray" /> + <color + name="ColorPaletteEntry03" + value="0.5 0 0 1" /> + <color + name="ColorPaletteEntry04" + value="0.5 0.5 0 1" /> + <color + name="ColorPaletteEntry05" + value="0 0.5 0 1" /> + <color + name="ColorPaletteEntry06" + value="0 0.5 0.5 1" /> + <color + name="ColorPaletteEntry07" + value="0 0 0.5 1" /> + <color + name="ColorPaletteEntry08" + value="0.5 0 0.5 1" /> + <color + name="ColorPaletteEntry09" + value="0.5 0.5 0 1" /> + <color + name="ColorPaletteEntry10" + value="0 0.25 0.25 1" /> + <color + name="ColorPaletteEntry11" + value="0 0.5 1 1" /> + <color + name="ColorPaletteEntry12" + value="0 0.25 0.5 1" /> + <color + name="ColorPaletteEntry13" + value="0.5 0 1 1" /> + <color + name="ColorPaletteEntry14" + value="0.5 0.25 0 1" /> + <color + name="ColorPaletteEntry15" + reference="White" /> + <color + name="ColorPaletteEntry16" + reference="LtYellow" /> + <color + name="ColorPaletteEntry17" + reference="White" /> + <color + name="ColorPaletteEntry18" + reference="LtGray" /> + <color + name="ColorPaletteEntry19" + reference="Red" /> + <color + name="ColorPaletteEntry20" + reference="Yellow" /> + <color + name="ColorPaletteEntry21" + reference="Green" /> + <color + name="ColorPaletteEntry22" + value="0 1 1 1" /> + <color + name="ColorPaletteEntry23" + reference="Blue" /> + <color + name="ColorPaletteEntry24" + reference="Purple" /> + <color + name="ColorPaletteEntry25" + value="1 1 0.5 1" /> + <color + name="ColorPaletteEntry26" + value="0 1 0.5 1" /> + <color + name="ColorPaletteEntry27" + value="0.5 1 1 1" /> + <color + name="ColorPaletteEntry28" + value="0.5 0.5 1 1" /> + <color + name="ColorPaletteEntry29" + value="1 0 0.5 1" /> + <color + name="ColorPaletteEntry30" + value="1 0.5 0 1" /> + <color + name="ColorPaletteEntry31" + reference="White" /> + <color + name="ColorPaletteEntry32" + reference="White" /> + <color + name="ComboListBgColor" + reference="DkGray" /> + <color + name="ConsoleBackground" + reference="Black" /> + <color + name="ContextSilhouetteColor" + reference="EmphasisColor" /> + <color + name="DefaultHighlightDark" + reference="White_10" /> + <color + name="DefaultHighlightLight" + reference="White_25" /> + <color + name="DefaultShadowDark" + reference="Black_50" /> + <color + name="DefaultShadowLight" + reference="Black_50" /> + <color + name="EffectColor" + reference="White" /> + <color + name="FilterBackgroundColor" + reference="Black" /> + <color + name="FilterTextColor" + value="0.38 0.69 0.57 1" /> + <color + name="FloaterButtonImageColor" + reference="LtGray" /> + <color + name="FloaterDefaultBackgroundColor" + reference="DkGray_66" /> + <color + name="FloaterFocusBackgroundColor" + reference="DkGray2" /> + <color + name="FloaterFocusBorderColor" + reference="Black_50" /> + <color + name="FloaterUnfocusBorderColor" + reference="Black_50" /> + <color + name="FocusColor" + reference="EmphasisColor" /> + <color + name="FolderViewLoadingMessageTextColor" + value="0.3344 0.5456 0.5159 1" /> + <color + name="GridFocusPointColor" + reference="White_50" /> + <color + name="GridlineBGColor" + value="0.92 0.92 1 0.78" /> + <color + name="GridlineColor" + reference="White" /> + <color + name="GridlineShadowColor" + value="0 0 0 0.31" /> + <color + name="GroupNotifyBoxColor" + value="0.3344 0.5456 0.5159 1" /> + <color + name="GroupNotifyTextColor" + reference="White"/> + <color + name="GroupNotifyDimmedTextColor" + reference="LtGray" /> + <color + name="GroupOverTierColor" + value="0.43 0.06 0.06 1" /> + <color + name="HTMLLinkColor" + reference="EmphasisColor" /> + <color + name="HealthTextColor" + reference="White" /> + <color + name="HelpBgColor" + reference="Unused?" /> + <color + name="HelpFgColor" + reference="Unused?" /> + <color + name="HelpScrollHighlightColor" + reference="Unused?" /> + <color + name="HelpScrollShadowColor" + reference="Unused?" /> + <color + name="HelpScrollThumbColor" + reference="Unused?" /> + <color + name="HelpScrollTrackColor" + reference="Unused?" /> + <color + name="HighlightChildColor" + reference="Yellow" /> + <color + name="HighlightInspectColor" + value="1 0 1 1" /> + <color + name="HighlightParentColor" + value="0.67 0.83 0.96 1" /> + <color + name="IMHistoryBgColor" + reference="Unused?" /> + <color + name="IMHistoryTextColor" + reference="Unused?" /> + <color + name="IconDisabledColor" + reference="White_25" /> + <color + name="IconEnabledColor" + reference="White" /> + <color + name="InventoryBackgroundColor" + reference="DkGray2" /> + <color + name="InventoryFocusOutlineColor" + reference="White_25" /> + <color + name="InventoryItemSuffixColor" + reference="White_25" /> + <color + name="InventoryItemLibraryColor" + reference="EmphasisColor" /> + <color + name="InventoryItemLinkColor" + reference="LtGray_50" /> + <color + name="InventoryMouseOverColor" + reference="LtGray_35" /> + <color + name="InventorySearchStatusColor" + reference="EmphasisColor" /> + <color + name="LabelDisabledColor" + reference="White_25" /> + <color + name="LabelSelectedColor" + reference="White" /> + <color + name="LabelSelectedDisabledColor" + reference="White_25" /> + <color + name="LabelTextColor" + reference="LtGray" /> + <color + name="LoginProgressBarBgColor" + reference="Unused?" /> + <color + name="LoginProgressBarFgColor" + reference="Unused?" /> + <color + name="LoginProgressBoxBorderColor" + value="0 0.12 0.24 0" /> + <color + name="LoginProgressBoxCenterColor" + value="0 0 0 0.78" /> + <color + name="LoginProgressBoxShadowColor" + value="0 0 0 0.78" /> + <color + name="LoginProgressBoxTextColor" + reference="White" /> + <color + name="MapAvatarColor" + reference="Green" /> + <color + name="MapAvatarFriendColor" + reference="Yellow" /> + <color + name="MapAvatarSelfColor" + value="0.53125 0 0.498047 1" /> + <color + name="MapFrustumColor" + reference="White_10" /> + <color + name="MapFrustumRotatingColor" + value="1 1 1 0.2" /> + <color + name="MapTrackColor" + reference="Red" /> + <color + name="MapTrackDisabledColor" + value="0.5 0 0 1" /> + <color + name="MenuBarBgColor" + reference="DkGray" /> + <color + name="MenuBarGodBgColor" + reference="FrogGreen" /> + <color + name="MenuDefaultBgColor" + reference="DkGray2" /> + <color + name="MenuItemDisabledColor" + reference="LtGray_50" /> + <color + name="MenuItemEnabledColor" + reference="LtGray" /> + <color + name="MenuItemHighlightBgColor" + reference="EmphasisColor_35" /> + <color + name="MenuItemFlashBgColor" + reference="BeaconColor" /> + <color + name="MenuItemHighlightFgColor" + reference="White" /> + <color + name="MenuNonProductionBgColor" + reference="Black" /> + <color + name="MenuNonProductionGodBgColor" + value="0.263 0.325 0.345 1" /> + <color + name="MenuPopupBgColor" + reference="DkGray2" /> + <color + name="ModelUploaderLabels" + value="1 0.6 0 1" /> + <color + name="MultiSliderDisabledThumbColor" + reference="Black" /> + <color + name="MultiSliderThumbCenterColor" + reference="White" /> + <color + name="MultiSliderThumbCenterSelectedColor" + reference="Green" /> + <color + name="MultiSliderThumbOutlineColor" + reference="Unused?" /> + <color + name="MultiSliderTrackColor" + reference="LtGray" /> + <color + name="MultiSliderTriangleColor" + reference="Yellow" /> <!-- - <color + <color name="NameTagBackground" value="0.85 0.85 0.85 0.80" /> - --> - <color + --> + <color name="NameTagBackground" value="0 0 0 1" /> - <color - name="NameTagChat" - reference="White" /> - <color - name="NameTagFriend" - value="0.447 0.784 0.663 1" /> - <color - name="NameTagLegacy" - reference="White" /> - <color - name="NameTagMatch" - reference="White" /> - <color - name="NameTagMismatch" - reference="White" /> - <color - name="NetMapBackgroundColor" - value="0 0 0 1" /> - <color - name="NetMapGroupOwnAboveWater" - reference="Purple" /> - <color - name="NetMapGroupOwnBelowWater" - value="0.78 0 0.78 1" /> - <color - name="NetMapOtherOwnAboveWater" - value="0.24 0.24 0.24 1" /> - <color - name="NetMapOtherOwnBelowWater" - value="0.12 0.12 0.12 1" /> - <color - name="NetMapYouOwnAboveWater" - value="0 1 1 1" /> - <color - name="NetMapYouOwnBelowWater" - value="0 0.78 0.78 1" /> - <color - name="NotifyBoxColor" - value="LtGray" /> - <color - name="NotifyCautionBoxColor" - value="1 0.82 0.46 1" /> - <color - name="NotifyCautionWarnColor" - reference="White" /> - <color - name="NotifyTextColor" - reference="White" /> - <color - name="ObjectBubbleColor" - reference="DkGray_66" /> - <color - name="ObjectChatColor" - reference="EmphasisColor" /> - <color - name="OverdrivenColor" - reference="Red" /> - <color - name="PanelDefaultBackgroundColor" - reference="DkGray" /> - <color - name="PanelDefaultHighlightLight" - reference="White_50" /> - <color - name="PanelFocusBackgroundColor" - reference="DkGray2" /> - <color - name="PanelNotificationBackground" - value="1 0.3 0.3 0" /> - <color - name="ParcelHoverColor" - reference="White" /> - <color + <color + name="NameTagChat" + reference="White" /> + <color + name="NameTagFriend" + value="0.447 0.784 0.663 1" /> + <color + name="NameTagLegacy" + reference="White" /> + <color + name="NameTagMatch" + reference="White" /> + <color + name="NameTagMismatch" + reference="White" /> + <color + name="NetMapBackgroundColor" + value="0 0 0 1" /> + <color + name="NetMapGroupOwnAboveWater" + reference="Purple" /> + <color + name="NetMapGroupOwnBelowWater" + value="0.78 0 0.78 1" /> + <color + name="NetMapOtherOwnAboveWater" + value="0.24 0.24 0.24 1" /> + <color + name="NetMapOtherOwnBelowWater" + value="0.12 0.12 0.12 1" /> + <color + name="NetMapYouOwnAboveWater" + value="0 1 1 1" /> + <color + name="NetMapYouOwnBelowWater" + value="0 0.78 0.78 1" /> + <color + name="NotifyBoxColor" + value="LtGray" /> + <color + name="NotifyCautionBoxColor" + value="1 0.82 0.46 1" /> + <color + name="NotifyCautionWarnColor" + reference="White" /> + <color + name="NotifyTextColor" + reference="White" /> + <color + name="ObjectBubbleColor" + reference="DkGray_66" /> + <color + name="ObjectChatColor" + reference="EmphasisColor" /> + <color + name="OverdrivenColor" + reference="Red" /> + <color + name="PanelDefaultBackgroundColor" + reference="DkGray" /> + <color + name="PanelDefaultHighlightLight" + reference="White_50" /> + <color + name="PanelFocusBackgroundColor" + reference="DkGray2" /> + <color + name="PanelNotificationBackground" + value="1 0.3 0.3 0" /> + <color + name="ParcelHoverColor" + reference="White" /> + <color name="PathfindingErrorColor" reference="LtRed" /> <color @@ -657,205 +663,205 @@ name="PathfindingCharacterBeaconColor" reference="Red_80" /> <color - name="PieMenuBgColor" - value="0.24 0.24 0.24 0.59" /> - <color - name="PieMenuLineColor" - value="0 0 0 0.5" /> - <color - name="PieMenuSelectedColor" - value="0.72 0.72 0.74 0.3" /> - <color - name="PropertyColorAuction" - value="0.5 0 1 0.4" /> - <color - name="PropertyColorAvail" - reference="Transparent" /> - <color - name="PropertyColorForSale" - value="1 0.5 0 0.4" /> - <color - name="PropertyColorGroup" - value="0 0.72 0.72 0.4" /> - <color - name="PropertyColorOther" - value="1 0 0 0.4" /> - <color - name="PropertyColorSelf" - value="0 1 0 0.4" /> - <color - name="ScriptBgReadOnlyColor" - value="0.39 0.39 0.39 1" /> - <color - name="ScriptErrorColor" - reference="Red" /> - <color - name="ScrollBGStripeColor" - reference="Transparent" /> - <color - name="ScrollBgReadOnlyColor" + name="PieMenuBgColor" + value="0.24 0.24 0.24 0.59" /> + <color + name="PieMenuLineColor" + value="0 0 0 0.5" /> + <color + name="PieMenuSelectedColor" + value="0.72 0.72 0.74 0.3" /> + <color + name="PropertyColorAuction" + value="0.5 0 1 0.4" /> + <color + name="PropertyColorAvail" + reference="Transparent" /> + <color + name="PropertyColorForSale" + value="1 0.5 0 0.4" /> + <color + name="PropertyColorGroup" + value="0 0.72 0.72 0.4" /> + <color + name="PropertyColorOther" + value="1 0 0 0.4" /> + <color + name="PropertyColorSelf" + value="0 1 0 0.4" /> + <color + name="ScriptBgReadOnlyColor" + value="0.39 0.39 0.39 1" /> + <color + name="ScriptErrorColor" + reference="Red" /> + <color + name="ScrollBGStripeColor" + reference="Transparent" /> + <color + name="ScrollBgReadOnlyColor" reference="Transparent" /> - <color - name="ScrollBgWriteableColor" - reference="White_05" /> - <color - name="ScrollDisabledColor" - reference="White_25" /> - <color - name="ScrollHighlightedColor" - reference="Unused?" /> - <color - name="ScrollHoveredColor" - reference="EmphasisColor_13" /> - <color - name="ScrollSelectedBGColor" - reference="EmphasisColor_35" /> - <color - name="ScrollSelectedFGColor" - reference="White" /> - <color - name="ScrollUnselectedColor" - reference="LtGray" /> - <color - name="ScrollbarThumbColor" - reference="White" /> - <color - name="ScrollbarTrackColor" - reference="Black" /> - <color - name="SelectedOutfitTextColor" - reference="EmphasisColor" /> - <color - name="SilhouetteChildColor" - value="0.13 0.42 0.77 1" /> - <color - name="SilhouetteParentColor" - reference="Yellow" /> - <color - name="SliderDisabledThumbColor" - reference="White_25" /> - <color - name="SliderThumbCenterColor" - reference="White" /> - <color - name="SliderThumbOutlineColor" - reference="White" /> - <color - name="SliderTrackColor" - reference="Unused?" /> - <color - name="SpeakingColor" - reference="FrogGreen" /> - <color - name="SystemChatColor" - reference="LtGray" /> - <color - name="TextBgFocusColor" - reference="White" /> - <color - name="TextBgReadOnlyColor" - reference="White_05" /> - <color - name="TextBgWriteableColor" - reference="LtGray" /> - <color - name="TextCursorColor" - reference="Black" /> - <color - name="TextDefaultColor" - reference="Black" /> - <color - name="TextEmbeddedItemColor" - value="0 0 0.5 1" /> - <color - name="TextEmbeddedItemReadOnlyColor" - reference="Unused?" /> - <color - name="TextFgColor" - value="0.102 0.102 0.102 1" /> - <color - name="TextFgReadOnlyColor" - reference="LtGray" /> - <color - name="TextFgTentativeColor" - value="0.4 0.4 0.4 1" /> - <color - name="TimeTextColor" - reference="LtGray" /> - <color - name="TitleBarFocusColor" - reference="White_10" /> - <color - name="ToastBackground" - value="0.3 0.3 0.3 0" /> - <color - name="ToolTipBgColor" - value="0.937 0.89 0.655 1" /> - <color - name="ToolTipBorderColor" - value="0.812 0.753 0.451 1" /> - <color - name="ToolTipTextColor" - reference="DkGray2" /> - <color - name="InspectorTipTextColor" - reference="LtGray" /> - <color - name="UserChatColor" - reference="White" /> - <color - name="llOwnerSayChatColor" - reference="LtYellow" /> + <color + name="ScrollBgWriteableColor" + reference="White_05" /> + <color + name="ScrollDisabledColor" + reference="White_25" /> + <color + name="ScrollHighlightedColor" + reference="Unused?" /> + <color + name="ScrollHoveredColor" + reference="EmphasisColor_13" /> + <color + name="ScrollSelectedBGColor" + reference="EmphasisColor_35" /> + <color + name="ScrollSelectedFGColor" + reference="White" /> + <color + name="ScrollUnselectedColor" + reference="LtGray" /> + <color + name="ScrollbarThumbColor" + reference="White" /> + <color + name="ScrollbarTrackColor" + reference="Black" /> + <color + name="SelectedOutfitTextColor" + reference="EmphasisColor" /> + <color + name="SilhouetteChildColor" + value="0.13 0.42 0.77 1" /> + <color + name="SilhouetteParentColor" + reference="Yellow" /> + <color + name="SliderDisabledThumbColor" + reference="White_25" /> + <color + name="SliderThumbCenterColor" + reference="White" /> + <color + name="SliderThumbOutlineColor" + reference="White" /> + <color + name="SliderTrackColor" + reference="Unused?" /> + <color + name="SpeakingColor" + reference="FrogGreen" /> + <color + name="SystemChatColor" + reference="LtGray" /> + <color + name="TextBgFocusColor" + reference="White" /> + <color + name="TextBgReadOnlyColor" + reference="White_05" /> + <color + name="TextBgWriteableColor" + reference="LtGray" /> + <color + name="TextCursorColor" + reference="Black" /> + <color + name="TextDefaultColor" + reference="Black" /> + <color + name="TextEmbeddedItemColor" + value="0 0 0.5 1" /> + <color + name="TextEmbeddedItemReadOnlyColor" + reference="Unused?" /> + <color + name="TextFgColor" + value="0.102 0.102 0.102 1" /> + <color + name="TextFgReadOnlyColor" + reference="LtGray" /> + <color + name="TextFgTentativeColor" + value="0.4 0.4 0.4 1" /> + <color + name="TimeTextColor" + reference="LtGray" /> + <color + name="TitleBarFocusColor" + reference="White_10" /> + <color + name="ToastBackground" + value="0.3 0.3 0.3 0" /> + <color + name="ToolTipBgColor" + value="0.937 0.89 0.655 1" /> + <color + name="ToolTipBorderColor" + value="0.812 0.753 0.451 1" /> + <color + name="ToolTipTextColor" + reference="DkGray2" /> + <color + name="InspectorTipTextColor" + reference="LtGray" /> + <color + name="UserChatColor" + reference="Yellow" /> + <color + name="llOwnerSayChatColor" + reference="LtYellow" /> - <!-- New Colors --> - <color - name="OutputMonitorMutedColor" - reference="DkGray2" /> - <color - name="SysWellItemUnselected" - value="0 0 0 0" /> - <color - name="SysWellItemSelected" - value="0.3 0.3 0.3 1.0" /> - <color - name="ColorSwatchBorderColor" - value="0.45098 0.517647 0.607843 1"/> - <color - name="ChatTimestampColor" - reference="White" /> - <color - name="MenuBarProjectBgColor" - reference="MdBlue" /> + <!-- New Colors --> + <color + name="OutputMonitorMutedColor" + reference="DkGray2" /> + <color + name="SysWellItemUnselected" + value="0 0 0 0" /> + <color + name="SysWellItemSelected" + value="0.3 0.3 0.3 1.0" /> + <color + name="ColorSwatchBorderColor" + value="0.45098 0.517647 0.607843 1"/> + <color + name="ChatTimestampColor" + reference="White" /> + <color + name="MenuBarProjectBgColor" + reference="MdBlue" /> - <color + <color name="MeshImportTableNormalColor" value="1 1 1 1"/> - <color + <color name="MeshImportTableHighlightColor" value="0.2 0.8 1 1"/> - <color - name="DirectChatColor" - reference="LtOrange" /> + <color + name="DirectChatColor" + reference="LtOrange" /> - <color + <color name="ToolbarDropZoneColor" value=".48 .69 1 .5" /> - <!-- Generic color names (legacy) --> + <!-- Generic color names (legacy) --> <color - name="white" - value="1 1 1 1"/> + name="white" + value="1 1 1 1"/> <color - name="black" - value="0 0 0 1"/> + name="black" + value="0 0 0 1"/> <color - name="red" - value="1 0 0 1"/> + name="red" + value="1 0 0 1"/> <color - name="green" - value="0 1 0 1"/> + name="green" + value="0 1 0 1"/> <color - name="blue" - value="0 0 1 1"/> + name="blue" + value="0 0 1 1"/> </colors> diff --git a/indra/newview/skins/default/textures/bottomtray/Unread_IM.png b/indra/newview/skins/default/textures/bottomtray/Unread_IM.png Binary files differdeleted file mode 100644 index 5c0c85b864..0000000000 --- a/indra/newview/skins/default/textures/bottomtray/Unread_IM.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1_Dark.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1_Dark.png Binary files differdeleted file mode 100644 index 857fa1e047..0000000000 --- a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1_Dark.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2_Dark.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2_Dark.png Binary files differdeleted file mode 100644 index 453bb53673..0000000000 --- a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2_Dark.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3_Dark.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3_Dark.png Binary files differdeleted file mode 100644 index 135a66ca0d..0000000000 --- a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3_Dark.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Off_Dark.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Off_Dark.png Binary files differdeleted file mode 100644 index a63aec5e6d..0000000000 --- a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Off_Dark.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_On_Dark.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_On_Dark.png Binary files differdeleted file mode 100644 index 1719eb3e84..0000000000 --- a/indra/newview/skins/default/textures/bottomtray/VoicePTT_On_Dark.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Conv_log_inbox.png b/indra/newview/skins/default/textures/icons/Conv_log_inbox.png Binary files differnew file mode 100644 index 0000000000..bb6ca28147 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Conv_log_inbox.png diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png Binary files differnew file mode 100755 index 0000000000..0631f16f3b --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png Binary files differnew file mode 100755 index 0000000000..578482f5ed --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.png Binary files differnew file mode 100755 index 0000000000..7676131790 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.png diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.png Binary files differnew file mode 100755 index 0000000000..2880eb766a --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.png diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_close.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_close.png Binary files differnew file mode 100755 index 0000000000..d009c8f446 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_close.png diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png Binary files differnew file mode 100755 index 0000000000..8d82960e28 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png Binary files differnew file mode 100755 index 0000000000..f718d3fc60 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.png Binary files differnew file mode 100755 index 0000000000..315e2c581a --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.png diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png Binary files differnew file mode 100755 index 0000000000..732ab02a20 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png Binary files differnew file mode 100755 index 0000000000..25a32cb2ba --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png Binary files differnew file mode 100755 index 0000000000..08debeb91f --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png diff --git a/indra/newview/skins/default/textures/icons/collapse_to_one_line.png b/indra/newview/skins/default/textures/icons/collapse_to_one_line.png Binary files differnew file mode 100644 index 0000000000..d57144a645 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/collapse_to_one_line.png diff --git a/indra/newview/skins/default/textures/icons/expand_one_liner.png b/indra/newview/skins/default/textures/icons/expand_one_liner.png Binary files differnew file mode 100644 index 0000000000..58b7d90131 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/expand_one_liner.png diff --git a/indra/newview/skins/default/textures/icons/nearby_chat_icon.png b/indra/newview/skins/default/textures/icons/nearby_chat_icon.png Binary files differnew file mode 100644 index 0000000000..5ac4258b9d --- /dev/null +++ b/indra/newview/skins/default/textures/icons/nearby_chat_icon.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 06f8f8c670..93c9cb02cb 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -162,7 +162,24 @@ with the same filename but different name <texture name="ComboButton_On" file_name="widgets/ComboButton_On.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_Off" file_name="widgets/ComboButton_Off.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_UpOff" file_name="widgets/ComboButton_UpOff.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> + <texture name="Container" file_name="containers/Container.png" preload="false" /> + + <texture name="Conv_toolbar_add_person" file_name="icons/Conv_toolbar_add_person.png" preload="false" /> + <texture name="Conv_toolbar_arrow_ne" file_name="icons/Conv_toolbar_arrow_ne.png" preload="false" /> + <texture name="Conv_toolbar_arrow_sw" file_name="icons/Conv_toolbar_arrow_sw.png" preload="false" /> + <texture name="Conv_toolbar_call_log" file_name="icons/Conv_toolbar_call_log.png" preload="false" /> + <texture name="Conv_toolbar_close" file_name="icons/Conv_toolbar_close.png" preload="false" /> + <texture name="Conv_toolbar_collapse" file_name="icons/Conv_toolbar_collapse.png" preload="false" /> + <texture name="Conv_collapse_to_one_line" file_name="icons/collapse_to_one_line.png" preload="false" /> + <texture name="Conv_expand_one_line" file_name="icons/expand_one_liner.png" preload="false" /> + <texture name="Conv_toolbar_expand" file_name="icons/Conv_toolbar_expand.png" preload="false" /> + <texture name="Conv_toolbar_hang_up" file_name="icons/Conv_toolbar_hang_up.png" preload="false" /> + <texture name="Conv_toolbar_open_call" file_name="icons/Conv_toolbar_open_call.png" preload="false" /> + <texture name="Conv_toolbar_plus" file_name="icons/Conv_toolbar_plus.png" preload="false" /> + <texture name="Conv_toolbar_sort" file_name="icons/Conv_toolbar_sort.png" preload="false" /> + <texture name="Conv_log_inbox" file_name="icons/Conv_log_inbox.png" preload="false" /> + <texture name="Copy" file_name="icons/Copy.png" preload="false" /> <texture name="DisclosureArrow_Opened_Off" file_name="widgets/DisclosureArrow_Opened_Off.png" preload="true" /> @@ -348,6 +365,8 @@ with the same filename but different name <texture name="NavBar_BG_NoFav_Bevel" file_name="navbar/NavBar_BG_NoFav_Bevel.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> <texture name="NavBar_BG_NoNav_Bevel" file_name="navbar/NavBar_BG_NoNav_Bevel.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> + <texture name="Nearby_chat_icon" file_name="icons/nearby_chat_icon.png" preload="false" /> + <texture name="Notices_Unread" file_name="bottomtray/Notices_Unread.png" preload="true" /> <texture name="NoEntryLines" file_name="world/NoEntryLines.png" use_mips="true" preload="false" /> @@ -625,7 +644,6 @@ with the same filename but different name <texture name="TrashItem_Press" file_name="icons/TrashItem_Press.png" preload="false" /> <texture name="Unread_Chiclet" file_name="bottomtray/Unread_Chiclet.png" preload="false" /> - <texture name="Unread_IM" file_name="bottomtray/Unread_IM.png" preload="false" /> <texture name="UpArrow_Off" file_name="icons/UpArrow_Off.png" preload="false" /> @@ -638,12 +656,6 @@ with the same filename but different name <texture name="VoicePTT_Off" file_name="bottomtray/VoicePTT_Off.png" preload="false" /> <texture name="VoicePTT_On" file_name="bottomtray/VoicePTT_On.png" preload="false" /> - <texture name="VoicePTT_Lvl1_Dark" file_name="bottomtray/VoicePTT_Lvl1_Dark.png" preload="false" /> - <texture name="VoicePTT_Lvl2_Dark" file_name="bottomtray/VoicePTT_Lvl2_Dark.png" preload="false" /> - <texture name="VoicePTT_Lvl3_Dark" file_name="bottomtray/VoicePTT_Lvl3_Dark.png" preload="false" /> - <texture name="VoicePTT_Off_Dark" file_name="bottomtray/VoicePTT_Off_Dark.png" preload="false" /> - <texture name="VoicePTT_On_Dark" file_name="bottomtray/VoicePTT_On_Dark.png" preload="false" /> - <texture name="Wearables_Divider" file_name="windows/Wearables_Divider.png" preload="false" /> <texture name="Web_Profile_Off" file_name="icons/Web_Profile_Off.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/da/menu_im_well_button.xml b/indra/newview/skins/default/xui/da/menu_im_well_button.xml deleted file mode 100644 index 4889230919..0000000000 --- a/indra/newview/skins/default/xui/da/menu_im_well_button.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<context_menu name="IM Well Button Context Menu"> - <menu_item_call label="Luk alle" name="Close All"/> -</context_menu> diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index cf6f1ccdd9..33b876bdb9 100644 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -481,7 +481,6 @@ Du kan bruge [SECOND_LIFE] normalt og andre personer vil se dig korrekt. [APP_NAME] installationen er færdig. Hvis det er første gang du bruger [SECOND_LIFE], skal du først oprette en konto for at logge pÃ¥. -Vend tilbage til [http://join.secondlife.com secondlife.com] for at oprette en ny konto? </notification> <notification name="LoginPacketNeverReceived"> Der er problemer med at koble pÃ¥. Der kan være et problem med din Internet forbindelse eller [SECOND_LIFE_GRID]. diff --git a/indra/newview/skins/default/xui/da/panel_login.xml b/indra/newview/skins/default/xui/da/panel_login.xml index 2e0f726e1a..b7cb76d4cb 100644 --- a/indra/newview/skins/default/xui/da/panel_login.xml +++ b/indra/newview/skins/default/xui/da/panel_login.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_login"> - <panel.string name="create_account_url"> - http://join.secondlife.com/ - </panel.string> <panel.string name="forgot_password_url"> http://secondlife.com/account/request.php </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> + <text name="log_in_text"> + LOG PÃ… + </text> <text name="username_text"> Brugernavn: </text> @@ -15,15 +15,8 @@ <text name="password_text"> Password: </text> - <check_box label="Husk password" name="remember_check"/> - <button label="Log pÃ¥" name="connect_btn"/> - <text name="mode_selection_text"> - Tilstand: - </text> - <combo_box name="mode_combo" tool_tip="Vælg ønsket tilstand. Vælg basis for hurtig og nem udforskning og chat. Vælg avanceret for at fÃ¥ adgang til flere muligheder."> - <combo_box.item label="Basis" name="Basic"/> - <combo_box.item label="Avanceret" name="Advanced"/> - </combo_box> + </layout_panel> + <layout_panel name="start_location_panel"> <text name="start_location_text"> Start ved: </text> @@ -33,16 +26,21 @@ <combo_box.item label="<Indtast regionnavn>" name="Typeregionname"/> </combo_box> </layout_panel> - <layout_panel name="links"> - <text name="create_new_account_text"> - Opret bruger + <layout_panel name="links_login_panel"> + <text name="login_help"> + Hjælp til login </text> <text name="forgot_password_text"> Har du glemt brugernavn eller password? </text> - <text name="login_help"> - Hjælp til login + <button label="Log pÃ¥" name="connect_btn"/> + <check_box label="Husk password" name="remember_check"/> + </layout_panel> + <layout_panel name="links"> + <text name="create_account_text"> + CREATE YǾUR ACCǾUNT </text> + <button name="create_new_account_btn" label="Opret bruger"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml index 949cbcbd7b..eb104201f8 100644 --- a/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="chat_bar"> +<panel name="nearby_chat"> <line_editor label="Klik her for at chatte." name="chat_box" tool_tip="Tryk pÃ¥ enter for at tale, Ctrl-Enter for at rÃ¥be."/> <button name="show_nearby_chat" tool_tip="Viser/skjuler log for chat nærved"/> </panel> diff --git a/indra/newview/skins/default/xui/de/floater_about.xml b/indra/newview/skins/default/xui/de/floater_about.xml index b4c28daac9..4387a61963 100644 --- a/indra/newview/skins/default/xui/de/floater_about.xml +++ b/indra/newview/skins/default/xui/de/floater_about.xml @@ -66,27 +66,26 @@ Voice-Serverversion: [VOICE_VERSION] </panel> <panel label="Lizenzen" name="licenses_panel"> <text_editor name="credits_editor"> - 3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion. - APR Copyright (C) 2000-2004 The Apache Software Foundation. - Collada DOM Copyright 2005 Sony Computer Entertainment Inc. - cURL Copyright (C) 1996-2002, Daniel Stenberg (daniel@haxx.se). + 3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion. + APR Copyright (C) 2011 The Apache Software Foundation + Collada DOM Copyright 2006 Sony Computer Entertainment Inc. + cURL Copyright (C) 1996-2010, Daniel Stenberg (daniel@haxx.se). DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc. expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. - FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org). + FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm und Werner Lemberg. GL Copyright (C) 1999-2004 Brian Paul. GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University sowie David Luebke, Brenden Schubert, University of Virginia. google-perftools Copyright (c) 2005, Google Inc. Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited. jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW). jpeglib Copyright (C) 1991-1998, Thomas G. Lane. - ogg/vorbis Copyright (C) 2001, Xiphophorus. - OpenSSL Copyright (C) 1998-2002 The OpenSSL Project. - PCRE Copyright (c) 1997-2008 University of Cambridge. + ogg/vorbis Copyright (C) 2002, Xiphophorus. + OpenSSL Copyright (C) 1998-2008 The OpenSSL Project. + PCRE Copyright (c) 1997-2012 University of Cambridge. SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga. SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com). xmlrpc-epi Copyright (C) 2000 Epinions, Inc. - zlib Copyright (C) 1995-2002 Jean-loup Gailly und Mark Adler. - google-perftools Copyright (c) 2005, Google Inc. + zlib Copyright (C) 1995-2012 Jean-loup Gailly und Mark Adler. Second Life Viewer verwendet Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (und Lizenzgeber). Alle Rechte vorbehalten. Details siehe www.havok.com. 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 9e330f9766..44922fbe78 100644 --- a/indra/newview/skins/default/xui/de/floater_about_land.xml +++ b/indra/newview/skins/default/xui/de/floater_about_land.xml @@ -463,7 +463,7 @@ Nur große Parzellen können in der Suche aufgeführt werden. Zugang nur Einwohnern gestatten, die: </text> <check_box label="Zahlungsinformationen hinterlegt haben [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="Um diese Parzelle besuchen zu können, müssen Einwohner Zahlungsinformationen hinterlegt haben. Weitere Informationen finden Sie auf [SUPPORT_SITE]."/> - <check_box label="ihr Alter bestätigt haben [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Um diese Parzelle besuchen zu können, müssen Einwohner ihr Alter bestätigt haben. Weitere Informationen finden Sie auf [SUPPORT_SITE]."/> + <check_box label="Sind mindestens 18 Jahre alt [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Nur Einwohner, die mindestens 18 Jahre alt sind, können diese Parzelle betreten. Weitere Informationen finden Sie unter [SUPPORT_SITE]."/> <check_box label="Gruppenzugang erlauben: [GROUP]" name="GroupCheck" tool_tip="Gruppe im Register „Allgemein“ festlegen."/> <check_box label="Pässe verkaufen an:" name="PassCheck" tool_tip="Ermöglicht befristeten Zugang zu dieser Parzelle"/> <combo_box name="pass_combo"> diff --git a/indra/newview/skins/default/xui/de/floater_animation_preview.xml b/indra/newview/skins/default/xui/de/floater_animation_preview.xml deleted file mode 100644 index 82a4a51d07..0000000000 --- a/indra/newview/skins/default/xui/de/floater_animation_preview.xml +++ /dev/null @@ -1,188 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Animation Preview" title=""> - <floater.string name="failed_to_initialize"> - Bewegung konnte nicht initialisiert werden - </floater.string> - <floater.string name="anim_too_long"> - Animationsdatei ist [LENGTH] Sekunden lang. - -Maximal erlaubt sind [MAX_LENGTH] Sekunden. - </floater.string> - <floater.string name="failed_file_read"> - Animationsdatei konnte nicht gelesen werden. - -[STATUS] - </floater.string> - <floater.string name="E_ST_OK"> - OK - </floater.string> - <floater.string name="E_ST_EOF"> - Unvollständige Datei - </floater.string> - <floater.string name="E_ST_NO_CONSTRAINT"> - Constraint-Definition kann nicht gelesen werden. - </floater.string> - <floater.string name="E_ST_NO_FILE"> - BVH-Datei kann nicht geöffnet werden - </floater.string> - <floater.string name="E_ST_NO_HIER"> - Ungültiger HIERARCHY-Titel. - </floater.string> - <floater.string name="E_ST_NO_JOINT"> - ROOT oder JOINT nicht gefunden. - </floater.string> - <floater.string name="E_ST_NO_NAME"> - JOINT-Name nicht erfasst. - </floater.string> - <floater.string name="E_ST_NO_OFFSET"> - VERSATZ nicht gefunden. - </floater.string> - <floater.string name="E_ST_NO_CHANNELS"> - CHANNELS nicht gefunden. - </floater.string> - <floater.string name="E_ST_NO_ROTATION"> - Kann Rotations-Reihenfolge nicht erfassen. - </floater.string> - <floater.string name="E_ST_NO_AXIS"> - Kann Rotations-Achse nicht erfassen. - </floater.string> - <floater.string name="E_ST_NO_MOTION"> - MOTION nicht gefunden. - </floater.string> - <floater.string name="E_ST_NO_FRAMES"> - Anzahl der Bilder kann nicht erfasst werden. - </floater.string> - <floater.string name="E_ST_NO_FRAME_TIME"> - Bildzeit kann nicht erfasst werden. - </floater.string> - <floater.string name="E_ST_NO_POS"> - Positions-Werte können nicht erfasst werden. - </floater.string> - <floater.string name="E_ST_NO_ROT"> - Kann Rotations-Werte nicht erfassen. - </floater.string> - <floater.string name="E_ST_NO_XLT_FILE"> - Datei kann nicht geöffnet werden - </floater.string> - <floater.string name="E_ST_NO_XLT_HEADER"> - Übersetzungstitel kann nicht gelesen werden. - </floater.string> - <floater.string name="E_ST_NO_XLT_NAME"> - Übersetzungsnamen können nicht geladen werden. - </floater.string> - <floater.string name="E_ST_NO_XLT_IGNORE"> - Ignorier-Wert kann nicht gelesen werden. - </floater.string> - <floater.string name="E_ST_NO_XLT_RELATIVE"> - Übersetzungs-Wert kann nicht gelesen werden. - </floater.string> - <floater.string name="E_ST_NO_XLT_OUTNAME"> - Outname-Wert kann nicht gelesen werden. - </floater.string> - <floater.string name="E_ST_NO_XLT_MATRIX"> - Übersetzungsmatrix kann nicht geladen werden. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGECHILD"> - Mergechild-Name nicht erfasst. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGEPARENT"> - Mergeparent-Name nicht erfasst. - </floater.string> - <floater.string name="E_ST_NO_XLT_PRIORITY"> - Prioritätswert kann nicht erfasst werden. - </floater.string> - <floater.string name="E_ST_NO_XLT_LOOP"> - Loop-Wert kann nicht erfasst werden. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEIN"> - Easeln-Wert kann nicht erfasst werden. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEOUT"> - easeOut-Wert kann nicht erfasst werden. - </floater.string> - <floater.string name="E_ST_NO_XLT_HAND"> - Hand-Morph-Wert nicht erfasst. - </floater.string> - <floater.string name="E_ST_NO_XLT_EMOTE"> - Emote-Name kann nicht gelesen werden. - </floater.string> - <floater.string name="E_ST_BAD_ROOT"> - Falscher Root-Joint-Name, "hip" verwenden. - </floater.string> - <text name="name_label"> - Name: - </text> - <line_editor name="name_form"/> - <text name="description_label"> - Beschreibung: - </text> - <spinner label="Priorität" name="priority" tool_tip="Steuert, welche Animationen von dieser Animation überschrieben werden können"/> - <check_box bottom_delta="-18" label="Schleife" name="loop_check" tool_tip="Erzeugt eine Animationsschleife"/> - <spinner label="In (%)" name="loop_in_point" tool_tip="Anfang einer Animationsschleife festlegen"/> - <spinner label="Aus (%)" name="loop_out_point" tool_tip="Ende einer Animationsschleife festlegen"/> - <text name="hand_label"> - Handhaltung - </text> - <combo_box label="" name="hand_pose_combo" tool_tip="Steuert während der Animation die Bewegung der Hände"> - <combo_box.item label="Dehnen" name="Spread"/> - <combo_box.item label="Entspannt" name="Relaxed"/> - <combo_box.item label="Beide zeigen" name="PointBoth"/> - <combo_box.item label="Faust" name="Fist"/> - <combo_box.item label="Links entspannt" name="RelaxedLeft"/> - <combo_box.item label="Nach links zeigen" name="PointLeft"/> - <combo_box.item label="Linke Faust" name="FistLeft"/> - <combo_box.item label="Rechts entspannt" name="RelaxedRight"/> - <combo_box.item label="Nach rechts zeigen" name="PointRight"/> - <combo_box.item label="Rechte Faust" name="FistRight"/> - <combo_box.item label="Rechts salutieren" name="SaluteRight"/> - <combo_box.item label="Tippt" name="Typing"/> - <combo_box.item label="Friedensrecht" name="PeaceRight"/> - </combo_box> - <text name="emote_label"> - Ausdruck - </text> - <combo_box label="" name="emote_combo" tool_tip="Steuert Gesichtsregungen während der Animation"> - <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."> - <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"/> - <button bottom_delta="-32" label="" name="play_btn" tool_tip="Ihre Animation abspielen"/> - <button name="pause_btn" tool_tip="Ihre Animation pausieren"/> - <button label="" name="stop_btn" tool_tip="Animation anhalten"/> - <slider label="" name="playback_slider"/> - <text name="bad_animation_text"> - Animationsdatei konnte nicht gelesen werden. - -Wir empfehlen exportierte BVH-Dateien aus Poser 4. - </text> - <button label="Hochladen ([AMOUNT] L$)" name="ok_btn" width="160"/> - <button label="Abbrechen" left="180" name="cancel_btn" width="88"/> -</floater> diff --git a/indra/newview/skins/default/xui/de/floater_autoreplace.xml b/indra/newview/skins/default/xui/de/floater_autoreplace.xml new file mode 100644 index 0000000000..0c774990ef --- /dev/null +++ b/indra/newview/skins/default/xui/de/floater_autoreplace.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="autoreplace_floater" title="Einstellungen für automatische Ersetzung..."> + <check_box label="Automatische Ersetzung aktivieren..." name="autoreplace_enable" tool_tip="Eines oder mehrere Schlüsselwörter bei der Eingabe von Chat-Text durch die entsprechende Ersetzung substituieren"/> + <button label="Liste importieren..." name="autoreplace_import_list" tool_tip="Exportierte Liste aus einer Datei laden."/> + <button label="Liste exportieren..." name="autoreplace_export_list" tool_tip="Ausgewählte Liste zur Weitergabe in einer Datei speichern."/> + <button label="Neue Liste..." name="autoreplace_new_list" tool_tip="Neue Liste erstellen."/> + <button label="Liste löschen" name="autoreplace_delete_list" tool_tip="Ausgewählte Liste löschen."/> + <button name="autoreplace_list_up" tool_tip="Dieser Liste eine höhere Priorität einräumen."/> + <button name="autoreplace_list_down" tool_tip="Dieser Liste eine niedrigere Priorität einräumen."/> + <scroll_list name="autoreplace_list_replacements"> + <scroll_list.columns label="Schlüsselwort" name="keyword"/> + <scroll_list.columns label="Ersetzung" name="replacement"/> + </scroll_list> + <button label="Hinzufügen..." name="autoreplace_add_entry"/> + <button label="Entfernen" name="autoreplace_delete_entry"/> + <button label="Eintrag speichern" name="autoreplace_save_entry" tool_tip="Diesen Eintrag speichern."/> + <button label="Änderungen speichern" name="autoreplace_save_changes" tool_tip="Alle Änderungen speichern."/> + <button label="Abbrechen" name="autoreplace_cancel" tool_tip="Alle Änderungen löschen."/> +</floater> +<!-- + <text + top_pad="10" + left="10" + height="16" + width="260" + follows="left|top" + halign="center" + mouse_opaque="true" + name="autoreplace_text2"> + Entries + </text> +--> diff --git a/indra/newview/skins/default/xui/de/floater_chat_bar.xml b/indra/newview/skins/default/xui/de/floater_chat_bar.xml index 2464a55665..ab77d4dae5 100644 --- a/indra/newview/skins/default/xui/de/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/de/floater_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="chat_bar" title="CHAT IN DER NÄHE"> +<floater name="nearby_chat" title="CHAT IN DER NÄHE"> <panel name="bottom_panel"> <line_editor label="Zum Chatten hier klicken." name="chat_box" tool_tip="Eingabetaste zum Sprechen, Strg+Eingabe zum Rufen"/> <button name="show_nearby_chat" tool_tip="Chatprotokoll in der Nähe ein-/ausblenden"/> diff --git a/indra/newview/skins/default/xui/de/floater_inventory.xml b/indra/newview/skins/default/xui/de/floater_inventory.xml deleted file mode 100644 index d9b7c30fd2..0000000000 --- a/indra/newview/skins/default/xui/de/floater_inventory.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="MEIN INVENTAR"> - <floater.string name="Title"> - MEIN INVENTAR - </floater.string> - <floater.string name="TitleFetching"> - MEIN INVENTAR ([ITEM_COUNT] Objekte werden abgerufen...) [FILTER] - </floater.string> - <floater.string name="TitleCompleted"> - MEIN INVENTAR ([ITEM_COUNT] Objekte) [FILTER] - </floater.string> - <floater.string name="Fetched"> - Abgerufen - </floater.string> - <panel label="Inventar" name="Inventory Panel"/> -</floater> diff --git a/indra/newview/skins/default/xui/de/floater_model_preview.xml b/indra/newview/skins/default/xui/de/floater_model_preview.xml index 4af8d67686..4285462bc8 100644 --- a/indra/newview/skins/default/xui/de/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/de/floater_model_preview.xml @@ -92,19 +92,54 @@ <text initial_value="Dreiecke" name="triangles" value="Dreiecke"/> <text initial_value="Scheitelpunkte" name="vertices" value="Scheitelpunkte"/> <text initial_value="Hoch" name="high_label" value="Hoch"/> + <combo_box name="lod_source_high"> + <item name="Load from file" value="Aus Datei laden"/> + <item name="Generate" value="Generieren"/> + </combo_box> <button label="Durchsuchen..." name="lod_browse_high"/> + <combo_box name="lod_mode_high"> + <item name="Triangle Limit" value="Dreiecklimit"/> + <item name="Error Threshold" value="Fehlerschwelle"/> + </combo_box> <text initial_value="0" name="high_triangles" value="0"/> <text initial_value="0" name="high_vertices" value="0"/> <text initial_value="Mittel" name="medium_label" value="Mittel"/> + <combo_box name="lod_source_medium"> + <item name="Load from file" value="Aus Datei laden"/> + <item name="Generate" value="Generieren"/> + <item name="Use LoD above" value="Detailstufe oben verwenden"/> + </combo_box> <button label="Durchsuchen..." name="lod_browse_medium"/> + <combo_box name="lod_mode_medium"> + <item name="Triangle Limit" value="Dreiecklimit"/> + <item name="Error Threshold" value="Fehlerschwelle"/> + </combo_box> <text initial_value="0" name="medium_triangles" value="0"/> <text initial_value="0" name="medium_vertices" value="0"/> <text initial_value="Niedrig" name="low_label" value="Niedrig"/> + <combo_box name="lod_source_low"> + <item name="Load from file" value="Aus Datei laden"/> + <item name="Generate" value="Generieren"/> + <item name="Use LoD above" value="Detailstufe oben verwenden"/> + </combo_box> <button label="Durchsuchen..." name="lod_browse_low"/> + <combo_box name="lod_mode_low"> + <item name="Triangle Limit" value="Dreiecklimit"/> + <item name="Error Threshold" value="Fehlerschwelle"/> + </combo_box> <text initial_value="0" name="low_triangles" value="0"/> <text initial_value="0" name="low_vertices" value="0"/> <text initial_value="Niedrigste" name="lowest_label" value="Niedrigste"/> + <combo_box name="lod_source_lowest"> + <item name="Load from file" value="Aus Datei laden"/> + <item name="Generate" value="Generieren"/> + <item name="Use LoD above" value="Detailstufe oben verwenden"/> + </combo_box> <button label="Durchsuchen..." name="lod_browse_lowest"/> + <combo_box name="lod_mode_lowest"> + <item name="Triangle Limit" value="Dreiecklimit"/> + <item name="Error Threshold" value="Fehlerschwelle"/> + </combo_box> <text initial_value="0" name="lowest_triangles" value="0"/> <text initial_value="0" name="lowest_vertices" value="0"/> <check_box label="Normalen generieren" name="gen_normals"/> diff --git a/indra/newview/skins/default/xui/de/floater_nearby_chat.xml b/indra/newview/skins/default/xui/de/floater_nearby_chat.xml deleted file mode 100644 index 2aabbb18f2..0000000000 --- a/indra/newview/skins/default/xui/de/floater_nearby_chat.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="nearby_chat" title="CHAT IN DER NÄHE"> - <check_box label="Chat übersetzen" name="translate_chat_checkbox"/> -</floater> diff --git a/indra/newview/skins/default/xui/de/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/de/floater_pathfinding_characters.xml new file mode 100644 index 0000000000..7096dbc156 --- /dev/null +++ b/indra/newview/skins/default/xui/de/floater_pathfinding_characters.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_characters" title="Pathfinding-Figuren"> + <floater.string name="messaging_get_inprogress"> + Pathfinding-Figuren werden abgerufen... + </floater.string> + <floater.string name="messaging_get_error"> + Fehler beim Abrufen von Pathfinding-Figuren. + </floater.string> + <floater.string name="messaging_complete_none_found"> + Keine Pathfinding-Figuren. + </floater.string> + <floater.string name="messaging_complete_available"> + [NUM_SELECTED] Figuren von [NUM_TOTAL] ausgewählt. + </floater.string> + <floater.string name="messaging_not_enabled"> + Pathfinding ist in dieser Region nicht aktiviert. + </floater.string> + <floater.string name="character_cpu_time"> + [CPU_TIME] µs + </floater.string> + <floater.string name="character_owner_loading"> + [Laden] + </floater.string> + <floater.string name="character_owner_unknown"> + [Unbekannt] + </floater.string> + <floater.string name="character_owner_group"> + [Gruppe] + </floater.string> + <panel> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Name" name="name"/> + <scroll_list.columns label="Beschreibung" name="description"/> + <scroll_list.columns label="Eigentümer" name="owner"/> + <scroll_list.columns label="CPU" name="cpu_time"/> + <scroll_list.columns label="Höhe" name="altitude"/> + </scroll_list> + <text name="messaging_status"> + Figuren: + </text> + <button label="Liste aktualisieren" name="refresh_objects_list"/> + <button label="Alle auswählen" name="select_all_objects"/> + <button label="Keine auswählen" name="select_none_objects"/> + </panel> + <panel> + <text name="actions_label"> + Aktionen für ausgewählte Figuren: + </text> + <check_box label="Beacon anzeigen" name="show_beacon"/> + <check_box label="Physikkapsel anzeigen" name="show_physics_capsule"/> + <button label="Nehmen" name="take_objects"/> + <button label="Kopie nehmen" name="take_copy_objects"/> + <button label="Dorthin teleportieren" name="teleport_me_to_object" tool_tip="Nur aktiviert, wenn eine Figur ausgewählt ist."/> + <button label="Zurückgeben" name="return_objects"/> + <button label="Löschen" name="delete_objects"/> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/de/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/de/floater_pathfinding_console.xml new file mode 100644 index 0000000000..ebf8f01632 --- /dev/null +++ b/indra/newview/skins/default/xui/de/floater_pathfinding_console.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_console" title="Pathfinding-Ansicht/-Test"> + <floater.string name="navmesh_viewer_status_library_not_implemented"> + Pathfinding-Bibliotheksimplementierung nicht gefunden. + </floater.string> + <floater.string name="navmesh_viewer_status_region_not_enabled"> + Pathfinding ist in dieser Region nicht aktiviert. + </floater.string> + <floater.string name="navmesh_viewer_status_region_loading"> + Warten, bis Region geladen ist. + </floater.string> + <floater.string name="navmesh_viewer_status_checking_version"> + Navmesh-Status wird geprüft. + </floater.string> + <floater.string name="navmesh_viewer_status_downloading"> + Navmesh wird heruntergeladen. + </floater.string> + <floater.string name="navmesh_viewer_status_updating"> + Navmesh hat sich auf dem Server geändert. Neuestes Navmesh wird heruntergeladen. + </floater.string> + <floater.string name="navmesh_viewer_status_has_navmesh"> + Neuestes Navmesh wurde heruntergeladen. + </floater.string> + <floater.string name="navmesh_viewer_status_error"> + Navmesh kann nicht heruntergeladen werden. + </floater.string> + <floater.string name="navmesh_simulator_status_pending"> + Navmesh weist ausstehende Änderungen auf. + </floater.string> + <floater.string name="navmesh_simulator_status_building"> + Navmesh wird erstellt. + </floater.string> + <floater.string name="navmesh_simulator_status_some_pending"> + Einige Navmesh-Regionen weisen ausstehende Änderungen auf. + </floater.string> + <floater.string name="navmesh_simulator_status_some_building"> + Einige Navmesh-Regionen werden erstellt. + </floater.string> + <floater.string name="navmesh_simulator_status_pending_and_building"> + Einige Navmesh-Regionen weisen ausstehende Änderungen auf und andere werden erstellt. + </floater.string> + <floater.string name="navmesh_simulator_status_complete"> + Navmesh ist aktuell. + </floater.string> + <floater.string name="pathing_library_not_implemented"> + Pathfinding-Bibliotheksimplementierung nicht gefunden. + </floater.string> + <floater.string name="pathing_region_not_enabled"> + Pathfinding ist in dieser Region nicht aktiviert. + </floater.string> + <floater.string name="pathing_choose_start_and_end_points"> + Bitte wählen Sie Anfangs- und Endpunkte aus. + </floater.string> + <floater.string name="pathing_choose_start_point"> + Bitte wählen Sie einen Anfangspunkt aus. + </floater.string> + <floater.string name="pathing_choose_end_point"> + Bitte wählen Sie einen Endpunkt aus. + </floater.string> + <floater.string name="pathing_path_valid"> + Pfad wird orange dargestellt. + </floater.string> + <floater.string name="pathing_path_invalid"> + Zwischen den gewählten Punkten wurde kein Pfad gefunden. + </floater.string> + <floater.string name="pathing_error"> + Fehler bei der Pfaderstellung aufgetreten. + </floater.string> + <tab_container name="view_test_tab_container"> + <panel label="Anzeigen" name="view_panel"> + <text name="show_label"> + Anzeigen: + </text> + <check_box label="Welt" name="show_world"/> + <check_box label="Nur bewegliche Objekte" name="show_world_movables_only"/> + <check_box label="Navmesh" name="show_navmesh"/> + <text name="show_walkability_label"> + Begehbarkeitskarte anzeigen: + </text> + <combo_box name="show_heatmap_mode"> + <combo_box.item label="Nicht anzeigen" name="show_heatmap_mode_none"/> + <combo_box.item label="Figurentyp A" name="show_heatmap_mode_a"/> + <combo_box.item label="Figurentyp B" name="show_heatmap_mode_b"/> + <combo_box.item label="Figurentyp C" name="show_heatmap_mode_c"/> + <combo_box.item label="Figurentyp D" name="show_heatmap_mode_d"/> + </combo_box> + <check_box label="Begehbare Objekte" name="show_walkables"/> + <check_box label="Materialvolumen" name="show_material_volumes"/> + <check_box label="Statische Hinternisse" name="show_static_obstacles"/> + <check_box label="Ausschlussvolumen" name="show_exclusion_volumes"/> + <check_box label="Wasserebene" name="show_water_plane"/> + <check_box label="Mit Röntgenblick" name="show_xray"/> + </panel> + <panel label="Pfad testen" name="test_panel"> + <text name="ctrl_click_label"> + Bei gedrückter Strg-Taste klicken, um Anfangspunkt auszuwählen. + </text> + <text name="shift_click_label"> + Bei gedrückter Umschalttaste klicken, um Endpunkt auszuwählen. + </text> + <text name="character_width_label"> + Figurenbreite + </text> + <slider name="character_width" value="1"/> + <text name="character_width_unit_label"> + m + </text> + <text name="character_type_label"> + Figurentyp + </text> + <combo_box name="path_character_type"> + <combo_box.item label="Keine" name="path_character_type_none"/> + <combo_box.item label="A" name="path_character_type_a"/> + <combo_box.item label="B" name="path_character_type_b"/> + <combo_box.item label="C" name="path_character_type_c"/> + <combo_box.item label="D" name="path_character_type_d"/> + </combo_box> + <button label="Pfad löschen" name="clear_path"/> + </panel> + </tab_container> +</floater> diff --git a/indra/newview/skins/default/xui/de/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/de/floater_pathfinding_linksets.xml new file mode 100644 index 0000000000..0d3ba59efb --- /dev/null +++ b/indra/newview/skins/default/xui/de/floater_pathfinding_linksets.xml @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_linksets" title="Pathfinding-Linksets"> + <floater.string name="messaging_get_inprogress"> + Pathfinding-Linksets werden abgerufen... + </floater.string> + <floater.string name="messaging_get_error"> + Fehler beim Abrufen von Pathfinding-Linksets. + </floater.string> + <floater.string name="messaging_set_inprogress"> + Ausgewählte Pathfinding-Linksets werden geändert... + </floater.string> + <floater.string name="messaging_set_error"> + Fehler beim Ändern der ausgewählten Pathfinding-Linksets. + </floater.string> + <floater.string name="messaging_complete_none_found"> + Keine Pathfinding-Linksets. + </floater.string> + <floater.string name="messaging_complete_available"> + [NUM_SELECTED] Linksets von [NUM_TOTAL] ausgewählt. + </floater.string> + <floater.string name="messaging_not_enabled"> + Pathfinding ist in dieser Region nicht aktiviert. + </floater.string> + <floater.string name="linkset_terrain_name"> + [Terrain] + </floater.string> + <floater.string name="linkset_terrain_description"> + -- + </floater.string> + <floater.string name="linkset_terrain_owner"> + -- + </floater.string> + <floater.string name="linkset_terrain_scripted"> + -- + </floater.string> + <floater.string name="linkset_terrain_land_impact"> + -- + </floater.string> + <floater.string name="linkset_terrain_dist_from_you"> + -- + </floater.string> + <floater.string name="linkset_owner_loading"> + [Laden] + </floater.string> + <floater.string name="linkset_owner_unknown"> + [Unbekannt] + </floater.string> + <floater.string name="linkset_owner_group"> + [Gruppe] + </floater.string> + <floater.string name="linkset_is_scripted"> + Ja + </floater.string> + <floater.string name="linkset_is_not_scripted"> + Nein + </floater.string> + <floater.string name="linkset_is_unknown_scripted"> + Unbekannt + </floater.string> + <floater.string name="linkset_use_walkable"> + Begehbar + </floater.string> + <floater.string name="linkset_use_static_obstacle"> + Statisches Hinternis + </floater.string> + <floater.string name="linkset_use_dynamic_obstacle"> + Bewegliches Hinternis + </floater.string> + <floater.string name="linkset_use_material_volume"> + Materialvolumen + </floater.string> + <floater.string name="linkset_use_exclusion_volume"> + Ausschlussvolumen + </floater.string> + <floater.string name="linkset_use_dynamic_phantom"> + Bewegliches Phantom + </floater.string> + <floater.string name="linkset_is_terrain"> + [nicht änderbar] + </floater.string> + <floater.string name="linkset_is_restricted_state"> + [beschränkt] + </floater.string> + <floater.string name="linkset_is_non_volume_state"> + [konkav] + </floater.string> + <floater.string name="linkset_is_restricted_non_volume_state"> + [beschränkt,konkav] + </floater.string> + <floater.string name="linkset_choose_use"> + Linkset-Nutzung auswählen... + </floater.string> + <panel> + <combo_box name="filter_by_linkset_use"> + <combo_box.item label="Nach Linkset-Nutzung filtern..." name="filter_by_linkset_use_none"/> + <combo_box.item label="Begehbar" name="filter_by_linkset_use_walkable"/> + <combo_box.item label="Statisches Hinternis" name="filter_by_linkset_use_static_obstacle"/> + <combo_box.item label="Bewegliches Hinternis" name="filter_by_linkset_use_dynamic_obstacle"/> + <combo_box.item label="Materialvolumen" name="filter_by_linkset_use_material_volume"/> + <combo_box.item label="Ausschlussvolumen" name="filter_by_linkset_use_exclusion_volume"/> + <combo_box.item label="Bewegliches Phantom" name="filter_by_linkset_use_dynamic_phantom"/> + </combo_box> + <button label="Anwenden" name="apply_filters"/> + <button label="Entfernen" name="clear_filters"/> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Name (Hauptprim)" name="name"/> + <scroll_list.columns label="Beschreibung (Hauptprim)" name="description"/> + <scroll_list.columns label="Eigentümer" name="owner"/> + <scroll_list.columns label="Geskriptet" name="scripted"/> + <scroll_list.columns label="Belastung" name="land_impact"/> + <scroll_list.columns label="Abstand" name="dist_from_you"/> + <scroll_list.columns label="Linkset-Nutzung" name="linkset_use"/> + <scroll_list.columns label="A %" name="a_percent"/> + <scroll_list.columns label="B %" name="b_percent"/> + <scroll_list.columns label="C %" name="c_percent"/> + <scroll_list.columns label="D %" name="d_percent"/> + </scroll_list> + <text name="messaging_status"> + Linksets: + </text> + <button label="Liste aktualisieren" name="refresh_objects_list"/> + <button label="Alle auswählen" name="select_all_objects"/> + <button label="Keine auswählen" name="select_none_objects"/> + </panel> + <panel> + <check_box label="Beacon anzeigen" name="show_beacon"/> + <button label="Nehmen" name="take_objects"/> + <button label="Kopie nehmen" name="take_copy_objects"/> + <button label="Dorthin teleportieren" name="teleport_me_to_object"/> + <button label="Zurückgeben" name="return_objects"/> + <button label="Löschen" name="delete_objects"/> + </panel> + <panel> + <text name="walkability_coefficients_label"> + Begehbarkeit: + </text> + <text name="edit_a_label"> + A + </text> + <line_editor name="edit_a_value" tool_tip="Begehbarkeit für Figuren vom Typ A. Ein Beispiel für diesen Typ wäre „Humanoid“."/> + <text name="edit_b_label"> + B + </text> + <line_editor name="edit_b_value" tool_tip="Begehbarkeit für Figuren vom Typ B. Ein Beispiel für diesen Typ wäre „Kreatur“."/> + <text name="edit_c_label"> + C + </text> + <line_editor name="edit_c_value" tool_tip="Begehbarkeit für Figuren vom Typ C. Ein Beispiel für diesen Typ wäre „Mechanisch“."/> + <text name="edit_d_label"> + D + </text> + <line_editor name="edit_d_value" tool_tip="Begehbarkeit für Figuren vom Typ D. Ein Beispiel für diesen Typ wäre „Anderer“."/> + <button label="Änderungen übernehmen" name="apply_edit_values"/> + <text name="suggested_use_a_label"> + (Humanoid) + </text> + <text name="suggested_use_b_label"> + (Kreatur) + </text> + <text name="suggested_use_c_label"> + (Mechanisch) + </text> + <text name="suggested_use_d_label"> + (Anderer) + </text> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/de/floater_postcard.xml b/indra/newview/skins/default/xui/de/floater_postcard.xml deleted file mode 100644 index 28af0183cb..0000000000 --- a/indra/newview/skins/default/xui/de/floater_postcard.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="FOTO EMAILEN"> - <text name="to_label"> - E-Mail des Empfängers: - </text> - <text name="from_label"> - Ihre E-Mail: - </text> - <text name="name_label"> - Ihr Name: - </text> - <text name="subject_label"> - Betreff: - </text> - <line_editor label="Betreff hier eingeben." name="subject_form"/> - <text name="msg_label"> - Nachricht: - </text> - <text_editor name="msg_form"> - Nachricht hier eingeben. - </text_editor> - <text name="fine_print"> - Wenn sich der Empfänger bei SL anmeldet, erhalten Sie einen Empfehlungsbonus. - </text> - <button label="Abbrechen" name="cancel_btn"/> - <button label="Senden" name="send_btn"/> - <text name="default_subject"> - Postkarte aus [SECOND_LIFE]. - </text> - <text name="default_message"> - Sehen Sie hier! - </text> - <string name="upload_message"> - Wird gesendet... - </string> -</floater> diff --git a/indra/newview/skins/default/xui/de/floater_spellcheck.xml b/indra/newview/skins/default/xui/de/floater_spellcheck.xml new file mode 100644 index 0000000000..213db277b6 --- /dev/null +++ b/indra/newview/skins/default/xui/de/floater_spellcheck.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_floater" title="Einstellungen für Rechtschreibprüfung"> + <check_box label="Rechtschreibprüfung aktivieren" name="spellcheck_enable"/> + <text name="spellcheck_main"> + Hauptwörterbuch: + </text> + <text label="Protokolle:" name="spellcheck_additional"> + Zusätzliche Wörterbücher: + </text> + <text name="spellcheck_available"> + Verfügbar + </text> + <text name="spellcheck_active"> + Aktiv + </text> + <button label="Entfernen" name="spellcheck_remove_btn"/> + <button label="Importieren..." name="spellcheck_import_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/de/floater_spellcheck_import.xml b/indra/newview/skins/default/xui/de/floater_spellcheck_import.xml new file mode 100644 index 0000000000..374c0fc0d2 --- /dev/null +++ b/indra/newview/skins/default/xui/de/floater_spellcheck_import.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_import" title="Wörterbuch importieren"> + <button label="Durchsuchen" label_selected="Durchsuchen" name="dictionary_path_browse"/> + <button label="Importieren" name="ok_btn"/> + <button label="Abbrechen" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/de/floater_stats.xml b/indra/newview/skins/default/xui/de/floater_stats.xml index 92d057a4fe..f3239f73c7 100644 --- a/indra/newview/skins/default/xui/de/floater_stats.xml +++ b/indra/newview/skins/default/xui/de/floater_stats.xml @@ -53,7 +53,13 @@ <stat_bar label="Objekte" name="simobjects"/> <stat_bar label="Aktive Objekte" name="simactiveobjects"/> <stat_bar label="Aktive Skripts" name="simactivescripts"/> + <stat_bar label="Skripts ausgeführt" name="simpctscriptsrun"/> <stat_bar label="Skript-Events" name="simscripteps"/> + <stat_view label="Pathfinding" name="simpathfinding"> + <stat_bar label="AI-Schrittzeit" name="simsimaistepmsec"/> + <stat_bar label="Übersprungene Silhouettenschritte" name="simsimskippedsilhouettesteps"/> + <stat_bar label="Figuren aktualisiert" name="simsimpctsteppedcharacters"/> + </stat_view> <stat_bar label="Paketeingang" name="siminpps"/> <stat_bar label="Paketausgang" name="simoutpps"/> <stat_bar label="Ausstehende Downloads" name="simpendingdownloads"/> diff --git a/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml index 5bb96bebc4..9585622516 100644 --- a/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml @@ -20,6 +20,8 @@ <button label="Leer" label_selected="Leer" name="Blank"/> <button label="Keine" label_selected="Keine" name="None"/> <button label="" label_selected="" name="Pipette"/> + <check_box initial_value="true" label="Live-Vorschau" name="apply_immediate_check"/> + <text name="preview_disabled" value="Vorschau deaktiviert"/> <filter_editor label="Texturen filtern" name="inventory search editor"/> <check_box initial_value="false" label="Ordner anzeigen" name="show_folders_check"/> <button label="Hinzufügen" label_selected="Hinzufügen" name="l_add_btn"/> @@ -31,5 +33,4 @@ </scroll_list> <button label="OK" label_selected="OK" name="Select"/> <button label="Abbrechen" label_selected="Abbrechen" name="Cancel"/> - <check_box initial_value="true" label="Jetzt übernehmen" name="apply_immediate_check"/> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/de/floater_texture_fetch_debugger.xml index 0f407cb15c..97b0364832 100644 --- a/indra/newview/skins/default/xui/de/floater_texture_fetch_debugger.xml +++ b/indra/newview/skins/default/xui/de/floater_texture_fetch_debugger.xml @@ -45,10 +45,23 @@ <text name="total_time_refetch_vis_cache_label"> 15, Neuabruf sichtbarer Texturen aus Cache, Zeit: [TIME] s, Abrufmenge: [SIZE2] KB, [PIXEL] MPixel </text> + <text name="total_time_refetch_all_cache_label"> + 16, Neuabruf aller Texturen aus Cache, Zeit: [TIME] s, Abrufmenge: [SIZE2] KB, [PIXEL] MPixel + </text> <text name="total_time_refetch_vis_http_label"> - 16, Neuabruf sichtbarer Texturen von HTTP, Zeit: [TIME] s, Abrufmenge: [SIZE2] KB, [PIXEL] MPixel + 17, Neuabruf sichtbarer Texturen von HTTP, Zeit: [TIME] s, Abrufmenge: [SIZE2] KB, [PIXEL] MPixel + </text> + <text name="total_time_refetch_all_http_label"> + 18, Neuabruf aller Texturen von HTTP, Zeit: [TIME] s, Abrufmenge: [SIZE2] KB, [PIXEL] MPixel + </text> + <spinner label="19, Verhältnis Texel/Pixel:" name="texel_pixel_ratio"/> + <text name="texture_source_label"> + 20, Texturquelle: </text> - <spinner label="17, Verhältnis Texel/Pixel:" name="texel_pixel_ratio"/> + <radio_group name="texture_source"> + <radio_item label="Cache + HTTP" name="0"/> + <radio_item label="Nur HTTP" name="1"/> + </radio_group> <button label="Starten" name="start_btn"/> <button label="Zurücksetzen" name="clear_btn"/> <button label="Schließen" name="close_btn"/> @@ -58,5 +71,7 @@ <button label="Decodieren" name="decode_btn"/> <button label="GL-Textur" name="gl_btn"/> <button label="Neuabruf sichtbarer Texturen (Cache)" name="refetchviscache_btn"/> + <button label="Neuabruf des gesamten Cache" name="refetchallcache_btn"/> <button label="Neuabruf sichtbarer Texturen (HTTP)" name="refetchvishttp_btn"/> + <button label="Neuabruf des gesamten HTTP" name="refetchallhttp_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml index dee89b28e5..5f5c34a5cf 100644 --- a/indra/newview/skins/default/xui/de/floater_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_tools.xml @@ -148,6 +148,12 @@ <panel.string name="text modify info 4"> Sie können diese Objekte nicht bearbeiten. </panel.string> + <panel.string name="text modify info 5"> + Dieses Objekt kann nicht über eine Regionsgrenze hinweg geändert werden + </panel.string> + <panel.string name="text modify info 6"> + Diese Objekte können nicht über eine Regionsgrenze hinweg geändert werden + </panel.string> <panel.string name="text modify warning"> Gesamtes Objekt wählen, um Berechtigungen festzulegen. </panel.string> @@ -197,12 +203,12 @@ <combo_box.item label="Zoom" name="Zoom"/> </combo_box> <check_box label="Zum Verkauf:" name="checkbox for sale"/> + <spinner label="L$" name="Edit Cost"/> <combo_box name="sale type"> <combo_box.item label="Kopie" name="Copy"/> <combo_box.item label="Inhalt" name="Contents"/> <combo_box.item label="Original" name="Original"/> </combo_box> - <spinner label="Preis: L$" name="Edit Cost"/> <check_box label="In Suche anzeigen" name="search_check" tool_tip="Dieses Objekt in Suchergebnissen anzeigen"/> <panel name="perms_build"> <text name="perm_modify"> @@ -238,6 +244,11 @@ F: </text> </panel> + <panel name="pathfinding_attrs_panel"> + <text name="pathfinding_attributes_label"> + Pathfinding-Attribute: + </text> + </panel> </panel> <panel label="Objekt" name="Object"> <check_box label="Gesperrt" name="checkbox locked" tool_tip="Verhindert, dass das Objekt verschoben oder gelöscht wird. Oft beim Bauen nützlich, um unbeabsichtigte Bearbeitungen zu vermeiden."/> diff --git a/indra/newview/skins/default/xui/de/floater_top_objects.xml b/indra/newview/skins/default/xui/de/floater_top_objects.xml index d2055a53db..f8130c6379 100644 --- a/indra/newview/skins/default/xui/de/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/de/floater_top_objects.xml @@ -9,9 +9,6 @@ <floater.string name="scripts_score_label"> Zeit </floater.string> - <floater.string name="scripts_mono_time_label"> - Mono-Uhrzeit: - </floater.string> <floater.string name="top_colliders_title"> Top-Kollisionsobjekte </floater.string> @@ -32,9 +29,10 @@ <scroll_list.columns label="Name" name="name" width="135"/> <scroll_list.columns label="Eigentümer" name="owner"/> <scroll_list.columns label="Position" name="location" width="125"/> + <scroll_list.columns label="Parzelle" name="parcel"/> <scroll_list.columns label="Uhrzeit" name="time"/> - <scroll_list.columns label="Mono-Uhrzeit:" name="mono_time"/> <scroll_list.columns label="URLs" name="URLs"/> + <scroll_list.columns label="Speicher (KB)" name="memory"/> </scroll_list> <text name="id_text"> Objekt-ID: @@ -42,12 +40,16 @@ <button label="Beacon anzeigen" name="show_beacon_btn"/> <text name="obj_name_text"> Objektname: - </text> + </text> <button label="Filter" name="filter_object_btn"/> <text name="owner_name_text"> Eigentümer: - </text> + </text> <button label="Filter" name="filter_owner_btn"/> + <text name="parcel_name_text"> + Parzelle: + </text> + <button label="Filtern" name="filter_parcel_btn"/> <button label="Aktualisieren" name="refresh_btn"/> <button label="Auswahl zurückgeben" name="return_selected_btn" width="134"/> <button label="Alle zurückgeben" left="150" name="return_all_btn" width="134"/> diff --git a/indra/newview/skins/default/xui/de/menu_bottomtray.xml b/indra/newview/skins/default/xui/de/menu_bottomtray.xml deleted file mode 100644 index cb0082f944..0000000000 --- a/indra/newview/skins/default/xui/de/menu_bottomtray.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<menu name="hide_camera_move_controls_menu"> - <menu_item_check label="Schaltfläche „Sprechen“" name="EnableVoiceChat"/> - <menu_item_check label="Schaltfläche Gesten" name="ShowGestureButton"/> - <menu_item_check label="Schaltfläche Bewegungssteuerung" name="ShowMoveButton"/> - <menu_item_check label="Schaltfläche Ansicht" name="ShowCameraButton"/> - <menu_item_check label="Schaltfläche Foto" name="ShowSnapshotButton"/> - <menu_item_check label="Schaltfläche „Bauen“" name="ShowBuildButton"/> - <menu_item_check label="Schaltfläche „Suchen“" name="ShowSearchButton"/> - <menu_item_check label="Schaltfläche „Karte“" name="ShowWorldMapButton"/> - <menu_item_check label="Minikarten-Schaltfläche" name="ShowMiniMapButton"/> - <menu_item_call label="Ausschneiden" name="NearbyChatBar_Cut"/> - <menu_item_call label="Kopieren" name="NearbyChatBar_Copy"/> - <menu_item_call label="Einfügen" name="NearbyChatBar_Paste"/> - <menu_item_call label="Löschen" name="NearbyChatBar_Delete"/> - <menu_item_call label="Alle auswählen" name="NearbyChatBar_Select_All"/> -</menu> diff --git a/indra/newview/skins/default/xui/de/menu_im_well_button.xml b/indra/newview/skins/default/xui/de/menu_im_well_button.xml deleted file mode 100644 index f464b71f4a..0000000000 --- a/indra/newview/skins/default/xui/de/menu_im_well_button.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<context_menu name="IM Well Button Context Menu"> - <menu_item_call label="Alle schließen" name="Close All"/> -</context_menu> diff --git a/indra/newview/skins/default/xui/de/menu_inventory.xml b/indra/newview/skins/default/xui/de/menu_inventory.xml index 39b3099336..cd2fca313e 100644 --- a/indra/newview/skins/default/xui/de/menu_inventory.xml +++ b/indra/newview/skins/default/xui/de/menu_inventory.xml @@ -68,6 +68,7 @@ <menu_item_call label="Systemordner löschen" name="Delete System Folder"/> <menu_item_call label="Konferenz-Chat starten" name="Conference Chat Folder"/> <menu_item_call label="Wiedergeben/Abspielen" name="Sound Play"/> + <menu_item_call label="SLurl kopieren" name="url_copy"/> <menu_item_call label="Landmarken-Info" name="About Landmark"/> <menu_item_call label="Inworld abspielen" name="Animation Play"/> <menu_item_call label="Lokal abspielen" name="Animation Audition"/> diff --git a/indra/newview/skins/default/xui/de/menu_mode_change.xml b/indra/newview/skins/default/xui/de/menu_mode_change.xml deleted file mode 100644 index b8090018b7..0000000000 --- a/indra/newview/skins/default/xui/de/menu_mode_change.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<toggleable_menu name="Mode Change"> - <menu_item_check label="Basis" name="BasicMode"/> - <menu_item_check label="Erweitert" name="AdvancedMode"/> -</toggleable_menu> diff --git a/indra/newview/skins/default/xui/de/menu_object.xml b/indra/newview/skins/default/xui/de/menu_object.xml index 412bd3ac04..9f44ced928 100644 --- a/indra/newview/skins/default/xui/de/menu_object.xml +++ b/indra/newview/skins/default/xui/de/menu_object.xml @@ -5,6 +5,8 @@ </menu_item_call> <menu_item_call label="Bearbeiten" name="Edit..."/> <menu_item_call label="Bauen" name="Build"/> + <menu_item_call label="In Linksets anzeigen" name="show_in_linksets"/> + <menu_item_call label="In Figuren anzeigen" name="show_in_characters"/> <menu_item_call label="Öffnen" name="Open"/> <menu_item_call label="Hier sitzen" name="Object Sit"/> <menu_item_call label="Aufstehen" name="Object Stand Up"/> diff --git a/indra/newview/skins/default/xui/de/menu_text_editor.xml b/indra/newview/skins/default/xui/de/menu_text_editor.xml index c00186c13e..2e33ed3416 100644 --- a/indra/newview/skins/default/xui/de/menu_text_editor.xml +++ b/indra/newview/skins/default/xui/de/menu_text_editor.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Text editor context menu"> + <menu_item_call label="(unbekannt)" name="Suggestion 1"/> + <menu_item_call label="(unbekannt)" name="Suggestion 2"/> + <menu_item_call label="(unbekannt)" name="Suggestion 3"/> + <menu_item_call label="(unbekannt)" name="Suggestion 4"/> + <menu_item_call label="(unbekannt)" name="Suggestion 5"/> + <menu_item_call label="Zum Wörterbuch hinzufügen" name="Add to Dictionary"/> + <menu_item_call label="Zur Ignorieren-Liste hinzufügen" name="Add to Ignore"/> <menu_item_call label="Ausschneiden" name="Cut"/> <menu_item_call label="Kopieren" name="Copy"/> <menu_item_call label="Einfügen" name="Paste"/> diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index 856f91e214..845df1f050 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -28,6 +28,7 @@ <menu_item_call label="Einstellungen..." name="Preferences"/> <menu_item_call label="Symbolleistenschaltflächen..." name="Toolbars"/> <menu_item_call label="Alle Steuerelemente ausblenden" name="Hide UI"/> + <menu_item_check label="HUD-Anhänge anzeigen" name="Show HUD Attachments"/> <menu_item_call label="[APP_NAME] schließen" name="Quit"/> </menu> <menu label="Unterhalten" name="Communicate"> @@ -39,6 +40,7 @@ <menu_item_call label="Freunde" name="My Friends"/> <menu_item_call label="Gruppen" name="My Groups"/> <menu_item_call label="Leute in der Nähe" name="Active Speakers"/> + <menu_item_call label="Blockierliste" name="Block List"/> </menu> <menu label="Welt" name="World"> <menu_item_call label="Landmarke für diesen Ort setzen" name="Create Landmark Here"/> @@ -124,6 +126,11 @@ <menu_item_call label="Skripts auf ausführen einstellen" name="Set Scripts to Running"/> <menu_item_call label="Skripts auf nicht ausführen einstellen" name="Set Scripts to Not Running"/> </menu> + <menu label="Pathfinding" name="Pathfinding"> + <menu_item_call label="Linksets..." name="pathfinding_linksets_menu_item"/> + <menu_item_call label="Figuren..." name="pathfinding_characters_menu_item"/> + <menu_item_call label="Anzeigen/Testen..." name="pathfinding_console_menu_item"/> + </menu> <menu label="Optionen" name="Options"> <menu_item_check label="Erweiterte Berechtigungen anzeigen" name="DebugPermissions"/> <menu_item_check label="Nur meine Objekte auswählen" name="Select Only My Objects"/> @@ -174,7 +181,6 @@ <menu_item_check label="Partikel ausblenden" name="Hide Particles"/> <menu_item_check label="Auswahl ausblenden" name="Hide Selected"/> <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> <menu label="Darstellungstypen" name="Rendering Types"> @@ -377,7 +383,6 @@ <menu_item_call label="Avatargeometry ein-/ausschalten" name="Toggle Character Geometry"/> <menu_item_call label="Männlich testen" name="Test Male"/> <menu_item_call label="Weiblich testen" name="Test Female"/> - <menu_item_call label="PG ein-/ausschalten" name="Toggle PG"/> <menu_item_check label="Avatarauswahl zulassen" name="Allow Select Avatar"/> </menu> <menu_item_call label="Param auf Standard erzwingen" name="Force Params to Default"/> diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index f7274d31e1..4b7a60b4eb 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -37,6 +37,12 @@ <button name="Help" text="$helptext"/> </form> </template> + <template name="okhelpignore"> + <form> + <button name="OK_okhelpignore" text="$yestext"/> + <button name="Help_okhelpignore" text="$helptext"/> + </form> + </template> <template name="yesnocancelbuttons"> <form> <button name="Yes" text="$yestext"/> @@ -367,13 +373,19 @@ Sie müssen den Benutzernamen Ihres Avatars eingeben. Sie benötigen ein Konto, um [SECOND_LIFE] betreten zu können. Möchten Sie jetzt ein Konto erstellen? <url name="url"> - https://join.secondlife.com/index.php?lang=de-DE + [create_account_url] </url> <usetemplate name="okcancelbuttons" notext="Erneut versuchen" yestext="Neues Benutzerkonto anlegen"/> </notification> <notification name="InvalidCredentialFormat"> Sie müssen entweder den Benutzernamen oder den Vor- und Nachnamen Ihres Avatars in das Feld „Benutzername“ eingeben und die Anmeldung dann erneut versuchen. </notification> + <notification name="InvalidGrid"> + „[GRID]“ ist keine gültige Grid-ID. + </notification> + <notification name="InvalidLocationSLURL"> + Ihre Startposition gibt kein gültiges Grid an. + </notification> <notification name="DeleteClassified"> Anzeige „[NAME]“ löschen? Gebühren werden nicht rückerstattet. @@ -479,8 +491,8 @@ Das Objekt ist möglicherweise außer Reichweite oder wurde gelöscht. Ein kompiliertes Skript konnte aus folgendem Grund nicht gespeichert werden: [REASON]. Speichern Sie das Skript bitte später. </notification> <notification name="StartRegionEmpty"> - Sie haben keine Start-Region festgelegt. -Bitte geben Sie den Namen der Region im Feld „Startposition“ ein oder wählen Sie „Mein letzter Standort“ oder „Mein Zuhause“ als Startposition aus. + Ihre Startregion ist nicht definiert. +Geben Sie den Namen der Region im Feld „Startposition“ ein oder wählen Sie „Mein letzter Standort“ oder „Mein Zuhause“ als Startposition aus. <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="CouldNotStartStopScript"> @@ -607,6 +619,9 @@ Sie können maximal [MAX] Objekte verknüpfen. Stellen Sie sicher, dass kein Objekt gesperrt ist und alle Objekte Ihnen gehören. </notification> + <notification name="CannotLinkPermanent"> + Objekte können nicht über Regionsgrenzen hinweg verknüpft werden. + </notification> <notification name="CannotLinkDifferentOwners"> Verknüpfung nicht möglich, da nicht alle Objekte denselben Eigentümer haben. @@ -991,6 +1006,41 @@ Sie sind nicht berechtigt, Land für die aktive Gruppe zu kaufen. <button name="Cancel" text="Abbrechen"/> </form> </notification> + <notification label="Automatische Ersetzungsliste hinzufügen" name="AddAutoReplaceList"> + Name für neue Liste: + <form name="form"> + <button name="SetName" text="OK"/> + </form> + </notification> + <notification label="Automatische Ersetzungsliste umbenennen" name="RenameAutoReplaceList"> + Der Name „[DUPNAME]“ wird bereits verwendet. + Geben Sie einen neuen eindeutigen Namen ein: + <form name="form"> + <button name="ReplaceList" text="Aktuelle Liste ersetzen"/> + <button name="SetName" text="Neuen Namen verwenden"/> + </form> + </notification> + <notification name="InvalidAutoReplaceEntry"> + Das Schlüsselwort muss ein einziges Wort sein; die Ersetzungszeichenfolge darf nicht leer sein. + </notification> + <notification name="InvalidAutoReplaceList"> + Diese Ersetzungsliste ist nicht gültig. + </notification> + <notification name="SpellingDictImportRequired"> + Sie müssen eine Datei, einen Namen und eine Sprache angeben. + </notification> + <notification name="SpellingDictIsSecondary"> + Das Wörterbuch [DIC_NAME] scheint keine „aff“-Datei zu haben und ist deshalb ein sekundäres Wörterbuch. +Es kann als zusätzliches Wörterbuch verwendet werden, aber nicht als Hauptwörterbuch. + +Weitere Informationen finden Sie unter https://wiki.secondlife.com/wiki/Adding_Spelling_Dictionaries. + </notification> + <notification name="SpellingDictImportFailed"> + Kopieren nicht möglich: + [FROM_NAME] + in + [TO_NAME] + </notification> <notification label="Outfit speichern" name="SaveOutfitAs"> Mein aktuelles Outfit als neues Outfit speichern: <form name="form"> @@ -1171,7 +1221,7 @@ in „[THIS_GPU]“ Sie wurden zur nächstgelegenen Region teleportiert. </notification> <notification name="AvatarMovedLast"> - Ihr letzter Standort ist zurzeit nicht verfügbar. + Ihr angeforderter Standort ist zurzeit nicht verfügbar. Sie wurden zur nächstgelegenen Region teleportiert. </notification> <notification name="AvatarMovedHome"> @@ -1190,8 +1240,7 @@ Sie können [SECOND_LIFE] normal verwenden. Andere Benutzer können Sie korrekt Installation von [APP_NAME] vollständig abgeschlossen. Falls Sie [SECOND_LIFE] zum ersten Mal verwenden, müssen Sie zuerst ein Konto erstellen, bevor Sie sich anmelden können. -Zurück zu [http://join.secondlife.com secondlife.com], um ein neues Konto zu erstellen? - <usetemplate name="okcancelbuttons" notext="Weiter" yestext="Neues Konto..."/> + <usetemplate name="okcancelbuttons" notext="Weiter" yestext="Konto erstellen..."/> </notification> <notification name="LoginPacketNeverReceived"> Es gibt Probleme mit der Verbindung. Möglicherweise besteht ein Problem mit Ihrer Internetverbindung oder dem [SECOND_LIFE_GRID]. @@ -1708,83 +1757,128 @@ Tausende Regionen werden verändert und der Spaceserver wird dadurch stark belas <usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/> </notification> <notification name="RegionEntryAccessBlocked"> - Sie dürfen diese Region aufgrund Ihrer Alterseinstufung nicht betreten. Der Grund hierfür ist möglicherweise, dass Sie nicht altersüberprüft sind. - -Bitte vergewissern Sie sich, dass Sie den aktuellsten Viewer installiert haben und besuchen Sie unsere Knowledgebase, um mehr über Regionen mit dieser Altereinstufung zu erfahren. + Die Region, die Sie besuchen möchten, enthält Inhalte, die Ihre aktuellen Einstellungen überschreiten. Sie können Ihre Einstellungen unter „Ich“ > „Einstellungen“ > „Allgemein“ ändern. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="RegionEntryAccessBlocked_KB"> - Sie dürfen diese Region aufgrund Ihrer Alterseinstufung nicht betreten. - -Möchten Sie unsere Knowledgebase besuchen, um mehr Informationen über Altereinstufung zu erhalten? + <notification name="RegionEntryAccessBlocked_AdultsOnlyContent"> + Die Region, die Sie besuchen möchten, enthält [REGIONMATURITY]-Inhalte, die nur für Erwachsene zugänglich sind. <url name="url"> http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/de </url> - <usetemplate ignoretext="Ich kann diese Region aufgrund der Alterseinstufung nicht betreten" name="okcancelignore" notext="Schließen" yestext="Zur Knowledgbase"/> + <usetemplate ignoretext="Regionswechsel: Die Region, die Sie besuchen möchten, enthält Inhalte, die nur für Erwachsene zugänglich sind." name="okcancelignore" notext="Schließen" yestext="Zur Knowledge Base gehen"/> </notification> <notification name="RegionEntryAccessBlocked_Notify"> - Aufgrund Ihrer Alterseinstufung dürfen Sie diese Region nicht betreten. + Die Region, die Sie besuchen möchten, enthält [REGIONMATURITY]-Inhalte, doch aufgrund Ihrer aktuellen Einstellungen werden [REGIONMATURITY]-Inhalte nicht dargestellt. + </notification> + <notification name="RegionEntryAccessBlocked_NotifyAdultsOnly"> + Die Region, die Sie besuchen möchten, enthält [REGIONMATURITY]-Inhalte, die nur für Erwachsene zugänglich sind. </notification> <notification name="RegionEntryAccessBlocked_Change"> - Sie dürfen diese Region aufgrund der Einstellung Ihrer Inhaltseinstufung nicht betreten. - -Bitte ändern Sie Ihre Einstellungen bezüglich der Inhaltseinstufung, um die gewünschte Region zu betreten. Danach können Sie nach [REGIONMATURITY]-Inhalt suchen und auf diesen zugreifen. Um die Veränderungen rückgängig zu machen, gehen Sie zu Ich > Einstellungen > Allgemein. + Die Region, die Sie besuchen möchten, enthält [REGIONMATURITY]-Inhalte, doch aufgrund Ihrer aktuellen Einstellungen werden [REGIONMATURITY]-Inhalte nicht dargestellt. Sie können Ihre Einstellungen ändern oder diesen Vorgang abbrechen. Nachdem Sie Ihre Einstellungen geändert haben, können Sie erneut versuchen, die Region zu betreten. <form name="form"> - <button name="OK" text="Einstellung ändern"/> - <button name="Cancel" text="Schließen"/> - <ignore name="ignore" text="Meine Alterseinstufung lässt nicht zu, dass ich eine Region betrete."/> + <button name="OK" text="Einstellungen ändern"/> + <button name="Cancel" text="Abbrechen"/> + <ignore name="ignore" text="Regionswechsel: Die Region, die Sie besuchen möchten, enthält Inhalte, die aufgrund Ihrer Einstellungen nicht dargestellt werden können."/> </form> </notification> + <notification name="RegionEntryAccessBlocked_PreferencesOutOfSync"> + Wir haben technische Probleme mit Ihrem Teleport, da Ihre Einstellungen nicht mit dem Server synchronisiert sind. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked"> + Die Region, die Sie besuchen möchten, enthält Inhalte, die Ihre aktuellen Einstellungen überschreiten. Sie können Ihre Einstellungen unter „Ich“ > „Einstellungen“ > „Allgemein“ ändern. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked_AdultsOnlyContent"> + Die Region, die Sie besuchen möchten, enthält [REGIONMATURITY]-Inhalte, die nur für Erwachsene zugänglich sind. + <url name="url"> + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/de + </url> + <usetemplate ignoretext="Teleport: Die Region, die Sie besuchen möchten, enthält Inhalte, die nur für Erwachsene zugänglich sind." name="okcancelignore" notext="Schließen" yestext="Zur Knowledge Base gehen"/> + </notification> + <notification name="TeleportEntryAccessBlocked_Notify"> + Die Region, die Sie besuchen möchten, enthält [REGIONMATURITY]-Inhalte, doch aufgrund Ihrer aktuellen Einstellungen werden [REGIONMATURITY]-Inhalte nicht dargestellt. + </notification> + <notification name="TeleportEntryAccessBlocked_NotifyAdultsOnly"> + Die Region, die Sie besuchen möchten, enthält [REGIONMATURITY]-Inhalte, die nur für Erwachsene zugänglich sind. + </notification> + <notification name="TeleportEntryAccessBlocked_ChangeAndReTeleport"> + Die Region, die Sie besuchen möchten, enthält [REGIONMATURITY]-Inhalte, doch aufgrund Ihrer aktuellen Einstellungen werden [REGIONMATURITY]-Inhalte nicht dargestellt. Sie können Ihre Einstellungen ändern und den Teleport fortsetzen oder Sie können den Teleport abbrechen. + <form name="form"> + <button name="OK" text="Ändern und fortfahren"/> + <button name="Cancel" text="Abbrechen"/> + <ignore name="ignore" text="Teleport (kann neu gestartet werden): Die Region, die Sie besuchen möchten, enthält Inhalte, die aufgrund Ihrer Einstellungen nicht dargestellt werden können."/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_Change"> + Die Region, die Sie besuchen möchten, enthält [REGIONMATURITY]-Inhalte, doch aufgrund Ihrer aktuellen Einstellungen werden [REGIONMATURITY]-Inhalte nicht dargestellt. Sie können Ihre Einstellungen ändern oder den Teleport abbrechen. Nachdem Sie Ihre Einstellungen geändert haben, können Sie den Teleport erneut versuchen. + <form name="form"> + <button name="OK" text="Einstellungen ändern"/> + <button name="Cancel" text="Abbrechen"/> + <ignore name="ignore" text="Teleport (kann nicht neu gestartet werden): Die Region, die Sie besuchen möchten, enthält Inhalte, die aufgrund Ihrer Einstellungen nicht dargestellt werden können."/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_PreferencesOutOfSync"> + Wir haben technische Probleme mit Ihrem Teleport, da Ihre Einstellungen nicht mit dem Server synchronisiert sind. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="PreferredMaturityChanged"> - Ihre Inhaltseinstufung ist jetzt [RATING]. + Sie erhalten keine Benachrichtigungen mehr, wenn Sie eine Region der Inhaltseinstufung „[RATING]“ besuchen. Sie können Ihre Inhaltseinstellungen von der Menüleiste aus ändern („Ich“ > „Einstellungen“ > „Allgemein“). + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="MaturityChangeError"> + Wir konnten Ihre Einstellungen zur Anzeige von [PREFERRED_MATURITY]-Inhalten leider nicht ändern. Ihre Einstellungen wurden auf [ACTUAL_MATURITY]-Inhalte zurückgesetzt. Sie können erneut versuchen, Ihre Inhaltseinstellungen von der Menüleiste aus zu ändern („Ich“ > „Einstellungen“ > „Allgemein“). + <usetemplate name="okbutton" yestext="OK"/> </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. - -Bitte vergewissern Sie sich, dass Sie den aktuellsten Viewer installiert haben und besuchen Sie unsere Knowledgebase, um mehr über Regionen mit dieser Altereinstufung zu erfahren. + Die Inhaltseinstufung des Landes, das Sie in Besitz nehmen möchten, überschreitet Ihre aktuellen Einstellungen. Sie können Ihre Einstellungen unter „Ich“ > „Einstellungen“ > „Allgemein“ ändern. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandClaimAccessBlocked_KB"> - Sie haben aufgrund Ihrer Alterseinstufung keinen Anspruch auf dieses Land. - -Möchten Sie unsere Knowledgebase besuchen, um mehr Informationen über Altereinstufung zu erhalten? + <notification name="LandClaimAccessBlocked_AdultsOnlyContent"> + Nur Erwachsene können dieses Land in Besitz nehmen. <url name="url"> http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/de </url> - <usetemplate ignoretext="Ich habe aufgrund der Alterseinstufung keinen Anspruch auf dieses Land" name="okcancelignore" notext="Schließen" yestext="Zur Knowledgbase"/> + <usetemplate ignoretext="Nur Erwachsene können dieses Land in Besitz nehmen." name="okcancelignore" notext="Schließen" yestext="Zur Knowledge Base gehen"/> </notification> <notification name="LandClaimAccessBlocked_Notify"> - Sie haben aufgrund Ihrer Alterseinstufung keinen Anspruch auf dieses Land. + Das Land, das Sie besuchen möchten, enthält [REGIONMATURITY]-Inhalte, doch aufgrund Ihrer aktuellen Einstellungen werden [REGIONMATURITY]-Inhalte nicht dargestellt. + </notification> + <notification name="LandClaimAccessBlocked_NotifyAdultsOnly"> + Das Land, das Sie in Besitz nehmen möchten, enthält [REGIONMATURITY]-Inhalte, die nur für Erwachsene zugänglich sind. </notification> <notification name="LandClaimAccessBlocked_Change"> - Sie haben aufgrund der Einstellung Ihrer Alterseinstufung keinen Anspruch auf dieses Land. - -Klicken Sie auf „Einstellung ändern“, um Ihre Einstellung für Altereinstufung sofort zu ändern und Zugang zu erhalten. Sie können ab sofort [REGIONMATURITY]-Inhalt suchen und auf diesen zugreifen. Falls Sie diese Einstellung später rückgängig machen möchten, gehen Sie zu Bearbeiten > Einstellungen > Allgemein. - <usetemplate ignoretext="Meine Alterseinstufung lässt nicht zu, dass ich auf Land Anspruch erhebe" name="okcancelignore" notext="Schließen" yestext="Einstellung ändern"/> + Das Land, das Sie besuchen möchten, enthält [REGIONMATURITY]-Inhalte, doch aufgrund Ihrer aktuellen Einstellungen werden [REGIONMATURITY]-Inhalte nicht dargestellt. Sie können Ihre Einstellungen ändern und anschließend erneut versuchen, das Land in Besitz zu nehmen. + <form name="form"> + <button name="OK" text="Einstellungen ändern"/> + <button name="Cancel" text="Abbrechen"/> + <ignore name="ignore" text="Das Land, das Sie in Besitz nehmen möchten, enthält Inhalte, die aufgrund Ihrer Einstellungen nicht dargestellt werden können."/> + </form> </notification> <notification name="LandBuyAccessBlocked"> - Sie können aufgrund Ihrer Alterseinstufung dieses Land nicht kaufen. Der Grund hierfür ist möglicherweise, dass Sie nicht altersüberprüft sind. - -Bitte vergewissern Sie sich, dass Sie den aktuellsten Viewer installiert haben und besuchen Sie unsere Knowledgebase, um mehr über Regionen mit dieser Altereinstufung zu erfahren. + Die Inhaltseinstufung des Landes, das Sie kaufen möchten, überschreitet Ihre aktuellen Einstellungen. Sie können Ihre Einstellungen unter „Ich“ > „Einstellungen“ > „Allgemein“ ändern. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandBuyAccessBlocked_KB"> - Sie können aufgrund Ihrer Alterseinstufung dieses Land nicht kaufen. - -Möchten Sie unsere Knowledgebase besuchen, um mehr Informationen über Altereinstufung zu erhalten? + <notification name="LandBuyAccessBlocked_AdultsOnlyContent"> + Nur Erwachsene können dieses Land kaufen. <url name="url"> http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/de </url> - <usetemplate ignoretext="Ich kann aufgrund der Alterseinstufung dieses Land nicht kaufen" name="okcancelignore" notext="Schließen" yestext="Zur Knowledgbase"/> + <usetemplate ignoretext="Nur Erwachsene können dieses Land kaufen." name="okcancelignore" notext="Schließen" yestext="Zur Knowledge Base gehen"/> </notification> <notification name="LandBuyAccessBlocked_Notify"> - Sie können aufgrund Ihrer Alterseinstufung dieses Land nicht kaufen. + Das Land, das Sie kaufen möchten, enthält [REGIONMATURITY]-Inhalte, doch aufgrund Ihrer aktuellen Einstellungen werden [REGIONMATURITY]-Inhalte nicht dargestellt. + </notification> + <notification name="LandBuyAccessBlocked_NotifyAdultsOnly"> + Das Land, das Sie kaufen möchten, enthält Inhalte der Einstufung „[REGIONMATURITY]“, die nur für Erwachsene zugänglich sind. </notification> <notification name="LandBuyAccessBlocked_Change"> - Sie können aufgrund Ihrer Einstellung für Alterseinstufung dieses Land nicht kaufen. - -Klicken Sie auf „Einstellung ändern“, um Ihre Einstellung für Altereinstufung sofort zu ändern und Zugang zu erhalten. Sie können ab sofort [REGIONMATURITY]-Inhalt suchen und auf diesen zugreifen. Falls Sie diese Einstellung später rückgängig machen möchten, gehen Sie zu Bearbeiten > Einstellungen > Allgemein. - <usetemplate ignoretext="Meine Alterseinstufung lässt nicht zu, dass ich Land kaufe" name="okcancelignore" notext="Schließen" yestext="Einstellung ändern"/> + Das Land, das Sie kaufen möchten, enthält [REGIONMATURITY]-Inhalte, doch aufgrund Ihrer aktuellen Einstellungen werden [REGIONMATURITY]-Inhalte nicht dargestellt. Sie können Ihre Einstellungen ändern und anschließend erneut versuchen, das Land zu kaufen. + <form name="form"> + <button name="OK" text="Einstellungen ändern"/> + <button name="Cancel" text="Abbrechen"/> + <ignore name="ignore" text="Das Land, das Sie kaufen möchten, enthält Inhalte, die aufgrund Ihrer Einstellungen nicht dargestellt werden können."/> + </form> </notification> <notification name="TooManyPrimsSelected"> Zu viele Prims wurden ausgewählt. Bitte wählen Sie höchstens [MAX_PRIM_COUNT] Prims aus und versuchen Sie es erneut. @@ -1839,10 +1933,9 @@ Anzeige für [AMOUNT] L$ veröffentlichen? </form> </notification> <notification label="Alterseinstufung der Region ändern" name="RegionMaturityChange"> - Die Alterseinstufung dieser Region wurde aktualisiert. + Die Inhaltseinstufung dieser Region wurde geändert. Es kann eine Weile dauern, bis diese Änderung auf der Karte angezeigt wird. - -Um Regionen der Alterseinstufung „Adult" zu betreten, müssen Einwohner altersüberprüft sein. Dies kann entweder über die Alterverifizierung oder Zahlungsverifizierung geschehen. + <usetemplate name="okbutton" yestext="OK"/> </notification> <notification label="Falsche Voice-Version" name="VoiceVersionMismatch"> Diese Version von [APP_NAME] ist mit der Voice-Chat-Funktion in dieser Region nicht kompatibel. Damit Voice-Chat funktioniert, müssen Sie [APP_NAME] aktualisieren. @@ -2132,14 +2225,11 @@ Von einer Webseite zu diesem Formular linken, um anderen leichten Zugang zu dies <usetemplate ignoretext="Die Kleidung, die während dem Bearbeiten meines Aussehens erstellt wird, sofort anziehen" name="okcancelignore" notext="Nein" yestext="Ja"/> </notification> <notification name="NotAgeVerified"> - Um auf Adult-Inhalte und –Bereiche in Second Life zuzugreifen, müssen Sie mindestens 18 Jahre alt sein. Bitte besuchen Sie die Altersüberprüfungsseite, um zu bestätigen, dass Sie mindestens 18 Jahre alt sind. -Hierzu wird Ihr Webbrowser geöffnet. - -[_URL] - <url name="url" option="0"> - https://secondlife.com/my/account/verification.php - </url> - <usetemplate ignoretext="Ich habe mein Alter nicht verifizieren lassen" name="okcancelignore" notext="Abbrechen" yestext="Zur Altersüberprüfung"/> + Der Ort, den Sie besuchen möchten, ist nur für Bewohner zugänglich, die mindestens 18 Jahre alt sind. + <usetemplate ignoretext="Ich bin nicht alt genug, um beschränkte Bereiche zu besuchen." name="okignore" yestext="OK"/> + </notification> + <notification name="NotAgeVerified_Notify"> + Ort auf Einwohner beschränkt, die mindestens 18 Jahre alt sind. </notification> <notification name="Cannot enter parcel: no payment info on file"> Um diesen Bereich besuchen zu können, müssen Ihre Zahlungsinformationen gespeichert sein. Möchten Sie diese Einstellung auf der [SECOND_LIFE]-Webseite einrichten? @@ -2200,7 +2290,7 @@ Hierzu wird Ihr Webbrowser geöffnet. Terrain.raw heruntergeladen </notification> <notification name="GestureMissing"> - Hmm. Geste [NAME] fehlt in Datenbank. + Geste [NAME] fehlt in Datenbank. </notification> <notification name="UnableToLoadGesture"> Geste [NAME] konnte nicht geladen werden. @@ -2400,6 +2490,23 @@ Fliegen ist hier nicht möglich. <notification name="NoBuild"> In diesem Bereich ist das Bauen deaktiviert. Sie können keine Objekte bauen oder rezzen. </notification> + <notification name="PathfindingDirty"> + Diese Region weist ausstehende Pathfinding-Änderungen auf. Wenn Sie Baurechte besitzen, können Sie die Region durch Klicken auf die Schaltfläche „Region neu formen“ neu formen. + </notification> + <notification name="DynamicPathfindingDisabled"> + Dynamisches Pathfinding ist in dieser Region nicht aktiviert. Geskriptete Objekte, die Pathfinding-LSL-Aufrufe verwenden, funktionieren in dieser Region u. U. nicht wie erwartet. + </notification> + <notification name="PathfindingRebakeNavmesh"> + Wenn Sie bestimmte Objekte in dieser Region ändern, verhalten sich andere bewegliche Objekte u. U. inkorrekt. Um dieses Problem zu beheben, klicken Sie auf die Schaltfläche „Region neu formen“. Um weitere Informationen zu erhalten, klicken Sie auf „Hilfe“. + <url name="url"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </url> + <usetemplate helptext="Hilfe" ignoretext="Wenn Sie bestimmte Objekte in dieser Region ändern, verhalten sich andere bewegliche Objekte u. U. inkorrekt." name="okhelpignore" yestext="OK"/> + </notification> + <notification name="PathfindingCannotRebakeNavmesh"> + Fehler aufgetreten. Möglicherweise ist ein Netzwerk- oder Serverproblem aufgetreten oder Sie haben nicht die erforderlichen Baurechte. Dieses Problem lässt sich manchmal durch Ab- und Anmelden lösen. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="SeeAvatars"> Diese Parzelle verbirgt Avatare und Text-Chat vor einer anderen Parzelle. Sie können Einwohner außerhalb dieser Parzelle weder sehen noch von ihnen gesehen werden. Regulärer Text-Chat auf Kanal 0 ist ebenfalls blockiert. </notification> @@ -2418,9 +2525,7 @@ Hier funktionieren nur Skripts, die dem Landeigentümer gehören. Öffentliches Land kann nur in der Region in Besitz genommen werden, in der Sie sich befinden. </notification> <notification name="RegionTPAccessBlocked"> - Sie dürfen diese Region aufgrund Ihrer Alterseinstufung nicht betreten. Sie müssen eventuell eine Altersüberprüfung vornehmen und/oder den aktuellsten Viewer installieren. - -Bitte besuchen Sie unsere Knowledgebase, um mehr Details über Zugang zu Regionen mit dieser Alterseinstufung zu erhalten. + Die Region, die Sie besuchen möchten, enthält Inhalte, die Ihre aktuellen Einstellungen überschreiten. Sie können Ihre Einstellungen unter „Ich“ > „Einstellungen“ > „Allgemein“ ändern. </notification> <notification name="URBannedFromRegion"> Sie dürfen diese Region nicht betreten. @@ -2431,11 +2536,11 @@ Bitte besuchen Sie unsere Knowledgebase, um mehr Details über Zugang zu Regione <notification name="ImproperPaymentStatus"> Die für den Zutritt zu dieser Region erforderlichen Zahlungsinformationen liegen nicht vor. </notification> - <notification name="MustGetAgeRgion"> - Sie müssen altersüberprüft sein, um diese Region betreten zu können. + <notification name="MustGetAgeRegion"> + Sie müssen mindestens 18 Jahre alt sein, um diese Region betreten zu können. </notification> <notification name="MustGetAgeParcel"> - Sie müssen altersüberprüft sein, um diese Parzelle betreten zu können. + Sie müssen mindestens 18 Jahre alt sein, um diese Parzelle betreten zu können. </notification> <notification name="NoDestRegion"> Keine Zielregion gefunden. @@ -2535,14 +2640,35 @@ Versuchen Sie es in einigen Minuten erneut. </form> </notification> <notification name="TeleportOffered"> - [NAME_SLURL] hat Ihnen einen Teleport an seine/ihre Position angeboten: + [NAME_SLURL] hat Ihnen den Teleport an seinen/ihren Standort angeboten: -[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> +„[MESSAGE]“ +<icon>[MATURITY_ICON]</icon> – [MATURITY_STR] <form name="form"> <button name="Teleport" text="Teleportieren"/> <button name="Cancel" text="Abbrechen"/> </form> </notification> + <notification name="TeleportOffered_MaturityExceeded"> + [NAME_SLURL] hat Ihnen den Teleport an seinen/ihren Standort angeboten: + +„[MESSAGE]“ +<icon>[MATURITY_ICON]</icon> – [MATURITY_STR] + +Diese Region enthält [REGION_CONTENT_MATURITY]-Inhalte, doch aufgrund Ihrer aktuellen Einstellungen werden [REGION_CONTENT_MATURITY]-Inhalte nicht dargestellt. Sie können Ihre Einstellungen ändern und den Teleport fortsetzen oder Sie können den Teleport abbrechen. + <form name="form"> + <button name="Teleport" text="Ändern und fortfahren"/> + <button name="Cancel" text="Abbrechen"/> + </form> + </notification> + <notification name="TeleportOffered_MaturityBlocked"> + [NAME_SLURL] hat Ihnen den Teleport an seinen/ihren Standort angeboten: + +„[MESSAGE]“ +<icon>[MATURITY_ICON]</icon> – [MATURITY_STR] + +Diese Region enthält jedoch Inhalte, die nur für Erwachsene zugänglich sind. + </notification> <notification name="TeleportOfferSent"> Ein Teleportangebot wurde an [TO_NAME] geschickt </notification> @@ -2947,6 +3073,10 @@ Sie haben eine [RESOLUTION]-gebackene Textur für „[BODYREGION]“ nach [TIME] ( [EXISTENCE] Sekunden am Leben) Sie haben lokal eine [RESOLUTION]-gebackene Textur für „[BODYREGION]“ nach [TIME] Sekunden aktualisiert. </notification> + <notification name="LivePreviewUnavailable"> + Wir können keine Vorschau dieser Textur anzeigen, da sie nicht kopier- und/oder übertragungsfähig ist. + <usetemplate ignoretext="Hinweis anzeigen, wenn bei nicht kopier- und/oder übertragungsfähigen Texturen keine Live-Vorschau möglich ist" name="okignore" yestext="OK"/> + </notification> <notification name="ConfirmLeaveCall"> Möchten Sie dieses Gespräch wirklich verlassen ? <usetemplate ignoretext="Bestätigen, bevor ich den Anruf verlasse." name="okcancelignore" notext="Nein" yestext="Ja"/> @@ -3116,6 +3246,62 @@ Durch Ausblenden der Schaltfläche „Sprechen“ wird die Sprechfunktion deakti Durch diese Aktion werden alle Menüelemente und Schaltflächen ausgeblendet. Um sie wieder anzuzeigen, klicken Sie erneut auf [SHORTCUT]. <usetemplate ignoretext="Vor Ausblenden der UI bestätigen" name="okcancelignore" notext="Abbrechen" yestext="OK"/> </notification> + <notification name="PathfindingLinksets_WarnOnPhantom"> + Bei einigen ausgewählten Linksets wird die Phantom-Markierung umgeschaltet. + +Möchten Sie fortfahren? + <usetemplate ignoretext="Bei einigen ausgewählten Linksets wird die Phantom-Markierung umgeschaltet." name="okcancelignore" notext="Abbrechen" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted"> + Einige der ausgewählten Linksets können aufgrund von Berechtigungseinschränkungen nicht auf „[REQUESTED_TYPE]“ gesetzt werden. Diese Linksets werden stattdessen auf „[RESTRICTED_TYPE]“ gesetzt. + +Möchten Sie fortfahren? + <usetemplate ignoretext="Einige der ausgewählten Linksets können aufgrund von Berechtigungseinschränkungen nicht gesetzt werden." name="okcancelignore" notext="Abbrechen" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnVolume"> + Einige der ausgewählten Linksets können nicht auf „[REQUESTED_TYPE]“ gesetzt werden, da die Form nicht konvex ist. + +Möchten Sie fortfahren? + <usetemplate ignoretext="Einige der ausgewählten Linksets können nicht gesetzt werden, da die Form nicht konvex ist." name="okcancelignore" notext="Abbrechen" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted"> + Bei einigen ausgewählten Linksets wird die Phantom-Markierung umgeschaltet. + +Einige der ausgewählten Linksets können aufgrund von Berechtigungseinschränkungen nicht auf „[REQUESTED_TYPE]“ gesetzt werden. Diese Linksets werden stattdessen auf „[RESTRICTED_TYPE]“ gesetzt. + +Möchten Sie fortfahren? + <usetemplate ignoretext="Bei einigen ausgewählten Linksets wird die Phantom-Markierung umgeschaltet und andere können aufgrund von Berechtigungseinschränkungen nicht gesetzt werden." name="okcancelignore" notext="Abbrechen" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnVolume"> + Bei einigen ausgewählten Linksets wird die Phantom-Markierung umgeschaltet. + +Einige der ausgewählten Linksets können nicht auf „[REQUESTED_TYPE]“ gesetzt werden, da die Form nicht konvex ist. + +Möchten Sie fortfahren? + <usetemplate ignoretext="Bei einigen ausgewählten Linksets wird die Phantom-Markierung umgeschaltet und andere können nicht gesetzt werden, da die Form nicht konvex ist." name="okcancelignore" notext="Abbrechen" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted_MismatchOnVolume"> + Einige der ausgewählten Linksets können aufgrund von Berechtigungseinschränkungen nicht auf „[REQUESTED_TYPE]“ gesetzt werden. Diese Linksets werden stattdessen auf „[RESTRICTED_TYPE]“ gesetzt. + +Einige der ausgewählten Linksets können nicht auf „[REQUESTED_TYPE]“ gesetzt werden, da die Form nicht konvex ist. Die Nutzungsarten dieser Linksets bleiben unverändert. + +Möchten Sie fortfahren? + <usetemplate ignoretext="Einige der ausgewählten Linksets können nicht gesetzt werden, da die Berechtigungen eingeschränkt sind und die Form nicht konvex ist." name="okcancelignore" notext="Abbrechen" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted_MismatchOnVolume"> + Bei einigen ausgewählten Linksets wird die Phantom-Markierung umgeschaltet. + +Einige der ausgewählten Linksets können aufgrund von Berechtigungseinschränkungen nicht auf „[REQUESTED_TYPE]“ gesetzt werden. Diese Linksets werden stattdessen auf „[RESTRICTED_TYPE]“ gesetzt. + +Einige der ausgewählten Linksets können nicht auf „[REQUESTED_TYPE]“ gesetzt werden, da die Form nicht konvex ist. Die Nutzungsarten dieser Linksets bleiben unverändert. + +Möchten Sie fortfahren? + <usetemplate ignoretext="Bei einigen ausgewählten Linksets wird die Phantom-Markierung umgeschaltet und andere können nicht gesetzt werden, da die Berechtigungen für das Linkset eingeschränkt sind und die Form nicht konvex ist." name="okcancelignore" notext="Abbrechen" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_ChangeToFlexiblePath"> + Das ausgewählte Objekt wirkt sich auf das Navmesh aus. Wenn Sie es in einen flexiblen Pfad ändern, wird es aus dem Navmesh entfernt. + <usetemplate ignoretext="Das ausgewählte Objekt wirkt sich auf das Navmesh aus. Wenn Sie es in einen flexiblen Pfad ändern, wird es aus dem Navmesh entfernt." name="okcancelignore" notext="Abbrechen" yestext="OK"/> + </notification> <global name="UnsupportedGLRequirements"> Ihr Computer entspricht nicht den Hardwareanforderungen von [APP_NAME]. [APP_NAME] setzt eine OpenGL-Grafikkarte mit Multitextur-Unterstützung voraus. Falls Ihre Grafikkarte diese Funktion unterstützt, installieren Sie die neuesten Treiber sowie die aktuellen Service Packs und Patches für Ihr Betriebssystem. @@ -3152,4 +3338,12 @@ Zukünftige Aktualisierungen dieser Datei werden deaktiviert. Versuch, eine ungültige oder nicht lesbare Bilddatei ([FNAME]) hinzuzufügen, die nicht geöffnet oder decodiert werden konnte. Versuch abgebrochen. </notification> + <notification name="PathfindingReturnMultipleItems"> + Sie sind dabei, [NUM_ITEMS] Objekte zurückzugeben. Möchten Sie diesen Vorgang wirklich fortsetzen? + <usetemplate ignoretext="Möchten Sie wirklich mehrere Objekte zurückgeben?" name="okcancelignore" notext="Nein" yestext="Ja"/> + </notification> + <notification name="PathfindingDeleteMultipleItems"> + Sie sind dabei, [NUM_ITEMS] Objekte zu löschen. Möchten Sie diesen Vorgang wirklich fortsetzen? + <usetemplate ignoretext="Möchten Sie wirklich mehrere Objekte löschen?" name="okcancelignore" notext="Nein" yestext="Ja"/> + </notification> </notifications> diff --git a/indra/newview/skins/default/xui/de/panel_bottomtray.xml b/indra/newview/skins/default/xui/de/panel_bottomtray.xml deleted file mode 100644 index afe9836401..0000000000 --- a/indra/newview/skins/default/xui/de/panel_bottomtray.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="bottom_tray"> - <string name="DragIndicationImageName" value="Accordion_ArrowOpened_Off"/> - <string name="SpeakBtnToolTip" value="Schaltet Mikrofon ein/aus"/> - <string name="VoiceControlBtnToolTip" value="Voice-Chat-Steuerung anzeigen/ausblenden"/> - <layout_stack name="toolbar_stack"> - <layout_panel name="speak_panel"> - <talk_button name="talk"> - <speak_button label="Sprechen" label_selected="Sprechen" name="speak_btn"/> - </talk_button> - </layout_panel> - <layout_panel name="gesture_panel"> - <gesture_combo_list label="Gesten" name="Gesture" tool_tip="Gesten anzeigen/ausblenden"/> - </layout_panel> - <layout_panel name="movement_panel"> - <bottomtray_button label="Bewegen" name="movement_btn" tool_tip="Bewegungssteuerung anzeigen/ausblenden"/> - </layout_panel> - <layout_panel name="cam_panel"> - <bottomtray_button label="Ansicht" name="camera_btn" tool_tip="Kamerasteuerung anzeigen/ausblenden"/> - </layout_panel> - <layout_panel name="snapshot_panel"> - <bottomtray_button label="" name="snapshots" tool_tip="Foto machen"/> - </layout_panel> - <layout_panel name="build_btn_panel"> - <bottomtray_button label="Bauen" name="build_btn" tool_tip="Bauwerkzeuge ein-/ausblenden"/> - </layout_panel> - <layout_panel name="search_btn_panel"> - <bottomtray_button label="Suche" name="search_btn" tool_tip="Suche anzeigen/ausblenden"/> - </layout_panel> - <layout_panel name="world_map_btn_panel"> - <bottomtray_button label="Karte" name="world_map_btn" tool_tip="Karte ein-/ausblenden"/> - </layout_panel> - <layout_panel name="mini_map_btn_panel"> - <bottomtray_button label="Minikarte" name="mini_map_btn" tool_tip="Minikarte ein-/ausblenden"/> - </layout_panel> - <layout_panel name="im_well_panel"> - <chiclet_im_well name="im_well"> - <button name="Unread IM messages" tool_tip="IMs"/> - </chiclet_im_well> - </layout_panel> - <layout_panel name="notification_well_panel"> - <chiclet_notification name="notification_well"> - <button name="Unread" tool_tip="Benachrichtigungen"/> - </chiclet_notification> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/de/panel_group_invite.xml b/indra/newview/skins/default/xui/de/panel_group_invite.xml index 5f323d80dd..c32d2fe4bf 100644 --- a/indra/newview/skins/default/xui/de/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/de/panel_group_invite.xml @@ -9,6 +9,9 @@ <panel.string name="already_in_group"> Einige der ausgewählten Einwohner sind bereits Gruppenmitglieder und haben aus diesem Grund keine Einladung erhalten. </panel.string> + <panel.string name="invite_selection_too_large"> + Gruppeneinladungen nicht gesendet: zu viele Einwohner ausgewählt. Gruppeneinladungen sind auf 100 Einwohner pro Anfrage beschränkt. + </panel.string> <text name="help_text"> Sie können mehrere Einwohner in Ihre Gruppe einladen. Klicken Sie hierzu auf „Einwohnerliste öffnen“. </text> diff --git a/indra/newview/skins/default/xui/de/panel_login.xml b/indra/newview/skins/default/xui/de/panel_login.xml index 553bd3e2ff..8cc467185c 100644 --- a/indra/newview/skins/default/xui/de/panel_login.xml +++ b/indra/newview/skins/default/xui/de/panel_login.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_login"> - <panel.string name="create_account_url"> - http://de.secondlife.com/registration/ - </panel.string> <panel.string name="forgot_password_url"> http://secondlife.com/account/request.php?lang=de </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> + <text name="log_in_text"> + ANMELDEN + </text> <text name="username_text"> Benutzername: </text> @@ -15,17 +15,10 @@ <text name="password_text"> Kennwort: </text> - <check_box label="Kennwort merken" name="remember_check"/> - <button label="Anmelden" name="connect_btn"/> - <text name="mode_selection_text"> - Modus: - </text> - <combo_box name="mode_combo" tool_tip="Wählen Sie den gewünschten Modus aus. Basis: Second Life schnell und einfach erkunden und chatten. Erweitert: Zugriff auf zusätzliche Funktionen."> - <combo_box.item label="Basis" name="Basic"/> - <combo_box.item label="Erweitert" name="Advanced"/> - </combo_box> + </layout_panel> + <layout_panel name="start_location_panel"> <text name="start_location_text"> - Hier anfangen: + Hier starten: </text> <combo_box name="start_location_combo"> <combo_box.item label="Mein letzter Standort" name="MyLastLocation"/> @@ -33,16 +26,21 @@ <combo_box.item label="<Region eingeben>" name="Typeregionname"/> </combo_box> </layout_panel> - <layout_panel name="links"> - <text name="create_new_account_text"> - Registrieren + <layout_panel name="links_login_panel"> + <text name="login_help"> + Brauchen Sie Hilfe beim Anmelden? </text> <text name="forgot_password_text"> Benutzernamen oder Kennwort vergessen? </text> - <text name="login_help"> - Sie brauchen Hilfe? + <button label="Anmelden" name="connect_btn"/> + <check_box label="Kennwort speichern" name="remember_check"/> + </layout_panel> + <layout_panel name="links"> + <text name="create_account_text"> + IHR KONTO ERSTELLEN </text> + <button label="Jetzt starten" name="create_new_account_btn"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml index 08cc0b0ec8..69cf6d98de 100644 --- a/indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="chat_bar"> +<panel name="nearby_chat"> <line_editor label="Zum Chatten hier klicken." name="chat_box" tool_tip="Eingabe drücken, um zu sprechen, Strg-Eingabe drücken, um zu Rufen."/> <button name="show_nearby_chat" tool_tip="Protokoll des Chats in der Nähe anzeigen/ausblenden"/> </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 746a561e6c..c9ae350147 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml @@ -29,5 +29,7 @@ <check_box label="IM-Chats" name="EnableIMChatPopups" tool_tip="Markieren, um Popups zu sehen, wenn Instant Message eintrifft"/> <spinner label="Lebenszeit von Toasts für Chat in der Nähe:" name="nearby_toasts_lifetime"/> <spinner label="Ein-/Ausblenddauer von Toasts für Chat in der Nähe:" name="nearby_toasts_fadingtime"/> - <button label="Übersetzungseinstellungen für Chats" name="ok_btn"/> + <button label="Übersetzen..." name="ok_btn"/> + <button label="Automatisch ersetzen..." name="autoreplace_showgui"/> + <button label="Rechtschreibprüfung..." name="spellcheck_showgui"/> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_region_debug.xml b/indra/newview/skins/default/xui/de/panel_region_debug.xml index d1b8f0d78a..a03a0b8b7b 100644 --- a/indra/newview/skins/default/xui/de/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/de/panel_region_debug.xml @@ -36,5 +36,5 @@ <button label="?" name="top_scripts_help"/> <button label="Region neu starten" name="restart_btn" tool_tip="2-Minuten-Countdown und Region neu starten"/> <button label="?" name="restart_help"/> - <button label="Neustart verzögern" name="cancel_restart_btn" tool_tip="Regionsneustart um eine Stunde verschieben"/> + <button label="Neustart abbrechen" name="cancel_restart_btn" tool_tip="Regionsneustart abbrechen"/> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_region_estate.xml b/indra/newview/skins/default/xui/de/panel_region_estate.xml index aecf6f62fc..b087451391 100644 --- a/indra/newview/skins/default/xui/de/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/de/panel_region_estate.xml @@ -19,7 +19,7 @@ Zugang nur Einwohnern gestatten, die: </text> <check_box label="Zahlungsinformationen hinterlegt haben" name="limit_payment" tool_tip="Um diesen Grundbesitz besuchen zu können, müssen Einwohner Zahlungsinformationen hinterlegt haben. Weitere Informationen finden Sie auf [SUPPORT_SITE]."/> - <check_box label="ihr Alter bestätigt haben" name="limit_age_verified" tool_tip="Um diesen Grundbesitz besuchen zu können, müssen Einwohner ihr Alter bestätigt haben. Weitere Informationen finden Sie auf [SUPPORT_SITE]."/> + <check_box label="Sind mindestens 18 Jahre alt" name="limit_age_verified" tool_tip="Nur Einwohner, die mindestens 18 Jahre alt sind, können diesen Grundbesitz betreten. Weitere Informationen finden Sie unter [SUPPORT_SITE]."/> <check_box label="Voice-Chat erlauben" name="voice_chat_check"/> <button label="?" name="voice_chat_help"/> <text name="abuse_email_text" width="222"> diff --git a/indra/newview/skins/default/xui/de/panel_region_texture.xml b/indra/newview/skins/default/xui/de/panel_region_texture.xml deleted file mode 100644 index 2f4904730b..0000000000 --- a/indra/newview/skins/default/xui/de/panel_region_texture.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Bodentexturen" name="Textures"> - <text name="region_text_lbl"> - Region: - </text> - <text name="region_text"> - unbekannt - </text> - <text name="detail_texture_text"> - Terraintexturen (erfordert 512x512, 24-Bit-.tga-Dateien) - </text> - <text name="height_text_lbl"> - 1 (niedrig) - </text> - <text name="height_text_lbl2"> - 2 - </text> - <text name="height_text_lbl3"> - 3 - </text> - <text name="height_text_lbl4"> - 4 (Hoch) - </text> - <text name="height_text_lbl5"> - Texturhöhenbereich - </text> - <text name="height_text_lbl6"> - Nordwest - </text> - <text name="height_text_lbl7"> - Nordost - </text> - <text name="height_text_lbl8"> - Südwest - </text> - <text name="height_text_lbl9"> - Südost - </text> - <spinner label="Niedrig" label_width="40" name="height_start_spin_0"/> - <spinner label="Niedrig" label_width="40" name="height_start_spin_1"/> - <spinner label="Niedrig" label_width="40" name="height_start_spin_2"/> - <spinner label="Niedrig" label_width="40" name="height_start_spin_3"/> - <spinner label="Hoch" label_width="40" name="height_range_spin_0"/> - <spinner label="Hoch" label_width="40" name="height_range_spin_1"/> - <spinner label="Hoch" label_width="40" name="height_range_spin_2"/> - <spinner label="Hoch" label_width="40" name="height_range_spin_3"/> - <text name="height_text_lbl10"> - Diese Werte geben den Mischungsgrad für die obigen Texturen an. - </text> - <text name="height_text_lbl11"> - In Metern gemessen. Der NIEDRIG-Wert ist die MAXIMALE Höhe der Textur #1, der HÖCHST-Wert ist die MINDEST-Höhe von Textur #4. - </text> - <text name="height_text_lbl12"> - und der OBERE WERT die MINIMALE Höhe von Textur 4. - </text> - <button label="Übernehmen" name="apply_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/de/panel_side_tray.xml b/indra/newview/skins/default/xui/de/panel_side_tray.xml deleted file mode 100644 index 3c81636fa0..0000000000 --- a/indra/newview/skins/default/xui/de/panel_side_tray.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<!-- Side tray cannot show background because it is always - partially on screen to hold tab buttons. --> -<side_tray name="sidebar"> - <sidetray_tab description="Seitenleiste auf-/zuklappen." name="sidebar_openclose" tab_title="Seitenleiste auf-/zuklappen"/> - <sidetray_tab description="Startseite." name="sidebar_home" tab_title="Startseite"> - <panel label="Startseite" name="panel_home"/> - </sidetray_tab> - <sidetray_tab description="Ihr öffentliches Profil und Auswahl bearbeiten." name="sidebar_me" tab_title="Mein Profil"> - <panel_container name="panel_container"> - <panel label="Ich" name="panel_me"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="Freunde, Kontakte und Leute in Ihrer Nähe finden." name="sidebar_people" tab_title="Leute"> - <panel_container name="panel_container"> - <panel label="Gruppenprofil" name="panel_group_info_sidetray"/> - <panel label="Ignorierte Einwohner & Objekte" name="panel_block_list_sidetray"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="Hier finden Sie neue Orte und Orte, die Sie bereits besucht haben." label="Orte" name="sidebar_places" tab_title="Orte"> - <panel label="Orte" name="panel_places"/> - </sidetray_tab> - <sidetray_tab description="Inventar durchsuchen." name="sidebar_inventory" tab_title="Mein Inventar"> - <panel label="Inventar bearbeiten" name="sidepanel_inventory"/> - </sidetray_tab> - <sidetray_tab description="Ändern Sie Ihr Aussehen und Ihren aktuellen Look." name="sidebar_appearance" tab_title="Mein Aussehen"> - <panel label="Aussehen bearbeiten" name="sidepanel_appearance"/> - </sidetray_tab> -</side_tray> diff --git a/indra/newview/skins/default/xui/de/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/de/panel_volume_pulldown.xml new file mode 100644 index 0000000000..3d43200e48 --- /dev/null +++ b/indra/newview/skins/default/xui/de/panel_volume_pulldown.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="volumepulldown_floater" width="240"> + <button left="217" name="prefs_btn"/> + <slider label="Master" label_width="80" name="System Volume" width="180"/> + <slider label="Schaltflächen" label_width="80" name="UI Volume" width="180"/> + <slider label="Umgebung" label_width="80" name="Wind Volume" width="180"/> + <slider label="Sounds" label_width="80" name="SFX Volume" width="180"/> + <check_box name="gesture_audio_play_btn" tool_tip="Sounds von Gesten aktivieren"/> + <slider label="Musik" label_width="80" name="Music Volume" width="180"/> + <check_box name="enable_music" tool_tip="Streaming-Musik aktivieren"/> + <slider label="Medien" label_width="80" name="Media Volume" width="180"/> + <check_box name="enable_media" tool_tip="Streaming-Medien aktivieren"/> + <slider label="Voice" label_width="80" name="Voice Volume" width="180"/> + <check_box name="enable_voice_check" tool_tip="Voice-Chat aktivieren"/> +</panel> diff --git a/indra/newview/skins/default/xui/de/sidepanel_item_info.xml b/indra/newview/skins/default/xui/de/sidepanel_item_info.xml index 18241dea32..1b67eaf03b 100644 --- a/indra/newview/skins/default/xui/de/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/de/sidepanel_item_info.xml @@ -3,6 +3,9 @@ <panel.string name="unknown"> (unbekannt) </panel.string> + <panel.string name="unknown_multiple"> + (unbekannt/mehrere) + </panel.string> <panel.string name="public"> (öffentlich) </panel.string> diff --git a/indra/newview/skins/default/xui/de/sidepanel_task_info.xml b/indra/newview/skins/default/xui/de/sidepanel_task_info.xml index 7b46ee7c9b..4c8d77d336 100644 --- a/indra/newview/skins/default/xui/de/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/de/sidepanel_task_info.xml @@ -18,6 +18,12 @@ <panel.string name="text modify info 4"> Sie können diese Objekte nicht bearbeiten. </panel.string> + <panel.string name="text modify info 5"> + Dieses Objekt kann nicht über eine Regionsgrenze hinweg geändert werden + </panel.string> + <panel.string name="text modify info 6"> + Diese Objekte können nicht über eine Regionsgrenze hinweg geändert werden + </panel.string> <panel.string name="text modify warning"> Diese Objekt verfügt über verknüpfte Teile </panel.string> @@ -95,6 +101,9 @@ </combo_box> <spinner label="Preis: L$" name="Edit Cost"/> <check_box label="In Suche anzeigen" name="search_check" tool_tip="Dieses Objekt in Suchergebnissen anzeigen"/> + <text name="pathfinding_attributes_label"> + Pathfinding-Attribute: + </text> <text name="B:"> B: </text> diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index 668a7b35bf..79cb73ecf9 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -137,7 +137,7 @@ Beenden </string> <string name="create_account_url"> - http://join.secondlife.com/index.php?lang=de-DE + http://join.secondlife.com/index.php?lang=de-DE&sourceid=[sourceid] </string> <string name="LoginFailedViewerNotPermitted"> Mit dem von Ihnen verwendeten Viewer ist der Zugriff auf Second Life nicht mehr möglich. Laden Sie von den folgenden Seite einen neuen Viewer herunter: @@ -1006,6 +1006,9 @@ Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden. <string name="script_files"> Skripts </string> + <string name="dictionary_files"> + Wörterbücher + </string> <string name="AvatarSetNotAway"> Nicht abwesend </string> @@ -1411,6 +1414,12 @@ Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden. <string name="InvFolder favorite"> Meine Favoriten </string> + <string name="InvFolder Favorites"> + Meine Favoriten + </string> + <string name="InvFolder favorites"> + Meine Favoriten + </string> <string name="InvFolder Current Outfit"> Aktuelles Outfit </string> @@ -1426,6 +1435,12 @@ Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden. <string name="InvFolder Meshes"> Netze </string> + <string name="InvFolder Received Items"> + Erhaltene Artikel + </string> + <string name="InvFolder Merchant Outbox"> + Händler-Outbox + </string> <string name="InvFolder Friends"> Freunde </string> @@ -3864,6 +3879,12 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich bitte an [SUPPORT_ <string name="LocationCtrlSeeAVsTooltip"> Avatare sichtbar; Chat außerhalb dieser Parzelle gestattet </string> + <string name="LocationCtrlPathfindingDirtyTooltip"> + Bewegliche Objekte verhalten sich in dieser Region u. U. erst dann korrekt, wenn die Region neu geformt wird. + </string> + <string name="LocationCtrlPathfindingDisabledTooltip"> + Dynamisches Pathfinding ist in dieser Region nicht aktiviert. + </string> <string name="UpdaterWindowTitle"> [APP_NAME] Aktualisierung </string> @@ -5006,6 +5027,21 @@ Setzen Sie den Editorpfad in Anführungszeichen <string name="Normal"> Normal </string> + <string name="Pathfinding_Wiki_URL"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </string> + <string name="Pathfinding_Object_Attr_None"> + Keine + </string> + <string name="Pathfinding_Object_Attr_Permanent"> + Wirkt sich auf Navmesh aus + </string> + <string name="Pathfinding_Object_Attr_Character"> + Figur + </string> + <string name="Pathfinding_Object_Attr_MultiSelect"> + (mehrere) + </string> <string name="snapshot_quality_very_low"> Sehr niedrig </string> @@ -5021,4 +5057,10 @@ Setzen Sie den Editorpfad in Anführungszeichen <string name="snapshot_quality_very_high"> Sehr hoch </string> + <string name="TeleportMaturityExceeded"> + Der Einwohner kann diese Region nicht besuchen. + </string> + <string name="UserDictionary"> + [Benutzer] + </string> </strings> diff --git a/indra/newview/skins/default/xui/de/teleport_strings.xml b/indra/newview/skins/default/xui/de/teleport_strings.xml index 9cf381bacc..8062633df6 100644 --- a/indra/newview/skins/default/xui/de/teleport_strings.xml +++ b/indra/newview/skins/default/xui/de/teleport_strings.xml @@ -46,6 +46,9 @@ Ihre Teleport-Anfrage kann nicht sofort bearbeitet werden. Versuchen Sie es in e <message name="no_inventory_host"> Das Inventarsystem ist zurzeit nicht verfügbar. </message> + <message name="MustGetAgeRegion"> + Sie müssen mindestens 18 Jahre alt sein, um diese Region betreten zu können. + </message> </message_set> <message_set name="progress"> <message name="sending_dest"> @@ -81,5 +84,8 @@ Ihre Teleport-Anfrage kann nicht sofort bearbeitet werden. Versuchen Sie es in e <message name="requesting"> Teleport wird initialisiert... </message> + <message name="pending"> + Anstehender Teleport... + </message> </message_set> </teleport_messages> diff --git a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml index 4e0cfb0cd4..e7ab3cacdc 100644 --- a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml @@ -6,7 +6,7 @@ layout="topleft" name="floaterbulkperms" help_topic="floaterbulkperms" - title="EDIT CONTENT PERMISSIONS" + title="ADJUST CONTENT PERMISSIONS" width="410"> <floater.string name="nothing_to_modify_text"> @@ -192,7 +192,7 @@ name="newperms" top="90" width="250"> - New Content Permissions + Adjust Content Permissions To </text> <text type="string" @@ -292,11 +292,22 @@ height="23" label="OK" layout="topleft" - left="205" - name="apply" + left="110" + name="ok" top_pad="10" width="90"> <button.commit_callback + function="BulkPermission.Ok"/> + </button> + <button + follows="left|top" + height="23" + label="Apply" + layout="topleft" + left_pad="5" + name="apply" + width="90"> + <button.commit_callback function="BulkPermission.Apply"/> </button> <button diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index 22bc488a92..521389d7b3 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater positioning="specified" - left="458" - bottom="-80" + right="-460" + bottom="-50" follows="left|bottom" legacy_header_height="18" can_minimize="true" diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml deleted file mode 100644 index 405557242f..0000000000 --- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml +++ /dev/null @@ -1,85 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater - positioning="specified" - left="10" - bottom="-10" - height="60" - layout="topleft" - legacy_header_height="25" - single_instance="true" - title="NEARBY CHAT" - save_rect="true" - save_visibility="true" - can_close="true" - can_minimize="true" - help_topic="chat_bar" - min_height="60" - min_width="150" - can_resize="true" - default_tab_group="1" - name="chat_bar" - width="300"> - <panel - top="20" - class="panel_nearby_chat" - follow="all" - width="300" - height="0" - visible="false" - filename="panel_nearby_chat.xml" - name="nearby_chat" /> - <panel width="300" - height="31" - left="0" - name="bottom_panel" - bottom="-1" - follows="left|right|bottom" - tab_group="1"> - <line_editor - border_style="line" - border_thickness="1" - follows="left|right" - height="23" - label="Click here to chat." - layout="topleft" - left_delta="7" - left="0" - max_length_bytes="1023" - name="chat_box" - spellcheck="true" - text_pad_left="5" - text_pad_right="25" - tool_tip="Press Enter to say, Ctrl+Enter to shout" - top="2" - width="255" /> - <output_monitor - auto_update="true" - follows="right" - draw_border="false" - height="16" - layout="topleft" - left_pad="-24" - mouse_opaque="true" - name="chat_zone_indicator" - top="6" - visible="true" - width="20" /> - <button - follows="right" - is_toggle="true" - width="20" - top="2" - layout="topleft" - left_pad="12" - image_disabled="ComboButton_UpOff" - image_unselected="ComboButton_UpOff" - image_selected="ComboButton_On" - image_pressed="ComboButton_UpSelected" - image_pressed_selected="ComboButton_Selected" - height="23" - chrome="true" - name="show_nearby_chat" - tool_tip="Shows/hides nearby chat log"> - </button> - </panel> -</floater> diff --git a/indra/newview/skins/default/xui/en/floater_conversation_log.xml b/indra/newview/skins/default/xui/en/floater_conversation_log.xml new file mode 100644 index 0000000000..19a4cbc119 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_conversation_log.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> + +<floater + can_resize="true" + positioning="cascading" + help_topic="conversation_log" + height="200" + min_height="100" + min_width="230" + layout="topleft" + name="floater_conversation_log" + save_rect="true" + single_instance="true" + reuse_instance="true" + title="CONVERSATION LOG" + width="300"> + <panel + follows="left|top|right" + height="32" + left="0" + name="buttons_panel" + top="0"> + <filter_editor + follows="left|top|right" + height="23" + layout="topleft" + left="8" + label="Filter People" + max_length_chars="300" + name="people_filter_input" + text_color="Black" + text_pad_left="10" + top="4" + width="204" /> + <menu_button + follows="top|right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_sort" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="8" + menu_filename="menu_conversation_log_view.xml" + menu_position="bottomleft" + name="conversation_view_btn" + tool_tip="View/sort options" + top="3" + width="31" /> + <menu_button + follows="top|right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="8" + name="conversations_gear_btn" + tool_tip="Actions on selected person or group" + top="3" + width="31" /> + </panel> + <panel + bottom="-1" + follows="all" + left="0" + name="log_panel" + right="-1" + top="32"> + <conversation_log_list + allow_select="true" + bottom="-8" + opaque="true" + follows="all" + left="8" + keep_selection_visible_on_reshape="true" + item_pad="2" + multi_select="false" + name="conversation_log_list" + right="-8" + top="0" /> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_conversation_preview.xml b/indra/newview/skins/default/xui/en/floater_conversation_preview.xml new file mode 100644 index 0000000000..764b9d8385 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_conversation_preview.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + legacy_header_height="18" + can_resize="true" + default_tab_group="1" + help_topic="conversation_preview" + height="391" + layout="topleft" + min_height="243" + min_width="234" + name="preview_conversation" + title="CONVERSATION:" + width="400"> + <floater.string + name="Title"> + CONVERSATION: [NAME] + </floater.string> + <chat_history + font="SansSerifSmall" + follows="all" + visible="true" + height="330" + name="chat_history" + notify_unread_msg="false" + parse_highlights="true" + parse_urls="true" + left="5" + top_pad="25" + width="390"> + </chat_history> + <text + follows="bottom|right" + font="SansSerif" + height="22" + layout="topleft" + name="page_label" + right="-110" + top_pad="7" + value="Page" + width="35"> + </text> + <spinner + allow_digits_only="true" + decimal_digits="0" + follows="bottom|right" + height="23" + increment="1" + label_width="40" + layout="topleft" + left_pad="0" + name="history_page_spin" + top_delta="-3" + width="50"/> + <text + follows="bottom|right" + font="SansSerif" + height="22" + layout="topleft" + name="page_num_label" + left_pad="5" + top_delta="4" + width="40"> + </text> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_destinations.xml b/indra/newview/skins/default/xui/en/floater_destinations.xml index 39aa8e07bb..94ebaa9cb2 100644 --- a/indra/newview/skins/default/xui/en/floater_destinations.xml +++ b/indra/newview/skins/default/xui/en/floater_destinations.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater - positioning="cascading" + positioning="cascading" ignore_ui_scale="false" legacy_header_height="225" can_minimize="true" @@ -17,11 +17,11 @@ save_rect="true" save_visibility="true" title="DESTINATIONS" - width="840"> + width="550"> <web_browser top="25" height="200" - width="840" + width="550" follows="all" name="destination_guide_contents" trusted_content="true"/> 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 e123de46c2..65f623a47e 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -1,49 +1,180 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <multi_floater - can_close="false" + can_close="true" can_minimize="true" can_resize="true" - height="390" + height="210" layout="topleft" name="floater_im_box" help_topic="floater_im_box" save_rect="true" save_visibility="true" single_instance="true" + reuse_instance="true" title="CONVERSATIONS" - width="396"> - <tab_container - follows="left|right|top|bottom" - height="390" + bottom="-50" + right="-5" + width="450" + min_width="38"> + <string + name="collapse_icon" + value="Conv_toolbar_collapse"/> + <string + name="expand_icon" + value="Conv_toolbar_expand"/> + <layout_stack + animate="true" + bottom="-1" + follows="all" layout="topleft" - left="1" - name="im_box_tab_container" - tab_position="bottom" - tab_width="64" - tab_max_width = "134" - tab_height="16" - use_custom_icon_ctrl="true" - tab_icon_ctrl_pad="2" - halign="left" - use_ellipses="true" - top="0" - width="394"> - <first_tab - tab_bottom_image_flash="Toolbar_Left_Flash"/> - <middle_tab - tab_bottom_image_flash="Toolbar_Middle_Flash"/> - <last_tab - tab_bottom_image_flash="Toolbar_Right_Flash"/> - </tab_container> - <icon - color="DefaultShadowLight" - enabled="false" - follows="left|right|bottom" - height="17" - image_name="tabarea.tga" - layout="bottomleft" - left="1" - name="im_box_tab_container_icon" - bottom="10" - width="394" /> + left="0" + name="conversations_stack" + orientation="horizontal" + right="-1" + top="0"> + <layout_panel + auto_resize="false" + user_resize="true" + name="conversations_layout_panel" + min_dim="38" + expanded_min_dim="156"> + <layout_stack + animate="false" + follows="left|top|right" + height="35" + layout="topleft" + left="0" + name="conversations_pane_buttons_stack" + orientation="horizontal" + right="-1" + top="0"> + <layout_panel + auto_resize="true" + height="35" + name="conversations_pane_buttons_expanded"> + <menu_button + follows="top|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_sort" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + menu_filename="menu_participant_view.xml" + layout="topleft" + left="5" + name="sort_btn" + tool_tip="View/sort options" + top="5" + width="31" /> + <button + follows="top|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_plus" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + top="5" + left_pad="2" + name="add_btn" + tool_tip="Start a new conversation" + width="31"/> + <button + follows="top|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Command_Speak_Icon" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + top="5" + left_pad="2" + name="speak_btn" + tool_tip="Speak with people using your microphone" + width="31"/> + </layout_panel> + <layout_panel + auto_resize="false" + height="35" + name="conversations_pane_buttons_collapsed" + width="41"> + <button + follows="right|top" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_collapse" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + top="5" + left="1" + name="expand_collapse_btn" + tool_tip="Collapse/Expand this list" + width="31" /> + </layout_panel> + </layout_stack> + <panel + bottom="-1" + follows="all" + layout="topleft" + name="conversations_list_panel" + opaque="true" + top="35" + left="5" + right="-1"/> + </layout_panel> + <layout_panel + auto_resize="true" + user_resize="true" + name="messages_layout_panel" + expanded_min_dim="222"> + <panel_container + bottom="-1" + follows="all" + layout="topleft" + left="0" + name="im_box_tab_container" + right="-1" + top="0"> + <panel + bottom="-1" + follows="all" + layout="topleft" + name="stub_panel" + opaque="true" + top_pad="0" + left="0" + right="-1"> + <button + follows="right|top" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_collapse" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + top="5" + right="-10" + name="stub_collapse_btn" + tool_tip="Collapse this pane" + width="31" /> + <text + type="string" + clip_partial="false" + follows="left|top|right" + layout="topleft" + left="15" + right="-15" + name="stub_textbox" + top="25" + height="40" + valign="center" + parse_urls="true" + wrap="true"> + This conversation is in a separate window. [secondlife:/// Bring it back.] + </text> + </panel> + </panel_container> + </layout_panel> + </layout_stack> </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 040b66623e..d8b085063f 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater - legacy_header_height="18" background_visible="true" default_tab_group="1" height="355" @@ -10,84 +9,393 @@ can_dock="false" can_minimize="true" can_close="true" + save_rect="true" visible="false" width="394" can_resize="true" - min_width="250" - min_height="190"> + can_tear_off="false" + min_height="190" + positioning="relative"> + <floater.string name="call_btn_start">Conv_toolbar_open_call</floater.string> + <floater.string name="call_btn_stop">Conv_toolbar_hang_up</floater.string> + <floater.string + name="collapseline_icon" + value="Conv_collapse_to_one_line"/> + <floater.string + name="expandline_icon" + value="Conv_expand_one_line"/> + <floater.string + name="collapse_icon" + value="Conv_toolbar_collapse"/> + <floater.string + name="expand_icon" + value="Conv_toolbar_expand"/> + <floater.string + name="tear_off_icon" + value="Conv_toolbar_arrow_ne"/> + <floater.string + name="return_icon" + value="Conv_toolbar_arrow_sw"/> + <floater.string + name="participant_added" + value="[NAME] was invited to the conversation."/> + <floater.string + name="multiple_participants_added" + value="[NAME] were invited to the conversation."/> + <floater.string + name="tooltip_to_separate_window" + value="Move this conversation to a separate window"/> + <floater.string + name="tooltip_to_main_window" + value="Move this conversation back to main window"/> + <floater.string + name="start_call_button_tooltip" + value="Open voice connection"/> + <floater.string + name="end_call_button_tooltip" + value="Close voice connection"/> + <floater.string + name="expcol_button_not_tearoff_tooltip" + value="Collapse this pane"/> + <floater.string + name="expcol_button_tearoff_and_expanded_tooltip" + value="Collapse participant list"/> + <floater.string + name="expcol_button_tearoff_and_collapsed_tooltip" + value="Expand participant list"/> + <view + follows="all" + layout="topleft" + name="contents_view" + top="0" + left="0" + height="355" + width="394"> + <layout_stack + animate="false" + default_tab_group="2" + follows="all" + height="355" + width="394" + layout="topleft" + orientation="vertical" + name="main_stack" + tab_group="1" + top="0" + left="0"> + + <layout_panel + follows="left|top|right" + layout="topleft" + name="toolbar_panel" + top="0" + left="0" + height="35" + min_height="35" + width="394"> + <menu_button + menu_filename="menu_im_session_showmodes.xml" + follows="top|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_sort" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left="5" + name="view_options_btn" + tool_tip="View/sort options" + top="5" + width="31" /> + <menu_button + menu_filename="menu_im_conversation.xml" + follows="top|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + top="5" + left_pad="2" + name="gear_btn" + visible="false" + tool_tip="Actions on selected person" + width="31"/> + <button + enabled="false" + follows="top|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_add_person" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + top="5" + left_pad="2" + name="add_btn" + tool_tip="Add someone to this conversation" + width="31"/> + <button + follows="top|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_open_call" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + top="5" + left_pad="2" + name="voice_call_btn" + tool_tip="Open voice connection" + width="31"/> + <output_monitor + auto_update="true" + follows="top|left" + draw_border="false" + height="16" + layout="topleft" + top="10" + left_pad="10" + mouse_opaque="true" + name="speaking_indicator" + visible="false" + width="20" /> + <button + follows="right|top" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_close" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + top="5" + left="292" + name="close_btn" + tool_tip="End this conversation" + width="31" /> + <button + follows="right|top" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_collapse" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + top="5" + left_pad="2" + name="expand_collapse_btn" + tool_tip="Collapse/Expand this pane" + width="31" /> + <button + follows="right|top" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_arrow_ne" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + top="5" + left_pad="2" + name="tear_off_btn" + width="31" /> + </layout_panel> + <layout_panel + name="body_panel" + follows="all" + width="394" + height="235" + user_resize="false" + auto_resize="true"> <layout_stack animate="true" default_tab_group="2" follows="all" - height="320" + height="275" width="394" layout="topleft" orientation="horizontal" name="im_panels" tab_group="1" - top="20" + top_pad="0" left="0"> <layout_panel - name="im_control_panel_holder" - min_width="115" + name="speakers_list_panel" + follows="all" + expanded_min_dim="115" + min_dim="0" width="150" - height="320" + height="275" + user_resize="true" auto_resize="false"> - <panel - name="panel_im_control_panel" - layout="topleft" - height="320" - width="150" - follows="all"/> </layout_panel> <layout_panel default_tab_group="3" left="0" tab_group="2" + follows="all" top="0" - height="200" - width="244" - user_resize="true"> - <button - height="20" - follows="left|top" - top="0" - left="2" - image_overlay="TabIcon_Open_Off" + height="275" + width="244" + layout="topleft" + user_resize="true" + auto_resize="true" + visible="true" + name="right_part_holder" + min_width="221"> + <panel + name="trnsAndChat_panel" + follows="all" + layout="topleft" + visible="true" + height="240" + width="244"> + <layout_stack + animate="true" + default_tab_group="2" + follows="all" + height="240" + width="244" layout="topleft" - width="25" - name="slide_left_btn" /> - <button - height="20" - follows="left|top" + visible="true" + orientation="vertical" + name="translate_and_chat_stack" + tab_group="1" + left_pad="0" top="0" - left="2" - image_overlay="TabIcon_Close_Off" - width="25" - name="slide_right_btn" /> - <chat_history - font="SansSerifSmall" - follows="left|right|top|bottom" - height="150" - name="chat_history" - parse_highlights="true" - parse_urls="true" - left="1" - width="238"> - </chat_history> - <line_editor - bottom="0" - left="3" - follows="left|right|bottom" - font="SansSerifSmall" - height="20" - label="To" - layout="bottomleft" - name="chat_editor" - spellcheck="true" - tab_group="3" - width="236"> - </line_editor> + left="0"> + <layout_panel + auto_resize="false" + user_resize="false" + height="26" + layout="topleft" + left_delta="0" + name="translate_chat_checkbox_lp" + top_delta="0" + visible="true" + width="210"> + <check_box + top="10" + control_name="TranslateChat" + enabled="true" + height="16" + label="Translate chat" + layout="topleft" + left="5" + name="translate_chat_checkbox" + width="230" /> + </layout_panel> + <layout_panel + width="210" + layout="topleft" + follows="all" + left_delta="0" + top_delta="0" + bottom="0" + visible="true" + user_resize="false" + auto_resize="true" + name="chat_holder"> + <chat_history + font="SansSerifSmall" + follows="all" + visible="true" + name="chat_history" + parse_highlights="true" + parse_urls="true" + layout="topleft" + right="-5" + left="5" + top="0" + bottom="1"> + </chat_history> + </layout_panel> + </layout_stack> + </panel> </layout_panel> </layout_stack> + </layout_panel> + <layout_panel + height="35" + layout="topleft" + follows="left|right|bottom" + left_delta="0" + right="0" + top_delta="0" + bottom="0" + visible="true" + user_resize="false" + auto_resize="false" + name="chat_layout_panel"> + <layout_stack + animate="true" + default_tab_group="2" + follows="all" + height="35" + right="0" + layout="topleft" + orientation="horizontal" + name="input_panels" + top_pad="0" + left="0"> + <layout_panel + height="35" + layout="topleft" + follows="left|right|bottom" + left_delta="0" + top_delta="0" + bottom="0" + visible="true" + user_resize="false" + auto_resize="true" + name="input_editor_layout_panel"> + <chat_editor + expand_lines_count="5" + follows="left|right|bottom" + font="SansSerifSmall" + visible="true" + height="20" + is_expandable="true" + label="To" + text_tentative_color="TextFgTentativeColor" + layout="topleft" + name="chat_editor" + max_length="1023" + spellcheck="true" + tab_group="3" + width="160" + top="6" + left="5" + right="-5" + wrap="true"> + </chat_editor> + </layout_panel> + <layout_panel + height="35" + layout="topleft" + follows="left|right|bottom" + left_delta="0" + top_delta="0" + bottom="0" + width="35" + visible="true" + user_resize="false" + auto_resize="false" + name="input_button_layout_panel"> + <button + follows="left|right|bottom" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_expand_one_line" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + name="minz_btn" + tool_tip="Shows/hides message panel" + width="28"/> + </layout_panel> + </layout_stack> + </layout_panel> + </layout_stack> + </view> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml index 81194f61cf..a7864381a9 100644 --- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml @@ -8,8 +8,8 @@ layout="topleft" name="incoming call" help_topic="incoming_call" - title="Incoming call" - width="410"> + sound_flags="0" + width="550"> <floater.string name="lifetime"> 5 @@ -24,7 +24,7 @@ </floater.string> <floater.string name="VoiceInviteP2P"> - is calling. + is calling you. </floater.string> <floater.string name="VoiceInviteAdHoc"> @@ -49,14 +49,14 @@ image_name="icon_avatar_online.tga" layout="topleft" left_delta="19" - top="35" + top="20" width="36" /> <group_icon enabled="false" follows="left|top" height="36" layout="topleft" - top="35" + top="20" width="36" /> <text clip_partial="true" @@ -67,43 +67,43 @@ name="caller name" top="20" use_ellipses="true" - width="315" + width="475" word_wrap="true" /> - <text - clip_partial="true" - font="SansSerif" - height="30" - layout="topleft" - left="77" - name="question" - top_pad="5" - use_ellipses="true" - width="315" - word_wrap="true"> - Do you want to leave [CURRENT_CHAT] and join this voice chat? - </text> - <button + <button height="24" - label="Accept" - label_selected="Accept" + label="Answer" + label_selected="Answer" layout="topleft" left="70" name="Accept" - top="92" - width="100" /> + top_pad="5" + width="120" /> <button height="24" - label="Reject" - label_selected="Reject" + label="Ignore" + label_selected="Ignore" layout="topleft" name="Reject" left_pad="10" - width="100" /> + width="120" /> <button height="24" - label="Start IM" + label="Open IM instead" layout="topleft" name="Start IM" left_pad="10" - width="100" /> + width="120" /> + <text + clip_partial="true" + font="SansSerif" + height="30" + layout="topleft" + left="77" + name="question" + top_pad="5" + use_ellipses="true" + width="475" + word_wrap="true"> + If you answer, you will be disconnected from your current voice conversation. + </text> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml index 4e7ee7913f..5e84283ab0 100644 --- a/indra/newview/skins/default/xui/en/floater_moveview.xml +++ b/indra/newview/skins/default/xui/en/floater_moveview.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater positioning="specified" - left="320" - bottom="-80" + right="-693" + bottom="-50" legacy_header_height="18" can_dock="false" can_minimize="true" diff --git a/indra/newview/skins/default/xui/en/floater_my_inventory.xml b/indra/newview/skins/default/xui/en/floater_my_inventory.xml index ea44fd493e..178987962b 100644 --- a/indra/newview/skins/default/xui/en/floater_my_inventory.xml +++ b/indra/newview/skins/default/xui/en/floater_my_inventory.xml @@ -6,7 +6,7 @@ height="570" help_topic="sidebar_inventory" min_width="333" - min_height="560" + min_height="570" name="floater_my_inventory" save_rect="true" save_visibility="true" diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml index 2629313069..79f2027c31 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml @@ -152,7 +152,7 @@ </text> <check_box height="19" - label="World" + label="Test" layout="topleft" name="show_world" top_pad="4" diff --git a/indra/newview/skins/default/xui/en/floater_people.xml b/indra/newview/skins/default/xui/en/floater_people.xml index 08d0b00a83..701233ba4a 100644 --- a/indra/newview/skins/default/xui/en/floater_people.xml +++ b/indra/newview/skins/default/xui/en/floater_people.xml @@ -6,21 +6,21 @@ can_resize="true" height="570" help_topic="sidebar_people" - min_height="440" - min_width="333" + min_height="220" + min_width="260" layout="topleft" name="floater_people" save_rect="true" single_instance="true" reuse_instance="true" title="PEOPLE" - width="333"> + width="370"> <panel_container default_panel_name="panel_people" follows="all" height="570" name="main_panel" - width="333"> + width="370"> <panel class="panel_people" name="panel_people" @@ -31,11 +31,5 @@ filename="panel_group_info_sidetray.xml" label="Group Profile" font="SansSerifBold"/> - <panel - class="panel_block_list_sidetray" - name="panel_block_list_sidetray" - filename="panel_block_list_sidetray.xml" - label="Blocked Residents & Objects" - font="SansSerifBold"/> </panel_container> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml index f3f8d4ddca..1ea256b8b3 100644 --- a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml +++ b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml @@ -2,7 +2,7 @@ <floater legacy_header_height="18" can_minimize="false" - height="550" + height="600" layout="topleft" name="TexFetchDebugger" help_topic="texfetchdebugger" @@ -195,10 +195,34 @@ height="25" layout="topleft" left_delta="0" + name="total_time_refetch_all_cache_label" + top_delta="25" + width="540"> + 16, Refetching all textures from cache, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels + </text> + <text + type="string" + length="1" + follows="left|top" + height="25" + layout="topleft" + left_delta="0" name="total_time_refetch_vis_http_label" top_delta="25" width="540"> - 16, Refetching visibles from HTTP, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels + 17, Refetching visibles from HTTP, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels + </text> + <text + type="string" + length="1" + follows="left|top" + height="25" + layout="topleft" + left_delta="0" + name="total_time_refetch_all_http_label" + top_delta="25" + width="540"> + 18, Refetching all textures from HTTP, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels </text> <spinner decimal_digits="2" @@ -206,7 +230,7 @@ height="20" increment="0.01" initial_value="1.0" - label="17, Ratio of Texel/Pixel:" + label="19, Ratio of Texel/Pixel:" label_width="130" layout="topleft" left_delta="0" @@ -218,14 +242,53 @@ <spinner.commit_callback function="TexFetchDebugger.ChangeTexelPixelRatio" /> </spinner> + <text + type="string" + length="1" + follows="left|top" + height="25" + layout="topleft" + left_delta="0" + name="texture_source_label" + top_delta="30" + width="110"> + 20, Texture Source: + </text> + <radio_group + control_name="TextureFetchSource" + follows="top|left" + draw_border="false" + height="25" + layout="topleft" + left_pad="0" + name="texture_source" + top_delta="0" + width="264"> + <radio_item + height="16" + label="Cache + HTTP" + layout="topleft" + left="3" + name="0" + top="0" + width="100" /> + <radio_item + height="16" + label="HTTP Only" + layout="topleft" + left_delta="100" + name="1" + top_delta="0" + width="200" /> + </radio_group> <button follows="left|top" height="20" label="Start" layout="topleft" - left_delta="0" + left="10" name="start_btn" - top_delta="30" + top_delta="20" width="70"> <button.commit_callback function="TexFetchDebugger.Start" /> @@ -261,7 +324,7 @@ layout="topleft" left="10" name="cacheread_btn" - top_delta="30" + top_delta="20" width="80"> <button.commit_callback function="TexFetchDebugger.CacheRead" /> @@ -321,7 +384,7 @@ layout="topleft" left="10" name="refetchviscache_btn" - top_delta="30" + top_delta="20" width="120"> <button.commit_callback function="TexFetchDebugger.RefetchVisCache" /> @@ -329,6 +392,18 @@ <button follows="left|top" height="20" + label="Refetch All Cache" + layout="topleft" + left_pad="7" + name="refetchallcache_btn" + top_delta="0" + width="120"> + <button.commit_callback + function="TexFetchDebugger.RefetchAllCache" /> + </button> + <button + follows="left|top" + height="20" label="Refetch Vis HTTP" layout="topleft" left_pad="7" @@ -338,4 +413,16 @@ <button.commit_callback function="TexFetchDebugger.RefetchVisHTTP" /> </button> + <button + follows="left|top" + height="20" + label="Refetch All HTTP" + layout="topleft" + left_pad="7" + name="refetchallhttp_btn" + top_delta="0" + width="120"> + <button.commit_callback + function="TexFetchDebugger.RefetchAllHTTP" /> + </button> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 5204efbf65..436e9f8fed 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2994,7 +2994,7 @@ even though the user gets a free copy. use_ellipses="true" read_only="true" name="media_info" - width="280" /> + width="180" /> <web_browser visible="false" enabled="false" diff --git a/indra/newview/skins/default/xui/en/floater_top_objects.xml b/indra/newview/skins/default/xui/en/floater_top_objects.xml index 4dfdcd15c7..0b71177345 100644 --- a/indra/newview/skins/default/xui/en/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/en/floater_top_objects.xml @@ -2,7 +2,7 @@ <floater legacy_header_height="18" can_resize="true" - height="350" + height="372" layout="topleft" min_height="300" min_width="450" @@ -23,10 +23,6 @@ Time </floater.string> <floater.string - name="scripts_mono_time_label"> - Mono Time - </floater.string> - <floater.string name="top_colliders_title"> Top Colliders </floater.string> @@ -68,31 +64,35 @@ <scroll_list.columns label="Score" name="score" - width="55" /> + width="45" /> <scroll_list.columns label="Name" name="name" - width="140" /> + width="130" /> <scroll_list.columns label="Owner" name="owner" - width="105" /> + width="100" /> <scroll_list.columns label="Location" name="location" - width="130" /> + width="120" /> + <scroll_list.columns + label="Parcel" + name="parcel" + width="120" /> <scroll_list.columns label="Time" name="time" - width="150" /> - <scroll_list.columns - label="Mono Time" - name="mono_time" - width="100" /> + width="130" /> <scroll_list.columns label="URLs" name="URLs" - width="100" /> + width="40" /> + <scroll_list.columns + label="Memory (KB)" + name="memory" + width="40" /> <scroll_list.commit_callback function="TopObjects.CommitObjectsList" /> </scroll_list> @@ -193,6 +193,38 @@ <button.commit_callback function="TopObjects.GetByOwnerName" /> </button> + <text + type="string" + length="1" + follows="left|bottom" + height="20" + layout="topleft" + left="10" + top_pad="5" + name="parcel_name_text" + width="107"> + Parcel: + </text> + <line_editor + follows="left|bottom|right" + height="20" + layout="topleft" + left_pad="3" + name="parcel_name_editor" + top_delta="-3" + width="568" /> + <button + follows="bottom|right" + height="23" + label="Filter" + layout="topleft" + left_pad="5" + name="filter_parcel_btn" + top_delta="0" + width="100"> + <button.commit_callback + function="TopObjects.GetByParcelName" /> + </button> <button follows="bottom|right" height="22" diff --git a/indra/newview/skins/default/xui/en/floater_ui_preview.xml b/indra/newview/skins/default/xui/en/floater_ui_preview.xml index 06d4327293..eb01294831 100644 --- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml @@ -5,7 +5,7 @@ height="640" layout="topleft" min_height="230" - min_width="650" + min_width="750" name="gui_preview_tool" help_topic="gui_preview_tool" single_instance="true" diff --git a/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml b/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml new file mode 100644 index 0000000000..5c71fd3bc6 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> + +<floater + legacy_header_height="25" + bevel_style="in" + bg_opaque_image="Inspector_Background" + can_close="false" + can_minimize="false" + height="90" + layout="topleft" + name="floater_voice_volume" + single_instance="true" + sound_flags="0" + title="VOICE CHAT VOLUME" + visible="true" + width="245"> + <slider + control_name="AudioLevelVoice" + disabled_control="MuteAudio" + follows="left|top" + height="16" + increment="0.025" + initial_value="0.5" + label="Voice Chat" + label_width="50" + layout="topleft" + left="15" + top="50" + name="chat_voice_volume" + show_text="false" + slider_label.halign="right" + volume="true" + width="200"> + </slider> + <button + control_name="MuteVoice" + disabled_control="MuteAudio" + follows="top|left" + height="16" + image_selected="AudioMute_Off" + image_unselected="Audio_Off" + is_toggle="true" + layout="topleft" + left_pad="5" + name="mute_audio" + tab_stop="false" + width="16" /> +</floater>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml deleted file mode 100644 index dce2720cf8..0000000000 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ /dev/null @@ -1,155 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater - positioning="cascading" - can_resize="true" - can_minimize="true" - can_close="true" - chrome="true" - height="205" - layout="topleft" - min_height="124" - min_width="190" - 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 - name="title_nearby"> - VOICE SETTINGS - </string> - <string - name="title_group"> - GROUP CALL WITH [GROUP] - </string> - <string - name="title_adhoc"> - CONFERENCE CALL - </string> - <string - name="title_peer_2_peer"> - CALL WITH [NAME] - </string> - <string - name="no_one_near"> - No one near has voice enabled - </string> - <layout_stack - clip="false" - follows="all" - height="189" - layout="topleft" - left="10" - mouse_opaque="false" - name="my_call_stack" - orientation="vertical" - width="263"> - <layout_panel - follows="top|left|right" - auto_resize="false" - layout="topleft" - min_height="20" - height="20" - name="my_panel"> - <avatar_icon - enabled="false" - follows="left|top" - height="18" - default_icon_name="Generic_Person" - layout="topleft" - left="5" - name="user_icon" - top="0" - width="18" /> - <text - follows="top|left|right" - font="SansSerifSmallBold" - height="16" - layout="topleft" - left_pad="10" - name="user_text" - text_color="White" - top="4" - use_ellipses="true" - value="My Avatar:" - width="210" /> - <output_monitor - auto_update="true" - draw_border="false" - follows="top|right" - height="16" - layout="topleft" - right="-3" - name="speaking_indicator" - left_pad="5" - visible="true" - width="20" /> - </layout_panel> - <layout_panel name="leave_call_panel" height="26" min_height="26" auto_resize="false"> - <layout_stack - clip="true" - follows="left|top|right" - height="26" - layout="topleft" - mouse_opaque="false" - name="voice_effect_and_leave_call_stack" - orientation="horizontal" - width="262"> - <layout_panel - height="26" - width="200"> - <panel - class="panel_voice_effect" - name="panel_voice_effect" - visiblity_control="VoiceMorphingEnabled" - filename="panel_voice_effect.xml" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|right" - height="23" - visible="true" - layout="topleft" - name="leave_call_btn_panel" - width="100"> - <button - follows="right|top" - height="23" - label="Leave Call" - name="leave_call_btn" - width="100" /> - </layout_panel> - </layout_stack> - </layout_panel> - <layout_panel - follows="all" - layout="topleft" - left="2" - top_pad="0" - height="132" - name="callers_panel" - auto_resize="true" - width="280"> - <avatar_list - follows="all" - height="132" - ignore_online_status="true" - layout="topleft" - multi_select="true" - name="speakers_list" - width="280" /> - <panel - filename="panel_avatar_list_item.xml" - follows="left|right|top" - height="24" - layout="topleft" - left="0" - name="non_avatar_caller" - top="10" - width="276" /> - </layout_panel> - </layout_stack> -</floater> diff --git a/indra/newview/skins/default/xui/en/floater_voice_effect.xml b/indra/newview/skins/default/xui/en/floater_voice_effect.xml index 35cb2670d0..146c3d7e30 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_effect.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_effect.xml @@ -5,12 +5,13 @@ height="500" name="voice_effects" help_topic="voice_effects" - title="VOICE MORPHING" + title="VOICE MORPHING PREVIEW" background_visible="true" label="Places" layout="topleft" min_height="360" min_width="200" + save_rect="true" width="300"> <string name="no_voice_effect"> (No Voice Morph) diff --git a/indra/newview/skins/default/xui/en/floater_voice_volume.xml b/indra/newview/skins/default/xui/en/floater_voice_volume.xml new file mode 100644 index 0000000000..9346295d5b --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_voice_volume.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<!-- + Not can_close / no title to avoid window chrome + Single instance - only have one at a time, recycle it each spawn +--> +<floater + legacy_header_height="25" + bevel_style="in" + bg_opaque_image="Inspector_Background" + can_close="false" + can_minimize="false" + height="90" + layout="topleft" + name="floater_voice_volume" + single_instance="true" + sound_flags="0" + title="VOICE VOLUME" + visible="true" + width="245"> + <text + follows="top|left|right" + font="SansSerifSmall" + height="21" + left="10" + name="avatar_name" + parse_urls="false" + top="35" + text_color="White" + translate="false" + use_ellipses="true" + value="TestString PleaseIgnore" + width="225" /> + <slider + follows="top|left" + height="23" + increment="0.01" + left="1" + max_val="0.95" + min_val="0.05" + name="volume_slider" + show_text="false" + tool_tip="Voice volume" + top_pad="0" + value="0.5" + width="200" /> + <button + follows="top|left" + height="16" + image_disabled="Audio_Off" + image_disabled_selected="AudioMute_Off" + image_hover_selected="AudioMute_Over" + image_selected="AudioMute_Off" + image_unselected="Audio_Off" + is_toggle="true" + left_pad="0" + top_delta="4" + name="mute_btn" + width="16" /> +</floater> diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml index bc3bcd331b..ef4f19cd4c 100644 --- a/indra/newview/skins/default/xui/en/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml @@ -2,14 +2,14 @@ <!-- Not can_close / no title to avoid window chrome Single instance - only have one at a time, recycle it each spawn ---> +--> <floater legacy_header_height="25" bevel_style="in" bg_opaque_image="Inspector_Background" can_close="false" can_minimize="false" - height="164" + height="160" layout="topleft" name="inspect_avatar" single_instance="true" @@ -98,13 +98,13 @@ follows="top|left" height="23" increment="0.01" - left="1" + left="10" max_val="0.95" min_val="0.05" name="volume_slider" show_text="false" tool_tip="Voice volume" - top_pad="0" + top_pad="5" value="0.5" width="200" /> <button @@ -116,10 +116,21 @@ image_selected="AudioMute_Off" image_unselected="Audio_Off" is_toggle="true" - left_pad="0" + left_pad="5" top_delta="4" name="mute_btn" width="16" /> + <text + follows="top|left" + height="16" + left="8" + name="avatar_profile_link" + font="SansSerifSmall" + text_color="White" + top_pad="5" + translate="false" + value="[[LINK] View full profile]" + width="175" /> <avatar_icon follows="top|left" height="38" @@ -130,83 +141,4 @@ name="avatar_icon" top="10" width="38" /> -<!-- Overlapping buttons for default actions - llinspectavatar.cpp makes visible the most likely default action ---> - <button - follows="top|left" - height="20" - label="Add Friend" - left="8" - top="135" - name="add_friend_btn" - width="90" /> - <button - follows="top|left" - height="20" - label="IM" - left_delta="0" - top_delta="0" - name="im_btn" - width="80" - commit_callback.function="InspectAvatar.IM"/> - <button - follows="top|left" - height="20" - label="Profile" - layout="topleft" - name="view_profile_btn" - left_delta="96" - top_delta="0" - tab_stop="false" - width="80" /> - <!-- gear buttons here --> - <menu_button - follows="top|left" - height="20" - layout="topleft" - image_overlay="OptionsMenu_Off" - menu_filename="menu_inspect_avatar_gear.xml" - name="gear_btn" - right="-5" - top_delta="0" - width="35" /> - <menu_button - follows="top|left" - height="20" - image_overlay="OptionsMenu_Off" - menu_filename="menu_inspect_self_gear.xml" - name="gear_self_btn" - right="-5" - top_delta="0" - width="35" /> - <panel - follows="top|left" - top="164" - left="0" - height="60" - width="228" - visible="false" - background_visible="true" - name="moderator_panel" - background_opaque="true" - bg_opaque_color="MouseGray"> - <button - name="disable_voice" - label="Disable Voice" - top="20" - width="95" - height="20" - left="10" - commit_callback.function="InspectAvatar.DisableVoice"/> - <button - name="enable_voice" - label="Enable Voice" - top="20" - width="95" - height="20" - left="10" - visible="false" - commit_callback.function="InspectAvatar.EnableVoice"/> - </panel> </floater> diff --git a/indra/newview/skins/default/xui/en/menu_cof_gear.xml b/indra/newview/skins/default/xui/en/menu_cof_gear.xml index a6e9a40e31..45cf780557 100644 --- a/indra/newview/skins/default/xui/en/menu_cof_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_cof_gear.xml @@ -9,5 +9,5 @@ <menu label="New Body Parts" layout="topleft" - name="COF.Geear.New_Body_Parts" /> + name="COF.Gear.New_Body_Parts" /> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml new file mode 100644 index 0000000000..5a13ef0a59 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_conversation.xml @@ -0,0 +1,203 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + bottom="806" + layout="topleft" + left="0" + mouse_opaque="false" + name="menu_conversation_participant" + visible="false"> + <menu_item_call + label="Close conversation" + layout="topleft" + name="close_conversation"> + <on_click function="Avatar.DoToSelected" parameter="close_conversation"/> + </menu_item_call> + <menu_item_call + label="Open voice conversation" + layout="topleft" + name="open_voice_conversation"> + <on_click function="Avatar.DoToSelected" parameter="open_voice_conversation"/> + </menu_item_call> + <menu_item_call + label="Disconnect from voice" + layout="topleft" + name="disconnect_from_voice"> + <on_click function="Avatar.DoToSelected" parameter="disconnect_from_voice"/> + </menu_item_call> + <menu_item_separator layout="topleft" name="separator_disconnect_from_voice"/> + <menu_item_call + label="View Profile" + layout="topleft" + name="view_profile"> + <on_click function="Avatar.DoToSelected" parameter="view_profile"/> + <on_enable function="Avatar.EnableItem" parameter="can_view_profile"/> + </menu_item_call> + <menu_item_call + label="IM" + layout="topleft" + name="im"> + <on_click function="Avatar.DoToSelected" parameter="im"/> + <on_enable function="Avatar.EnableItem" parameter="can_im"/> + </menu_item_call> + <menu_item_call + label="Offer teleport" + layout="topleft" + name="offer_teleport"> + <on_click function="Avatar.DoToSelected" parameter="offer_teleport"/> + <on_enable function="Avatar.EnableItem" parameter="can_offer_teleport"/> + </menu_item_call> + <menu_item_call + label="Voice call" + layout="topleft" + name="voice_call"> + <on_click function="Avatar.DoToSelected" parameter="voice_call"/> + <on_enable function="Avatar.EnableItem" parameter="can_call" /> + </menu_item_call> + <menu_item_call + label="Chat history..." + layout="topleft" + name="chat_history"> + <on_click function="Avatar.DoToSelected" parameter="chat_history"/> + <on_enable function="Avatar.EnableItem" parameter="can_chat_history"/> + </menu_item_call> + <menu_item_separator layout="topleft" name="separator_chat_history"/> + <menu_item_call + label="Add friend" + layout="topleft" + name="add_friend"> + <on_click function="Avatar.DoToSelected" parameter="add_friend"/> + <on_enable function="Avatar.EnableItem" parameter="can_add" /> + </menu_item_call> + <menu_item_call + label="Remove friend" + layout="topleft" + name="remove_friend"> + <on_click function="Avatar.DoToSelected" parameter="remove_friend" /> + <on_enable function="Avatar.EnableItem" parameter="can_delete" /> + </menu_item_call> + <menu_item_call + label="Remove friends" + layout="topleft" + name="remove_friends"> + <on_click function="Avatar.DoToSelected" parameter="remove_friend" /> + <on_enable function="Avatar.EnableItem" parameter="can_delete" /> + </menu_item_call> + <menu_item_call + label="Invite to group..." + layout="topleft" + name="invite_to_group"> + <on_click function="Avatar.DoToSelected" parameter="invite_to_group" /> + <on_enable function="Avatar.EnableItem" parameter="can_invite" /> + </menu_item_call> + <menu_item_separator layout="topleft" name="separator_invite_to_group"/> + <menu_item_call + label="Zoom In" + layout="topleft" + name="zoom_in"> + <on_click function="Avatar.DoToSelected" parameter="zoom_in" /> + <on_enable function="Avatar.EnableItem" parameter="can_zoom_in" /> + </menu_item_call> + <menu_item_call + label="Map" + layout="topleft" + name="map"> + <on_click function="Avatar.DoToSelected" parameter="map" /> + <on_enable function="Avatar.EnableItem" parameter="can_show_on_map" /> + </menu_item_call> + <menu_item_call + label="Share" + layout="topleft" + name="share"> + <on_click function="Avatar.DoToSelected" parameter="share" /> + <on_enable function="Avatar.EnableItem" parameter="can_share" /> + </menu_item_call> + <menu_item_call + label="Pay" + layout="topleft" + name="pay"> + <on_click function="Avatar.DoToSelected" parameter="pay" /> + <on_enable function="Avatar.EnableItem" parameter="can_pay" /> + </menu_item_call> + <menu_item_check + label="Block Voice" + layout="topleft" + name="block_unblock"> + <on_click function="Avatar.DoToSelected" parameter="block_unblock" /> + <on_check function="Avatar.CheckItem" parameter="is_blocked" /> + <on_enable function="Avatar.EnableItem" parameter="can_block" /> + </menu_item_check> + <menu_item_check + label="Block Text" + layout="topleft" + name="MuteText"> + <on_click function="Avatar.DoToSelected" parameter="mute_unmute" /> + <on_check function="Avatar.CheckItem" parameter="is_muted" /> + <on_enable function="Avatar.EnableItem" parameter="can_block" /> + </menu_item_check> + <menu_item_call + label="Group Profile" + layout="topleft" + name="group_profile"> + <on_click function="Group.DoToSelected" parameter="group_profile"/> + <on_enable function="Avatar.EnableItem" parameter="can_group_profile" /> + </menu_item_call> + <menu_item_call + label="Activate Group" + layout="topleft" + name="activate_group"> + <on_click function="Group.DoToSelected" parameter="activate_group"/> + <on_enable function="Avatar.EnableItem" parameter="can_activate_group" /> + </menu_item_call> + <menu_item_call + label="Leave Group" + layout="topleft" + name="leave_group"> + <on_click function="Group.DoToSelected" parameter="leave_group"/> + <on_enable function="Avatar.EnableItem" parameter="can_leave_group" /> + </menu_item_call> + <menu_item_separator layout="topleft" name="Moderator Options Separator"/> + <context_menu + label="Moderator Options" + layout="topleft" + name="Moderator Options"> + <menu_item_check + label="Allow text chat" + layout="topleft" + name="AllowTextChat"> + <on_check function="Avatar.CheckItem" parameter="is_allowed_text_chat" /> + <on_click function="Avatar.DoToSelected" parameter="toggle_allow_text_chat" /> + <on_enable function="Avatar.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="Avatar.DoToSelected" parameter="selected" /> + <on_enable function="Avatar.EnableItem" parameter="can_mute" /> + <on_visible function="Avatar.VisibleItem" parameter="show_mute" /> + </menu_item_call> + <menu_item_call + label="Unmute this participant" + layout="topleft" + name="ModerateVoiceUnMuteSelected"> + <on_click function="Avatar.DoToSelected" parameter="selected" /> + <on_enable function="Avatar.EnableItem" parameter="can_unmute" /> + <on_visible function="Avatar.VisibleItem" parameter="show_unmute" /> + </menu_item_call> + <menu_item_call + label="Mute everyone" + layout="topleft" + name="ModerateVoiceMute"> + <on_click function="Avatar.DoToSelected" parameter="mute_all" /> + <on_enable function="Avatar.EnableItem" parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Unmute everyone" + layout="topleft" + name="ModerateVoiceUnmute"> + <on_click function="Avatar.DoToSelected" parameter="unmute_all" /> + <on_enable function="Avatar.EnableItem" parameter="can_moderate_voice" /> + </menu_item_call> + </context_menu> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_conversation_log_gear.xml b/indra/newview/skins/default/xui/en/menu_conversation_log_gear.xml new file mode 100644 index 0000000000..8796b87955 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_conversation_log_gear.xml @@ -0,0 +1,142 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + layout="topleft" + name="Conversation Context Menu"> + <menu_item_call + label="IM..." + layout="topleft" + name="IM"> + <on_click + function="Calllog.Action" + parameter="im" /> + <on_enable + function="Calllog.Enable" + parameter="can_im" /> + </menu_item_call> + <menu_item_call + label="Voice call..." + layout="topleft" + name="Call"> + <on_click + function="Calllog.Action" + parameter="call" /> + <on_enable + function="Calllog.Enable" + parameter="can_call" /> + </menu_item_call> + <menu_item_call + label="Open chat history..." + layout="topleft" + name="Chat history"> + <on_click + function="Calllog.Action" + parameter="chat_history" /> + <on_enable + function="Calllog.Enable" + parameter="can_view_chat_history" /> + </menu_item_call> + <menu_item_call + label="View Profile" + layout="topleft" + name="View Profile"> + <on_click + function="Calllog.Action" + parameter="view_profile" /> + <on_enable + function="Calllog.Enable" + parameter="can_view_profile" /> + </menu_item_call> + <menu_item_call + label="Offer Teleport" + name="teleport"> + <on_click + function="Calllog.Action" + parameter="offer_teleport"/> + <on_enable + function="Calllog.Enable" + parameter="can_offer_teleport"/> + </menu_item_call> + <menu_item_separator /> + <menu_item_call + label="Add Friend" + layout="topleft" + name="add_friend"> + <on_click + function="Calllog.Action" + parameter="add_friend"/> + <on_visible + function="Calllog.Check" + parameter="is_not_friend" /> + </menu_item_call> + <menu_item_call + label="Remove Friend" + layout="topleft" + name="remove_friend"> + <on_click + function="Calllog.Action" + parameter="remove_friend"/> + <on_visible + function="Calllog.Check" + parameter="is_friend" /> + </menu_item_call> + <menu_item_call + label="Invite to group..." + layout="topleft" + name="Invite"> + <on_click + function="Calllog.Action" + parameter="invite_to_group"/> + <on_enable + function="Calllog.Enable" + parameter="can_invite_to_group" /> + </menu_item_call> + <menu_item_separator /> + <menu_item_call + label="Map" + layout="topleft" + name="Map"> + <on_click + function="Calllog.Action" + parameter="show_on_map" /> + <on_enable + function="Calllog.Enable" + parameter="can_show_on_map" /> + </menu_item_call> + <menu_item_call + label="Share" + layout="topleft" + name="Share"> + <on_click + function="Calllog.Action" + parameter="share" /> + <on_enable + function="Calllog.Enable" + parameter="can_share" /> + </menu_item_call> + <menu_item_call + label="Pay" + layout="topleft" + name="Pay"> + <on_click + function="Calllog.Action" + parameter="pay" /> + <on_enable + function="Calllog.Enable" + parameter="can_pay" /> + </menu_item_call> + <menu_item_check + label="Block/Unblock" + layout="topleft" + name="Block/Unblock"> + <menu_item_check.on_click + function="Calllog.Action" + parameter="block"/> + <menu_item_check.on_check + function="Calllog.Check" + parameter="is_blocked" /> + <menu_item_check.on_enable + function="Calllog.Enable" + parameter="can_block" /> + </menu_item_check> + +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_conversation_log_view.xml b/indra/newview/skins/default/xui/en/menu_conversation_log_view.xml new file mode 100644 index 0000000000..ce65b23971 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_conversation_log_view.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + name="menu_conversation_view" + left="0" bottom="0" visible="false" + mouse_opaque="false"> + <menu_item_check + label="Sort by name" + name="sort_by_name"> + <on_click + function="CallLog.Action" + parameter="sort_by_name"/> + <on_check + function="CallLog.Check" + parameter="sort_by_name"/> + </menu_item_check> + <menu_item_check + label="Sort by date" + name="sort_by_date"> + <on_click + function="CallLog.Action" + parameter="sort_by_date" /> + <on_check + function="CallLog.Check" + parameter="sort_by_date" /> + </menu_item_check> + <menu_item_separator /> + <menu_item_check + label="Sort friends on top" + name="sort_by_friends"> + <on_click + function="CallLog.Action" + parameter="sort_friends_on_top" /> + <on_check + function="CallLog.Check" + parameter="sort_friends_on_top" /> + </menu_item_check> + <menu_item_separator /> + <menu_item_call + label="View Nearby chat history..." + name="view_nearby_chat_history"> + <on_click + function="CallLog.Action" + parameter="view_nearby_chat_history" /> + </menu_item_call> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_group_plus.xml b/indra/newview/skins/default/xui/en/menu_group_plus.xml index fce7414d80..eca9e7f3c9 100644 --- a/indra/newview/skins/default/xui/en/menu_group_plus.xml +++ b/indra/newview/skins/default/xui/en/menu_group_plus.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<menu name="menu_group_plus" +<toggleable_menu name="menu_group_plus" left="0" bottom="0" visible="false" mouse_opaque="false"> <menu_item_call name="item_join" label="Join Group..."> @@ -8,4 +8,4 @@ <menu_item_call name="item_new" label="New Group..."> <menu_item_call.on_click function="People.Group.Plus.Action" userdata="new_group" /> </menu_item_call> -</menu> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_im_conversation.xml b/indra/newview/skins/default/xui/en/menu_im_conversation.xml new file mode 100644 index 0000000000..43287c6ec3 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_im_conversation.xml @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + layout="topleft" + name="Conversation Gear Menu"> + <menu_item_call + label="View Profile" + layout="topleft" + name="View Profile"> + <on_click function="Avatar.GearDoToSelected" parameter="view_profile" /> + <on_enable function="Avatar.EnableGearItem" parameter="can_view_profile" /> + </menu_item_call> + <menu_item_call + label="Add Friend" + layout="topleft" + name="Add Friend"> + <on_click function="Avatar.GearDoToSelected" parameter="add_friend" /> + <on_enable function="Avatar.EnableGearItem" parameter="can_add" /> + </menu_item_call> + <menu_item_call + label="Remove friend" + layout="topleft" + name="remove_friend"> + <on_click function="Avatar.GearDoToSelected" parameter="remove_friend" /> + <on_enable function="Avatar.EnableGearItem" parameter="can_delete" /> + </menu_item_call> + <menu_item_call + label="Offer teleport" + layout="topleft" + name="offer_teleport"> + <on_click function="Avatar.GearDoToSelected" parameter="offer_teleport"/> + <on_enable function="Avatar.EnableGearItem" parameter="can_offer_teleport"/> + </menu_item_call> + <menu_item_call + label="Invite to group..." + layout="topleft" + name="invite_to_group"> + <on_click function="Avatar.GearDoToSelected" parameter="invite_to_group" /> + <on_enable function="Avatar.EnableGearItem" parameter="can_invite" /> + </menu_item_call> + <menu_item_separator + layout="topleft" + name="View Icons Separator" /> + <menu_item_call + label="Chat history..." + layout="topleft" + name="chat_history"> + <on_click function="Avatar.GearDoToSelected" parameter="chat_history"/> + <on_enable function="Avatar.EnableGearItem" parameter="can_chat_history"/> + </menu_item_call> + <menu_item_separator + layout="topleft"/> + <menu_item_call + label="Zoom In" + layout="topleft" + name="zoom_in"> + <on_click function="Avatar.DoToSelected" parameter="zoom_in" /> + <on_enable function="Avatar.EnableItem" parameter="can_zoom_in" /> + </menu_item_call> + <menu_item_call + label="Map" + layout="topleft" + name="map"> + <on_click function="Avatar.GearDoToSelected" parameter="map" /> + <on_enable function="Avatar.EnableGearItem" parameter="can_show_on_map" /> + </menu_item_call> + <menu_item_call + label="Share" + layout="topleft" + name="Share"> + <on_click function="Avatar.GearDoToSelected" parameter="share" /> + <on_enable function="Avatar.EnableGearItem" parameter="can_share" /> + </menu_item_call> + <menu_item_call + label="Pay" + layout="topleft" + name="Pay"> + <on_click function="Avatar.GearDoToSelected" parameter="pay" /> + <on_enable function="Avatar.EnableGearItem" parameter="can_pay" /> + </menu_item_call> + <menu_item_separator + layout="topleft"/> + <menu_item_check + label="Block Voice" + layout="topleft" + name="Block/Unblock"> + <on_check function="Avatar.CheckGearItem" parameter="is_blocked" /> + <on_click function="Avatar.GearDoToSelected" parameter="block_unblock" /> + <on_enable function="Avatar.EnableGearItem" parameter="can_block" /> + </menu_item_check> + <menu_item_check + label="Block Text" + layout="topleft" + name="MuteText"> + <on_check function="Avatar.CheckGearItem" parameter="is_muted" /> + <on_click function="Avatar.GearDoToSelected" parameter="mute_unmute" /> + <on_enable function="Avatar.EnableGearItem" parameter="can_block" /> + </menu_item_check> + <menu_item_separator + layout="topleft"/> +</toggleable_menu> + diff --git a/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml b/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml new file mode 100644 index 0000000000..b0adca0e0e --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + name="menu_modes" + left="0" bottom="0" visible="false" + mouse_opaque="false"> + <menu_item_check + label="Compact view" + name="compact_view"> + <menu_item_check.on_click + function="IMSession.Menu.Action" + parameter="compact_view"/> + <menu_item_check.on_check + function="IMSession.Menu.CompactExpandedModes.CheckItem" + parameter="compact_view"/> + </menu_item_check> + <menu_item_check + label="Expanded view" + name="expanded_view"> + <menu_item_check.on_click + function="IMSession.Menu.Action" + parameter="expanded_view"/> + <menu_item_check.on_check + function="IMSession.Menu.CompactExpandedModes.CheckItem" + parameter="expanded_view"/> + </menu_item_check> + <menu_item_separator layout="topleft" /> + <menu_item_check name="IMShowTime" label="Show time"> + <menu_item_check.on_click + function="IMSession.Menu.Action" + parameter="IMShowTime" /> + <menu_item_check.on_check + function="IMSession.Menu.ShowModes.CheckItem" + parameter="IMShowTime" /> + <menu_item_check.on_enable + function="IMSession.Menu.ShowModes.Enable" + parameter="IMShowTime" /> + </menu_item_check> + <menu_item_check name="IMShowNamesForP2PConv" label="Show names in one-to-one conversations"> + <menu_item_check.on_click + function="IMSession.Menu.Action" + parameter="IMShowNamesForP2PConv" /> + <menu_item_check.on_check + function="IMSession.Menu.ShowModes.CheckItem" + parameter="IMShowNamesForP2PConv" /> + <menu_item_check.on_enable + function="IMSession.Menu.ShowModes.Enable" + parameter="IMShowNamesForP2PConv" /> + </menu_item_check> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_im_well_button.xml b/indra/newview/skins/default/xui/en/menu_im_well_button.xml deleted file mode 100644 index f8dfba91ff..0000000000 --- a/indra/newview/skins/default/xui/en/menu_im_well_button.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<context_menu - layout="topleft" - name="IM Well Button Context Menu"> - <menu_item_call - label="Close All" - layout="topleft" - name="Close All"> - <menu_item_call.on_click - function="IMWellChicletMenu.Action" - parameter="close all" /> - <menu_item_call.on_enable - function="IMWellChicletMenu.EnableItem" - parameter="can close all" /> - </menu_item_call> -</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml deleted file mode 100644 index 76b188220d..0000000000 --- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml +++ /dev/null @@ -1,143 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<toggleable_menu - create_jump_keys="true" - layout="topleft" - mouse_opaque="false" - visible="false" - name="Gear Menu"> - <menu_item_call - label="View Profile" - enabled="true" - name="view_profile"> - <menu_item_call.on_click - function="InspectAvatar.ViewProfile"/> - </menu_item_call> - <menu_item_call - label="Add Friend" - name="add_friend"> - <menu_item_call.on_click - function="InspectAvatar.AddFriend"/> - <menu_item_call.on_enable - function="InspectAvatar.Gear.Enable"/> - </menu_item_call> - <menu_item_call - label="IM" - name="im"> - <menu_item_call.on_click - function="InspectAvatar.IM"/> - </menu_item_call> - <menu_item_call - label="Call" - enabled="true" - name="call"> - <menu_item_call.on_click - function="InspectAvatar.Call"/> - <menu_item_call.on_enable - function="InspectAvatar.Gear.EnableCall"/> - </menu_item_call> - <menu_item_call - label="Teleport" - name="teleport"> - <menu_item_call.on_click - function="InspectAvatar.Teleport"/> - <menu_item_call.on_enable - function="InspectAvatar.Gear.EnableTeleportOffer"/> - </menu_item_call> - <menu_item_call - label="Invite to Group" - name="invite_to_group"> - <menu_item_call.on_click - function="InspectAvatar.InviteToGroup"/> - </menu_item_call> - <menu_item_separator /> - <menu_item_call - label="Block" - name="block"> - <menu_item_call.on_click - function="InspectAvatar.ToggleMute"/> - <menu_item_call.on_visible - function="InspectAvatar.EnableMute" /> - </menu_item_call> - <menu_item_call - label="Unblock" - name="unblock"> - <menu_item_call.on_click - function="InspectAvatar.ToggleMute"/> - <menu_item_call.on_visible - function="InspectAvatar.EnableUnmute" /> - </menu_item_call> - <menu_item_call - label="Report" - name="report"> - <menu_item_call.on_click - function="InspectAvatar.Report"/> - </menu_item_call> - <menu_item_call - label="Freeze" - name="freeze"> - <menu_item_call.on_click - function="InspectAvatar.Freeze"/> - <menu_item_call.on_visible - function="InspectAvatar.VisibleFreeze"/> - </menu_item_call> - <menu_item_call - label="Eject" - name="eject"> - <menu_item_call.on_click - function="InspectAvatar.Eject"/> - <menu_item_call.on_visible - function="InspectAvatar.VisibleEject"/> - </menu_item_call> - <menu_item_call - label="Kick" - name="kick"> - <menu_item_call.on_click - function="InspectAvatar.Kick"/> - <menu_item_call.on_visible - function="InspectAvatar.EnableGod"/> - </menu_item_call> - <menu_item_call - label="CSR" - name="csr"> - <menu_item_call.on_click - function="InspectAvatar.CSR" /> - <menu_item_call.on_visible - function="InspectAvatar.EnableGod" /> - </menu_item_call> - <menu_item_call - label="Debug Textures" - name="debug"> - <menu_item_call.on_click - function="Avatar.Debug"/> - <menu_item_call.on_visible - function="IsGodCustomerService"/> - </menu_item_call> - <menu_item_call - label="Find On Map" - name="find_on_map"> - <menu_item_call.on_click - function="InspectAvatar.FindOnMap"/> - <menu_item_call.on_visible - function="InspectAvatar.VisibleFindOnMap"/> - </menu_item_call> - <menu_item_call - label="Zoom In" - name="zoom_in"> - <menu_item_call.on_click - function="InspectAvatar.ZoomIn"/> - <menu_item_call.on_visible - function="InspectAvatar.VisibleZoomIn"/> - </menu_item_call> - <menu_item_call - label="Pay" - name="pay"> - <menu_item_call.on_click - function="InspectAvatar.Pay"/> - </menu_item_call> - <menu_item_call - label="Share" - name="share"> - <menu_item_call.on_click - function="InspectAvatar.Share"/> - </menu_item_call> -</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml index 63e154697b..2c420aa1e3 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml @@ -57,7 +57,7 @@ layout="topleft" name="take_copy"> <menu_item_call.on_click - function="InspectObject.TakeFreeCopy"/> + function="Tools.TakeCopy"/> <menu_item_call.on_visible function="Tools.EnableTakeCopy"/> </menu_item_call> diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml deleted file mode 100644 index 5e7b16ed4a..0000000000 --- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml +++ /dev/null @@ -1,252 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<toggleable_menu - layout="topleft" - name="Self Pie"> - <menu_item_call - label="Sit Down" - layout="topleft" - name="Sit Down Here"> - <menu_item_call.on_click - function="Self.SitDown" - parameter="" /> - <menu_item_call.on_enable - function="Self.EnableSitDown" /> - </menu_item_call> - <menu_item_call - label="Stand Up" - layout="topleft" - name="Stand Up"> - <menu_item_call.on_click - function="Self.StandUp" - parameter="" /> - <menu_item_call.on_enable - function="Self.EnableStandUp" /> - </menu_item_call> - <context_menu - label="Take Off" - layout="topleft" - name="Take Off >"> - <context_menu - label="Clothes" - layout="topleft" - name="Clothes >"> - <menu_item_call - enabled="false" - label="Shirt" - layout="topleft" - name="Shirt"> - <menu_item_call.on_click - function="Edit.TakeOff" - parameter="shirt" /> - <menu_item_call.on_enable - function="Edit.EnableTakeOff" - parameter="shirt" /> - </menu_item_call> - <menu_item_call - enabled="false" - label="Pants" - layout="topleft" - name="Pants"> - <menu_item_call.on_click - function="Edit.TakeOff" - parameter="pants" /> - <menu_item_call.on_enable - function="Edit.EnableTakeOff" - parameter="pants" /> - </menu_item_call> - <menu_item_call - enabled="false" - label="Skirt" - layout="topleft" - name="Skirt"> - <menu_item_call.on_click - function="Edit.TakeOff" - parameter="skirt" /> - <menu_item_call.on_enable - function="Edit.EnableTakeOff" - parameter="skirt" /> - </menu_item_call> - <menu_item_call - enabled="false" - label="Shoes" - layout="topleft" - name="Shoes"> - <menu_item_call.on_click - function="Edit.TakeOff" - parameter="shoes" /> - <menu_item_call.on_enable - function="Edit.EnableTakeOff" - parameter="shoes" /> - </menu_item_call> - <menu_item_call - enabled="false" - label="Socks" - layout="topleft" - name="Socks"> - <menu_item_call.on_click - function="Edit.TakeOff" - parameter="socks" /> - <menu_item_call.on_enable - function="Edit.EnableTakeOff" - parameter="socks" /> - </menu_item_call> - <menu_item_call - enabled="false" - label="Jacket" - layout="topleft" - name="Jacket"> - <menu_item_call.on_click - function="Edit.TakeOff" - parameter="jacket" /> - <menu_item_call.on_enable - function="Edit.EnableTakeOff" - parameter="jacket" /> - </menu_item_call> - <menu_item_call - enabled="false" - label="Gloves" - layout="topleft" - name="Gloves"> - <menu_item_call.on_click - function="Edit.TakeOff" - parameter="gloves" /> - <menu_item_call.on_enable - function="Edit.EnableTakeOff" - parameter="gloves" /> - </menu_item_call> - <menu_item_call - enabled="false" - label="Undershirt" - layout="topleft" - name="Self Undershirt"> - <menu_item_call.on_click - function="Edit.TakeOff" - parameter="undershirt" /> - <menu_item_call.on_enable - function="Edit.EnableTakeOff" - parameter="undershirt" /> - </menu_item_call> - <menu_item_call - enabled="false" - label="Underpants" - layout="topleft" - name="Self Underpants"> - <menu_item_call.on_click - function="Edit.TakeOff" - parameter="underpants" /> - <menu_item_call.on_enable - function="Edit.EnableTakeOff" - parameter="underpants" /> - </menu_item_call> - <menu_item_call - enabled="false" - label="Tattoo" - layout="topleft" - name="Self Tattoo"> - <menu_item_call.on_click - function="Edit.TakeOff" - parameter="tattoo" /> - <menu_item_call.on_enable - function="Edit.EnableTakeOff" - parameter="tattoo" /> - </menu_item_call> - <menu_item_call - enabled="false" - label="Alpha" - layout="topleft" - name="Self Alpha"> - <menu_item_call.on_click - function="Edit.TakeOff" - parameter="alpha" /> - <menu_item_call.on_enable - function="Edit.EnableTakeOff" - parameter="alpha" /> - </menu_item_call> - <menu_item_separator - layout="topleft" /> - <menu_item_call - label="All Clothes" - layout="topleft" - name="All Clothes"> - <menu_item_call.on_click - function="Edit.TakeOff" - parameter="all" /> - </menu_item_call> - </context_menu> - <context_menu - label="HUD" - layout="topleft" - name="Object Detach HUD" /> - <context_menu - label="Detach" - layout="topleft" - name="Object Detach" /> - <menu_item_call - label="Detach All" - layout="topleft" - name="Detach All"> - <menu_item_call.on_click - function="Self.RemoveAllAttachments" - parameter="" /> - <menu_item_call.on_enable - function="Self.EnableRemoveAllAttachments" /> - </menu_item_call> - </context_menu> - <menu_item_call - label="Change Outfit" - layout="topleft" - name="Chenge Outfit"> - <menu_item_call.on_click - function="CustomizeAvatar" /> - <menu_item_call.on_enable - function="Edit.EnableCustomizeAvatar" /> - </menu_item_call> - <menu_item_call label="Edit My Outfit" - layout="topleft" - name="Edit Outfit"> - <menu_item_call.on_click - function="EditOutfit" /> - <menu_item_call.on_enable - function="Edit.EnableCustomizeAvatar" /> - </menu_item_call> - <menu_item_call label="Edit My Shape" - layout="topleft" - name="Edit My Shape"> - <menu_item_call.on_click - function="EditShape" /> - <menu_item_call.on_enable - function="Edit.EnableEditShape" /> - </menu_item_call> - <menu_item_call - label="My Friends" - layout="topleft" - name="Friends..."> - <menu_item_call.on_click - function="SideTray.PanelPeopleTab" - parameter="friends_panel" /> - </menu_item_call> - <menu_item_call - label="My Groups" - layout="topleft" - name="Groups..."> - <menu_item_call.on_click - function="SideTray.PanelPeopleTab" - parameter="groups_panel" /> - </menu_item_call> - <menu_item_call - label="My Profile" - layout="topleft" - name="Profile..."> - <menu_item_call.on_click - function="ShowAgentProfile" - parameter="agent" /> - </menu_item_call> - <menu_item_call - label="Debug Textures" - name="Debug..."> - <menu_item_call.on_click - function="Avatar.Debug" /> - <menu_item_call.on_visible - function="IsGodCustomerService"/> - </menu_item_call> -</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index b13bf5b508..13dc0b941a 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -537,6 +537,14 @@ layout="topleft" name="Landmark Separator" /> <menu_item_call + label="Copy SLurl" + layout="topleft" + name="url_copy"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="copy_slurl" /> + </menu_item_call> + <menu_item_call label="About Landmark" layout="topleft" name="About Landmark"> diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml index e91f5af3d5..29720a680b 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml @@ -3,7 +3,7 @@ layout="topleft" left="0" mouse_opaque="false" - can_tear_off="true" + can_tear_off="false" name="menu_inventory_add" visible="false"> <menu diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml index 52b9524b11..f6004621a6 100644 --- a/indra/newview/skins/default/xui/en/menu_object.xml +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -30,26 +30,6 @@ function="EnableEdit"/> </menu_item_call> <menu_item_call - label="Show in linksets" - name="show_in_linksets"> - <menu_item_call.on_click - function="Pathfinding.Linksets.Select" /> - <menu_item_call.on_enable - function="EnableSelectInPathfindingLinksets"/> - <menu_item_call.on_visible - function="EnableSelectInPathfindingLinksets"/> - </menu_item_call> - <menu_item_call - label="Show in characters" - name="show_in_characters"> - <menu_item_call.on_click - function="Pathfinding.Characters.Select" /> - <menu_item_call.on_enable - function="EnableSelectInPathfindingCharacters"/> - <menu_item_call.on_visible - function="EnableSelectInPathfindingCharacters"/> - </menu_item_call> - <menu_item_call enabled="false" label="Open" name="Open"> @@ -90,6 +70,26 @@ <menu_item_call.on_click function="Object.ZoomIn" /> </menu_item_call> + <menu_item_call + label="Show in linksets" + name="show_in_linksets"> + <menu_item_call.on_click + function="Pathfinding.Linksets.Select" /> + <menu_item_call.on_enable + function="EnableSelectInPathfindingLinksets"/> + <menu_item_call.on_visible + function="EnableSelectInPathfindingLinksets"/> + </menu_item_call> + <menu_item_call + label="Show in characters" + name="show_in_characters"> + <menu_item_call.on_click + function="Pathfinding.Characters.Select" /> + <menu_item_call.on_enable + function="EnableSelectInPathfindingCharacters"/> + <menu_item_call.on_visible + function="EnableSelectInPathfindingCharacters"/> + </menu_item_call> <menu_item_separator layout="topleft" /> <context_menu label="Put On" diff --git a/indra/newview/skins/default/xui/en/menu_object_icon.xml b/indra/newview/skins/default/xui/en/menu_object_icon.xml index 0c8a2af002..2d4f1792c2 100644 --- a/indra/newview/skins/default/xui/en/menu_object_icon.xml +++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml @@ -24,4 +24,22 @@ function="ObjectIcon.Action" parameter="block" /> </menu_item_call> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Show on Map" + layout="topleft" + name="show_on_map"> + <menu_item_call.on_click + function="ObjectIcon.Action" + parameter="map" /> + </menu_item_call> + <menu_item_call + label="Teleport to Object Location" + layout="topleft" + name="teleport_to_object"> + <menu_item_call.on_click + function="ObjectIcon.Action" + parameter="teleport" /> + </menu_item_call> </menu> diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml index fc7272b904..3b8ace6308 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml @@ -195,6 +195,20 @@ <menu_item_separator name="sepatator2" /> <menu_item_call + label="Expand all folders" + layout="topleft" + name="expand"> + <on_click + function="Gear.Expand" /> + </menu_item_call> + <menu_item_call + label="Collapse all folders" + layout="topleft" + name="collapse"> + <on_click + function="Gear.Collapse" /> + </menu_item_call> + <menu_item_call label="Rename Outfit" layout="topleft" name="rename"> diff --git a/indra/newview/skins/default/xui/en/menu_participant_view.xml b/indra/newview/skins/default/xui/en/menu_participant_view.xml new file mode 100644 index 0000000000..7ea87ee05c --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_participant_view.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + layout="topleft" + name="participant_manu_view"> + <menu_item_check + label="Sort conversations by type" + layout="topleft" + name="sort_sessions_by_type"> + <on_click + function="IMFloaterContainer.Action" + parameter="sort_sessions_by_type" /> + <on_check + function="IMFloaterContainer.Check" + parameter="sort_sessions_by_type" /> + </menu_item_check> + <menu_item_check + label="Sort conversations by name" + layout="topleft" + name="sort_sessions_by_name"> + <on_click + function="IMFloaterContainer.Action" + parameter="sort_sessions_by_name" /> + <on_check + function="IMFloaterContainer.Check" + parameter="sort_sessions_by_name" /> + </menu_item_check> + <menu_item_check + label="Sort conversations by recent activity" + layout="topleft" + name="sort_sessions_by_recent"> + <on_click + function="IMFloaterContainer.Action" + parameter="sort_sessions_by_recent" /> + <on_check + function="IMFloaterContainer.Check" + parameter="sort_sessions_by_recent" /> + </menu_item_check> + <menu_item_separator + layout="topleft" /> + <menu_item_check + label="Sort participants by name" + layout="topleft" + name="sort_participants_by_name"> + <on_click + function="IMFloaterContainer.Action" + parameter="sort_participants_by_name" /> + <on_check + function="IMFloaterContainer.Check" + parameter="sort_participants_by_name" /> + </menu_item_check> + <menu_item_check + label="Sort participants by recent activity" + layout="topleft" + name="sort_participants_by_recent"> + <on_click + function="IMFloaterContainer.Action" + parameter="sort_participants_by_recent" /> + <on_check + function="IMFloaterContainer.Check" + parameter="sort_participants_by_recent" /> + </menu_item_check> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Chat preferences..." + name="chat_preferences"> + <on_click + function="IMFloaterContainer.Action" + parameter="chat_preferences" /> + </menu_item_call> + <menu_item_call + label="Privacy preferences..." + name="privacy_preferences"> + <on_click + function="IMFloaterContainer.Action" + parameter="privacy_preferences" /> + </menu_item_call> + <menu_item_check + label="Conversation log..." + name="Conversation" + visible="true"> + <menu_item_check.on_check + function="Floater.Visible" + parameter="conversation" /> + <menu_item_check.on_click + function="Floater.Toggle" + parameter="conversation" /> + <menu_item_check.on_enable + function="Avatar.EnableItem" + parameter="conversation_log" /> + </menu_item_check> + <menu_item_separator layout="topleft" /> + <menu_item_check name="Translate_chat" label="Translate Nearby chat"> + <menu_item_check.on_click + function="IMFloaterContainer.Action" + parameter="Translating.Toggle" /> + <menu_item_check.on_check + function="IMFloaterContainer.Check" + parameter="Translating.On" /> + <menu_item_check.on_enable + function="IMFloaterContainer.Check" + parameter="Translating.Enabled" /> + </menu_item_check> + <menu_item_check name="Translation_settings" label="Translation settings..."> + <menu_item_check.on_check + function="Floater.Visible" + parameter="prefs_translation" /> + <menu_item_check.on_click + function="Floater.Toggle" + parameter="prefs_translation" /> + </menu_item_check> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_blocked_gear.xml b/indra/newview/skins/default/xui/en/menu_people_blocked_gear.xml new file mode 100644 index 0000000000..63295ea27b --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_people_blocked_gear.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + name="menu_blocked_gear" + left="0" bottom="0" visible="false" + mouse_opaque="false"> + <menu_item_call + label="Unblock" + name="unblock"> + <on_click + function="Block.Action" + parameter="unblock_item" /> + <on_enable + function="Block.Enable" + parameter="unblock_item" /> + </menu_item_call> + <menu_item_call + label="Profile..." + name="profile"> + <on_click + function="Block.Action" + parameter="profile_item"/> + <on_enable + function="Block.Enable" + parameter="profile_item" /> + </menu_item_call> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_blocked_plus.xml b/indra/newview/skins/default/xui/en/menu_people_blocked_plus.xml new file mode 100644 index 0000000000..0c7155667e --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_people_blocked_plus.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + name="menu_blocked_plus" + left="0" bottom="0" visible="false" + mouse_opaque="false"> + <menu_item_call + label="Block Resident by name..." + name="block_resident_by_name"> + <on_click + function="Block.Action" + parameter="block_res_by_name"/> + </menu_item_call> + <menu_item_call + label="Block object by name" + name="block_object_by_name"> + <on_click + function="Block.Action" + parameter="block_obj_by_name"/> + </menu_item_call> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_blocked_view.xml b/indra/newview/skins/default/xui/en/menu_people_blocked_view.xml new file mode 100644 index 0000000000..2efb70ee37 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_people_blocked_view.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + name="menu_blocked_view" + left="0" bottom="0" visible="false" + mouse_opaque="false"> + <menu_item_check + label="Sort by name" + name="sort_by_name"> + <on_click + function="Block.Action" + parameter="sort_by_name"/> + <on_check + function="Block.Check" + parameter="sort_by_name"/> + </menu_item_check> + <menu_item_check + label="Sort by type" + name="sort_by_type"> + <on_click + function="Block.Action" + parameter="sort_by_type" /> + <on_check + function="Block.Check" + parameter="sort_by_type" /> + </menu_item_check> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml index b452f96e7a..dde9432867 100644 --- a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml @@ -40,8 +40,12 @@ function="CheckControl" parameter="FriendsListShowPermissions" /> </menu_item_check> - <menu_item_separator layout="topleft" /> - <menu_item_call name="show_blocked_list" label="Show Blocked Residents & Objects"> - <menu_item_call.on_click function="People.Friends.ViewSort.Action" parameter="panel_block_list_sidetray" /> - </menu_item_call> + <menu_item_check name="view_conversation" label="View Conversation Log..."> + <menu_item_check.on_check + function="Floater.Visible" + parameter="conversation" /> + <menu_item_check.on_click + function="Floater.Toggle" + parameter="conversation" /> + </menu_item_check> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_groups.xml b/indra/newview/skins/default/xui/en/menu_people_groups.xml index 8f89d37dbb..1e0364b84e 100644 --- a/indra/newview/skins/default/xui/en/menu_people_groups.xml +++ b/indra/newview/skins/default/xui/en/menu_people_groups.xml @@ -1,8 +1,18 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<menu name="menu_group_plus" +<toggleable_menu name="menu_group_plus" left="0" bottom="0" visible="false" mouse_opaque="false" opaque="true" color="MenuDefaultBgColor"> <menu_item_call + label="Activate" + name="Activate"> + <menu_item_call.on_click + function="People.Groups.Action" + parameter="activate" /> + <menu_item_call.on_enable + function="People.Groups.Enable" + parameter="activate" /> + </menu_item_call> + <menu_item_call label="View Info" name="View Info"> <menu_item_call.on_click @@ -23,7 +33,7 @@ parameter="chat" /> </menu_item_call> <menu_item_call - label="Call" + label="Voice call" name="Call"> <menu_item_call.on_click function="People.Groups.Action" @@ -34,17 +44,6 @@ </menu_item_call> <menu_item_separator /> <menu_item_call - label="Activate" - name="Activate"> - <menu_item_call.on_click - function="People.Groups.Action" - parameter="activate" /> - <menu_item_call.on_enable - function="People.Groups.Enable" - parameter="activate" /> - </menu_item_call> - <menu_item_separator /> - <menu_item_call label="Leave" name="Leave"> <menu_item_call.on_click @@ -54,4 +53,4 @@ function="People.Groups.Enable" parameter="leave" /> </menu_item_call> -</menu> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view.xml index c710fe3b9b..73f79f1e70 100644 --- a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_groups_view.xml @@ -14,13 +14,4 @@ function="CheckControl" parameter="GroupListShowIcons" /> </menu_item_check> - <menu_item_call - label="Leave Selected Group" - layout="topleft" - name="Leave Selected Group"> - <menu_item_call.on_click - function="People.Group.Minus.Action"/> - <menu_item_call.on_enable - function="People.Group.Minus.Enable"/> - </menu_item_call> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml index d2e35e4cc0..3abb5f7bc8 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml @@ -1,28 +1,69 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <context_menu layout="topleft" - name="Avatar Context Menu"> + name="Nearby People Context Menu"> <menu_item_call label="View Profile" layout="topleft" - name="View Profile"> + name="view_profile"> <menu_item_call.on_click function="Avatar.Profile" /> </menu_item_call> <menu_item_call + label="IM" + layout="topleft" + name="im"> + <menu_item_call.on_click + function="Avatar.IM" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_im"/> + </menu_item_call> + <menu_item_call + label="Offer Teleport" + name="offer_teleport"> + <menu_item_call.on_click + function="Avatar.OfferTeleport"/> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_offer_teleport"/> + </menu_item_call> + <menu_item_call + label="Voice call" + layout="topleft" + name="voice_call"> + <menu_item_call.on_click + function="Avatar.Call" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_call" /> + </menu_item_call> + <menu_item_separator /> + <menu_item_call + label="View chat history..." + layout="topleft" + name="chat_history"> + <menu_item_call.on_click + function="Avatar.Calllog" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_callog"/> + </menu_item_call> + <menu_item_separator name="separator_chat_history"/> + <menu_item_call label="Add Friend" layout="topleft" - name="Add Friend"> + name="add_friend"> <menu_item_call.on_click function="Avatar.AddFriend" /> - <menu_item_call.on_enable + <menu_item_call.on_visible function="Avatar.EnableItem" parameter="can_add" /> </menu_item_call> <menu_item_call label="Remove Friend" layout="topleft" - name="Remove Friend"> + name="remove_friend"> <menu_item_call.on_click function="Avatar.RemoveFriend" /> <menu_item_call.on_enable @@ -30,26 +71,30 @@ parameter="can_delete" /> </menu_item_call> <menu_item_call - label="IM" + label="Invite to group..." layout="topleft" - name="IM"> + name="invite_to_group"> <menu_item_call.on_click - function="Avatar.IM" /> + function="Avatar.InviteToGroup" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_invite"/> </menu_item_call> + <menu_item_separator name="separator_invite_to_group"/> <menu_item_call - label="Call" + label="Zoom In" layout="topleft" - name="Call"> - <menu_item_call.on_click - function="Avatar.Call" /> - <menu_item_call.on_enable - function="Avatar.EnableItem" - parameter="can_call" /> + name="zoom_in"> + <menu_item_call.on_click + function="Avatar.ZoomIn" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_zoom_in"/> </menu_item_call> <menu_item_call label="Map" layout="topleft" - name="Map"> + name="map"> <menu_item_call.on_click function="Avatar.ShowOnMap" /> <menu_item_call.on_enable @@ -59,21 +104,27 @@ <menu_item_call label="Share" layout="topleft" - name="Share"> + name="share"> <menu_item_call.on_click function="Avatar.Share" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_share"/> </menu_item_call> <menu_item_call label="Pay" layout="topleft" - name="Pay"> + name="pay"> <menu_item_call.on_click function="Avatar.Pay" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_pay"/> </menu_item_call> <menu_item_check label="Block/Unblock" layout="topleft" - name="Block/Unblock"> + name="block_unblock"> <menu_item_check.on_click function="Avatar.BlockUnblock" /> <menu_item_check.on_check @@ -83,13 +134,5 @@ function="Avatar.EnableItem" parameter="can_block" /> </menu_item_check> - <menu_item_call - label="Offer Teleport" - name="teleport"> - <menu_item_call.on_click - function="Avatar.OfferTeleport"/> - <menu_item_call.on_enable - function="Avatar.EnableItem" - parameter="can_offer_teleport"/> - </menu_item_call> + <menu_item_separator /> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml index 5d58a9d289..5f973088fd 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml @@ -6,7 +6,7 @@ enabled="false" label="Add Friends" layout="topleft" - name="Add Friends"> + name="add_friends"> <on_click function="Avatar.AddFriends" /> <on_enable @@ -16,7 +16,7 @@ <menu_item_call label="Remove Friends" layout="topleft" - name="Remove Friend"> + name="remove_friends"> <menu_item_call.on_click function="Avatar.RemoveFriend" /> <menu_item_call.on_enable @@ -26,7 +26,7 @@ <menu_item_call label="IM" layout="topleft" - name="IM"> + name="im"> <on_click function="Avatar.IM" /> </menu_item_call> @@ -34,7 +34,7 @@ enabled="false" label="Call" layout="topleft" - name="Call"> + name="call"> <on_click function="Avatar.Call" /> <on_enable @@ -45,7 +45,7 @@ enabled="false" label="Share" layout="topleft" - name="Share"> + name="share"> <on_click function="Avatar.Share" /> </menu_item_call> @@ -53,13 +53,13 @@ enabled="false" label="Pay" layout="topleft" - name="Pay"> + name="pay"> <on_click function="Avatar.Pay" /> </menu_item_call> <menu_item_call label="Offer Teleport" - name="teleport"> + name="offer_teleport"> <menu_item_call.on_click function="Avatar.OfferTeleport"/> <menu_item_call.on_enable diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_view.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_view.xml new file mode 100644 index 0000000000..da88ca9f4d --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_people_nearby_view.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + name="menu_group_plus" + left="0" bottom="0" visible="false" + mouse_opaque="false"> + <menu_item_check + label="Sort by Recent Speakers" + name="sort_by_recent_speakers"> + <menu_item_check.on_click + function="People.Nearby.ViewSort.Action" + parameter="sort_by_recent_speakers"/> + <menu_item_check.on_check + function="People.Nearby.ViewSort.CheckItem" + parameter="sort_by_recent_speakers"/> + </menu_item_check> + <menu_item_check + label="Sort by Name" + name="sort_name"> + <menu_item_check.on_click + function="People.Nearby.ViewSort.Action" + parameter="sort_name"/> + <menu_item_check.on_check + function="People.Nearby.ViewSort.CheckItem" + parameter="sort_name"/> + </menu_item_check> + <menu_item_check + label="Sort by Distance" + name="sort_distance"> + <menu_item_check.on_click + function="People.Nearby.ViewSort.Action" + parameter="sort_distance"/> + <menu_item_check.on_check + function="People.Nearby.ViewSort.CheckItem" + parameter="sort_distance"/> + </menu_item_check> + <menu_item_separator layout="topleft" /> + <menu_item_check name="view_icons" label="View People Icons"> + <menu_item_check.on_click + function="People.Nearby.ViewSort.Action" + parameter="view_icons" /> + <menu_item_check.on_check + function="CheckControl" + parameter="NearbyListShowIcons" /> + </menu_item_check> + <menu_item_check name ="view_map" label="View Map"> + <menu_item_check.on_check + function="CheckControl" + parameter="NearbyListShowMap" /> + <menu_item_check.on_click + function="ToggleControl" + parameter="NearbyListShowMap" /> + </menu_item_check> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml deleted file mode 100644 index 614dd693c5..0000000000 --- a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<toggleable_menu - name="menu_group_plus" - left="0" bottom="0" visible="false" - mouse_opaque="false"> - <menu_item_check - label="Sort by Recent Speakers" - name="sort_by_recent_speakers"> - <menu_item_check.on_click - function="People.Nearby.ViewSort.Action" - parameter="sort_by_recent_speakers"/> - <menu_item_check.on_check - function="People.Nearby.ViewSort.CheckItem" - parameter="sort_by_recent_speakers"/> - </menu_item_check> - <menu_item_check - label="Sort by Name" - name="sort_name"> - <menu_item_check.on_click - function="People.Nearby.ViewSort.Action" - parameter="sort_name"/> - <menu_item_check.on_check - function="People.Nearby.ViewSort.CheckItem" - parameter="sort_name"/> - </menu_item_check> - <menu_item_check - label="Sort by Distance" - name="sort_distance"> - <menu_item_check.on_click - function="People.Nearby.ViewSort.Action" - parameter="sort_distance"/> - <menu_item_check.on_check - function="People.Nearby.ViewSort.CheckItem" - parameter="sort_distance"/> - </menu_item_check> - <menu_item_separator layout="topleft" /> - <menu_item_check name="view_icons" label="View People Icons"> - <menu_item_check.on_click - function="People.Nearby.ViewSort.Action" - parameter="view_icons" /> - <menu_item_check.on_check - function="CheckControl" - parameter="NearbyListShowIcons" /> - </menu_item_check> - <menu_item_check name ="view_map" label="View Map"> - <menu_item_check.on_check - function="CheckControl" - parameter="NearbyListShowMap" /> - <menu_item_check.on_click - function="ToggleControl" - parameter="NearbyListShowMap" /> - </menu_item_check> - <menu_item_separator layout="topleft" /> - <menu_item_call name="show_blocked_list" label="Show Blocked Residents & Objects"> - <menu_item_call.on_click function="People.Nearby.ViewSort.Action" userdata="panel_block_list_sidetray" /> - </menu_item_call> -</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_recent_view.xml index 485a5a658c..1dbc90dd2b 100644 --- a/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_recent_view.xml @@ -32,8 +32,4 @@ function="CheckControl" parameter="RecentListShowIcons" /> </menu_item_check> - <menu_item_separator layout="topleft" /> - <menu_item_call name="show_blocked_list" label="Show Blocked Residents & Objects"> - <menu_item_call.on_click function="People.Recent.ViewSort.Action" userdata="panel_block_list_sidetray" /> - </menu_item_call> </toggleable_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 73f0fa7979..7cd56f257a 100644 --- a/indra/newview/skins/default/xui/en/menu_url_agent.xml +++ b/indra/newview/skins/default/xui/en/menu_url_agent.xml @@ -1,13 +1,27 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <context_menu layout="topleft" - name="Url Popup"> + name="Url Popup"> <menu_item_call - label="Show Resident Profile" + label="View Profile" layout="topleft" name="show_agent"> <menu_item_call.on_click - function="Url.ShowProfile" /> + function="Url.ShowProfile" /> + </menu_item_call> + <menu_item_call + label="Send IM..." + layout="topleft" + name="send_im"> + <menu_item_call.on_click + function="Url.SendIM" /> + </menu_item_call> + <menu_item_call + label="Add Friend..." + layout="topleft" + name="add_friend"> + <menu_item_call.on_click + function="Url.AddFriend" /> </menu_item_call> <menu_item_separator layout="topleft" /> diff --git a/indra/newview/skins/default/xui/en/menu_url_objectim.xml b/indra/newview/skins/default/xui/en/menu_url_objectim.xml index 35c2269b0d..87ab58e622 100644 --- a/indra/newview/skins/default/xui/en/menu_url_objectim.xml +++ b/indra/newview/skins/default/xui/en/menu_url_objectim.xml @@ -3,7 +3,7 @@ layout="topleft" name="Url Popup"> <menu_item_call - label="Show Object Information" + label="Object Profile..." layout="topleft" name="show_object"> <menu_item_call.on_click diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 1aa55acf2d..544f06ac0c 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -130,19 +130,22 @@ label="Status" name="Status" tear_off="true"> - <menu_item_call - label="Away" - name="Set Away"> - <menu_item_call.on_click + <menu_item_check + label="Away"> + <menu_item_check.on_check + function="View.Status.CheckAway" /> + <menu_item_check.on_click function="World.SetAway" /> - </menu_item_call> - <menu_item_call - label="Busy" - name="Set Busy"> - <menu_item_call.on_click - function="World.SetBusy"/> - </menu_item_call> - </menu> + </menu_item_check> + <menu_item_check + label="Do Not Disturb"> + <menu_item_check.on_check + function="View.Status.CheckDoNotDisturb" /> + <menu_item_check.on_click + function="World.SetDoNotDisturb"/> + </menu_item_check> + + </menu> <menu_item_separator/> @@ -180,8 +183,7 @@ </menu_item_call> <menu_item_call label="Toolbar buttons..." - name="Toolbars" - shortcut="control|T"> + name="Toolbars"> <menu_item_call.on_click function="Floater.Toggle" parameter="toybox" /> @@ -218,17 +220,28 @@ label="Communicate" name="Communicate" tear_off="true"> - <menu_item_check - label="Chat..." + <menu_item_check + label="Conversations..." + name="Conversations" + shortcut="control|T"> + <menu_item_check.on_check + function="Floater.IsOpen" + parameter="im_container" /> + <menu_item_check.on_click + function="Floater.ToggleOrBringToFront" + parameter="im_container" /> + </menu_item_check> + <menu_item_check + label="Nearby Chat..." name="Nearby Chat" shortcut="control|H" use_mac_ctrl="true"> <menu_item_check.on_check function="Floater.Visible" - parameter="chat_bar" /> + parameter="nearby_chat" /> <menu_item_check.on_click - function="Floater.Toggle" - parameter="chat_bar" /> + function="Floater.ToggleOrBringToFront" + parameter="nearby_chat" /> </menu_item_check> <menu_item_check label="Speak" @@ -244,26 +257,47 @@ parameter="speak" /> </menu_item_check> <menu_item_check - label="Voice settings..." - name="Nearby Voice"> + label="Conversation Log..."> <menu_item_check.on_check function="Floater.Visible" - parameter="voice_controls" /> + parameter="conversation" /> + <menu_item_check.on_enable + function="Conversation.IsConversationLoggingAllowed" /> <menu_item_check.on_click function="Floater.Toggle" - parameter="voice_controls" /> + parameter="conversation" /> </menu_item_check> - <menu_item_check - label="Voice morphing..." - name="ShowVoice" + <menu_item_separator/> + <menu + label="Voice morphing" + name="VoiceMorphing" visibility_control="VoiceMorphingEnabled"> - <menu_item_check.on_check - function="Floater.Visible" - parameter="voice_effect" /> - <menu_item_check.on_click - function="Floater.Toggle" - parameter="voice_effect" /> - </menu_item_check> + <menu_item_check + label="No voice morphing" + name="NoVoiceMorphing"> + <menu_item_check.on_check + function="Communicate.VoiceMorphing.NoVoiceMorphing.Check" /> + <menu_item_check.on_click + function="Communicate.VoiceMorphing.NoVoiceMorphing.Click" /> + </menu_item_check> + <menu_item_separator/> + <menu_item_check + label="Preview..." + name="Preview"> + <menu_item_check.on_check + function="Floater.Visible" + parameter="voice_effect" /> + <menu_item_check.on_click + function="Floater.Toggle" + parameter="voice_effect" /> + </menu_item_check> + <menu_item_call + label="Subscribe..." + name="Subscribe"> + <menu_item_call.on_click + function="Communicate.VoiceMorphing.Subscribe" /> + </menu_item_call> + </menu> <menu_item_check label="Gestures..." name="Gestures" @@ -276,36 +310,55 @@ parameter="gestures" /> </menu_item_check> <menu_item_separator/> - <menu_item_call + <menu_item_check label="Friends" name="My Friends" shortcut="control|shift|F"> - <menu_item_call.on_click + <menu_item_check.on_check + function="SideTray.CheckPanelPeopleTab" + parameter="friends_panel" /> + <menu_item_check.on_click function="SideTray.PanelPeopleTab" parameter="friends_panel" /> - </menu_item_call> - <menu_item_call + </menu_item_check> + <menu_item_check label="Groups" name="My Groups" shortcut="control|shift|G"> - <menu_item_call.on_click + <menu_item_check.on_check + function="SideTray.CheckPanelPeopleTab" + parameter="groups_panel" /> + <menu_item_check.on_click function="SideTray.PanelPeopleTab" parameter="groups_panel" /> - </menu_item_call> - <menu_item_call + </menu_item_check> + <menu_item_check label="Nearby people" name="Active Speakers" shortcut="control|shift|A"> - <menu_item_call.on_click + <menu_item_check.on_check + function="SideTray.CheckPanelPeopleTab" + parameter="nearby_panel" /> + <menu_item_check.on_click function="SideTray.PanelPeopleTab" parameter="nearby_panel" /> - </menu_item_call> + </menu_item_check> <menu_item_call label="Block List" name="Block List"> <menu_item_call.on_click - function="Communicate.BlockList" /> + function="SideTray.PanelPeopleTab" + parameter="blocked_panel" /> </menu_item_call> + <menu_item_separator/> + <menu_item_check + label="Do Not Disturb"> + <menu_item_check.on_check + function="View.Status.CheckDoNotDisturb" /> + <menu_item_check.on_click + function="World.SetDoNotDisturb"/> + </menu_item_check> + </menu> <menu create_jump_keys="true" @@ -876,14 +929,6 @@ function="Tools.EnableTakeCopy" /> </menu_item_call> <menu_item_call - label="Save Back to My Inventory" - name="Save Object Back to My Inventory"> - <menu_item_call.on_click - function="Tools.SaveToInventory" /> - <menu_item_call.on_enable - function="Tools.EnableSaveToInventory" /> - </menu_item_call> - <menu_item_call label="Save Back to Object Contents" name="Save Object Back to Object Contents"> <menu_item_call.on_click @@ -956,7 +1001,7 @@ create_jump_keys="true" label="Pathfinding" name="Pathfinding" - tear_off="false"> + tear_off="true"> <menu_item_call label="Linksets..." name="pathfinding_linksets_menu_item"> @@ -984,6 +1029,14 @@ <menu_item_call.on_enable function="Tools.EnablePathfindingView" /> </menu_item_call> + <menu_item_call + label="Rebake region" + name="pathfinding_rebake_navmesh_item"> + <menu_item_call.on_click + function="Tools.DoPathfindingRebakeRegion"/> + <menu_item_call.on_enable + function="Tools.EnablePathfindingRebakeRegion" /> + </menu_item_call> </menu> @@ -1242,7 +1295,58 @@ function="Floater.Show" parameter="hud" /> </menu_item_call>--> - + <menu_item_separator/> + + <menu_item_call + label="User’s guide" + name="User’s guide"> + <menu_item_call.on_click + function="Advanced.ShowURL" + parameter="http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-User-s-Guide/ta-p/1244857"/> + </menu_item_call> + <menu_item_call + label="Knowledge Base" + name="Knowledge Base"> + <menu_item_call.on_click + function="Advanced.ShowURL" + parameter="http://community.secondlife.com/t5/tkb/communitypage"/> + </menu_item_call> + <menu_item_call + label="Wiki" + name="Wiki"> + <menu_item_call.on_click + function="Advanced.ShowURL" + parameter="http://wiki.secondlife.com"/> + </menu_item_call> + <menu_item_call + label="Community Forums" + name="Community Forums"> + <menu_item_call.on_click + function="Advanced.ShowURL" + parameter="http://community.secondlife.com/t5/Forums/ct-p/Forums"/> + </menu_item_call> + <menu_item_call + label="Support portal" + name="Support portal"> + <menu_item_call.on_click + function="Advanced.ShowURL" + parameter="https://support.secondlife.com/"/> + </menu_item_call> + <menu_item_separator/> + <menu_item_call + label="[SECOND_LIFE] News" + name="Second Life News"> + <menu_item_call.on_click + function="Advanced.ShowURL" + parameter="http://community.secondlife.com/t5/Featured-News/bg-p/blog_feature_news"/> + </menu_item_call> + <menu_item_call + label="[SECOND_LIFE] Blogs" + name="Second Life Blogs"> + <menu_item_call.on_click + function="Advanced.ShowURL" + parameter="http://community.secondlife.com/t5/Blogs/ct-p/Blogs"/> + </menu_item_call> <menu_item_separator/> <menu_item_call @@ -3177,6 +3281,40 @@ parameter="AllowSelectAvatar" /> </menu_item_check> </menu> + <menu + create_jump_keys="true" + label="Animation Speed" + name="Animation Speed" + tear_off="true"> + <menu_item_call + label="All Animations 10% Faster" + name="All Animations 10 Faster"> + <menu_item_call.on_click + function="Advanced.AnimTenFaster" /> + </menu_item_call> + <menu_item_call + label="All Animations 10% Slower" + name="All Animations 10 Slower"> + <menu_item_call.on_click + function="Advanced.AnimTenSlower" /> + </menu_item_call> + <menu_item_call + label="Reset All Animation Speed" + name="Reset All Animation Speed"> + <menu_item_call.on_click + function="Advanced.AnimResetAll" /> + </menu_item_call> + <menu_item_check + label="Slow Motion Animations" + name="Slow Motion Animations"> + <menu_item_check.on_check + function="CheckControl" + parameter="SlowMotionAnimation" /> + <menu_item_check.on_click + function="ToggleControl" + parameter="SlowMotionAnimation" /> + </menu_item_check> + </menu> <menu_item_call label="Force Params to Default" name="Force Params to Default"> @@ -3194,16 +3332,6 @@ parameter="" /> </menu_item_check> <menu_item_check - label="Slow Motion Animations" - name="Slow Motion Animations"> - <menu_item_check.on_check - function="CheckControl" - parameter="SlowMotionAnimation" /> - <menu_item_check.on_click - function="ToggleControl" - parameter="SlowMotionAnimation" /> - </menu_item_check> - <menu_item_check label="Show Look At" name="Show Look At"> <menu_item_check.on_check diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index c785cee856..c681e39002 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -896,8 +896,7 @@ You need an account to enter [SECOND_LIFE]. Would you like to create one now? option="0" name="url" target = "_external"> - - http://join.secondlife.com/ + [create_account_url] </url> <usetemplate name="okcancelbuttons" @@ -1294,6 +1293,45 @@ Visit [_URL] for more information? <notification icon="alertmodal.tga" + name="AMDOldDriver" + type="alertmodal"> + There is likely a newer driver for your graphics chip. Updating graphics drivers can substantially improve performance. + + Visit [_URL] to check for driver updates? + <tag>confirm</tag> + <url option="0" name="url"> + http://support.amd.com/us/Pages/AMDSupportHub.aspx + </url> + <usetemplate + ignoretext="My graphics driver is out of date" + name="okcancelignore" + notext="No" + yestext="Yes"/> + <tag>fail</tag> + </notification> + + <notification + icon="alertmodal.tga" + name="NVIDIAOldDriver" + type="alertmodal"> + There is likely a newer driver for your graphics chip. Updating graphics drivers can substantially improve performance. + + Visit [_URL] to check for driver updates? + <tag>confirm</tag> + <url option="0" name="url"> + http://www.nvidia.com/Download/index.aspx?lang=en-us + </url> + <usetemplate + ignoretext="My graphics driver is out of date" + name="okcancelignore" + notext="No" + yestext="Yes"/> + <tag>fail</tag> + </notification> + + + <notification + icon="alertmodal.tga" name="UnknownGPU" type="alertmodal"> Your system contains a graphics card that [APP_NAME] doesn't recognize. @@ -2929,12 +2967,11 @@ You can use [SECOND_LIFE] normally and other people will see you correctly. [APP_NAME] installation is complete. If this is your first time using [SECOND_LIFE], you will need to create an account before you can log in. -Return to [http://join.secondlife.com secondlife.com] to create a new account? <tag>confirm</tag> <usetemplate name="okcancelbuttons" notext="Continue" - yestext="New Account..."/> + yestext="Create Account..."/> </notification> <notification @@ -3048,6 +3085,7 @@ Would you like to trust this authority? icon="alertmodal.tga" name="GrantedModifyRights" persist="true" + log_to_im="true" type="notify"> [NAME] has given you permission to edit their objects. </notification> @@ -3056,6 +3094,7 @@ Would you like to trust this authority? icon="alertmodal.tga" name="RevokedModifyRights" persist="true" + log_to_im="true" type="notify"> Your privilege to modify [NAME]'s objects has been revoked </notification> @@ -3689,12 +3728,15 @@ Cannot offer friendship at this time. Please try again in a moment. <notification icon="alert.tga" - name="BusyModeSet" + name="DoNotDisturbModeSet" type="alert"> -Busy mode is set. -Chat and instant messages will be hidden. Instant messages will get your Busy mode response. All teleportation offers will be declined. All inventory offers will go to your Trash. +Do Not Disturb is on. You will not be notified of incoming communications. + +- Other residents will receive your Do Not Disturb response (set in Preferences > General). +- Teleportation offers will be declined. +- Voice calls will be rejected. <usetemplate - ignoretext="I change my status to Busy mode" + ignoretext="I change my status to Do Not Disturb mode" name="okignore" yestext="OK"/> </notification> @@ -4240,6 +4282,8 @@ Are you sure you want to change the Estate Covenant? <notification icon="notifytip.tga" name="RegionEntryAccessBlocked_Notify" + log_to_im="false" + log_to_chat="true" type="notifytip"> <tag>fail</tag> The region you're trying to visit contains [REGIONMATURITY] content, but your current preferences are set to exclude [REGIONMATURITY] content. @@ -4248,6 +4292,8 @@ The region you're trying to visit contains [REGIONMATURITY] content, but your cu <notification icon="notifytip.tga" name="RegionEntryAccessBlocked_NotifyAdultsOnly" + log_to_im="false" + log_to_chat="true" type="notifytip"> <tag>fail</tag> The region you're trying to visit contains [REGIONMATURITY] content, which is accessible to adults only. @@ -4319,6 +4365,8 @@ The region you're trying to visit contains [REGIONMATURITY] content, but your cu <notification icon="notifytip.tga" name="TeleportEntryAccessBlocked_Notify" + log_to_im="false" + log_to_chat="true" type="notifytip"> <unique> <context>REGIONMATURITY</context> @@ -4330,6 +4378,8 @@ The region you're trying to visit contains [REGIONMATURITY] content, but your cu <notification icon="notifytip.tga" name="TeleportEntryAccessBlocked_NotifyAdultsOnly" + log_to_im="false" + log_to_chat="true" type="notifytip"> <unique> <context>REGIONMATURITY</context> @@ -4450,6 +4500,8 @@ You won't receive any more notifications that you're about to visit a region wit <notification icon="notifytip.tga" name="LandClaimAccessBlocked_Notify" + log_to_im="false" + log_to_chat="true" type="notifytip"> The land you're trying to claim contains [REGIONMATURITY] content, but your current preferences are set to exclude [REGIONMATURITY] content. <tag>fail</tag> @@ -4458,6 +4510,8 @@ You won't receive any more notifications that you're about to visit a region wit <notification icon="notifytip.tga" name="LandClaimAccessBlocked_NotifyAdultsOnly" + log_to_im="false" + log_to_chat="true" type="notifytip"> <tag>fail</tag> The land you're trying to claim contains [REGIONMATURITY] content, which is accessible to adults only. @@ -4515,6 +4569,8 @@ You won't receive any more notifications that you're about to visit a region wit <notification icon="notifytip.tga" name="LandBuyAccessBlocked_Notify" + log_to_im="false" + log_to_chat="true" type="notifytip"> The land you're trying to buy contains [REGIONMATURITY] content, but your current preferences are set to exclude [REGIONMATURITY] content. <tag>fail</tag> @@ -4523,6 +4579,8 @@ You won't receive any more notifications that you're about to visit a region wit <notification icon="notifytip.tga" name="LandBuyAccessBlocked_NotifyAdultsOnly" + log_to_im="false" + log_to_chat="true" type="notifytip"> <tag>fail</tag> The land you're trying to buy contains [REGIONMATURITY] content, which is accessible to adults only. @@ -4968,6 +5026,20 @@ Go to your [http://secondlife.com/account/ Dashboard] to see your account histor <notification icon="alertmodal.tga" + name="ConfirmAddingChatParticipants" + type="alertmodal"> + <unique/> +When you add a person to an existing conversation, a new conversation will be created. All participants will receive new conversation notifications. + <tag>confirm</tag> + <usetemplate + ignoretext="Confirm adding chat paticipants" + name="okcancelignore" + notext="Cancel" + yestext="Ok"/> + </notification> + + <notification + icon="alertmodal.tga" name="ConfirmQuit" type="alertmodal"> <unique/> @@ -5135,25 +5207,25 @@ Do you want to replace it with the selected object? <notification icon="alert.tga" - label="Busy Mode Warning" - name="BusyModePay" + label="Do Not Disturb Mode Warning" + name="DoNotDisturbModePay" type="alert"> -You are in Busy Mode, which means you will not receive any items offered in exchange for this payment. +You have turned on Do Not Disturb. You will not receive any items offered in exchange for this payment. -Would you like to leave Busy Mode before completing this transaction? +Would you like to turn off Do Not Disturb before completing this transaction? <tag>confirm</tag> <form name="form"> <ignore name="ignore" save_option="true" - text="I am about to pay a person or object while I am in Busy mode"/> + text="I am about to pay a person or object while I am in Do Not Disturb mode"/> <button default="true" - ignore="Always leave Busy Mode" + ignore="Always leave Do Not Disturb Mode" index="0" name="Yes" text="OK"/> <button - ignore="Never leave Busy Mode" + ignore="Never leave Do Not Disturb Mode" index="1" name="No" text="Cancel"/> @@ -5464,6 +5536,8 @@ The string [STRING_NAME] is missing from strings.xml <notification icon="notifytip.tga" name="IMSystemMessageTip" + log_to_im="true" + log_to_chat="false" type="notifytip"> [MESSAGE] </notification> @@ -5507,18 +5581,14 @@ Topic: [SUBJECT], Message: [MESSAGE] <notification icon="notifytip.tga" - name="FriendOnline" + name="FriendOnlineOffline" + log_to_chat="false" type="notifytip"> <tag>friendship</tag> -<nolink>[NAME]</nolink> is Online - </notification> - - <notification - icon="notifytip.tga" - name="FriendOffline" - type="notifytip"> - <tag>friendship</tag> -<nolink>[NAME]</nolink> is Offline +<nolink>[NAME]</nolink> is [STATUS] + <unique combine="cancel_old"> + <context>NAME</context> + </unique> </notification> <notification @@ -5762,6 +5832,8 @@ You don't have permission to copy this. <notification icon="notifytip.tga" name="InventoryAccepted" + log_to_im="true" + log_to_chat="false" type="notifytip"> [NAME] received your inventory offer. </notification> @@ -5769,6 +5841,8 @@ You don't have permission to copy this. <notification icon="notifytip.tga" name="InventoryDeclined" + log_to_im="true" + log_to_chat="false" type="notifytip"> [NAME] declined your inventory offer. </notification> @@ -5850,6 +5924,7 @@ Please select at least one type of content to search (General, Moderate, or Adul <notification icon="notify.tga" name="PaymentReceived" + log_to_im="true" persist="true" type="notify"> <tag>funds</tag> @@ -5859,6 +5934,7 @@ Please select at least one type of content to search (General, Moderate, or Adul <notification icon="notify.tga" name="PaymentSent" + log_to_im="true" persist="true" type="notify"> <tag>funds</tag> @@ -6003,6 +6079,7 @@ The objects on the selected parcel that are NOT owned by you have been returned <notification icon="notify.tga" name="ServerObjectMessage" + log_to_im="true" persist="true" type="notify"> Message from [NAME]: @@ -6078,26 +6155,6 @@ This area has building disabled. You can't build or rez objects here. <notification icon="alertmodal.tga" - name="PathfindingRebakeNavmesh" - type="alertmodal"> - <unique/> - Changing certain objects in this region could cause other moving objects to behave incorrectly. To make moving objects behave correctly, click the “Rebake region†button. Choose “Help†for more information. - <url - option="1" - name="url" - target = "_external"> - http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer - </url> - <usetemplate - name="okhelpignore" - ignoretext="Changing certain objects in this region could cause other moving objects to behave incorrectly." - yestext="OK" - helptext="Help" - /> - </notification> - - <notification - icon="alertmodal.tga" name="PathfindingCannotRebakeNavmesh" type="alertmodal"> <unique/> @@ -6421,7 +6478,9 @@ Your object named <nolink>[OBJECTFROMNAME]</nolink> has given you th <notification icon="notify.tga" name="UserGiveItem" - type="offer"> + log_to_im ="true" + type="offer" + sound="UISndNewIncomingIMSession"> [NAME_SLURL] has given you this [OBJECTTYPE]: [ITEM_SLURL] <form name="form"> @@ -6476,7 +6535,10 @@ Your object named <nolink>[OBJECTFROMNAME]</nolink> has given you th <notification icon="notify.tga" name="TeleportOffered" - type="offer"> + log_to_im="true" + log_to_chat="false" + type="offer" + sound="UISndNewIncomingIMSession"> [NAME_SLURL] has offered to teleport you to their location: “[MESSAGE]†@@ -6497,6 +6559,8 @@ Your object named <nolink>[OBJECTFROMNAME]</nolink> has given you th <notification icon="notify.tga" name="TeleportOffered_MaturityExceeded" + log_to_im="true" + log_to_chat="false" type="offer"> [NAME_SLURL] has offered to teleport you to their location: @@ -6520,6 +6584,8 @@ This region contains [REGION_CONTENT_MATURITY] content, but your current prefere <notification icon="notify.tga" name="TeleportOffered_MaturityBlocked" + log_to_im="true" + log_to_chat="false" type="notifytip"> [NAME_SLURL] has offered to teleport you to their location: @@ -6533,7 +6599,10 @@ However, this region contains content accessible to adults only. <notification icon="notify.tga" name="TeleportOfferSent" - type="offer"> + log_to_im="true" + log_to_chat="false" + show_toast="false" + type="notify"> Teleport offer sent to [TO_NAME] </notification> @@ -6560,6 +6629,7 @@ However, this region contains content accessible to adults only. <notification icon="notify.tga" name="OfferFriendship" + log_to_im="true" type="offer"> <tag>friendship</tag> <tag>confirm</tag> @@ -6583,7 +6653,9 @@ However, this region contains content accessible to adults only. <notification icon="notify.tga" name="FriendshipOffered" - type="offer"> + log_to_im="true" + show_toast="false" + type="notify"> <tag>friendship</tag> You have offered friendship to [TO_NAME] </notification> @@ -6612,7 +6684,8 @@ However, this region contains content accessible to adults only. <notification icon="notify.tga" name="FriendshipAccepted" - type="offer"> + log_to_im="true" + type="notify"> <tag>friendship</tag> <nolink>[NAME]</nolink> accepted your friendship offer. </notification> @@ -6620,6 +6693,7 @@ However, this region contains content accessible to adults only. <notification icon="notify.tga" name="FriendshipDeclined" + log_to_im="true" persist="true" type="notify"> <tag>friendship</tag> @@ -6629,7 +6703,9 @@ However, this region contains content accessible to adults only. <notification icon="notify.tga" name="FriendshipAcceptedByMe" - type="offer"> + log_to_im="true" + show_toast="false" + type="notify"> <tag>friendship</tag> Friendship offer accepted. </notification> @@ -6637,7 +6713,9 @@ Friendship offer accepted. <notification icon="notify.tga" name="FriendshipDeclinedByMe" - type="offer"> + log_to_im="true" + show_toast="false" + type="notify"> <tag>friendship</tag> Friendship offer declined. </notification> @@ -6686,6 +6764,7 @@ If you stay in this region you will be logged out. <notification icon="notify.tga" name="LoadWebPage" + show_toast="false" type="notify"> Load web page [URL]? @@ -6766,7 +6845,7 @@ Is this OK? type="notify"> Warning: The object '<nolink>[OBJECTNAME]</nolink>' wants total access to your Linden Dollars account. If you allow access, it can remove funds from your account at any time, or empty your account completely, on an ongoing basis with no additional warnings. -It is rare that such a request is legitimate. Do not allow access if you do not fully understand why it wants access to your account. +Do not allow access if you do not fully understand why it wants access to your account. <tag>confirm</tag> <form name="form"> @@ -6788,6 +6867,7 @@ It is rare that such a request is legitimate. Do not allow access if you do not <notification icon="notify.tga" name="ScriptDialog" + show_toast="false" type="notify"> [NAME]'s '<nolink>[TITLE]</nolink>' [MESSAGE] @@ -6806,6 +6886,7 @@ It is rare that such a request is legitimate. Do not allow access if you do not <notification icon="notify.tga" name="ScriptDialogGroup" + show_toast="false" type="notify"> <tag>group</tag> [GROUPNAME]'s '<nolink>[TITLE]</nolink>' @@ -8274,4 +8355,1680 @@ Attempt cancelled. yestext="Yes"/> </notification> + + <notification + icon="alertmodal.tga" + name="AvatarFrozen" + type="notify"> + <tag>fail</tag> +[AV_FREEZER] has frozen you. You cannot move or interact with the world. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarFrozenDuration" + type="notify"> + <tag>fail</tag> +[AV_FREEZER] has frozen you for [AV_FREEZE_TIME] seconds. You cannot move or interact with the world. + </notification> + + <notification + icon="alertmodal.tga" + name="YouFrozeAvatar" + type="notify"> + <tag>fail</tag> +Avatar frozen. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarHasUnFrozenYou" + type="notify"> + <tag>fail</tag> +[AV_FREEZER] has unfrozen you. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarUnFrozen" + type="notify"> + <tag>fail</tag> +Avatar unfrozen. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarFreezeFailure" + type="notify"> + <tag>fail</tag> +Freeze failed because you don't have admin permission for that parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarFreezeThaw" + type="notify"> + <tag>fail</tag> +Your freeze expired, go about your business. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarCantFreeze" + type="notify"> + <tag>fail</tag> +Sorry, can't freeze that user. + </notification> + + <notification + icon="alertmodal.tga" + name="NowOwnObject" + type="notify"> + <tag>fail</tag> +You are now the owner of object [OBJECT_NAME] + </notification> + + <notification + icon="alertmodal.tga" + name="CantRezOnLand" + type="notify"> + <tag>fail</tag> +Can't rez object at [OBJECT_POS] because the owner of this land does not allow it. Use the land tool to see land ownership. + </notification> + + <notification + icon="alertmodal.tga" + name="RezFailTooManyRequests" + type="notify"> + <tag>fail</tag> +Object can not be rezzed because there are too many requests. + </notification> + + <notification + icon="alertmodal.tga" + name="SitFailCantMove" + type="notify"> + <tag>fail</tag> +You cannot sit because you cannot move at this time. + </notification> + + <notification + icon="alertmodal.tga" + name="SitFailNotAllowedOnLand" + type="notify"> + <tag>fail</tag> +You cannot sit because you are not allowed on that land. + </notification> + + <notification + icon="alertmodal.tga" + name="SitFailNotSameRegion" + type="notify"> + <tag>fail</tag> +Try moving closer. Can't sit on object because +it is not in the same region as you. + </notification> + + <notification + icon="alertmodal.tga" + name="NoNewObjectRegionFull" + type="notify"> + <tag>fail</tag> +Unable to create new object. The region is full. + </notification> + + <notification + icon="alertmodal.tga" + name="FailedToPlaceObject" + type="notify"> + <tag>fail</tag> +Failed to place object at specified location. Please try again. + </notification> + + <notification + icon="alertmodal.tga" + name="NoOwnNoGardening" + type="notify"> + <tag>fail</tag> +You Can't create trees and grass on land you don't own. + </notification> + + <notification + icon="alertmodal.tga" + name="NoCopyPermsNoObject" + type="notify"> + <tag>fail</tag> +Copy failed because you lack permission to copy the object '[OBJ_NAME]'. + </notification> + + <notification + icon="alertmodal.tga" + name="NoTransPermsNoObject" + type="notify"> + <tag>fail</tag> +Copy failed because the object '[OBJ_NAME]' cannot be transferred to you. + </notification> + + <notification + icon="alertmodal.tga" + name="AddToNavMeshNoCopy" + type="notify"> + <tag>fail</tag> +Copy failed because the object '[OBJ_NAME]' contributes to navmesh. + </notification> + + <notification + icon="alertmodal.tga" + name="DupeWithNoRootsSelected" + type="notify"> + <tag>fail</tag> +Duplicate with no root objects selected. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDupeCuzRegionIsFull" + type="notify"> + <tag>fail</tag> +Can't duplicate objects because the region is full. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDupeCuzParcelNotFound" + type="notify"> + <tag>fail</tag> +Can't duplicate objects - Can't find the parcel they are on. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateCuzParcelFull" + type="notify"> + <tag>fail</tag> +Can't create object because +the parcel is full. + </notification> + + <notification + icon="alertmodal.tga" + name="RezAttemptFailed" + type="notify"> + <tag>fail</tag> +Attempt to rez an object failed. + </notification> + + <notification + icon="alertmodal.tga" + name="ToxicInvRezAttemptFailed" + type="notify"> + <tag>fail</tag> +Unable to create item that has caused problems on this region. + </notification> + + <notification + icon="alertmodal.tga" + name="InvItemIsBlacklisted" + type="notify"> + <tag>fail</tag> +That inventory item has been blacklisted. + </notification> + + <notification + icon="alertmodal.tga" + name="NoCanRezObjects" + type="notify"> + <tag>fail</tag> +You are not currently allowed to create objects. + </notification> + + <notification + icon="alertmodal.tga" + name="LandSearchBlocked" + type="notify"> + <tag>fail</tag> +Land Search Blocked. +You have performed too many land searches too quickly. +Please try again in a minute. + </notification> + + <notification + icon="alertmodal.tga" + name="NotEnoughResourcesToAttach" + type="notify"> + <tag>fail</tag> +Not enough script resources available to attach object! + </notification> + + <notification + icon="alertmodal.tga" + name="YouDiedAndGotTPHome" + type="notify"> + <tag>fail</tag> +You died and have been teleported to your home location + </notification> + + <notification + icon="alertmodal.tga" + name="EjectComingSoon" + type="notify"> + <tag>fail</tag> +You are no longer allowed here and have [EJECT_TIME] seconds to leave. + </notification> + + <notification + icon="alertmodal.tga" + name="NoEnterServerFull" + type="notify"> + <tag>fail</tag> +You can't enter this region because +the server is full. + </notification> + + <notification + icon="alertmodal.tga" + name="SaveBackToInvDisabled" + type="notify"> + <tag>fail</tag> +Save Back To Inventory has been disabled. + </notification> + + <notification + icon="alertmodal.tga" + name="NoExistNoSaveToContents" + type="notify"> + <tag>fail</tag> +Cannot save '[OBJ_NAME]' to object contents because the object it was rezzed from no longer exists. + </notification> + + <notification + icon="alertmodal.tga" + name="NoModNoSaveToContents" + type="notify"> + <tag>fail</tag> +Cannot save '[OBJ_NAME]' to object contents because you do not have permission to modify the object '[DEST_NAME]'. + </notification> + + <notification + icon="alertmodal.tga" + name="NoSaveBackToInvDisabled" + type="notify"> + <tag>fail</tag> +Cannot save '[OBJ_NAME]' back to inventory -- this operation has been disabled. + </notification> + + <notification + icon="alertmodal.tga" + name="NoCopyNoSelCopy" + type="notify"> + <tag>fail</tag> +You cannot copy your selection because you do not have permission to copy the object '[OBJ_NAME]'. + </notification> + + <notification + icon="alertmodal.tga" + name="NoTransNoSelCopy" + type="notify"> + <tag>fail</tag> +You cannot copy your selection because the object '[OBJ_NAME]' is not transferrable. + </notification> + + <notification + icon="alertmodal.tga" + name="NoTransNoCopy" + type="notify"> + <tag>fail</tag> +You cannot copy your selection because the object '[OBJ_NAME]' is not transferrable. + </notification> + + <notification + icon="alertmodal.tga" + name="NoPermsNoRemoval" + type="notify"> + <tag>fail</tag> +Removal of the object '[OBJ_NAME]' from the simulator is disallowed by the permissions system. + </notification> + + <notification + icon="alertmodal.tga" + name="NoModNoSaveSelection" + type="notify"> + <tag>fail</tag> +Cannot save your selection because you do not have permission to modify the object '[OBJ_NAME]'. + </notification> + + <notification + icon="alertmodal.tga" + name="NoCopyNoSaveSelection" + type="notify"> + <tag>fail</tag> +Cannot save your selection because the object '[OBJ_NAME]' is not copyable. + </notification> + + <notification + icon="alertmodal.tga" + name="NoModNoTaking" + type="notify"> + <tag>fail</tag> +You cannot take your selection because you do not have permission to modify the object '[OBJ_NAME]'. + </notification> + + <notification + icon="alertmodal.tga" + name="RezDestInternalError" + type="notify"> + <tag>fail</tag> +Internal Error: Unknown destination type. + </notification> + + <notification + icon="alertmodal.tga" + name="DeleteFailObjNotFound" + type="notify"> + <tag>fail</tag> +Delete failed because object not found + </notification> + + <notification + icon="alertmodal.tga" + name="SorryCantEjectUser" + type="notify"> + <tag>fail</tag> +Sorry, can't eject that user. + </notification> + + <notification + icon="alertmodal.tga" + name="RegionSezNotAHome" + type="notify"> + <tag>fail</tag> +This region does not allow you to set your home location here. + </notification> + + <notification + icon="alertmodal.tga" + name="HomeLocationLimits" + type="notify"> + <tag>fail</tag> +You can only set your 'Home Location' on your land or at a mainland Infohub. + </notification> + + <notification + icon="alertmodal.tga" + name="HomePositionSet" + type="notify"> + <tag>fail</tag> +Home position set. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarEjected" + type="notify"> + <tag>fail</tag> +Avatar ejected. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarEjectFailed" + type="notify"> + <tag>fail</tag> +Eject failed because you don't have admin permission for that parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="CantMoveObjectParcelFull" + type="notify"> + <tag>fail</tag> +Can't move object '[OBJECT_NAME]' to +[OBJ_POSITION] in region [REGION_NAME] because the parcel is full. + </notification> + + <notification + icon="alertmodal.tga" + name="CantMoveObjectParcelPerms" + type="notify"> + <tag>fail</tag> +Can't move object '[OBJECT_NAME]' to +[OBJ_POSITION] in region [REGION_NAME] because your objects are not allowed on this parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="CantMoveObjectParcelResources" + type="notify"> + <tag>fail</tag> +Can't move object '[OBJECT_NAME]' to +[OBJ_POSITION] in region [REGION_NAME] because there are not enough resources for this object on this parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="CantMoveObjectRegionVersion" + type="notify"> + <tag>fail</tag> +Can't move object '[OBJECT_NAME]' to +[OBJ_POSITION] in region [REGION_NAME] because the other region is running an older version which does not support receiving this object via region crossing. + </notification> + + <notification + icon="alertmodal.tga" + name="CantMoveObjectNavMesh" + type="notify"> + <tag>fail</tag> +Can't move object '[OBJECT_NAME]' to +[OBJ_POSITION] in region [REGION_NAME] because you cannot modify the navmesh across region boundaries. + </notification> + + <notification + icon="alertmodal.tga" + name="CantMoveObjectWTF" + type="notify"> + <tag>fail</tag> +Can't move object '[OBJECT_NAME]' to +[OBJ_POSITION] in region [REGION_NAME] because of an unknown reason. ([FAILURE_TYPE]) + </notification> + + <notification + icon="alertmodal.tga" + name="NoPermModifyObject" + type="notify"> + <tag>fail</tag> +You don't have permission to modify that object + </notification> + + <notification + icon="alertmodal.tga" + name="CantEnablePhysObjContributesToNav" + type="notify"> + <tag>fail</tag> +Can't enable physics for an object that contributes to the navmesh. + </notification> + + <notification + icon="alertmodal.tga" + name="CantEnablePhysKeyframedObj" + type="notify"> + <tag>fail</tag> +Can't enable physics for keyframed objects. + </notification> + + <notification + icon="alertmodal.tga" + name="CantEnablePhysNotEnoughLandResources" + type="notify"> + <tag>fail</tag> +Can't enable physics for object -- insufficient land resources. + </notification> + + <notification + icon="alertmodal.tga" + name="CantEnablePhysCostTooGreat" + persist="true" + type="notify"> + <tag>fail</tag> +Can't enable physics for object with physics resource cost greater than [MAX_OBJECTS] + </notification> + + <notification + icon="alertmodal.tga" + name="PhantomWithConcavePiece" + type="notify"> + <tag>fail</tag> +This object cannot have a concave piece because it is phantom and contributes to the navmesh. + </notification> + + <notification + icon="alertmodal.tga" + name="UnableAddItem" + type="notify"> + <tag>fail</tag> +Unable to add item! + </notification> + + <notification + icon="alertmodal.tga" + name="UnableEditItem" + type="notify"> + <tag>fail</tag> +Unable to edit this! + </notification> + + <notification + icon="alertmodal.tga" + name="NoPermToEdit" + type="notify"> + <tag>fail</tag> +Not permitted to edit this. + </notification> + + <notification + icon="alertmodal.tga" + name="NoPermToCopyInventory" + type="notify"> + <tag>fail</tag> +Not permitted to copy that inventory. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSaveItemDoesntExist" + type="notify"> + <tag>fail</tag> +Cannot save to object contents: Item no longer exists. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSaveItemAlreadyExists" + type="notify"> + <tag>fail</tag> +Cannot save to object contents: Item with that name already exists in inventory + </notification> + + <notification + icon="alertmodal.tga" + name="CantSaveModifyAttachment" + type="notify"> + <tag>fail</tag> +Cannot save to object contents: This would modify the attachment permissions. + </notification> + + <notification + icon="alertmodal.tga" + name="TooManyScripts" + type="notify"> + <tag>fail</tag> +Too many scripts. + </notification> + + <notification + icon="alertmodal.tga" + name="UnableAddScript" + type="notify"> + <tag>fail</tag> +Unable to add script! + </notification> + + <notification + icon="alertmodal.tga" + name="AssetServerTimeoutObjReturn" + type="notify"> + <tag>fail</tag> +Asset server didn't respond in a timely fashion. Object returned to sim. + </notification> + + <notification + icon="alertmodal.tga" + name="RegionDisablePhysicsShapes" + type="notify"> + <tag>fail</tag> +This region does not have physics shapes enabled. + </notification> + + <notification + icon="alertmodal.tga" + name="NoModNavmeshAcrossRegions" + type="notify"> + <tag>fail</tag> +You cannot modify the navmesh across region boundaries. + </notification> + + <notification + icon="alertmodal.tga" + name="NoSetPhysicsPropertiesOnObjectType" + type="notify"> + <tag>fail</tag> +Cannot set physics properties on that object type. + </notification> + + <notification + icon="alertmodal.tga" + name="NoSetRootPrimWithNoShape" + type="notify"> + <tag>fail</tag> +Cannot set root prim to have no shape. + </notification> + + <notification + icon="alertmodal.tga" + name="NoRegionSupportPhysMats" + type="notify"> + <tag>fail</tag> +This region does not have physics materials enabled. + </notification> + + <notification + icon="alertmodal.tga" + name="OnlyRootPrimPhysMats" + type="notify"> + <tag>fail</tag> +Only root prims may have their physics materials adjusted. + </notification> + + <notification + icon="alertmodal.tga" + name="NoSupportCharacterPhysMats" + type="notify"> + <tag>fail</tag> +Setting physics materials on characters is not yet supported. + </notification> + + <notification + icon="alertmodal.tga" + name="InvalidPhysMatProperty" + type="notify"> + <tag>fail</tag> +One or more of the specified physics material properties was invalid. + </notification> + + <notification + icon="alertmodal.tga" + name="NoPermsAlterStitchingMeshObj" + type="notify"> + <tag>fail</tag> +You may not alter the stitching type of a mesh object. + </notification> + + <notification + icon="alertmodal.tga" + name="NoPermsAlterShapeMeshObj" + type="notify"> + <tag>fail</tag> +You may not alter the shape of a mesh object + </notification> + + <notification + icon="alertmodal.tga" + name="FullRegionCantEnter" + type="notify"> + <tag>fail</tag> +You can't enter this region because \nthe region is full. + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedOwnersDiffer" + type="notify"> + <tag>fail</tag> +Link failed -- owners differ + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedNoModNavmeshAcrossRegions" + type="notify"> + <tag>fail</tag> +Link failed -- cannot modify the navmesh across region boundaries. + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedNoPermToEdit" + type="notify"> + <tag>fail</tag> +Link failed because you do not have edit permission. + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedTooManyPrims" + type="notify"> + <tag>fail</tag> +Link failed -- too many primitives + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedCantLinkNoCopyNoTrans" + type="notify"> + <tag>fail</tag> +Link failed -- cannot link no-copy with no-transfer + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedNothingLinkable" + type="notify"> + <tag>fail</tag> +Link failed -- nothing linkable. + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedTooManyPathfindingChars" + type="notify"> + <tag>fail</tag> +Link failed -- too many pathfinding characters + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedInsufficientLand" + type="notify"> + <tag>fail</tag> +Link failed -- insufficient land resources + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedTooMuchPhysics" + type="notify"> + <tag>fail</tag> +Object uses too many physics resources -- its dynamics have been disabled. + </notification> + + <notification + icon="alertmodal.tga" + name="TeleportedHomeByObjectOnParcel" + persist="true" + type="notify"> + <tag>fail</tag> +You have been teleported home by the object '[OBJECT_NAME]' on the parcel '[PARCEL_NAME]' + </notification> + + <notification + icon="alertmodal.tga" + name="TeleportedHomeByObject" + persist="true" + type="notify"> + <tag>fail</tag> +You have been teleported home by the object '[OBJECT_NAME]' + </notification> + + <notification + icon="alertmodal.tga" + name="TeleportedByAttachment" + type="notify"> + <tag>fail</tag> +You have been teleported by an attachment on [ITEM_ID] + </notification> + + <notification + icon="alertmodal.tga" + name="TeleportedByObjectOnParcel" + type="notify"> + <tag>fail</tag> +You have been teleported by the object '[OBJECT_NAME]' on the parcel '[PARCEL_NAME]' + </notification> + + <notification + icon="alertmodal.tga" + name="TeleportedByObjectOwnedBy" + type="notify"> + <tag>fail</tag> +You have been teleported by the object '[OBJECT_NAME]' owned by [OWNER_ID] + </notification> + + <notification + icon="alertmodal.tga" + name="TeleportedByObjectUnknownUser" + type="notify"> + <tag>fail</tag> +You have been teleported by the object '[OBJECT_NAME]' owned by an unknown user. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateObjectRegionFull" + type="notify"> + <tag>fail</tag> +Unable to create requested object. The region is full. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttackMultipleObjOneSpot" + type="notify"> + <tag>fail</tag> +You can't attach multiple objects to one spot. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateMultipleObjAtLoc" + type="notify"> + <tag>fail</tag> +You can't create multiple objects here. + </notification> + + <notification + icon="alertmodal.tga" + name="UnableToCreateObjTimeOut" + type="notify"> + <tag>fail</tag> +Unable to create requested object. Object is missing from database. + </notification> + + <notification + icon="alertmodal.tga" + name="UnableToCreateObjUnknown" + type="notify"> + <tag>fail</tag> +Unable to create requested object. The request timed out. Please try again. + </notification> + + <notification + icon="alertmodal.tga" + name="UnableToCreateObjMissingFromDB" + type="notify"> + <tag>fail</tag> +Unable to create requested object. Please try again. + </notification> + + <notification + icon="alertmodal.tga" + name="RezFailureTookTooLong" + type="notify"> + <tag>fail</tag> +Rez failed, requested object took too long to load. + </notification> + + <notification + icon="alertmodal.tga" + name="FailedToPlaceObjAtLoc" + type="notify"> + <tag>fail</tag> +Failed to place object at specified location. Please try again. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreatePlantsOnLand" + type="notify"> + <tag>fail</tag> +You cannot create plants on this land. + </notification> + + <notification + icon="alertmodal.tga" + name="CantRestoreObjectNoWorldPos" + type="notify"> + <tag>fail</tag> +Cannot restore object. No world position found. + </notification> + + <notification + icon="alertmodal.tga" + name="CantRezObjectInvalidMeshData" + type="notify"> + <tag>fail</tag> +Unable to rez object because its mesh data is invalid. + </notification> + + <notification + icon="alertmodal.tga" + name="CantRezObjectTooManyScripts" + type="notify"> + <tag>fail</tag> +Unable to rez object because there are already too many scripts in this region. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateObjectNoAccess" + type="notify"> + <tag>fail</tag> +Your access privileges don't allow you to create objects there. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateObject" + type="notify"> + <tag>fail</tag> +You are not currently allowed to create objects. + </notification> + + <notification + icon="alertmodal.tga" + name="InvalidObjectParams" + type="notify"> + <tag>fail</tag> +Invalid object parameters + </notification> + + <notification + icon="alertmodal.tga" + name="CantDuplicateObjectNoAcess" + type="notify"> + <tag>fail</tag> +Your access privileges don't allow you to duplicate objects here. + </notification> + + <notification + icon="alertmodal.tga" + name="CantChangeShape" + type="notify"> + <tag>fail</tag> +You are not allowed to change this shape. + </notification> + + <notification + icon="alertmodal.tga" + name="NoAccessToClaimObjects" + type="notify"> + <tag>fail</tag> +Your access privileges don't allow you to claim objects here. + </notification> + + <notification + icon="alertmodal.tga" + name="DeedFailedNoPermToDeedForGroup" + type="notify"> + <tag>fail</tag> +Deed failed because you do not have permission to deed objects for your group. + </notification> + + <notification + icon="alertmodal.tga" + name="NoPrivsToBuyObject" + type="notify"> + <tag>fail</tag> +Your access privileges don't allow you to buy objects here. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttachObjectAvatarSittingOnIt" + type="notify"> + <tag>fail</tag> +Cannot attach object because an avatar is sitting on it. + </notification> + + <notification + icon="alertmodal.tga" + name="WhyAreYouTryingToWearShrubbery" + type="notify"> + <tag>fail</tag> +Trees and grasses cannot be worn as attachments. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttachGroupOwnedObjs" + type="notify"> + <tag>fail</tag> +Cannot attach group-owned objects. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttachObjectsNotOwned" + type="notify"> + <tag>fail</tag> +Cannot attach objects that you don't own. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttachNavmeshObjects" + type="notify"> + <tag>fail</tag> +Cannot attach objects that contribute to navmesh. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttachObjectNoMovePermissions" + type="notify"> + <tag>fail</tag> +Cannot attach object because you do not have permission to move it. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttachNotEnoughScriptResources" + type="notify"> + <tag>fail</tag> +Not enough script resources available to attach object! + </notification> + + <notification + icon="alertmodal.tga" + name="CantDropItemTrialUser" + type="notify"> + <tag>fail</tag> +You can't drop objects here; try the Free Trial area. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDropMeshAttachment" + type="notify"> + <tag>fail</tag> +You can't drop mesh attachments. Detach to inventory and then rez in world. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDropAttachmentNoPermission" + type="notify"> + <tag>fail</tag> +Failed to drop attachment: you don't have permission to drop there. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDropAttachmentInsufficientLandResources" + type="notify"> + <tag>fail</tag> +Failed to drop attachment: insufficient available land resource. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDropAttachmentInsufficientResources" + type="notify"> + <tag>fail</tag> +Failed to drop attachments: insufficient available resources. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDropObjectFullParcel" + type="notify"> + <tag>fail</tag> +Cannot drop object here. Parcel is full. + </notification> + + <notification + icon="alertmodal.tga" + name="CantTouchObjectBannedFromParcel" + type="notify"> + <tag>fail</tag> +Can't touch/grab this object because you are banned from the land parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="PlzNarrowDeleteParams" + type="notify"> + <tag>fail</tag> +Please narrow your delete parameters. + </notification> + + <notification + icon="alertmodal.tga" + name="UnableToUploadAsset" + type="notify"> + <tag>fail</tag> +Unable to upload asset. + </notification> + + <notification + icon="alertmodal.tga" + name="CantTeleportCouldNotFindUser" + type="notify"> + <tag>fail</tag> +Could not find user to teleport home + </notification> + + <notification + icon="alertmodal.tga" + name="GodlikeRequestFailed" + type="notify"> + <tag>fail</tag> +godlike request failed + </notification> + + <notification + icon="alertmodal.tga" + name="GenericRequestFailed" + type="notify"> + <tag>fail</tag> +generic request failed + </notification> + + <notification + icon="alertmodal.tga" + name="CantUploadPostcard" + type="notify"> + <tag>fail</tag> +Unable to upload postcard. Try again later. + </notification> + + <notification + icon="alertmodal.tga" + name="CantFetchInventoryForGroupNotice" + type="notify"> + <tag>fail</tag> +Unable to fetch inventory details for the group notice. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSendGroupNoticeNotPermitted" + type="notify"> + <tag>fail</tag> +Unable to send group notice -- not permitted. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSendGroupNoticeCantConstructInventory" + type="notify"> + <tag>fail</tag> +Unable to send group notice -- could not construct inventory. + </notification> + + <notification + icon="alertmodal.tga" + name="CantParceInventoryInNotice" + type="notify"> + <tag>fail</tag> +Unable to parse inventory in notice. + </notification> + + <notification + icon="alertmodal.tga" + name="TerrainUploadFailed" + type="notify"> + <tag>fail</tag> +Terrain upload failed. + </notification> + + <notification + icon="alertmodal.tga" + name="TerrainFileWritten" + type="notify"> + <tag>fail</tag> +Terrain file written. + </notification> + + <notification + icon="alertmodal.tga" + name="TerrainFileWrittenStartingDownload" + type="notify"> + <tag>fail</tag> +Terrain file written, starting download... + </notification> + + <notification + icon="alertmodal.tga" + name="TerrainBaked" + type="notify"> + <tag>fail</tag> +Terrain baked. + </notification> + + <notification + icon="alertmodal.tga" + name="TenObjectsDisabledPlzRefresh" + type="notify"> + <tag>fail</tag> +Only the first 10 selected objects have been disabled. Refresh and make additional selections if required. + </notification> + + <notification + icon="alertmodal.tga" + name="UpdateViewerBuyParcel" + type="notify"> + <tag>fail</tag> +You need to update your viewer to buy this parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="LandBuyAccessBlocked" + type="notify"> + <tag>fail</tag> +You can't buy this land due to your maturity Rating. You may need to validate your age and/or install the latest Viewer. Please go to the Knowledge Base for details on accessing areas with this maturity Rating. + </notification> + + <notification + icon="alertmodal.tga" + name="CantBuyParcelNotForSale" + type="notify"> + <tag>fail</tag> +Unable to buy, this parcel is not for sale. + </notification> + + <notification + icon="alertmodal.tga" + name="CantBuySalePriceOrLandAreaChanged" + type="notify"> + <tag>fail</tag> +Unable to buy, the sale price or land area has changed. + </notification> + + <notification + icon="alertmodal.tga" + name="CantBuyParcelNotAuthorized" + type="notify"> + <tag>fail</tag> +You are not the authorized buyer for this parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="CantBuyParcelAwaitingPurchaseAuth" + type="notify"> + <tag>fail</tag> +You cannot purchase this parcel because it is already awaiting purchase aut + </notification> + + <notification + icon="alertmodal.tga" + name="CantBuildOverflowParcel" + type="notify"> + <tag>fail</tag> +You cannot build objects here because doing so would overflow the parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="SelectedMultipleOwnedLand" + type="notify"> + <tag>fail</tag> +You selected land with different owners. Please select a smaller area and try again. + </notification> + + <notification + icon="alertmodal.tga" + name="CantJoinTooFewLeasedParcels" + type="notify"> + <tag>fail</tag> +Not enough leased parcels in selection to join. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDivideLandMultipleParcelsSelected" + type="notify"> + <tag>fail</tag> +Can't divide land.\nThere is more than one parcel selected.\nTry selecting a smaller piece of land. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDivideLandCantFindParcel" + type="notify"> + <tag>fail</tag> +Can't divide land.\nCan't find the parcel.\nPlease report with Help -> Reprt Bug... + </notification> + + <notification + icon="alertmodal.tga" + name="CantDivideLandWholeParcelSelected" + type="notify"> + <tag>fail</tag> +Can't divide land. Whole parcel is selected.\nTry selecting a smaller piece of land. + </notification> + + <notification + icon="alertmodal.tga" + name="LandHasBeenDivided" + type="notify"> + <tag>fail</tag> +Land has been divided. + </notification> + + <notification + icon="alertmodal.tga" + name="PassPurchased" + type="notify"> + <tag>fail</tag> +You purchased a pass. + </notification> + + <notification + icon="alertmodal.tga" + name="RegionDisallowsClassifieds" + type="notify"> + <tag>fail</tag> +Region does not allow classified advertisements. + </notification> + + <notification + icon="alertmodal.tga" + name="LandPassExpireSoon" + type="notify"> + <tag>fail</tag> +Your pass to this land is about to expire. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSitNoSuitableSurface" + type="notify"> + <tag>fail</tag> +There is no suitable surface to sit on, try another spot. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSitNoRoom" + type="notify"> + <tag>fail</tag> +No room to sit here, try another spot. + </notification> + + <notification + icon="alertmodal.tga" + name="ClaimObjectFailedNoPermission" + type="notify"> + <tag>fail</tag> +Claim object failed because you don't have permission + </notification> + + <notification + icon="alertmodal.tga" + name="ClaimObjectFailedNoMoney" + type="notify"> + <tag>fail</tag> +Claim object failed because you don't have enough L$. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDeedGroupLand" + type="notify"> + <tag>fail</tag> +Cannot deed group-owned land. + </notification> + + <notification + icon="alertmodal.tga" + name="BuyObjectFailedNoMoney" + type="notify"> + <tag>fail</tag> +Buy object failed because you don't have enough L$. + </notification> + + <notification + icon="alertmodal.tga" + name="BuyInventoryFailedNoMoney" + type="notify"> + <tag>fail</tag> +Buy inventory failed because you do not have enough L$ + </notification> + + <notification + icon="alertmodal.tga" + name="BuyPassFailedNoMoney" + type="notify"> + <tag>fail</tag> +You don't have enough L$ to buy a pass to this land. + </notification> + + <notification + icon="alertmodal.tga" + name="CantBuyPassTryAgain" + type="notify"> + <tag>fail</tag> +Unable to buy pass right now. Try again later. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateObjectParcelFull" + type="notify"> + <tag>fail</tag> +Can't create object because \nthe parcel is full. + </notification> + + <notification + icon="alertmodal.tga" + name="FailedPlacingObject" + type="notify"> + <tag>fail</tag> +Failed to place object at specified location. Please try again. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateLandmarkForEvent" + type="notify"> + <tag>fail</tag> +Unable to create landmark for event. + </notification> + + <notification + icon="alertmodal.tga" + name="GodBeatsFreeze" + type="notify"> + <tag>fail</tag> +Your godlike powers break the freeze! + </notification> + + <notification + icon="alertmodal.tga" + name="SpecialPowersRequestFailedLogged" + type="notify"> + <tag>fail</tag> +Request for special powers failed. This request has been logged. + </notification> + + <notification + icon="alertmodal.tga" + name="ExpireExplanation" + type="notify"> + <tag>fail</tag> +The system is currently unable to process your request. The request timed out. + </notification> + + <notification + icon="alertmodal.tga" + name="DieExplanation" + type="notify"> + <tag>fail</tag> +The system is unable to process your request. + </notification> + + <notification + icon="alertmodal.tga" + name="AddPrimitiveFailure" + type="notify"> + <tag>fail</tag> +Insufficient funds to create primitve. + </notification> + + <notification + icon="alertmodal.tga" + name="RezObjectFailure" + type="notify"> + <tag>fail</tag> +Insufficient funds to create object. + </notification> + + <notification + icon="alertmodal.tga" + name="ResetHomePositionNotLegal" + type="notify"> + <tag>fail</tag> +Reset Home position since Home wasn't legal. + </notification> + + <notification + icon="alertmodal.tga" + name="CantInviteRegionFull" + type="notify"> + <tag>fail</tag> +You cannot currently invite anyone to your location because the region is full. Try again later. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSetHomeAtRegion" + type="notify"> + <tag>fail</tag> +This region does not allow you to set your home location here. + </notification> + + <notification + icon="alertmodal.tga" + name="ListValidHomeLocations" + type="notify"> + <tag>fail</tag> +You can only set your 'Home Location' on your land or at a mainland Infohub. + </notification> + + <notification + icon="alertmodal.tga" + name="SetHomePosition" + type="notify"> + <tag>fail</tag> +Home position set. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDerezInventoryError" + type="notify"> + <tag>fail</tag> +Cannot derez object due to inventory fault. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateRequestedInv" + type="notify"> + <tag>fail</tag> +Cannot create requested inventory. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateRequestedInvFolder" + type="notify"> + <tag>fail</tag> +Cannot create requested inventory folder. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateInventory" + type="notify"> + <tag>fail</tag> +Cannot create that inventory. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateLandmark" + type="notify"> + <tag>fail</tag> +Cannot create landmark. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateOutfit" + type="notify"> + <tag>fail</tag> +Cannot create outfit right now. Try again in a minute. + </notification> + + <notification + icon="alertmodal.tga" + name="InventoryNotForSale" + type="notify"> + <tag>fail</tag> +Inventory is not for sale. + </notification> + + <notification + icon="alertmodal.tga" + name="CantFindInvItem" + type="notify"> + <tag>fail</tag> +Unable to find inventory item. + </notification> + + <notification + icon="alertmodal.tga" + name="CantFindObject" + type="notify"> + <tag>fail</tag> +Unable to find object. + </notification> + + <notification + icon="alertmodal.tga" + name="CantTransfterMoneyRegionDisabled" + type="notify"> + <tag>fail</tag> +Money transfers to objects are currently disabled in this region. + </notification> + + <notification + icon="alertmodal.tga" + name="CantPayNoAgent" + type="notify"> + <tag>fail</tag> +Could not figure out who to pay. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDonateToPublicObjects" + type="notify"> + <tag>fail</tag> +You cannot give L$ to public objects. + </notification> + + <notification + icon="alertmodal.tga" + name="InventoryCreationInWorldObjectFailed" + type="notify"> + <tag>fail</tag> +Inventory creation on in-world object failed. + </notification> + + <notification + icon="alertmodal.tga" + name="UserBalanceOrLandUsageError" + type="notify"> + <tag>fail</tag> +An internal error prevented us from properly updating your viewer. The L$ balance or parcel holdings displayed in your viewer may not reflect your actual balance on the servers. + </notification> + + <notification + icon="alertmodal.tga" + name="LargePrimAgentIntersect" + type="notify"> + <tag>fail</tag> +Cannot create large prims that intersect other players. Please re-try when other players have moved. + </notification> + + <notification + icon="alertmodal.tga" + name="PreferenceChatClearLog" + type="alertmodal"> + This will delete the logs of previous conversations, and any backups of that file. + <tag>confirm</tag> + <usetemplate + ignoretext="Confirm before I delete the log of previous conversations." + name="okcancelignore" + notext="Cancel" + yestext="OK"/> + </notification> + + <notification + icon="alertmodal.tga" + name="PreferenceChatDeleteTranscripts" + type="alertmodal"> + This will delete the transcripts for all previous conversations. The list of past conversations will not be affected. All files with the suffixes .txt and txt.backup in the folder [FOLDER] will be deleted. + <tag>confirm</tag> + <usetemplate + ignoretext="Confirm before I delete transcripts." + name="okcancelignore" + notext="Cancel" + yestext="OK"/> + </notification> + + <notification + icon="alert.tga" + name="PreferenceChatPathChanged" + type="alert"> + Unable to move files. Restored previous path. + <usetemplate + ignoretext="Unable to move files. Restored previous path." + name="okignore" + yestext="OK"/> + </notification> + </notifications> diff --git a/indra/newview/skins/default/xui/en/panel_activeim_row.xml b/indra/newview/skins/default/xui/en/panel_activeim_row.xml deleted file mode 100644 index 9369d1b5cf..0000000000 --- a/indra/newview/skins/default/xui/en/panel_activeim_row.xml +++ /dev/null @@ -1,97 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - name="panel_activeim_row" - layout="topleft" - follows="left|right" - top="0" - left="0" - height="35" - width="318" - background_opaque="false" - background_visible="true" - bg_alpha_color="0.0 0.0 0.0 0.0" > - <chiclet_im_p2p - name="p2p_chiclet" - layout="topleft" - follows="left" - top="3" - left="5" - height="25" - width="25" - visible="false" - speaker.name="speaker_p2p" - speaker.width="20" - speaker.height="25" - speaker.left="25" - speaker.top="25" - speaker.auto_update="true" - speaker.draw_border="false" - speaker.visible="false"> - </chiclet_im_p2p> - <chiclet_im_group - name="group_chiclet" - layout="topleft" - follows="left" - top="3" - left="5" - height="25" - width="25" - visible="false" - speaker.name="speaker_grp" - speaker.width="20" - speaker.height="25" - speaker.left="25" - speaker.top="25" - speaker.auto_update="true" - speaker.draw_border="false" - speaker.visible="false"> - </chiclet_im_group> - <chiclet_im_adhoc - name="adhoc_chiclet" - layout="topleft" - follows="left" - top="3" - left="5" - height="25" - width="25" - visible="false" - speaker.name="speaker_hoc" - speaker.width="20" - speaker.height="25" - speaker.left="25" - speaker.top="25" - speaker.auto_update="true" - speaker.draw_border="false" - speaker.visible="false"> - </chiclet_im_adhoc> - <text - translate="false" - type="string" - name="contact_name" - layout="topleft" - top="10" - left_pad="10" - height="14" - width="250" - length="1" - follows="right|left" - parse_urls="false" - use_ellipses="true" - font="SansSerifBold"> - TestString PleaseIgnore - </text> - <button - top="10" - right="-5" - width="17" - height="17" - layout="topleft" - follows="right" - name="hide_btn" - mouse_opaque="true" - label="" - tab_stop="false" - image_unselected="Toast_CloseBtn" - image_selected="Toast_CloseBtn" - /> -</panel>
\ No newline at end of file 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 deleted file mode 100644 index d68fa6ca6c..0000000000 --- a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml +++ /dev/null @@ -1,95 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - border="false" - follows="all" - height="215" - name="panel_im_control_panel" - width="150"> - <layout_stack - mouse_opaque="false" - border_size="0" - clip="false" - follows="all" - height="215" - layout="topleft" - left="3" - name="vertical_stack" - orientation="vertical" - top="0" - width="147"> - <layout_panel - auto_resize="true" - follows="top|left" - height="130" - layout="topleft" - left="0" - min_height="0" - mouse_opaque="false" - width="147" - top="0" - name="speakers_list_panel"> - <avatar_list - color="DkGray2" - follows="all" - height="130" - ignore_online_status="true" - layout="topleft" - name="speakers_list" - opaque="false" - show_info_btn="true" - show_profile_btn="false" - show_speaking_indicator="false" - width="147" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="130" - name="call_btn_panel" - visible="false"> - <button - follows="all" - height="20" - label="Call" - name="call_btn" - width="130" - top="0" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="130" - name="end_call_btn_panel" - visible="false"> - <button - follows="all" - height="20" - label="Leave Call" - name="end_call_btn" - top="0"/> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="130" - name="voice_ctrls_btn_panel" - visible="false"> - <button - follows="all" - height="20" - label="Voice Controls" - name="voice_ctrls_btn" - top="0" - use_ellipses="true" /> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml index b7c58eb6ab..aa1b929412 100644 --- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml @@ -129,6 +129,7 @@ left_pad="3" right="-53" name="info_btn" + tool_tip="More info" tab_stop="false" top_delta="0" width="16" /> diff --git a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml index 7c67fd7f83..53d0252215 100644 --- a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml @@ -4,88 +4,99 @@ follows="left|top|right|bottom" height="305" layout="topleft" + left="0" name="block_list_panel" help_topic="blocked_list" min_height="350" min_width="240" - width="280"> - <button - follows="top|left" - height="24" - image_hover_unselected="BackButton_Over" - image_pressed="BackButton_Press" - image_unselected="BackButton_Off" - layout="topleft" - name="back" - left="4" - tab_stop="false" - top="1" - width="30"/> - <text - follows="top|left|right" - font="SansSerifLargeBold" - height="20" - layout="topleft" - left_pad="10" - name="title_text" - text_color="White" - top="5" - width="250"> - Block List - </text> - <scroll_list + width="323"> + <panel + follows="left|top|right" + height="27" + label="bottom_panel" + layout="topleft" + left="0" + name="blocked_buttons_panel" + right="-1" + top="0"> + <filter_editor + follows="left|top|right" + height="23" + layout="topleft" + left="6" + label="Filter" + max_length_chars="300" + name="blocked_filter_input" + text_color="Black" + text_pad_left="10" + top="4" + width="177" /> + <menu_button + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="8" + menu_filename="menu_people_blocked_gear.xml" + menu_position="bottomleft" + name="blocked_gear_btn" + tool_tip="Actions on selected person or object" + top="3" + width="31" /> + <menu_button + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_sort" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="2" + menu_filename="menu_people_blocked_view.xml" + menu_position="bottomleft" + name="view_btn" + tool_tip="Sort options" + top_delta="0" + width="31" /> + <menu_button + follows="right" + 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="2" + menu_filename="menu_people_blocked_plus.xml" + menu_position="bottomleft" + name="plus_btn" + tool_tip="Pick a Resident or an object to block" + top_delta="0" + width="31"/> + <button + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="TrashItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + left_pad="2" + layout="topleft" + name="unblock_btn" + tool_tip="Remove Resident or object from blocked list" + top_delta="0" + width="31"/> + </panel> + <block_list follows="all" - height="190" + height="273" layout="topleft" - left="5" + left="3" name="blocked" tool_tip="List of currently blocked Residents" - top="30" - width="270"> - <scroll_list.columns - name="item_name" /> - <scroll_list.columns - name="item_type" - width="96" /> - </scroll_list> - <button - follows="left|bottom" - height="23" - label="Block person" - layout="topleft" - left_delta="0" - name="Block resident..." - tool_tip="Pick a Resident to block" - top_pad="4" - width="210"> - <button.commit_callback - function="Block.ClickPick" /> - </button> - <button - follows="left|bottom" - height="23" - label="Block object by name" - layout="topleft" - left_delta="0" - name="Block object by name..." - tool_tip="Pick an object to block by name" - top_pad="4" - width="210" > - <button.commit_callback - function="Block.ClickBlockByName" /> - </button> - <button - enabled="false" - follows="left|bottom" - height="23" - label="Unblock" - layout="topleft" - left_delta="0" - name="Unblock" - tool_tip="Remove Resident or object from blocked list" - top_pad="4" - width="210" > - <button.commit_callback - function="Block.ClickRemove" /> - </button> + top="31" + right="-1"/> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_blocked_list_item.xml b/indra/newview/skins/default/xui/en/panel_blocked_list_item.xml new file mode 100644 index 0000000000..752321b949 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_blocked_list_item.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + follows="top|right|left" + height="23" + layout="topleft" + left="0" + name="blocked_list_item" + top="0" + width="380"> + <icon + height="24" + follows="top|right|left" + image_name="ListItem_Select" + layout="topleft" + left="0" + name="selected_icon" + top="0" + visible="false" + width="380" /> + <icon + follows="top|right|left" + height="24" + image_name="ListItem_Over" + layout="topleft" + left="0" + name="hovered_icon" + top="0" + visible="false" + width="380" /> + <avatar_icon + default_icon_name="Generic_Person" + follows="top|left" + height="20" + layout="topleft" + left="5" + mouse_opaque="true" + top="2" + visible="false" + width="20" /> + <group_icon + default_icon_name="Generic_Group" + follows="top|left" + height="20" + layout="topleft" + left="5" + mouse_opaque="true" + top="2" + visible="false" + width="20" /> + <icon + follows="top|left" + height="16" + image_name="Inv_Object" + layout="topleft" + left="7" + name="object_icon" + top="4" + visible="false" + width="16" /> + <text + follows="left|right" + font="SansSerifSmall" + height="15" + layout="topleft" + left_pad="5" + name="item_name" + parse_urls="false" + top="6" + use_ellipses="true" + width="180" /> +</panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml index f4722b05d6..27a27473d8 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml @@ -46,7 +46,7 @@ follows="left|right" top="4" width="310" - name="chat_bar" + name="nearby_chat" mouse_opaque="false"/> </layout_panel> <layout_panel diff --git a/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml b/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml index ff0146490b..fc321fdd23 100644 --- a/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml @@ -87,54 +87,6 @@ layout="topleft" min_height="28" min_width="37" - name="im_well_panel" - top="0" - width="37"> - <chiclet_im_well - follows="right" - height="28" - layout="topleft" - left="0" - max_displayed_count="99" - name="im_well" - top="0" - width="35"> - <!-- -Emulate 4 states of button by background images, see details in EXT-3147. The same should be for notification_well button -xml attribute Description -image_unselected "Unlit" - there are no new messages -image_selected "Unlit" + "Selected" - there are no new messages and the Well is open -image_pressed "Lit" - there are new messages -image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open - --> - <button - auto_resize="false" - follows="right" - halign="center" - height="23" - image_overlay="Unread_IM" - image_overlay_alignment="center" - image_pressed="WellButton_Lit" - image_pressed_selected="WellButton_Lit_Selected" - image_selected="PushButton_Press" - label_color="Black" - left="0" - name="Unread IM messages" - tool_tip="Conversations" - width="34"> - <init_callback - function="Button.SetDockableFloaterToggle" - parameter="im_well_window" /> - </button> - </chiclet_im_well> - </layout_panel> - <layout_panel - auto_resize="false" - follows="right" - height="28" - layout="topleft" - min_height="28" - min_width="37" name="notification_well_panel" top="0" width="37"> diff --git a/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml b/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml new file mode 100644 index 0000000000..a054e71e34 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + follows="left|top|right" + height="24" + layout="topleft" + name="conversation_list_item" + mouse_opaque="false" + width="120"> + <avatar_icon + follows="top|left" + height="20" + default_icon_name="Generic_Person" + layout="topleft" + left="5" + top="2" + visible="false" + width="20" /> + <group_icon + follows="top|left" + height="20" + default_icon_name="Generic_Group" + layout="topleft" + left="5" + top="2" + visible="false" + width="20" /> + <icon + follows="top|left" + height="20" + image_name="Nearby_chat_icon" + layout="topleft" + left="5" + name="nearby_chat_icon" + top="2" + visible="false" + width="20"/> + <layout_stack + animate="false" + follows="all" + height="24" + layout="topleft" + left="30" + mouse_opaque="false" + name="conversation_item_stack" + orientation="horizontal" + top="0" + width="90"> + <layout_panel + auto_resize="false" + user_resize="false" + height="24" + mouse_opaque="false" + name="call_icon_panel" + visible="false" + width="20"> + <icon + height="18" + follows="top|right|left" + image_name="Conv_toolbar_open_call" + layout="topleft" + left="0" + name="selected_icon" + top="3" + width="18" /> + </layout_panel> + <layout_panel + auto_resize="true" + user_resize="false" + height="24" + mouse_opaque="false" + name="conversation_title_panel" + width="70"> + <text + follows="left|top|right" + font="SansSerifSmall" + height="15" + layout="topleft" + left="5" + name="conversation_title" + parse_urls="false" + top="6" + use_ellipses="true" + value="(loading)" + width="35" /> + <output_monitor + auto_update="true" + follows="top|right" + draw_border="false" + height="16" + layout="topleft" + left_pad="5" + mouse_opaque="true" + name="speaking_indicator" + visible="false" + width="20" /> + </layout_panel> + </layout_stack> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_conversation_log_list_item.xml b/indra/newview/skins/default/xui/en/panel_conversation_log_list_item.xml new file mode 100644 index 0000000000..78d4c174d2 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_conversation_log_list_item.xml @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + follows="top|right|left" + height="23" + layout="topleft" + left="0" + name="conversation_log_list_item" + top="0" + width="380"> + <icon + height="24" + follows="top|right|left" + image_name="ListItem_Select" + layout="topleft" + left="0" + name="selected_icon" + top="0" + visible="false" + width="380" /> + <icon + follows="top|right|left" + height="24" + image_name="ListItem_Over" + layout="topleft" + left="0" + name="hovered_icon" + top="0" + visible="false" + width="380" /> + <icon + follows="top|left" + height="20" + layout="topleft" + left="5" + image_name="Conv_toolbar_open_call" + mouse_opaque="true" + name="voice_session_icon" + tool_tip="Included a voice conversation" + top="2" + visible="false" + width="20" /> + <icon + follows="top|left" + height="20" + layout="topleft" + left="5" + image_name="Conv_log_inbox" + mouse_opaque="false" + name="unread_ims_icon" + tool_tip="Messages arrived while you were logged out" + top="2" + visible="false" + width="20" /> + <avatar_icon + default_icon_name="Generic_Person" + follows="top|left" + height="20" + layout="topleft" + left_pad="5" + mouse_opaque="true" + top="2" + visible="false" + width="20" /> + <group_icon + default_icon_name="Generic_Group" + follows="top|left" + height="20" + layout="topleft" + mouse_opaque="true" + top="2" + visible="false" + width="20" /> + <text + follows="left|right" + font="SansSerifSmall" + height="15" + layout="topleft" + left_pad="5" + name="conversation_name" + parse_urls="false" + top="6" + use_ellipses="true" + width="180" /> + <text + follows="right" + font="SansSerifSmall" + height="15" + layout="topleft" + left_pad="5" + name="date_time" + parse_urls="false" + top="6" + use_ellipses="true" + width="110"/> + <button + name="delete_btn" + tool_tip="Remove this entry" + layout="topleft" + follows="top|right" + image_unselected="Conv_toolbar_close" + image_selected="Conv_toolbar_close" + top="5" + left_pad="0" + height="14" + width="14" + tab_stop="false"/> +</panel>
\ No newline at end of file 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 deleted file mode 100644 index ad10e53a4e..0000000000 --- a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml +++ /dev/null @@ -1,109 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - border="false" - follows="all" - height="238" - name="panel_im_control_panel" - width="150"> - <layout_stack - mouse_opaque="false" - border_size="0" - clip="false" - follows="all" - height="238" - layout="topleft" - left="5" - name="vertical_stack" - orientation="vertical" - top="0" - width="145"> - <layout_panel - auto_resize="true" - follows="top|left" - height="100" - layout="topleft" - min_height="0" - mouse_opaque="false" - width="145" - top="0" - name="speakers_list_panel"> - <avatar_list - color="DkGray2" - follows="all" - height="100" - ignore_online_status="true" - layout="topleft" - name="speakers_list" - opaque="false" - show_info_btn="true" - show_profile_btn="false" - show_speaking_indicator="false" - width="145" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="28" - layout="topleft" - min_height="28" - width="130" - name="group_info_btn_panel"> - <button - follows="left|right|bottom" - height="23" - label="Group Profile" - name="group_info_btn" - use_ellipses="true" - top="5" - width="130" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="28" - layout="topleft" - min_height="28" - width="130" - name="call_btn_panel"> - <button - follows="all" - height="23" - label="Call Group" - name="call_btn" - use_ellipses="true" - width="130" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="28" - layout="topleft" - min_height="28" - width="130" - name="end_call_btn_panel" - visible="false"> - <button - follows="all" - height="23" - label="Leave Call" - name="end_call_btn" - use_ellipses="true" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="28" - layout="topleft" - min_height="28" - width="130" - name="voice_ctrls_btn_panel" - visible="false"> - <button - follows="all" - height="23" - label="Open Voice Controls" - name="voice_ctrls_btn" - use_ellipses="true" /> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_invite.xml b/indra/newview/skins/default/xui/en/panel_group_invite.xml index cd834b61ce..124c0596c3 100644 --- a/indra/newview/skins/default/xui/en/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/en/panel_group_invite.xml @@ -19,6 +19,10 @@ name="already_in_group"> Some Residents you chose are already in the group, and so were not sent an invitation. </panel.string> + <panel.string + name="invite_selection_too_large"> + Group Invitations not sent: too many Residents selected. Group Invitations are limited to 100 per request. + </panel.string> <text type="string" length="1" diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item.xml b/indra/newview/skins/default/xui/en/panel_group_list_item.xml index 12735026fa..cfe3aeb7c9 100644 --- a/indra/newview/skins/default/xui/en/panel_group_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_group_list_item.xml @@ -56,6 +56,7 @@ left_pad="3" right="-31" name="info_btn" + tool_tip="More info" tab_stop="false" top_delta="-2" width="16" /> 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 6d5fb51e85..c8ce5cdebf 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -202,14 +202,14 @@ Maximum 200 per group daily Drag and drop item here to attach it: </text> <icon - height="72" + height="48" image_name="DropTarget" layout="topleft" left_pad="10" mouse_opaque="true" name="drop_icon" top_delta="-10" - width="72" /> + width="110" /> <button follows="left|top" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml index eea2606125..df91ad8b5e 100644 --- a/indra/newview/skins/default/xui/en/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml @@ -254,7 +254,7 @@ things in this group. There's a broad variety of Abilities. column_padding="0" draw_stripes="true" height="200" - follows="left|top" + follows="left|top|right" layout="topleft" left="0" right="-1" 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 deleted file mode 100644 index 8fcd6ccbaf..0000000000 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ /dev/null @@ -1,166 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - border="false" - height="300" - name="panel_im_control_panel" - width="150"> - <avatar_icon - follows="left|top" - height="105" - left_delta="20" - name="avatar_icon" - top="-5" - width="114"/> - <layout_stack - mouse_opaque="false" - border_size="0" - clip="false" - follows="all" - height="183" - layout="topleft" - left="5" - name="button_stack" - orientation="vertical" - top_pad="5" - width="145"> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="20" - layout="topleft" - left="2" - min_height="20" - width="140" - name="view_profile_btn_panel" - top="0" > - <button - follows="left|top|right" - height="23" - label="Profile" - name="view_profile_btn" - top="0" - width="140" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="140" - name="add_friend_btn_panel"> - <button - follows="left|top|right" - height="23" - label="Add Friend" - name="add_friend_btn" - top="5" - width="140" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="140" - name="teleport_btn_panel"> - <button - auto_resize="false" - follows="left|top|right" - height="23" - label="Teleport" - name="teleport_btn" - tool_tip = "Offer to teleport this person" - width="140" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="140" - name="share_btn_panel"> - <button - auto_resize="true" - follows="left|top|right" - height="23" - label="Share" - name="share_btn" - width="140" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="140" - name="pay_btn_panel"> - <button - auto_resize="true" - follows="left|top|right" - height="23" - label="Pay" - name="pay_btn" - width="140" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="140" - name="call_btn_panel"> - <button - follows="left|top|right" - height="23" - label="Call" - name="call_btn" - width="140" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="140" - name="end_call_btn_panel" - visible="false"> - <button - follows="left|top|right" - height="23" - label="End Call" - name="end_call_btn" - width="140" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="140" - name="voice_ctrls_btn_panel" - visible="false"> - <button - follows="left|top|right" - height="23" - label="Voice Controls" - name="voice_ctrls_btn" - width="140" /> - </layout_panel> - <layout_panel - mouse_opaque="false" - auto_resize="true" - follows="top|left" - height="0" - layout="topleft" - min_height="0" - width="140" - name="spacer"/> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml b/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml index 413e22e444..433a3181cd 100644 --- a/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml @@ -2,7 +2,7 @@ <inbox_inventory_panel accepts_drag_and_drop="false" name="inventory_inbox" - start_folder="Received Items" + start_folder.type="inbox" follows="all" layout="topleft" top="0" left="0" height="165" width="308" top_pad="0" diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml index 2a5933e3e9..67a09949ce 100644 --- a/indra/newview/skins/default/xui/en/panel_landmarks.xml +++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml @@ -35,7 +35,9 @@ left="0" mouse_opaque="true" name="favorites_list" - start_folder="Favorites" + scroll.hide_scrollbar="true" + folder_view.use_ellipses="true" + start_folder.name="Favorites" width="307"/> </accordion_tab> <accordion_tab @@ -51,7 +53,9 @@ left="0" mouse_opaque="true" name="landmarks_list" - start_folder="Landmarks" + scroll.hide_scrollbar="true" + folder_view.use_ellipses="true" + start_folder.name="Landmarks" width="307"/> </accordion_tab> <accordion_tab @@ -67,7 +71,9 @@ left="0" mouse_opaque="true" name="my_inventory_list" - start_folder="My Inventory" + scroll.hide_scrollbar="true" + folder_view.use_ellipses="true" + start_folder.name="My Inventory" width="307"/> </accordion_tab> <accordion_tab @@ -83,7 +89,9 @@ left="0" mouse_opaque="true" name="library_list" - start_folder="LIBRARY" + scroll.hide_scrollbar="true" + folder_view.use_ellipses="true" + start_folder.name="LIBRARY" width="313"/> </accordion_tab> </accordion> diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 44702c828f..134ca75018 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -7,11 +7,7 @@ name="panel_login" focus_root="true" top="600" - width="996"> - <panel.string - name="create_account_url"> - http://join.secondlife.com/ - </panel.string> + width="1130"> <string name="reg_in_client_url" translate="false"> http://secondlife.eniac15.lindenlab.com/reg-in-client/ </string> @@ -32,59 +28,82 @@ start_url="" top="0" height="600" - width="980"/> + width="996"/> <layout_stack + animate="false" + clip="false" follows="left|bottom|right" name="login_widgets" layout="topleft" orientation="horizontal" top="519" - width="996" + width="1130" height="80"> <layout_panel auto_resize="false" follows="left|bottom" name="login" layout="topleft" - width="705" - min_width="705" + width="310" + min_width="310" height="80"> <text follows="left|bottom" + font="SansSerif" + font.style="BOLD" + font.size="Large" + height="16" + name="log_in_text" + top="8" + left="15" + width="150"> + LOG IN + </text> + <text + follows="left|bottom" font="SansSerifSmall" height="16" name="username_text" - top="20" - left="20" + top="35" + left="15" width="150"> Username: </text> + <!-- STEAM-14: Turn off commit_on_focus_lost so if user presses Enter + with focus in this combo_box, we can use commit action to initiate + login --> <combo_box allow_text_entry="true" follows="left|bottom" height="22" left_delta="0" max_chars="128" + commit_on_focus_lost="false" combo_editor.prevalidate_callback="ascii" tool_tip="The username you chose when you registered, like bobsmith12 or Steller Sunshine" top_pad="0" name="username_combo" width="178"> +<!-- empirically, displayed width is 150 anyway?!? --> <combo_box.combo_button visible ="false"/> <combo_box.drop_down_button visible ="false"/> </combo_box> +<!-- left="175" based on actual "username_combo" width of 150 vs. 178 --> <text follows="left|bottom" font="SansSerifSmall" - height="15" - left_pad="-19" + height="16" name="password_text" - top="20" + top="35" + left="175" width="150"> Password: </text> + <!-- STEAM-14: Turn off commit_on_focus_lost so if user presses Enter + with focus in this line_editor, we can use commit action to + initiate login --> <line_editor follows="left|bottom" height="22" @@ -92,36 +111,25 @@ name="password_edit" is_password="true" select_on_focus="true" + commit_on_focus_lost="false" top_pad="0" width="135" /> - <check_box - control_name="RememberPassword" - follows="left|bottom" - font="SansSerifSmall" - height="16" - label="Remember password" - top_pad="3" - name="remember_check" - width="135" /> - <button - follows="left|bottom" - height="23" - image_unselected="PushButton_On" - image_selected="PushButton_On_Selected" - label="Log In" - label_color="White" - layout="topleft" - left_pad="10" - name="connect_btn" - top="35" - width="90" /> + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|bottom" + name="start_location_panel" + layout="topleft" + width="175" + min_width="175" + height="80"> <text follows="left|bottom" font="SansSerifSmall" - height="15" - left_pad="8" + height="16" + left="10" name="start_location_text" - top="20" + top="35" width="130"> Start at: </text> @@ -129,7 +137,7 @@ allow_text_entry="true" control_name="NextLoginLocation" follows="left|bottom" - height="23" + height="22" max_chars="128" top_pad="0" name="start_location_combo" @@ -146,60 +154,112 @@ label="<Type region name>" name="Typeregionname" value="" /> </combo_box> + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|bottom" + name="grid_panel" + layout="topleft" + width="145" + height="80" + visible="false"> <combo_box allow_text_entry="false" font="SansSerifSmall" follows="left|right|bottom" height="23" max_chars="256" + left="10" + top="51" layout="topleft" top_pad="2" name="server_combo" - width="250" - visible="false" /> + width="135" /> </layout_panel> <layout_panel - tab_stop="false" - follows="right|bottom" - name="links" - width="205" - min_width="205" + auto_resize="false" + follows="left|bottom" + name="links_login_panel" + layout="topleft" + width="290" height="80"> <text - follows="right|bottom" + follows="left|bottom" font="SansSerifSmall" text_color="EmphasisColor" - halign="right" + left="10" height="16" - top="12" - right="-10" - name="create_new_account_text" - width="200"> - Sign up + name="login_help" + top="19" + width="280"> + Need help logging in? </text> <text - follows="right|bottom" + follows="left|bottom" font="SansSerifSmall" text_color="EmphasisColor" - halign="right" height="16" name="forgot_password_text" - top_pad="12" - right="-10" - width="200"> + top="35" + width="280"> Forgot your username or password? </text> + <button + follows="left|bottom" + top_pad="0" + height="23" + image_unselected="PushButton_On" + image_selected="PushButton_On_Selected" + label="Log In" + label_color="White" + layout="topleft" + name="connect_btn" + width="90" /> + <check_box + control_name="RememberPassword" + follows="left|bottom" + font="SansSerifSmall" + left="110" + top="56" + height="16" + label="Remember password" + top_pad="3" + name="remember_check" + width="145" /> + </layout_panel> + <layout_panel + tab_stop="false" + follows="right|bottom" + name="links" + width="210" + min_width="100" + height="80"> <text follows="right|bottom" - font="SansSerifSmall" - text_color="EmphasisColor" + font="SansSerif" + font.style="BOLD" + font.size="Large" halign="right" height="16" - name="login_help" - top_pad="2" - right="-10" + name="create_account_text" + top="8" + right="-15" width="200"> - Need help logging in? </text> + CREATE YOUR ACCOUNT + </text> + <button + follows="right|bottom" + top="35" + right="-15" + height="23" + image_unselected="PushButton_On" + image_selected="PushButton_On_Selected" + label="Start now" + label_color="White" + layout="topleft" + left_pad="10" + name="create_new_account_btn" + width="90" /> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml index cdf14572fe..e844a15118 100644 --- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml +++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml @@ -30,7 +30,7 @@ (This page does not pass the specified whitelist) </text> <line_editor - max_length="1024" + max_length_bytes="1024" bottom_delta="-24" enabled="true" follows="left|top" diff --git a/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml deleted file mode 100644 index 90308a2ca9..0000000000 --- a/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - height="25" - layout="topleft" - name="panel_navmesh_rebake" - mouse_opaque="false" - visible="true" - width="133"> - <button - follows="left|bottom" - height="19" - label="Rebake region" - layout="topleft" - left="10" - name="navmesh_btn" - tool_tip="Click to rebake the region's navmesh." - top="2" - visible="false" - enabled="true" - width="120" /> - <button - follows="left|bottom" - height="19" - label="Requesting rebake" - layout="topleft" - left="10" - name="navmesh_btn_sending" - tool_tip="Sending rebake request to the server." - top="2" - visible="false" - enabled="false" - width="120" /> - <button - follows="left|bottom" - height="19" - label="Region is rebaking" - layout="topleft" - left="10" - name="navmesh_btn_baking" - tool_tip="Region is being rebaked. When completed, this button will disappear." - top="2" - visible="false" - enabled="false" - width="120" /> -</panel> diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat.xml index d683116eb8..4de56b424e 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat.xml @@ -1,20 +1,22 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel follows="all" - height="300" + top="0" + bottom_delta="10" help_topic="nearby_chat" layout="topleft" name="nearby_chat" - width="320"> + width="242" + height="169"> <layout_stack follows="all" - height="295" + height="164" layout="topleft" left="0" name="stack" top="5" orientation="vertical" - width="320"> + width="242"> <layout_panel auto_resize="false" height="26" @@ -23,7 +25,7 @@ name="translate_chat_checkbox_lp" top_delta="0" visible="true" - width="313"> + width="230"> <check_box top="10" control_name="TranslateChat" @@ -33,15 +35,15 @@ layout="topleft" left="5" name="translate_chat_checkbox" - width="300" /> + width="230" /> </layout_panel> <layout_panel auto_resize="true" - height="277" + height="138" left_delta="0" layout="topleft" name="chat_history_lp" - width="318"> + width="242"> <chat_history bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" @@ -49,7 +51,7 @@ layout="topleft" left="5" left_widget_pad="0" - height="272" + height="138" name="chat_history" parse_highlights="true" parse_urls="true" @@ -57,7 +59,7 @@ text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" top="0" - width="313" /> + width="237" /> </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 6bc9c48729..19143cef89 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 @@ -5,7 +5,7 @@ height="25" layout="topleft" left="0" - name="chat_bar" + name="nearby_chat" top="21" width="308"> <line_editor diff --git a/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml index a3d39e55af..c80e5b168a 100644 --- a/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml @@ -1,7 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<outbox_inventory_panel +<inventory_panel name="inventory_outbox" - start_folder="Outbox" + start_folder.name="Outbox" + show_empty_message="false" + show_load_status="false" + start_folder.type="outbox" follows="all" layout="topleft" top="0" left="0" height="165" width="308" top_pad="0" @@ -12,6 +15,18 @@ bevel_style="none" show_item_link_overlays="true" tool_tip="Drag and drop items here to prepare them for sale on your storefront" - > - <scroll reserve_scroll_corner="false" /> -</outbox_inventory_panel> + scroll.reserve_scroll_corner="false"> + <folder folder_arrow_image="Folder_Arrow" + folder_indentation="8" + item_height="20" + item_top_pad="4" + selection_image="Rounded_Square" + left_pad="5" + icon_pad="2" + icon_width="16" + text_pad="1" + text_pad_right="4" + arrow_size="12" + max_folder_item_overlap="2"/> + <item allow_open="false"/> +</inventory_panel> diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 98c7c49ff4..ed274d0233 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -38,12 +38,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M 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_items_msg & group_list.no_filtered_items_msg attributes. They are not defined as translatable in VLT. See EXT-5931 @@ -60,21 +54,9 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M <string name="AltMiniMapToolTipMsg" value="[REGION](Double-click to teleport, shift-drag to pan)"/> - <filter_editor - follows="left|top|right" - height="23" - layout="topleft" - left="10" - label="Filter" - max_length_chars="300" - name="filter_input" - text_color="Black" - text_pad_left="10" - top="3" - width="303" /> <tab_container + bottom="-10" follows="all" - height="383" layout="topleft" left="3" name="tabs" @@ -82,31 +64,120 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M tab_min_width="70" tab_height="30" tab_position="top" - top_pad="10" + top="0" halign="center" - width="319"> - <panel + right="-5"> + +<!-- ================================= NEARBY tab =========================== --> + + <panel background_opaque="true" background_visible="true" bg_alpha_color="DkGray" bg_opaque_color="DkGray" + bottom="-1" follows="all" - height="383" label="NEARBY" layout="topleft" left="0" help_topic="people_nearby_tab" name="nearby_panel" - top="0" - width="313"> + right="-1" + top="0"> + <panel + follows="left|top|right" + height="27" + label="bottom_panel" + layout="topleft" + left="0" + name="nearby_buttons_panel" + right="-1" + top="0"> + <filter_editor + follows="left|top|right" + height="23" + layout="topleft" + left="6" + label="Filter People" + max_length_chars="300" + name="nearby_filter_input" + text_color="Black" + text_pad_left="10" + top="4" + width="178" /> + <button + commit_callback.function="People.Gear" + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="7" + name="gear_btn" + tool_tip="Actions on selected person" + top="3" + width="31" /> + <menu_button + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_sort" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="2" + menu_filename="menu_people_nearby_view.xml" + menu_position="bottomleft" + name="nearby_view_btn" + tool_tip="View/sort options" + top_delta="0" + width="31" /> + <button + follows="right" + 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="2" + name="add_friend_btn" + tool_tip="Offer friendship to a resident" + top_delta="0" + width="31"> + <commit_callback + function="People.AddFriend" /> + </button> + <dnd_button + enabled="false" + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="TrashItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + left_pad="2" + layout="topleft" + name="nearby_del_btn" + tool_tip="Remove selected person as a friend" + top_delta="0" + width="31"> + <commit_callback + function="People.DelFriend" /> + </dnd_button> + </panel> <layout_stack clip="false" follows="all" - height="355" + height="410" layout="topleft" + left="0" mouse_opaque="false" orientation="vertical" - width="313"> + right="-1" + top_pad="0"> <layout_panel height="142" layout="topleft" @@ -123,16 +194,16 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M left="3" mouse_opaque="false" name="Net Map" - top="4" - width="305"/> + right="-1" + top="4" /> </layout_panel> <layout_panel height="213" layout="topleft" min_dim="100" mouse_opaque="false" - user_resize="true" - width="313"> + right="-1" + user_resize="true"> <avatar_list allow_select="true" follows="all" @@ -143,84 +214,122 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M keep_one_selected="false" multi_select="true" name="avatar_list" - top="2" - width="306" /> + right="-1" + top="2" /> </layout_panel> </layout_stack> - <panel - background_visible="true" - follows="left|right|bottom" - height="27" - label="bottom_panel" - layout="topleft" - left="3" - name="bottom_panel" - top_pad="0" - width="313"> - <menu_button - follows="bottom|left" - 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="nearby_view_sort_btn" - tool_tip="Options" - 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_friend_btn" - tool_tip="Add selected Resident to your friends List" - width="31"> - <commit_callback - function="People.addFriend" /> - </button> - <icon - follows="bottom|left|right" - height="25" - image_name="Toolbar_Right_Off" - layout="topleft" - left_pad="1" - name="dummy_icon" - width="243" - /> - </panel> </panel> + +<!-- ================================= FRIENDS tab ========================== --> + <panel background_opaque="true" background_visible="true" bg_alpha_color="DkGray" bg_opaque_color="DkGray" + bottom="-1" follows="all" - height="383" - label="MY FRIENDS" + label="FRIENDS" layout="topleft" left="0" help_topic="people_friends_tab" name="friends_panel" - top="0" - width="313"> + right="-1" + top="0"> + <panel + follows="left|top|right" + height="27" + label="bottom_panel" + layout="topleft" + left="0" + name="friends_buttons_panel" + right="-1" + top="0"> + <filter_editor + follows="left|top|right" + height="23" + layout="topleft" + left="6" + label="Filter People" + max_length_chars="300" + name="friends_filter_input" + text_color="Black" + text_pad_left="10" + top="4" + width="177" /> + <button + commit_callback.function="People.Gear" + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="8" + name="gear_btn" + tool_tip="Actions on selected person" + top="3" + width="31" /> + <menu_button + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_sort" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="2" + menu_filename="menu_people_friends_view.xml" + menu_position="bottomleft" + name="friends_view_btn" + tool_tip="View/sort options" + top_delta="0" + width="31" /> + <button + follows="right" + 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="2" + name="friends_add_btn" + tool_tip="Offer friendship to a resident" + top_delta="0" + width="31"> + <commit_callback + function="People.AddFriendWizard" /> + </button> + <dnd_button + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="TrashItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + left_pad="2" + layout="topleft" + name="friends_del_btn" + tool_tip="Remove selected person as a friend" + top_delta="0" + width="31"> + <commit_callback + function="People.DelFriend" /> + </dnd_button> + </panel> <accordion background_visible="true" bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" follows="all" - height="356" + height="408" layout="topleft" left="3" name="friends_accordion" - top="0" - width="307"> + right="-2" + top_pad="2"> <accordion_tab layout="topleft" height="172" @@ -257,247 +366,145 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M width="307" /> </accordion_tab> </accordion> - <panel - background_visible="true" - follows="left|right|bottom" - height="27" - label="bottom_panel" - layout="topleft" - left="3" - name="bottom_panel" - top_pad="0" - width="313"> - - <layout_stack - animate="false" - border_size="0" - follows="left|right|bottom" - height="25" - layout="topleft" - orientation="horizontal" - top_pad="1" - left="0" - name="bottom_panel" - width="308"> - <layout_panel - auto_resize="false" - height="25" - layout="topleft" - name="options_gear_btn_panel" - width="32"> - <menu_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="friends_viewsort_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="Offer friendship to a Resident" - top="0" - width="31" /> - </layout_panel> - <layout_panel - auto_resize="true" - height="25" - layout="topleft" - name="dummy_panel" - width="210"> - <icon - follows="bottom|left|right" - height="25" - image_name="Toolbar_Middle_Off" - layout="topleft" - left="0" - top="0" - name="dummy_icon" - width="210" /> - </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="del_btn" - tool_tip="Remove selected person from your Friends list" - top="0" - width="31"/> - </layout_panel> - </layout_stack><!-- - - <button - follows="bottom|left" - tool_tip="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="friends_viewsort_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="Offer friendship to a Resident" - width="31" /> - <icon - follows="bottom|left|right" - height="25" - image_name="Toolbar_Middle_Off" - layout="topleft" - left_pad="1" - name="dummy_icon" - width="209" - /> - <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" - layout="topleft" - left_pad="1" - name="del_btn" - tool_tip="Remove selected person from your Friends list" - width="31" /> - --></panel> <text follows="all" height="450" left="13" name="no_friends_help_text" - top="10" - width="293" + right="-13" + top="37" wrap="true" /> </panel> + +<!-- ================================= GROUPS tab =========================== --> + <panel background_opaque="true" background_visible="true" bg_alpha_color="DkGray" bg_opaque_color="DkGray" + bottom="-1" follows="all" - height="383" - label="MY GROUPS" + label="GROUPS" layout="topleft" left="0" help_topic="people_groups_tab" name="groups_panel" - top="0" - width="313"> + right="-1" + top="0"> <!-- *NOTE: no_groups_msg & group_list attributes are not defined as translatable in VLT. See EXT-5931 Values are set from appropriate strings at the top of file via LLPeoplePanel::postBuild() --> - <group_list - allow_select="true" - follows="all" - height="356" - layout="topleft" - left="3" - name="group_list" - top="0" - width="307" /> <panel - background_visible="true" - follows="left|right|bottom" + follows="left|top|right" height="27" label="bottom_panel" layout="topleft" left="0" - name="bottom_panel" - top_pad="0" - width="313"> - <menu_button - follows="bottom|left" - tool_tip="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="3" - name="groups_viewsort_btn" - top="1" - width="31" /> - <button - follows="bottom|left" + name="groups_buttons_panel" + right="-1" + top="0"> + <filter_editor + follows="left|top|right" + height="23" + layout="topleft" + left="6" + label="Filter Groups" + max_length_chars="300" + name="groups_filter_input" + text_color="Black" + text_pad_left="10" + top="4" + width="177" /> + <menu_button + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="8" + name="groups_gear_btn" + tool_tip="Actions on selected group" + top="3" + width="31" /> + <menu_button + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_sort" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="2" + menu_filename="menu_people_groups_view.xml" + menu_position="bottomleft" + name="groups_view_btn" + tool_tip="View/sort options" + top_delta="0" + width="31" /> + <menu_button + follows="right" 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" + left_pad="2" + menu_filename="menu_group_plus.xml" + menu_position="bottomleft" name="plus_btn" tool_tip="Join group/Create new group" - width="31" /> - <button - follows="bottom|left" + top_delta="0" + width="31"> + <validate_callback + function="People.Group.Plus.Validate" /> + </menu_button> + <dnd_button + follows="right" height="25" image_hover_unselected="Toolbar_Middle_Over" - image_overlay="Activate_Checkmark" + image_overlay="TrashItem_Off" image_selected="Toolbar_Middle_Selected" image_unselected="Toolbar_Middle_Off" + left_pad="2" layout="topleft" - left_pad="1" - name="activate_btn" - tool_tip="Activate selected group" - width="31" /> - <icon - follows="bottom|left|right" - height="25" - image_name="Toolbar_Right_Off" - layout="topleft" - left_pad="1" - name="dummy_icon" - width="212" - /> + name="minus_btn" + tool_tip="Leave selected group" + top_delta="0" + width="31"> + <commit_callback + function="People.Group.Minus" /> + </dnd_button> </panel> + <text + type="string" + length="1" + follows="all" + height="14" + layout="topleft" + right="-10" + top_pad="4" + left="3" + name="groupcount"> + You belong to [COUNT] groups, and can join [REMAINING] more. + </text> + <group_list + allow_select="true" + follows="all" + height="388" + layout="topleft" + left="3" + name="group_list" + right="-2" + top_pad="4" /> </panel> + +<!-- ================================= RECENT tab =========================== --> + <panel background_opaque="true" background_visible="true" @@ -510,265 +517,133 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M left="0" help_topic="people_recent_tab" name="recent_panel" - top="0" - width="313"> - <avatar_list - allow_select="true" - follows="all" - height="356" - layout="topleft" - left="3" - multi_select="true" - name="avatar_list" - show_last_interaction_time="true" - top="0" - width="307" /> + right="-1" + top="0"> <panel - background_visible="true" - follows="left|right|bottom" + follows="left|top|right" height="27" label="bottom_panel" layout="topleft" - left="3" - name="bottom_panel" - top_pad="0" - width="313"> - <menu_button - follows="bottom|left" - tool_tip="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" - name="recent_viewsort_btn" - top="1" - width="31" /> - <button - follows="bottom|left" + left="0" + name="recent_buttons_panel" + right="-1" + top="0"> + <filter_editor + follows="left|top|right" + height="23" + layout="topleft" + left="6" + label="Filter People" + max_length_chars="300" + name="recent_filter_input" + text_color="Black" + text_pad_left="10" + top="4" + width="177" /> + <button + commit_callback.function="People.Gear" + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="8" + name="gear_btn" + tool_tip="Actions on selected person" + top="3" + width="31" /> + <menu_button + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_toolbar_sort" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="2" + menu_filename="menu_people_recent_view.xml" + menu_position="bottomleft" + name="recent_view_btn" + tool_tip="View/sort options" + top_delta="0" + width="31" /> + <button + follows="right" 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" + left_pad="2" name="add_friend_btn" - tool_tip="Add selected Resident to your friends List" + tool_tip="Offer friendship to a resident" + top_delta="0" width="31"> - <commit_callback - function="People.addFriend" /> - </button> - <icon - follows="bottom|left|right" - height="25" - image_name="Toolbar_Right_Off" - layout="topleft" - left_pad="1" - name="dummy_icon" - width="244" - /> + <commit_callback + function="People.AddFriend" /> + </button> + <dnd_button + enabled="false" + follows="right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="TrashItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + left_pad="2" + layout="topleft" + name="recent_del_btn" + tool_tip="Remove selected person as a friend" + top_delta="0" + width="31"> + <commit_callback + function="People.DelFriend" /> + </dnd_button> </panel> + <avatar_list + allow_select="true" + follows="all" + height="351" + layout="topleft" + left="3" + multi_select="true" + name="avatar_list" + show_last_interaction_time="true" + right="-2" + top_pad="4" /> </panel> - </tab_container> - <panel - follows="bottom|left|right" - height="23" - layout="topleft" - left="8" - top_pad="4" - name="button_bar" - width="313"> -<!--********************************Profile; IM; Call, Share, Teleport********************************--> - <layout_stack - follows="bottom|left|right" - height="23" - layout="topleft" - name="bottom_bar_ls" - left="0" - orientation="horizontal" - top_pad="0" - width="313"> +<!-- ================================= BLOCKED tab ========================== --> - <layout_panel - follows="bottom|left|right" - height="23" - layout="bottomleft" - left="0" - name="view_profile_btn_lp" - auto_resize="true" - width="68"> - <button - follows="bottom|left|right" - height="23" - label="Profile" - layout="topleft" - left="1" - name="view_profile_btn" - tool_tip="Show picture, groups, and other Residents information" - top="0" - width="67" /> - </layout_panel> - - <layout_panel - follows="bottom|left|right" - height="23" - layout="bottomleft" - left_pad="3" - name="im_btn_lp" - auto_resize="true" - width="41"> - <button - follows="bottom|left|right" - left="1" - height="23" - label="IM" - layout="topleft" - name="im_btn" - tool_tip="Open instant message session" - top="0" - width="40" /> - </layout_panel> - - <layout_panel - follows="bottom|left|right" - height="23" - layout="bottomleft" - left_pad="3" - name="call_btn_lp" - auto_resize="true" - width="52"> - <button - follows="bottom|left|right" - left="1" - height="23" - label="Call" - layout="topleft" - name="call_btn" - tool_tip="Call this Resident" - top="0" - width="51" /> - </layout_panel> - - <layout_panel - follows="bottom|left|right" - height="23" - layout="bottomleft" - left_pad="3" - name="share_btn_lp" - auto_resize="true" - width="66"> - <button - follows="bottom|left|right" - left="1" - height="23" - label="Share" - layout="topleft" - name="share_btn" - tool_tip="Share an inventory item" - top="0" - width="65" /> - </layout_panel> - - <layout_panel - follows="bottom|left|right" - height="23" - layout="bottomleft" - left_pad="3" - name="teleport_btn_lp" - auto_resize="true" - width="77"> - <button - follows="bottom|left|right" - left="1" - height="23" - label="Teleport" - layout="topleft" - name="teleport_btn" - tool_tip="Offer teleport" - top="0" - width="76" /> - </layout_panel> - </layout_stack> - -<!--********************************Group Profile; Group Chat; Group Call buttons************************--> - <layout_stack - follows="bottom|left|right" - height="23" - layout="topleft" - mouse_opaque="false" - name="bottom_bar_ls1" - left="0" - orientation="horizontal" - top="0" - width="313"> - <layout_panel - follows="bottom|left|right" - height="23" - layout="bottomleft" - left="0" - mouse_opaque="false" - name="group_info_btn_lp" - auto_resize="true" - width="108"> - <button - follows="bottom|left|right" - left="1" - height="23" - label="Group Profile" - layout="topleft" - mouse_opaque="false" - name="group_info_btn" - tool_tip="Show group information" - top="0" - width="107" /> - </layout_panel> - - <layout_panel - follows="bottom|left|right" - height="23" - layout="bottomleft" - left_pad="3" - mouse_opaque="false" - name="chat_btn_lp" - auto_resize="true" - width="101"> - <button - follows="bottom|left|right" - left="1" - height="23" - label="Group Chat" - layout="topleft" - mouse_opaque="false" - name="chat_btn" - tool_tip="Open chat session" - top="0" - width="100" /> - </layout_panel> - - <layout_panel - follows="bottom|left|right" - height="23" - layout="bottomleft" - left_pad="3" - mouse_opaque="false" - name="group_call_btn_lp" - auto_resize="true" - width="96"> - <button - follows="bottom|left|right" - left="1" - height="23" - label="Group Call" - layout="topleft" - mouse_opaque="false" - name="group_call_btn" - tool_tip="Call this group" - top="0" - width="95" /> - </layout_panel> - </layout_stack> - </panel> + <panel + background_opaque="true" + background_visible="true" + bg_alpha_color="DkGray" + bg_opaque_color="DkGray" + follows="all" + height="383" + label="BLOCKED" + layout="topleft" + left="0" + help_topic="people_blocked_tab" + name="blocked_panel" + right="-1" + top="0"> + <panel + class="panel_block_list_sidetray" + height="383" + name="panel_block_list_sidetray" + filename="panel_block_list_sidetray.xml" + follows="all" + label="Blocked Residents & Objects" + layout="topleft" + left="0" + font="SansSerifBold" + top="0" + right="-1" /> + </panel> + </tab_container> </panel> 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 2cc9d9c1b0..50fd57494f 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -138,7 +138,7 @@ initial_value="1" layout="topleft" left_pad="0" - max_val="1.4" + max_val="1.5" min_val="0.75" name="ui_scale_slider" top_pad="-14" 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 27193a984f..bd096ebb88 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -1,242 +1,493 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - border="true" - follows="left|top|right|bottom" - height="408" - label="Text Chat" - layout="topleft" - left="102" - name="chat" - top="1" - width="517"> - <text - follows="left|top" - layout="topleft" - left="30" - height="12" - name="font_size" - width="120" - top="10"> - Font size: - </text> - <radio_group - height="30" - layout="topleft" - left="40" - control_name="ChatFontSize" - name="chat_font_size" - top_pad="0" - width="440"> - <radio_item - height="16" - label="Small" - layout="topleft" - left="0" - name="radio" - value="0" - top="10" - width="125" /> - <radio_item - height="16" - label="Medium" - layout="topleft" - left_delta="145" - name="radio2" - value="1" - top_delta="0" - width="125" /> - <radio_item - height="16" - label="Large" - layout="topleft" - left_delta="170" - name="radio3" - value="2" - top_delta="0" - width="125" /> - </radio_group> - + border="true" + has_border="true" + height="408" + label="Text Chat" + layout="topleft" + left="102" + name="chat" + top="1" + width="517"> + + <panel + border="false" + height="60" + layout="topleft" + top="10" + left="13" + width="517"> + <check_box - control_name="PlayTypingAnim" - height="16" - initial_value="true" - label="Play typing animation when chatting" - layout="topleft" - left="30" - name="play_typing_animation" - top_pad="10" - width="400" /> + control_name="PlayTypingAnim" + height="16" + initial_value="true" + label="Play typing animation when chatting" + layout="topleft" + top="0" + name="play_typing_animation" + width="330"> + </check_box> + <check_box - enabled="false" - height="16" - label="Email me IMs when I'm offline" - layout="topleft" - left_delta="0" - name="send_im_to_email" - top_pad="5" - width="400" /> + enabled="false" + height="16" + label="Email me IMs when I'm offline" + layout="topleft" + name="send_im_to_email" + top_pad="6" + width="330"> + </check_box> + <check_box - enabled="false" - height="16" - label="Enable plain text IM and chat history" - layout="topleft" - left_delta="0" - name="plain_text_chat_history" - top_pad="5" - width="400" /> + control_name="VoiceCallsFriendsOnly" + height="16" + label="Only friends and groups can call or IM me" + layout="topleft" + name="voice_call_friends_only_check" + top_pad="6" + width="350"> + </check_box> + + <text + layout="topleft" + left="345" + height="12" + name="font_size" + width="120" + top="0"> + Font size: + </text> + + <combo_box + control_name="ChatFontSize" + height="23" + layout="topleft" + left="341" + name="chat_font_size" + top_pad="5" + width="100"> + <item + label="Small" + name="Small" + value="0"/> + <item + label="Medium" + name="Medium" + value="1"/> + <item + label="Large" + name="Large" + value="2"/> + </combo_box> + <check_box - control_name="UseChatBubbles" - follows="left|top" - height="16" - label="Bubble Chat" - layout="topleft" - left_delta="0" - top_pad="5" - name="bubble_text_chat" - width="150" /> + control_name="UseChatBubbles" + height="16" + label="Bubble Chat" + layout="topleft" + top_pad="4" + name="bubble_text_chat" + width="330"> + </check_box> + + </panel> + + <panel + border="false" + height="165" + layout="topleft" + left="13" + width="517"> + <text - name="show_ims_in_label" - follows="left|top" - layout="topleft" - left="30" - height="20" - width="170" - top_pad="15"> - Show IMs in: + layout="topleft" + height="12" + name="notifications" + left="0" + width="120"> + Notifications </text> <text - name="requires_restart_label" - follows="left|top" - layout="topleft" - top_delta="0" - left="170" - height="20" - width="130" - text_color="White_25"> - (requires restart) - </text> - <radio_group - follows="left|top" - height="30" - left="40" - control_name="ChatWindow" - name="chat_window" - top_pad="0" - tool_tip="Show your Instant Messages in separate floaters, or in one floater with many tabs (Requires restart)" - width="150"> - <radio_item - height="16" - label="Separate Windows" - layout="topleft" - left="0" - name="radio" - value="0" - top="0" - width="150" /> - <radio_item - height="16" - label="Tabs" + layout="topleft" + height="12" + name="friend_ims" + width="145" + left="0" + top_pad="13"> + Friend IMs: + </text> + <combo_box + control_name="NotificationFriendIMOptions" + height="23" + layout="topleft" + left_pad="5" + top_delta="-6" + name="FriendIMOptions" + width="223"> + <item + label="Open Conversations window" + name="OpenConversationsWindow" + value="openconversations"/> + <item + label="Pop up the message" + name="PopUpMessage" + value="toast"/> + <item + label="Flash toolbar button" + name="FlashToolbarButton" + value="flash"/> + <item + label="None" + name="None" + value="none"/> + </combo_box> + <text + layout="topleft" + height="12" + name="non_friend_ims" + width="145" + left="0" + top_pad="9"> + Non-friend IMs: + </text> + <combo_box + control_name="NotificationNonFriendIMOptions" + height="23" + layout="topleft" + left_pad="5" + top_delta="-6" + name="NonFriendIMOptions" + width="223"> + <item + label="Open Conversations window" + name="OpenConversationsWindow" + value="openconversations"/> + <item + label="Pop up the message" + name="PopUpMessage" + value="toast"/> + <item + label="Flash toolbar button" + name="FlashToolbarButton" + value="flash"/> + <item + label="None" + name="None" + value="none"/> + </combo_box> + <text + layout="topleft" + left="0" + height="13" + name="conference_ims" + width="145" + top_pad="9"> + Conference IMs: + </text> + <combo_box + control_name="NotificationConferenceIMOptions" + height="23" + layout="topleft" + left_pad="5" + top_delta="-6" + name="ConferenceIMOptions" + width="223"> + <item + label="Open Conversations window" + name="OpenConversationsWindow" + value="openconversations"/> + <item + label="Pop up the message" + name="PopUpMessage" + value="toast"/> + <item + label="Flash toolbar button" + name="FlashToolbarButton" + value="flash"/> + <item + label="None" + name="None" + value="none"/> + </combo_box> + <text + layout="topleft" + left="0" + height="13" + name="group_chat" + width="145" + top_pad="9"> + Group chat: + </text> + <combo_box + control_name="NotificationGroupChatOptions" + height="23" + layout="topleft" + left_pad="5" + top_delta="-6" + name="GroupChatOptions" + width="223"> + <item + label="Open Conversations window" + name="OpenConversationsWindow" + value="openconversations"/> + <item + label="Pop up the message" + name="PopUpMessage" + value="toast"/> + <item + label="Flash toolbar button" + name="FlashToolbarButton" + value="flash"/> + <item + label="None" + name="None" + value="none"/> + </combo_box> + <text + layout="topleft" + left="0" + height="12" + name="nearby_chat" + width="145" + top_pad="9"> + Nearby chat: + </text> + <combo_box + control_name="NotificationNearbyChatOptions" + height="23" + layout="topleft" + left_pad="5" + top_delta="-6" + name="NearbyChatOptions" + width="223"> + <item + label="Open Conversations window" + name="OpenConversationsWindow" + value="openconversations"/> + <item + label="Pop up the message" + name="PopUpMessage" + value="toast"/> + <item + label="Flash toolbar button" + name="FlashToolBarButton" + value="flash"/> + <item + label="None" + name="None" + value="none"/> + </combo_box> + <text + layout="topleft" + left="0" + height="13" + name="notifications_alert" + width="500" + top_pad="9" + visible="true" + text_color="DrYellow"> + To temporarily stop all notifications, use Communicate > Do Not Disturb. + </text> + + </panel> + + <panel + border="false" + height="50" layout="topleft" - left_delta="0" - name="radio2" - value="1" - top_pad="5" - width="150" /> - </radio_group> + left="13" + top_pad="10" + width="517"> + <text - name="disable_toast_label" - follows="left|top" - layout="topleft" - top_pad="20" - left="30" - height="10" - width="400"> - Enable incoming chat popups: - </text> + layout="topleft" + left="0" + name="play_sound" + width="100" + top_pad="8" + visible="true"> + Play sound: + </text> + <check_box + control_name="PlaySoundNewConversation" + height="16" + label="New conversation" + layout="topleft" + left_pad="15" + top_pad="-10" + name="new_conversation" + width="150" /> <check_box - control_name="EnableGroupChatPopups" - name="EnableGroupChatPopups" - label="Group Chats" - layout="topleft" - top_pad="5" - left_delta="10" - height="20" - tool_tip="Check to see popups when a Group Chat message arrives" - width="400" /> + control_name="PlaySoundIncomingVoiceCall" + height="16" + label="Incoming voice call" + layout="topleft" + top_pad="6" + name="incoming_voice_call" + width="150" /> <check_box - control_name="EnableIMChatPopups" - name="EnableIMChatPopups" - label="IM Chats" - layout="topleft" - top_pad="5" - height="16" - tool_tip="Check to see popups when an instant message arrives" - width="400" /> - <spinner - control_name="NearbyToastLifeTime" - decimal_digits="0" - follows="left|top" - height="23" - increment="1" - initial_value="23" - label="Nearby chat toasts life time:" - label_width="285" - layout="topleft" - left="45" - max_val="60" - min_val="1" - name="nearby_toasts_lifetime" - top_pad="10" - width="325" /> - <spinner - control_name="NearbyToastFadingTime" - decimal_digits="0" - follows="left|top" - height="23" - increment="1" - initial_value="3" - label="Nearby chat toasts fading time:" - label_width="285" - layout="topleft" - left_delta="0" - max_val="60" - min_val="0" - name="nearby_toasts_fadingtime" - top_pad="3" - width="325" /> + control_name="PlaySoundTeleportOffer" + height="16" + label="Teleport offer" + layout="topleft" + left_pad="35" + top_pad="-38" + name="teleport_offer" + width="150" /> + <check_box + control_name="PlaySoundInventoryOffer" + height="16" + label="Inventory offer" + layout="topleft" + top_pad="6" + name="inventory_offer" + width="150" /> + + </panel> + + <view_border + bevel_style="none" + height="0" + layout="topleft" + left="13" + name="cost_text_border" + top_pad="5" + width="495"/> + + <panel + height="50" + layout="topleft" + left="13" + top_pad="10" + width="505"> + + <text + layout="topleft" + left="0" + text_color="White" + height="12" + top="5" + width="55"> + Save: + </text> + + <combo_box + enabled="false" + control_name="KeepConversationLogTranscripts" + height="23" + layout="topleft" + left_pad="5" + name="chat_font_size" + top="0" + width="165"> + <item + label="Log and transcripts" + value="2"/> + <item + label="Log only" + value="1"/> + <item + label="No log or transcripts" + value="0"/> + </combo_box> + + <button + enabled="false" + height="23" + label="Clear log..." + layout="topleft" + left_pad="5" + top="0" + name="clear_log" + width="110"> + <commit_callback + function="Pref.ClearLog" /> + </button> + + <button + enabled="false" + height="23" + label="Delete transcripts..." + layout="topleft" + left_pad="5" + top="0" + name="delete_transcripts" + width="147"> + <button.commit_callback + function="Pref.DeleteTranscripts" /> + </button> + + <text + layout="topleft" + left="0" + text_color="White" + height="12" + top_pad="15" + width="55"> + Location: + </text> + + <line_editor + control_name="InstantMessageLogPath" + border_style="line" + border_thickness="1" + font="SansSerif" + height="23" + layout="topleft" + left_pad="55" + max_length="4096" + name="log_path_string" + top_delta="-5" + width="185"> + </line_editor> + + <button + enabled="false" + follows="left|top" + height="23" + label="Browse..." + label_selected="Browse" + layout="topleft" + left_pad="5" + name="log_path_button" + top_delta="0" + width="112"> + <commit_callback function="Pref.LogPath" /> + </button> + + </panel> + <button - follows="left|top" - height="23" - label="Translation..." - layout="topleft" - left="30" - name="ok_btn" - top="-50" - width="170"> - <button.commit_callback - function="Pref.TranslationSettings" /> + height="23" + label="Translation..." + layout="topleft" + left="9" + name="ok_btn" + top="-29" + width="170"> + <commit_callback + function="Pref.TranslationSettings" /> </button> <button - follows="top|left" - height="23" - layout="topleft" - top_pad="-23" - left_pad="5" - name="autoreplace_showgui" - commit_callback.function="Pref.AutoReplace" - label="Auto-Replace..." - width="150"> + height="23" + layout="topleft" + top_pad="-23" + left_pad="5" + name="autoreplace_showgui" + commit_callback.function="Pref.AutoReplace" + label="Auto-Replace..." + width="150"> </button> <button - follows="top|left" - height="23" - layout="topleft" - top_pad="-23" - left_pad="5" - name="spellcheck_showgui" - commit_callback.function="Pref.SpellChecker" - label="Spell Checking..." - width="150"> + height="23" + layout="topleft" + top_pad="-23" + left_pad="5" + name="spellcheck_showgui" + commit_callback.function="Pref.SpellChecker" + label="Spell Checking..." + width="150"> </button> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml index 2b22f0d6e3..9e825fe516 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml @@ -362,7 +362,7 @@ follows="left|top" height="16" increment="0.01" - initial_value="0.8" + initial_value="1.0" layout="topleft" label_width="115" label="Active:" @@ -380,7 +380,7 @@ follows="left|top" height="16" increment="0.01" - initial_value="0.5" + initial_value="0.95" layout="topleft" label_width="115" label="Inactive:" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index 24882988b0..ea0f7d8593 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -409,10 +409,10 @@ name="text_box3" top_pad="3" width="240"> - Busy mode response: + Do Not Disturb response: </text> <text_editor - control_name="BusyModeResponse" + control_name="DoNotDisturbModeResponse" text_readonly_color="LabelDisabledColor" bg_writeable_color="LtGray" use_ellipses="false" @@ -421,7 +421,7 @@ height="29" layout="topleft" left="30" - name="busy_response" + name="do_not_disturb_response" width="470" word_wrap="true"> log_in_to_change diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index f7666bdc4c..cd243d40a4 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -55,30 +55,57 @@ name="LowGraphicsDivet" top_delta="-2" width="2" /> + <icon + color="0.12 0.12 0.12 1" + height="14" + image_name="Rounded_Square" + layout="topleft" + left_pad="41" + name="LowMidraphicsDivet" + top_delta="-2" + width="2" /> <icon color="0.12 0.12 0.12 1" height="14" image_name="Rounded_Square" layout="topleft" - left_pad="83" + left_pad="41" name="MidGraphicsDivet" top_delta="0" width="2" /> + <icon + color="0.12 0.12 0.12 1" + height="14" + image_name="Rounded_Square" + layout="topleft" + left_pad="41" + name="MidHighGraphicsDivet" + top_delta="0" + width="2" /> <icon color="0.12 0.12 0.12 1" height="14" image_name="Rounded_Square" layout="topleft" - left_pad="85" + left_pad="41" name="HighGraphicsDivet" top_delta="0" width="2" /> + <icon + color="0.12 0.12 0.12 1" + height="14" + image_name="Rounded_Square" + layout="topleft" + left_pad="41" + name="HighUltraGraphicsDivet" + top_delta="0" + width="2" /> <icon color="0.12 0.12 0.12 1" height="14" image_name="Rounded_Square" layout="topleft" - left_pad="83" + left_pad="41" name="UltraGraphicsDivet" top_delta="0" width="2" /> @@ -91,7 +118,7 @@ initial_value="0" layout="topleft" left="120" - max_val="3" + max_val="6" name="QualityPerformanceSelection" show_text="false" top_delta="-2" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index 587c461bee..78743d26bb 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -1,72 +1,69 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - border="true" - follows="left|top|right|bottom" - height="408" - label="Communication" - layout="topleft" - left="102" - name="im" - top="1" - width="517"> - <panel.string - name="log_in_to_change"> - log in to change - </panel.string> - <button - follows="left|bottom" - height="23" - label="Clear History" - tool_tip="Clear login image, last location, teleport history, web, and texture cache" - layout="topleft" - left="30" - name="clear_cache" - top="10" - width="145"> - <button.commit_callback - function="Pref.WebClearCache" /> - </button> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left_pad="10" - mouse_opaque="false" - name="cache_size_label_l" - top_delta="3" - text_color="LtGray_50" - width="300"> - (Locations, images, web, search history) - </text> - <check_box - height="16" - enabled="false" - label="Show me in Search results" - layout="topleft" - left="30" - name="online_searchresults" - top_pad="20" - width="350" /> - <check_box - height="16" - enabled="false" - label="Only friends and groups know I'm online" - layout="topleft" - left="30" - name="online_visibility" - top_pad="30" - width="350" /> - <check_box - control_name="VoiceCallsFriendsOnly" - height="16" - label="Only friends and groups can call or IM me" - layout="topleft" - left="30" - name="voice_call_friends_only_check" - top_pad="10" - width="350" /> + border="true" + follows="left|top|right|bottom" + height="408" + label="Communication" + layout="topleft" + left="102" + name="im" + top="1" + width="517"> + + <panel.string + name="log_in_to_change"> + log in to change + </panel.string> + + <button + follows="left|bottom" + height="23" + label="Clear History" + tool_tip="Clear login image, last location, teleport history, web, and texture cache" + layout="topleft" + left="30" + name="clear_cache" + top="10" + width="145"> + <button.commit_callback + function="Pref.WebClearCache" /> + </button> + + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="10" + mouse_opaque="false" + name="cache_size_label_l" + top_delta="3" + text_color="LtGray_50" + width="300"> + (Locations, images, web, search history) + </text> + + <check_box + height="16" + enabled="false" + label="Show me in Search results" + layout="topleft" + left="30" + name="online_searchresults" + top_pad="20" + width="350" /> + + <check_box + height="16" + enabled="false" + label="Only friends and groups know I'm online" + layout="topleft" + left="30" + name="online_visibility" + top_pad="30" + width="350" /> + <check_box enabled_control="EnableVoiceChat" control_name="AutoDisengageMic" @@ -87,100 +84,7 @@ name="favorites_on_login_check" top_pad="10" width="350" /> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left="30" - mouse_opaque="false" - name="Logs:" - top_pad="20" - width="350"> - Chat Logs: - </text> - <check_box - enabled="false" - control_name="LogNearbyChat" - height="16" - label="Save nearby chat logs on my computer" - layout="topleft" - left="30" - name="log_nearby_chat" - top_pad="10" - width="350"> - </check_box> - <check_box - enabled="false" - control_name="LogInstantMessages" - height="16" - label="Save IM logs on my computer" - layout="topleft" - left="30" - name="log_instant_messages" - top_pad="10" - width="350"> - </check_box> - <check_box - control_name="LogTimestamp" - enabled="false" - height="16" - label="Add timestamp to each line in chat log" - layout="topleft" - left_delta="0" - name="show_timestamps_check_im" - top_pad="10" - width="237" /> - <check_box - control_name="LogFileNamewithDate" - enabled="false" - height="16" - label="Add datestamp to log file name." - layout="topleft" - left_delta="5" - name="logfile_name_datestamp" - top_pad="10" - width="350"/> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left_delta="0" - mouse_opaque="false" - name="log_path_desc" - top_pad="30" - width="128"> - Location of logs: - </text> - <line_editor - bottom="366" - control_name="InstantMessageLogPath" - follows="top|left|right" - halign="right" - height="23" - layout="topleft" - left_delta="0" - mouse_opaque="false" - name="log_path_string" - top_pad="5" - width="250"/> - <button - enabled="false" - follows="right|bottom" - height="23" - label="Browse" - label_selected="Browse" - layout="topleft" - left_pad="5" - name="log_path_button" - top_delta="0" - width="145"> - <button.commit_callback - function="Pref.LogPath" /> - </button> + <button follows="left|bottom" height="23" diff --git a/indra/newview/skins/default/xui/en/panel_region_debug.xml b/indra/newview/skins/default/xui/en/panel_region_debug.xml index 4550603134..81b2281adb 100644 --- a/indra/newview/skins/default/xui/en/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/en/panel_region_debug.xml @@ -194,11 +194,11 @@ <button follows="left|top" height="20" - label="Delay Restart" + label="Cancel Restart" layout="topleft" left_pad="155" name="cancel_restart_btn" - tool_tip="Delay region restart by one hour" + tool_tip="Cancel region restart" top_delta="0" width="150" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index 8b2a6692d9..bcdef96138 100644 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -162,6 +162,7 @@ text_readonly_color="DkGray" width="487" show_line_numbers="true" + enable_tooltip_paste="true" word_wrap="true"> Loading... </text_editor> diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 3aa34439f1..dd2a0c6627 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -129,6 +129,5 @@ left_pad="5" top="2" name="volume_btn" - tool_tip="Global Volume Control" width="16" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml index 7b22b2cce1..6adede0362 100644 --- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -8,41 +8,289 @@ border="false" chrome="true" follows="bottom" - height="150" + height="155" layout="topleft" name="volumepulldown_floater" - width="32"> - <slider - control_name="AudioLevelMaster" - follows="left|top" - left="0" - top="1" - orientation="vertical" - height="120" - increment="0.05" - initial_value="0.5" - layout="topleft" - name="mastervolume" - show_text="false" - slider_label.halign="right" - top_pad="2" - volume="true"> - <slider.commit_callback - function="Vol.setControlFalse" - parameter="MuteAudio" /> - </slider> - <button - left="10" - top_pad="9" - width="12" - height="12" - follows="top|left" - name="prefs_btn" - image_unselected="Icon_Gear_Foreground" - image_disabled="Icon_Gear_Background" - image_pressed="Icon_Gear_Press" - scale_image="false"> - <button.commit_callback - function="Vol.GoAudioPrefs" /> - </button> + width="225"> + <slider + control_name="AudioLevelMaster" + follows="top|left" + font.style="BOLD" + height="15" + increment="0.025" + initial_value="0.5" + label="Master" + label_width="60" + left="10" + width="160" + layout="topleft" + name="System Volume" + show_text="false" + top="10" + volume="true"> + <slider.commit_callback + function="Pref.setControlFalse" + parameter="MuteAudio" /> + </slider> + <button + control_name="MuteAudio" + follows="top|left" + height="16" + image_selected="AudioMute_Off" + image_unselected="Audio_Off" + is_toggle="true" + layout="topleft" + left_pad="5" + name="mute_audio" + tab_stop="false" + width="16" /> + <slider + control_name="AudioLevelUI" + disabled_control="MuteAudio" + follows="left|top" + height="15" + increment="0.025" + initial_value="0.5" + label="Buttons" + label_width="60" + left="10" + width="160" + layout="topleft" + name="UI Volume" + show_text="false" + top_pad="4" + volume="true"> + <slider.commit_callback + function="Pref.setControlFalse" + parameter="MuteUI" /> + </slider> + <button + control_name="MuteUI" + disabled_control="MuteAudio" + follows="top|left" + height="16" + image_selected="AudioMute_Off" + image_unselected="Audio_Off" + is_toggle="true" + layout="topleft" + left_pad="5" + name="mute_audio" + tab_stop="false" + width="16" /> + <slider + control_name="AudioLevelAmbient" + disabled_control="MuteAudio" + follows="left|top" + height="15" + increment="0.025" + initial_value="0.5" + label="Ambient" + label_width="60" + left="10" + width="160" + layout="topleft" + name="Wind Volume" + show_text="false" + top_pad="4" + volume="true"> + <slider.commit_callback + function="Pref.setControlFalse" + parameter="MuteAmbient" /> + </slider> + <button + control_name="MuteAmbient" + disabled_control="MuteAudio" + follows="top|left" + height="16" + image_selected="AudioMute_Off" + image_unselected="Audio_Off" + is_toggle="true" + layout="topleft" + left_pad="5" + name="mute_audio" + tab_stop="false" + width="16" /> + <slider + control_name="AudioLevelSFX" + disabled_control="MuteAudio" + follows="left|top" + height="15" + increment="0.025" + initial_value="0.5" + label="Sounds" + label_width="60" + left="10" + width="160" + layout="topleft" + name="SFX Volume" + show_text="false" + top_pad="4" + volume="true"> + <slider.commit_callback + function="Pref.setControlFalse" + parameter="MuteSounds" /> + </slider> + <button + control_name="MuteSounds" + disabled_control="MuteAudio" + follows="top|left" + height="16" + image_selected="AudioMute_Off" + image_unselected="Audio_Off" + is_toggle="true" + layout="topleft" + left_pad="5" + name="mute_audio" + tab_stop="false" + width="16"> + <button.commit_callback + function="Pref.SetSounds"/> + </button> + <check_box + name="gesture_audio_play_btn" + control_name="EnableGestureSounds" + disabled_control="MuteAudio" + height="16" + layout="topleft" + left_pad="5" + tool_tip="Enable sounds from gestures" + top_delta="2" + width="350"/> + <slider + control_name="AudioLevelMusic" + disabled_control="MuteAudio" + follows="left|top" + height="15" + increment="0.025" + initial_value="0.5" + label="Music" + label_width="60" + left="10" + width="160" + layout="topleft" + name="Music Volume" + show_text="false" + top_pad="4" + volume="true"> + <slider.commit_callback + function="Pref.setControlFalse" + parameter="MuteMusic" /> + </slider> + <button + control_name="MuteMusic" + disabled_control="MuteAudio" + follows="top|left" + height="16" + image_selected="AudioMute_Off" + image_unselected="Audio_Off" + is_toggle="true" + layout="topleft" + left_pad="5" + name="mute_audio" + tab_stop="false" + width="16" /> + <check_box + control_name="AudioStreamingMusic" + height="16" + tool_tip="Enable Streaming Music" + layout="topleft" + left_pad="5" + name="enable_music" + top_delta="2" + width="350"> + <check_box.commit_callback + function="Pref.updateMediaAutoPlayCheckbox"/> + </check_box> + <slider + control_name="AudioLevelMedia" + disabled_control="MuteAudio" + follows="left|top" + height="16" + increment="0.025" + initial_value="0.5" + label="Media" + label_width="60" + left="10" + width="160" + layout="topleft" + name="Media Volume" + show_text="false" + top_pad="4" + volume="true"> + <slider.commit_callback + function="Pref.setControlFalse" + parameter="MuteMedia" /> + </slider> + <button + control_name="MuteMedia" + disabled_control="MuteAudio" + follows="top|left" + height="16" + image_selected="AudioMute_Off" + image_unselected="Audio_Off" + is_toggle="true" + layout="topleft" + left_pad="5" + name="mute_audio" + tab_stop="false" + width="16" /> + <check_box + label_text.halign="left" + follows="left|top" + height="16" + control_name ="AudioStreamingMedia" + tool_tip="Enable Streaming Media" + layout="topleft" + top_delta="2" + left_pad="5" + name="enable_media" + width="110"> + <check_box.commit_callback + function="Pref.updateMediaAutoPlayCheckbox"/> + </check_box> + <slider + control_name="AudioLevelVoice" + disabled_control="MuteAudio" + follows="left|top" + height="16" + increment="0.025" + initial_value="0.5" + label="Voice" + label_width="60" + left="10" + width="160" + layout="topleft" + top_pad="4" + name="Voice Volume" + show_text="false" + volume="true"> + <slider.commit_callback + function="Pref.setControlFalse" + parameter="MuteVoice" /> + </slider> + <button + control_name="MuteVoice" + disabled_control="MuteAudio" + follows="top|left" + height="16" + image_selected="AudioMute_Off" + image_unselected="Audio_Off" + is_toggle="true" + layout="topleft" + left_pad="5" + name="mute_audio" + tab_stop="false" + width="16" /> + <check_box + label_text.halign="left" + follows="left|top" + height="16" + control_name ="EnableVoiceChat" + disabled_control="CmdLineDisableVoice" + tool_tip="Enable Voice Chat" + layout="topleft" + top_delta="2" + left_pad="5" + name="enable_voice_check" + width="110"/> </panel> diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index 54a312bd59..c5dfb703e5 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -11,6 +11,10 @@ name="unknown"> (unknown) </panel.string> + <panel.string + name="unknown_multiple"> + (unknown / multiple) + </panel.string> <panel.string name="public"> (public) diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index e69a17e037..6ee8fc3a4c 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -292,6 +292,10 @@ label="Open" name="Open" value="Open" /> + <combo_box.item + label="Zoom" + name="Zoom" + value="Zoom" /> </combo_box> <panel border="false" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index d5186e4c1b..5aa743b32d 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -59,7 +59,7 @@ <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> - <string name="create_account_url">http://join.secondlife.com/</string> + <string name="create_account_url">http://join.secondlife.com/?sourceid=[sourceid]</string> <string name="LoginFailedViewerNotPermitted"> The viewer you are using can no longer access Second Life. Please visit the following page to download a new viewer: @@ -295,7 +295,7 @@ Please try logging in again in a minute.</string> <!-- llvoavatar. Displayed in the avatar chat bubble --> <string name="AvatarEditingAppearance">(Editing Appearance)</string> <string name="AvatarAway">Away</string> - <string name="AvatarBusy">Busy</string> + <string name="AvatarDoNotDisturb">Do Not Disturb</string> <string name="AvatarMuted">Blocked</string> <!-- animations --> @@ -384,6 +384,8 @@ Please try logging in again in a minute.</string> <string name="ST_NO_JOINT">Can't find ROOT or JOINT.</string> <!-- Chat --> + <string name="NearbyChatTitle">Nearby chat</string> + <string name="NearbyChatLabel">(Nearby chat)</string> <string name="whisper">whispers:</string> <string name="shout">shouts:</string> <string name="ringing">Connecting to in-world Voice Chat...</string> @@ -405,8 +407,9 @@ Please try logging in again in a minute.</string> <string name="ChangePermissions">Change its permissions</string> <string name="TrackYourCamera">Track your camera</string> <string name="ControlYourCamera">Control your camera</string> + <string name="NotConnected">Not Connected</string> + <string name="AgentNameSubst">(You)</string> <!-- Substitution for agent name --> <string name="TeleportYourAgent">Teleport you</string> - <string name="NotConnected">Not Connected</string> <!-- Sim Access labels --> <string name="SIM_ACCESS_PG">General</string> @@ -1447,7 +1450,7 @@ integer llScriptDanger(vector pos) Returns TRUE if pos is over public land, sandbox land, land that doesn't allow everyone to edit and build, or land that doesn't allow outside scripts </string> <string name="LSLTipText_llDialog" translate="false"> -llDialog(key avatar, string message, list buttons, integer chat_channel +llDialog(key avatar, string message, list buttons, integer chat_channel) Shows a dialog box on the avatar's screen with a message and up to 12 buttons. If a button is pressed, the avatar says the text of the button label on chat_channel. </string> @@ -2071,12 +2074,6 @@ For AI Character: Get the closest navigable point to the point provided. </string> - <!-- Avatar busy/away mode --> - <string name="AvatarSetNotAway">Not Away</string> - <string name="AvatarSetAway">Away</string> - <string name="AvatarSetNotBusy">Not Busy</string> - <string name="AvatarSetBusy">Busy</string> - <!-- Wearable Types --> <string name="shape">Shape</string> <string name="skin">Skin</string> @@ -2270,16 +2267,22 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale <string name="InvFolder Gestures">Gestures</string> <string name="InvFolder Favorite">My Favorites</string> <!-- historically default name of the Favorites folder can start from either "f" or "F" letter. - We should localize both of them with the same value --> + Also, it can be written as "Favorite" or "Favorites". + We should localize all variants of them with the same value --> <string name="InvFolder favorite">My Favorites</string> + <string name="InvFolder Favorites">My Favorites</string> + <string name="InvFolder favorites">My Favorites</string> <string name="InvFolder Current Outfit">Current Outfit</string> <string name="InvFolder Initial Outfits">Initial Outfits</string> <string name="InvFolder My Outfits">My Outfits</string> <string name="InvFolder Accessories">Accessories</string> <string name="InvFolder Meshes">Meshes</string> + <string name="InvFolder Received Items">Received Items</string> + <string name="InvFolder Merchant Outbox">Merchant Outbox</string> <!-- are used for Friends and Friends/All folders in Inventory "Calling cards" folder. See EXT-694--> <string name="InvFolder Friends">Friends</string> + <string name="InvFolder Received Items">Received Items</string> <string name="InvFolder All">All</string> <string name="no_attachments">No attachments worn</string> @@ -2520,7 +2523,7 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale <string name="PanelContentsNewScript">New Script</string> <!-- panel preferences general --> - <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> + <string name="DoNotDisturbModeResponseDefault">This resident has turned on 'Do Not Disturb' and will see your message later.</string> <!-- Mute --> <string name="MuteByName">(By name)</string> @@ -2579,9 +2582,6 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale <string name="GroupMoneyDebits">Debits</string> <string name="GroupMoneyDate">[weekday,datetime,utc] [mth,datetime,utc] [day,datetime,utc], [year,datetime,utc]</string> - <!-- viewer object --> - <string name="ViewerObjectContents">Contents</string> - <!-- Viewer menu --> <string name="AcquiredItems">Acquired Items</string> <string name="Cancel">Cancel</string> @@ -3326,7 +3326,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="LocationCtrlAdultIconTooltip">Adult Region</string> <string name="LocationCtrlModerateIconTooltip">Moderate Region</string> <string name="LocationCtrlGeneralIconTooltip">General Region</string> - <string name="LocationCtrlSeeAVsTooltip">Avatars visible and chat allowed outside of this parcel</string> + <string name="LocationCtrlSeeAVsTooltip">Avatars inside this parcel cannot be seen or heard by avatars outside this parcel</string> <string name="LocationCtrlPathfindingDirtyTooltip">Objects that move may not behave correctly in this region until the region is rebaked.</string> <string name="LocationCtrlPathfindingDisabledTooltip">Dynamic pathfinding is not enabled on this region.</string> <!-- Strings used by the (currently Linux) auto-updater app --> @@ -3377,12 +3377,15 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="IM_moderator_label">(Moderator)</string> <string name="Saved_message">(Saved [LONG_TIMESTAMP])</string> <string name="IM_unblock_only_groups_friends">To see this message, you must uncheck 'Only friends and groups can call or IM me' in Preferences/Privacy.</string> + <string name="OnlineStatus">Online</string> + <string name="OfflineStatus">Offline</string> <!-- voice calls --> <string name="answered_call">Your call has been answered</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="you_auto_rejected_call-im">You automatically rejected the voice call while 'Do Not Disturb' was on.</string> + <string name="name_started_call">[NAME] started a voice call</string> <string name="ringing-im"> Joining voice call... @@ -3397,7 +3400,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Connecting... </string> <string name="conference-title"> - Ad-hoc Conference + Multi-person chat </string> <string name="conference-title-incoming"> Conference with [AGENT_NAME] @@ -3823,6 +3826,7 @@ Try enclosing path to the editor with double quotes. <string name="Command_Avatar_Label">Avatar</string> <string name="Command_Build_Label">Build</string> <string name="Command_Chat_Label">Chat</string> + <string name="Command_Conversations_Label">Conversations</string> <string name="Command_Compass_Label">Compass</string> <string name="Command_Destinations_Label">Destinations</string> <string name="Command_Gestures_Label">Gestures</string> @@ -3849,6 +3853,7 @@ Try enclosing path to the editor with double quotes. <string name="Command_Avatar_Tooltip">Choose a complete avatar</string> <string name="Command_Build_Tooltip">Building objects and reshaping terrain</string> <string name="Command_Chat_Tooltip">Chat with people nearby using text</string> + <string name="Command_Conversations_Tooltip">Converse with everyone</string> <string name="Command_Compass_Tooltip">Compass</string> <string name="Command_Destinations_Tooltip">Destinations of interest</string> <string name="Command_Gestures_Tooltip">Gestures for your avatar</string> @@ -3903,4 +3908,15 @@ Try enclosing path to the editor with double quotes. <!-- Spell check settings floater --> <string name="UserDictionary">[User]</string> + <!-- Conversation log messages --> + <string name="logging_calls_disabled_log_empty"> + Conversations are not being logged. To begin keeping a log, choose "Save: Log only" or "Save: Log and transcripts" under Preferences > Chat. + </string> + <string name="logging_calls_disabled_log_not_empty"> + No more conversations will be logged. To resume keeping a log, choose "Save: Log only" or "Save: Log and transcripts" under Preferences > Chat. + </string> + <string name="logging_calls_enabled_log_empty"> + There are no logged conversations. After you contact someone, or someone contacts you, a log entry will be shown here. + </string> + </strings> diff --git a/indra/newview/skins/default/xui/en/widgets/chat_editor.xml b/indra/newview/skins/default/xui/en/widgets/chat_editor.xml new file mode 100644 index 0000000000..f9facb593a --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/chat_editor.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<chat_editor + name="chat_editor" + show_context_menu="true"/> diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_im_adhoc.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_im_adhoc.xml deleted file mode 100644 index 0e29ed0d0b..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/chiclet_im_adhoc.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<chiclet_im_adhoc - height="23" - name="im_adhoc_chiclet" - show_speaker="false" - width="25"> - <chiclet_im_adhoc.chiclet_button - height="25" - image_selected="PushButton_On" - image_unselected="PushButton_Off" - name="chiclet_button" - tab_stop="false" - width="25" /> - <chiclet_im_adhoc.speaker - image_mute="Parcel_VoiceNo_Light" - image_off="VoicePTT_Off_Dark" - image_on="VoicePTT_On_Dark" - image_level_1="VoicePTT_Lvl1_Dark" - image_level_2="VoicePTT_Lvl2_Dark" - image_level_3="VoicePTT_Lvl3_Dark" - auto_update="true" - draw_border="false" - height="24" - left="25" - bottom="1" - name="speaker" - visible="false" - width="20" /> - <chiclet_im_adhoc.avatar_icon - bottom="3" - follows="left|top|bottom" - height="20" - left="2" - mouse_opaque="false" - name="adhoc_icon" - width="21" /> - <chiclet_im_adhoc.unread_notifications - halign="center" - height="23" - left="25" - mouse_opaque="false" - name="unread" - text_color="white" - v_pad="3" - visible="false" - width="20" /> - <chiclet_im_adhoc.new_message_icon - bottom="11" - height="14" - image_name="Unread_Chiclet" - left="12" - name="new_message_icon" - visible="false" - width="14" /> -</chiclet_im_adhoc>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_im_group.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_im_group.xml deleted file mode 100644 index 77011139bf..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/chiclet_im_group.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<chiclet_im_group - height="23" - name="im_group_chiclet" - show_speaker="false" - width="25"> - <chiclet_im_group.chiclet_button - height="25" - image_selected="PushButton_On" - image_unselected="PushButton_Off" - name="chiclet_button" - tab_stop="false" - width="25" /> - <chiclet_im_group.speaker - image_mute="Parcel_VoiceNo_Light" - image_off="VoicePTT_Off_Dark" - image_on="VoicePTT_On_Dark" - image_level_1="VoicePTT_Lvl1_Dark" - image_level_2="VoicePTT_Lvl2_Dark" - image_level_3="VoicePTT_Lvl3_Dark" - auto_update="true" - draw_border="false" - height="24" - left="25" - bottom="1" - name="speaker" - visible="false" - width="20" /> - <chiclet_im_group.group_icon - bottom="3" - default_icon="Generic_Group" - follows="left|top|bottom" - height="20" - left="2" - mouse_opaque="false" - name="group_icon" - width="21" /> - <chiclet_im_group.unread_notifications - height="23" - halign="center" - left="25" - mouse_opaque="false" - name="unread" - text_color="white" - v_pad="3" - visible="false" - width="20"/> - <chiclet_im_group.new_message_icon -bottom="11" - height="14" - image_name="Unread_Chiclet" - left="12" - name="new_message_icon" - visible="false" - width="14" /> -</chiclet_im_group>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml deleted file mode 100644 index 8b56a8f0f6..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<chiclet_im_p2p - height="23" - name="im_p2p_chiclet" - show_speaker="false" - width="25"> - <chiclet_im_p2p.chiclet_button - height="25" - image_selected="PushButton_On" - image_unselected="PushButton_Off" - name="chiclet_button" - tab_stop="false" - width="25"/> - <chiclet_im_p2p.speaker - image_mute="Parcel_VoiceNo_Light" - image_off="VoicePTT_Off_Dark" - image_on="VoicePTT_On_Dark" - image_level_1="VoicePTT_Lvl1_Dark" - image_level_2="VoicePTT_Lvl2_Dark" - image_level_3="VoicePTT_Lvl3_Dark" - auto_update="true" - draw_border="false" - height="24" - left="25" - bottom="1" - name="speaker" - visible="false" - width="20" /> - <chiclet_im_p2p.avatar_icon - bottom="3" - color="white" - follows="left|top|bottom" - height="20" - left="2" - mouse_opaque="false" - name="avatar_icon" - width="21" /> - <chiclet_im_p2p.unread_notifications - height="23" - halign="center" - left="25" - mouse_opaque="false" - name="unread" - text_color="white" - v_pad="3" - visible="false" - width="20"/> - <chiclet_im_p2p.new_message_icon - bottom="11" - height="14" - image_name="Unread_Chiclet" - left="12" - name="new_message_icon" - visible="false" - width="14" /> -</chiclet_im_p2p> diff --git a/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml new file mode 100755 index 0000000000..b83d9122f7 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<conversation_view_participant + folder_arrow_image="Folder_Arrow" + item_height="24" + item_top_pad="0" + selection_image="Rounded_Square" + mouse_opaque="true" + follows="left|top|right" + left_pad="0" + icon_pad="10" + icon_width="20" + text_pad="7" + text_pad_right="4" + arrow_size="12" + max_folder_item_overlap="2" +> +<avatar_icon + follows="left" + height="20" + default_icon_name="Generic_Person" + layout="topleft" + top="2" + width="20" /> +<info_button + follows="right" + height="16" + image_pressed="Info_Press" + image_unselected="Info_Over" + right="-28" + name="info_btn" + width="16" /> +<output_monitor + follows="right" + auto_update="true" + draw_border="false" + height="16" + right="-3" + mouse_opaque="true" + name="speaking_indicator" + visible="true" + width="20" /> +</conversation_view_participant> diff --git a/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml b/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml new file mode 100644 index 0000000000..b8c39eec1d --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<conversation_view_session + folder_arrow_image="Folder_Arrow" + folder_indentation="8" + item_height="24" + item_top_pad="4" + selection_image="Rounded_Square" + mouse_opaque="true" + follows="left|top|right" + left_pad="5" + icon_pad="2" + icon_width="16" + text_pad="1" + text_pad_right="4" + arrow_size="12" + max_folder_item_overlap="2"/> diff --git a/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml b/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml index 6fa74f403d..bbd53ccb12 100644 --- a/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml @@ -7,4 +7,10 @@ selection_image="Rounded_Square" mouse_opaque="true" follows="left|top|right" - /> + left_pad="5" + icon_pad="2" + icon_width="16" + text_pad="1" + text_pad_right="4" + arrow_size="12" + max_folder_item_overlap="2"/> diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml index 77d8024cb2..590a4730a9 100644 --- a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml +++ b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml @@ -5,7 +5,13 @@ item_height="20" item_top_pad="4" selection_image="Rounded_Square" - > + left_pad="5" + icon_pad="2" + icon_width="16" + text_pad="1" + text_pad_right="4" + arrow_size="12" + max_folder_item_overlap="2"> <new_badge label="New" label_offset_horiz="-1" diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml b/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml index 830c27bdac..d5b10e7f51 100644 --- a/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml +++ b/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml @@ -1,2 +1,3 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<inbox_inventory_panel show_load_status="false" /> +<inbox_inventory_panel show_load_status="false" + start_folder.type="inbox"/> diff --git a/indra/newview/skins/default/xui/en/widgets/outbox_folder_view_folder.xml b/indra/newview/skins/default/xui/en/widgets/outbox_folder_view_folder.xml deleted file mode 100644 index d19c47f54f..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/outbox_folder_view_folder.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<outbox_folder_view_folder - folder_arrow_image="Folder_Arrow" - folder_indentation="8" - item_height="20" - item_top_pad="4" - selection_image="Rounded_Square" - > -</outbox_folder_view_folder> diff --git a/indra/newview/skins/default/xui/en/widgets/outbox_inventory_panel.xml b/indra/newview/skins/default/xui/en/widgets/outbox_inventory_panel.xml deleted file mode 100644 index 3964569da2..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/outbox_inventory_panel.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<outbox_inventory_panel show_empty_message="false" show_load_status="false" /> diff --git a/indra/newview/skins/default/xui/en/widgets/text.xml b/indra/newview/skins/default/xui/en/widgets/text.xml index 134f2d7522..2102074674 100644 --- a/indra/newview/skins/default/xui/en/widgets/text.xml +++ b/indra/newview/skins/default/xui/en/widgets/text.xml @@ -9,6 +9,7 @@ h_pad="0" allow_scroll="false" text_readonly_color="LabelTextColor" + text_tentative_color="TextFgTentativeColor" bg_writeable_color="FloaterDefaultBackgroundColor" use_ellipses="false" bg_visible="false" diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml index 0aa478ace9..0ace37a5dc 100644 --- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml +++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml @@ -30,9 +30,9 @@ image_overlay_alignment="left" use_ellipses="true" auto_resize="true" - button_flash_count="99999" - button_flash_rate="1.0" - flash_color="EmphasisColor"/> + button_flash_count="4" + button_flash_rate="0.5" + flash_color="BeaconColor"/> <button_icon pad_left="10" pad_right="10" image_bottom_pad="10" @@ -51,7 +51,7 @@ chrome="true" use_ellipses="true" auto_resize="true" - button_flash_count="99999" - button_flash_rate="1.0" - flash_color="EmphasisColor"/> + button_flash_count="4" + button_flash_rate="0.5" + flash_color="BeaconColor"/> </toolbar> diff --git a/indra/newview/skins/default/xui/es/floater_about.xml b/indra/newview/skins/default/xui/es/floater_about.xml index 307b61133f..3696c7e12c 100644 --- a/indra/newview/skins/default/xui/es/floater_about.xml +++ b/indra/newview/skins/default/xui/es/floater_about.xml @@ -66,27 +66,26 @@ Versión del servidor de voz: [VOICE_VERSION] </panel> <panel label="Licencias" name="licenses_panel"> <text_editor name="credits_editor"> - 3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion - APR Copyright (C) 2000-2004 The Apache Software Foundation - Collada DOM Copyright 2005 Sony Computer Entertainment Inc. - cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se) + 3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion + APR Copyright (C) 2011 The Apache Software Foundation + Collada DOM Copyright 2006 Sony Computer Entertainment Inc. + cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se) DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc. expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. - FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org). + FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg. GL Copyright (C) 1999-2004 Brian Paul. GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University and David Luebke, Brenden Schubert, University of Virginia. google-perftools Copyright (c) 2005, Google Inc. Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited. jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW) jpeglib Copyright (C) 1991-1998, Thomas G. Lane. - ogg/vorbis Copyright (C) 2001, Xiphophorus - OpenSSL Copyright (C) 1998-2002 The OpenSSL Project. - PCRE Copyright (c) 1997-2008 University of Cambridge + ogg/vorbis Copyright (C) 2002, Xiphophorus + OpenSSL Copyright (C) 1998-2008 The OpenSSL Project. + PCRE Copyright (c) 1997-2012 University of Cambridge SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) xmlrpc-epi Copyright (C) 2000 Epinions, Inc. - zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler. - google-perftools Copyright (c) 2005, Google Inc. + zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler. El visor de Second Life usa Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (y sus licenciadores). Reservados todos los derechos. Vea los detalles en www.havok.com. 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 fd54d74af2..f8c40d798a 100644 --- a/indra/newview/skins/default/xui/es/floater_about_land.xml +++ b/indra/newview/skins/default/xui/es/floater_about_land.xml @@ -465,7 +465,7 @@ los media: Permitir únicamente el acceso a los Residentes que: </text> <check_box label="Han aportado información de pago [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="Para poder acceder a esta parcela los Residentes deben haber aportado información de pago en su cuenta. Para más información, ver [SUPPORT_SITE]."/> - <check_box label="Han verificado su edad [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Para poder acceder a esta parcela los Residentes deben haber verificado su edad. Para más información, ver [SUPPORT_SITE]."/> + <check_box label="Son mayores de 18 años [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Para poder acceder a esta parcela los Residentes deben ser mayores de 18 años. Para más información, consulta [SUPPORT_SITE]."/> <check_box label="Acceso permitido al grupo: [GROUP]" name="GroupCheck" tool_tip="Elija el grupo en la pestaña General."/> <check_box label="Vender pases a:" name="PassCheck" tool_tip="Permitir acceso temporal a esta parcela"/> <combo_box name="pass_combo"> diff --git a/indra/newview/skins/default/xui/es/floater_animation_preview.xml b/indra/newview/skins/default/xui/es/floater_animation_preview.xml deleted file mode 100644 index d57405f7e5..0000000000 --- a/indra/newview/skins/default/xui/es/floater_animation_preview.xml +++ /dev/null @@ -1,187 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Animation Preview" title=""> - <floater.string name="failed_to_initialize"> - Fallo al iniciar el movimiento - </floater.string> - <floater.string name="anim_too_long"> - El archivo de la animación dura [LENGTH] segundos. - -La duración máxima de una animación es de [MAX_LENGTH] segundos. - </floater.string> - <floater.string name="failed_file_read"> - No se ha podido leer el archivo de la animación. - -[STATUS] - </floater.string> - <floater.string name="E_ST_OK"> - OK - </floater.string> - <floater.string name="E_ST_EOF"> - Fin prematuro del archivo. - </floater.string> - <floater.string name="E_ST_NO_CONSTRAINT"> - No se puede leer la definición de la restricción. - </floater.string> - <floater.string name="E_ST_NO_FILE"> - No se puede abrir el archivo BVH. - </floater.string> - <floater.string name="E_ST_NO_HIER"> - 'HIERARCHY header' inválido. - </floater.string> - <floater.string name="E_ST_NO_JOINT"> - No se pueden encontrar 'ROOT' o 'JOINT'. - </floater.string> - <floater.string name="E_ST_NO_NAME"> - No se puede obtener el nombre 'JOINT'. - </floater.string> - <floater.string name="E_ST_NO_OFFSET"> - No se puede encontrar 'OFFSET'. - </floater.string> - <floater.string name="E_ST_NO_CHANNELS"> - No se puede encontrar 'CHANNELS'. - </floater.string> - <floater.string name="E_ST_NO_ROTATION"> - No se puede conseguir el orden de la rotación. - </floater.string> - <floater.string name="E_ST_NO_AXIS"> - No se puede encontrar el eje de rotación. - </floater.string> - <floater.string name="E_ST_NO_MOTION"> - No se puede encontrar 'MOTION'. - </floater.string> - <floater.string name="E_ST_NO_FRAMES"> - No se puede conseguir el número de frames. - </floater.string> - <floater.string name="E_ST_NO_FRAME_TIME"> - No se puede conseguir el tiempo del frame. - </floater.string> - <floater.string name="E_ST_NO_POS"> - No se pueden conseguir los valores de la posición. - </floater.string> - <floater.string name="E_ST_NO_ROT"> - No se pueden conseguir los valores de la rotación. - </floater.string> - <floater.string name="E_ST_NO_XLT_FILE"> - No se puede abrir el archivo de traducción. - </floater.string> - <floater.string name="E_ST_NO_XLT_HEADER"> - No se puede leer el encabezamiento de la traducción. - </floater.string> - <floater.string name="E_ST_NO_XLT_NAME"> - No se puede leer la traducción de los nombres. - </floater.string> - <floater.string name="E_ST_NO_XLT_IGNORE"> - No se puede leer la traducción de los valores ignorados. - </floater.string> - <floater.string name="E_ST_NO_XLT_RELATIVE"> - No se puede leer el valor relativo de la traducción. - </floater.string> - <floater.string name="E_ST_NO_XLT_OUTNAME"> - No se puede leer la traducción del valor 'outname' - </floater.string> - <floater.string name="E_ST_NO_XLT_MATRIX"> - No se puede leer la matriz de traducciones. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGECHILD"> - No se puede conseguir el nombre 'mergechild'. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGEPARENT"> - No se puede conseguir el nombre 'mergeparent'. - </floater.string> - <floater.string name="E_ST_NO_XLT_PRIORITY"> - No se puede obtener el valor prioritario. - </floater.string> - <floater.string name="E_ST_NO_XLT_LOOP"> - No se puede conseguir el valor del bucle. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEIN"> - No se pueden conseguir los valores 'easeIn'. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEOUT"> - No se pueden conseguir los valores 'easeOut'. - </floater.string> - <floater.string name="E_ST_NO_XLT_HAND"> - No se puede conseguir el valor de 'hand morph'. - </floater.string> - <floater.string name="E_ST_NO_XLT_EMOTE"> - No se puede leer el nombre del gesto. - </floater.string> - <floater.string name="E_ST_BAD_ROOT"> - Nombre incorrecto de 'root joint', usa "hip". - </floater.string> - <text name="name_label"> - Nombre: - </text> - <text name="description_label"> - Descripción: - </text> - <spinner label="Prioridad:" name="priority" tool_tip="Controla qué otras animaciones pueden ser anuladas por ésta"/> - <check_box label="Bucle:" name="loop_check" tool_tip="Hace esta animación en bucle"/> - <spinner label="Empieza(%)" name="loop_in_point" tool_tip="Indica el punto en el que la animación vuelve a empezar"/> - <spinner label="Acaba(%)" name="loop_out_point" tool_tip="Indica el punto en el que la animación acaba el bucle"/> - <text name="hand_label"> - Posición de las manos - </text> - <combo_box name="hand_pose_combo" tool_tip="Controla qué hacen las manos durante la animación"> - <combo_box.item label="Extendidas" name="Spread"/> - <combo_box.item label="Relajadas" name="Relaxed"/> - <combo_box.item label="Ambas señalan" name="PointBoth"/> - <combo_box.item label="Puño" name="Fist"/> - <combo_box.item label="La izq. relajada" name="RelaxedLeft"/> - <combo_box.item label="La izq. señala" name="PointLeft"/> - <combo_box.item label="Puño izq." name="FistLeft"/> - <combo_box.item label="La der. relajada" name="RelaxedRight"/> - <combo_box.item label="La der. señala" name="PointRight"/> - <combo_box.item label="Puño der." name="FistRight"/> - <combo_box.item label="La derecha saluda" name="SaluteRight"/> - <combo_box.item label="Escribiendo" name="Typing"/> - <combo_box.item label="'Paz' en la der." name="PeaceRight"/> - </combo_box> - <text name="emote_label"> - Expresión - </text> - <combo_box name="emote_combo" tool_tip="Controla qué hace la cara durante la animación"> - <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."> - <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"/> - <button bottom_delta="-32" name="play_btn" tool_tip="Ejecutar tu animación"/> - <button name="pause_btn" tool_tip="Pausar tu animación"/> - <button label="" name="stop_btn" tool_tip="Parar la repetición de la animación"/> - <slider label="" name="playback_slider"/> - <text name="bad_animation_text"> - No se ha podido leer el archivo de la animación. - -Recomendamos usar archivos BVH exportados de Poser 4. - </text> - <button label="Subir ([AMOUNT] L$)" name="ok_btn"/> - <button label="Cancelar" name="cancel_btn"/> -</floater> diff --git a/indra/newview/skins/default/xui/es/floater_autoreplace.xml b/indra/newview/skins/default/xui/es/floater_autoreplace.xml new file mode 100644 index 0000000000..15abccc376 --- /dev/null +++ b/indra/newview/skins/default/xui/es/floater_autoreplace.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="autoreplace_floater" title="Configuración de reemplazo automático"> + <check_box label="Habilitar el reemplazo automático" name="autoreplace_enable" tool_tip="Al escribir el texto del chat, reemplaza las palabras clave especificadas con la sustitución correspondiente"/> + <button label="Importar lista..." name="autoreplace_import_list" tool_tip="Carga una lista previamente exportada desde un archivo."/> + <button label="Exportar lista..." name="autoreplace_export_list" tool_tip="Guarda la lista seleccionada en un archivo para poder compartirla."/> + <button label="Lista nueva..." name="autoreplace_new_list" tool_tip="Crea una lista nueva."/> + <button label="Eliminar lista" name="autoreplace_delete_list" tool_tip="Elimina la lista seleccionada."/> + <button name="autoreplace_list_up" tool_tip="Aumenta la prioridad de esta lista."/> + <button name="autoreplace_list_down" tool_tip="Baja la prioridad de esta lista."/> + <scroll_list name="autoreplace_list_replacements"> + <scroll_list.columns label="Palabra clave" name="keyword"/> + <scroll_list.columns label="Reemplazo" name="replacement"/> + </scroll_list> + <button label="Añadir..." name="autoreplace_add_entry"/> + <button label="Eliminar" name="autoreplace_delete_entry"/> + <button label="Guardar entrada" name="autoreplace_save_entry" tool_tip="Guarda esta entrada."/> + <button label="Guardar cambios" name="autoreplace_save_changes" tool_tip="Guarda todos los cambios."/> + <button label="Cancelar" name="autoreplace_cancel" tool_tip="Descarta todos los cambios."/> +</floater> +<!-- + <text + top_pad="10" + left="10" + height="16" + width="260" + follows="left|top" + halign="center" + mouse_opaque="true" + name="autoreplace_text2"> + Entries + </text> +--> diff --git a/indra/newview/skins/default/xui/es/floater_chat_bar.xml b/indra/newview/skins/default/xui/es/floater_chat_bar.xml index 2e94805057..02369c9a43 100644 --- a/indra/newview/skins/default/xui/es/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/es/floater_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="chat_bar" title="CHAT"> +<floater name="nearby_chat" title="CHAT"> <panel name="bottom_panel"> <line_editor label="Pulsa aquà para chatear." name="chat_box" tool_tip="Pulsa Enter para decirlo o Ctrl+Enter para gritarlo"/> <button name="show_nearby_chat" tool_tip="Muestra o esconde el registro del chat"/> diff --git a/indra/newview/skins/default/xui/es/floater_inventory.xml b/indra/newview/skins/default/xui/es/floater_inventory.xml deleted file mode 100644 index 0f0ba2fce6..0000000000 --- a/indra/newview/skins/default/xui/es/floater_inventory.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="MI INVENTARIO"> - <floater.string name="Title"> - MI INVENTARIO - </floater.string> - <floater.string name="TitleFetching"> - MI INVENTARIO (obteniendo [ITEM_COUNT] Ãtems...) [FILTER] - </floater.string> - <floater.string name="TitleCompleted"> - MI INVENTARIO ([ITEM_COUNT] Ãtems) [FILTER] - </floater.string> - <floater.string name="Fetched"> - Obtenido - </floater.string> - <panel label="Panel del inventario" name="Inventory Panel"/> -</floater> diff --git a/indra/newview/skins/default/xui/es/floater_model_preview.xml b/indra/newview/skins/default/xui/es/floater_model_preview.xml index ab3ba5aed7..e2313bce99 100644 --- a/indra/newview/skins/default/xui/es/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/es/floater_model_preview.xml @@ -92,19 +92,54 @@ <text initial_value="Triángulos" name="triangles" value="Triángulos"/> <text initial_value="Vértices" name="vertices" value="Vértices"/> <text initial_value="Alto" name="high_label" value="Alto"/> + <combo_box name="lod_source_high"> + <item name="Load from file" value="Cargar desde archivo"/> + <item name="Generate" value="Generar"/> + </combo_box> <button label="Buscar..." name="lod_browse_high"/> + <combo_box name="lod_mode_high"> + <item name="Triangle Limit" value="LÃmite de triángulo"/> + <item name="Error Threshold" value="Margen de error"/> + </combo_box> <text initial_value="0" name="high_triangles" value="0"/> <text initial_value="0" name="high_vertices" value="0"/> <text initial_value="Medio" name="medium_label" value="Medio"/> + <combo_box name="lod_source_medium"> + <item name="Load from file" value="Cargar desde archivo"/> + <item name="Generate" value="Generar"/> + <item name="Use LoD above" value="Usar nivel de detalle superior"/> + </combo_box> <button label="Buscar..." name="lod_browse_medium"/> + <combo_box name="lod_mode_medium"> + <item name="Triangle Limit" value="LÃmite de triángulo"/> + <item name="Error Threshold" value="Margen de error"/> + </combo_box> <text initial_value="0" name="medium_triangles" value="0"/> <text initial_value="0" name="medium_vertices" value="0"/> <text initial_value="Bajo" name="low_label" value="Bajo"/> + <combo_box name="lod_source_low"> + <item name="Load from file" value="Cargar desde archivo"/> + <item name="Generate" value="Generar"/> + <item name="Use LoD above" value="Usar nivel de detalle superior"/> + </combo_box> <button label="Buscar..." name="lod_browse_low"/> + <combo_box name="lod_mode_low"> + <item name="Triangle Limit" value="LÃmite de triángulo"/> + <item name="Error Threshold" value="Margen de error"/> + </combo_box> <text initial_value="0" name="low_triangles" value="0"/> <text initial_value="0" name="low_vertices" value="0"/> <text initial_value="MÃnimo" name="lowest_label" value="MÃnimo"/> + <combo_box name="lod_source_lowest"> + <item name="Load from file" value="Cargar desde archivo"/> + <item name="Generate" value="Generar"/> + <item name="Use LoD above" value="Usar nivel de detalle superior"/> + </combo_box> <button label="Buscar..." name="lod_browse_lowest"/> + <combo_box name="lod_mode_lowest"> + <item name="Triangle Limit" value="LÃmite de triángulo"/> + <item name="Error Threshold" value="Margen de error"/> + </combo_box> <text initial_value="0" name="lowest_triangles" value="0"/> <text initial_value="0" name="lowest_vertices" value="0"/> <check_box label="Generar normales" name="gen_normals"/> diff --git a/indra/newview/skins/default/xui/es/floater_nearby_chat.xml b/indra/newview/skins/default/xui/es/floater_nearby_chat.xml deleted file mode 100644 index b3b8cdcfff..0000000000 --- a/indra/newview/skins/default/xui/es/floater_nearby_chat.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="nearby_chat" title="CHAT"> - <check_box label="Traducir chat" name="translate_chat_checkbox"/> -</floater> diff --git a/indra/newview/skins/default/xui/es/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/es/floater_pathfinding_characters.xml new file mode 100644 index 0000000000..e3ee0563d2 --- /dev/null +++ b/indra/newview/skins/default/xui/es/floater_pathfinding_characters.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_characters" title="Personajes de pathfinding"> + <floater.string name="messaging_get_inprogress"> + Consultando los personajes de pathfinding... + </floater.string> + <floater.string name="messaging_get_error"> + Se ha detectado un error al consultar los personajes de pathfinding. + </floater.string> + <floater.string name="messaging_complete_none_found"> + No hay personajes de pathfinding. + </floater.string> + <floater.string name="messaging_complete_available"> + [NUM_SELECTED] personajes seleccionados de [NUM_TOTAL]. + </floater.string> + <floater.string name="messaging_not_enabled"> + En esta región no está permitido el pathfinding. + </floater.string> + <floater.string name="character_cpu_time"> + [CPU_TIME] µs + </floater.string> + <floater.string name="character_owner_loading"> + [Cargando] + </floater.string> + <floater.string name="character_owner_unknown"> + [Desconocido] + </floater.string> + <floater.string name="character_owner_group"> + [grupo] + </floater.string> + <panel> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Nombre" name="name"/> + <scroll_list.columns label="Descripción" name="description"/> + <scroll_list.columns label="Propietario" name="owner"/> + <scroll_list.columns label="CPU" name="cpu_time"/> + <scroll_list.columns label="Altitud" name="altitude"/> + </scroll_list> + <text name="messaging_status"> + Personajes: + </text> + <button label="Actualizar la lista" name="refresh_objects_list"/> + <button label="Seleccionar todo" name="select_all_objects"/> + <button label="No seleccionar ninguno" name="select_none_objects"/> + </panel> + <panel> + <text name="actions_label"> + Acciones en los personajes seleccionados: + </text> + <check_box label="Mostrar baliza" name="show_beacon"/> + <check_box label="Mostrar la cápsula de fÃsica" name="show_physics_capsule"/> + <button label="Tomar" name="take_objects"/> + <button label="Tomar una copia" name="take_copy_objects"/> + <button label="Teleportarme a él" name="teleport_me_to_object" tool_tip="Se habilita solo cuando está seleccionado un personaje."/> + <button label="Devolver" name="return_objects"/> + <button label="Eliminar" name="delete_objects"/> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/es/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/es/floater_pathfinding_console.xml new file mode 100644 index 0000000000..e93ecc9e10 --- /dev/null +++ b/indra/newview/skins/default/xui/es/floater_pathfinding_console.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_console" title="Vista/prueba de pathfinding"> + <floater.string name="navmesh_viewer_status_library_not_implemented"> + No se encuentra la implementación de la biblioteca de localización de rutas. + </floater.string> + <floater.string name="navmesh_viewer_status_region_not_enabled"> + En esta región no está permitido el pathfinding. + </floater.string> + <floater.string name="navmesh_viewer_status_region_loading"> + Esperando a que termine la carga de la región. + </floater.string> + <floater.string name="navmesh_viewer_status_checking_version"> + Comprobando el estado del navmesh. + </floater.string> + <floater.string name="navmesh_viewer_status_downloading"> + Descargando el navmesh. + </floater.string> + <floater.string name="navmesh_viewer_status_updating"> + El navmesh se ha modificado en el servidor. Descargando el último navmesh. + </floater.string> + <floater.string name="navmesh_viewer_status_has_navmesh"> + Se ha descargado el último navmesh. + </floater.string> + <floater.string name="navmesh_viewer_status_error"> + No se puede descargar el navmesh correctamente. + </floater.string> + <floater.string name="navmesh_simulator_status_pending"> + El navmesh tiene cambios pendientes. + </floater.string> + <floater.string name="navmesh_simulator_status_building"> + El navmesh se está construyendo. + </floater.string> + <floater.string name="navmesh_simulator_status_some_pending"> + Algunas regiones del navmesh tienen cambios pendientes. + </floater.string> + <floater.string name="navmesh_simulator_status_some_building"> + Algunas regiones del navmesh se están construyendo. + </floater.string> + <floater.string name="navmesh_simulator_status_pending_and_building"> + Algunas regiones del navmesh tienen cambios pendientes y otras se están construyendo. + </floater.string> + <floater.string name="navmesh_simulator_status_complete"> + El navmesh está actualizado. + </floater.string> + <floater.string name="pathing_library_not_implemented"> + No se encuentra la implementación de la biblioteca de localización de rutas. + </floater.string> + <floater.string name="pathing_region_not_enabled"> + En esta región no está permitido el pathfinding. + </floater.string> + <floater.string name="pathing_choose_start_and_end_points"> + Elige los puntos inicial y final. + </floater.string> + <floater.string name="pathing_choose_start_point"> + Elige el punto inicial. + </floater.string> + <floater.string name="pathing_choose_end_point"> + Elige el punto final. + </floater.string> + <floater.string name="pathing_path_valid"> + La ruta se muestra de color naranja. + </floater.string> + <floater.string name="pathing_path_invalid"> + No se encuentra una ruta entre los puntos seleccionados. + </floater.string> + <floater.string name="pathing_error"> + Error durante la generación de la ruta. + </floater.string> + <tab_container name="view_test_tab_container"> + <panel label="Vista" name="view_panel"> + <text name="show_label"> + Mostrar: + </text> + <check_box label="Mundo virtual" name="show_world"/> + <check_box label="Solamente los objetos movibles" name="show_world_movables_only"/> + <check_box label="Navmesh" name="show_navmesh"/> + <text name="show_walkability_label"> + Mostrar el mapa de transitabilidad: + </text> + <combo_box name="show_heatmap_mode"> + <combo_box.item label="No mostrar" name="show_heatmap_mode_none"/> + <combo_box.item label="Personaje de tipo A" name="show_heatmap_mode_a"/> + <combo_box.item label="Personaje de tipo B" name="show_heatmap_mode_b"/> + <combo_box.item label="Personaje de tipo C" name="show_heatmap_mode_c"/> + <combo_box.item label="Personaje de tipo D" name="show_heatmap_mode_d"/> + </combo_box> + <check_box label="Objetos transitables" name="show_walkables"/> + <check_box label="Volúmenes materiales" name="show_material_volumes"/> + <check_box label="Obstáculos estáticos" name="show_static_obstacles"/> + <check_box label="Volúmenes de exclusión" name="show_exclusion_volumes"/> + <check_box label="Plano de agua" name="show_water_plane"/> + <check_box label="Con visión de rayos X" name="show_xray"/> + </panel> + <panel label="Probar ruta" name="test_panel"> + <text name="ctrl_click_label"> + Ctrl-clic para seleccionar el punto inicial. + </text> + <text name="shift_click_label"> + Mayús-clic para seleccionar el punto final. + </text> + <text name="character_width_label"> + Ancho del personaje + </text> + <slider name="character_width" value="1"/> + <text name="character_width_unit_label"> + m + </text> + <text name="character_type_label"> + Tipo de personaje + </text> + <combo_box name="path_character_type"> + <combo_box.item label="Ninguno" name="path_character_type_none"/> + <combo_box.item label="A" name="path_character_type_a"/> + <combo_box.item label="B" name="path_character_type_b"/> + <combo_box.item label="C" name="path_character_type_c"/> + <combo_box.item label="D" name="path_character_type_d"/> + </combo_box> + <button label="Borrar ruta" name="clear_path"/> + </panel> + </tab_container> +</floater> diff --git a/indra/newview/skins/default/xui/es/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/es/floater_pathfinding_linksets.xml new file mode 100644 index 0000000000..e6f864eef5 --- /dev/null +++ b/indra/newview/skins/default/xui/es/floater_pathfinding_linksets.xml @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_linksets" title="Linksets de pathfinding"> + <floater.string name="messaging_get_inprogress"> + Consultando los linksets de pathfinding... + </floater.string> + <floater.string name="messaging_get_error"> + Se ha detectado un error al consultar los linksets de pathfinding. + </floater.string> + <floater.string name="messaging_set_inprogress"> + Modificando los linksets de pathfinding seleccionados... + </floater.string> + <floater.string name="messaging_set_error"> + Se ha detectado un error al modificar los linksets de pathfinding seleccionados. + </floater.string> + <floater.string name="messaging_complete_none_found"> + No hay linksets de pathfinding. + </floater.string> + <floater.string name="messaging_complete_available"> + [NUM_SELECTED] linksets seleccionados de [NUM_TOTAL]. + </floater.string> + <floater.string name="messaging_not_enabled"> + En esta región no está permitido el pathfinding. + </floater.string> + <floater.string name="linkset_terrain_name"> + [Terreno] + </floater.string> + <floater.string name="linkset_terrain_description"> + -- + </floater.string> + <floater.string name="linkset_terrain_owner"> + -- + </floater.string> + <floater.string name="linkset_terrain_scripted"> + -- + </floater.string> + <floater.string name="linkset_terrain_land_impact"> + -- + </floater.string> + <floater.string name="linkset_terrain_dist_from_you"> + -- + </floater.string> + <floater.string name="linkset_owner_loading"> + [Cargando] + </floater.string> + <floater.string name="linkset_owner_unknown"> + [Desconocido] + </floater.string> + <floater.string name="linkset_owner_group"> + [grupo] + </floater.string> + <floater.string name="linkset_is_scripted"> + Sà + </floater.string> + <floater.string name="linkset_is_not_scripted"> + No + </floater.string> + <floater.string name="linkset_is_unknown_scripted"> + Desconocido + </floater.string> + <floater.string name="linkset_use_walkable"> + Objeto transitable + </floater.string> + <floater.string name="linkset_use_static_obstacle"> + Obstáculo estático + </floater.string> + <floater.string name="linkset_use_dynamic_obstacle"> + Obstáculo móvil + </floater.string> + <floater.string name="linkset_use_material_volume"> + Volumen material + </floater.string> + <floater.string name="linkset_use_exclusion_volume"> + Volumen de exclusión + </floater.string> + <floater.string name="linkset_use_dynamic_phantom"> + Inmaterial móvil + </floater.string> + <floater.string name="linkset_is_terrain"> + [no modificable] + </floater.string> + <floater.string name="linkset_is_restricted_state"> + [restringido] + </floater.string> + <floater.string name="linkset_is_non_volume_state"> + [cóncavo] + </floater.string> + <floater.string name="linkset_is_restricted_non_volume_state"> + [restringido,cóncavo] + </floater.string> + <floater.string name="linkset_choose_use"> + Elegir la utilización del linkset... + </floater.string> + <panel> + <combo_box name="filter_by_linkset_use"> + <combo_box.item label="Filtrar por utilización de linkset..." name="filter_by_linkset_use_none"/> + <combo_box.item label="Objeto transitable" name="filter_by_linkset_use_walkable"/> + <combo_box.item label="Obstáculo estático" name="filter_by_linkset_use_static_obstacle"/> + <combo_box.item label="Obstáculo móvil" name="filter_by_linkset_use_dynamic_obstacle"/> + <combo_box.item label="Volumen material" name="filter_by_linkset_use_material_volume"/> + <combo_box.item label="Volumen de exclusión" name="filter_by_linkset_use_exclusion_volume"/> + <combo_box.item label="Inmaterial móvil" name="filter_by_linkset_use_dynamic_phantom"/> + </combo_box> + <button label="Aplicar" name="apply_filters"/> + <button label="Limpiar" name="clear_filters"/> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Nombre (prim raÃz)" name="name"/> + <scroll_list.columns label="Descripción (prim raÃz)" name="description"/> + <scroll_list.columns label="Propietario" name="owner"/> + <scroll_list.columns label="Con scripts" name="scripted"/> + <scroll_list.columns label="Impacto" name="land_impact"/> + <scroll_list.columns label="Distancia" name="dist_from_you"/> + <scroll_list.columns label="Utilización de linkset" name="linkset_use"/> + <scroll_list.columns label="A %" name="a_percent"/> + <scroll_list.columns label="B %" name="b_percent"/> + <scroll_list.columns label="C %" name="c_percent"/> + <scroll_list.columns label="D %" name="d_percent"/> + </scroll_list> + <text name="messaging_status"> + Linksets: + </text> + <button label="Actualizar la lista" name="refresh_objects_list"/> + <button label="Seleccionar todo" name="select_all_objects"/> + <button label="No seleccionar ninguno" name="select_none_objects"/> + </panel> + <panel> + <check_box label="Mostrar baliza" name="show_beacon"/> + <button label="Tomar" name="take_objects"/> + <button label="Tomar una copia" name="take_copy_objects"/> + <button label="Teleportarme a él" name="teleport_me_to_object"/> + <button label="Devolver" name="return_objects"/> + <button label="Eliminar" name="delete_objects"/> + </panel> + <panel> + <text name="walkability_coefficients_label"> + Transitabilidad: + </text> + <text name="edit_a_label"> + A + </text> + <line_editor name="edit_a_value" tool_tip="Transitabilidad de los personajes de tipo A. El tipo del personaje del ejemplo es humanoide."/> + <text name="edit_b_label"> + B + </text> + <line_editor name="edit_b_value" tool_tip="Transitabilidad de los personajes de tipo B. El tipo del personaje del ejemplo es criatura."/> + <text name="edit_c_label"> + C + </text> + <line_editor name="edit_c_value" tool_tip="Transitabilidad de los personajes de tipo C. El tipo del personaje del ejemplo es mecánico."/> + <text name="edit_d_label"> + D + </text> + <line_editor name="edit_d_value" tool_tip="Transitabilidad de los personajes de tipo D. El tipo del personaje del ejemplo es otro."/> + <button label="Aplicar cambios" name="apply_edit_values"/> + <text name="suggested_use_a_label"> + (Humanoide) + </text> + <text name="suggested_use_b_label"> + (Criatura) + </text> + <text name="suggested_use_c_label"> + (Mecánico) + </text> + <text name="suggested_use_d_label"> + (Otro) + </text> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/es/floater_postcard.xml b/indra/newview/skins/default/xui/es/floater_postcard.xml deleted file mode 100644 index b5b9805fe2..0000000000 --- a/indra/newview/skins/default/xui/es/floater_postcard.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="FOTO POR CORREO"> - <text name="to_label"> - Correo del destinatario: - </text> - <text name="from_label"> - Su correo: - </text> - <text name="name_label"> - Su nombre: - </text> - <text name="subject_label"> - Asunto: - </text> - <line_editor label="Escriba aquà el asunto." name="subject_form"/> - <text name="msg_label"> - Mensaje: - </text> - <text_editor name="msg_form"> - Escriba aquà el mensaje. - </text_editor> - <text name="fine_print"> - Si su destinatario se registra en [SECOND_LIFE], -usted conseguirá un bono de referido. - </text> - <button label="Cancelar" name="cancel_btn"/> - <button label="Enviar" name="send_btn"/> - <string name="default_subject"> - Postal desde [SECOND_LIFE]. - </string> - <string name="default_message"> - ¡Mira esto! - </string> - <string name="upload_message"> - Enviando... - </string> -</floater> diff --git a/indra/newview/skins/default/xui/es/floater_spellcheck.xml b/indra/newview/skins/default/xui/es/floater_spellcheck.xml new file mode 100644 index 0000000000..b664b96928 --- /dev/null +++ b/indra/newview/skins/default/xui/es/floater_spellcheck.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_floater" title="Configuración del corrector ortográfico"> + <check_box label="Habilitar la revisión ortográfica" name="spellcheck_enable"/> + <text name="spellcheck_main"> + Diccionario principal: + </text> + <text label="Registros:" name="spellcheck_additional"> + Diccionarios adicionales: + </text> + <text name="spellcheck_available"> + Disponibles + </text> + <text name="spellcheck_active"> + Activos + </text> + <button label="Eliminar" name="spellcheck_remove_btn"/> + <button label="Importar..." name="spellcheck_import_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/es/floater_spellcheck_import.xml b/indra/newview/skins/default/xui/es/floater_spellcheck_import.xml new file mode 100644 index 0000000000..bd86ed00da --- /dev/null +++ b/indra/newview/skins/default/xui/es/floater_spellcheck_import.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_import" title="Importar diccionario"> + <button label="Examinar" label_selected="Examinar" name="dictionary_path_browse"/> + <button label="Importar" name="ok_btn"/> + <button label="Cancelar" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/es/floater_stats.xml b/indra/newview/skins/default/xui/es/floater_stats.xml index d53ae88126..00601920f2 100644 --- a/indra/newview/skins/default/xui/es/floater_stats.xml +++ b/indra/newview/skins/default/xui/es/floater_stats.xml @@ -47,6 +47,12 @@ <stat_bar label="Objetos con bajo nivel de detalle" name="physicslodtasks"/> <stat_bar label="Memoria asignada" name="physicsmemoryallocated"/> </stat_view> + <stat_bar label="Scripts ejecutados" name="simpctscriptsrun"/> + <stat_view label="Pathfinding" name="simpathfinding"> + <stat_bar label="Tiempo de paso de IA" name="simsimaistepmsec"/> + <stat_bar label="Pasos de silueta omitidos" name="simsimskippedsilhouettesteps"/> + <stat_bar label="Personajes actualizados" name="simsimpctsteppedcharacters"/> + </stat_view> <stat_view label="Tiempo (ms)" name="simperf"> <stat_bar label="Tiempo total de los frames" name="simframemsec"/> <stat_bar label="Tiempo de red" name="simnetmsec"/> diff --git a/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml index 1e566e3e31..93bc9f293c 100644 --- a/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml @@ -20,6 +20,8 @@ <button label="Blanca" label_selected="Blanca" name="Blank"/> <button label="Ninguna" label_selected="Ninguna" left="90" name="None"/> <button label="" label_selected="" name="Pipette"/> + <check_box initial_value="true" label="Vista previa inmediata" name="apply_immediate_check"/> + <text name="preview_disabled" value="Vista previa inhabilitada"/> <filter_editor label="Filtrar las texturas" name="inventory search editor"/> <check_box initial_value="false" label="Ver las carpetas" name="show_folders_check"/> <button label="Añadir" label_selected="Añadir" name="l_add_btn"/> @@ -31,5 +33,4 @@ </scroll_list> <button label="OK" label_selected="OK" name="Select"/> <button label="Cancelar" label_selected="Cancelar" name="Cancel"/> - <check_box initial_value="true" label="Aplicarlo ahora" name="apply_immediate_check"/> </floater> diff --git a/indra/newview/skins/default/xui/es/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/es/floater_texture_fetch_debugger.xml index 29fd2ab2a3..59aaf7f74a 100644 --- a/indra/newview/skins/default/xui/es/floater_texture_fetch_debugger.xml +++ b/indra/newview/skins/default/xui/es/floater_texture_fetch_debugger.xml @@ -45,10 +45,23 @@ <text name="total_time_refetch_vis_cache_label"> 15, Volviendo a obtener visibles de la caché, Tiempo: [TIME] segundos, Obtenidos: [SIZE] KB, [PIXEL] MPÃxeles </text> + <text name="total_time_refetch_all_cache_label"> + 16, Volviendo a obtener todas las texturas de caché, Tiempo: [TIME] segundos, Obtenidos: [SIZE] KB, [PIXEL] MPÃxeles + </text> <text name="total_time_refetch_vis_http_label"> - 16, Volviendo a obtener visibles de HTTP, Tiempo: [TIME] segundos, Obtenidos: [SIZE] KB, [PIXEL] MPÃxeles + 17, Volviendo a obtener visibles de HTTP, Tiempo: [TIME] segundos, Obtenidos: [SIZE] KB, [PIXEL] MPÃxeles + </text> + <text name="total_time_refetch_all_http_label"> + 18, Volviendo a obtener todas las texturas de HTTP, Tiempo: [TIME] segundos, Obtenidos: [SIZE] KB, [PIXEL] MPÃxeles + </text> + <spinner label="19, Proporción de texeles/pÃxeles:" name="texel_pixel_ratio"/> + <text name="texture_source_label"> + 20, Fuente de texturas: </text> - <spinner label="17, Proporción de texeles/pÃxeles:" name="texel_pixel_ratio"/> + <radio_group name="texture_source"> + <radio_item label="Caché + HTTP" name="0"/> + <radio_item label="Solo HTTP" name="1"/> + </radio_group> <button label="Iniciar" name="start_btn"/> <button label="Restablecer" name="clear_btn"/> <button label="Cerrar" name="close_btn"/> @@ -58,5 +71,7 @@ <button label="Descodificar" name="decode_btn"/> <button label="Textura GL" name="gl_btn"/> <button label="Volver a obtener caché de vis." name="refetchviscache_btn"/> + <button label="Volver a obtener toda la caché" name="refetchallcache_btn"/> <button label="Volver a obtener HTTP de vis." name="refetchvishttp_btn"/> + <button label="Volver a obtener todo el HTTP" name="refetchallhttp_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/es/floater_tools.xml b/indra/newview/skins/default/xui/es/floater_tools.xml index 650b4b457d..15462c3726 100644 --- a/indra/newview/skins/default/xui/es/floater_tools.xml +++ b/indra/newview/skins/default/xui/es/floater_tools.xml @@ -128,6 +128,12 @@ <panel.string name="text modify info 4"> No puedes modificar estos objetos </panel.string> + <panel.string name="text modify info 5"> + No se puede modificar este objeto a través del lÃmite de una región + </panel.string> + <panel.string name="text modify info 6"> + No se pueden modificar estos objetos a través del lÃmite de una región + </panel.string> <panel.string name="text modify warning"> Para configurar los permisos, debes seleccionar el objeto completo </panel.string> @@ -177,12 +183,12 @@ <combo_box.item label="Zoom" name="Zoom"/> </combo_box> <check_box label="En venta:" name="checkbox for sale"/> + <spinner label="L$" name="Edit Cost"/> <combo_box name="sale type"> <combo_box.item label="Copia" name="Copy"/> <combo_box.item label="Contenidos" name="Contents"/> <combo_box.item label="Original" name="Original"/> </combo_box> - <spinner label="Precio: L$" name="Edit Cost"/> <check_box label="Mostrar en la búsqueda" name="search_check" tool_tip="Dejar que la gente vea este objeto en los resultados de la búsqueda"/> <panel name="perms_build"> <text name="perm_modify"> @@ -218,6 +224,11 @@ F: </text> </panel> + <panel name="pathfinding_attrs_panel"> + <text name="pathfinding_attributes_label"> + Atributos de pathfinding: + </text> + </panel> </panel> <panel label="Objeto" name="Object"> <check_box label="Bloqueado" name="checkbox locked" tool_tip="Previene que el objeto sea movido o borrado. Suele ser útil mientras se construye, para prevenir que se modifique sin querer."/> diff --git a/indra/newview/skins/default/xui/es/floater_top_objects.xml b/indra/newview/skins/default/xui/es/floater_top_objects.xml index 033633bd22..bb53f116c2 100644 --- a/indra/newview/skins/default/xui/es/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/es/floater_top_objects.xml @@ -9,9 +9,6 @@ <floater.string name="scripts_score_label"> Tiempo </floater.string> - <floater.string name="scripts_mono_time_label"> - Tiempo en Mono - </floater.string> <floater.string name="top_colliders_title"> Objetos que colisionan </floater.string> @@ -32,9 +29,10 @@ <scroll_list.columns label="Nombre" name="name"/> <scroll_list.columns label="Propietario" name="owner"/> <scroll_list.columns label="Posición" name="location"/> + <scroll_list.columns label="Parcela" name="parcel"/> <scroll_list.columns label="Tiempo" name="time"/> - <scroll_list.columns label="Tiempo en Mono" name="mono_time"/> <scroll_list.columns label="URLs" name="URLs"/> + <scroll_list.columns label="Memoria (KB)" name="memory"/> </scroll_list> <text name="id_text"> ID del objeto: @@ -48,6 +46,10 @@ Propietario: </text> <button label="Filtro" name="filter_owner_btn"/> + <text name="parcel_name_text"> + Parcela: + </text> + <button label="Filtro" name="filter_parcel_btn"/> <button label="Actualizar" name="refresh_btn"/> <button label="Devolver lo seleccionado" name="return_selected_btn" width="170"/> <button label="Devolver todo" left="190" name="return_all_btn"/> diff --git a/indra/newview/skins/default/xui/es/menu_bottomtray.xml b/indra/newview/skins/default/xui/es/menu_bottomtray.xml deleted file mode 100644 index 40058a1749..0000000000 --- a/indra/newview/skins/default/xui/es/menu_bottomtray.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<menu name="hide_camera_move_controls_menu"> - <menu_item_check label="Botón Hablar" name="EnableVoiceChat"/> - <menu_item_check label="Botón Gestos" name="ShowGestureButton"/> - <menu_item_check label="Botón Moverse" name="ShowMoveButton"/> - <menu_item_check label="Botón Vista" name="ShowCameraButton"/> - <menu_item_check label="Botón Foto" name="ShowSnapshotButton"/> - <menu_item_check label="Botón Construir" name="ShowBuildButton"/> - <menu_item_check label="Botón Buscar" name="ShowSearchButton"/> - <menu_item_check label="Botón Mapa" name="ShowWorldMapButton"/> - <menu_item_check label="Botón Minimapa" name="ShowMiniMapButton"/> - <menu_item_call label="Cortar" name="NearbyChatBar_Cut"/> - <menu_item_call label="Copiar" name="NearbyChatBar_Copy"/> - <menu_item_call label="Pegar" name="NearbyChatBar_Paste"/> - <menu_item_call label="Borrar" name="NearbyChatBar_Delete"/> - <menu_item_call label="Seleccionar todo" name="NearbyChatBar_Select_All"/> -</menu> diff --git a/indra/newview/skins/default/xui/es/menu_im_well_button.xml b/indra/newview/skins/default/xui/es/menu_im_well_button.xml deleted file mode 100644 index c8f6c217cc..0000000000 --- a/indra/newview/skins/default/xui/es/menu_im_well_button.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<context_menu name="IM Well Button Context Menu"> - <menu_item_call label="Cerrar todo" name="Close All"/> -</context_menu> diff --git a/indra/newview/skins/default/xui/es/menu_inventory.xml b/indra/newview/skins/default/xui/es/menu_inventory.xml index 4a8f37dee4..803d3f1331 100644 --- a/indra/newview/skins/default/xui/es/menu_inventory.xml +++ b/indra/newview/skins/default/xui/es/menu_inventory.xml @@ -67,6 +67,7 @@ <menu_item_call label="Borrar carpeta del sistema" name="Delete System Folder"/> <menu_item_call label="Empezar multiconferencia" name="Conference Chat Folder"/> <menu_item_call label="Escuchar" name="Sound Play"/> + <menu_item_call label="Copiar la SLurl" name="url_copy"/> <menu_item_call label="Acerca del hito" name="About Landmark"/> <menu_item_call label="Escuchar en el mundo" name="Animation Play"/> <menu_item_call label="Ejecutarla para usted" name="Animation Audition"/> diff --git a/indra/newview/skins/default/xui/es/menu_mode_change.xml b/indra/newview/skins/default/xui/es/menu_mode_change.xml deleted file mode 100644 index 608505d192..0000000000 --- a/indra/newview/skins/default/xui/es/menu_mode_change.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<toggleable_menu name="Mode Change"> - <menu_item_check label="Básico" name="BasicMode"/> - <menu_item_check label="Avanzado" name="AdvancedMode"/> -</toggleable_menu> diff --git a/indra/newview/skins/default/xui/es/menu_object.xml b/indra/newview/skins/default/xui/es/menu_object.xml index d8c75eaf47..33ea8c88d8 100644 --- a/indra/newview/skins/default/xui/es/menu_object.xml +++ b/indra/newview/skins/default/xui/es/menu_object.xml @@ -5,6 +5,8 @@ </menu_item_call> <menu_item_call label="Editar" name="Edit..."/> <menu_item_call label="Construir" name="Build"/> + <menu_item_call label="Mostrar en linksets" name="show_in_linksets"/> + <menu_item_call label="Mostrar en personajes" name="show_in_characters"/> <menu_item_call label="Abrir" name="Open"/> <menu_item_call label="Sentarme aquÃ" name="Object Sit"/> <menu_item_call label="Levantarme" name="Object Stand Up"/> diff --git a/indra/newview/skins/default/xui/es/menu_text_editor.xml b/indra/newview/skins/default/xui/es/menu_text_editor.xml index 095e461734..6253463725 100644 --- a/indra/newview/skins/default/xui/es/menu_text_editor.xml +++ b/indra/newview/skins/default/xui/es/menu_text_editor.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Text editor context menu"> + <menu_item_call label="(desconocido)" name="Suggestion 1"/> + <menu_item_call label="(desconocido)" name="Suggestion 2"/> + <menu_item_call label="(desconocido)" name="Suggestion 3"/> + <menu_item_call label="(desconocido)" name="Suggestion 4"/> + <menu_item_call label="(desconocido)" name="Suggestion 5"/> + <menu_item_call label="Añadir al diccionario" name="Add to Dictionary"/> + <menu_item_call label="Añadir a ignorados" name="Add to Ignore"/> <menu_item_call label="Cortar" name="Cut"/> <menu_item_call label="Copiar" name="Copy"/> <menu_item_call label="Pegar" name="Paste"/> diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index 740bd35cbb..d80150ef6d 100644 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -27,6 +27,7 @@ <menu_item_call label="Preferencias..." name="Preferences"/> <menu_item_call label="Botones de la barra de herramientas..." name="Toolbars"/> <menu_item_call label="Ocultar todos los controles" name="Hide UI"/> + <menu_item_check label="Mostrar los HUD anexados" name="Show HUD Attachments"/> <menu_item_call label="Salir de [APP_NAME]" name="Quit"/> </menu> <menu label="Comunicarme" name="Communicate"> @@ -38,6 +39,7 @@ <menu_item_call label="Amigos" name="My Friends"/> <menu_item_call label="Grupos" name="My Groups"/> <menu_item_call label="Gente cerca" name="Active Speakers"/> + <menu_item_call label="Lista de ignorados" name="Block List"/> </menu> <menu label="Mundo" name="World"> <menu_item_call label="Crear un hito de este sitio" name="Create Landmark Here"/> @@ -123,6 +125,11 @@ <menu_item_call label="Definir los scripts a ejecutar" name="Set Scripts to Running"/> <menu_item_call label="Configurar scripts como no ejecutándose" name="Set Scripts to Not Running"/> </menu> + <menu label="Pathfinding" name="Pathfinding"> + <menu_item_call label="Linksets..." name="pathfinding_linksets_menu_item"/> + <menu_item_call label="Personajes..." name="pathfinding_characters_menu_item"/> + <menu_item_call label="Ver/probar..." name="pathfinding_console_menu_item"/> + </menu> <menu label="Opciones" name="Options"> <menu_item_check label="Mostrar los permisos avanzados" name="DebugPermissions"/> <menu_item_check label="Seleccionar sólo mis objetos" name="Select Only My Objects"/> @@ -173,7 +180,6 @@ <menu_item_check label="Ocultar las partÃculas" name="Hide Particles"/> <menu_item_check label="Ocultar lo seleccionado" name="Hide Selected"/> <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> <menu label="Objetos representados" name="Rendering Types"> diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml index af7a7b088a..7dfb27717d 100644 --- a/indra/newview/skins/default/xui/es/notifications.xml +++ b/indra/newview/skins/default/xui/es/notifications.xml @@ -37,6 +37,12 @@ <button name="Help" text="$helptext"/> </form> </template> + <template name="okhelpignore"> + <form> + <button name="OK_okhelpignore" text="$yestext"/> + <button name="Help_okhelpignore" text="$helptext"/> + </form> + </template> <template name="yesnocancelbuttons"> <form> <button name="Yes" text="$yestext"/> @@ -357,13 +363,19 @@ Tienes que volver a introducir el nombre de usuario de tu avatar. Necesitas una cuenta para acceder a [SECOND_LIFE]. ¿Te gustarÃa crear una ahora? <url name="url"> - https://join.secondlife.com/index.php?lang=es-ES + [create_account_url] </url> <usetemplate name="okcancelbuttons" notext="Volver a intentarlo" yestext="Crear una cuenta nueva"/> </notification> <notification name="InvalidCredentialFormat"> Escribe el nombre de usuario o el nombre y el apellido de tu avatar en el campo Nombre de usuario e inicia sesión otra vez. </notification> + <notification name="InvalidGrid"> + '[GRID]' no es un identificador de cuadrÃcula válido. + </notification> + <notification name="InvalidLocationSLURL"> + Tu localización inicial no especifica una cuadrÃcula válida. + </notification> <notification name="DeleteClassified"> ¿Borrar el clasificado '[NAME]'? No se reembolsan las cuotas pagadas. @@ -467,8 +479,8 @@ El objeto debe de haber sido borrado o estar fuera de rango ('out of range& Al guardar un script compilado, hubo un problema por: [REASON]. Por favor, vuelve a intentar guardarlo más tarde.. </notification> <notification name="StartRegionEmpty"> - Perdón, no está definida tu Posición inicial. -Por favor, escribe el nombre de la región en el cajetÃn de Posición inicial, o elige para esa posición Mi Base o Mi última posición. + No está definida tu región inicial. +Por favor, escribe el nombre de la región en el cuadro de Posición inicial o elige para esa posición Mi Base o Mi última posición. <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="CouldNotStartStopScript"> @@ -599,6 +611,9 @@ todos los objetos. Por favor, asegúrate de que no hay ninguno bloqueado, y de que eres el propietario de todos. </notification> + <notification name="CannotLinkPermanent"> + No se pueden vincular objetos a través de lÃmites de región. + </notification> <notification name="CannotLinkDifferentOwners"> Imposible enlazarlos, porque hay objetos de distintos propietarios. @@ -980,6 +995,41 @@ no tienes el permiso de comprar terreno para el grupo que tienes activado actual <button name="Cancel" text="Cancelar"/> </form> </notification> + <notification label="Añadir lista de reemplazo automático" name="AddAutoReplaceList"> + Nombre de la nueva lista: + <form name="form"> + <button name="SetName" text="OK"/> + </form> + </notification> + <notification label="Cambiar nombre de la lista de reemplazo automático" name="RenameAutoReplaceList"> + El nombre '[DUPNAME]' ya se está utilizando. + Escribe un nombre nuevo que sea único: + <form name="form"> + <button name="ReplaceList" text="Reemplazar la lista actual"/> + <button name="SetName" text="Usar un nombre nuevo"/> + </form> + </notification> + <notification name="InvalidAutoReplaceEntry"> + La palabra clave debe ser una palabra única y el reemplazo no puede estar vacÃo. + </notification> + <notification name="InvalidAutoReplaceList"> + La lista de reemplazo no es válida. + </notification> + <notification name="SpellingDictImportRequired"> + Debes especificar un archivo, un nombre y un idioma. + </notification> + <notification name="SpellingDictIsSecondary"> + El diccionario [DIC_NAME] aparentemente no contiene un archivo "aff", lo cual significa que es un diccionario "secundario". +Puedes utilizarlo como un diccionario adicional, pero no como el diccionario principal. + +Consulta https://wiki.secondlife.com/wiki/Adding_Spelling_Dictionaries + </notification> + <notification name="SpellingDictImportFailed"> + No se puede copiar + [FROM_NAME] + a + [TO_NAME] + </notification> <notification label="Guardar el vestuario" name="SaveOutfitAs"> Guardar como un nuevo vestuario lo que estoy llevando: <form name="form"> @@ -1161,7 +1211,7 @@ a '[THIS_GPU]' Se te ha llevado a una región cercana. </notification> <notification name="AvatarMovedLast"> - En estos momentos no está disponible tu última posición. + En estos momentos no está disponible la posición solicitada. Se te ha llevado a una región cercana. </notification> <notification name="AvatarMovedHome"> @@ -1179,9 +1229,8 @@ Puedes usar [SECOND_LIFE] de forma normal; los demás residentes te verán corre <notification name="FirstRun"> Se ha completado la instalación de [SECOND_LIFE]. -Si es la primera vez que usas [SECOND_LIFE], debes crear una cuenta antes de poder iniciar una sesión. -¿Volver a [http://join.secondlife.com secondlife.com] para crear una cuenta nueva? - <usetemplate name="okcancelbuttons" notext="Continuar" yestext="Cuenta nueva..."/> +Si es la primera vez que usas [SECOND_LIFE], debes crear una cuenta para poder iniciar una sesión. + <usetemplate name="okcancelbuttons" notext="Continuar" yestext="Crear cuenta..."/> </notification> <notification name="LoginPacketNeverReceived"> Tenemos problemas de conexión. Puede deberse a un problema de tu conexión a Internet o de [SECOND_LIFE_GRID]. @@ -1703,83 +1752,128 @@ Se cambiarán miles de regiones, y se provocará un colapso en el espacio del se <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="RegionEntryAccessBlocked"> - No estás autorizado en esa región por su nivel de calificación. Puede deberse a que no hay información validada de tu edad. - -Por favor, comprueba que tienes instalado el último visor, y dirÃgete a la Base de Conocimientos para más detalles sobre el acceso a zonas con este nivel de calificación. + Tus preferencias de contenido actuales te impiden visitar la región que has seleccionado. Puedes cambiar las preferencias en Yo > Preferencias > General. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="RegionEntryAccessBlocked_KB"> - No estás autorizado en esa región por su nivel de calificación. - -¿Quieres ir a la Base de Conocimientos para aprender más sobre el nivel de calificación? + <notification name="RegionEntryAccessBlocked_AdultsOnlyContent"> + La región que intentas visitar tiene un contenido [REGIONMATURITY], que solo es accesible para los adultos. <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/es + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="No puedo entrar a esta región dado el nivel de calificación" name="okcancelignore" notext="Cerrar" yestext="Ir a la Base de Conocimientos"/> + <usetemplate ignoretext="Paso a otra región: la región que intentas visitar tiene un contenido solo accesible para los adultos." name="okcancelignore" notext="Cerrar" yestext="Ir a la Base de Conocimientos"/> </notification> <notification name="RegionEntryAccessBlocked_Notify"> - No estás autorizado en esa región por su nivel de calificación. + La región que intentas visitar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos. + </notification> + <notification name="RegionEntryAccessBlocked_NotifyAdultsOnly"> + La región que intentas visitar tiene un contenido [REGIONMATURITY], que solo es accesible para los adultos. </notification> <notification name="RegionEntryAccessBlocked_Change"> - No estás autorizado en esta región por tus preferencias sobre el nivel de calificación. - -Para entrar en la región que deseas, cambia tu preferencia de nivel de calificación. Esto te permitirá buscar contenidos [REGIONMATURITY] y tener acceso a ellos. Para deshacer los cambios, elige Yo > Preferencias > General. + La región que intentas visitar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos. Podemos cambiar tus preferencias o tú puedes cancelar la visita. Después de cambiar tus preferencias, intenta otra vez acceder a la región. <form name="form"> - <button name="OK" text="Cambiar las preferencias"/> - <button default="true" name="Cancel" text="Cerrar"/> - <ignore name="ignore" text="Mis preferencias sobre nivel de calificación me impiden entrar a esta región"/> + <button name="OK" text="Cambiar preferencias"/> + <button default="true" name="Cancel" text="Cancelar"/> + <ignore name="ignore" text="Paso a otra región: tus preferencias de contenido no te permiten visitar la región que has seleccionado."/> </form> </notification> + <notification name="RegionEntryAccessBlocked_PreferencesOutOfSync"> + Estamos experimentando dificultades técnicas con el teleporte porque tus preferencias no están sincronizadas con el servidor. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked"> + Tus preferencias de contenido actuales te impiden visitar la región que has seleccionado. Puedes cambiar las preferencias en Yo > Preferencias > General. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked_AdultsOnlyContent"> + La región que intentas visitar tiene un contenido [REGIONMATURITY], que solo es accesible para los adultos. + <url name="url"> + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview + </url> + <usetemplate ignoretext="Teleportarme: la región que intentas visitar tiene un contenido solo accesible para los adultos." name="okcancelignore" notext="Cerrar" yestext="Ir a la Base de Conocimientos"/> + </notification> + <notification name="TeleportEntryAccessBlocked_Notify"> + La región que intentas visitar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos. + </notification> + <notification name="TeleportEntryAccessBlocked_NotifyAdultsOnly"> + La región que intentas visitar tiene un contenido [REGIONMATURITY], que solo es accesible para los adultos. + </notification> + <notification name="TeleportEntryAccessBlocked_ChangeAndReTeleport"> + La región que intentas visitar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos. Podemos cambiar tus preferencias y proceder a teleportarte o bien tú puedes cancelar el teleporte. + <form name="form"> + <button name="OK" text="Cambiar y continuar"/> + <button name="Cancel" text="Cancelar"/> + <ignore name="ignore" text="Teleportar (reiniciable): tus preferencias de contenido no te permiten visitar la región que has seleccionado."/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_Change"> + La región que intentas visitar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos. Puedes cambiar tus preferencias o bien cancelar el teleporte. Después de cambiar tus preferencias, intenta teleportarte otra vez. + <form name="form"> + <button name="OK" text="Cambiar preferencias"/> + <button name="Cancel" text="Cancelar"/> + <ignore name="ignore" text="Teleportar (no reiniciable): tus preferencias de contenido no te permiten visitar la región que has seleccionado."/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_PreferencesOutOfSync"> + Estamos experimentando dificultades técnicas con el teleporte porque tus preferencias no están sincronizadas con el servidor. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="PreferredMaturityChanged"> - Tu preferencia de nivel de calificación actual es [RATING]. + No recibirás más notificaciones cuando vayas a visitar una región con un contenido [RATING]. En el futuro, puedes cambiar tus preferencias de contenido en Yo > Preferencias > General en la barra de menús. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="MaturityChangeError"> + En este momento no se pueden cambiar tus preferencias para ver el contenido [PREFERRED_MATURITY]. Tus preferencias se han restablecido para que puedas ver el contenido [ACTUAL_MATURITY]. Si deseas cambiar las preferencias otra vez, en la barra de menús, selecciona Yo > Preferencias > General. + <usetemplate name="okbutton" yestext="OK"/> </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. - -Por favor, comprueba que tienes instalado el último visor, y dirÃgete a la Base de Conocimientos para más detalles sobre el acceso a zonas con este nivel de calificación. + Tus preferencias actuales de calificación de contenido te impiden reclamar el terreno que has seleccionado. Puedes cambiar las preferencias en Yo > Preferencias > General. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandClaimAccessBlocked_KB"> - No puedes reclamar este terreno por su nivel de calificación. - -¿Quieres ir a la Base de Conocimientos para más información sobre el nivel de calificación? + <notification name="LandClaimAccessBlocked_AdultsOnlyContent"> + Solo los adultos pueden reclamar este terreno. <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/es + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="No puedo reclamar este terreno dado el nivel de calificación" name="okcancelignore" notext="Cerrar" yestext="Ir a la Base de Conocimientos"/> + <usetemplate ignoretext="Solo los adultos pueden reclamar este terreno." name="okcancelignore" notext="Cerrar" yestext="Ir a la Base de Conocimientos"/> </notification> <notification name="LandClaimAccessBlocked_Notify"> - No puedes reclamar este terreno debido a su nivel de calificación. + El terreno que intentas reclamar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos. + </notification> + <notification name="LandClaimAccessBlocked_NotifyAdultsOnly"> + El terreno que intentas reclamar tiene un contenido [REGIONMATURITY], que solo es accesible para los adultos. </notification> <notification name="LandClaimAccessBlocked_Change"> - No puedes reclamar este terreno por tus preferencias sobre el nivel de calificación. - -Puedes pulsar 'Cambiar las Preferencias' para incrementar las preferencias del nivel de calificación y, asÃ, poder entrar. En adelante, podrás buscar y acceder a contenido [REGIONMATURITY]. Si más adelante quieres deshacer este cambio, ve a Yo > Preferencias > General. - <usetemplate ignoretext="Mis preferencias sobre el nivel de calificación me impiden reclamar este terreno" name="okcancelignore" notext="Cerrar" yestext="Cambiar preferencia"/> + El terreno que intentas reclamar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos. Podemos cambiar tus preferencias y después puedes volver a intentar reclamar el terreno. + <form name="form"> + <button name="OK" text="Cambiar preferencias"/> + <button name="Cancel" text="Cancelar"/> + <ignore name="ignore" text="Tus preferencias de contenido no te permiten reclamar el terreno que has seleccionado."/> + </form> </notification> <notification name="LandBuyAccessBlocked"> - No puedes comprar este terreno por su nivel de calificación. Puede deberse a que no hay información validada de tu edad. - -Por favor, comprueba que tienes instalado el último visor, y dirÃgete a la Base de Conocimientos para más detalles sobre el acceso a zonas con este nivel de calificación. + Tus preferencias actuales de calificación de contenido te impiden comprar el terreno que has seleccionado. Puedes cambiar las preferencias en Yo > Preferencias > General. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandBuyAccessBlocked_KB"> - No puedes comprar este terreno por tus preferencias de nivel de calificación. - -¿Quieres ir a la Base de Conocimientos para más información sobre el nivel de calificación? + <notification name="LandBuyAccessBlocked_AdultsOnlyContent"> + Solo los adultos pueden comprar este terreno. <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/es + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="No puedo comprar este terreno dado el nivel de calificación" name="okcancelignore" notext="Cerrar" yestext="Ir a la Base de Conocimientos"/> + <usetemplate ignoretext="Solo los adultos pueden comprar este terreno." name="okcancelignore" notext="Cerrar" yestext="Ir a la Base de Conocimientos"/> </notification> <notification name="LandBuyAccessBlocked_Notify"> - No puedes comprar este terreno por su nivel de calificación. + El terreno que intentas comprar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos. + </notification> + <notification name="LandBuyAccessBlocked_NotifyAdultsOnly"> + El terreno que intentas comprar tiene un contenido [REGIONMATURITY], que solo es accesible para los adultos. </notification> <notification name="LandBuyAccessBlocked_Change"> - No puedes comprar este terreno por tus preferencias sobre el nivel de calificación. - -Puedes pulsar 'Cambiar las Preferencias' para incrementar las preferencias del nivel de calificación y, asÃ, poder entrar. En adelante, podrás buscar y acceder a contenido [REGIONMATURITY]. Si más adelante quieres deshacer este cambio, ve a Yo > Preferencias > General. - <usetemplate ignoretext="Mis preferencias sobre el nivel de calificación me impiden comprar el terreno" name="okcancelignore" notext="Cerrar" yestext="Cambiar preferencia"/> + El terreno que intentas comprar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos. Podemos cambiar tus preferencias y después puedes volver a intentar comprar el terreno. + <form name="form"> + <button name="OK" text="Cambiar preferencias"/> + <button name="Cancel" text="Cancelar"/> + <ignore name="ignore" text="Tus preferencias de contenido no te permiten comprar el terreno que has seleccionado."/> + </form> </notification> <notification name="TooManyPrimsSelected"> Hay demasiados prims seleccionados. Por favor, selecciona [MAX_PRIM_COUNT] o menos y vuelve a intentarlo @@ -1834,10 +1928,9 @@ Puedes pulsar 'Cambiar las Preferencias' para incrementar las preferen </form> </notification> <notification label="Cambiada la calificación de la región" name="RegionMaturityChange"> - Se ha actualizado el nivel de calificación de esta región. + Se ha cambiando el nivel de calificación de esta región. Puede que lleve algún tiempo hasta que el cambio se vea reflejado en el mapa. - -Para entrar a regiones Adultas, los Residentes deben haber verificado su cuenta, bien verificando la edad o bien verificando una forma de pago. + <usetemplate name="okbutton" yestext="OK"/> </notification> <notification label="Desajuste en la versión de voz" name="VoiceVersionMismatch"> Esta versión de [APP_NAME] no es compatible con la prestación de voz de esta región. Para que el chat de voz funcione correctamente debes actualizar [APP_NAME]. @@ -2126,14 +2219,11 @@ PublÃcala en una página web para que otros puedan acceder fácilmente a esta p <usetemplate ignoretext="Ponerme la ropa que estoy creando mientras modifico mi apariencia" name="okcancelignore" notext="No" yestext="SÃ"/> </notification> <notification name="NotAgeVerified"> - Para acceder al contenido Adulto y los lugares de Second Life con dicho carácter, debes tener por lo menos 18 años. Visita la página de verificación de edad para confirmar que tienes más de 18 años. -Al hacerlo se iniciará el navegador web. - -[_URL] - <url name="url" option="0"> - https://secondlife.com/my/account/verification.php - </url> - <usetemplate ignoretext="No he verificado mi edad" name="okcancelignore" notext="Cancelar" yestext="Ir a Verificación de la edad"/> + El lugar que intentas visitar tiene el acceso restringido a los Residentes mayores de 18 años. + <usetemplate ignoretext="No tengo la edad suficiente para visitar áreas restringidas por edad." name="okignore" yestext="OK"/> + </notification> + <notification name="NotAgeVerified_Notify"> + Localización restringida para mayores de 18 años. </notification> <notification name="Cannot enter parcel: no payment info on file"> Para visitar este sitio debes haber aportado información de pago en tu cuenta. ¿Quieres ir al sitio web de [SECOND_LIFE] y configurar esto? @@ -2394,6 +2484,23 @@ Aquà no puedes volar. <notification name="NoBuild"> Este terreno tiene desactivado el poder construir. Aquà no puedes ni construir ni crear objetos. </notification> + <notification name="PathfindingDirty"> + La región contiene cambios de pathfinding pendientes. Si tienes derechos de construcción, puedes recargarla pulsando el botón “Recargar regiónâ€. + </notification> + <notification name="DynamicPathfindingDisabled"> + Esta región no tiene activado el pathfinding dinámico. Los objetos programados que utilicen llamadas LSL de pathfinding pueden tener un comportamiento inesperado en ella. + </notification> + <notification name="PathfindingRebakeNavmesh"> + Si cambias ciertos objetos en esta región, otros objetos móviles podrÃan tener un comportamiento incorrecto. Para que los objetos móviles se comporten correctamente, pulsa el botón “Recargar la regiónâ€. Si quieres más información, elige “Ayudaâ€. + <url name="url"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </url> + <usetemplate helptext="Ayuda" ignoretext="Si cambias ciertos objetos en esta región, otros objetos móviles podrÃan tener un comportamiento incorrecto." name="okhelpignore" yestext="OK"/> + </notification> + <notification name="PathfindingCannotRebakeNavmesh"> + Se ha producido un error. Puede haber ocurrido un problema en la red o el servidor, o quizás no tengas derechos de construcción. Este problema podrÃa resolverse cerrando la sesión e iniciando una sesión nueva. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="SeeAvatars"> Esta parcela oculta los avatares y el chat de texto de otras parcelas. No podrás ver a los residentes que estén fuera la parcela ni ellos podrán verte a ti. El chat de texto regular del canal 0 también está bloqueado. </notification> @@ -2412,9 +2519,7 @@ Los scripts no funcionan aquÃ, excepto los pertenecientes al propietario del te Sólo puedes reclamar terreno público de la región en que estás. </notification> <notification name="RegionTPAccessBlocked"> - No estás autorizado en esa región por su nivel de calificación. Debes validar tu edad y/o instalar el último visor. - -Por favor, dirÃgete a la Base de Conocimientos para más detalles sobre el acceso a zonas con este nivel de calificación. + Tus preferencias de contenido actuales te impiden visitar la región que has seleccionado. Puedes cambiar las preferencias en Yo > Preferencias > General. </notification> <notification name="URBannedFromRegion"> Se te ha prohibido el acceso a la región. @@ -2425,11 +2530,11 @@ Por favor, dirÃgete a la Base de Conocimientos para más detalles sobre el acce <notification name="ImproperPaymentStatus"> No tienes el estado de pago adecuado para entrar a esta región. </notification> - <notification name="MustGetAgeRgion"> - Debes tener verificada la edad para entrar a esta región + <notification name="MustGetAgeRegion"> + Solo pueden acceder a esta región los mayores de 18 años. </notification> <notification name="MustGetAgeParcel"> - Debes haber verificado tu edad para entrar a esta parcela. + Para acceder a esta parcela debes ser mayor de 18 años. </notification> <notification name="NoDestRegion"> No se ha encontrada la región de destino. @@ -2529,14 +2634,35 @@ Por favor, vuelve a intentarlo en unos momentos. </form> </notification> <notification name="TeleportOffered"> - [NAME_SLURL] te ha ofrecido teleportarte a su posición: + [NAME_SLURL] te ofrece teleportarte a su localización: -[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] <form name="form"> <button name="Teleport" text="Teleportar"/> <button name="Cancel" text="Cancelar"/> </form> </notification> + <notification name="TeleportOffered_MaturityExceeded"> + [NAME_SLURL] te ofrece teleportarte a su localización: + +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +Esta región tiene un contenido [REGION_CONTENT_MATURITY, pero tus preferencias actuales no te autorizan a ver los contenidos [REGION_CONTENT_MATURITY]. Podemos cambiar tus preferencias y proceder a teleportarte o bien tú puedes cancelar el teleporte. + <form name="form"> + <button name="Teleport" text="Cambiar y continuar"/> + <button name="Cancel" text="Cancelar"/> + </form> + </notification> + <notification name="TeleportOffered_MaturityBlocked"> + [NAME_SLURL] te ofrece teleportarte a su localización: + +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +No obstante, el contenido de esta región solo es accesible para los adultos. + </notification> <notification name="TeleportOfferSent"> Teleporte ofrecido a [TO_NAME] </notification> @@ -2933,6 +3059,10 @@ Has actualizado una textura obtenida mediante bake de [RESOLUTION] para '[B ( [EXISTENCE] segundos con vida ) Has actualizado de manera local una textura obtenida mediante bake de [RESOLUTION] para '[BODYREGION]' después de [TIME] segundos. </notification> + <notification name="LivePreviewUnavailable"> + No se puede mostrar una vista previa de esta textura porque es de tipo 'no copiable' y/o 'no transferible'. + <usetemplate ignoretext="Advertirme si el modo Vista previa inmediata no está disponible para las texturas 'no copiable' y/o 'no transferible'" name="okignore" yestext="OK"/> + </notification> <notification name="ConfirmLeaveCall"> ¿Estás seguro de que deseas salir de esta multiconferencia? <usetemplate ignoretext="Confirma antes de salir de la llamada" name="okcancelignore" notext="No" yestext="SÃ"/> @@ -3101,6 +3231,62 @@ Al ocultar el botón Hablar se desactiva la función de voz. Esta acción ocultará todos los botones y elementos de menú. Para restaurarlos, pulsa otra vez en [SHORTCUT]. <usetemplate ignoretext="Confirmar antes de ocultar la IU" name="okcancelignore" notext="Cancelar" yestext="OK"/> </notification> + <notification name="PathfindingLinksets_WarnOnPhantom"> + El indicador de inmaterial de algunos linksets seleccionados se conmutará. + +¿Quieres continuar? + <usetemplate ignoretext="El indicador de inmaterial de algunos linksets seleccionados se conmutará." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted"> + Algunos de los linksets seleccionados no pueden configurarse como '[REQUESTED_TYPE]' debido a restricciones de los permisos del linkset. Estos linksets se configurarán como '[RESTRICTED_TYPE]'. + +¿Quieres continuar? + <usetemplate ignoretext="Algunos de los linksets seleccionados no pueden configurarse debido a restricciones de los permisos del linkset." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnVolume"> + Algunos de los linksets seleccionados no pueden configurarse como '[REQUESTED_TYPE]' porque su forma no es convexa. + +¿Quieres continuar? + <usetemplate ignoretext="Algunos de los linksets seleccionados no pueden configurarse porque su forma no es convexa." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted"> + El indicador de inmaterial de algunos linksets seleccionados se conmutará. + +Algunos de los linksets seleccionados no pueden configurarse como '[REQUESTED_TYPE]' debido a restricciones de los permisos del linkset. Estos linksets se configurarán como '[RESTRICTED_TYPE]'. + +¿Quieres continuar? + <usetemplate ignoretext="El indicador de inmaterial de algunos linksets seleccionados se conmutará y otros no se podrán establecer debido a restricciones de los permisos del linkset." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnVolume"> + El indicador de inmaterial de algunos linksets seleccionados se conmutará. + +Algunos de los linksets seleccionados no pueden configurarse como '[REQUESTED_TYPE]' porque su forma no es convexa. + +¿Quieres continuar? + <usetemplate ignoretext="El indicador de inmaterial de algunos linksets seleccionados se conmutará y otros no se podrán establecer porque la forma no es convexa" name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted_MismatchOnVolume"> + Algunos de los linksets seleccionados no pueden configurarse como '[REQUESTED_TYPE]' debido a restricciones de los permisos del linkset. Estos linksets se configurarán como '[RESTRICTED_TYPE]'. + +Algunos de los linksets seleccionados no pueden configurarse como '[REQUESTED_TYPE]' porque su forma no es convexa. Los tipos de utilización de estos linksets no cambiarán. + +¿Quieres continuar? + <usetemplate ignoretext="Algunos de los linksets seleccionados no pueden configurarse debido a restricciones de los permisos del linkset y porque su forma no es convexa." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted_MismatchOnVolume"> + El indicador de inmaterial de algunos linksets seleccionados se conmutará. + +Algunos de los linksets seleccionados no pueden configurarse como '[REQUESTED_TYPE]' debido a restricciones de los permisos del linkset. Estos linksets se configurarán como '[RESTRICTED_TYPE]'. + +Algunos de los linksets seleccionados no pueden configurarse como '[REQUESTED_TYPE]' porque su forma no es convexa. Los tipos de utilización de estos linksets no cambiarán. + +¿Quieres continuar? + <usetemplate ignoretext="El indicador de inmaterial de algunos linksets seleccionados se conmutará y otros no se podrán establecer debido a restricciones de los permisos del linkset y porque su forma no es convexa." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_ChangeToFlexiblePath"> + El objeto que has seleccionado afecta al navmesh. Al cambiarlo a una Ruta flexible se eliminará del navmesh. + <usetemplate ignoretext="El objeto que has seleccionado afecta al navmesh. Al cambiarlo a una Ruta flexible se eliminará del navmesh." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> <global name="UnsupportedGLRequirements"> Parece que no tienes el hardware apropiado para [APP_NAME]. [APP_NAME] requiere una tarjeta gráfica OpenGL que admita texturas múltiples ('multitexture support'). Si la tienes, comprueba que tienes los últimos 'drivers' para tu tarjeta gráfica, asà como los últimos parches y 'service packs' para tu sistema operativo. @@ -3137,4 +3323,12 @@ Desactivando futuras actualizaciones de este archivo. Se ha intentado añadir un archivo de imagen [FNAME] no válido o ilegible, que no se puede abrir ni descodificar. Intento cancelado. </notification> + <notification name="PathfindingReturnMultipleItems"> + Vas a devolver [NUM_ITEMS] objetos. ¿Estás seguro de que deseas continuar? + <usetemplate ignoretext="¿Estás seguro de que quieres devolver varios objetos?" name="okcancelignore" notext="No" yestext="SÃ"/> + </notification> + <notification name="PathfindingDeleteMultipleItems"> + Vas a eliminar [NUM_ITEMS] objetos. ¿Estás seguro de que deseas continuar? + <usetemplate ignoretext="¿Estás seguro de que quieres eliminar varios elementos?" name="okcancelignore" notext="No" yestext="SÃ"/> + </notification> </notifications> diff --git a/indra/newview/skins/default/xui/es/panel_bottomtray.xml b/indra/newview/skins/default/xui/es/panel_bottomtray.xml deleted file mode 100644 index 2b1d017a2d..0000000000 --- a/indra/newview/skins/default/xui/es/panel_bottomtray.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="bottom_tray"> - <string name="DragIndicationImageName" value="Accordion_ArrowOpened_Off"/> - <string name="SpeakBtnToolTip" value="Activa/Desactiva el micrófono"/> - <string name="VoiceControlBtnToolTip" value="Muestra/Oculta el panel del control de voz"/> - <layout_stack name="toolbar_stack"> - <layout_panel name="speak_panel"> - <talk_button name="talk"> - <speak_button label="Hablar" label_selected="Hablar" name="speak_btn"/> - </talk_button> - </layout_panel> - <layout_panel name="gesture_panel"> - <gesture_combo_list label="Gestos" name="Gesture" tool_tip="Muestra/Oculta los gestos"/> - </layout_panel> - <layout_panel name="movement_panel"> - <bottomtray_button label="Moverme" name="movement_btn" tool_tip="Muestra/Oculta los controles del movimiento"/> - </layout_panel> - <layout_panel name="cam_panel"> - <bottomtray_button label="Visión" name="camera_btn" tool_tip="Muestra/Oculta los controles de la cámara"/> - </layout_panel> - <layout_panel name="snapshot_panel"> - <bottomtray_button label="" name="snapshots" tool_tip="Hacer una foto"/> - </layout_panel> - <layout_panel name="build_btn_panel"> - <bottomtray_button label="Construir" name="build_btn" tool_tip="Muestra/Oculta las herramientas de construcción"/> - </layout_panel> - <layout_panel name="search_btn_panel"> - <bottomtray_button label="Buscar" name="search_btn" tool_tip="Muestra/Oculta la búsqueda"/> - </layout_panel> - <layout_panel name="world_map_btn_panel"> - <bottomtray_button label="Mapa" name="world_map_btn" tool_tip="Muestra/Oculta el mapa del mundo"/> - </layout_panel> - <layout_panel name="mini_map_btn_panel"> - <bottomtray_button label="Minimapa" name="mini_map_btn" tool_tip="Muestra/Oculta el minimapa"/> - </layout_panel> - <layout_panel name="im_well_panel"> - <chiclet_im_well name="im_well"> - <button name="Unread IM messages" tool_tip="Conversaciones"/> - </chiclet_im_well> - </layout_panel> - <layout_panel name="notification_well_panel"> - <chiclet_notification name="notification_well"> - <button name="Unread" tool_tip="Notificaciones"/> - </chiclet_notification> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/es/panel_group_invite.xml b/indra/newview/skins/default/xui/es/panel_group_invite.xml index 0d877f78f2..319e9d0f1b 100644 --- a/indra/newview/skins/default/xui/es/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/es/panel_group_invite.xml @@ -9,6 +9,9 @@ <panel.string name="already_in_group"> Alguno de los Residentes que has elegido ya están en el grupo: no se les enviará la invitación. </panel.string> + <panel.string name="invite_selection_too_large"> + Las invitaciones al grupo no se han enviado: has seleccionado demasiados Residentes. Solo se permiten 100 invitaciones al grupo por solicitud. + </panel.string> <text bottom_delta="-96" height="72" name="help_text" width="214"> Puedes elegir a varios Residentes para invitarles a tu grupo. Para empezar, pulsa 'Abrir el selector de residentes'. </text> diff --git a/indra/newview/skins/default/xui/es/panel_login.xml b/indra/newview/skins/default/xui/es/panel_login.xml index 0e94cbe70b..1d7f077fe7 100644 --- a/indra/newview/skins/default/xui/es/panel_login.xml +++ b/indra/newview/skins/default/xui/es/panel_login.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_login"> - <panel.string name="create_account_url"> - http://join.secondlife.com/index.php?lang=es-ES - </panel.string> <panel.string name="forgot_password_url"> http://secondlife.com/account/request.php?lang=es </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> + <text name="log_in_text"> + INICIAR SESIÓN + </text> <text name="username_text"> Nombre de usuario: </text> @@ -15,34 +15,32 @@ <text name="password_text"> Contraseña: </text> - <check_box label="Recordar la contraseña" name="remember_check"/> - <button label="Iniciar sesión" name="connect_btn"/> - <text name="mode_selection_text"> - Modo: - </text> - <combo_box name="mode_combo" tool_tip="Selecciona el modo. Elige Básico para una exploración rápida y fácil y para chatear. Elige Avanzado para tener acceso a más funciones."> - <combo_box.item label="Básico" name="Basic"/> - <combo_box.item label="Avanzado" name="Advanced"/> - </combo_box> + </layout_panel> + <layout_panel name="start_location_panel"> <text name="start_location_text"> Empezar en: </text> <combo_box name="start_location_combo"> <combo_box.item label="Mi última posición" name="MyLastLocation"/> <combo_box.item label="Mi Base" name="MyHome"/> - <combo_box.item label="<Escribe en qué región>" name="Typeregionname"/> + <combo_box.item label="<Escribe el nombre de la región>" name="Typeregionname"/> </combo_box> </layout_panel> - <layout_panel name="links"> - <text name="create_new_account_text"> - Registrarme + <layout_panel name="links_login_panel"> + <text name="login_help"> + ¿Necesitas ayuda para conectarte? </text> <text name="forgot_password_text"> ¿Olvidaste el nombre de usuario o la contraseña? </text> - <text name="login_help"> - ¿Necesitas ayuda para conectarte? + <button label="Iniciar sesión" name="connect_btn"/> + <check_box label="Recordar la contraseña" name="remember_check"/> + </layout_panel> + <layout_panel name="links"> + <text name="create_account_text"> + CREA TU CUENTA </text> + <button label="Iniciar ahora" name="create_new_account_btn"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml index af2b6e920b..e6ca59f912 100644 --- a/indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="chat_bar"> +<panel name="nearby_chat"> <line_editor label="Pulsa aquà para chatear." name="chat_box" tool_tip="Pulsa Enter para decirlo o Ctrl+Enter para gritarlo"/> <button name="show_nearby_chat" tool_tip="Muestra o esconde el registro del chat"/> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml index aea9b9ce4a..b0b6114e88 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml @@ -29,5 +29,7 @@ <check_box label="Chats de MI" name="EnableIMChatPopups" tool_tip="Activa esta casilla para ver una ventana emergente cada vez que recibas un mensaje instantáneo"/> <spinner label="Duración de los interlocutores favoritos:" name="nearby_toasts_lifetime"/> <spinner label="Tiempo de los otros interlocutores:" name="nearby_toasts_fadingtime"/> - <button label="Configuración de la traducción del chat" name="ok_btn"/> + <button label="Traducción…" name="ok_btn"/> + <button label="Reemplazo automático..." name="autoreplace_showgui"/> + <button label="Revisión ortográfica..." name="spellcheck_showgui"/> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_region_debug.xml b/indra/newview/skins/default/xui/es/panel_region_debug.xml index 64162220a6..71bdba1a25 100644 --- a/indra/newview/skins/default/xui/es/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/es/panel_region_debug.xml @@ -36,5 +36,5 @@ <button label="?" left="297" name="top_scripts_help"/> <button label="Reiniciar la región" name="restart_btn" tool_tip="Cuenta atrás de 2 minutos y reiniciar la región"/> <button label="?" name="restart_help"/> - <button label="Retrasar el reinicio" name="cancel_restart_btn" tool_tip="Retrasar una hora el reinicio de la región"/> + <button label="Cancelar reinicio" name="cancel_restart_btn" tool_tip="Cancelar el reinicio de región"/> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_region_estate.xml b/indra/newview/skins/default/xui/es/panel_region_estate.xml index 84c1ed7686..6089dfb8db 100644 --- a/indra/newview/skins/default/xui/es/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/es/panel_region_estate.xml @@ -26,7 +26,7 @@ Permitir únicamente el acceso a los Residentes que: </text> <check_box label="Han aportado la información de pago." name="limit_payment" tool_tip="Para poder acceder a este estado los Residentes deben haber aportado información de pago en su cuenta. Para más información, ver [SUPPORT_SITE]."/> - <check_box label="Han verificado su edad" name="limit_age_verified" tool_tip="Para poder acceder a este estado los Residentes deben haber verificado su edad. Para más información, ver [SUPPORT_SITE]."/> + <check_box label="Son mayores de 18 años" name="limit_age_verified" tool_tip="Para poder acceder a este estado, los Residentes deben ser mayores de 18 años. Para más información, consulta [SUPPORT_SITE]."/> <check_box label="Permitir el chat de voz" name="voice_chat_check"/> <button label="?" name="voice_chat_help"/> <check_box label="Permitir el teleporte a cualquier punto" name="allow_direct_teleport"/> diff --git a/indra/newview/skins/default/xui/es/panel_region_texture.xml b/indra/newview/skins/default/xui/es/panel_region_texture.xml deleted file mode 100644 index 047e8f2f30..0000000000 --- a/indra/newview/skins/default/xui/es/panel_region_texture.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Texturas del terreno" name="Textures"> - <text name="region_text_lbl"> - Región: - </text> - <text name="region_text"> - desconocida - </text> - <text name="detail_texture_text" width="380"> - Texturas del terreno (se requieren archivos .tga de 512x512 y 24 bites) - </text> - <text name="height_text_lbl"> - 1 (Baja) - </text> - <text name="height_text_lbl2"> - 2 - </text> - <text name="height_text_lbl3"> - 3 - </text> - <text name="height_text_lbl4"> - 4 (Alta) - </text> - <text name="height_text_lbl5"> - Rangos de la elevación de la textura - </text> - <text name="height_text_lbl6"> - Noroeste - </text> - <text name="height_text_lbl7"> - Noreste - </text> - <text name="height_text_lbl8"> - Suroeste - </text> - <text name="height_text_lbl9"> - Sureste - </text> - <spinner label="Baja" name="height_start_spin_0"/> - <spinner label="Baja" name="height_start_spin_1"/> - <spinner label="Baja" name="height_start_spin_2"/> - <spinner label="Baja" name="height_start_spin_3"/> - <spinner label="Alta" name="height_range_spin_0"/> - <spinner label="Alta" name="height_range_spin_1"/> - <spinner label="Alta" name="height_range_spin_2"/> - <spinner label="Alta" name="height_range_spin_3"/> - <text name="height_text_lbl10"> - Estos valores representan la gama de mezclas para las texturas superiores. - </text> - <text name="height_text_lbl11"> - Midiendo en metros, el valor BAJA es la altura MÃXIMA de la textura #1, y el valor ALTA es la altura MÃNIMA de la textura #4. - </text> - <text name="height_text_lbl12"> - y el valor ALTA es la altura MÃNIMA de la textura #4. - </text> - <button label="Aplicar" name="apply_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/es/panel_side_tray.xml b/indra/newview/skins/default/xui/es/panel_side_tray.xml deleted file mode 100644 index cf5afb3cd1..0000000000 --- a/indra/newview/skins/default/xui/es/panel_side_tray.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<!-- Side tray cannot show background because it is always - partially on screen to hold tab buttons. --> -<side_tray name="sidebar"> - <sidetray_tab description="Manejar la barra lateral." name="sidebar_openclose" tab_title="Barra lateral"/> - <sidetray_tab description="Inicio." name="sidebar_home" tab_title="Inicio"> - <panel label="Inicio" name="panel_home"/> - </sidetray_tab> - <sidetray_tab description="Edita tu perfil público y tus destacados." name="sidebar_me" tab_title="Mi perfil"> - <panel_container name="panel_container"> - <panel label="Yo" name="panel_me"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="Encuentra a tus amigos, contactos y gente que esté cerca." name="sidebar_people" tab_title="Gente"> - <panel_container name="panel_container"> - <panel label="Perfil del grupo" name="panel_group_info_sidetray"/> - <panel label="Residentes y objetos ignorados" name="panel_block_list_sidetray"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="Encontrar lugares donde ir o que ya visitaste." label="Lugares" name="sidebar_places" tab_title="Lugares"> - <panel label="Lugares" name="panel_places"/> - </sidetray_tab> - <sidetray_tab description="Mira tu inventario." name="sidebar_inventory" tab_title="Mi inventario"> - <panel label="Modificar el inventario" name="sidepanel_inventory"/> - </sidetray_tab> - <sidetray_tab description="Cambia tu apariencia y tu 'look' actual." name="sidebar_appearance" tab_title="Mi apariencia"> - <panel label="Modificar la apariencia" name="sidepanel_appearance"/> - </sidetray_tab> -</side_tray> diff --git a/indra/newview/skins/default/xui/es/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/es/panel_volume_pulldown.xml new file mode 100644 index 0000000000..426783aa8e --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_volume_pulldown.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="volumepulldown_floater" width="215"> + <slider label="General" label_width="55" name="System Volume" width="155"/> + <slider label="Botones" label_width="55" name="UI Volume" width="155"/> + <slider label="Ambiental" label_width="55" name="Wind Volume" width="155"/> + <slider label="Sonidos" label_width="55" name="SFX Volume" width="155"/> + <check_box name="gesture_audio_play_btn" tool_tip="Activar sonidos de los gestos"/> + <slider label="Música" label_width="55" name="Music Volume" width="155"/> + <check_box name="enable_music" tool_tip="Activar música en streaming"/> + <slider label="Media" label_width="55" name="Media Volume" width="155"/> + <check_box name="enable_media" tool_tip="Activar media en streaming"/> + <slider label="Voz" label_width="55" name="Voice Volume" width="155"/> + <check_box name="enable_voice_check" tool_tip="Activar el chat de voz"/> +</panel> diff --git a/indra/newview/skins/default/xui/es/sidepanel_item_info.xml b/indra/newview/skins/default/xui/es/sidepanel_item_info.xml index ef7c6781be..176247f90e 100644 --- a/indra/newview/skins/default/xui/es/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/es/sidepanel_item_info.xml @@ -3,6 +3,9 @@ <panel.string name="unknown"> (desconocidas) </panel.string> + <panel.string name="unknown_multiple"> + (desconocido/múltiple) + </panel.string> <panel.string name="public"> (público) </panel.string> diff --git a/indra/newview/skins/default/xui/es/sidepanel_task_info.xml b/indra/newview/skins/default/xui/es/sidepanel_task_info.xml index bd814ecc66..9da2958953 100644 --- a/indra/newview/skins/default/xui/es/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/es/sidepanel_task_info.xml @@ -18,6 +18,12 @@ <panel.string name="text modify info 4"> No puedes modificar estos objetos </panel.string> + <panel.string name="text modify info 5"> + No se puede modificar este objeto a través del lÃmite de una región + </panel.string> + <panel.string name="text modify info 6"> + No se pueden modificar estos objetos a través del lÃmite de una región + </panel.string> <panel.string name="text modify warning"> Este objeto tiene partes enlazadas </panel.string> @@ -95,6 +101,9 @@ </combo_box> <spinner label="Precio: L$" name="Edit Cost"/> <check_box label="Mostrar en la búsqueda" name="search_check" tool_tip="Permitir que la gente vea este objeto en los resultados de la búsqueda"/> + <text name="pathfinding_attributes_label"> + Atributos de pathfinding: + </text> <text name="B:"> B: </text> diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index adc32ba168..52bcab54e5 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -128,7 +128,7 @@ Salir </string> <string name="create_account_url"> - http://join.secondlife.com/index.php?lang=es-ES + http://join.secondlife.com/index.php?lang=es-ES&sourceid=[sourceid] </string> <string name="LoginFailedViewerNotPermitted"> Ya no puedes acceder a Second Life con el visor que estás utilizando. Visita la siguiente página para descargar un nuevo visor: @@ -988,6 +988,9 @@ Intenta iniciar sesión de nuevo en unos instantes. <string name="script_files"> Scripts </string> + <string name="dictionary_files"> + Diccionarios + </string> <string name="AvatarSetNotAway"> Salir del estado ausente </string> @@ -1387,6 +1390,12 @@ Intenta iniciar sesión de nuevo en unos instantes. <string name="InvFolder favorite"> Mis Favoritos </string> + <string name="InvFolder Favorites"> + Mis Favoritos + </string> + <string name="InvFolder favorites"> + Mis Favoritos + </string> <string name="InvFolder Current Outfit"> Vestuario actual </string> @@ -1402,6 +1411,12 @@ Intenta iniciar sesión de nuevo en unos instantes. <string name="InvFolder Meshes"> Redes </string> + <string name="InvFolder Received Items"> + Objetos recibidos + </string> + <string name="InvFolder Merchant Outbox"> + Buzón de salida de comerciante + </string> <string name="InvFolder Friends"> Amigos </string> @@ -3780,6 +3795,12 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE]. <string name="LocationCtrlSeeAVsTooltip"> Los avatares están visibles y está permitido el chat fuera de esta parcela </string> + <string name="LocationCtrlPathfindingDirtyTooltip"> + Los objetos que se mueven pueden presentar un comportamiento incorrecto en la región hasta que ésta se recargue. + </string> + <string name="LocationCtrlPathfindingDisabledTooltip"> + Esta región no tiene activado el pathfinding dinámico. + </string> <string name="UpdaterWindowTitle"> Actualizar [APP_NAME] </string> @@ -4913,6 +4934,21 @@ Inténtalo incluyendo la ruta de acceso al editor entre comillas <string name="Normal"> Normal </string> + <string name="Pathfinding_Wiki_URL"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </string> + <string name="Pathfinding_Object_Attr_None"> + Ninguno + </string> + <string name="Pathfinding_Object_Attr_Permanent"> + Afecta al navmesh + </string> + <string name="Pathfinding_Object_Attr_Character"> + Personaje + </string> + <string name="Pathfinding_Object_Attr_MultiSelect"> + (Múltiple) + </string> <string name="snapshot_quality_very_low"> Muy bajo </string> @@ -4928,4 +4964,10 @@ Inténtalo incluyendo la ruta de acceso al editor entre comillas <string name="snapshot_quality_very_high"> Muy alto </string> + <string name="TeleportMaturityExceeded"> + El Residente no puede visitar esta región. + </string> + <string name="UserDictionary"> + [Usuario] + </string> </strings> diff --git a/indra/newview/skins/default/xui/es/teleport_strings.xml b/indra/newview/skins/default/xui/es/teleport_strings.xml index a23d9c43d0..94975a83f8 100644 --- a/indra/newview/skins/default/xui/es/teleport_strings.xml +++ b/indra/newview/skins/default/xui/es/teleport_strings.xml @@ -44,6 +44,9 @@ Para repetir el tutorial, visita la isla de bienvenida pública. <message name="no_inventory_host"> En estos momentos no está disponible el sistema del inventario. </message> + <message name="MustGetAgeRegion"> + Solo pueden acceder a esta región los mayores de 18 años. + </message> </message_set> <message_set name="progress"> <message name="sending_dest"> @@ -79,5 +82,8 @@ Para repetir el tutorial, visita la isla de bienvenida pública. <message name="requesting"> Solicitando teleporte... </message> + <message name="pending"> + Teleporte pendiente... + </message> </message_set> </teleport_messages> diff --git a/indra/newview/skins/default/xui/fr/floater_about.xml b/indra/newview/skins/default/xui/fr/floater_about.xml index 4409949584..a659cb4245 100644 --- a/indra/newview/skins/default/xui/fr/floater_about.xml +++ b/indra/newview/skins/default/xui/fr/floater_about.xml @@ -66,27 +66,26 @@ Version serveur vocal : [VOICE_VERSION] </panel> <panel label="Licences" name="licenses_panel"> <text_editor name="credits_editor"> - 3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion - APR Copyright (C) 2000-2004 The Apache Software Foundation - Collada DOM Copyright 2005 Sony Computer Entertainment Inc. - cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se) + 3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion + APR Copyright (C) 2011 The Apache Software Foundation + Collada DOM Copyright 2006 Sony Computer Entertainment Inc. + cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se) DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc. expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. - FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org). + FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm et Werner Lemberg. GL Copyright (C) 1999-2004 Brian Paul. - GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University et David Luebke, Brenden Schubert, University of Virginia. + GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University, et David Luebke, Brenden Schubert, University of Virginia. google-perftools Copyright (c) 2005, Google Inc. Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited. jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW) jpeglib Copyright (C) 1991-1998, Thomas G. Lane. - ogg/vorbis Copyright (C) 2001, Xiphophorus - OpenSSL Copyright (C) 1998-2002 The OpenSSL Project. - PCRE Copyright (c) 1997-2008 University of Cambridge + ogg/vorbis Copyright (C) 2002, Xiphophorus + OpenSSL Copyright (C) 1998-2008 The OpenSSL Project. + PCRE Copyright (c) 1997-2012 University of Cambridge SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) xmlrpc-epi Copyright (C) 2000 Epinions, Inc. - zlib Copyright (C) 1995-2002 Jean-loup Gailly et Mark Adler. - google-perftools Copyright (c) 2005, Google Inc. + zlib Copyright (C) 1995-2012 Jean-Loup Gailly et Mark Adler. Le client Second Life utilise Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (et ses concédants de licence). Tous droits réservés. Pour plus de détails, consultez le site Web www.havok.com. 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 49af1a87e1..25c49b97b5 100644 --- a/indra/newview/skins/default/xui/fr/floater_about_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml @@ -134,7 +134,7 @@ <text name="DwellText"> Chargement... </text> - <button label="Acheter du terrain" label_selected="Acheter le terrain..." left_delta="60" name="Buy Land..." width="125"/> + <button label="Acheter le terrain" label_selected="Acheter le terrain..." left_delta="60" name="Buy Land..." width="125"/> <button label="Vente Linden" label_selected="Vente Linden..." name="Linden Sale..." tool_tip="Le terrain doit être la propriété d'un résident, avoir un contenu défini et ne pas être aux enchères."/> <button label="Infos sur les scripts" name="Scripts..." width="110"/> <button label="Acheter pour le groupe" label_selected="Acheter pour le groupe..." name="Buy For Group..."/> @@ -339,7 +339,7 @@ Seules les parcelles de grande taille peuvent apparaître dans la recherche. <check_box label="Groupe" name="check group scripts"/> <check_box label="Sécurisé (pas de dégâts)" name="check safe" tool_tip="Si cette option est cochée, le terrain est sécurisé et il n'y pas de risques de dommages causés par des combats. Si elle est décochée, des dommages causés par les combats peuvent avoir lieu."/> <check_box label="Pas de bousculades" name="PushRestrictCheck" tool_tip="Empêche l'utilisation de scripts causant des bousculades. Cette option est utile pour empêcher les comportements abusifs sur votre terrain."/> - <check_box label="Afficher le lieu dans la recherche (30 L$/semaine)" name="ShowDirectoryCheck" tool_tip="Afficher la parcelle dans les résultats de recherche"/> + <check_box label="Voir le lieu dans la recherche (30 L$/sem.)" name="ShowDirectoryCheck" tool_tip="Afficher la parcelle dans les résultats de recherche"/> <combo_box name="land category with adult"> <combo_box.item label="Toutes catégories" name="item0"/> <combo_box.item label="Appartenant aux Lindens" name="item1"/> @@ -377,7 +377,7 @@ Seules les parcelles de grande taille peuvent apparaître dans la recherche. </text> <texture_picker label="" name="snapshot_ctrl" tool_tip="Cliquez pour sélectionner une image"/> <text name="allow_label5"> - Les avatars présents sur d'autres parcelles peuvent voir et chatter avec les avatars présents sur cette parcelle. + Les avatars sur d'autres parcelles peuvent voir et chatter avec les avatars sur cette parcelle. </text> <check_box label="Voir les avatars" name="SeeAvatarsCheck" tool_tip="Permettre aux avatars présents sur d'autres parcelles de voir et chatter avec les avatars présents sur cette parcelle et à vous de les voir et de chatter avec eux."/> <text name="landing_point"> @@ -470,7 +470,7 @@ musique : Conditions d'accès des résidents : </text> <check_box label="Informations de paiement enregistrées [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="Pour pouvoir accéder à cette parcelle, les résidents doivent avoir enregistré des informations de paiement. Consultez le [SUPPORT_SITE] pour plus d'informations."/> - <check_box label="Âge vérifié [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Pour que les résidents puissent accéder à cette parcelle, leur âge doit avoir fait l'objet d'une vérification. Consultez le [SUPPORT_SITE] pour plus d'informations."/> + <check_box label="Avoir plus de 18 ans [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Pour accéder à cette parcelle, les résidents doivent avoir au moins 18 ans. Consultez le [SUPPORT_SITE] pour plus d'informations."/> <check_box label="Autoriser l'accès au groupe : [GROUP]" name="GroupCheck" tool_tip="Définir le groupe à l'onglet Général."/> <check_box label="Vendre des pass à  :" name="PassCheck" tool_tip="Autoriser un accès temporaire à cette parcelle"/> <combo_box name="pass_combo" width="110"> diff --git a/indra/newview/skins/default/xui/fr/floater_animation_preview.xml b/indra/newview/skins/default/xui/fr/floater_animation_preview.xml deleted file mode 100644 index aa42fe6150..0000000000 --- a/indra/newview/skins/default/xui/fr/floater_animation_preview.xml +++ /dev/null @@ -1,189 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Animation Preview" title=""> - <floater.string name="failed_to_initialize"> - Echec de l'initialisation du mouvement - </floater.string> - <floater.string name="anim_too_long"> - Le fichier d'animation fait [LENGTH] secondes. - -La longueur maximale est de [MAX_LENGTH] secondes. - </floater.string> - <floater.string name="failed_file_read"> - Impossible de lire le fichier d'animation. - -[STATUS] - </floater.string> - <floater.string name="E_ST_OK"> - Ok - </floater.string> - <floater.string name="E_ST_EOF"> - Fichier incomplet. - </floater.string> - <floater.string name="E_ST_NO_CONSTRAINT"> - Impossible de lire la définition des contraintes. - </floater.string> - <floater.string name="E_ST_NO_FILE"> - Impossible d'ouvrir le fichier BVH. - </floater.string> - <floater.string name="E_ST_NO_HIER"> - En-tête HIERARCHY non valide. - </floater.string> - <floater.string name="E_ST_NO_JOINT"> - Impossible de trouver ROOT ou JOINT. - </floater.string> - <floater.string name="E_ST_NO_NAME"> - Impossible de trouver le nom JOINT. - </floater.string> - <floater.string name="E_ST_NO_OFFSET"> - Impossible de trouver OFFSET. - </floater.string> - <floater.string name="E_ST_NO_CHANNELS"> - Impossible de trouver les CHANNELS. - </floater.string> - <floater.string name="E_ST_NO_ROTATION"> - Impossible d'obtenir l'ordre de rotation. - </floater.string> - <floater.string name="E_ST_NO_AXIS"> - Impossible d'obtenir l'axe de rotation. - </floater.string> - <floater.string name="E_ST_NO_MOTION"> - Impossible de trouver MOTION. - </floater.string> - <floater.string name="E_ST_NO_FRAMES"> - Impossible d'obtenir le nombre de cadres. - </floater.string> - <floater.string name="E_ST_NO_FRAME_TIME"> - Impossible d'obtenir le temps du cadre. - </floater.string> - <floater.string name="E_ST_NO_POS"> - Impossible de trouver les valeurs de la position. - </floater.string> - <floater.string name="E_ST_NO_ROT"> - Impossible de trouver les valeurs de rotation. - </floater.string> - <floater.string name="E_ST_NO_XLT_FILE"> - Impossible d'ouvrir le fichier de traduction. - </floater.string> - <floater.string name="E_ST_NO_XLT_HEADER"> - Impossible de lire l'en-tête de traduction. - </floater.string> - <floater.string name="E_ST_NO_XLT_NAME"> - Impossible de lire la traduction. - </floater.string> - <floater.string name="E_ST_NO_XLT_IGNORE"> - Impossible de lire la traduction. - </floater.string> - <floater.string name="E_ST_NO_XLT_RELATIVE"> - Impossible de lire la valeur de traduction relative. - </floater.string> - <floater.string name="E_ST_NO_XLT_OUTNAME"> - Impossible de lire la traduction. - </floater.string> - <floater.string name="E_ST_NO_XLT_MATRIX"> - Impossible de lire la matrice de traduction. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGECHILD"> - Impossible de trouver le nom mergechild. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGEPARENT"> - Impossible de trouver le nom mergeparent. - </floater.string> - <floater.string name="E_ST_NO_XLT_PRIORITY"> - Impossible de définir la valeur de la priorité. - </floater.string> - <floater.string name="E_ST_NO_XLT_LOOP"> - Impossible de définir la valeur de la boucle - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEIN"> - Impossible de trouver les valeurs easeIn. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEOUT"> - Impossible de trouver les valeurs easeOut. - </floater.string> - <floater.string name="E_ST_NO_XLT_HAND"> - Impossible d'obtenir la valeur hand morph. - </floater.string> - <floater.string name="E_ST_NO_XLT_EMOTE"> - Impossible de lire le nom emote. - </floater.string> - <floater.string name="E_ST_BAD_ROOT"> - Nom de racine incorrect. - </floater.string> - <text name="name_label"> - Nom : - </text> - <text name="description_label"> - Description : - </text> - <spinner label="Priorité" name="priority" tool_tip="Contrôle quelles autres animations peuvent être remplacées par cette animation"/> - <check_box label="Boucle" left="6" name="loop_check" tool_tip="Lit cette animation en boucle"/> - <spinner label="Début (%)" label_width="65" name="loop_in_point" tool_tip="Définit un point de l'animation auquel retourne la boucle" width="105"/> - <spinner label="Fin (%)" name="loop_out_point" tool_tip="Définit un point de l'animation qui met fin à la boucle"/> - <text name="hand_label"> - Mouvement de -main - </text> - <combo_box label="" name="hand_pose_combo" tool_tip="Contrôle ce que font les mains pendant l'animation"> - <combo_box.item label="Espacement" name="Spread"/> - <combo_box.item label="Détendues" name="Relaxed"/> - <combo_box.item label="Pointer (les deux)" name="PointBoth"/> - <combo_box.item label="Poing" name="Fist"/> - <combo_box.item label="Détendue (gauche)" name="RelaxedLeft"/> - <combo_box.item label="Pointer (gauche)" name="PointLeft"/> - <combo_box.item label="Poing (gauche)" name="FistLeft"/> - <combo_box.item label="Détendue (droite)" name="RelaxedRight"/> - <combo_box.item label="Pointer (droite)" name="PointRight"/> - <combo_box.item label="Poing (droite)" name="FistRight"/> - <combo_box.item label="Saluer (droite)" name="SaluteRight"/> - <combo_box.item label="Taper" name="Typing"/> - <combo_box.item label="Paix (main droite)" name="PeaceRight"/> - </combo_box> - <text name="emote_label"> - Expression - </text> - <combo_box label="" name="emote_combo" tool_tip="Contrôle ce que fait le visage pendant l'animation"> - <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."> - <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"/> - <button label="" name="play_btn" tool_tip="Lire votre animation"/> - <button name="pause_btn" tool_tip="Pauser votre animation"/> - <button label="" name="stop_btn" tool_tip="Arrêter le playback"/> - <slider label="" name="playback_slider"/> - <text name="bad_animation_text"> - Impossible de lire le fichier d'animation. - -Nous recommandons les fichiers BVH extraits de Poser 4. - </text> - <button label="Charger ([AMOUNT] L$)" name="ok_btn"/> - <button label="Annuler" name="cancel_btn"/> -</floater> diff --git a/indra/newview/skins/default/xui/fr/floater_autoreplace.xml b/indra/newview/skins/default/xui/fr/floater_autoreplace.xml new file mode 100644 index 0000000000..1d19181692 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/floater_autoreplace.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="autoreplace_floater" title="Paramètres Rechercher/Remplacer"> + <check_box label="Activer la fonction Rechercher/Remplacer" name="autoreplace_enable" tool_tip="Lors de la saisie du texte d'un chat, remplace chaque mot-clé spécifié par la valeur correspondante."/> + <button label="Importer une liste..." name="autoreplace_import_list" tool_tip="Charger une liste précédemment exportée à partir d'un fichier."/> + <button label="Exporter la liste..." name="autoreplace_export_list" tool_tip="Enregistrer la liste sélectionnée dans un fichier afin de pouvoir la partager."/> + <button label="Nouvelle liste..." name="autoreplace_new_list" tool_tip="Créer une nouvelle liste."/> + <button label="Supprimer la liste" name="autoreplace_delete_list" tool_tip="Supprimer la liste sélectionnée."/> + <button name="autoreplace_list_up" tool_tip="Augmenter la priorité de cette liste."/> + <button name="autoreplace_list_down" tool_tip="Diminuer la priorité de cette liste."/> + <scroll_list name="autoreplace_list_replacements"> + <scroll_list.columns label="Mot-clé" name="keyword"/> + <scroll_list.columns label="Remplacement" name="replacement"/> + </scroll_list> + <button label="Ajouter..." name="autoreplace_add_entry"/> + <button label="Supprimer" name="autoreplace_delete_entry"/> + <button label="Enregistrer" name="autoreplace_save_entry" tool_tip="Enregistrer cette entrée."/> + <button label="Enregistrer les modifications" name="autoreplace_save_changes" tool_tip="Enregistrer toutes les modifications."/> + <button label="Annuler" name="autoreplace_cancel" tool_tip="Ignorer toutes les modifications."/> +</floater> +<!-- + <text + top_pad="10" + left="10" + height="16" + width="260" + follows="left|top" + halign="center" + mouse_opaque="true" + name="autoreplace_text2"> + Entries + </text> +--> diff --git a/indra/newview/skins/default/xui/fr/floater_camera.xml b/indra/newview/skins/default/xui/fr/floater_camera.xml index f2b0ee8af3..893e389f69 100644 --- a/indra/newview/skins/default/xui/fr/floater_camera.xml +++ b/indra/newview/skins/default/xui/fr/floater_camera.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="camera_floater" title="PARAMÈTRES DE LA CAMÉRA"> +<floater name="camera_floater" title="CONTRÔLE DE LA CAMÉRA"> <floater.string name="rotate_tooltip"> Faire tourner la caméra autour du point central </floater.string> diff --git a/indra/newview/skins/default/xui/fr/floater_chat_bar.xml b/indra/newview/skins/default/xui/fr/floater_chat_bar.xml index 890411d091..7dcb9a280d 100644 --- a/indra/newview/skins/default/xui/fr/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/fr/floater_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="chat_bar" title="CHAT PRÈS DE MOI"> +<floater name="nearby_chat" title="CHAT PRÈS DE MOI"> <panel name="bottom_panel"> <line_editor label="Cliquer ici pour chatter." name="chat_box" tool_tip="Appuyer sur Entrée pour dire, Ctrl+Entrée pour crier"/> <button name="show_nearby_chat" tool_tip="Afficher/masquer le journal de chat près de vous."/> diff --git a/indra/newview/skins/default/xui/fr/floater_edit_day_cycle.xml b/indra/newview/skins/default/xui/fr/floater_edit_day_cycle.xml index 0100419bc5..5ec68458e1 100644 --- a/indra/newview/skins/default/xui/fr/floater_edit_day_cycle.xml +++ b/indra/newview/skins/default/xui/fr/floater_edit_day_cycle.xml @@ -22,13 +22,13 @@ Remarque : si vous changez votre préréglage de nom, un nouveau préréglage sera créé et celui existant restera tel quel. </text> <text name="hint_item1"> - - Cliquez sur un repère pour modifier le réglage du ciel et l'heure associés. + - Modifier un réglage de ciel/heure : clic sur le repère </text> <text name="hint_item2"> - - Cliquez sur les repères et faites-les glisser afin de définir les heures de transition. + - Heures de transition : clic-glissement des repères </text> <text name="hint_item3"> - - Déplacez le marqueur en forme de triangle pour afficher un aperçu du cycle du jour. + - Aperçu du cycle du jour : déplacement du triangle </text> <panel name="day_cycle_slider_panel"> <multi_slider initial_value="0" name="WLTimeSlider"/> @@ -91,11 +91,11 @@ </text> </panel> <text name="WLCurKeyPresetText"> - Réglage du ciel : + Régl. ciel : </text> <combo_box label="Préréglage" name="WLSkyPresets"/> <text name="WLCurKeyTimeText"> - Heure : + H. : </text> <time name="time" value="6h"/> <check_box label="Appliquer ce nouveau cycle du jour" name="make_default_cb"/> diff --git a/indra/newview/skins/default/xui/fr/floater_environment_settings.xml b/indra/newview/skins/default/xui/fr/floater_environment_settings.xml index 9ea47a3dd7..ea12749d27 100644 --- a/indra/newview/skins/default/xui/fr/floater_environment_settings.xml +++ b/indra/newview/skins/default/xui/fr/floater_environment_settings.xml @@ -18,7 +18,7 @@ <combo_box.item label="-Effectuer une sélection-" name="item0"/> </combo_box> <text name="sky_dayc_settings_title"> - Ciel / Cycle du jour + Ciel/Cycle du jour </text> <radio_group name="sky_dayc_settings_radio_group"> <radio_item label="Ciel fixe" name="my_sky_settings"/> 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 e4c53d866c..0d21a8af32 100644 --- a/indra/newview/skins/default/xui/fr/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/fr/floater_god_tools.xml @@ -71,8 +71,8 @@ <button label="Supprimer tous les objets scriptés de la cible sur les terrains des autres" label_selected="Supprimer tous les objets scriptés de la cible sur les terrains des autres" name="Delete Target's Scripted Objects On Others Land" tool_tip="Supprimer tous les objets scriptés appartenant à la cible sur les terrains ne lui appartenant pas. Les objets non copiables seront renvoyés."/> <button label="Supprimer les objets scriptés de la cible sur *tous* les terrains" label_selected="Supprimer les objets scriptés de la cible sur *tous* les terrains" name="Delete Target's Scripted Objects On *Any* Land" tool_tip="Supprimer les objets scriptés appartenant à la cible dans cette région. Les objets non copiables seront renvoyés."/> <button label="Supprimer *tous* les objets de la cible" label_selected="Supprimer *tous* les objets de la cible" name="Delete *ALL* Of Target's Objects" tool_tip="Supprimer tous les objets appartenant à la cible dans cette région. Les objets non copiables seront renvoyés."/> - <button label="Afficher les collisions les plus consommatrices" label_selected="Afficher les collisions les plus consommatrices" name="Get Top Colliders" tool_tip="Dresse une liste des objets avec les callbacks les plus fréquents. " width="300"/> - <button label="Afficher les objets scriptés les plus consommateurs" label_selected="Afficher les objets scriptés les plus consommateurs" name="Get Top Scripts" tool_tip="Dresse une liste des objets qui passent le plus de temps à exécuter des scripts." width="300"/> + <button label="Collisions les plus consommatrices" label_selected="Collisions les plus consommatrices" name="Get Top Colliders" tool_tip="Liste des objets avec les callbacks les plus fréquents. " width="300"/> + <button label="Scripts les plus consommateurs" label_selected="Scripts les plus consommateurs" name="Get Top Scripts" tool_tip="Liste des objets passant le plus de temps à exécuter des scripts." width="300"/> <button label="Résumé des scripts" label_selected="Résumé des scripts" name="Scripts digest" tool_tip="Dresse une liste des scripts et de leurs occurrences." width="300"/> </panel> <panel label="Requête" name="request"> diff --git a/indra/newview/skins/default/xui/fr/floater_inventory.xml b/indra/newview/skins/default/xui/fr/floater_inventory.xml deleted file mode 100644 index 200c07e522..0000000000 --- a/indra/newview/skins/default/xui/fr/floater_inventory.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="MON INVENTAIRE"> - <floater.string name="Title"> - MON INVENTAIRE - </floater.string> - <floater.string name="TitleFetching"> - MON INVENTAIRE (récupération de [ITEM_COUNT] articles en cours) [FILTER] - </floater.string> - <floater.string name="TitleCompleted"> - MON INVENTAIRE ([ITEM_COUNT] articles) [FILTER] - </floater.string> - <floater.string name="Fetched"> - Récupéré - </floater.string> - <panel label="Panneau Inventaire" name="Inventory Panel"/> -</floater> diff --git a/indra/newview/skins/default/xui/fr/floater_land_holdings.xml b/indra/newview/skins/default/xui/fr/floater_land_holdings.xml index 10fe132623..ff728e3aaa 100644 --- a/indra/newview/skins/default/xui/fr/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/fr/floater_land_holdings.xml @@ -7,7 +7,7 @@ <column label="Surface" name="area"/> <column label="" name="hidden"/> </scroll_list> - <button label="Téléporter" label_selected="Téléporter" name="Teleport" tool_tip="Téléportez-vous au milieu de ce terrain."/> + <button label="Téléportation" label_selected="Téléportation" name="Teleport" tool_tip="Téléportez-vous au milieu de ce terrain."/> <button label="Carte" label_selected="Carte" name="Show on Map" tool_tip="Afficher ce terrain sur la carte du monde"/> <text name="contrib_label"> Vos contributions : diff --git a/indra/newview/skins/default/xui/fr/floater_model_preview.xml b/indra/newview/skins/default/xui/fr/floater_model_preview.xml index 0f272891c7..bd3dae6599 100644 --- a/indra/newview/skins/default/xui/fr/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/fr/floater_model_preview.xml @@ -92,19 +92,54 @@ <text initial_value="Triangles" name="triangles" value="Triangles"/> <text initial_value="Sommets" name="vertices" value="Sommets"/> <text initial_value="Élevé" name="high_label" value="Élevé"/> + <combo_box name="lod_source_high"> + <item name="Load from file" value="Depuis un fichier"/> + <item name="Generate" value="Génération"/> + </combo_box> <button label="Parcourir..." name="lod_browse_high"/> + <combo_box name="lod_mode_high"> + <item name="Triangle Limit" value="Triangles max"/> + <item name="Error Threshold" value="Seuil d'erreur"/> + </combo_box> <text initial_value="0" name="high_triangles" value="0"/> <text initial_value="0" name="high_vertices" value="0"/> <text initial_value="Moyen" name="medium_label" value="Moyen"/> + <combo_box name="lod_source_medium"> + <item name="Load from file" value="Depuis un fichier"/> + <item name="Generate" value="Génération"/> + <item name="Use LoD above" value="Niveau de détail du dessus"/> + </combo_box> <button label="Parcourir..." name="lod_browse_medium"/> + <combo_box name="lod_mode_medium"> + <item name="Triangle Limit" value="Triangles max"/> + <item name="Error Threshold" value="Seuil d'erreur"/> + </combo_box> <text initial_value="0" name="medium_triangles" value="0"/> <text initial_value="0" name="medium_vertices" value="0"/> <text initial_value="Faible" name="low_label" value="Faible"/> + <combo_box name="lod_source_low"> + <item name="Load from file" value="Depuis un fichier"/> + <item name="Generate" value="Génération"/> + <item name="Use LoD above" value="Niveau de détail du dessus"/> + </combo_box> <button label="Parcourir..." name="lod_browse_low"/> + <combo_box name="lod_mode_low"> + <item name="Triangle Limit" value="Triangles max"/> + <item name="Error Threshold" value="Seuil d'erreur"/> + </combo_box> <text initial_value="0" name="low_triangles" value="0"/> <text initial_value="0" name="low_vertices" value="0"/> <text initial_value="Le plus faible" name="lowest_label" value="Le plus faible"/> + <combo_box name="lod_source_lowest"> + <item name="Load from file" value="Depuis un fichier"/> + <item name="Generate" value="Génération"/> + <item name="Use LoD above" value="Niveau de détail du dessus"/> + </combo_box> <button label="Parcourir..." name="lod_browse_lowest"/> + <combo_box name="lod_mode_lowest"> + <item name="Triangle Limit" value="Triangles max"/> + <item name="Error Threshold" value="Seuil d'erreur"/> + </combo_box> <text initial_value="0" name="lowest_triangles" value="0"/> <text initial_value="0" name="lowest_vertices" value="0"/> <check_box label="Génération de normales" name="gen_normals"/> @@ -166,7 +201,7 @@ Passes : </text> <text name="Detail Scale label"> - Échelle de détail : + Échelle détail : </text> <text name="Retain%_label"> Retenue : @@ -192,7 +227,7 @@ </panel> <panel label="Option de chargement" name="modifiers_panel"> <text name="scale_label"> - Echelle (1 = pas d'échelle) : + Échelle (1 = aucune) : </text> <spinner name="import_scale" value="1.0"/> <text name="dimensions_label"> @@ -203,12 +238,12 @@ </text> <check_box label="Inclure les textures" name="upload_textures"/> <text name="include_label"> - Pour les modèles d'avatar uniquement : + Modèles d'avatar uniquement : </text> - <check_box label="Inclure la pondération de la peau :" name="upload_skin"/> - <check_box label="Inclure la position des articulations :" name="upload_joints"/> + <check_box label="Inclure pondération de la peau :" name="upload_skin"/> + <check_box label="Inclure position des articulations :" name="upload_joints"/> <text name="pelvis_offset_label"> - Décalage Z (élever ou abaisser l'avatar) : + Décalage Z (élever/abaisser l'avatar) : </text> <spinner name="pelvis_offset" value="0.0"/> </panel> @@ -217,7 +252,7 @@ <button label="Calculer les poids et les frais" name="calculate_btn" tool_tip="Calculer les poids et les frais."/> <button label="Annuler" name="cancel_btn"/> <button label="Charger le modèle" name="ok_btn" tool_tip="Charger dans le simulateur"/> - <button label="Effacer les paramètres et réinitialiser le formulaire" name="reset_btn"/> + <button label="Effacer les paramètres / réinitialiser le formulaire" name="reset_btn"/> <text name="upload_fee"> Frais de chargement : [FEE] L$ </text> diff --git a/indra/newview/skins/default/xui/fr/floater_nearby_chat.xml b/indra/newview/skins/default/xui/fr/floater_nearby_chat.xml deleted file mode 100644 index 8bbd34baae..0000000000 --- a/indra/newview/skins/default/xui/fr/floater_nearby_chat.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="nearby_chat" title="CHAT PRÈS DE MOI"> - <check_box label="Traduction du chat" name="translate_chat_checkbox"/> -</floater> diff --git a/indra/newview/skins/default/xui/fr/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/fr/floater_pathfinding_characters.xml new file mode 100644 index 0000000000..7c9109c011 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/floater_pathfinding_characters.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_characters" title="Personnages de recherche de chemin"> + <floater.string name="messaging_get_inprogress"> + Requête relative aux personnages de recherche de chemin en cours... + </floater.string> + <floater.string name="messaging_get_error"> + Erreur lors de la requête relative aux personnages de recherche de chemin. + </floater.string> + <floater.string name="messaging_complete_none_found"> + Aucun personnage de recherche de chemin. + </floater.string> + <floater.string name="messaging_complete_available"> + [NUM_SELECTED] personnages sélectionnés sur [NUM_TOTAL]. + </floater.string> + <floater.string name="messaging_not_enabled"> + La recherche de chemin n'a pas été activée pour cette région. + </floater.string> + <floater.string name="character_cpu_time"> + [CPU_TIME] µs + </floater.string> + <floater.string name="character_owner_loading"> + [Chargement] + </floater.string> + <floater.string name="character_owner_unknown"> + [Inconnu] + </floater.string> + <floater.string name="character_owner_group"> + [Groupe] + </floater.string> + <panel> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Nom" name="name"/> + <scroll_list.columns label="Description" name="description"/> + <scroll_list.columns label="Propriétaire" name="owner"/> + <scroll_list.columns label="CPU" name="cpu_time"/> + <scroll_list.columns label="Altitude" name="altitude"/> + </scroll_list> + <text name="messaging_status"> + Personnages : + </text> + <button label="Actualiser" name="refresh_objects_list"/> + <button label="Tout sélectionner" name="select_all_objects"/> + <button label="Ne rien sélectionner" name="select_none_objects"/> + </panel> + <panel> + <text name="actions_label"> + Actions sur les personnages sélectionnés : + </text> + <check_box label="Afficher la balise" name="show_beacon"/> + <check_box label="Afficher la capsule physique" name="show_physics_capsule"/> + <button label="Prendre" name="take_objects"/> + <button label="Prendre une copie" name="take_copy_objects"/> + <button label="M'y téléporter" name="teleport_me_to_object" tool_tip="Activé uniquement lorsqu'un personnage est sélectionné."/> + <button label="Renvoyer" name="return_objects"/> + <button label="Supprimer" name="delete_objects"/> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/fr/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/fr/floater_pathfinding_console.xml new file mode 100644 index 0000000000..02d969dc08 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/floater_pathfinding_console.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_console" title="Vue/Test de recherche de chemin"> + <floater.string name="navmesh_viewer_status_library_not_implemented"> + Implémentation de la bibliothèque de recherche de chemin introuvable + </floater.string> + <floater.string name="navmesh_viewer_status_region_not_enabled"> + La recherche de chemin n'a pas été activée pour cette région. + </floater.string> + <floater.string name="navmesh_viewer_status_region_loading"> + En attente de fin de chargement de la région. + </floater.string> + <floater.string name="navmesh_viewer_status_checking_version"> + Vérification de l'état du maillage de navigation. + </floater.string> + <floater.string name="navmesh_viewer_status_downloading"> + Téléchargement du maillage de navigation. + </floater.string> + <floater.string name="navmesh_viewer_status_updating"> + Maillage de navigation modifié sur le serveur. Téléchargement du plus récent. + </floater.string> + <floater.string name="navmesh_viewer_status_has_navmesh"> + Le maillage de navigation le plus récent a été téléchargé. + </floater.string> + <floater.string name="navmesh_viewer_status_error"> + Impossible de télécharger le maillage de navigation. + </floater.string> + <floater.string name="navmesh_simulator_status_pending"> + Des modifications sont en attente concernant le maillage de navigation. + </floater.string> + <floater.string name="navmesh_simulator_status_building"> + Maillage de navigation en cours de création. + </floater.string> + <floater.string name="navmesh_simulator_status_some_pending"> + Des modifications sont en attente pour certaines régions de maillage de navigation. + </floater.string> + <floater.string name="navmesh_simulator_status_some_building"> + Certaines régions de maillage de navigation sont en cours de création. + </floater.string> + <floater.string name="navmesh_simulator_status_pending_and_building"> + Des modifications sont en attente pour certaines régions de maillage de navigation et d'autres sont en cours de création. + </floater.string> + <floater.string name="navmesh_simulator_status_complete"> + Maillage de navigation à jour. + </floater.string> + <floater.string name="pathing_library_not_implemented"> + Implémentation de la bibliothèque de recherche de chemin introuvable + </floater.string> + <floater.string name="pathing_region_not_enabled"> + La recherche de chemin n'a pas été activée pour cette région. + </floater.string> + <floater.string name="pathing_choose_start_and_end_points"> + Choisissez un point de départ et un point d'arrivée. + </floater.string> + <floater.string name="pathing_choose_start_point"> + Choisissez un point de départ. + </floater.string> + <floater.string name="pathing_choose_end_point"> + Choisissez un point d'arrivée. + </floater.string> + <floater.string name="pathing_path_valid"> + Le chemin s'affiche en orange. + </floater.string> + <floater.string name="pathing_path_invalid"> + Impossible de trouver un chemin entre les points choisis. + </floater.string> + <floater.string name="pathing_error"> + Erreur lors de la génération du chemin. + </floater.string> + <tab_container name="view_test_tab_container"> + <panel label="Vue" name="view_panel"> + <text name="show_label"> + Afficher : + </text> + <check_box label="Monde" name="show_world"/> + <check_box label="Mobiles uniquement" name="show_world_movables_only"/> + <check_box label="Maillage de navigation" name="show_navmesh"/> + <text name="show_walkability_label"> + Où marcher est possible : + </text> + <combo_box name="show_heatmap_mode"> + <combo_box.item label="Ne pas afficher" name="show_heatmap_mode_none"/> + <combo_box.item label="Type de personnage A" name="show_heatmap_mode_a"/> + <combo_box.item label="Type de personnage B" name="show_heatmap_mode_b"/> + <combo_box.item label="Type de personnage C" name="show_heatmap_mode_c"/> + <combo_box.item label="Type de personnage D" name="show_heatmap_mode_d"/> + </combo_box> + <check_box label="Marche possible" name="show_walkables"/> + <check_box label="Volumes de matériau" name="show_material_volumes"/> + <check_box label="Obstacles statiques" name="show_static_obstacles"/> + <check_box label="Volumes d'exclusion" name="show_exclusion_volumes"/> + <check_box label="Plan de l'eau" name="show_water_plane"/> + <check_box label="Mode rayons X" name="show_xray"/> + </panel> + <panel label="Chemin test" name="test_panel"> + <text name="ctrl_click_label"> + Ctrl-clic : sélection point de départ + </text> + <text name="shift_click_label"> + Maj-clic : sélection point d'arrivée + </text> + <text name="character_width_label"> + Largeur du personnage + </text> + <slider name="character_width" value="1"/> + <text name="character_width_unit_label"> + m + </text> + <text name="character_type_label"> + Type de personnage + </text> + <combo_box name="path_character_type"> + <combo_box.item label="Aucun" name="path_character_type_none"/> + <combo_box.item label="A" name="path_character_type_a"/> + <combo_box.item label="B" name="path_character_type_b"/> + <combo_box.item label="C" name="path_character_type_c"/> + <combo_box.item label="D" name="path_character_type_d"/> + </combo_box> + <button label="Effacer chemin" name="clear_path"/> + </panel> + </tab_container> +</floater> diff --git a/indra/newview/skins/default/xui/fr/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/fr/floater_pathfinding_linksets.xml new file mode 100644 index 0000000000..894ec6dd9c --- /dev/null +++ b/indra/newview/skins/default/xui/fr/floater_pathfinding_linksets.xml @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_linksets" title="Groupes de liens de recherche de chemin"> + <floater.string name="messaging_get_inprogress"> + Requête relative aux groupes de liens de recherche de chemin en cours... + </floater.string> + <floater.string name="messaging_get_error"> + Erreur lors de la requête relative aux groupes de liens de recherche de chemin. + </floater.string> + <floater.string name="messaging_set_inprogress"> + Modification des groupes de liens de recherche de chemin sélectionnés... + </floater.string> + <floater.string name="messaging_set_error"> + Erreur lors de la modification des groupes de liens de recherche de chemin sélectionnés. + </floater.string> + <floater.string name="messaging_complete_none_found"> + Aucun groupe de liens de recherche de chemin. + </floater.string> + <floater.string name="messaging_complete_available"> + [NUM_SELECTED] groupes de liens sélectionnés sur [NUM_TOTAL]. + </floater.string> + <floater.string name="messaging_not_enabled"> + La recherche de chemin n'a pas été activée pour cette région. + </floater.string> + <floater.string name="linkset_terrain_name"> + [Terrain] + </floater.string> + <floater.string name="linkset_terrain_description"> + -- + </floater.string> + <floater.string name="linkset_terrain_owner"> + -- + </floater.string> + <floater.string name="linkset_terrain_scripted"> + -- + </floater.string> + <floater.string name="linkset_terrain_land_impact"> + -- + </floater.string> + <floater.string name="linkset_terrain_dist_from_you"> + -- + </floater.string> + <floater.string name="linkset_owner_loading"> + [Chargement] + </floater.string> + <floater.string name="linkset_owner_unknown"> + [Inconnu] + </floater.string> + <floater.string name="linkset_owner_group"> + [Groupe] + </floater.string> + <floater.string name="linkset_is_scripted"> + Oui + </floater.string> + <floater.string name="linkset_is_not_scripted"> + Non + </floater.string> + <floater.string name="linkset_is_unknown_scripted"> + Inconnu + </floater.string> + <floater.string name="linkset_use_walkable"> + Marche possible + </floater.string> + <floater.string name="linkset_use_static_obstacle"> + Obstacle statique + </floater.string> + <floater.string name="linkset_use_dynamic_obstacle"> + Obstacle mobile + </floater.string> + <floater.string name="linkset_use_material_volume"> + Volume de matériau + </floater.string> + <floater.string name="linkset_use_exclusion_volume"> + Volume d'exclusion + </floater.string> + <floater.string name="linkset_use_dynamic_phantom"> + Fantôme mobile + </floater.string> + <floater.string name="linkset_is_terrain"> + [Non modifiable] + </floater.string> + <floater.string name="linkset_is_restricted_state"> + [Restriction] + </floater.string> + <floater.string name="linkset_is_non_volume_state"> + [Concave] + </floater.string> + <floater.string name="linkset_is_restricted_non_volume_state"> + [Restriction,Concave] + </floater.string> + <floater.string name="linkset_choose_use"> + Choisir un usage de groupe de liens... + </floater.string> + <panel> + <combo_box name="filter_by_linkset_use"> + <combo_box.item label="Filtrer par usage..." name="filter_by_linkset_use_none"/> + <combo_box.item label="Marche possible" name="filter_by_linkset_use_walkable"/> + <combo_box.item label="Obstacle statique" name="filter_by_linkset_use_static_obstacle"/> + <combo_box.item label="Obstacle mobile" name="filter_by_linkset_use_dynamic_obstacle"/> + <combo_box.item label="Volume de matériau" name="filter_by_linkset_use_material_volume"/> + <combo_box.item label="Volume d'exclusion" name="filter_by_linkset_use_exclusion_volume"/> + <combo_box.item label="Fantôme mobile" name="filter_by_linkset_use_dynamic_phantom"/> + </combo_box> + <button label="Appliquer" name="apply_filters"/> + <button label="Effacer" name="clear_filters"/> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Nom (prim racine)" name="name"/> + <scroll_list.columns label="Description (prim racine)" name="description"/> + <scroll_list.columns label="Propriétaire" name="owner"/> + <scroll_list.columns label="Scripté" name="scripted"/> + <scroll_list.columns label="Impact" name="land_impact"/> + <scroll_list.columns label="Distance" name="dist_from_you"/> + <scroll_list.columns label="Usage du groupe de liens" name="linkset_use"/> + <scroll_list.columns label="% A" name="a_percent"/> + <scroll_list.columns label="% B" name="b_percent"/> + <scroll_list.columns label="% C" name="c_percent"/> + <scroll_list.columns label="% D" name="d_percent"/> + </scroll_list> + <text name="messaging_status"> + Groupes de liens : + </text> + <button label="Actualiser" name="refresh_objects_list"/> + <button label="Tout sélectionner" name="select_all_objects"/> + <button label="Ne rien sélectionner" name="select_none_objects"/> + </panel> + <panel> + <check_box label="Afficher la balise" name="show_beacon"/> + <button label="Prendre" name="take_objects"/> + <button label="Prendre une copie" name="take_copy_objects"/> + <button label="M'y téléporter" name="teleport_me_to_object"/> + <button label="Renvoyer" name="return_objects"/> + <button label="Supprimer" name="delete_objects"/> + </panel> + <panel> + <text name="walkability_coefficients_label"> + Marche possible : + </text> + <text name="edit_a_label"> + A + </text> + <line_editor name="edit_a_value" tool_tip="Marche possible pour les personnages de type A. Exemple de type de personnage : humanoïde."/> + <text name="edit_b_label"> + B + </text> + <line_editor name="edit_b_value" tool_tip="Marche possible pour les personnages de type B. Exemple de type de personnage : créature."/> + <text name="edit_c_label"> + C + </text> + <line_editor name="edit_c_value" tool_tip="Marche possible pour les personnages de type C. Exemple de type de personnage : mécanique."/> + <text name="edit_d_label"> + D + </text> + <line_editor name="edit_d_value" tool_tip="Marche possible pour les personnages de type D. Exemple de type de personnage : autre."/> + <button label="Appliquer les changements" name="apply_edit_values"/> + <text name="suggested_use_a_label"> + (Humanoïde) + </text> + <text name="suggested_use_b_label"> + (Créature) + </text> + <text name="suggested_use_c_label"> + (Mécanique) + </text> + <text name="suggested_use_d_label"> + (Autre) + </text> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/fr/floater_postcard.xml b/indra/newview/skins/default/xui/fr/floater_postcard.xml deleted file mode 100644 index e65dfb09b4..0000000000 --- a/indra/newview/skins/default/xui/fr/floater_postcard.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="ENVOYER LA PHOTO PAR E-MAIL"> - <text name="to_label"> - E-mail du destinataire : - </text> - <text name="from_label"> - Votre e-mail : - </text> - <text name="name_label"> - Votre nom : - </text> - <text name="subject_label"> - Objet : - </text> - <line_editor label="Saisir ici votre objet" name="subject_form"/> - <text name="msg_label"> - Message : - </text> - <text_editor name="msg_form"> - Saisir ici votre message - </text_editor> - <text name="fine_print"> - Si le destinataire s'inscrit sur [SECOND_LIFE], vous recevrez un bonus. - </text> - <button label="Annuler" name="cancel_btn"/> - <button label="Envoyer" name="send_btn"/> - <string name="default_subject"> - Carte postale de [SECOND_LIFE]. - </string> - <string name="default_message"> - Ouvrez-moi ! - </string> - <string name="upload_message"> - Envoi en cours... - </string> -</floater> diff --git a/indra/newview/skins/default/xui/fr/floater_preview_animation.xml b/indra/newview/skins/default/xui/fr/floater_preview_animation.xml index f2cb1d5e70..6488089c06 100644 --- a/indra/newview/skins/default/xui/fr/floater_preview_animation.xml +++ b/indra/newview/skins/default/xui/fr/floater_preview_animation.xml @@ -6,6 +6,6 @@ <text name="desc txt"> Description : </text> - <button label="Exécuter dans Second Life" label_selected="Arrêter" name="Inworld" tool_tip="Lire cette animation de façon à ce que les autres la voient."/> + <button label="Exécuter dans SL" label_selected="Arrêter" name="Inworld" tool_tip="Lire cette animation de façon à ce que les autres la voient dans Second Life."/> <button label="Exécuter localement" label_selected="Arrêter" name="Locally" tool_tip="Lire cette animation de façon à ce que vous soyez la seule personne à la voir."/> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_spellcheck.xml b/indra/newview/skins/default/xui/fr/floater_spellcheck.xml new file mode 100644 index 0000000000..635db52ffa --- /dev/null +++ b/indra/newview/skins/default/xui/fr/floater_spellcheck.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_floater" title="Paramètres du vérificateur orthographique"> + <check_box label="Activer le vérificateur orthographique" name="spellcheck_enable"/> + <text name="spellcheck_main"> + Diction. principal : + </text> + <text label="Journaux :" name="spellcheck_additional"> + Dictionnaires supplémentaires : + </text> + <text name="spellcheck_available"> + Disponibles + </text> + <text name="spellcheck_active"> + Actifs + </text> + <button label="Supprimer" name="spellcheck_remove_btn"/> + <button label="Importer..." name="spellcheck_import_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/fr/floater_spellcheck_import.xml b/indra/newview/skins/default/xui/fr/floater_spellcheck_import.xml new file mode 100644 index 0000000000..c8c76c672d --- /dev/null +++ b/indra/newview/skins/default/xui/fr/floater_spellcheck_import.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_import" title="Importation d'un dictionnaire"> + <button label="Parcourir" label_selected="Parcourir" name="dictionary_path_browse"/> + <button label="Importer" name="ok_btn"/> + <button label="Annuler" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/fr/floater_stats.xml b/indra/newview/skins/default/xui/fr/floater_stats.xml index 56fa062d46..d6bd187956 100644 --- a/indra/newview/skins/default/xui/fr/floater_stats.xml +++ b/indra/newview/skins/default/xui/fr/floater_stats.xml @@ -53,7 +53,13 @@ <stat_bar label="Objets" name="simobjects"/> <stat_bar label="Objets actifs" name="simactiveobjects"/> <stat_bar label="Scripts actifs" name="simactivescripts"/> + <stat_bar label="Scripts exécutés" name="simpctscriptsrun"/> <stat_bar label="Événements de scripts" name="simscripteps"/> + <stat_view label="Recherche de chemin" name="simpathfinding"> + <stat_bar label="Durée de l'étape IA" name="simsimaistepmsec"/> + <stat_bar label="Étapes de silhouette ignorées" name="simsimskippedsilhouettesteps"/> + <stat_bar label="Personnages mis à jour" name="simsimpctsteppedcharacters"/> + </stat_view> <stat_bar label="Paquets en entrée" name="siminpps"/> <stat_bar label="Paquets en sortie" name="simoutpps"/> <stat_bar label="Téléchargements en attente" name="simpendingdownloads"/> diff --git a/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml index ca0fbd3589..f86c1a4217 100644 --- a/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml @@ -20,6 +20,8 @@ <button label="Vierge" label_selected="Vierge" name="Blank" width="60"/> <button label="Aucune" label_selected="Aucune" left="68" name="None" width="60"/> <button bottom="-240" label="" label_selected="" name="Pipette"/> + <check_box initial_value="true" label="Aperçu direct" name="apply_immediate_check"/> + <text name="preview_disabled" value="Aperçu désactivé"/> <filter_editor label="Filtrer les textures" name="inventory search editor"/> <check_box initial_value="false" label="Afficher les dossiers" name="show_folders_check"/> <button label="Ajouter" label_selected="Ajouter" name="l_add_btn"/> @@ -31,5 +33,4 @@ </scroll_list> <button label="OK" label_selected="OK" name="Select"/> <button label="Annuler" label_selected="Annuler" name="Cancel"/> - <check_box initial_value="true" label="Appliquer maintenant" name="apply_immediate_check"/> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/fr/floater_texture_fetch_debugger.xml index f0cc95319d..caae15ea17 100644 --- a/indra/newview/skins/default/xui/fr/floater_texture_fetch_debugger.xml +++ b/indra/newview/skins/default/xui/fr/floater_texture_fetch_debugger.xml @@ -45,10 +45,23 @@ <text name="total_time_refetch_vis_cache_label"> 15, nouvelle récupération des données visibles du cache, Durée : [TIME] secondes, Récupéré : [SIZE] Ko, [PIXEL] Mpixels </text> + <text name="total_time_refetch_all_cache_label"> + 16, nouvelle récupération de toutes les textures du cache, Durée : [TIME] secondes, Récupéré : [SIZE] Ko, [PIXEL] Mpixels + </text> <text name="total_time_refetch_vis_http_label"> - 16, nouvelle récupération des données visibles de la requête HTTP, Durée : [TIME] secondes, Récupéré : [SIZE] Ko, [PIXEL] Mpixels + 17, nouvelle récupération des données visibles de la requête HTTP, Durée : [TIME] secondes, Récupéré : [SIZE] Ko, [PIXEL] Mpixels + </text> + <text name="total_time_refetch_all_http_label"> + 18, nouvelle récupération de toutes les textures de la requête HTTP, Durée : [TIME] secondes, Récupéré : [SIZE] Ko, [PIXEL] Mpixels + </text> + <spinner label="19, taux de texels/pixels :" name="texel_pixel_ratio"/> + <text name="texture_source_label"> + 20, source des textures : </text> - <spinner label="17, taux de texels/pixels :" name="texel_pixel_ratio"/> + <radio_group name="texture_source"> + <radio_item label="Cache + HTTP" name="0"/> + <radio_item label="HTTP uniquement" name="1"/> + </radio_group> <button label="Démarrer" name="start_btn"/> <button label="Réinitialiser" name="clear_btn"/> <button label="Fermer" name="close_btn"/> @@ -58,5 +71,7 @@ <button label="Décoder" name="decode_btn"/> <button label="Texture GL" name="gl_btn"/> <button label="Récupérer à nouveau les données visibles du cache" name="refetchviscache_btn"/> + <button label="Récupérer cache" name="refetchallcache_btn"/> <button label="Récupérer à nouveau les données visibles de la requête HTTP" name="refetchvishttp_btn"/> + <button label="Récupérer HTTP" name="refetchallhttp_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_tools.xml b/indra/newview/skins/default/xui/fr/floater_tools.xml index e21c6f4c08..bcc3423862 100644 --- a/indra/newview/skins/default/xui/fr/floater_tools.xml +++ b/indra/newview/skins/default/xui/fr/floater_tools.xml @@ -99,7 +99,7 @@ <button label="" label_selected="" name="ToolRing" tool_tip="Anneau"/> <button label="" label_selected="" name="ToolTree" tool_tip="Arbre"/> <button label="" label_selected="" name="ToolGrass" tool_tip="Herbe"/> - <check_box label="Maintenir l'outil sélectionné" name="checkbox sticky"/> + <check_box label="Maintenir l'outil sélect." name="checkbox sticky"/> <check_box label="Copier la sélection" name="checkbox copy selection"/> <check_box initial_value="true" label="Centrer" name="checkbox copy centers"/> <check_box label="Pivoter" name="checkbox copy rotates"/> @@ -148,6 +148,12 @@ <panel.string name="text modify info 4"> Vous ne pouvez pas modifier ces objets </panel.string> + <panel.string name="text modify info 5"> + Impossible de modifier cet objet au-delà de la frontière d'une région + </panel.string> + <panel.string name="text modify info 6"> + Impossible de modifier ces objets au-delà de la frontière d'une région + </panel.string> <panel.string name="text modify warning"> Sélectionnez l'objet en entier </panel.string> @@ -197,12 +203,12 @@ <combo_box.item label="Zoomer" name="Zoom"/> </combo_box> <check_box label="À vendre :" name="checkbox for sale"/> + <spinner label="L$" name="Edit Cost"/> <combo_box name="sale type"> <combo_box.item label="Copie" name="Copy"/> <combo_box.item label="Contenus" name="Contents"/> <combo_box.item label="Original" name="Original"/> </combo_box> - <spinner label="Prix : L$" name="Edit Cost"/> <check_box label="Afficher dans la recherche" name="search_check" tool_tip="Afficher l'objet dans les résultats de recherche"/> <panel name="perms_build"> <text name="perm_modify"> @@ -238,6 +244,11 @@ F : </text> </panel> + <panel name="pathfinding_attrs_panel"> + <text name="pathfinding_attributes_label"> + Attributs de recherche de chemin : + </text> + </panel> </panel> <panel label="Objet" name="Object"> <check_box label="Verrouillé" name="checkbox locked" tool_tip="Empêche l'objet d'être déplacé ou supprimé. Utile pendant la construction pour éviter les modifications involontaires."/> diff --git a/indra/newview/skins/default/xui/fr/floater_top_objects.xml b/indra/newview/skins/default/xui/fr/floater_top_objects.xml index 42352e7c1e..eb084d9184 100644 --- a/indra/newview/skins/default/xui/fr/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/fr/floater_top_objects.xml @@ -1,16 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="top_objects" title="Objets les plus utilisés"> +<floater name="top_objects" title="Objets les plus consommateurs"> <floater.string name="top_scripts_title"> - Scripts principaux + Scripts les plus consommateurs </floater.string> <floater.string name="top_scripts_text"> [COUNT] scripts prenant un total de [TIME] ms </floater.string> <floater.string name="scripts_score_label"> - Heure - </floater.string> - <floater.string name="scripts_mono_time_label"> - Heure Mono + Temps </floater.string> <floater.string name="top_colliders_title"> Collisions les plus consommatrices @@ -32,9 +29,10 @@ <scroll_list.columns label="Nom" name="name"/> <scroll_list.columns label="Propriétaire" name="owner"/> <scroll_list.columns label="Lieu" name="location"/> - <scroll_list.columns label="Heure" name="time"/> - <scroll_list.columns label="Heure Mono" name="mono_time"/> + <scroll_list.columns label="Parcelle" name="parcel"/> + <scroll_list.columns label="Temps" name="time"/> <scroll_list.columns label="URL" name="URLs"/> + <scroll_list.columns label="Mémoire (Ko)" name="memory"/> </scroll_list> <text name="id_text"> ID de l'objet : @@ -43,11 +41,15 @@ <text name="obj_name_text"> Nom : </text> - <button label="Filtre" name="filter_object_btn"/> + <button label="Filtrer" name="filter_object_btn"/> <text name="owner_name_text"> Propriétaire : </text> - <button label="Filtre" name="filter_owner_btn"/> + <button label="Filtrer" name="filter_owner_btn"/> + <text name="parcel_name_text"> + Parcelle : + </text> + <button label="Filtrer" name="filter_parcel_btn"/> <button label="Rafraîchir" name="refresh_btn"/> <button label="Renvoyer" name="return_selected_btn"/> <button label="Tout renvoyer" name="return_all_btn"/> diff --git a/indra/newview/skins/default/xui/fr/menu_bottomtray.xml b/indra/newview/skins/default/xui/fr/menu_bottomtray.xml deleted file mode 100644 index d0d245b286..0000000000 --- a/indra/newview/skins/default/xui/fr/menu_bottomtray.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<menu name="hide_camera_move_controls_menu"> - <menu_item_check label="Bouton Parler" name="EnableVoiceChat"/> - <menu_item_check label="Bouton Geste" name="ShowGestureButton"/> - <menu_item_check label="Bouton Bouger" name="ShowMoveButton"/> - <menu_item_check label="Bouton Affichage" name="ShowCameraButton"/> - <menu_item_check label="Bouton Photo" name="ShowSnapshotButton"/> - <menu_item_check label="Bouton Construire" name="ShowBuildButton"/> - <menu_item_check label="Bouton Rechercher" name="ShowSearchButton"/> - <menu_item_check label="Bouton Carte" name="ShowWorldMapButton"/> - <menu_item_check label="Bouton Mini-carte" name="ShowMiniMapButton"/> - <menu_item_call label="Couper" name="NearbyChatBar_Cut"/> - <menu_item_call label="Copier" name="NearbyChatBar_Copy"/> - <menu_item_call label="Coller" name="NearbyChatBar_Paste"/> - <menu_item_call label="Supprimer" name="NearbyChatBar_Delete"/> - <menu_item_call label="Tout sélectionner" name="NearbyChatBar_Select_All"/> -</menu> diff --git a/indra/newview/skins/default/xui/fr/menu_im_well_button.xml b/indra/newview/skins/default/xui/fr/menu_im_well_button.xml deleted file mode 100644 index 8ef1529e6b..0000000000 --- a/indra/newview/skins/default/xui/fr/menu_im_well_button.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<context_menu name="IM Well Button Context Menu"> - <menu_item_call label="Tout fermer" name="Close All"/> -</context_menu> diff --git a/indra/newview/skins/default/xui/fr/menu_inventory.xml b/indra/newview/skins/default/xui/fr/menu_inventory.xml index 59dcff9075..627d3068c3 100644 --- a/indra/newview/skins/default/xui/fr/menu_inventory.xml +++ b/indra/newview/skins/default/xui/fr/menu_inventory.xml @@ -68,6 +68,7 @@ <menu_item_call label="Supprimer le dossier système" name="Delete System Folder"/> <menu_item_call label="Démarrer le chat conférence" name="Conference Chat Folder"/> <menu_item_call label="Jouer" name="Sound Play"/> + <menu_item_call label="Copier la SLurl" name="url_copy"/> <menu_item_call label="À propos du repère" name="About Landmark"/> <menu_item_call label="Jouer dans Second Life" name="Animation Play"/> <menu_item_call label="Jouer localement" name="Animation Audition"/> diff --git a/indra/newview/skins/default/xui/fr/menu_mode_change.xml b/indra/newview/skins/default/xui/fr/menu_mode_change.xml deleted file mode 100644 index 982a331c5b..0000000000 --- a/indra/newview/skins/default/xui/fr/menu_mode_change.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<toggleable_menu name="Mode Change"> - <menu_item_check label="Basique" name="BasicMode"/> - <menu_item_check label="Avancé" name="AdvancedMode"/> -</toggleable_menu> diff --git a/indra/newview/skins/default/xui/fr/menu_object.xml b/indra/newview/skins/default/xui/fr/menu_object.xml index c6db48a31c..573b6da582 100644 --- a/indra/newview/skins/default/xui/fr/menu_object.xml +++ b/indra/newview/skins/default/xui/fr/menu_object.xml @@ -5,6 +5,8 @@ </menu_item_call> <menu_item_call label="Modifier" name="Edit..."/> <menu_item_call label="Construire" name="Build"/> + <menu_item_call label="Voir parmi les groupes de liens" name="show_in_linksets"/> + <menu_item_call label="Voir parmi les personnages" name="show_in_characters"/> <menu_item_call label="Ouvrir" name="Open"/> <menu_item_call label="M'asseoir ici" name="Object Sit"/> <menu_item_call label="Me lever" name="Object Stand Up"/> diff --git a/indra/newview/skins/default/xui/fr/menu_text_editor.xml b/indra/newview/skins/default/xui/fr/menu_text_editor.xml index b6f429aec9..c31b0c8556 100644 --- a/indra/newview/skins/default/xui/fr/menu_text_editor.xml +++ b/indra/newview/skins/default/xui/fr/menu_text_editor.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Text editor context menu"> + <menu_item_call label="(inconnu)" name="Suggestion 1"/> + <menu_item_call label="(inconnu)" name="Suggestion 2"/> + <menu_item_call label="(inconnu)" name="Suggestion 3"/> + <menu_item_call label="(inconnu)" name="Suggestion 4"/> + <menu_item_call label="(inconnu)" name="Suggestion 5"/> + <menu_item_call label="Ajouter au dictionnaire" name="Add to Dictionary"/> + <menu_item_call label="Ajouter aux éléments à ignorer" name="Add to Ignore"/> <menu_item_call label="Couper" name="Cut"/> <menu_item_call label="Copier" name="Copy"/> <menu_item_call label="Coller" name="Paste"/> diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index 2a26ed7a70..85020afe25 100644 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -8,7 +8,7 @@ <menu_item_call label="Nouvelle fenêtre d'inventaire" name="NewInventoryWindow"/> <menu_item_call label="Endroits..." name="Places"/> <menu_item_call label="Favoris..." name="Picks"/> - <menu_item_call label="Paramètres de la caméra..." name="Camera Controls"/> + <menu_item_call label="Contrôles de la caméra..." name="Camera Controls"/> <menu label="Déplacement" name="Movement"> <menu_item_call label="M'asseoir" name="Sit Down Here"/> <menu_item_check label="Voler" name="Fly"/> @@ -28,6 +28,7 @@ <menu_item_call label="Préférences..." name="Preferences"/> <menu_item_call label="Boutons des barres d'outils..." name="Toolbars"/> <menu_item_call label="Masquer tous les contrôles" name="Hide UI"/> + <menu_item_check label="Afficher les éléments HUD" name="Show HUD Attachments"/> <menu_item_call label="Quitter [APP_NAME]" name="Quit"/> </menu> <menu label="Communiquer" name="Communicate"> @@ -39,6 +40,7 @@ <menu_item_call label="Amis" name="My Friends"/> <menu_item_call label="Groupes" name="My Groups"/> <menu_item_call label="Personnes près de vous" name="Active Speakers"/> + <menu_item_call label="Liste des ignorés" name="Block List"/> </menu> <menu label="Monde" name="World"> <menu_item_call label="Créer un repère pour ce lieu" name="Create Landmark Here"/> @@ -124,6 +126,11 @@ <menu_item_call label="Définir les scripts sur Exécution" name="Set Scripts to Running"/> <menu_item_call label="Définir les scripts sur Pas d'exécution" name="Set Scripts to Not Running"/> </menu> + <menu label="Recherche de chemin" name="Pathfinding"> + <menu_item_call label="Groupes de liens..." name="pathfinding_linksets_menu_item"/> + <menu_item_call label="Personnages..." name="pathfinding_characters_menu_item"/> + <menu_item_call label="Vue / test..." name="pathfinding_console_menu_item"/> + </menu> <menu label="Options" name="Options"> <menu_item_check label="Afficher les droits avancés" name="DebugPermissions"/> <menu_item_check label="Sélectionner mes objets uniquement" name="Select Only My Objects"/> @@ -171,10 +178,9 @@ </menu> <menu label="Surbrillance et visibilité" name="Highlighting and Visibility"> <menu_item_check label="Balise animée" name="Cheesy Beacon"/> - <menu_item_check label="Cacher les particules" name="Hide Particles"/> + <menu_item_check label="Masquer les particules" name="Hide Particles"/> <menu_item_check label="Masquer la sélection" name="Hide Selected"/> <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> <menu label="Types de rendu" name="Rendering Types"> @@ -377,7 +383,6 @@ <menu_item_call label="Basculer la géométrie des personnages" name="Toggle Character Geometry"/> <menu_item_call label="Test homme" name="Test Male"/> <menu_item_call label="Test femme" name="Test Female"/> - <menu_item_call label="Activer/désactiver PG" name="Toggle PG"/> <menu_item_check label="Autoriser la sélection de l'avatar" name="Allow Select Avatar"/> </menu> <menu_item_call label="Forcer les paramètres par défaut" name="Force Params to Default"/> diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index 0cdfc61e8e..30154d1873 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -37,6 +37,12 @@ <button name="Help" text="$helptext"/> </form> </template> + <template name="okhelpignore"> + <form> + <button name="OK_okhelpignore" text="$yestext"/> + <button name="Help_okhelpignore" text="$helptext"/> + </form> + </template> <template name="yesnocancelbuttons"> <form> <button name="Yes" text="$yestext"/> @@ -359,13 +365,19 @@ Vous devez saisir le nom d'utilisateur de votre avatar. Pour entrer dans [SECOND_LIFE], vous devez disposer d'un compte. Voulez-vous en créer un maintenant ? <url name="url"> - https://join.secondlife.com/index.php?lang=fr-FR + [create_account_url] </url> <usetemplate name="okcancelbuttons" notext="Réessayer" yestext="Créer un compte"/> </notification> <notification name="InvalidCredentialFormat"> Saisissez soit le nom d'utilisateur soit à la fois le prénom et le nom de votre avatar dans le champ Nom d'utilisateur, puis connectez-vous. </notification> + <notification name="InvalidGrid"> + [GRID] n'est pas un identifiant de grille valide. + </notification> + <notification name="InvalidLocationSLURL"> + Grille non valide spécifiée au niveau du lieu de départ. + </notification> <notification name="DeleteClassified"> Supprimer l'annonce [NAME] ? Une fois payés, les frais ne sont pas remboursables. @@ -472,7 +484,7 @@ L'objet est peut-être inaccessible ou a peut-être été supprimé. </notification> <notification name="StartRegionEmpty"> Vous n'avez pas défini de région de départ. -Veuillez saisir le nom de la région dans la case Lieu de départ, ou choisissez Dernier emplacement ou Domicile comme Lieu de départ. +Saisissez le nom de la région voulue dans la case Lieu de départ ou choisissez Dernier emplacement ou Domicile comme lieu de départ. <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="CouldNotStartStopScript"> @@ -599,6 +611,9 @@ Vous pouvez lier un maximum de [MAX] objets. Assurez-vous que vous êtes le propriétaire de tous les objets et qu'aucun d'eux n'est verrouillé. </notification> + <notification name="CannotLinkPermanent"> + Impossible de lier des objets d'une région à une autre. + </notification> <notification name="CannotLinkDifferentOwners"> Impossible de lier car les objets n'ont pas tous le même propriétaire. @@ -979,6 +994,41 @@ Proposer à [NAME] de devenir votre ami(e) ? <button name="Cancel" text="Annuler"/> </form> </notification> + <notification label="Ajouter une liste Rechercher/Remplacer" name="AddAutoReplaceList"> + Nom de la nouvelle liste : + <form name="form"> + <button name="SetName" text="OK"/> + </form> + </notification> + <notification label="Renommer la liste Rechercher/Remplacer" name="RenameAutoReplaceList"> + Le nom [DUPNAME] est déjà utilisé. + Saisissez un nouveau nom unique : + <form name="form"> + <button name="ReplaceList" text="Remplacer la liste actuelle"/> + <button name="SetName" text="Utiliser le nouveau nom"/> + </form> + </notification> + <notification name="InvalidAutoReplaceEntry"> + Le mot-clé doit être constitué d'un seul mot et sa valeur de remplacement doit être renseignée. + </notification> + <notification name="InvalidAutoReplaceList"> + Liste de remplacement non valide. + </notification> + <notification name="SpellingDictImportRequired"> + Spécifiez un fichier, un nom et une langue. + </notification> + <notification name="SpellingDictIsSecondary"> + Le dictionnaire [DIC_NAME] ne semble pas contenir de fichier "aff" ; il s'agit donc d'un dictionnaire « secondaire ». +Vous pouvez l'utiliser comme dictionnaire supplémentaire mais pas comme dictionnaire principal. + +Voir https://wiki.secondlife.com/wiki/Adding_Spelling_Dictionaries + </notification> + <notification name="SpellingDictImportFailed"> + Impossible de copier + [FROM_NAME] + vers + [TO_NAME] + </notification> <notification label="Enregistrer la tenue" name="SaveOutfitAs"> Enregistrer ce que je porte comme nouvelle tenue : <form name="form"> @@ -1152,7 +1202,7 @@ par une carte [THIS_GPU]. Vous avez été téléporté vers une région voisine. </notification> <notification name="AvatarMovedLast"> - Votre dernière destination n'est pas disponible actuellement. + La destination demandée n'est pas disponible actuellement. Vous avez été téléporté vers une région voisine. </notification> <notification name="AvatarMovedHome"> @@ -1171,8 +1221,7 @@ Vous pouvez utiliser [SECOND_LIFE] normalement, les autres résidents vous voien L'installation de [APP_NAME] est terminée. Si vous utilisez [SECOND_LIFE] pour la première fois, vous devez ouvrir un compte avant de pouvoir vous connecter. -Retourner sur [http://join.secondlife.com secondlife.com] pour ouvrir un nouveau compte ? - <usetemplate name="okcancelbuttons" notext="Continuer" yestext="Nouveau compte..."/> + <usetemplate name="okcancelbuttons" notext="Continuer" yestext="Créer un compte..."/> </notification> <notification name="LoginPacketNeverReceived"> Nous avons des difficultés à vous connecter. Il y a peut-être un problème avec votre connexion Internet ou la [SECOND_LIFE_GRID]. @@ -1314,7 +1363,7 @@ Dépasse la limite fixée à [MAX_AGENTS] [LIST_TYPE] de [NUM_EXCESS]. Veuillez choisir un objet à vendre et réessayer. </notification> <notification name="FinishedRawDownload"> - Chargement du fichier de terrain raw effectué vers : + Téléchargement du fichier de terrain raw effectué vers : [DOWNLOAD_PATH]. </notification> <notification name="DownloadWindowsMandatory"> @@ -1693,83 +1742,128 @@ Cette action modifiera des milliers de régions et sera difficile à digérer po <usetemplate name="okcancelbuttons" notext="Annuler" yestext="OK"/> </notification> <notification name="RegionEntryAccessBlocked"> - Votre catégorie d'accès ne vous autorise pas à pénétrer dans cette région. Cela vient peut-être du fait qu'il manquait des informations pour valider votre âge. - -Vérifiez que vous avez la toute dernière version du client et consultez les pages d'aide pour savoir comment accéder aux zones ayant ce niveau d'accès. + La région que vous essayez de visiter comporte du contenu dont le niveau dépasse celui de vos préférences actuelles. Vous pouvez modifier vos préférences en accédant à Moi > Préférences > Général. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="RegionEntryAccessBlocked_KB"> - Votre catégorie d'accès ne vous permet pas de pénétrer dans cette région. - -Souhaitez-vous en savoir plus sur les différentes catégories d'accès ? + <notification name="RegionEntryAccessBlocked_AdultsOnlyContent"> + La région que vous essayez de visiter comporte du contenu [REGIONMATURITY] uniquement accessible aux adultes. <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/fr + http://community.secondlife.com/t5/Base-de-connaissances/Cat%C3%A9gories-niveaux-de-contenu/ta-p/700311 </url> - <usetemplate ignoretext="Je ne peux pas pénétrer dans cette région car je n'ai pas accès à cette catégorie de contenu" name="okcancelignore" notext="Fermer" yestext="Consulter les pages d'aide"/> + <usetemplate ignoretext="Passage à une autre région : la région que vous essayez de visiter comporte du contenu uniquement accessible aux adultes." name="okcancelignore" notext="Fermer" yestext="Accéder à la Base de connaissances"/> </notification> <notification name="RegionEntryAccessBlocked_Notify"> - Votre catégorie d'accès ne vous permet pas de pénétrer dans cette région. + La région que vous essayez de visiter comporte du contenu [REGIONMATURITY] alors que les préférences que vous avez définies excluent tout contenu [REGIONMATURITY]. + </notification> + <notification name="RegionEntryAccessBlocked_NotifyAdultsOnly"> + La région que vous essayez de visiter comporte du contenu [REGIONMATURITY] uniquement accessible aux adultes. </notification> <notification name="RegionEntryAccessBlocked_Change"> - La catégorie de contenu définie dans vos préférences ne vous permet pas de pénétrer dans cette région. - -Pour cela, vous devez modifier votre paramètre de catégorie de contenu. Vous pourrez alors rechercher du contenu [REGIONMATURITY] et y accéder. Pour annuler vos modifications, accédez à Moi > Préférences > Général. + La région que vous essayez de visiter comporte du contenu [REGIONMATURITY] alors que les préférences que vous avez définies excluent tout contenu [REGIONMATURITY]. Il est possible de modifier vos préférences ou d'annuler l'action. Une fois vos préférences modifiées, vous pouvez réessayer d'accéder à la région. <form name="form"> <button name="OK" text="Modifier les préférences"/> - <button default="true" name="Cancel" text="Fermer"/> - <ignore name="ignore" text="La catégorie de contenu que j'ai choisie m'empêche de pénétrer dans une région"/> + <button default="true" name="Cancel" text="Annuler"/> + <ignore name="ignore" text="Passage à une autre région : la région que vous essayez de visiter comporte du contenu dont le niveau est exclu de vos préférences actuelles."/> </form> </notification> + <notification name="RegionEntryAccessBlocked_PreferencesOutOfSync"> + Nous rencontrons des difficultés techniques au niveau de votre téléportation car vos préférences ne sont pas synchronisées avec le serveur. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked"> + La région que vous essayez de visiter comporte du contenu dont le niveau dépasse celui de vos préférences actuelles. Vous pouvez modifier vos préférences en accédant à Moi > Préférences > Général. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked_AdultsOnlyContent"> + La région que vous essayez de visiter comporte du contenu [REGIONMATURITY] uniquement accessible aux adultes. + <url name="url"> + http://community.secondlife.com/t5/Base-de-connaissances/Cat%C3%A9gories-niveaux-de-contenu/ta-p/700311 + </url> + <usetemplate ignoretext="Téléportation : la région que vous essayez de visiter comporte du contenu uniquement accessible aux adultes." name="okcancelignore" notext="Fermer" yestext="Accéder à la Base de connaissances"/> + </notification> + <notification name="TeleportEntryAccessBlocked_Notify"> + La région que vous essayez de visiter comporte du contenu [REGIONMATURITY] alors que les préférences que vous avez définies excluent tout contenu [REGIONMATURITY]. + </notification> + <notification name="TeleportEntryAccessBlocked_NotifyAdultsOnly"> + La région que vous essayez de visiter comporte du contenu [REGIONMATURITY] uniquement accessible aux adultes. + </notification> + <notification name="TeleportEntryAccessBlocked_ChangeAndReTeleport"> + La région que vous essayez de visiter comporte du contenu [REGIONMATURITY] alors que les préférences que vous avez définies excluent tout contenu [REGIONMATURITY]. Il est possible de modifier vos préférences afin de poursuivre la téléportation ou d'annuler la téléportation. + <form name="form"> + <button name="OK" text="Modifier et continuer"/> + <button name="Cancel" text="Annuler"/> + <ignore name="ignore" text="Téléportation (redémarrage possible) : la région que vous essayez de visiter comporte du contenu dont le niveau est exclu de vos préférences."/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_Change"> + La région que vous essayez de visiter comporte du contenu [REGIONMATURITY] alors que les préférences que vous avez définies excluent tout contenu [REGIONMATURITY]. Il est possible de modifier vos préférences ou d'annuler la téléportation. Une fois vos préférences modifiées, vous devrez réessayer de vous téléporter. + <form name="form"> + <button name="OK" text="Modifier les préférences"/> + <button name="Cancel" text="Annuler"/> + <ignore name="ignore" text="Téléportation (redémarrage impossible) : la région que vous essayez de visiter comporte du contenu dont le niveau est exclu de vos préférences."/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_PreferencesOutOfSync"> + Nous rencontrons des difficultés techniques au niveau de votre téléportation car vos préférences ne sont pas synchronisées avec le serveur. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="PreferredMaturityChanged"> - Votre préférence de catégorie de contenu est désormais [RATING]. + Aucune autre notification vous informant que vous allez visiter une région au contenu [RATING] ne vous sera envoyée. Vous pouvez modifier vos préférences de contenu à l'avenir en accédant à Moi > Préférences > Général, à partir de la barre de menus. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="MaturityChangeError"> + Impossible de modifier vos préférences afin d'afficher le contenu [PREFERRED_MATURITY] à l'heure actuelle. Le paramètre [ACTUAL_MATURITY] a été rétabli. Vous pouvez réessayer de modifier vos préférences en accédant à Moi > Préférences > Général, à partir de la barre de menus. + <usetemplate name="okbutton" yestext="OK"/> </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. - -Vérifiez que vous avez la toute dernière version du client et consultez les pages d'aide pour savoir comment accéder aux zones ayant ce niveau d'accès. + Le niveau de contenu du terrain que vous essayez de revendiquer dépasse celui défini dans vos préférences actuelles. Vous pouvez modifier vos préférences en accédant à Moi > Préférences > Général. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandClaimAccessBlocked_KB"> - Votre catégorie d'accès ne vous permet pas de réclamer cette région. - -Souhaitez-vous en savoir plus sur les différentes catégories d'accès ? + <notification name="LandClaimAccessBlocked_AdultsOnlyContent"> + Seuls les adultes sont autorisés à revendiquer ce terrain. <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/fr + http://community.secondlife.com/t5/Base-de-connaissances/Cat%C3%A9gories-niveaux-de-contenu/ta-p/700311 </url> - <usetemplate ignoretext="Je ne peux pas réclamer cette région car je n'ai pas accès à cette catégorie de contenu" name="okcancelignore" notext="Fermer" yestext="Consulter les pages d'aide"/> + <usetemplate ignoretext="Seuls les adultes sont autorisés à revendiquer ce terrain." name="okcancelignore" notext="Fermer" yestext="Accéder à la Base de connaissances"/> </notification> <notification name="LandClaimAccessBlocked_Notify"> - Votre catégorie d'accès ne vous autorise pas à réclamer cette région. + Le terrain que vous essayez de revendiquer comporte du contenu [REGIONMATURITY] alors que les préférences que vous avez définies excluent tout contenu [REGIONMATURITY]. + </notification> + <notification name="LandClaimAccessBlocked_NotifyAdultsOnly"> + Le terrain que vous essayez de revendiquer comporte du contenu [REGIONMATURITY] uniquement accessible aux adultes. </notification> <notification name="LandClaimAccessBlocked_Change"> - Votre catégorie d'accès ne vous permet pas de réclamer cette région. - -En cliquant sur Modifier les préférences, vous pourrez changer votre catégorie d'accès et pénétrer dans la région. À partir de maintenant, vous pouvez rechercher et accéder au contenu [REGIONMATURITY]. Vous pouvez modifier ce paramètre à partir du menu Moi > Préférences > Général. - <usetemplate ignoretext="La catégorie de contenu que j'ai choisie m'empêche de réclamer un terrain" name="okcancelignore" notext="Fermer" yestext="Modifier les Préférences"/> + Le terrain que vous essayez de revendiquer comporte du contenu [REGIONMATURITY] alors que les préférences que vous avez définies excluent tout contenu [REGIONMATURITY]. Il est possible de modifier vos préférences, puis d'essayer de revendiquer ce terrain à nouveau. + <form name="form"> + <button name="OK" text="Modifier les préférences"/> + <button name="Cancel" text="Annuler"/> + <ignore name="ignore" text="Le terrain que vous essayez de revendiquer comporte du contenu dont le niveau est exclu de vos préférences."/> + </form> </notification> <notification name="LandBuyAccessBlocked"> - Votre catégorie d'accès ne vous permet pas d'acheter cette région. Cela vient peut-être du fait qu'il manquait des informations pour valider votre âge. - -Vérifiez que vous avez la toute dernière version du client et consultez les pages d'aide pour savoir comment accéder aux zones ayant ce niveau d'accès. + Le niveau de contenu du terrain que vous essayez d'acheter dépasse celui défini dans vos préférences actuelles. Vous pouvez modifier vos préférences en accédant à Moi > Préférences > Général. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandBuyAccessBlocked_KB"> - Votre catégorie d'accès ne vous permet pas d'acheter cette région. - -Souhaitez-vous en savoir plus sur les différentes catégories d'accès ? + <notification name="LandBuyAccessBlocked_AdultsOnlyContent"> + Seuls les adultes sont autorisés à acheter ce terrain. <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/fr + http://community.secondlife.com/t5/Base-de-connaissances/Cat%C3%A9gories-niveaux-de-contenu/ta-p/700311 </url> - <usetemplate ignoretext="Je ne peux pas acheter ce terrain car je n'ai pas accès à cette catégorie de contenu" name="okcancelignore" notext="Fermer" yestext="Consulter les pages d'aide"/> + <usetemplate ignoretext="Seuls les adultes sont autorisés à acheter ce terrain." name="okcancelignore" notext="Fermer" yestext="Accéder à la Base de connaissances"/> </notification> <notification name="LandBuyAccessBlocked_Notify"> - Votre catégorie d'accès ne vous permet pas d'acheter cette région. + Le terrain que vous essayez d'acheter comporte du contenu [REGIONMATURITY] alors que les préférences que vous avez définies excluent tout contenu [REGIONMATURITY]. + </notification> + <notification name="LandBuyAccessBlocked_NotifyAdultsOnly"> + Le terrain que vous essayez d'acheter comporte du contenu [REGIONMATURITY] uniquement accessible aux adultes. </notification> <notification name="LandBuyAccessBlocked_Change"> - Votre catégorie d'accès ne vous autorise pas à acheter cette région. - -En cliquant sur Modifier les préférences, vous pourrez changer votre catégorie d'accès et pénétrer dans la région. À partir de maintenant, vous pouvez rechercher et accéder au contenu [REGIONMATURITY]. Vous pouvez modifier ce paramètre à partir du menu Moi > Préférences > Général. - <usetemplate ignoretext="La catégorie de contenu que j'ai choisie m'empêche d'acheter un terrain" name="okcancelignore" notext="Fermer" yestext="Modifier les Préférences"/> + Le terrain que vous essayez d'acheter comporte du contenu [REGIONMATURITY] alors que les préférences que vous avez définies excluent tout contenu [REGIONMATURITY]. Il est possible de modifier vos préférences, puis d'essayer d'acheter ce terrain à nouveau. + <form name="form"> + <button name="OK" text="Modifier les préférences"/> + <button name="Cancel" text="Annuler"/> + <ignore name="ignore" text="Le terrain que vous essayez d'acheter comporte du contenu dont le niveau est exclu de vos préférences."/> + </form> </notification> <notification name="TooManyPrimsSelected"> Vous avez sélectionné trop de prims. Veuillez sélectionner au maximum [MAX_PRIM_COUNT] prims et réessayer. @@ -1824,10 +1918,9 @@ Publier cette petite annonce maintenant pour [AMOUNT] L$ ? </form> </notification> <notification label="Catégorie de la région modifiée" name="RegionMaturityChange"> - Le niveau de maturité de cette région a été mis à jour. -Ce changement n'apparaîtra pas immédiatement sur la carte. - -Pour entrer dans les régions Adultes, le résident doit avoir vérifié son compte, que ce soit par vérification de l'âge ou du mode de paiement. + Le niveau de contenu de cette région a changé. +Il se peut que l'affichage de cette modification sur la carte prenne quelque temps. + <usetemplate name="okbutton" yestext="OK"/> </notification> <notification label="Versions de voix non compatibles" name="VoiceVersionMismatch"> Cette version de [APP_NAME] n'est pas compatible avec la fonctionnalité de chat vocal dans cette région. Vous devez mettre à jour [APP_NAME] pour que le chat vocal fonctionne correctement. @@ -2117,14 +2210,11 @@ Liez-la à partir d'une page web pour permettre aux autres résidents d&apo <usetemplate ignoretext="Porter automatiquement tout en modifiant mon apparence" name="okcancelignore" notext="Non" yestext="Oui"/> </notification> <notification name="NotAgeVerified"> - Vous devez avoir au moins 18 ans pour accéder au contenu et aux zones Adulte dans Second Life. Visitez la page de vérification de l'âge afin de confirmer que vous avez plus de 18 ans. -Cette opération lancera votre navigateur Web. - -[_URL] - <url name="url" option="0"> - https://secondlife.com/my/account/verification.php - </url> - <usetemplate ignoretext="Je n'ai pas procédé à la vérification de mon âge" name="okcancelignore" notext="Annuler" yestext="Accéder à la page de vérification de l'âge"/> + L'accès à l'endroit que vous essayez de visiter est limité aux résidents de plus de 18 ans. + <usetemplate ignoretext="Je n'ai pas l'âge requis pour visiter les zones d'accès limité en fonction de l'âge." name="okignore" yestext="OK"/> + </notification> + <notification name="NotAgeVerified_Notify"> + L'accès à cet endroit est limité aux plus de 18 ans. </notification> <notification name="Cannot enter parcel: no payment info on file"> Pour pouvoir pénétrer dans cette zone, vous devez avoir enregistré vos informations de paiement. Souhaitez-vous aller sur [SECOND_LIFE] et enregistrer vos informations de paiement ? @@ -2386,6 +2476,23 @@ Vous ne pouvez pas voler ici. <notification name="NoBuild"> La construction est interdite dans cette zone. Vous ne pouvez pas construite ou rezzer d'objets ici. </notification> + <notification name="PathfindingDirty"> + Des modifications de recherche de chemin sont en attente concernant cette région. Si vous disposez de droits de construction, vous pouvez la figer de nouveau en cliquant sur le bouton Refiger la région. + </notification> + <notification name="DynamicPathfindingDisabled"> + La recherche de chemin dynamique n'est pas activée dans cette région. Il se peut que les objets scriptés utilisant des appels LSL de recherche de chemin ne fonctionnent pas comme prévu pour cette région. + </notification> + <notification name="PathfindingRebakeNavmesh"> + La modification de certains objets de cette région risque d'entraîner un comportement incorrect des autres objets mobiles. Pour que les objets mobiles se comportent correctement, cliquez sur Refiger la région. Pour plus d'informations, choisissez Aide. + <url name="url"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </url> + <usetemplate helptext="Aide" ignoretext="La modification de certains objets de cette région risque d'entraîner un comportement incorrect des autres objets mobiles." name="okhelpignore" yestext="OK"/> + </notification> + <notification name="PathfindingCannotRebakeNavmesh"> + Une erreur est survenue. Un problème réseau ou serveur s'est peut-être produit ou vous ne disposez pas de droits de construction. Se déconnecter puis se reconnecter permet parfois de résoudre le problème. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="SeeAvatars"> Cette parcelle masque les avatars et le chat écrit des autres parcelles. Vous ne pouvez pas voir les résidents qui se trouvent en dehors, et ceux qui se trouvent en dehors ne peuvent pas vous voir. Le chat écrit habituel sur le canal 0 est également bloqué. </notification> @@ -2404,9 +2511,7 @@ Aucun script ne marche ici à part ceux du propriétaire du terrain. Vous ne pouvez réclamer qu'un terrain public dans la région où vous vous trouvez actuellement. </notification> <notification name="RegionTPAccessBlocked"> - Votre catégorie d'accès ne vous autorise pas à pénétrer dans cette région. Vous devez sans doute procéder à la vérification de votre âge ou installer une version plus récente du client. - -Pour savoir comment accéder aux zones ayant un tel niveau d'accès, veuillez consulter les pages d'aide. + La région que vous essayez de visiter comporte du contenu dont le niveau dépasse celui de vos préférences actuelles. Vous pouvez modifier vos préférences en accédant à Moi > Préférences > Général. </notification> <notification name="URBannedFromRegion"> Vous avez été banni de cette région. @@ -2417,11 +2522,11 @@ Pour savoir comment accéder aux zones ayant un tel niveau d'accès, veuill <notification name="ImproperPaymentStatus"> Vous n'avez pas le statut de paiement approprié pour pénétrer dans cette région. </notification> - <notification name="MustGetAgeRgion"> - Pour pouvoir pénétrer dans cette région, vous devez avoir procédé à la vérification de votre âge. + <notification name="MustGetAgeRegion"> + Pour accéder à cette région, vous devez avoir au moins 18 ans. </notification> <notification name="MustGetAgeParcel"> - Pour pouvoir pénétrer sur cette parcelle, vous devez avoir procédé à la vérification de votre âge. + Pour accéder à cette parcelle, vous devez avoir au moins 18 ans. </notification> <notification name="NoDestRegion"> Région de destination introuvable. @@ -2523,12 +2628,33 @@ Veuillez réessayer dans quelques minutes. <notification name="TeleportOffered"> [NAME_SLURL] propose de vous téléporter à son emplacement : -[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> +« [MESSAGE] » +<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] <form name="form"> <button name="Teleport" text="Téléporter"/> <button name="Cancel" text="Annuler"/> </form> </notification> + <notification name="TeleportOffered_MaturityExceeded"> + [NAME_SLURL] propose de vous téléporter à son emplacement : + +« [MESSAGE] » +<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +Cette région comporte du contenu [REGION_CONTENT_MATURITY] alors que vos préférences actuelles excluent tout contenu [REGION_CONTENT_MATURITY]. Il est possible de modifier vos préférences afin de poursuivre la téléportation ou d'annuler la téléportation. + <form name="form"> + <button name="Teleport" text="Modifier et continuer"/> + <button name="Cancel" text="Annuler"/> + </form> + </notification> + <notification name="TeleportOffered_MaturityBlocked"> + [NAME_SLURL] propose de vous téléporter à son emplacement : + +« [MESSAGE] » +<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +Toutefois, cette région comporte du contenu uniquement accessible aux adultes. + </notification> <notification name="TeleportOfferSent"> Offre de téléportation envoyée à [TO_NAME] </notification> @@ -2932,6 +3058,10 @@ Texture figée de [RESOLUTION] chargée pour [BODYREGION] au bout de [TIME] seco ([EXISTENCE] secondes d'existence) Texture figée de [RESOLUTION] mise à jour localement pour [BODYREGION] au bout de [TIME] secondes. </notification> + <notification name="LivePreviewUnavailable"> + Impossible d'afficher un aperçu de cette texture car il s'agit d'une texture sans copie et/ou transfert. + <usetemplate ignoretext="M'avertir que le mode Aperçu en direct n'est pas disponible pour les textures sans copie et/ou transfert" name="okignore" yestext="OK"/> + </notification> <notification name="ConfirmLeaveCall"> Voulez-vous vraiment quitter cet appel ? <usetemplate ignoretext="Confirmer avant de quitter l'appel" name="okcancelignore" notext="Non" yestext="Oui"/> @@ -3103,6 +3233,62 @@ Cliquez sur un point dans le monde et faites glisser votre souris pour faire tou Cette action masquera tous les boutons et articles de menu. Pour les récupérer, cliquez de nouveau sur [SHORTCUT]. <usetemplate ignoretext="Confirmer avant de masquer l'interface" name="okcancelignore" notext="Annuler" yestext="OK"/> </notification> + <notification name="PathfindingLinksets_WarnOnPhantom"> + L'indicateur Fantôme de certains groupes de liens sélectionnés basculera. + +Voulez-vous continuer ? + <usetemplate ignoretext="L'indicateur Fantôme de certains groupes de liens basculera." name="okcancelignore" notext="Annuler" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted"> + Certains groupes de liens sélectionnés ne peuvent pas être définis sur [REQUESTED_TYPE] en raison des restrictions d'autorisation les concernant. Ces groupes de liens seront définis sur [RESTRICTED_TYPE]. + +Voulez-vous continuer ? + <usetemplate ignoretext="Certains groupes de liens sélectionnés ne peuvent pas être définis en raison des restrictions d'autorisation les concernant." name="okcancelignore" notext="Annuler" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnVolume"> + Certains groupes de liens sélectionnés ne peuvent pas être définis sur [REQUESTED_TYPE] en raison d'une forme non convexe. + +Voulez-vous continuer ? + <usetemplate ignoretext="Certains groupes de liens sélectionnés ne peuvent pas être définis en raison d'une forme non convexe." name="okcancelignore" notext="Annuler" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted"> + L'indicateur Fantôme de certains groupes de liens sélectionnés basculera. + +Certains groupes de liens sélectionnés ne peuvent pas être définis sur [REQUESTED_TYPE] en raison des restrictions d'autorisation les concernant. Ces groupes de liens seront définis sur [RESTRICTED_TYPE]. + +Voulez-vous continuer ? + <usetemplate ignoretext="L'indicateur Fantôme de certains groupes de liens sélectionnés basculera et d'autres ne peuvent pas être définis en raison de restrictions d'autorisation sur les groupes de liens." name="okcancelignore" notext="Annuler" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnVolume"> + L'indicateur Fantôme de certains groupes de liens sélectionnés basculera. + +Certains groupes de liens sélectionnés ne peuvent pas être définis sur [REQUESTED_TYPE] en raison d'une forme non convexe. + +Voulez-vous continuer ? + <usetemplate ignoretext="L'indicateur Fantôme de certains groupes de liens sélectionnés basculera et d'autres ne peuvent pas être définis en raison d'une forme non convexe." name="okcancelignore" notext="Annuler" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted_MismatchOnVolume"> + Certains groupes de liens sélectionnés ne peuvent pas être définis sur [REQUESTED_TYPE] en raison des restrictions d'autorisation les concernant. Ces groupes de liens seront définis sur [RESTRICTED_TYPE]. + +Certains groupes de liens sélectionnés ne peuvent pas être définis sur [REQUESTED_TYPE] en raison d'une forme non convexe. Les types d'usage de ces groupes de liens ne seront pas modifiés. + +Voulez-vous continuer ? + <usetemplate ignoretext="Certains groupes de liens sélectionnés ne peuvent pas être définis en raison des restrictions d'autorisation les concernant et d'une forme non convexe." name="okcancelignore" notext="Annuler" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted_MismatchOnVolume"> + L'indicateur Fantôme de certains groupes de liens sélectionnés basculera. + +Certains groupes de liens sélectionnés ne peuvent pas être définis sur [REQUESTED_TYPE] en raison des restrictions d'autorisation les concernant. Ces groupes de liens seront définis sur [RESTRICTED_TYPE]. + +Certains groupes de liens sélectionnés ne peuvent pas être définis sur [REQUESTED_TYPE] en raison d'une forme non convexe. Les types d'usage de ces groupes de liens ne seront pas modifiés. + +Voulez-vous continuer ? + <usetemplate ignoretext="L'indicateur Fantôme de certains groupes de liens sélectionnés basculera et d'autres ne peuvent pas être définis en raison de restrictions d'autorisation sur les groupes de liens et d'une forme non convexe." name="okcancelignore" notext="Annuler" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_ChangeToFlexiblePath"> + L'objet sélectionné affecte le maillage de navigation. Si vous le modifiez en Flexibilité, il sera supprimé de ce maillage. + <usetemplate ignoretext="L'objet sélectionné affecte le maillage de navigation. Si vous le modifiez en Flexibilité, il sera supprimé de ce maillage." name="okcancelignore" notext="Annuler" yestext="OK"/> + </notification> <global name="UnsupportedGLRequirements"> Vous semblez ne pas avoir le matériel requis pour utiliser [APP_NAME]. [APP_NAME] requiert une carte graphique OpenGL avec une prise en charge du multitexturing. Si vous avez une telle carte, assurez-vous que vous avez aussi les pilotes les plus récents pour la carte, ainsi que les service packs et les patchs pour votre système d'exploitation. @@ -3138,4 +3324,12 @@ Désactivation des mises à jour futures de ce fichier... <notification name="LocalBitmapsVerifyFail"> Tentative d'ajout d'un fichier image [FNAME] non valide ou illisible n'ayant pas pu être ouvert ou décodé. Tentative annulée. </notification> + <notification name="PathfindingReturnMultipleItems"> + Vous allez renvoyer [NUM_ITEMS] articles. Voulez-vous vraiment continuer ? + <usetemplate ignoretext="Voulez-vous vraiment renvoyer plusieurs articles ?" name="okcancelignore" notext="Non" yestext="Oui"/> + </notification> + <notification name="PathfindingDeleteMultipleItems"> + Vous allez supprimer [NUM_ITEMS] articles. Voulez-vous vraiment continuer ? + <usetemplate ignoretext="Voulez-vous vraiment supprimer plusieurs articles ?" name="okcancelignore" notext="Non" yestext="Oui"/> + </notification> </notifications> diff --git a/indra/newview/skins/default/xui/fr/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/fr/panel_block_list_sidetray.xml index f54bed4fae..96add2a74b 100644 --- a/indra/newview/skins/default/xui/fr/panel_block_list_sidetray.xml +++ b/indra/newview/skins/default/xui/fr/panel_block_list_sidetray.xml @@ -5,6 +5,6 @@ </text> <scroll_list name="blocked" tool_tip="Liste des résidents actuellement ignorés"/> <button label="Ignorer une personne" label_selected="Ignorer le résident..." name="Block resident..." tool_tip="Choisir un résident à ignorer"/> - <button label="Ignorer l'objet par nom" label_selected="Ignorer l'objet par nom..." name="Block object by name..." tool_tip="Choisir un objet à ignorer par nom"/> + <button label="Ignorer un objet par son nom" label_selected="Ignorer un objet par son nom..." name="Block object by name..." tool_tip="Choisir un objet à ignorer par nom"/> <button label="Ne plus ignorer" label_selected="Ne plus ignorer" name="Unblock" tool_tip="Enlever le résident ou l'objet de la liste des ignorés"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_bottomtray.xml b/indra/newview/skins/default/xui/fr/panel_bottomtray.xml deleted file mode 100644 index c4537861e3..0000000000 --- a/indra/newview/skins/default/xui/fr/panel_bottomtray.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="bottom_tray"> - <string name="DragIndicationImageName" value="Accordion_ArrowOpened_Off"/> - <string name="SpeakBtnToolTip" value="Active/Désactive le micro"/> - <string name="VoiceControlBtnToolTip" value="Affiche/Masque le panneau de contrôle de la voix"/> - <layout_stack name="toolbar_stack"> - <layout_panel name="speak_panel"> - <talk_button name="talk"> - <speak_button label="Parler" label_selected="Parler" name="speak_btn"/> - </talk_button> - </layout_panel> - <layout_panel name="gesture_panel"> - <gesture_combo_list label="Geste" name="Gesture" tool_tip="Affiche/Masque les gestes"/> - </layout_panel> - <layout_panel name="movement_panel"> - <bottomtray_button label="Bouger" name="movement_btn" tool_tip="Affiche/Masque le contrôle des déplacements"/> - </layout_panel> - <layout_panel name="cam_panel"> - <bottomtray_button label="Affichage" name="camera_btn" tool_tip="Affiche/Masque le contrôle de la caméra"/> - </layout_panel> - <layout_panel name="snapshot_panel"> - <bottomtray_button label="" name="snapshots" tool_tip="Prendre une photo"/> - </layout_panel> - <layout_panel name="build_btn_panel"> - <bottomtray_button label="Construire" name="build_btn" tool_tip="Affiche/Masque les outils pour la construction"/> - </layout_panel> - <layout_panel name="search_btn_panel"> - <bottomtray_button label="Rechercher" name="search_btn" tool_tip="Affiche/Masque la recherche"/> - </layout_panel> - <layout_panel name="world_map_btn_panel"> - <bottomtray_button label="Carte" name="world_map_btn" tool_tip="Affiche/Masque la carte du monde"/> - </layout_panel> - <layout_panel name="mini_map_btn_panel"> - <bottomtray_button label="Mini-carte" name="mini_map_btn" tool_tip="Affiche/Masque la mini-carte"/> - </layout_panel> - <layout_panel name="im_well_panel"> - <chiclet_im_well name="im_well"> - <button name="Unread IM messages" tool_tip="Conversations"/> - </chiclet_im_well> - </layout_panel> - <layout_panel name="notification_well_panel"> - <chiclet_notification name="notification_well"> - <button name="Unread" tool_tip="Notifications"/> - </chiclet_notification> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_group_invite.xml b/indra/newview/skins/default/xui/fr/panel_group_invite.xml index 53f7ac33c2..d792439220 100644 --- a/indra/newview/skins/default/xui/fr/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/fr/panel_group_invite.xml @@ -9,6 +9,9 @@ <panel.string name="already_in_group"> Certains résidents que vous avez choisis font déjà partie du groupe et l'invitation ne leur a donc pas été envoyée. </panel.string> + <panel.string name="invite_selection_too_large"> + Invitations de groupe non envoyées : trop de résidents sélectionnés. Les invitations de groupe sont limitées à 100 par demande. + </panel.string> <text name="help_text"> Vous pouvez inviter plusieurs résidents à la fois. Cliquez d'abord sur Choisir un résident. </text> diff --git a/indra/newview/skins/default/xui/fr/panel_login.xml b/indra/newview/skins/default/xui/fr/panel_login.xml index e54b36644c..c8a1fe8751 100644 --- a/indra/newview/skins/default/xui/fr/panel_login.xml +++ b/indra/newview/skins/default/xui/fr/panel_login.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_login"> - <panel.string name="create_account_url"> - http://fr.secondlife.com/registration/ - </panel.string> <panel.string name="forgot_password_url"> http://secondlife.com/account/request.php?lang=fr </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> + <text name="log_in_text"> + CONNEXION + </text> <text name="username_text"> Nom d'utilisateur : </text> @@ -15,34 +15,32 @@ <text name="password_text"> Mot de passe : </text> - <check_box label="Enregistrer" name="remember_check"/> - <button label="Connexion" name="connect_btn"/> - <text name="mode_selection_text"> - Mode : - </text> - <combo_box name="mode_combo" tool_tip="Sélectionnez un mode. Pour une exploration facile et rapide avec chat, choisissez Basique. Pour accéder à plus de fonctionnalités, choisissez Avancé."> - <combo_box.item label="Basique" name="Basic"/> - <combo_box.item label="Avancé" name="Advanced"/> - </combo_box> + </layout_panel> + <layout_panel name="start_location_panel"> <text name="start_location_text"> Lieu de départ : </text> <combo_box name="start_location_combo"> <combo_box.item label="Dernier emplacement" name="MyLastLocation"/> <combo_box.item label="Domicile" name="MyHome"/> - <combo_box.item label="<Saisir le nom de la région>" name="Typeregionname"/> + <combo_box.item label="<Nom de la région>" name="Typeregionname"/> </combo_box> </layout_panel> - <layout_panel name="links"> - <text name="create_new_account_text"> - S'inscrire + <layout_panel name="links_login_panel"> + <text name="login_help"> + Besoin d'aide ? </text> <text name="forgot_password_text"> Nom d'utilisateur ou mot de passe oublié ? </text> - <text name="login_help"> - Besoin d'aide ? + <button label="Connexion" name="connect_btn"/> + <check_box label="Enregistrer" name="remember_check"/> + </layout_panel> + <layout_panel name="links"> + <text name="create_account_text"> + CRÉER VOTRE COMPTE </text> + <button label="Commencer" name="create_new_account_btn"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml index 82cdf292ab..762dee01bb 100644 --- a/indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="chat_bar"> +<panel name="nearby_chat"> <line_editor label="Cliquer ici pour chatter." name="chat_box" tool_tip="Appuyer sur Entrée pour dire, Ctrl-Entrée pour crier"/> <button name="show_nearby_chat" tool_tip="Affiche/Masque le journal de chats près de vous"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_postcard_settings.xml b/indra/newview/skins/default/xui/fr/panel_postcard_settings.xml index 6f4e9c23f9..945a5e0272 100644 --- a/indra/newview/skins/default/xui/fr/panel_postcard_settings.xml +++ b/indra/newview/skins/default/xui/fr/panel_postcard_settings.xml @@ -9,12 +9,12 @@ </combo_box> <layout_stack name="postcard_image_params_ls"> <layout_panel name="postcard_image_size_lp"> - <spinner label="Largeur" name="postcard_snapshot_width"/> - <spinner label="Hauteur" name="postcard_snapshot_height"/> + <spinner label="Larg." name="postcard_snapshot_width"/> + <spinner label="Haut." name="postcard_snapshot_height"/> <check_box label="Conserver les proportions" name="postcard_keep_aspect_check"/> </layout_panel> <layout_panel name="postcard_image_format_quality_lp"> - <slider label="Qualité de l'image" name="image_quality_slider"/> + <slider label="Qualité image" name="image_quality_slider"/> <text name="image_quality_level"> ([QLVL]) </text> diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml index 76ed237451..550beb653e 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml @@ -29,5 +29,7 @@ <check_box label="Chats IM" name="EnableIMChatPopups" tool_tip="Cocher cette case pour qu'un popup s'affiche à réception d'un message instantané."/> <spinner label="Durée de vie du popup Chat près de moi :" name="nearby_toasts_lifetime"/> <spinner label="Disparition progressive du popup Chat près de moi :" name="nearby_toasts_fadingtime"/> - <button label="Traduction automatique" name="ok_btn"/> + <button label="Traduction..." name="ok_btn"/> + <button label="Rechercher/Remplacer..." name="autoreplace_showgui"/> + <button label="Orthographe..." name="spellcheck_showgui"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_move.xml b/indra/newview/skins/default/xui/fr/panel_preferences_move.xml index 94d7322b22..80aed90a2d 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_move.xml @@ -28,7 +28,7 @@ <combo_box.item label="Déplacement vers le clic" name="1"/> </combo_box> <text name="double_click_action_lbl"> - Double-clic sur le terrain : + Double clic sur le terrain : </text> <combo_box name="double_click_action_combo"> <combo_box.item label="Aucune action" name="0"/> diff --git a/indra/newview/skins/default/xui/fr/panel_region_debug.xml b/indra/newview/skins/default/xui/fr/panel_region_debug.xml index 733c3f9a22..98ae250215 100644 --- a/indra/newview/skins/default/xui/fr/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/fr/panel_region_debug.xml @@ -30,11 +30,11 @@ <check_box label="Sur le terrain d'un autre résident" name="return_other_land" tool_tip="Ne renvoyer que les objets se trouvant sur le terrain de quelqu'un d'autre"/> <check_box label="Dans toutes les régions de ce domaine" name="return_estate_wide" tool_tip="Renvoyer les objets dans toutes les régions qui constituent ce domaine"/> <button label="Renvoyer" name="return_btn"/> - <button label="Afficher les collisions les plus consommatrices..." name="top_colliders_btn" tool_tip="Liste des objets avec le plus de collisions potentielles" width="320"/> + <button label="Collisions les plus consommatrices" name="top_colliders_btn" tool_tip="Liste des objets avec le plus de collisions potentielles" width="320"/> <button label="?" left="337" name="top_colliders_help"/> - <button label="Afficher les objets scriptés les plus consommateurs..." name="top_scripts_btn" tool_tip="Liste des objets qui passent le plus de temps à exécuter des scripts" width="320"/> + <button label="Scripts les plus consommateurs" name="top_scripts_btn" tool_tip="Liste des objets passant le plus de temps à exécuter des scripts" width="320"/> <button label="?" left="337" name="top_scripts_help"/> <button label="Redémarrer la région" name="restart_btn" tool_tip="Redémarrer la région au bout de 2 minutes" width="160"/> <button label="?" left="177" name="restart_help"/> - <button label="Retarder le redémarrage" name="cancel_restart_btn" tool_tip="Retarder le redémarrage de la région d'une heure" width="160"/> + <button label="Annuler le redémarrage" name="cancel_restart_btn" tool_tip="Annuler le redémarrage de la région." width="160"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_region_environment.xml b/indra/newview/skins/default/xui/fr/panel_region_environment.xml index d18503db86..085a308786 100644 --- a/indra/newview/skins/default/xui/fr/panel_region_environment.xml +++ b/indra/newview/skins/default/xui/fr/panel_region_environment.xml @@ -15,7 +15,7 @@ <combo_box.item label="-Effectuer une sélection-" name="item0"/> </combo_box> <text name="sky_dayc_settings_title"> - Ciel / Cycle du jour + Ciel/Cycle du jour </text> <radio_group name="sky_dayc_settings_radio_group"> <radio_item label="Ciel fixe" name="my_sky_settings"/> diff --git a/indra/newview/skins/default/xui/fr/panel_region_estate.xml b/indra/newview/skins/default/xui/fr/panel_region_estate.xml index 9d97d1bf29..be89020ac7 100644 --- a/indra/newview/skins/default/xui/fr/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/fr/panel_region_estate.xml @@ -21,7 +21,7 @@ domaine. Conditions d'accès des résidents : </text> <check_box label="Informations de paiement enregistrées" name="limit_payment" tool_tip="Pour pouvoir accéder à ce domaine, les résidents doivent avoir enregistré des informations de paiement. Consultez le [SUPPORT_SITE] pour plus d'informations."/> - <check_box label="Âge vérifié" name="limit_age_verified" tool_tip="Pour que les résidents puissent accéder à ce domaine, leur âge doit avoir fait l'objet d'une vérification. Consultez le [SUPPORT_SITE] pour plus d'informations."/> + <check_box label="Avoir plus de 18 ans" name="limit_age_verified" tool_tip="Pour accéder à ce domaine, les résidents doivent avoir au moins 18 ans. Consultez le [SUPPORT_SITE] pour plus d'informations."/> <check_box label="Autoriser les chats vocaux" name="voice_chat_check"/> <button label="?" name="voice_chat_help"/> <text name="abuse_email_text"> diff --git a/indra/newview/skins/default/xui/fr/panel_region_general.xml b/indra/newview/skins/default/xui/fr/panel_region_general.xml index b5795bebe2..234d316069 100644 --- a/indra/newview/skins/default/xui/fr/panel_region_general.xml +++ b/indra/newview/skins/default/xui/fr/panel_region_general.xml @@ -22,7 +22,7 @@ <check_box label="Interdire le vol" name="block_fly_check"/> <check_box label="Autoriser les dégâts" name="allow_damage_check"/> <check_box label="Interdire les bousculades" name="restrict_pushobject"/> - <check_box label="Autoriser la revente" name="allow_land_resell_check"/> + <check_box label="Autoriser la revente de terrain" name="allow_land_resell_check"/> <check_box label="Autoriser la fusion/division" name="allow_parcel_changes_check"/> <check_box label="Ne pas afficher dans la recherche" name="block_parcel_search_check" tool_tip="Afficher cette région et ses parcelles dans les résultats de recherche"/> <check_box label="Autoriser les objets de maillage" name="mesh_rez_enabled_check" tool_tip="Laisser les gens rezzer des objets de maillage dans cette région."/> diff --git a/indra/newview/skins/default/xui/fr/panel_region_terrain.xml b/indra/newview/skins/default/xui/fr/panel_region_terrain.xml index d7e321d06d..97f486d3a3 100644 --- a/indra/newview/skins/default/xui/fr/panel_region_terrain.xml +++ b/indra/newview/skins/default/xui/fr/panel_region_terrain.xml @@ -55,8 +55,8 @@ du terrain" name="terrain_lower_spin"/> <spinner label="Bas" name="height_start_spin_2"/> <spinner label="Haut" name="height_range_spin_0"/> <spinner label="Haut" name="height_range_spin_2"/> - <button label="Télécharger le terrain au format RAW..." name="download_raw_btn" tool_tip="Réservé aux propriétaires de domaine, pas aux gérants" width="230"/> - <button label="Charger le terrain au format RAW..." name="upload_raw_btn" tool_tip="Réservé aux propriétaires de domaine, pas aux gérants" width="230"/> + <button label="Télécharger le terrain en RAW..." name="download_raw_btn" tool_tip="Réservé aux propriétaires de domaine, pas aux gérants" width="230"/> + <button label="Charger un terrain en RAW..." name="upload_raw_btn" tool_tip="Réservé aux propriétaires de domaine, pas aux gérants" width="230"/> <button label="Figer le terrain" name="bake_terrain_btn" tool_tip="Définir le terrain actuel comme point central pour les limites d'élévation/abaissement"/> <button label="Appliquer" name="apply_btn"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_region_texture.xml b/indra/newview/skins/default/xui/fr/panel_region_texture.xml deleted file mode 100644 index c0b667137a..0000000000 --- a/indra/newview/skins/default/xui/fr/panel_region_texture.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Textures du sol" name="Textures"> - <text name="region_text_lbl"> - Région : - </text> - <text name="region_text"> - (inconnue) - </text> - <text name="base_texture_text"> - Textures de base (fichiers 128x128, 24 bit .tga) - </text> - <text name="height_text_lbl"> - 1 (faible) - </text> - <text name="height_text_lbl2"> - 2 - </text> - <text name="height_text_lbl3"> - 3 - </text> - <text name="height_text_lbl4"> - 4 (élevé) - </text> - <text name="detail_texture_text"> - Textures du terrain (fichiers.tga 512 x 512, 24 bit requis) - </text> - <text name="height_text_lbl5"> - Limites d'élévation de texture - </text> - <text name="height_text_lbl6"> - Nord-ouest - </text> - <text name="height_text_lbl7"> - Nord-est - </text> - <text name="height_text_lbl8"> - Sud-ouest - </text> - <text name="height_text_lbl9"> - Sud-est - </text> - <text name="height_text_lbl10" width="460"> - Ces valeurs représentent les limites de mélange pour les textures ci-dessus. - </text> - <text name="height_text_lbl11"> - En mètres, la valeur Bas correspond à la hauteur max. de la texture n°1 - </text> - <text name="height_text_lbl12"> - et la valeur Haut correspond à la hauteur min. de la texture n°4. - </text> - <text name="height_text_lbl13"> - Nord-est - </text> - <spinner label="Bas" name="height_start_spin_0"/> - <spinner label="Bas" name="height_start_spin_1"/> - <spinner label="Bas" name="height_start_spin_2"/> - <spinner label="Bas" name="height_start_spin_3"/> - <spinner label="Haut" name="height_range_spin_0"/> - <spinner label="Haut" name="height_range_spin_1"/> - <spinner label="Haut" name="height_range_spin_2"/> - <spinner label="Haut" name="height_range_spin_3"/> - <text name="height_text_lbl14"> - Ces valeurs représentent les limites de mélange pour les textures ci-dessus. - </text> - <text name="height_text_lbl15"> - La valeur Bas correspond à la hauteur max. de la Texture 1, - </text> - <text name="height_text_lbl16"> - et la valeur Haut correspond à la hauteur min. de la Texture 4. - </text> - <button label="Appliquer" name="apply_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_side_tray.xml b/indra/newview/skins/default/xui/fr/panel_side_tray.xml deleted file mode 100644 index 178ae4324b..0000000000 --- a/indra/newview/skins/default/xui/fr/panel_side_tray.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<!-- Side tray cannot show background because it is always - partially on screen to hold tab buttons. --> -<side_tray name="sidebar"> - <sidetray_tab description="Activer/désactiver le panneau latéral." name="sidebar_openclose" tab_title="Activer/désactiver le panneau latéral"/> - <sidetray_tab description="Domicile." name="sidebar_home" tab_title="Accueil"> - <panel label="domicile" name="panel_home"/> - </sidetray_tab> - <sidetray_tab description="Modifiez votre profil public et vos Favoris." name="sidebar_me" tab_title="Mon profil"> - <panel_container name="panel_container"> - <panel label="Moi" name="panel_me"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="Trouvez vos amis, vos contacts et les personnes se trouvant près de vous." name="sidebar_people" tab_title="Personnes"> - <panel_container name="panel_container"> - <panel label="Profil du groupe" name="panel_group_info_sidetray"/> - <panel label="Résidents et objets ignorés" name="panel_block_list_sidetray"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="Trouvez de nouveaux lieux à découvrir et les lieux que vous connaissez déjà ." label="Lieux" name="sidebar_places" tab_title="Endroits"> - <panel label="Lieux" name="panel_places"/> - </sidetray_tab> - <sidetray_tab description="Parcourez votre inventaire." name="sidebar_inventory" tab_title="Mon inventaire"> - <panel label="Modifier l'inventaire" name="sidepanel_inventory"/> - </sidetray_tab> - <sidetray_tab description="Modifiez votre apparence actuelle." name="sidebar_appearance" tab_title="Mon apparence"> - <panel label="Changer d'apparence" name="sidepanel_appearance"/> - </sidetray_tab> -</side_tray> diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_inventory.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_inventory.xml index 4454d2475e..472c4a5e8f 100644 --- a/indra/newview/skins/default/xui/fr/panel_snapshot_inventory.xml +++ b/indra/newview/skins/default/xui/fr/panel_snapshot_inventory.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_snapshot_inventory"> <text name="title"> - Enregistrer dans mon inventaire + Enregistrer dans l'inventaire </text> <text name="hint_lbl"> - L'enregistrement d'une image dans votre inventaire coûte [UPLOAD_COST] L$. Pour enregistrer votre image sous forme de texture, sélectionnez l'un des formats carrés. + L'enregistrement d'une image dans l'inventaire coûte [UPLOAD_COST] L$. Pour enregistrer votre image sous forme de texture, sélectionnez un format carré. </text> <combo_box label="Résolution" name="texture_size_combo"> <combo_box.item label="Fenêtre actuelle" name="CurrentWindow"/> diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_local.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_local.xml index 41264521fd..97dc3e7e2b 100644 --- a/indra/newview/skins/default/xui/fr/panel_snapshot_local.xml +++ b/indra/newview/skins/default/xui/fr/panel_snapshot_local.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_snapshot_local"> <text name="title"> - Enregistrer sur mon ordinateur + Enregistrer sur l'ordinateur </text> <combo_box label="Résolution" name="local_size_combo"> <combo_box.item label="Fenêtre actuelle" name="CurrentWindow"/> @@ -25,7 +25,7 @@ <combo_box.item label="JPEG" name="JPEG"/> <combo_box.item label="BMP (sans perte)" name="BMP"/> </combo_box> - <slider label="Qualité de l'image" name="image_quality_slider"/> + <slider label="Qualité image" name="image_quality_slider"/> <text name="image_quality_level"> ([QLVL]) </text> diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_options.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_options.xml index db3fcbeac9..befe1b3bc6 100644 --- a/indra/newview/skins/default/xui/fr/panel_snapshot_options.xml +++ b/indra/newview/skins/default/xui/fr/panel_snapshot_options.xml @@ -2,6 +2,6 @@ <panel name="panel_snapshot_options"> <button label="Publier sur le flux de mon profil" name="save_to_profile_btn"/> <button label="Envoyer par e-mail" name="save_to_email_btn"/> - <button label="Enregistrer dans mon inventaire ([AMOUNT] L$)" name="save_to_inventory_btn"/> - <button label="Enregistrer sur mon ordinateur" name="save_to_computer_btn"/> + <button label="Enreg. dans l'inventaire ([AMOUNT] L$)" name="save_to_inventory_btn"/> + <button label="Enreg. sur l'ordinateur" name="save_to_computer_btn"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml index bb23b52850..82a4815144 100644 --- a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml @@ -10,7 +10,7 @@ Envoi en cours... </string> <text name="title"> - Envoyer par e-mail + E-mail </text> <button label="Message" name="message_btn"/> <button label="Paramètres" name="settings_btn"/> diff --git a/indra/newview/skins/default/xui/fr/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/fr/panel_volume_pulldown.xml new file mode 100644 index 0000000000..e05c93a4ac --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_volume_pulldown.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="volumepulldown_floater"> + <slider label="Principal" name="System Volume"/> + <slider label="Boutons" name="UI Volume"/> + <slider label="Ambiant" name="Wind Volume"/> + <slider label="Sons" name="SFX Volume"/> + <check_box name="gesture_audio_play_btn" tool_tip="Activer les sons des gestes."/> + <slider label="Musique" name="Music Volume"/> + <check_box name="enable_music" tool_tip="Activer les flux de musique."/> + <slider label="Médias" name="Media Volume"/> + <check_box name="enable_media" tool_tip="Activer les flux de média."/> + <slider label="Voix" name="Voice Volume"/> + <check_box name="enable_voice_check" tool_tip="Activer le chat vocal."/> +</panel> diff --git a/indra/newview/skins/default/xui/fr/sidepanel_item_info.xml b/indra/newview/skins/default/xui/fr/sidepanel_item_info.xml index 95649d3934..e7fc7859c9 100644 --- a/indra/newview/skins/default/xui/fr/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/fr/sidepanel_item_info.xml @@ -3,6 +3,9 @@ <panel.string name="unknown"> (inconnu) </panel.string> + <panel.string name="unknown_multiple"> + (valeur inconnue ou valeurs multiples) + </panel.string> <panel.string name="public"> (public) </panel.string> diff --git a/indra/newview/skins/default/xui/fr/sidepanel_task_info.xml b/indra/newview/skins/default/xui/fr/sidepanel_task_info.xml index bd8a39fe16..60027d41cb 100644 --- a/indra/newview/skins/default/xui/fr/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/fr/sidepanel_task_info.xml @@ -18,6 +18,12 @@ <panel.string name="text modify info 4"> Vous ne pouvez pas modifier ces objets </panel.string> + <panel.string name="text modify info 5"> + Impossible de modifier cet objet au-delà de la frontière d'une région + </panel.string> + <panel.string name="text modify info 6"> + Impossible de modifier ces objets au-delà de la frontière d'une région + </panel.string> <panel.string name="text modify warning"> Cet objet comprend des parties liées </panel.string> @@ -95,6 +101,9 @@ </combo_box> <spinner label="Prix : L$" name="Edit Cost"/> <check_box label="Afficher avec la recherche" name="search_check" tool_tip="Permettre aux autres résidents de voir cet objet dans les résultats de recherche"/> + <text name="pathfinding_attributes_label"> + Attributs de recherche de chemin : + </text> <text name="B:"> B : </text> diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 0987952c28..6a2a3f559a 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -137,7 +137,7 @@ Quitter </string> <string name="create_account_url"> - http://join.secondlife.com/index.php?lang=fr-FR + http://join.secondlife.com/index.php?lang=fr-FR&sourceid=[sourceid] </string> <string name="LoginFailedViewerNotPermitted"> Le client que vous utilisez ne permet plus d'accéder à Second Life. Téléchargez un nouveau client à la page suivante : @@ -1006,6 +1006,9 @@ Veuillez réessayer de vous connecter dans une minute. <string name="script_files"> Scripts </string> + <string name="dictionary_files"> + Dictionnaires + </string> <string name="AvatarSetNotAway"> Présent </string> @@ -1411,6 +1414,12 @@ Veuillez réessayer de vous connecter dans une minute. <string name="InvFolder favorite"> Mes Favoris </string> + <string name="InvFolder Favorites"> + Mes favoris + </string> + <string name="InvFolder favorites"> + Mes favoris + </string> <string name="InvFolder Current Outfit"> Tenue actuelle </string> @@ -1426,6 +1435,12 @@ Veuillez réessayer de vous connecter dans une minute. <string name="InvFolder Meshes"> Maillages </string> + <string name="InvFolder Received Items"> + Articles reçus + </string> + <string name="InvFolder Merchant Outbox"> + Boîte d'envoi vendeur + </string> <string name="InvFolder Friends"> Amis </string> @@ -3864,6 +3879,12 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. <string name="LocationCtrlSeeAVsTooltip"> Avatars visibles et chat autorisé en dehors de cette parcelle </string> + <string name="LocationCtrlPathfindingDirtyTooltip"> + Les objets mobiles risquent de ne pas se comporter correctement dans cette région tant qu'elle n'est pas refigée. + </string> + <string name="LocationCtrlPathfindingDisabledTooltip"> + La recherche de chemin dynamique n'est pas activée dans cette région. + </string> <string name="UpdaterWindowTitle"> [APP_NAME] - Mise à jour </string> @@ -4893,7 +4914,7 @@ Essayez avec le chemin d'accès à l'éditeur entre guillemets doubles Parler </string> <string name="Command_View_Label"> - Paramètres de la caméra + Caméra </string> <string name="Command_Voice_Label"> Paramètres vocaux @@ -5006,6 +5027,21 @@ Essayez avec le chemin d'accès à l'éditeur entre guillemets doubles <string name="Normal"> Normal </string> + <string name="Pathfinding_Wiki_URL"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </string> + <string name="Pathfinding_Object_Attr_None"> + Aucun + </string> + <string name="Pathfinding_Object_Attr_Permanent"> + Maillage de navigation affecté + </string> + <string name="Pathfinding_Object_Attr_Character"> + Personnage + </string> + <string name="Pathfinding_Object_Attr_MultiSelect"> + (Multiple) + </string> <string name="snapshot_quality_very_low"> Très faible </string> @@ -5021,4 +5057,10 @@ Essayez avec le chemin d'accès à l'éditeur entre guillemets doubles <string name="snapshot_quality_very_high"> Très élevée </string> + <string name="TeleportMaturityExceeded"> + Le résident ne peut pas visiter cette région. + </string> + <string name="UserDictionary"> + [User] + </string> </strings> diff --git a/indra/newview/skins/default/xui/fr/teleport_strings.xml b/indra/newview/skins/default/xui/fr/teleport_strings.xml index d0c74ff353..6065fa2966 100644 --- a/indra/newview/skins/default/xui/fr/teleport_strings.xml +++ b/indra/newview/skins/default/xui/fr/teleport_strings.xml @@ -45,6 +45,9 @@ Pour recommencer le didacticiel, accédez à Welcome Island Public. <message name="no_inventory_host"> L'inventaire est temporairement indisponible. </message> + <message name="MustGetAgeRegion"> + Pour accéder à cette région, vous devez avoir au moins 18 ans. + </message> </message_set> <message_set name="progress"> <message name="sending_dest"> @@ -80,5 +83,8 @@ Pour recommencer le didacticiel, accédez à Welcome Island Public. <message name="requesting"> Demande de téléportation en cours... </message> + <message name="pending"> + En attente de téléportation... + </message> </message_set> </teleport_messages> diff --git a/indra/newview/skins/default/xui/it/floater_about.xml b/indra/newview/skins/default/xui/it/floater_about.xml index 39114b7bf7..c672511fc5 100644 --- a/indra/newview/skins/default/xui/it/floater_about.xml +++ b/indra/newview/skins/default/xui/it/floater_about.xml @@ -66,27 +66,26 @@ Versione Server voice: [VOICE_VERSION] </panel> <panel label="Licenze" name="licenses_panel"> <text_editor name="credits_editor"> - 3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion - APR Copyright (C) 2000-2004 The Apache Software Foundation - Collada DOM Copyright 2005 Sony Computer Entertainment Inc. - cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se) + 3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion + APR Copyright (C) 2011 The Apache Software Foundation + Collada DOM Copyright 2006 Sony Computer Entertainment Inc. + cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se) DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc. expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. - FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org). + FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg. GL Copyright (C) 1999-2004 Brian Paul. GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University and David Luebke, Brenden Schubert, University of Virginia. google-perftools Copyright (c) 2005, Google Inc. Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited. jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW) jpeglib Copyright (C) 1991-1998, Thomas G. Lane. - ogg/vorbis Copyright (C) 2001, Xiphophorus - OpenSSL Copyright (C) 1998-2002 The OpenSSL Project. - PCRE Copyright (c) 1997-2008 University of Cambridge + ogg/vorbis Copyright (C) 2002, Xiphophorus + OpenSSL Copyright (C) 1998-2008 The OpenSSL Project. + PCRE Copyright (c) 1997-2012 University of Cambridge SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) xmlrpc-epi Copyright (C) 2000 Epinions, Inc. - zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler. - google-perftools Copyright (c) 2005, Google Inc. + zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler. Il Viewer Second Life utilizza Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (e licenziatari). Tutti i diritti riservati. Per informazioni dettagliate, vedere www.havok.com. 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 cfc3ad8fdb..fe3e59b0bd 100644 --- a/indra/newview/skins/default/xui/it/floater_about_land.xml +++ b/indra/newview/skins/default/xui/it/floater_about_land.xml @@ -470,7 +470,7 @@ Media: Consenti l'accesso solo ai Residenti che: </text> <check_box label="Hanno informazioni di pagamento in archivio [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="Per poter visitare questo lotto i Residenti devono aver fornito informazioni di pagamento a Linden Lab. Vedi [SUPPORT_SITE] per maggiori informazioni."/> - <check_box label="Hanno verificato l'età [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Per poter visitare questo lotto i Residenti devono aver verificato la propria età . Vedi [SUPPORT_SITE] per maggiori informazioni."/> + <check_box label="Hanno almeno 18 anni [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Per poter visitare questo lotto i Residenti devono avere almeno 18 anni. Vedi [SUPPORT_SITE] per maggiori informazioni."/> <check_box label="Permetti accesso al gruppo: [GROUP]" name="GroupCheck" tool_tip="Imposta il gruppo nel pannello generale."/> <check_box label="Vendi pass a:" name="PassCheck" tool_tip="Permetti in questo terreno l'accesso temporaneo"/> <combo_box name="pass_combo"> diff --git a/indra/newview/skins/default/xui/it/floater_animation_preview.xml b/indra/newview/skins/default/xui/it/floater_animation_preview.xml deleted file mode 100644 index dc99d287b9..0000000000 --- a/indra/newview/skins/default/xui/it/floater_animation_preview.xml +++ /dev/null @@ -1,187 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Animation Preview" title=""> - <floater.string name="failed_to_initialize"> - Impossibile inizializzare la sequenza - </floater.string> - <floater.string name="anim_too_long"> - Il file dell'animazione è lungo [LENGTH] secondi. - -La lunghezza massima è [MAX_LENGTH] secondi. - </floater.string> - <floater.string name="failed_file_read"> - Impossibile leggere il file dell'animazione. - -[STATUS] - </floater.string> - <floater.string name="E_ST_OK"> - Ok - </floater.string> - <floater.string name="E_ST_EOF"> - Fine prematura del file. - </floater.string> - <floater.string name="E_ST_NO_CONSTRAINT"> - Impossibile leggere la definizione del vincolo. - </floater.string> - <floater.string name="E_ST_NO_FILE"> - Impossibile aprire il file BVH. - </floater.string> - <floater.string name="E_ST_NO_HIER"> - Intestazione HIERARCHY non valida. - </floater.string> - <floater.string name="E_ST_NO_JOINT"> - Impossibile trovare la ROOT o JOINT. - </floater.string> - <floater.string name="E_ST_NO_NAME"> - Impossibile trovare il nome JOINT. - </floater.string> - <floater.string name="E_ST_NO_OFFSET"> - Impossibile trovare OFFSET. - </floater.string> - <floater.string name="E_ST_NO_CHANNELS"> - Impossibile trovare CHANNELS. - </floater.string> - <floater.string name="E_ST_NO_ROTATION"> - Impossibile ottenere un ordine di rotazione. - </floater.string> - <floater.string name="E_ST_NO_AXIS"> - Rotazione dell'asse non disponibile. - </floater.string> - <floater.string name="E_ST_NO_MOTION"> - Impossibile trovare MOTION. - </floater.string> - <floater.string name="E_ST_NO_FRAMES"> - Impossibile ottenere il numero dei frame. - </floater.string> - <floater.string name="E_ST_NO_FRAME_TIME"> - Impossibile ottenere il tempo del frame. - </floater.string> - <floater.string name="E_ST_NO_POS"> - Impossibile ottenere i valori della posizione. - </floater.string> - <floater.string name="E_ST_NO_ROT"> - Impossibile ottenere i valori di rotazione. - </floater.string> - <floater.string name="E_ST_NO_XLT_FILE"> - Impossibile aprire il file di traduzione. - </floater.string> - <floater.string name="E_ST_NO_XLT_HEADER"> - Impossibile leggere l'intestazione della traduzione. - </floater.string> - <floater.string name="E_ST_NO_XLT_NAME"> - Impossibile leggere i nomi della traduzione. - </floater.string> - <floater.string name="E_ST_NO_XLT_IGNORE"> - Impossibile leggere la traduzione, ignora il valore. - </floater.string> - <floater.string name="E_ST_NO_XLT_RELATIVE"> - Impossibile leggere la traduzione del valore relativo. - </floater.string> - <floater.string name="E_ST_NO_XLT_OUTNAME"> - Valore non trovato. - </floater.string> - <floater.string name="E_ST_NO_XLT_MATRIX"> - Impossibile leggere la matrice di traduzione. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGECHILD"> - Impossibile trovare il nome mergechild. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGEPARENT"> - Impossibile ottenere il nome mergeparent. - </floater.string> - <floater.string name="E_ST_NO_XLT_PRIORITY"> - Impossibile ottenere il valore di priorità . - </floater.string> - <floater.string name="E_ST_NO_XLT_LOOP"> - Impossibile ottenere il valore di ripetizione. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEIN"> - Impossibile ottenere i valori easeIn. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEOUT"> - Cannot get ease Out values. - </floater.string> - <floater.string name="E_ST_NO_XLT_HAND"> - Impossibile ottenere il valore morph della mano. - </floater.string> - <floater.string name="E_ST_NO_XLT_EMOTE"> - Impossibile leggere il nome emote. - </floater.string> - <floater.string name="E_ST_BAD_ROOT"> - Nome non corretto del root joint, usa "hip". - </floater.string> - <text name="name_label"> - Nome: - </text> - <text name="description_label"> - Descrizione: - </text> - <spinner label="Priorità " name="priority" tool_tip="Definisce quali altre animazioni possono essere sostituite da questa animazione"/> - <check_box label="Ciclica" name="loop_check" tool_tip="Riproduce questa animazione in ripetizione"/> - <spinner label="In(%)" name="loop_in_point" tool_tip="Imposta il punto sul quale ritorna l'animazione"/> - <spinner label="Out(%)" name="loop_out_point" tool_tip="Imposta il punto sul quale termina l'animazione"/> - <text name="hand_label"> - Postura della mano - </text> - <combo_box name="hand_pose_combo" tool_tip="Definisce ciò che fanno le mani durante l'animazione"> - <combo_box.item label="Stendi" name="Spread"/> - <combo_box.item label="Rilassato" name="Relaxed"/> - <combo_box.item label="Indica entrambi" name="PointBoth"/> - <combo_box.item label="Pugno" name="Fist"/> - <combo_box.item label="Sinistra rilassata" name="RelaxedLeft"/> - <combo_box.item label="Indica sinistra" name="PointLeft"/> - <combo_box.item label="Pugno con la sinistra" name="FistLeft"/> - <combo_box.item label="Destra rilassata" name="RelaxedRight"/> - <combo_box.item label="Indica destra" name="PointRight"/> - <combo_box.item label="Pugno destro" name="FistRight"/> - <combo_box.item label="Saluta a destra" name="SaluteRight"/> - <combo_box.item label="Battitura" name="Typing"/> - <combo_box.item label="Pace a destra" name="PeaceRight"/> - </combo_box> - <text name="emote_label"> - Espressione - </text> - <combo_box name="emote_combo" tool_tip="Definisce ciò che fa il viso durante l'animazione"> - <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"> - Vedi anteprima mentre - </text> - <combo_box name="preview_base_anim" tool_tip="Da usarsi per controllare il comportamento dell'animazione mentre l'avatar svolge azioni abituali."> - <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)" name="ease_in_time" tool_tip="Durata (in secondi) della fusione in entrata delle animazioni"/> - <spinner label="Arresto lento (sec)" name="ease_out_time" tool_tip="Durata (in secondi) della fusione in uscita delle animazioni"/> - <button name="play_btn" tool_tip="Riproduci la tua animazione"/> - <button name="pause_btn" tool_tip="Metti in pausa la tua animazione"/> - <button label="" name="stop_btn" tool_tip="Ferma la riproduzione dell'animazione"/> - <text name="bad_animation_text"> - Impossibile leggere il file dell'animazione. - -Raccomandiamo file di tipo BVH esportati da -Poser 4. - </text> - <button label="Importa ([AMOUNT]L$)" name="ok_btn"/> - <button label="Annulla" name="cancel_btn"/> -</floater> diff --git a/indra/newview/skins/default/xui/it/floater_autoreplace.xml b/indra/newview/skins/default/xui/it/floater_autoreplace.xml new file mode 100644 index 0000000000..559a42cfae --- /dev/null +++ b/indra/newview/skins/default/xui/it/floater_autoreplace.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="autoreplace_floater" title="Impostazioni sostituzione automatica"> + <check_box label="Attiva sostituzione automatica" name="autoreplace_enable" tool_tip="Quando inserisci testo nella chat, sostituisci le parole chiave inserite con l'elemento sostitutivo corrispondente."/> + <button label="Importa lista..." name="autoreplace_import_list" tool_tip="Carica da file una lista esportata in precedenza."/> + <button label="Esporta lista..." name="autoreplace_export_list" tool_tip="Salva la lista selezionata in un file per condividerla."/> + <button label="Nuova lista..." name="autoreplace_new_list" tool_tip="Crea una nuova lista"/> + <button label="Cancella lista" name="autoreplace_delete_list" tool_tip="Cancella la lista selezionata"/> + <button name="autoreplace_list_up" tool_tip="Aumenta la priorità di questa lista."/> + <button name="autoreplace_list_down" tool_tip="Diminuisci la priorità di questa lista."/> + <scroll_list name="autoreplace_list_replacements"> + <scroll_list.columns label="Parola chiave" name="keyword"/> + <scroll_list.columns label="Sostituzione" name="replacement"/> + </scroll_list> + <button label="Aggiungi..." name="autoreplace_add_entry"/> + <button label="Rimuovi" name="autoreplace_delete_entry"/> + <button label="Salva elemento" name="autoreplace_save_entry" tool_tip="Salva questo elemento."/> + <button label="Salva modifiche" name="autoreplace_save_changes" tool_tip="Salva tutte le modifiche."/> + <button label="Annulla" name="autoreplace_cancel" tool_tip="Annulla tutte le modifiche."/> +</floater> +<!-- + <text + top_pad="10" + left="10" + height="16" + width="260" + follows="left|top" + halign="center" + mouse_opaque="true" + name="autoreplace_text2"> + Entries + </text> +--> diff --git a/indra/newview/skins/default/xui/it/floater_chat_bar.xml b/indra/newview/skins/default/xui/it/floater_chat_bar.xml index 94c85b50c8..b47e32ce90 100644 --- a/indra/newview/skins/default/xui/it/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/it/floater_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="chat_bar" title="CHAT NEI DINTORNI"> +<floater name="nearby_chat" title="CHAT NEI DINTORNI"> <panel name="bottom_panel"> <line_editor label="Clicca qui per la chat." name="chat_box" tool_tip="Premi Invio per parlare, Ctrl+Invio per gridare"/> <button name="show_nearby_chat" tool_tip="Mostra/Nasconde il registro della chat nei dintorni"/> diff --git a/indra/newview/skins/default/xui/it/floater_inventory.xml b/indra/newview/skins/default/xui/it/floater_inventory.xml deleted file mode 100644 index 2aa6795988..0000000000 --- a/indra/newview/skins/default/xui/it/floater_inventory.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="IL MIO INVENTARIO"> - <floater.string name="Title"> - IL MIO INVENTARIO - </floater.string> - <floater.string name="TitleFetching"> - IL MIO INVENTARIO (recupero di [ITEM_COUNT] articoli...) [FILTER] - </floater.string> - <floater.string name="TitleCompleted"> - IL MIO INVENTARIO ([ITEM_COUNT] articoli) [FILTER] - </floater.string> - <floater.string name="Fetched"> - Completato - </floater.string> - <panel label="Pannello dell'Inventario" name="Inventory Panel"/> -</floater> diff --git a/indra/newview/skins/default/xui/it/floater_model_preview.xml b/indra/newview/skins/default/xui/it/floater_model_preview.xml index ca36fd2def..e8df4d2d4b 100644 --- a/indra/newview/skins/default/xui/it/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/it/floater_model_preview.xml @@ -92,19 +92,54 @@ <text initial_value="Triangoli" name="triangles" value="Triangoli"/> <text initial_value="Vertici" name="vertices" value="Vertici"/> <text initial_value="Alto" name="high_label" value="Alto"/> + <combo_box name="lod_source_high"> + <item name="Load from file" value="Carica da file"/> + <item name="Generate" value="Genera"/> + </combo_box> <button label="Sfoglia..." name="lod_browse_high"/> + <combo_box name="lod_mode_high"> + <item name="Triangle Limit" value="Limite triangoli"/> + <item name="Error Threshold" value="Limite errori"/> + </combo_box> <text initial_value="0" name="high_triangles" value="0"/> <text initial_value="0" name="high_vertices" value="0"/> <text initial_value="Medio" name="medium_label" value="Medio"/> + <combo_box name="lod_source_medium"> + <item name="Load from file" value="Carica da file"/> + <item name="Generate" value="Genera"/> + <item name="Use LoD above" value="Usa livello di dettaglio indicato in precedenza"/> + </combo_box> <button label="Sfoglia..." name="lod_browse_medium"/> + <combo_box name="lod_mode_medium"> + <item name="Triangle Limit" value="Limite triangoli"/> + <item name="Error Threshold" value="Limite errori"/> + </combo_box> <text initial_value="0" name="medium_triangles" value="0"/> <text initial_value="0" name="medium_vertices" value="0"/> <text initial_value="Basso" name="low_label" value="Basso"/> + <combo_box name="lod_source_low"> + <item name="Load from file" value="Carica da file"/> + <item name="Generate" value="Genera"/> + <item name="Use LoD above" value="Usa livello di dettaglio indicato in precedenza"/> + </combo_box> <button label="Sfoglia..." name="lod_browse_low"/> + <combo_box name="lod_mode_low"> + <item name="Triangle Limit" value="Limite triangoli"/> + <item name="Error Threshold" value="Limite errori"/> + </combo_box> <text initial_value="0" name="low_triangles" value="0"/> <text initial_value="0" name="low_vertices" value="0"/> <text initial_value="Bassissimo" name="lowest_label" value="Bassissimo"/> + <combo_box name="lod_source_lowest"> + <item name="Load from file" value="Carica da file"/> + <item name="Generate" value="Genera"/> + <item name="Use LoD above" value="Usa livello di dettaglio indicato in precedenza"/> + </combo_box> <button label="Sfoglia..." name="lod_browse_lowest"/> + <combo_box name="lod_mode_lowest"> + <item name="Triangle Limit" value="Limite triangoli"/> + <item name="Error Threshold" value="Limite errori"/> + </combo_box> <text initial_value="0" name="lowest_triangles" value="0"/> <text initial_value="0" name="lowest_vertices" value="0"/> <check_box label="Genera normali" name="gen_normals"/> diff --git a/indra/newview/skins/default/xui/it/floater_nearby_chat.xml b/indra/newview/skins/default/xui/it/floater_nearby_chat.xml deleted file mode 100644 index 9e81899880..0000000000 --- a/indra/newview/skins/default/xui/it/floater_nearby_chat.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="nearby_chat" title="CHAT NEI DINTORNI"> - <check_box label="Traduci chat" name="translate_chat_checkbox"/> -</floater> diff --git a/indra/newview/skins/default/xui/it/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/it/floater_pathfinding_characters.xml new file mode 100644 index 0000000000..5122954edb --- /dev/null +++ b/indra/newview/skins/default/xui/it/floater_pathfinding_characters.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_characters" title="Personaggi con pathfinding"> + <floater.string name="messaging_get_inprogress"> + Ricerca personaggi con pathfinding in corso... + </floater.string> + <floater.string name="messaging_get_error"> + Errore rilevato durante la ricerca di personaggi con pathfinding. + </floater.string> + <floater.string name="messaging_complete_none_found"> + Nessun personaggio con pathfinding. + </floater.string> + <floater.string name="messaging_complete_available"> + [NUM_SELECTED] personaggi selezionati su [NUM_TOTAL]. + </floater.string> + <floater.string name="messaging_not_enabled"> + In questa regione non è attivata la funzione pathfinding + </floater.string> + <floater.string name="character_cpu_time"> + [CPU_TIME] µs + </floater.string> + <floater.string name="character_owner_loading"> + [Caricamento in corso] + </floater.string> + <floater.string name="character_owner_unknown"> + [Sconosciuto] + </floater.string> + <floater.string name="character_owner_group"> + [gruppo] + </floater.string> + <panel> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Nome" name="name"/> + <scroll_list.columns label="Descrizione" name="description"/> + <scroll_list.columns label="Proprietario" name="owner"/> + <scroll_list.columns label="CPU" name="cpu_time"/> + <scroll_list.columns label="Altitudine" name="altitude"/> + </scroll_list> + <text name="messaging_status"> + Personaggi: + </text> + <button label="Aggiorna lista" name="refresh_objects_list"/> + <button label="Seleziona tutto" name="select_all_objects"/> + <button label="Non selezionare nessuno" name="select_none_objects"/> + </panel> + <panel> + <text name="actions_label"> + Azioni per i personaggi selezionati: + </text> + <check_box label="Mostra marcatore" name="show_beacon"/> + <check_box label="Mostra capsula fisica" name="show_physics_capsule"/> + <button label="Prendi" name="take_objects"/> + <button label="Prendi copia" name="take_copy_objects"/> + <button label="Teletrasportami alla posizione" name="teleport_me_to_object" tool_tip="Attivato solo se viene selezionato un personaggio."/> + <button label="Restituisci" name="return_objects"/> + <button label="Elimina" name="delete_objects"/> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/it/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/it/floater_pathfinding_console.xml new file mode 100644 index 0000000000..77be220a2a --- /dev/null +++ b/indra/newview/skins/default/xui/it/floater_pathfinding_console.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_console" title="Visualizzazione / test pathfinding"> + <floater.string name="navmesh_viewer_status_library_not_implemented"> + Implementazione libreria percorsi non trovata. + </floater.string> + <floater.string name="navmesh_viewer_status_region_not_enabled"> + In questa regione non è attivata la funzione pathfinding + </floater.string> + <floater.string name="navmesh_viewer_status_region_loading"> + Attendere il caricamento della regione. + </floater.string> + <floater.string name="navmesh_viewer_status_checking_version"> + Controllo stato navmesh + </floater.string> + <floater.string name="navmesh_viewer_status_downloading"> + Scaricamento navmesh in corso + </floater.string> + <floater.string name="navmesh_viewer_status_updating"> + Il navmesh è stato cambiato sul server. Scaricamento del navmesh più recente in corso + </floater.string> + <floater.string name="navmesh_viewer_status_has_navmesh"> + Il navmesh più recente è stato scaricato. + </floater.string> + <floater.string name="navmesh_viewer_status_error"> + Navmesh non scaricato correttamente. + </floater.string> + <floater.string name="navmesh_simulator_status_pending"> + Il navmesh ha modifiche in sospeso. + </floater.string> + <floater.string name="navmesh_simulator_status_building"> + Costruzione navmesh in corso. + </floater.string> + <floater.string name="navmesh_simulator_status_some_pending"> + Alcune regioni navmesh hanno modifiche in sospeso. + </floater.string> + <floater.string name="navmesh_simulator_status_some_building"> + La costruzione di alcune regioni navmesh è in corso. + </floater.string> + <floater.string name="navmesh_simulator_status_pending_and_building"> + Alcune regioni navmesh hanno modifiche in sospeso e in altre la costruzione è in corso. + </floater.string> + <floater.string name="navmesh_simulator_status_complete"> + Navmesh è aggiornato. + </floater.string> + <floater.string name="pathing_library_not_implemented"> + Implementazione libreria percorsi non trovata. + </floater.string> + <floater.string name="pathing_region_not_enabled"> + In questa regione non è attivata la funzione pathfinding + </floater.string> + <floater.string name="pathing_choose_start_and_end_points"> + Seleziona punti iniziale e finale. + </floater.string> + <floater.string name="pathing_choose_start_point"> + Seleziona punto iniziale. + </floater.string> + <floater.string name="pathing_choose_end_point"> + Seleziona punto finale. + </floater.string> + <floater.string name="pathing_path_valid"> + Il percorso viene visualizzato con il colore arancione. + </floater.string> + <floater.string name="pathing_path_invalid"> + Nessun percorso trovato tra i punti selezionati. + </floater.string> + <floater.string name="pathing_error"> + Si è verificato un errore durante la generazione del percorso. + </floater.string> + <tab_container name="view_test_tab_container"> + <panel label="Visuale" name="view_panel"> + <text name="show_label"> + Mostra: + </text> + <check_box label="Mondo" name="show_world"/> + <check_box label="Solo elementi spostabili" name="show_world_movables_only"/> + <check_box label="Navmesh" name="show_navmesh"/> + <text name="show_walkability_label"> + Mostra mappa camminabilità : + </text> + <combo_box name="show_heatmap_mode"> + <combo_box.item label="Non mostrare" name="show_heatmap_mode_none"/> + <combo_box.item label="Personaggio tipo A" name="show_heatmap_mode_a"/> + <combo_box.item label="Personaggio tipo B" name="show_heatmap_mode_b"/> + <combo_box.item label="Personaggio tipo C" name="show_heatmap_mode_c"/> + <combo_box.item label="Personaggio tipo D" name="show_heatmap_mode_d"/> + </combo_box> + <check_box label="Camminabili" name="show_walkables"/> + <check_box label="Volumi materiali" name="show_material_volumes"/> + <check_box label="Ostacoli statici" name="show_static_obstacles"/> + <check_box label="Volumi esclusioni" name="show_exclusion_volumes"/> + <check_box label="Piano acqua" name="show_water_plane"/> + <check_box label="Con vista a raggi X" name="show_xray"/> + </panel> + <panel label="Percorso test" name="test_panel"> + <text name="ctrl_click_label"> + Seleziona il punto iniziale premendo Ctrl e facendo clic. + </text> + <text name="shift_click_label"> + Seleziona il punto finale premendo Maiusc e facendo clic. + </text> + <text name="character_width_label"> + Larghezza personaggio + </text> + <slider name="character_width" value="1"/> + <text name="character_width_unit_label"> + m + </text> + <text name="character_type_label"> + Tipo personaggio + </text> + <combo_box name="path_character_type"> + <combo_box.item label="Nessuno" name="path_character_type_none"/> + <combo_box.item label="A" name="path_character_type_a"/> + <combo_box.item label="B" name="path_character_type_b"/> + <combo_box.item label="C" name="path_character_type_c"/> + <combo_box.item label="D" name="path_character_type_d"/> + </combo_box> + <button label="Cancella percorso" name="clear_path"/> + </panel> + </tab_container> +</floater> diff --git a/indra/newview/skins/default/xui/it/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/it/floater_pathfinding_linksets.xml new file mode 100644 index 0000000000..7edac3ff46 --- /dev/null +++ b/indra/newview/skins/default/xui/it/floater_pathfinding_linksets.xml @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_linksets" title="Set collegati pathfinding"> + <floater.string name="messaging_get_inprogress"> + Ricerca set collegati pathfinding in corso... + </floater.string> + <floater.string name="messaging_get_error"> + Errore rilevato durante la ricerca di set collegati pathfinding. + </floater.string> + <floater.string name="messaging_set_inprogress"> + Modifica set collegati pathfinding selezionati in corso... + </floater.string> + <floater.string name="messaging_set_error"> + Errore rilevato durante la modifica dei set collegati pathfinding selezionati. + </floater.string> + <floater.string name="messaging_complete_none_found"> + Nessun set collegato con pathfinding. + </floater.string> + <floater.string name="messaging_complete_available"> + [NUM_SELECTED] set collegati selezionati su [NUM_TOTAL]. + </floater.string> + <floater.string name="messaging_not_enabled"> + In questa regione non è attivata la funzione pathfinding + </floater.string> + <floater.string name="linkset_terrain_name"> + [Terreno] + </floater.string> + <floater.string name="linkset_terrain_description"> + -- + </floater.string> + <floater.string name="linkset_terrain_owner"> + -- + </floater.string> + <floater.string name="linkset_terrain_scripted"> + -- + </floater.string> + <floater.string name="linkset_terrain_land_impact"> + -- + </floater.string> + <floater.string name="linkset_terrain_dist_from_you"> + -- + </floater.string> + <floater.string name="linkset_owner_loading"> + [Caricamento in corso] + </floater.string> + <floater.string name="linkset_owner_unknown"> + [Sconosciuto] + </floater.string> + <floater.string name="linkset_owner_group"> + [gruppo] + </floater.string> + <floater.string name="linkset_is_scripted"> + Sì + </floater.string> + <floater.string name="linkset_is_not_scripted"> + No + </floater.string> + <floater.string name="linkset_is_unknown_scripted"> + Sconosciuto + </floater.string> + <floater.string name="linkset_use_walkable"> + Camminabile + </floater.string> + <floater.string name="linkset_use_static_obstacle"> + Ostacolo statico + </floater.string> + <floater.string name="linkset_use_dynamic_obstacle"> + Ostacolo mobile + </floater.string> + <floater.string name="linkset_use_material_volume"> + Volume materiale + </floater.string> + <floater.string name="linkset_use_exclusion_volume"> + Volume esclusione + </floater.string> + <floater.string name="linkset_use_dynamic_phantom"> + Oggetto fantasma mobile + </floater.string> + <floater.string name="linkset_is_terrain"> + [non modificabile] + </floater.string> + <floater.string name="linkset_is_restricted_state"> + [limitato] + </floater.string> + <floater.string name="linkset_is_non_volume_state"> + [concavo] + </floater.string> + <floater.string name="linkset_is_restricted_non_volume_state"> + [limitato,concavo] + </floater.string> + <floater.string name="linkset_choose_use"> + Seleziona uso set collegati... + </floater.string> + <panel> + <combo_box name="filter_by_linkset_use"> + <combo_box.item label="Filtra in base all'uso set collegati..." name="filter_by_linkset_use_none"/> + <combo_box.item label="Camminabile" name="filter_by_linkset_use_walkable"/> + <combo_box.item label="Ostacolo statico" name="filter_by_linkset_use_static_obstacle"/> + <combo_box.item label="Ostacolo mobile" name="filter_by_linkset_use_dynamic_obstacle"/> + <combo_box.item label="Volume materiale" name="filter_by_linkset_use_material_volume"/> + <combo_box.item label="Volume esclusione" name="filter_by_linkset_use_exclusion_volume"/> + <combo_box.item label="Oggetto fantasma mobile" name="filter_by_linkset_use_dynamic_phantom"/> + </combo_box> + <button label="Applica" name="apply_filters"/> + <button label="Cancella" name="clear_filters"/> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Nome (prim principale)" name="name"/> + <scroll_list.columns label="Descrizione (prim principale)" name="description"/> + <scroll_list.columns label="Proprietario" name="owner"/> + <scroll_list.columns label="Scriptato" name="scripted"/> + <scroll_list.columns label="Impatto" name="land_impact"/> + <scroll_list.columns label="Distanza" name="dist_from_you"/> + <scroll_list.columns label="Uso set collegati" name="linkset_use"/> + <scroll_list.columns label="A %" name="a_percent"/> + <scroll_list.columns label="B %" name="b_percent"/> + <scroll_list.columns label="C %" name="c_percent"/> + <scroll_list.columns label="D %" name="d_percent"/> + </scroll_list> + <text name="messaging_status"> + Set collegati: + </text> + <button label="Aggiorna lista" name="refresh_objects_list"/> + <button label="Seleziona tutto" name="select_all_objects"/> + <button label="Non selezionare nessuno" name="select_none_objects"/> + </panel> + <panel> + <check_box label="Mostra marcatore" name="show_beacon"/> + <button label="Prendi" name="take_objects"/> + <button label="Prendi copia" name="take_copy_objects"/> + <button label="Teletrasportami alla posizione" name="teleport_me_to_object"/> + <button label="Restituisci" name="return_objects"/> + <button label="Elimina" name="delete_objects"/> + </panel> + <panel> + <text name="walkability_coefficients_label"> + Camminabilità : + </text> + <text name="edit_a_label"> + A + </text> + <line_editor name="edit_a_value" tool_tip="Camminabilità per personaggi di tipo A. Umanoide è un esempio del tipo di personaggio."/> + <text name="edit_b_label"> + B + </text> + <line_editor name="edit_b_value" tool_tip="Camminabilità per personaggi di tipo B. Creatura è un esempio del tipo di personaggio."/> + <text name="edit_c_label"> + C + </text> + <line_editor name="edit_c_value" tool_tip="Camminabilità per personaggi di tipo C. Elemento meccanico è un esempio del tipo di personaggio."/> + <text name="edit_d_label"> + D + </text> + <line_editor name="edit_d_value" tool_tip="Camminabilità per personaggi di tipo D. Altro è un esempio del tipo di personaggio."/> + <button label="Applica modifiche" name="apply_edit_values"/> + <text name="suggested_use_a_label"> + (Umanoide) + </text> + <text name="suggested_use_b_label"> + (Creatura) + </text> + <text name="suggested_use_c_label"> + (Elemento meccanico) + </text> + <text name="suggested_use_d_label"> + (Altro) + </text> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/it/floater_postcard.xml b/indra/newview/skins/default/xui/it/floater_postcard.xml deleted file mode 100644 index cb2916268a..0000000000 --- a/indra/newview/skins/default/xui/it/floater_postcard.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="INVIA FOTO VIA E-MAIL"> - <text name="to_label" width="135"> - Email del destinatario: - </text> - <line_editor left="143" name="to_form" width="127"/> - <text name="from_label"> - La tua email: - </text> - <line_editor left="143" name="from_form" width="127"/> - <text name="name_label"> - Il tuo nome: - </text> - <line_editor left="143" name="name_form" width="127"/> - <text name="subject_label"> - Soggetto: - </text> - <line_editor left="143" name="subject_form" width="127"/> - <line_editor label="Scrivi il soggetto qui." name="subject_form"/> - <text name="msg_label"> - Messaggio: - </text> - <text_editor name="msg_form"> - Scrivi il messaggio qui. - </text_editor> - <text name="fine_print"> - Se il tuo destinatario si registrerà in [SECOND_LIFE], riceverai il relativo bonus. - </text> - <button label="Annulla" name="cancel_btn"/> - <button label="Invia" name="send_btn"/> - <string name="default_subject"> - Cartolina da [SECOND_LIFE]. - </string> - <string name="default_message"> - Vieni a vedere! - </string> - <string name="upload_message"> - Invio... - </string> -</floater> diff --git a/indra/newview/skins/default/xui/it/floater_spellcheck.xml b/indra/newview/skins/default/xui/it/floater_spellcheck.xml new file mode 100644 index 0000000000..2a8557b0fc --- /dev/null +++ b/indra/newview/skins/default/xui/it/floater_spellcheck.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_floater" title="Impostazioni controllo ortografico"> + <check_box label="Attiva controllo ortografico" name="spellcheck_enable"/> + <text name="spellcheck_main"> + Dizionario principale: + </text> + <text label="Registri:" name="spellcheck_additional"> + Dizionari aggiuntivi: + </text> + <text name="spellcheck_available"> + Disponibile + </text> + <text name="spellcheck_active"> + Attivato + </text> + <button label="Rimuovi" name="spellcheck_remove_btn"/> + <button label="Importa..." name="spellcheck_import_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/it/floater_spellcheck_import.xml b/indra/newview/skins/default/xui/it/floater_spellcheck_import.xml new file mode 100644 index 0000000000..c04fc249a7 --- /dev/null +++ b/indra/newview/skins/default/xui/it/floater_spellcheck_import.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_import" title="Imposta dizionario"> + <button label="Sfoglia" label_selected="Sfoglia" name="dictionary_path_browse"/> + <button label="Importa" name="ok_btn"/> + <button label="Annulla" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/it/floater_stats.xml b/indra/newview/skins/default/xui/it/floater_stats.xml index 2241cad711..825b2ce57a 100644 --- a/indra/newview/skins/default/xui/it/floater_stats.xml +++ b/indra/newview/skins/default/xui/it/floater_stats.xml @@ -47,6 +47,12 @@ <stat_bar label="Oggetti a basso LOD" name="physicslodtasks"/> <stat_bar label="Memoria allocata" name="physicsmemoryallocated"/> </stat_view> + <stat_bar label="Script eseguiti" name="simpctscriptsrun"/> + <stat_view label="Pathfinding" name="simpathfinding"> + <stat_bar label="Tempo passaggio AI" name="simsimaistepmsec"/> + <stat_bar label="Passaggi silhouette saltati" name="simsimskippedsilhouettesteps"/> + <stat_bar label="Personaggi aggiornati" name="simsimpctsteppedcharacters"/> + </stat_view> <stat_view label="Tempo (ms)" name="simperf"> <stat_bar label="Tempo totale Frame" name="simframemsec"/> <stat_bar label="Tempo netto" name="simnetmsec"/> diff --git a/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml index e85030087c..c97a91bb3f 100644 --- a/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml @@ -19,6 +19,8 @@ <button label="Default" label_selected="Default" name="Default"/> <button label="Vuoto" label_selected="Vuoto" name="Blank"/> <button label="Niente" label_selected="Niente" name="None"/> + <check_box initial_value="true" label="Anteprima dal vivo" name="apply_immediate_check"/> + <text name="preview_disabled" value="Anteprima disattivata"/> <filter_editor label="Filtro texture" name="inventory search editor"/> <check_box initial_value="false" label="Mostra cartelle" name="show_folders_check"/> <button label="Aggiungi" label_selected="Aggiungi" name="l_add_btn"/> @@ -30,5 +32,4 @@ </scroll_list> <button label="OK" label_selected="OK" name="Select"/> <button label="Annulla" label_selected="Annulla" name="Cancel"/> - <check_box initial_value="true" label="Applica adesso" name="apply_immediate_check"/> </floater> diff --git a/indra/newview/skins/default/xui/it/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/it/floater_texture_fetch_debugger.xml index 57e65c3456..49b6453319 100644 --- a/indra/newview/skins/default/xui/it/floater_texture_fetch_debugger.xml +++ b/indra/newview/skins/default/xui/it/floater_texture_fetch_debugger.xml @@ -45,10 +45,23 @@ <text name="total_time_refetch_vis_cache_label"> 15, Nuovo fetching elementi visibili dalla cache, Tempo: [TIME] secondi, fetching: [SIZE] KB, [PIXEL] MPixels </text> + <text name="total_time_refetch_all_cache_label"> + 16, Nuovo fetching di tutte le texture dalla cache, Tempo: [TIME] secondi, fetching: [SIZE] KB, [PIXEL] MPixels + </text> <text name="total_time_refetch_vis_http_label"> - 16, Nuovo fetching elementi visibili da HTTP, Tempo: [TIME] secondi, fetching: [SIZE] KB, [PIXEL] MPixels + 17, Nuovo fetching elementi visibili da HTTP, Tempo: [TIME] secondi, fetching: [SIZE] KB, [PIXEL] MPixels + </text> + <text name="total_time_refetch_all_http_label"> + 18, Nuovo fetching di tutte le texture da HTTP, Tempo: [TIME] secondi, fetching: [SIZE] KB, [PIXEL] MPixels + </text> + <spinner label="19, Rapporto Texel/Pixel:" name="texel_pixel_ratio"/> + <text name="texture_source_label"> + 20, Fonte texture: </text> - <spinner label="17, Rapporto Texel/Pixel:" name="texel_pixel_ratio"/> + <radio_group name="texture_source"> + <radio_item label="Cache + HTTP" name="0"/> + <radio_item label="Solo HTTP" name="1"/> + </radio_group> <button label="Attiva" name="start_btn"/> <button label="Reimposta" name="clear_btn"/> <button label="Chiudi" name="close_btn"/> @@ -58,5 +71,7 @@ <button label="Decodifica" name="decode_btn"/> <button label="Texture GL" name="gl_btn"/> <button label="Nuovo fetch visibili cache" name="refetchviscache_btn"/> + <button label="Nuovo fetching di tutta la cache" name="refetchallcache_btn"/> <button label="Nuovo fetch visibili HTTP" name="refetchvishttp_btn"/> + <button label="Nuovo fetching di tutto il contenuto HTTP" name="refetchallhttp_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/it/floater_tools.xml b/indra/newview/skins/default/xui/it/floater_tools.xml index c963ac72e6..dd59035dd4 100644 --- a/indra/newview/skins/default/xui/it/floater_tools.xml +++ b/indra/newview/skins/default/xui/it/floater_tools.xml @@ -149,6 +149,12 @@ <panel.string name="text modify info 4"> Non puoi modificare questi oggetti </panel.string> + <panel.string name="text modify info 5"> + Questo oggetto non può essere modificato attraverso il confine di una regione + </panel.string> + <panel.string name="text modify info 6"> + Questi oggetti non possono essere modificati attraverso il confine di una regione + </panel.string> <panel.string name="text modify warning"> Devi selezionare tutto l'oggetto per impostare i permessi </panel.string> @@ -204,12 +210,12 @@ <combo_box.item label="Ingrandisci" name="Zoom"/> </combo_box> <check_box label="In vendita:" name="checkbox for sale"/> + <spinner label="L$" name="Edit Cost"/> <combo_box name="sale type"> <combo_box.item label="Copia" name="Copy"/> <combo_box.item label="Contenuto" name="Contents"/> <combo_box.item label="Originale" name="Original"/> </combo_box> - <spinner label="Prezzo: L$" name="Edit Cost"/> <check_box label="Mostra nella ricerca" name="search_check" tool_tip="Permetti che l'oggetto sia visibile nella ricerca"/> <panel name="perms_build"> <text name="perm_modify"> @@ -245,6 +251,11 @@ F: </text> </panel> + <panel name="pathfinding_attrs_panel"> + <text name="pathfinding_attributes_label"> + Attributi pathfinding: + </text> + </panel> </panel> <panel label="Oggetto" name="Object"> <check_box label="Bloccato" name="checkbox locked" tool_tip="Previene lo spostamento o la cancellazione dell'oggetto. Spesso utile mentre si costruisce per evitare involontarie modifiche."/> diff --git a/indra/newview/skins/default/xui/it/floater_top_objects.xml b/indra/newview/skins/default/xui/it/floater_top_objects.xml index 7d062db23b..d8ca7f4438 100644 --- a/indra/newview/skins/default/xui/it/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/it/floater_top_objects.xml @@ -9,9 +9,6 @@ <floater.string name="scripts_score_label"> Ora </floater.string> - <floater.string name="scripts_mono_time_label"> - Ora 'Mono' - </floater.string> <floater.string name="top_colliders_title"> Oggetti con maggiori collisioni </floater.string> @@ -32,9 +29,10 @@ <scroll_list.columns label="Nome" name="name" width="84"/> <scroll_list.columns label="Proprietario" name="owner" width="84"/> <scroll_list.columns label="Ubicazione" name="location" width="84"/> + <scroll_list.columns label="Lotto" name="parcel"/> <scroll_list.columns label="Ora" name="time" width="84"/> - <scroll_list.columns label="Ora (Mono)" name="mono_time" width="84"/> <scroll_list.columns label="URL" name="URLs"/> + <scroll_list.columns label="Memoria (KB)" name="memory"/> </scroll_list> <text name="id_text"> ID oggetto: @@ -51,6 +49,10 @@ </text> <line_editor font="SansSerifSmall" left="90" name="owner_name_editor" width="280"/> <button label="Filtro" name="filter_owner_btn" width="150"/> + <text name="parcel_name_text"> + Lotto: + </text> + <button label="Filtra" name="filter_parcel_btn"/> <button label="Aggiorna" name="refresh_btn" width="150"/> <button label="Restituisci selezionato" name="return_selected_btn" width="150"/> <button label="Restituisci tutti" left="170" name="return_all_btn"/> diff --git a/indra/newview/skins/default/xui/it/menu_bottomtray.xml b/indra/newview/skins/default/xui/it/menu_bottomtray.xml deleted file mode 100644 index ddd6909136..0000000000 --- a/indra/newview/skins/default/xui/it/menu_bottomtray.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<menu name="hide_camera_move_controls_menu"> - <menu_item_check label="Pulsante Parla" name="EnableVoiceChat"/> - <menu_item_check label="Tasto Gesture" name="ShowGestureButton"/> - <menu_item_check label="Tasto Movimento" name="ShowMoveButton"/> - <menu_item_check label="Tasto Visuale" name="ShowCameraButton"/> - <menu_item_check label="Tasto Foto" name="ShowSnapshotButton"/> - <menu_item_check label="Pulsante Costruisci" name="ShowBuildButton"/> - <menu_item_check label="Pulsante Cerca" name="ShowSearchButton"/> - <menu_item_check label="Pulsante Mappa" name="ShowWorldMapButton"/> - <menu_item_check label="Pulsante Mini mappa" name="ShowMiniMapButton"/> - <menu_item_call label="Taglia" name="NearbyChatBar_Cut"/> - <menu_item_call label="Copia" name="NearbyChatBar_Copy"/> - <menu_item_call label="Incolla" name="NearbyChatBar_Paste"/> - <menu_item_call label="Elimina" name="NearbyChatBar_Delete"/> - <menu_item_call label="Seleziona tutto" name="NearbyChatBar_Select_All"/> -</menu> diff --git a/indra/newview/skins/default/xui/it/menu_im_well_button.xml b/indra/newview/skins/default/xui/it/menu_im_well_button.xml deleted file mode 100644 index 9e471b771c..0000000000 --- a/indra/newview/skins/default/xui/it/menu_im_well_button.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<context_menu name="IM Well Button Context Menu"> - <menu_item_call label="Chiudi tutto" name="Close All"/> -</context_menu> diff --git a/indra/newview/skins/default/xui/it/menu_inventory.xml b/indra/newview/skins/default/xui/it/menu_inventory.xml index 4bf6be82fd..b31e35771d 100644 --- a/indra/newview/skins/default/xui/it/menu_inventory.xml +++ b/indra/newview/skins/default/xui/it/menu_inventory.xml @@ -68,6 +68,7 @@ <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"/> <menu_item_call label="Esegui" name="Sound Play"/> + <menu_item_call label="Copia SLurl" name="url_copy"/> <menu_item_call label="Informazioni sul punto di riferimento" name="About Landmark"/> <menu_item_call label="Riproduci in Second Life" name="Animation Play"/> <menu_item_call label="Esegui localmente" name="Animation Audition"/> diff --git a/indra/newview/skins/default/xui/it/menu_mode_change.xml b/indra/newview/skins/default/xui/it/menu_mode_change.xml deleted file mode 100644 index 499dcf1873..0000000000 --- a/indra/newview/skins/default/xui/it/menu_mode_change.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<toggleable_menu name="Mode Change"> - <menu_item_check label="Di base" name="BasicMode"/> - <menu_item_check label="Avanzata" name="AdvancedMode"/> -</toggleable_menu> diff --git a/indra/newview/skins/default/xui/it/menu_object.xml b/indra/newview/skins/default/xui/it/menu_object.xml index a172cf3b26..7f41e8937f 100644 --- a/indra/newview/skins/default/xui/it/menu_object.xml +++ b/indra/newview/skins/default/xui/it/menu_object.xml @@ -5,6 +5,8 @@ </menu_item_call> <menu_item_call label="Modifica" name="Edit..."/> <menu_item_call label="Costruisci" name="Build"/> + <menu_item_call label="Mostra nei set collegati" name="show_in_linksets"/> + <menu_item_call label="Mostra nei personaggi" name="show_in_characters"/> <menu_item_call label="Apri" name="Open"/> <menu_item_call label="Siediti qui" name="Object Sit"/> <menu_item_call label="Alzati" name="Object Stand Up"/> diff --git a/indra/newview/skins/default/xui/it/menu_text_editor.xml b/indra/newview/skins/default/xui/it/menu_text_editor.xml index 4636ce9929..5b61da914e 100644 --- a/indra/newview/skins/default/xui/it/menu_text_editor.xml +++ b/indra/newview/skins/default/xui/it/menu_text_editor.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Text editor context menu"> + <menu_item_call label="(sconosciuto)" name="Suggestion 1"/> + <menu_item_call label="(sconosciuto)" name="Suggestion 2"/> + <menu_item_call label="(sconosciuto)" name="Suggestion 3"/> + <menu_item_call label="(sconosciuto)" name="Suggestion 4"/> + <menu_item_call label="(sconosciuto)" name="Suggestion 5"/> + <menu_item_call label="Aggiungi al dizionario" name="Add to Dictionary"/> + <menu_item_call label="Aggiungi per ignorare" name="Add to Ignore"/> <menu_item_call label="Taglia" name="Cut"/> <menu_item_call label="Copia" name="Copy"/> <menu_item_call label="Incolla" name="Paste"/> diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml index f94b2f9a9e..547c5a9b73 100644 --- a/indra/newview/skins/default/xui/it/menu_viewer.xml +++ b/indra/newview/skins/default/xui/it/menu_viewer.xml @@ -28,6 +28,7 @@ <menu_item_call label="Preferenze..." name="Preferences"/> <menu_item_call label="Pulsanti barra strumenti..." name="Toolbars"/> <menu_item_call label="Nascondi tutti i controlli" name="Hide UI"/> + <menu_item_check label="Mostra elementi HUD" name="Show HUD Attachments"/> <menu_item_call label="Esci da [APP_NAME]" name="Quit"/> </menu> <menu label="Comunica" name="Communicate"> @@ -39,6 +40,7 @@ <menu_item_call label="Amici" name="My Friends"/> <menu_item_call label="Gruppi" name="My Groups"/> <menu_item_call label="Persone vicine" name="Active Speakers"/> + <menu_item_call label="Blocca lista" name="Block List"/> </menu> <menu label="Mondo" name="World"> <menu_item_call label="Crea punto di riferimento per questo luogo" name="Create Landmark Here"/> @@ -124,6 +126,11 @@ <menu_item_call label="Imposta gli script come in esecuzione" name="Set Scripts to Running"/> <menu_item_call label="Imposta script come non in esecuzione" name="Set Scripts to Not Running"/> </menu> + <menu label="Pathfinding" name="Pathfinding"> + <menu_item_call label="Set collegati..." name="pathfinding_linksets_menu_item"/> + <menu_item_call label="Personaggi..." name="pathfinding_characters_menu_item"/> + <menu_item_call label="Visualizza / test..." name="pathfinding_console_menu_item"/> + </menu> <menu label="Opzioni" name="Options"> <menu_item_check label="Mostra autorizzazioni avanzate" name="DebugPermissions"/> <menu_item_check label="Seleziona solo i miei oggetti" name="Select Only My Objects"/> @@ -174,7 +181,6 @@ <menu_item_check label="Nascondi particelle" name="Hide Particles"/> <menu_item_check label="Nascondi selezionati" name="Hide Selected"/> <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> <menu label="Modalità di rendering" name="Rendering Types"> diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml index 9660c8f851..d5fdde4e7d 100644 --- a/indra/newview/skins/default/xui/it/notifications.xml +++ b/indra/newview/skins/default/xui/it/notifications.xml @@ -37,6 +37,12 @@ <button name="Help" text="$helptext"/> </form> </template> + <template name="okhelpignore"> + <form> + <button name="OK_okhelpignore" text="$yestext"/> + <button name="Help_okhelpignore" text="$helptext"/> + </form> + </template> <template name="yesnocancelbuttons"> <form> <button name="Yes" text="$yestext"/> @@ -360,13 +366,19 @@ Inserisci il Nome utente del tuo avatar. Devi avere un account per entrare in [SECOND_LIFE]. Vuoi crearne uno adesso? <url name="url"> - https://join.secondlife.com/index.php?lang=it-IT + [create_account_url] </url> <usetemplate name="okcancelbuttons" notext="Riprova" yestext="Crea un nuovo account"/> </notification> <notification name="InvalidCredentialFormat"> Immetti il nome utente oppure sia il nome che il cognome del tuo avatar nel campo del nome utente, quindi effettua nuovamente l'accesso. </notification> + <notification name="InvalidGrid"> + '[GRID]' non è un identificatore di griglia valido. + </notification> + <notification name="InvalidLocationSLURL"> + La tua posizione iniziale non ha specificato una griglia valida. + </notification> <notification name="DeleteClassified"> Cancella annuncio '[NAME]'? Non ci sono rimborsi per la tariffa pagata. @@ -598,6 +610,9 @@ Puoi unire al massimo [MAX] oggetti. Accertati che nessuno sia bloccato e che li possiedi tutti. </notification> + <notification name="CannotLinkPermanent"> + Gli oggetti non possono essere collegati attraverso i confini. + </notification> <notification name="CannotLinkDifferentOwners"> Impossibile unire perche non tutti gli oggetti hanno lo stesso proprietario. @@ -977,6 +992,41 @@ Offri l'amicizia a [NAME]? <button name="Cancel" text="Annulla"/> </form> </notification> + <notification label="Aggiungi lista di sostituzione automatica" name="AddAutoReplaceList"> + Nome per la nuova lista: + <form name="form"> + <button name="SetName" text="OK"/> + </form> + </notification> + <notification label="Rinomina lista di sostituzione automatica" name="RenameAutoReplaceList"> + Il nome '[DUPNAME]' è già in uso + Inserisci un nuovo nome univoco: + <form name="form"> + <button name="ReplaceList" text="Sostituisci lista corrente"/> + <button name="SetName" text="Usa nuovo nome"/> + </form> + </notification> + <notification name="InvalidAutoReplaceEntry"> + La parola chiave deve essere una sola parola e la sostituzione non può essere vuota. + </notification> + <notification name="InvalidAutoReplaceList"> + L'elenco di sostituzione non è valido. + </notification> + <notification name="SpellingDictImportRequired"> + Devi specificare un file, un nome e una lingua. + </notification> + <notification name="SpellingDictIsSecondary"> + Sembra che il dizionario [DIC_NAME] non includa un file "aff"; ciò indica che di tratta di un dizionario "secondario". +Può essere usato come dizionario aggiuntivo, ma non come dizionario principale. + +Vedi https://wiki.secondlife.com/wiki/Adding_Spelling_Dictionaries + </notification> + <notification name="SpellingDictImportFailed"> + Copia non eseguita da + [FROM_NAME] + a + [TO_NAME] + </notification> <notification label="Salva vestiario" name="SaveOutfitAs"> Salva gli abiti che indosso come nuovo vestiario: <form name="form"> @@ -1157,7 +1207,7 @@ a '[THIS_GPU]' Sei stato trasferito in una regione vicina. </notification> <notification name="AvatarMovedLast"> - La tua ultima posizione non è al momento disponibile. + La posizione richiesta non è al momento disponibile. Sei stato trasferito in una regione vicina. </notification> <notification name="AvatarMovedHome"> @@ -1176,8 +1226,7 @@ Puoi comunque usare [SECOND_LIFE] normalmente e gli altri residenti ti vedranno L'installazione di [APP_NAME] è terminata. Se questa è la prima volta che usi [SECOND_LIFE], devi creare un account prima che tu possa effettuare l'accesso. -Vuoi tornare a [http://join.secondlife.com secondlife.com] per creare un nuovo account? - <usetemplate name="okcancelbuttons" notext="Continua" yestext="Nuovo Account..."/> + <usetemplate name="okcancelbuttons" notext="Continua" yestext="Crea account..."/> </notification> <notification name="LoginPacketNeverReceived"> Ci sono problemi di connessione. È possibile che ci siano problemi con la tua connessione Internet oppure sulla [SECOND_LIFE_GRID]. @@ -1698,83 +1747,128 @@ Cambierà migliaia di regioni e produrrà seri problemi ai vari server. <usetemplate name="okcancelbuttons" notext="Annulla" yestext="OK"/> </notification> <notification name="RegionEntryAccessBlocked"> - Non sei ammesso in questa regione a causa della tua categoria di accesso. Questo può risultare da una mancanza di informazioni necessarie per convalidare la tua età . - -Verifica di avere installato l'ultima versione del programma e vai alla Knowledge Base per ulteriori informazioni su come accedere nelle zone con tale categoria di accesso. + La regione che cerchi di visitare include contenuti che non corripondono al livello selezionato nelle preferenze. Per cambiare le preferenze seleziona Io > Preferenze > Generale. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="RegionEntryAccessBlocked_KB"> - Non sei ammesso in questa regione a causa della tua categoria d'accesso. - -Vuoi andare alla Knowledge Base per ulteriori informazioni sulle categorie di accesso? + <notification name="RegionEntryAccessBlocked_AdultsOnlyContent"> + La regione che cerchi di visitare include contenuti [REGIONMATURITY] accessibili solo ad adulti. <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/it + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="Non posso entrare in questa regione a causa delle restrizioni della categoria di accesso" name="okcancelignore" notext="Chiudi" yestext="Vai alla Knowledge Base"/> + <usetemplate ignoretext="Attraversamento regione: la regione che cerchi di visitare include contenuti accessibili solo ad adulti." name="okcancelignore" notext="Chiudi" yestext="Passa alla Base conoscenze"/> </notification> <notification name="RegionEntryAccessBlocked_Notify"> - Non sei ammesso in questa regione a causa della tua categoria d'accesso. + La regione che cerchi di visitare include contenuti [REGIONMATURITY], ma le tue preferenze attuali escludono i contenuti [REGIONMATURITY]. + </notification> + <notification name="RegionEntryAccessBlocked_NotifyAdultsOnly"> + La regione che cerchi di visitare include contenuti [REGIONMATURITY] accessibili solo ad adulti. </notification> <notification name="RegionEntryAccessBlocked_Change"> - Non ti è consentito entrare in quella regione a causa della categoria di accesso impostata nelle preferenze. - -Per entrare nella regione, dovrai modificare la tua categoria di accesso. Ciò ti consentirà inoltre di effettuare ricerche di contenuti di categoria [REGIONMATURITY]. Per annullare le modifiche in un secondo momento, vai a Io > Preferenze > Generali. + La regione che cerchi di visitare include contenuti [REGIONMATURITY], ma le tue preferenze attuali escludono i contenuti [REGIONMATURITY]. Puoi modificare le tue preferenze o annullare. Dopo aver modificato le preferenze, prova nuovamente ad entrare nella regione. + <form name="form"> + <button name="OK" text="Modifica preferenze"/> + <button default="true" name="Cancel" text="Annulla"/> + <ignore name="ignore" text="Attraversamento regione: La regione che cerchi di visitare include contenuti esclusi nelle preferenze."/> + </form> + </notification> + <notification name="RegionEntryAccessBlocked_PreferencesOutOfSync"> + Si è verificato un problema con il teleport a causa di un errore di sincronizzazione delle preferenze con il server. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked"> + La regione che cerchi di visitare include contenuti che non corripondono al livello selezionato nelle preferenze. Per cambiare le preferenze seleziona Io > Preferenze > Generale. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked_AdultsOnlyContent"> + La regione che cerchi di visitare include contenuti [REGIONMATURITY] accessibili solo ad adulti. + <url name="url"> + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview + </url> + <usetemplate ignoretext="Teleport: la regione che cerchi di visitare include contenuti accessibili solo ad adulti." name="okcancelignore" notext="Chiudi" yestext="Passa alla Base conoscenze"/> + </notification> + <notification name="TeleportEntryAccessBlocked_Notify"> + La regione che cerchi di visitare include contenuti [REGIONMATURITY], ma le tue preferenze attuali escludono i contenuti [REGIONMATURITY]. + </notification> + <notification name="TeleportEntryAccessBlocked_NotifyAdultsOnly"> + La regione che cerchi di visitare include contenuti [REGIONMATURITY] accessibili solo ad adulti. + </notification> + <notification name="TeleportEntryAccessBlocked_ChangeAndReTeleport"> + La regione che cerchi di visitare include contenuti [REGIONMATURITY], ma le tue preferenze attuali escludono i contenuti [REGIONMATURITY]. Puoi modificare le preferenze e continuare con il teleport oppure annullarlo. <form name="form"> - <button name="OK" text="Cambia preferenza"/> - <button default="true" name="Cancel" text="Chiudi"/> - <ignore name="ignore" text="La categoria di accesso impostata mi impedisce di entrare in una regione"/> + <button name="OK" text="Modifica e continua"/> + <button name="Cancel" text="Annulla"/> + <ignore name="ignore" text="Teleport (riavviabile): La regione che cerchi di visitare include contenuti esclusi nelle preferenze."/> </form> </notification> + <notification name="TeleportEntryAccessBlocked_Change"> + La regione che cerchi di visitare include contenuti [REGIONMATURITY], ma le tue preferenze attuali escludono i contenuti [REGIONMATURITY]. Puoi modificare le tue preferenze o annullare il teleport. Dopo aver modificato le preferenze, prova nuovamente a teletrasportarti nella regione. + <form name="form"> + <button name="OK" text="Modifica preferenze"/> + <button name="Cancel" text="Annulla"/> + <ignore name="ignore" text="Teleport (non riavviabile): La regione che cerchi di visitare include contenuti esclusi nelle preferenze."/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_PreferencesOutOfSync"> + Si è verificato un problema con il teleport a causa di un errore di sincronizzazione delle preferenze con il server. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="PreferredMaturityChanged"> - La tua categoria di accesso attuale è [RATING]. + Non riceverai più notifiche se stai per visitare una regione con contenuti [RATING]. In futuro potrai modificare le preferenze relative ai contenuti selezionando Io > Preferenze > Generale nella barra del menu. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="MaturityChangeError"> + Non è stato possibile modificare le preferenze per visualizzare contenuti [PREFERRED_MATURITY]. le preferenze sono state ripristinate per consentire la visualizzazione di contenuti [ACTUAL_MATURITY]. Puoi cercare di modificare nuovamente le preferenze selezionando Io > Preferenze > Generale nella barra del menu. + <usetemplate name="okbutton" yestext="OK"/> </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à . - -Verifica di avere installato l'ultima versione del programma e vai alla Knowledge Base per informazioni sull'accesso ad aree con queste categorie di accesso. + Il terreno che desideri richiedere ha una categoria di accesso maggiore di quella indicata nelle preferenze. Per cambiare le preferenze seleziona Io > Preferenze > Generale. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandClaimAccessBlocked_KB"> - Non puoi prendere possesso di questa terra a causa delle preferenze sulle categorie di accesso. - -Vuoi andare alla Knowledge Base per maggiori informazioni sulle categorie di accesso? + <notification name="LandClaimAccessBlocked_AdultsOnlyContent"> + Solo gli adulti possono richiedere questo terreno. <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/it + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="Non posso richiedere questo terreno a causa delle restrizioni della categoria di accesso" name="okcancelignore" notext="Chiudi" yestext="Vai alla Knowledge Base"/> + <usetemplate ignoretext="Solo gli adulti possono richiedere questo terreno." name="okcancelignore" notext="Chiudi" yestext="Passa alla Base conoscenze"/> </notification> <notification name="LandClaimAccessBlocked_Notify"> - Non puoi prendere possesso di questa terra a causa della tua categoria di accesso. + Il terreno che desideri richiedere include contenuti [REGIONMATURITY], ma le tue preferenze attuali escludono i contenuti [REGIONMATURITY]. + </notification> + <notification name="LandClaimAccessBlocked_NotifyAdultsOnly"> + Il terreno che cerchi di richiedere include contenuti [REGIONMATURITY], accessibili solo ad adulti. </notification> <notification name="LandClaimAccessBlocked_Change"> - Non puoi richiedere questo terreno a causa della tua categoria di accesso. - -Puoi cliccare su Cambia preferenze per modificare la categoria di accesso e quindi riuscire ad entrare. Da adesso potrai accedere ai contenuti [REGIONMATURITY] ed effettuare ricerche in questa categoria. Se in seguito tu volessi cambiare di nuovo le tue impostazioni, apri la finestra di dialogo da Io > Preferenze > Generale. - <usetemplate ignoretext="Le mie preferenze di categoria di accesso mi impediscono di richiedere terreno" name="okcancelignore" notext="Chiudi" yestext="Cambia le preferenze"/> + Il terreno che desideri richiedere include contenuti [REGIONMATURITY], ma le tue preferenze attuali escludono i contenuti [REGIONMATURITY]. Puoi modificare le preferenze e quindi cercare di richiedere nuovamente il terreno. + <form name="form"> + <button name="OK" text="Modifica preferenze"/> + <button name="Cancel" text="Annulla"/> + <ignore name="ignore" text="Il terreno che cerchi di richiedere include contenuti esclusi nelle preferenze."/> + </form> </notification> <notification name="LandBuyAccessBlocked"> - Non puoi acquistare questo terreno a causa della tua categoria di accesso. Questo può essere dovuto ad una mancanza di informazioni valide che confermino la tua età . - -Verifica di avere installato l'ultima versione del programma e vai alla Knowledge Base per informazioni sull'accesso ad aree con queste categorie di accesso. + Il terreno che desideri acquistare ha una categoria di accesso maggiore di quella indicata nelle preferenze. Per cambiare le preferenze seleziona Io > Preferenze > Generale. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandBuyAccessBlocked_KB"> - Non puoi acquistare questo terreno a causa della tua categoria di accesso. - -Vuoi andare alla Knowledge Base per maggiori informazioni sulle categorie di accesso? + <notification name="LandBuyAccessBlocked_AdultsOnlyContent"> + Solo gli adulti possono acquistare questo terreno. <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/it + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="Non posso acquistare questo terreno a causa delle restrizioni della categoria di accesso" name="okcancelignore" notext="Chiudi" yestext="Vai alla Knowledge Base"/> + <usetemplate ignoretext="Solo gli adulti possono acquistare questo terreno." name="okcancelignore" notext="Chiudi" yestext="Passa alla Base conoscenze"/> </notification> <notification name="LandBuyAccessBlocked_Notify"> - Non puoi acquistare questa land a causa della tua categoria di accesso. + Il terreno che cerchi di acquistare include contenuti [REGIONMATURITY], ma le tue preferenze attuali escludono i contenuti [REGIONMATURITY]. + </notification> + <notification name="LandBuyAccessBlocked_NotifyAdultsOnly"> + Il terreno che cerchi di acquistare include contenuti [REGIONMATURITY], accessibili solo ad adulti. </notification> <notification name="LandBuyAccessBlocked_Change"> - Non puoi acquistare questo terreno a causa della tua categoria di accesso. - -Puoi cliccare su Cambia preferenze per modificare la categoria di accesso e quindi riuscire ad entrare. Da adesso potrai accedere ai contenuti [REGIONMATURITY] ed effettuare ricerche in questa categoria. Se in seguito tu volessi cambiare di nuovo le tue impostazioni, apri la finestra di dialogo da Io > Preferenze > Generale. - <usetemplate ignoretext="Le mie Preferenze di accesso mi impediscono di acquistare terreno" name="okcancelignore" notext="Chiudi" yestext="Cambia le preferenze"/> + Il terreno che cerchi di acquistare include contenuti [REGIONMATURITY], ma le tue preferenze attuali escludono i contenuti [REGIONMATURITY]. Puoi modificare le preferenze e quindi cercare di acquistare nuovamente il terreno. + <form name="form"> + <button name="OK" text="Modifica preferenze"/> + <button name="Cancel" text="Annulla"/> + <ignore name="ignore" text="Il terreno che cerchi di acquistare include contenuti esclusi nelle preferenze."/> + </form> </notification> <notification name="TooManyPrimsSelected"> Hai selezionato troppi prim. Seleziona non più di [MAX_PRIM_COUNT] prim e riprova @@ -1829,10 +1923,9 @@ Pubblica questo annuncio adesso per [AMOUNT]L$? </form> </notification> <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. - -Per accedere a regioni per adulti, i residenti devono avere un Account verificato, mediante verifica dell'età oppure mediante verifica della modalità di pagamento. + La classificazione di questa regione è stata modificata. +Prima che questa modifica venga integrata nella mappa potrebbe essere necessario un po' di tempo. + <usetemplate name="okbutton" yestext="OK"/> </notification> <notification label="Versione voice non compatibile" name="VoiceVersionMismatch"> Questa versione di [APP_NAME] non è compatibile con la funzionalità di chat vocale in questa regione. Affinché la chat vocale funzioni correttamente, dovrai aggiornare [APP_NAME]. @@ -2123,14 +2216,11 @@ Inseriscilo in una pagina web per dare ad altri un accesso facile a questa ubica <usetemplate ignoretext="Indossare gli abiti che creo mentre modifico il mio aspetto" name="okcancelignore" notext="No" yestext="Si"/> </notification> <notification name="NotAgeVerified"> - Per accedere ai contenuti e alle aree per adulti in Second Life devi avere almeno 18 anni. Visita la pagina di verifica dell'età per confermare di avere almeno 18 anni. -Verrà avviato il browser Web. - -[_URL] - <url name="url" option="0"> - https://secondlife.com/my/account/verification.php - </url> - <usetemplate ignoretext="Non ho verificato la mia età " name="okcancelignore" notext="Annulla" yestext="Passa alla verifica dell'età "/> + Il luogo che desideri visitare è limitato a persone di almeno 18 anni di età . + <usetemplate ignoretext="Non ho l'età necessaria per visitare aree limitate." name="okignore" yestext="OK"/> + </notification> + <notification name="NotAgeVerified_Notify"> + Posizione limitata a persone maggiori di 18 anni di età . </notification> <notification name="Cannot enter parcel: no payment info on file"> Per poter visitare questa zona devi avere devi aver fornito informazioni di pagamento a Linden Lab. Vuoi andare sul sito di [SECOND_LIFE] ed impostarle? @@ -2391,6 +2481,23 @@ Qui non puoi volare. <notification name="NoBuild"> In questa zona è proibita la costruzione. Qui non puoi costruire né rezzare oggetti. </notification> + <notification name="PathfindingDirty"> + La regione ha modifiche di pathfinding in sospeso. Se hai le autorizzazioni necessarie per la costruzione puoi eseguire il rebake facendo clic sul pulsante “Rebake regioneâ€. + </notification> + <notification name="DynamicPathfindingDisabled"> + Il pathfinding dinamico non è attivato in questa regione. Gli oggetti scriptati che usano chiamate LSL di pathfinding potrebbero non funzionare come previsto in questa regione. + </notification> + <notification name="PathfindingRebakeNavmesh"> + Se modifichi alcuni oggetti in questa regione, ciò potrebbe causare il comportamento errato di altri oggetti in movimento. Per fare in modo che gli oggetti in movimento si comportino correttamente, fai clic sul pulsante "Rebake regione". Per maggiori informazioni, seleziona la guida + <url name="url"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </url> + <usetemplate helptext="Guida" ignoretext="Se modifichi alcuni oggetti in questa regione, ciò potrebbe causare il comportamento errato di altri oggetti in movimento." name="okhelpignore" yestext="OK"/> + </notification> + <notification name="PathfindingCannotRebakeNavmesh"> + Si è verificato un errore. Potrebbe trattarsi di un problema di rete o del server, oppure potresti non avere le autorizzazioni necessarie per la costruzione. A volte il problema viene risolto uscendo ed eseguendo nuovamente l'accesso. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="SeeAvatars"> In questo lotto non si possono vedere avatar e chat di testo presenti in altri lotti. Non puoi vedere altri residenti fuori dal lotto e loro non possono vederti. Viene bloccata anche la normale chat di testo sul canale 0. </notification> @@ -2409,9 +2516,7 @@ Qui funzionano soltanto gli script del proprietario del terreno. Puoi solo richiedere terreni pubblici nella regione in cui sei posizionato. </notification> <notification name="RegionTPAccessBlocked"> - Non puoi entrare in quella regione a causa della tua categoria di accesso. Può essere necessario validare l'età e/o installare l'ultima versione del programma. - -Visita la Knowledge Base per informazioni sull'accesso alle aree con queste categorie di accesso. + La regione che cerchi di visitare include contenuti che non corripondono al livello selezionato nelle preferenze. Per cambiare le preferenze seleziona Io > Preferenze > Generale. </notification> <notification name="URBannedFromRegion"> Tu hai l'accesso bloccato a questa regione. @@ -2422,8 +2527,11 @@ Visita la Knowledge Base per informazioni sull'accesso alle aree con queste <notification name="ImproperPaymentStatus"> Non hai una impostazioni di pagamento corrette per entrare in questa regione. </notification> + <notification name="MustGetAgeRegion"> + Per poter entrare in questa regione devi avere almeno 18 anni. + </notification> <notification name="MustGetAgeParcel"> - Devi essere di età verificata per entrare in questa terra. + Per poter entrare in questo lotto devi avere almeno 18 anni. </notification> <notification name="NoDestRegion"> Non è stata trovata nessuna regione di destinazione. @@ -2525,12 +2633,33 @@ Riprova tra qualche istante. <notification name="TeleportOffered"> [NAME_SLURL] ti ha offerto il teleport alla sua ubicazione: -[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] <form name="form"> <button name="Teleport" text="Teleport"/> <button name="Cancel" text="Cancella"/> </form> </notification> + <notification name="TeleportOffered_MaturityExceeded"> + [NAME_SLURL] ti ha offerto il teleport alla sua ubicazione: + +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +Questa regione include contenuti [REGION_CONTENT_MATURITY], ma le tue preferenze attuali escludono i contenuti [REGION_CONTENT_MATURITY]. Puoi modificare le preferenze e continuare con il teleport oppure annullarlo. + <form name="form"> + <button name="Teleport" text="Modifica e continua"/> + <button name="Cancel" text="Annulla"/> + </form> + </notification> + <notification name="TeleportOffered_MaturityBlocked"> + [NAME_SLURL] ti ha offerto il teleport alla sua ubicazione: + +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +Questa regione include però contenuti accessibili solo agli adulti. + </notification> <notification name="TeleportOfferSent"> Offerta di Teleport inviata a [TO_NAME] </notification> @@ -2934,6 +3063,10 @@ Hai caricato una texture [RESOLUTION] completata per '[BODYREGION]' do ( In esistenza da [EXISTENCE] secondi) Hai aggiornato localmente una texture [RESOLUTION] completata per '[BODYREGION]' dopo [TIME] secondi. </notification> + <notification name="LivePreviewUnavailable"> + Non possiamo mostrare un'anteprima di questa texture perché non ne è consentita la copia e/o il trasferimento. + <usetemplate ignoretext="Avvisami se la modalità Anteprima dal vivo non è disponibile per texture per cui non è consentita la copia e/o il trasferimento." name="okignore" yestext="OK"/> + </notification> <notification name="ConfirmLeaveCall"> Sei sicuro di volere uscire dalla chiamata? <usetemplate ignoretext="Conferma prima di uscire dalla chiamata" name="okcancelignore" notext="No" yestext="Sì"/> @@ -3105,6 +3238,62 @@ Clicca e trascina dovunque nel mondo per ruotare la visuale Questa azione cancellerà tutte le voci di menu e i pulsanti. Per visualizzarli nuovamente cliccare ancora [SHORTCUT]. <usetemplate ignoretext="Conferma prima di nascondere l'interfaccia" name="okcancelignore" notext="Annulla" yestext="OK"/> </notification> + <notification name="PathfindingLinksets_WarnOnPhantom"> + L'indicatore oggetto fantasma di alcuni set collegati verrà commutato. + +Vuoi continuare? + <usetemplate ignoretext="L'indicatore oggetto fantasma di alcuni set collegati verrà commutato." name="okcancelignore" notext="Annulla" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted"> + Alcuni set collegati selezionati non possono essere impostati su '[REQUESTED_TYPE]' a causa di limitazioni nelle autorizzazioni per i set collegati. Questi set collegati verranno invece impostati su '[RESTRICTED_TYPE]'. + +Vuoi continuare? + <usetemplate ignoretext="Alcuni set collegati selezionati non possono essere impostati a causa di limitazioni nelle autorizzazioni per i set collegati." name="okcancelignore" notext="Annulla" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnVolume"> + Alcuni set collegati selezionati non possono essere impostati a '[REQUESTED_TYPE]' perché la forma è non-convessa. + +Vuoi continuare? + <usetemplate ignoretext="Alcuni set collegati selezionati non possono essere impostati perché la forma è non-convessa." name="okcancelignore" notext="Annulla" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted"> + L'indicatore oggetto fantasma di alcuni set collegati verrà commutato. + +Alcuni set collegati selezionati non possono essere impostati su '[REQUESTED_TYPE]' a causa di limitazioni nelle autorizzazioni per i set collegati. Questi set collegati verranno invece impostati su '[RESTRICTED_TYPE]'. + +Vuoi continuare? + <usetemplate ignoretext="L'indicatore oggetto fantasma per alcuni set collegati selezionati verrà commutato, mentre quello degli altri non può essere impostato a causa di limitazioni nelle autorizzazioni per i set collegati." name="okcancelignore" notext="Annulla" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnVolume"> + L'indicatore oggetto fantasma di alcuni set collegati verrà commutato. + +Alcuni set collegati selezionati non possono essere impostati a '[REQUESTED_TYPE]' perché la forma è non-convessa. + +Vuoi continuare? + <usetemplate ignoretext="L'indicatore oggetto fantasma per alcuni set collegati selezionati verrà commutato, mentre quello degli altri non può essere impostato perché la forma è non-convessa." name="okcancelignore" notext="Annulla" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted_MismatchOnVolume"> + Alcuni set collegati selezionati non possono essere impostati su '[REQUESTED_TYPE]' a causa di limitazioni nelle autorizzazioni per i set collegati. Questi set collegati verranno invece impostati su '[RESTRICTED_TYPE]'. + +Alcuni set collegati selezionati non possono essere impostati a '[REQUESTED_TYPE]' perché la forma è non-convessa. Il tipo di utilizzo di questi set collegati non cambierà . + +Vuoi continuare? + <usetemplate ignoretext="Alcuni set collegati selezionati non possono essere impostati a causa delle limitazioni nelle autorizzazioni per il set collegato e perché la forma è non-convessa." name="okcancelignore" notext="Annulla" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted_MismatchOnVolume"> + L'indicatore oggetto fantasma di alcuni set collegati verrà commutato. + +Alcuni set collegati selezionati non possono essere impostati su '[REQUESTED_TYPE]' a causa di limitazioni nelle autorizzazioni per i set collegati. Questi set collegati verranno invece impostati su '[RESTRICTED_TYPE]'. + +Alcuni set collegati selezionati non possono essere impostati a '[REQUESTED_TYPE]' perché la forma è non-convessa. Il tipo di utilizzo di questi set collegati non cambierà . + +Vuoi continuare? + <usetemplate ignoretext="L'indicatore oggetto fantasma per alcuni set collegati selezionati verrà commutato, mentre quello degli altri non può essere impostato a causa delle limitazioni nelle autorizzazioni per il set collegato e perché la forma è non-convessa." name="okcancelignore" notext="Annulla" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_ChangeToFlexiblePath"> + L'oggetto selezionato influenza il navmesh. Se lo si trasforma in un percorso flessibile verrà rimosso dal navmesh. + <usetemplate ignoretext="L'oggetto selezionato influenza il navmesh. Se lo si trasforma in un percorso flessibile verrà rimosso dal navmesh." name="okcancelignore" notext="Annulla" yestext="OK"/> + </notification> <global name="UnsupportedGLRequirements"> Non sembra che tu abbia i requisiti hardware adeguati per [APP_NAME]. [APP_NAME] richiede una scheda grafica OpenGL con supporto multitexture. Se ne hai una in dotazione, accertati di avere i driver, i service pack e i patch più recenti per la scheda grafica e per il sistema operativo. @@ -3141,4 +3330,12 @@ Gli aggiornamenti futuri per questo file sono disattivati. Tentativo di aggiungere un file immagine [FNAME] non valido o non leggibile che non è stato possibile aprire o decodificare. Tentativo annullato. </notification> + <notification name="PathfindingReturnMultipleItems"> + Stai per restituire [NUM_ITEMS] elementi. Vuoi continuare? + <usetemplate ignoretext="Sei sicuro di volere restituire più oggetti?" name="okcancelignore" notext="No" yestext="Sì"/> + </notification> + <notification name="PathfindingDeleteMultipleItems"> + Stai per cancellare [NUM_ITEMS] elementi. Vuoi continuare? + <usetemplate ignoretext="Sei sicuro di volere eliminare più oggetti?" name="okcancelignore" notext="No" yestext="Sì"/> + </notification> </notifications> diff --git a/indra/newview/skins/default/xui/it/panel_bottomtray.xml b/indra/newview/skins/default/xui/it/panel_bottomtray.xml deleted file mode 100644 index 3d12473c87..0000000000 --- a/indra/newview/skins/default/xui/it/panel_bottomtray.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="bottom_tray"> - <string name="DragIndicationImageName" value="Accordion_ArrowOpened_Off"/> - <string name="SpeakBtnToolTip" value="Accende o spegne il microfono"/> - <string name="VoiceControlBtnToolTip" value="Mostra o nasconde il pannello di regolazione voce"/> - <layout_stack name="toolbar_stack"> - <layout_panel name="speak_panel"> - <talk_button name="talk"> - <speak_button label="Parla" label_selected="Parla" name="speak_btn"/> - </talk_button> - </layout_panel> - <layout_panel name="gesture_panel"> - <gesture_combo_list label="Gesture" name="Gesture" tool_tip="Mostra o nasconde le gesture"/> - </layout_panel> - <layout_panel name="movement_panel"> - <bottomtray_button label="Sposta" name="movement_btn" tool_tip="Mostra o nasconde i comandi del movimento"/> - </layout_panel> - <layout_panel name="cam_panel"> - <bottomtray_button label="Visuale" name="camera_btn" tool_tip="Mostra o nasconde le regolazioni della visuale"/> - </layout_panel> - <layout_panel name="snapshot_panel"> - <bottomtray_button label="" name="snapshots" tool_tip="Scatta una foto"/> - </layout_panel> - <layout_panel name="build_btn_panel"> - <bottomtray_button label="Costruisci" name="build_btn" tool_tip="Mostra o nasconde gli strumenti di costruzione"/> - </layout_panel> - <layout_panel name="search_btn_panel"> - <bottomtray_button label="Cerca" name="search_btn" tool_tip="Mostra o nasconde la ricerca"/> - </layout_panel> - <layout_panel name="world_map_btn_panel"> - <bottomtray_button label="Mappa" name="world_map_btn" tool_tip="Mostra o nasconde la mappa del mondo"/> - </layout_panel> - <layout_panel name="mini_map_btn_panel"> - <bottomtray_button label="Mini mappa" name="mini_map_btn" tool_tip="Mostra o nasconde la mini mappa"/> - </layout_panel> - <layout_panel name="im_well_panel"> - <chiclet_im_well name="im_well"> - <button name="Unread IM messages" tool_tip="Conversazioni"/> - </chiclet_im_well> - </layout_panel> - <layout_panel name="notification_well_panel"> - <chiclet_notification name="notification_well"> - <button name="Unread" tool_tip="Notifiche"/> - </chiclet_notification> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/it/panel_group_invite.xml b/indra/newview/skins/default/xui/it/panel_group_invite.xml index e3cb3c1092..1b57eba3f0 100644 --- a/indra/newview/skins/default/xui/it/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/it/panel_group_invite.xml @@ -9,6 +9,9 @@ <panel.string name="already_in_group"> Alcuni dei residenti selezionati sono già nel gruppo, pertanto l'invito non verrà loro spedito. </panel.string> + <panel.string name="invite_selection_too_large"> + Invito di gruppo non inviato: troppi residenti selezionati Gli inviti di gruppo possono essere inviati a un massimo di 100 persone per ciascuna richiesta. + </panel.string> <text name="help_text"> Puoi selezionare più residenti da invitare nel tuo gruppo. Per iniziare, clicca su Apri il selettore di residenti. </text> diff --git a/indra/newview/skins/default/xui/it/panel_login.xml b/indra/newview/skins/default/xui/it/panel_login.xml index f88230ed11..2afde40940 100644 --- a/indra/newview/skins/default/xui/it/panel_login.xml +++ b/indra/newview/skins/default/xui/it/panel_login.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_login"> - <panel.string name="create_account_url"> - http://join.secondlife.com/ - </panel.string> <panel.string name="forgot_password_url"> http://secondlife.com/account/request.php?lang=it </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> + <text name="log_in_text"> + ACCEDI + </text> <text name="username_text"> Nome utente: </text> @@ -15,15 +15,8 @@ <text name="password_text"> Password: </text> - <check_box label="Ricorda password" name="remember_check"/> - <button label="Accedi" name="connect_btn"/> - <text name="mode_selection_text"> - Modalità : - </text> - <combo_box name="mode_combo" tool_tip="Seleziona la modalità . Seleziona Di base per esplorare facilmente e rapidamente e per la chat. Seleziona Avanzata per accedere ad altre funzionalità ."> - <combo_box.item label="Di base" name="Basic"/> - <combo_box.item label="Avanzate" name="Advanced"/> - </combo_box> + </layout_panel> + <layout_panel name="start_location_panel"> <text name="start_location_text"> Inizia da: </text> @@ -33,16 +26,21 @@ <combo_box.item label="<Scrivi nome regione>" name="Typeregionname"/> </combo_box> </layout_panel> - <layout_panel name="links"> - <text name="create_new_account_text"> - Iscriviti + <layout_panel name="links_login_panel"> + <text name="login_help"> + Ti serve aiuto con la fase di accesso? </text> <text name="forgot_password_text"> Hai dimenticato il nome utente o la password? </text> - <text name="login_help"> - Ti serve aiuto con la fase di accesso? + <button label="Accedi" name="connect_btn"/> + <check_box label="Ricorda password" name="remember_check"/> + </layout_panel> + <layout_panel name="links"> + <text name="create_account_text"> + CREA IL TUO ACCOUNT </text> + <button label="Inizia adesso" name="create_new_account_btn"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml index 6317d3192e..1fef88870a 100644 --- a/indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="chat_bar"> +<panel name="nearby_chat"> <string name="min_width"> 192 </string> diff --git a/indra/newview/skins/default/xui/it/panel_preferences_chat.xml b/indra/newview/skins/default/xui/it/panel_preferences_chat.xml index 7f5992b584..0c9c4027e5 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_chat.xml @@ -29,5 +29,7 @@ <check_box label="Chat IM" name="EnableIMChatPopups" tool_tip="Seleziona per vedere una finestra popup quando arriva un messaggio IM"/> <spinner label="Durata chat vicine:" name="nearby_toasts_lifetime"/> <spinner label="Durata dissolvenza chat vicine:" name="nearby_toasts_fadingtime"/> - <button label="Impostazioni traduzione chat" name="ok_btn"/> + <button label="Traduzione..." name="ok_btn"/> + <button label="Sostituzione automatica..." name="autoreplace_showgui"/> + <button label="Correzione ortografica..." name="spellcheck_showgui"/> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_region_debug.xml b/indra/newview/skins/default/xui/it/panel_region_debug.xml index 45b3a016f4..aba60d03aa 100644 --- a/indra/newview/skins/default/xui/it/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/it/panel_region_debug.xml @@ -36,5 +36,5 @@ <button label="?" left="297" name="top_scripts_help"/> <button label="Riavvia la regione" name="restart_btn" tool_tip="Dai 2 minuti di tempo massimo e fai riavviare la regione"/> <button label="?" name="restart_help"/> - <button label="Ritarda il riavvio" name="cancel_restart_btn" tool_tip="Ritarda il riavvio della regione di un'ora"/> + <button label="Annulla riavvio" name="cancel_restart_btn" tool_tip="Annulla riavvio regione"/> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_region_estate.xml b/indra/newview/skins/default/xui/it/panel_region_estate.xml index da6b6b277f..98d9b86cfc 100644 --- a/indra/newview/skins/default/xui/it/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/it/panel_region_estate.xml @@ -26,7 +26,7 @@ Consenti l'accesso solo ai Residenti che: </text> <check_box label="Hanno memorizzato le informazioni per l'addebito" name="limit_payment" tool_tip="Per poter visitare questa proprietà immobiliare i Residenti devono aver fornito informazioni di pagamento a Linden Lab. Vedi [SUPPORT_SITE] per maggiori informazioni."/> - <check_box label="Hanno verificato l'età " name="limit_age_verified" tool_tip="Per poter visitare questa proprietà immobiliare i Residenti devono aver verificato la propria età . Vedi [SUPPORT_SITE] per maggiori informazioni."/> + <check_box label="Hanno almeno 18 anni" name="limit_age_verified" tool_tip="Per poter visitare questa proprietà immobiliare i Residenti devono avere almeno 18 anni. Vedi [SUPPORT_SITE] per maggiori informazioni."/> <check_box label="Permetti la chat voice" name="voice_chat_check"/> <button label="?" name="voice_chat_help"/> <check_box label="Permetti teleport diretto" name="allow_direct_teleport"/> diff --git a/indra/newview/skins/default/xui/it/panel_region_texture.xml b/indra/newview/skins/default/xui/it/panel_region_texture.xml deleted file mode 100644 index 1337ed18ca..0000000000 --- a/indra/newview/skins/default/xui/it/panel_region_texture.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Texture del terreno" name="Textures"> - <text name="region_text_lbl"> - Regione: - </text> - <text name="region_text"> - sconosciuto - </text> - <text name="detail_texture_text" width="380"> - Texture del terreno (è necessario siano 512x512, 24 bit .tga files) - </text> - <text name="height_text_lbl"> - 1 (Bassa) - </text> - <text name="height_text_lbl2"> - 2 - </text> - <text name="height_text_lbl3"> - 3 - </text> - <text name="height_text_lbl4"> - 4 (Alta) - </text> - <text name="height_text_lbl5"> - Range di elevazione della texture - </text> - <text name="height_text_lbl6"> - Nordovest - </text> - <text name="height_text_lbl7"> - Nordest - </text> - <text name="height_text_lbl8"> - Sudovest - </text> - <text name="height_text_lbl9"> - Sudest - </text> - <spinner label="Bassa" name="height_start_spin_0"/> - <spinner label="Bassa" name="height_start_spin_1"/> - <spinner label="Bassa" name="height_start_spin_2"/> - <spinner label="Bassa" name="height_start_spin_3"/> - <spinner label="Alta" name="height_range_spin_0"/> - <spinner label="Alta" name="height_range_spin_1"/> - <spinner label="Alta" name="height_range_spin_2"/> - <spinner label="Alta" name="height_range_spin_3"/> - <text name="height_text_lbl10"> - Questi valori indicano la gamma di miscele per le texture di cui sopra. - </text> - <text name="height_text_lbl11"> - Misurato in metri, il valore BASSO è la MASSIMA altezza della texture n. 1, e il valore ALTO è l'altezza MINIMA della texture n. 4. - </text> - <text name="height_text_lbl12"> - Texture #1, e il valore più ALTO all'altezza MINIMA della Texture #4. - </text> - <button label="Applica" name="apply_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/it/panel_side_tray.xml b/indra/newview/skins/default/xui/it/panel_side_tray.xml deleted file mode 100644 index e0143088a5..0000000000 --- a/indra/newview/skins/default/xui/it/panel_side_tray.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<!-- Side tray cannot show background because it is always - partially on screen to hold tab buttons. --> -<side_tray name="sidebar"> - <sidetray_tab description="Apri/chiudi la barra laterale." name="sidebar_openclose" tab_title="Apri/chiudi la barra laterale"/> - <sidetray_tab description="Casa." name="sidebar_home" tab_title="Home"> - <panel label="casa" name="panel_home"/> - </sidetray_tab> - <sidetray_tab description="Modifica il tuo profilo pubblico e i preferiti." name="sidebar_me" tab_title="Il mio profilo"> - <panel_container name="panel_container"> - <panel label="Io" name="panel_me"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="Trova amici, contatti e persone nelle vicinanze." name="sidebar_people" tab_title="Persone"> - <panel_container name="panel_container"> - <panel label="Profilo del gruppo" name="panel_group_info_sidetray"/> - <panel label="Residenti e oggetti bloccati" name="panel_block_list_sidetray"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="Trova luoghi dove andare e luoghi già visitati." label="Luoghi" name="sidebar_places" tab_title="Luoghi"> - <panel label="Luoghi" name="panel_places"/> - </sidetray_tab> - <sidetray_tab description="Sfoglia il tuo inventario." name="sidebar_inventory" tab_title="Il mio inventario"> - <panel label="Modifica inventario" name="sidepanel_inventory"/> - </sidetray_tab> - <sidetray_tab description="Cambia il tuo aspetto ed il tuo look attuale." name="sidebar_appearance" tab_title="Il mio aspetto"> - <panel label="Modifica aspetto fisico" name="sidepanel_appearance"/> - </sidetray_tab> -</side_tray> diff --git a/indra/newview/skins/default/xui/it/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/it/panel_volume_pulldown.xml new file mode 100644 index 0000000000..bc17fc0c89 --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_volume_pulldown.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="volumepulldown_floater" width="220"> + <button left="197" name="prefs_btn"/> + <slider label="Principale" label_width="60" name="System Volume" width="160"/> + <slider label="Pulsanti" label_width="60" name="UI Volume" width="160"/> + <slider label="Ambiente" label_width="60" name="Wind Volume" width="160"/> + <slider label="Suoni" label_width="60" name="SFX Volume" width="160"/> + <check_box name="gesture_audio_play_btn" tool_tip="Attiva suoni dai gesti"/> + <slider label="Musica" label_width="60" name="Music Volume" width="160"/> + <check_box name="enable_music" tool_tip="Attiva streaming musica"/> + <slider label="Multimedia" label_width="60" name="Media Volume" width="160"/> + <check_box name="enable_media" tool_tip="Attiva streaming multimediale"/> + <slider label="Voce" label_width="60" name="Voice Volume" width="160"/> + <check_box name="enable_voice_check" tool_tip="Attiva chat vocale"/> +</panel> diff --git a/indra/newview/skins/default/xui/it/sidepanel_item_info.xml b/indra/newview/skins/default/xui/it/sidepanel_item_info.xml index 900a65956b..2b3ea0fb83 100644 --- a/indra/newview/skins/default/xui/it/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/it/sidepanel_item_info.xml @@ -3,6 +3,9 @@ <panel.string name="unknown"> (sconosciuto) </panel.string> + <panel.string name="unknown_multiple"> + (sconosciuto / multiplo) + </panel.string> <panel.string name="public"> (pubblico) </panel.string> diff --git a/indra/newview/skins/default/xui/it/sidepanel_task_info.xml b/indra/newview/skins/default/xui/it/sidepanel_task_info.xml index cfabdc81b0..8a0f93e650 100644 --- a/indra/newview/skins/default/xui/it/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/it/sidepanel_task_info.xml @@ -18,6 +18,12 @@ <panel.string name="text modify info 4"> Non puoi modificare questi oggetti </panel.string> + <panel.string name="text modify info 5"> + Questo oggetto non può essere modificato attraverso il confine di una regione + </panel.string> + <panel.string name="text modify info 6"> + Questi oggetti non possono essere modificati attraverso il confine di una regione + </panel.string> <panel.string name="text modify warning"> Questo oggetto ha parti collegate </panel.string> @@ -95,6 +101,9 @@ </combo_box> <spinner label="Prezzo: L$" name="Edit Cost"/> <check_box label="Mostra nella ricerca" name="search_check" tool_tip="Permetti alle persone di vedere questo oggetto nei risultati della ricerca"/> + <text name="pathfinding_attributes_label"> + Attributi pathfinding: + </text> <text name="B:"> B: </text> diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index 11accb5f08..fb1e387468 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -134,7 +134,7 @@ Esci </string> <string name="create_account_url"> - http://join.secondlife.com/index.php?lang=it-IT + http://join.secondlife.com/index.php?lang=it-IT&sourceid=[sourceid] </string> <string name="LoginFailedViewerNotPermitted"> Il viewer utilizzato non è più in grado di accedere a Second Life. Visita la parina seguente per scaricare un nuovo viewer: @@ -997,6 +997,9 @@ Prova ad accedere nuovamente tra un minuto. <string name="script_files"> Script </string> + <string name="dictionary_files"> + Dizionari + </string> <string name="AvatarSetNotAway"> Imposta come non assente </string> @@ -1396,6 +1399,12 @@ Prova ad accedere nuovamente tra un minuto. <string name="InvFolder favorite"> I miei preferiti </string> + <string name="InvFolder Favorites"> + I miei preferiti + </string> + <string name="InvFolder favorites"> + I miei preferiti + </string> <string name="InvFolder Current Outfit"> Abbigliamento attuale </string> @@ -1411,6 +1420,12 @@ Prova ad accedere nuovamente tra un minuto. <string name="InvFolder Meshes"> Reticoli </string> + <string name="InvFolder Received Items"> + Oggetti ricevuti + </string> + <string name="InvFolder Merchant Outbox"> + Casella venditore in uscita + </string> <string name="InvFolder Friends"> Amici </string> @@ -3786,6 +3801,12 @@ Se il messaggio persiste, contatta [SUPPORT_SITE]. <string name="LocationCtrlSeeAVsTooltip"> Avatar visibili e chat consentita fuori di questo lotto </string> + <string name="LocationCtrlPathfindingDirtyTooltip"> + Gli oggetti che si muovono potrebbero non comportarsi correttamente in questa regione fino a quando non viene eseguito il rebake della regione. + </string> + <string name="LocationCtrlPathfindingDisabledTooltip"> + Il pathfinding dinamico non è attivato in questa regione. + </string> <string name="UpdaterWindowTitle"> Aggiornamento [APP_NAME] </string> @@ -4916,6 +4937,21 @@ Prova a racchiudere il percorso dell'editor in doppie virgolette. <string name="Normal"> Normale </string> + <string name="Pathfinding_Wiki_URL"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </string> + <string name="Pathfinding_Object_Attr_None"> + Nessuno + </string> + <string name="Pathfinding_Object_Attr_Permanent"> + Influenza il navmesh + </string> + <string name="Pathfinding_Object_Attr_Character"> + Personaggio + </string> + <string name="Pathfinding_Object_Attr_MultiSelect"> + (Multiple) + </string> <string name="snapshot_quality_very_low"> Molto basso </string> @@ -4931,4 +4967,10 @@ Prova a racchiudere il percorso dell'editor in doppie virgolette. <string name="snapshot_quality_very_high"> Molto alto </string> + <string name="TeleportMaturityExceeded"> + Il Residente non può visitare questa regione. + </string> + <string name="UserDictionary"> + [User] + </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 f485212290..bd967ebcc4 100644 --- a/indra/newview/skins/default/xui/it/teleport_strings.xml +++ b/indra/newview/skins/default/xui/it/teleport_strings.xml @@ -43,6 +43,9 @@ Per ripetere l'esercitazione, visita 'Welcome Island Public'. <message name="no_inventory_host"> L'inventario è temporaneamente inaccessibile. </message> + <message name="MustGetAgeRegion"> + Per poter entrare in questa regione devi avere almeno 18 anni. + </message> </message_set> <message_set name="progress"> <message name="sending_dest"> @@ -78,5 +81,8 @@ Per ripetere l'esercitazione, visita 'Welcome Island Public'. <message name="requesting"> Avvio teletrasporto.... </message> + <message name="pending"> + Teleport in sospeso... + </message> </message_set> </teleport_messages> diff --git a/indra/newview/skins/default/xui/ja/floater_about.xml b/indra/newview/skins/default/xui/ja/floater_about.xml index 3c7a210a22..6d5df75645 100644 --- a/indra/newview/skins/default/xui/ja/floater_about.xml +++ b/indra/newview/skins/default/xui/ja/floater_about.xml @@ -66,27 +66,26 @@ Qt Webkit ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼š [QT_WEBKIT_VERSION] </panel> <panel label="ライセンス" name="licenses_panel"> <text_editor name="credits_editor"> - 3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion -APR Copyright (C) 2000-2004 The Apache Software Foundation -Collada DOM Copyright 2005 Sony Computer Entertainment Inc. -cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se) + 3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion +APR Copyright (C) 2011 The Apache Software Foundation +Collada DOM Copyright 2006 Sony Computer Entertainment Inc. +cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se) DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc. expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. -FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org). +FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg. GL Copyright (C) 1999-2004 Brian Paul. GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University and David Luebke, Brenden Schubert, University of Virginia. google-perftools Copyright (c) 2005, Google Inc. Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited. jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW) jpeglib Copyright (C) 1991-1998, Thomas G. Lane. -ogg/vorbis Copyright (C) 2001, Xiphophorus -OpenSSL Copyright (C) 1998-2002 The OpenSSL Project. -PCRE Copyright (c) 1997-2008 University of Cambridge +ogg/vorbis Copyright (C) 2002, Xiphophorus +OpenSSL Copyright (C) 1998-2008 The OpenSSL Project. +PCRE Copyright (c) 1997-2012 University of Cambridge SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) xmlrpc-epi Copyright (C) 2000 Epinions, Inc. -zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler. -google-perftools Copyright (c) 2005, Google Inc. +zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler. Second Life ビューワã§ã¯ Havok (TM) Physics ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚(c)Copyright 1999-2010 Havok.com Inc. (and its Licensors).ç„¡æ–複写・複製・転載をç¦ã˜ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ www.havok.com ã‚’ã”å‚ç…§ãã ã•ã„。 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 7c87bad5a3..3b4b5ed070 100644 --- a/indra/newview/skins/default/xui/ja/floater_about_land.xml +++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml @@ -464,7 +464,7 @@ 次ã®ä½äººã«ã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ï¼š </text> <check_box label="æ”¯æ‰•æƒ…æƒ…å ±ãŒç™»éŒ²ã•れã¦ã„ã‚‹ [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="æ”¯æ‰•æƒ…å ±ãŒç™»éŒ²ã•れã¦ã„ãªã„ã¨ã€ã“ã®åŒºç”»ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。詳細ã«ã¤ã„ã¦ã¯ã€[SUPPORT_SITE] ã‚’ã”覧ãã ã•ã„。"/> - <check_box label="年齢確èªãŒæ¸ˆã‚“ã§ã„ã‚‹ [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="ã“ã®åŒºç”»ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€å¹´é½¢ç¢ºèªã‚’済ã¾ã›ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[SUPPORT_SITE] ã‚’ã”覧ãã ã•ã„。"/> + <check_box label="18 æ‰ä»¥ä¸Šã§ã™ [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="ã“ã®åŒºç”»ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€18 æ‰ä»¥ä¸Šã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。詳細ã«ã¤ã„ã¦ã¯ã€[SUPPORT_SITE] ã‚’ã”覧ãã ã•ã„。"/> <check_box label="グループã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ï¼š[GROUP]" name="GroupCheck" tool_tip="「一般ã€ã‚¿ãƒ–ã§ã€ã‚°ãƒ«ãƒ¼ãƒ—ã‚’é¸æŠžã—ã¦ãã ã•ã„。"/> <check_box label="å…¥å ´è¨±å¯ã‚’販売:" name="PassCheck" tool_tip="ã“ã®åŒºç”»ã¸ã®ä¸€æ™‚çš„ãªã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã—ã¾ã™ã€‚"/> <combo_box name="pass_combo"> diff --git a/indra/newview/skins/default/xui/ja/floater_animation_preview.xml b/indra/newview/skins/default/xui/ja/floater_animation_preview.xml deleted file mode 100644 index 548d24097f..0000000000 --- a/indra/newview/skins/default/xui/ja/floater_animation_preview.xml +++ /dev/null @@ -1,187 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Animation Preview" title=""> - <floater.string name="failed_to_initialize"> - ãƒ¢ãƒ¼ã‚·ãƒ§ãƒ³ã‚’åˆæœŸåŒ–ã§ãã¾ã›ã‚“ã§ã—㟠- </floater.string> - <floater.string name="anim_too_long"> - アニメーションファイルã®é•·ã•ã¯[LENGTH]ç§’ã§ã™ã€‚ - -ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã®æœ€å¤§ã®é•·ã•ã¯[MAX_LENGTH]ç§’ã§ã™ã€‚ - </floater.string> - <floater.string name="failed_file_read"> - アニメーションファイルをèªã¿å–れã¾ã›ã‚“。 - -[STATUS] - </floater.string> - <floater.string name="E_ST_OK"> - Ok - </floater.string> - <floater.string name="E_ST_EOF"> - ä¸å®Œå…¨ãªãƒ•ァイル。 - </floater.string> - <floater.string name="E_ST_NO_CONSTRAINT"> - 制約定義をèªã¿ã¨ã‚Œã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_FILE"> - BVH ファイルを開ã‘ã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_HIER"> - 無効㪠HIERARCHY ヘッダーã§ã™ã€‚. - </floater.string> - <floater.string name="E_ST_NO_JOINT"> - ROOT ã¾ãŸã¯ JOINT ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_NAME"> - JOINT ãƒãƒ¼ãƒ ã‚’å–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_OFFSET"> - OFFSET ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_CHANNELS"> - CHANNELS ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_ROTATION"> - å›žè»¢é †åºã‚’å–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_AXIS"> - 回転軸をå–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_MOTION"> - MOTION ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_FRAMES"> - フレーム数をå–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_FRAME_TIME"> - フレームタイムをå–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_POS"> - ãƒã‚¸ã‚·ãƒ§ãƒ³å€¤ã‚’å–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_ROT"> - 回転値をå–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_FILE"> - ファイルを開ã‘ã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_HEADER"> - èªã¿ã¨ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_NAME"> - èªã¿ã¨ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_IGNORE"> - èªã¿ã¨ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_RELATIVE"> - èªã¿ã¨ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_OUTNAME"> - èªã¿ã¨ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_MATRIX"> - èªã¿ã¨ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGECHILD"> - Mergechild åã‚’å–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGEPARENT"> - Mergeparent åã‚’å–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_PRIORITY"> - プãƒãƒ‘ティ値をå–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_LOOP"> - ループ値をå–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEIN"> - easeln 値をå–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEOUT"> - easeOut 値をå–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_HAND"> - Hand morph 値をå–å¾—ã§ãã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_NO_XLT_EMOTE"> - エモートåã‚’èªã¿ã¨ã‚Œã¾ã›ã‚“。 - </floater.string> - <floater.string name="E_ST_BAD_ROOT"> - ルートジョイントåãŒç„¡åйã§ã™ã€‚「hipã€ã‚’使用ã—ã¦ãã ã•ã„。 - </floater.string> - <text name="name_label"> - åå‰ï¼š - </text> - <text name="description_label"> - 説明: - </text> - <spinner label="å„ªå…ˆé †ä½" name="priority" tool_tip="ã“ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãŒã©ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’上書ãã™ã‚‹ã‹ã‚’決ã‚ã¾ã™"/> - <check_box label="ループ" name="loop_check" tool_tip="ã“ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ループå†ç”Ÿã—ã¾ã™"/> - <spinner label="イン(ï¼…)" label_width="45" left="60" name="loop_in_point" tool_tip="アニメーションã®ãƒ«ãƒ¼ãƒ—復帰点をè¨å®šã—ã¾ã™" width="100"/> - <spinner label="アウト(ï¼…)" label_width="50" left="170" name="loop_out_point" tool_tip="アニメーションã®ãƒ«ãƒ¼ãƒ—終了点をè¨å®šã—ã¾ã™" width="100"/> - <text name="hand_label"> - 手ã®å‹•ã - </text> - <combo_box label="" name="hand_pose_combo" tool_tip="アニメーションå†ç”Ÿä¸ã®æ‰‹ã®å‹•ãを決ã‚ã¾ã™"> - <combo_box.item label="広ã’ã‚‹" name="Spread"/> - <combo_box.item label="リラックス" name="Relaxed"/> - <combo_box.item label="指を指ã™ãƒ»ä¸¡æ‰‹" name="PointBoth"/> - <combo_box.item label="拳" name="Fist"/> - <combo_box.item label="リラックス・左" name="RelaxedLeft"/> - <combo_box.item label="指を指ã™ãƒ»å·¦" name="PointLeft"/> - <combo_box.item label="拳を上ã’る・左" name="FistLeft"/> - <combo_box.item label="リラックス・å³" name="RelaxedRight"/> - <combo_box.item label="指を指ã™ãƒ»å³" name="PointRight"/> - <combo_box.item label="拳を上ã’る・å³" name="FistRight"/> - <combo_box.item label="敬礼・å³" name="SaluteRight"/> - <combo_box.item label="タイピング" name="Typing"/> - <combo_box.item label="ピース・å³" name="PeaceRight"/> - </combo_box> - <text name="emote_label"> - è¡¨ç¾ - </text> - <combo_box label="" name="emote_combo" tool_tip="アニメーションå†ç”Ÿä¸ã®é¡”ã®è¡¨æƒ…を決ã‚ã¾ã™"> - <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="ã‚¢ãƒã‚¿ãƒ¼ãŒæ™®é€šã®è¡Œå‹•ã‚’ã™ã‚‹ã¨ãã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã®å‹•ãをテストã™ã‚‹ãŸã‚ã«ã“れを使ã„ã¾ã™ã€‚"> - <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="アニメーションã®ãƒ–レンドアウト時間(秒)"/> - <button label="" name="play_btn" tool_tip="アニメーションをå†ç”Ÿã™ã‚‹"/> - <button name="pause_btn" tool_tip="ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ä¸€æ™‚åœæ¢ã™ã‚‹"/> - <button label="" name="stop_btn" tool_tip="アニメーションã®å†ç”Ÿã‚’åœæ¢"/> - <slider label="" name="playback_slider"/> - <text name="bad_animation_text"> - アニメーションファイルをèªã¿è¾¼ã‚ã¾ã›ã‚“。 - - Poser 4ã‹ã‚‰ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã•れãŸBVHファイルを推奨ã—ã¾ã™ã€‚ - </text> - <button label="アップãƒãƒ¼ãƒ‰L$[AMOUNT]" name="ok_btn"/> - <button label="å–り消ã—" name="cancel_btn"/> -</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_autoreplace.xml b/indra/newview/skins/default/xui/ja/floater_autoreplace.xml new file mode 100644 index 0000000000..21abf59160 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/floater_autoreplace.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="autoreplace_floater" title="自動置æ›è¨å®š"> + <check_box label="自動置æ›ã‚’有効ã«ã™ã‚‹" name="autoreplace_enable" tool_tip="ãƒãƒ£ãƒƒãƒˆãƒ†ã‚ストを入力ã™ã‚‹ã«ã¤ã‚Œã¦ã€å…¥åŠ›ã—ãŸã‚ーワードを対応ã™ã‚‹ç½®æ›ã‚ーワードã«ç½®ãæ›ãˆã¾ã™"/> + <button label="リストをインãƒãƒ¼ãƒˆ..." name="autoreplace_import_list" tool_tip="以å‰ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ãŸãƒªã‚¹ãƒˆã‚’ファイルã‹ã‚‰ãƒãƒ¼ãƒ‰ã—ã¾ã™ã€‚"/> + <button label="リストをエクスãƒãƒ¼ãƒˆ..." name="autoreplace_export_list" tool_tip="é¸æŠžã—ãŸãƒªã‚¹ãƒˆã‚’ファイルã«ä¿å˜ã—ã¦ã€å…±æœ‰ã§ãるよã†ã«ã—ã¾ã™ã€‚"/> + <button label="æ–°è¦ãƒªã‚¹ãƒˆ..." name="autoreplace_new_list" tool_tip="æ–°è¦ãƒªã‚¹ãƒˆã‚’作æˆã—ã¾ã™ã€‚"/> + <button label="リストを削除" name="autoreplace_delete_list" tool_tip="é¸æŠžã—ãŸãƒªã‚¹ãƒˆã‚’削除ã—ã¾ã™ã€‚"/> + <button name="autoreplace_list_up" tool_tip="ã“ã®ãƒªã‚¹ãƒˆã®å„ªå…ˆåº¦ã‚’上ã’ã¾ã™ã€‚"/> + <button name="autoreplace_list_down" tool_tip="ã“ã®ãƒªã‚¹ãƒˆã®å„ªå…ˆåº¦ã‚’下ã’ã¾ã™ã€‚"/> + <scroll_list name="autoreplace_list_replacements"> + <scroll_list.columns label="ã‚ーワード" name="keyword"/> + <scroll_list.columns label="ç½®æ›" name="replacement"/> + </scroll_list> + <button label="è¿½åŠ ..." name="autoreplace_add_entry"/> + <button label="削除" name="autoreplace_delete_entry"/> + <button label="エントリをä¿å˜" name="autoreplace_save_entry" tool_tip="ã“ã®ã‚¨ãƒ³ãƒˆãƒªã‚’ä¿å˜ã—ã¾ã™ã€‚"/> + <button label="変更をä¿å˜" name="autoreplace_save_changes" tool_tip="変更をã™ã¹ã¦ä¿å˜ã—ã¾ã™ã€‚"/> + <button label="å–り消ã—" name="autoreplace_cancel" tool_tip="変更をã™ã¹ã¦ç ´æ£„ã—ã¾ã™ã€‚"/> +</floater> +<!-- + <text + top_pad="10" + left="10" + height="16" + width="260" + follows="left|top" + halign="center" + mouse_opaque="true" + name="autoreplace_text2"> + Entries + </text> +--> diff --git a/indra/newview/skins/default/xui/ja/floater_chat_bar.xml b/indra/newview/skins/default/xui/ja/floater_chat_bar.xml index 11f223ade6..9f5df6fb85 100644 --- a/indra/newview/skins/default/xui/ja/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/ja/floater_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="chat_bar" title="è¿‘ãã®ãƒãƒ£ãƒƒãƒˆ"> +<floater name="nearby_chat" title="è¿‘ãã®ãƒãƒ£ãƒƒãƒˆ"> <panel name="bottom_panel"> <line_editor label="ã“ã“をクリックã—ã¦ãƒãƒ£ãƒƒãƒˆã‚’é–‹å§‹ã—ã¾ã™ã€‚" name="chat_box" tool_tip="Enter ã‚ーを押ã—ã¦è©±ã—ã€Ctrl + Enter ã‚ーã§å«ã³ã¾ã™ã€‚"/> <button name="show_nearby_chat" tool_tip="è¿‘ãã®ãƒãƒ£ãƒƒãƒˆãƒã‚°ã‚’表示ï¼éžè¡¨ç¤º"/> diff --git a/indra/newview/skins/default/xui/ja/floater_inventory.xml b/indra/newview/skins/default/xui/ja/floater_inventory.xml deleted file mode 100644 index b113fde94a..0000000000 --- a/indra/newview/skins/default/xui/ja/floater_inventory.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="æŒã¡ç‰©"> - <floater.string name="Title"> - æŒã¡ç‰© - </floater.string> - <floater.string name="TitleFetching"> - æŒã¡ç‰© ( [ITEM_COUNT] アイテムをå–å¾—ä¸...) [FILTER] - </floater.string> - <floater.string name="TitleCompleted"> - æŒã¡ç‰© ( [ITEM_COUNT] アイテム) [FILTER] - </floater.string> - <floater.string name="Fetched"> - å–得済 - </floater.string> - <panel label="æŒã¡ç‰©ãƒ‘ãƒãƒ«" name="Inventory Panel"/> -</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_model_preview.xml b/indra/newview/skins/default/xui/ja/floater_model_preview.xml index c9ff0e29cb..942cc91317 100644 --- a/indra/newview/skins/default/xui/ja/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/ja/floater_model_preview.xml @@ -92,19 +92,54 @@ <text initial_value="三角形" name="triangles" value="三角形"/> <text initial_value="é ‚ç‚¹" name="vertices" value="é ‚ç‚¹"/> <text initial_value="高" name="high_label" value="高"/> + <combo_box name="lod_source_high"> + <item name="Load from file" value="ファイルã‹ã‚‰ãƒãƒ¼ãƒ‰"/> + <item name="Generate" value="生æˆ"/> + </combo_box> <button label="å‚ç…§" name="lod_browse_high"/> + <combo_box name="lod_mode_high"> + <item name="Triangle Limit" value="三角形ã®é™åº¦æ•°"/> + <item name="Error Threshold" value="エラーã—ãã„値"/> + </combo_box> <text initial_value="0" name="high_triangles" value="0"/> <text initial_value="0" name="high_vertices" value="0"/> <text initial_value="ä¸" name="medium_label" value="ä¸"/> + <combo_box name="lod_source_medium"> + <item name="Load from file" value="ファイルã‹ã‚‰ãƒãƒ¼ãƒ‰"/> + <item name="Generate" value="生æˆ"/> + <item name="Use LoD above" value="上記㮠LoD を使用"/> + </combo_box> <button label="å‚ç…§" name="lod_browse_medium"/> + <combo_box name="lod_mode_medium"> + <item name="Triangle Limit" value="三角形ã®é™åº¦æ•°"/> + <item name="Error Threshold" value="エラーã—ãã„値"/> + </combo_box> <text initial_value="0" name="medium_triangles" value="0"/> <text initial_value="0" name="medium_vertices" value="0"/> <text initial_value="低" name="low_label" value="低"/> + <combo_box name="lod_source_low"> + <item name="Load from file" value="ファイルã‹ã‚‰ãƒãƒ¼ãƒ‰"/> + <item name="Generate" value="生æˆ"/> + <item name="Use LoD above" value="上記㮠LoD を使用"/> + </combo_box> <button label="å‚ç…§" name="lod_browse_low"/> + <combo_box name="lod_mode_low"> + <item name="Triangle Limit" value="三角形ã®é™åº¦æ•°"/> + <item name="Error Threshold" value="エラーã—ãã„値"/> + </combo_box> <text initial_value="0" name="low_triangles" value="0"/> <text initial_value="0" name="low_vertices" value="0"/> <text initial_value="最低" name="lowest_label" value="最低"/> + <combo_box name="lod_source_lowest"> + <item name="Load from file" value="ファイルã‹ã‚‰ãƒãƒ¼ãƒ‰"/> + <item name="Generate" value="生æˆ"/> + <item name="Use LoD above" value="上記㮠LoD を使用"/> + </combo_box> <button label="å‚ç…§" name="lod_browse_lowest"/> + <combo_box name="lod_mode_lowest"> + <item name="Triangle Limit" value="三角形ã®é™åº¦æ•°"/> + <item name="Error Threshold" value="エラーã—ãã„値"/> + </combo_box> <text initial_value="0" name="lowest_triangles" value="0"/> <text initial_value="0" name="lowest_vertices" value="0"/> <check_box label="ノーマルã®ä½œæˆ" name="gen_normals"/> diff --git a/indra/newview/skins/default/xui/ja/floater_nearby_chat.xml b/indra/newview/skins/default/xui/ja/floater_nearby_chat.xml deleted file mode 100644 index bcddcc6907..0000000000 --- a/indra/newview/skins/default/xui/ja/floater_nearby_chat.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="nearby_chat" title="è¿‘ãã®ãƒãƒ£ãƒƒãƒˆ"> - <check_box label="ãƒãƒ£ãƒƒãƒˆã‚’翻訳" name="translate_chat_checkbox"/> -</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/ja/floater_pathfinding_characters.xml new file mode 100644 index 0000000000..ada96b5b62 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/floater_pathfinding_characters.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_characters" title="パスファインディングã‚ャラクター"> + <floater.string name="messaging_get_inprogress"> + パスファインディングã‚ャラクターを照会ä¸... + </floater.string> + <floater.string name="messaging_get_error"> + パスファインディングã‚ャラクターã®ç…§ä¼šä¸ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ + </floater.string> + <floater.string name="messaging_complete_none_found"> + パスファインディングã‚ャラクターãŒã‚りã¾ã›ã‚“。 + </floater.string> + <floater.string name="messaging_complete_available"> + [NUM_TOTAL] ã‚ãƒ£ãƒ©ã‚¯ã‚¿ãƒ¼ä¸ [NUM_SELECTED] ã‚ャラクターãŒé¸æŠžã•れã¾ã—ãŸã€‚ + </floater.string> + <floater.string name="messaging_not_enabled"> + ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã¯ãƒ‘スファインディングã«å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“。 + </floater.string> + <floater.string name="character_cpu_time"> + [CPU_TIME] µs + </floater.string> + <floater.string name="character_owner_loading"> + [Loading] + </floater.string> + <floater.string name="character_owner_unknown"> + [Unknown] + </floater.string> + <floater.string name="character_owner_group"> + [group] + </floater.string> + <panel> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="åå‰" name="name"/> + <scroll_list.columns label="説明" name="description"/> + <scroll_list.columns label="所有者" name="owner"/> + <scroll_list.columns label="CPU" name="cpu_time"/> + <scroll_list.columns label="高度" name="altitude"/> + </scroll_list> + <text name="messaging_status"> + ã‚ャラクター: + </text> + <button label="リストを更新" name="refresh_objects_list"/> + <button label="ã™ã¹ã¦é¸æŠž" name="select_all_objects"/> + <button label="ä½•ã‚‚é¸æŠžã—ãªã„" name="select_none_objects"/> + </panel> + <panel> + <text name="actions_label"> + é¸æŠžã—ãŸã‚ャラクターã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³: + </text> + <check_box label="ビーコンを表示" name="show_beacon"/> + <check_box label="物ç†åŠ¹æžœã‚«ãƒ—ã‚»ãƒ«ã‚’è¡¨ç¤º" name="show_physics_capsule"/> + <button label="å–ã‚‹" name="take_objects"/> + <button label="コピーをå–ã‚‹" name="take_copy_objects"/> + <button label="ç§ã‚’ãã“ã«ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã™ã‚‹" name="teleport_me_to_object" tool_tip="1 ã¤ã®ã‚ャラクターãŒé¸æŠžã•れãŸå ´åˆã«ã®ã¿æœ‰åйã§ã™ã€‚"/> + <button label="è¿”å´" name="return_objects"/> + <button label="削除" name="delete_objects"/> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/ja/floater_pathfinding_console.xml new file mode 100644 index 0000000000..ec107f3e6b --- /dev/null +++ b/indra/newview/skins/default/xui/ja/floater_pathfinding_console.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_console" title="パスファインディングã®è¡¨ç¤º/テスト"> + <floater.string name="navmesh_viewer_status_library_not_implemented"> + パスファインディングライブラリã®å®Ÿè£…ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 + </floater.string> + <floater.string name="navmesh_viewer_status_region_not_enabled"> + ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã¯ãƒ‘スファインディングã«å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“。 + </floater.string> + <floater.string name="navmesh_viewer_status_region_loading"> + 地域(リージョン)ã®èªã¿è¾¼ã¿ã‚’待機ã—ã¦ã„ã¾ã™ã€‚ + </floater.string> + <floater.string name="navmesh_viewer_status_checking_version"> + ナビメッシュã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’確èªã—ã¦ã„ã¾ã™ã€‚ + </floater.string> + <floater.string name="navmesh_viewer_status_downloading"> + ナビメッシュをダウンãƒãƒ¼ãƒ‰ã—ã¦ã„ã¾ã™ã€‚ + </floater.string> + <floater.string name="navmesh_viewer_status_updating"> + サーãƒãƒ¼ä¸Šã§ãƒŠãƒ“メッシュãŒå¤‰ã‚りã¾ã—ãŸã€‚最新ã®ãƒŠãƒ“メッシュをダウンãƒãƒ¼ãƒ‰ã—ã¦ã„ã¾ã™ã€‚ + </floater.string> + <floater.string name="navmesh_viewer_status_has_navmesh"> + 最新ã®ãƒŠãƒ“メッシュãŒãƒ€ã‚¦ãƒ³ãƒãƒ¼ãƒ‰ã•れã¾ã—ãŸã€‚ + </floater.string> + <floater.string name="navmesh_viewer_status_error"> + ナビメッシュをæ£ã—ãダウンãƒãƒ¼ãƒ‰ã§ãã¾ã›ã‚“。 + </floater.string> + <floater.string name="navmesh_simulator_status_pending"> + ナビメッシュã«ä¿ç•™ä¸ã®å¤‰æ›´ãŒã‚りã¾ã™ã€‚ + </floater.string> + <floater.string name="navmesh_simulator_status_building"> + ナビメッシュを作æˆã—ã¦ã„ã¾ã™ã€‚ + </floater.string> + <floater.string name="navmesh_simulator_status_some_pending"> + ナビメッシュã®ä¸€éƒ¨ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã«ä¿ç•™ä¸ã®å¤‰æ›´ãŒã‚りã¾ã™ã€‚ + </floater.string> + <floater.string name="navmesh_simulator_status_some_building"> + 一部ã®ãƒŠãƒ“メッシュ地域(リージョン)を構築ã—ã¦ã„ã¾ã™ã€‚ + </floater.string> + <floater.string name="navmesh_simulator_status_pending_and_building"> + ナビメッシュã®ä¸€éƒ¨ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã«ä¿ç•™ä¸ã®å¤‰æ›´ãŒã‚りã€ãã®ä»–ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã¯æ§‹ç¯‰ä¸ã§ã™ã€‚ + </floater.string> + <floater.string name="navmesh_simulator_status_complete"> + ãƒŠãƒ“ãƒ¡ãƒƒã‚·ãƒ¥ã¯æœ€æ–°ã§ã™ã€‚ + </floater.string> + <floater.string name="pathing_library_not_implemented"> + パスファインディングライブラリã®å®Ÿè£…ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 + </floater.string> + <floater.string name="pathing_region_not_enabled"> + ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã¯ãƒ‘スファインディングã«å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“。 + </floater.string> + <floater.string name="pathing_choose_start_and_end_points"> + 開始点ã¨çµ‚äº†ç‚¹ã‚’é¸æŠžã—ã¦ãã ã•ã„。 + </floater.string> + <floater.string name="pathing_choose_start_point"> + é–‹å§‹ç‚¹ã‚’é¸æŠžã—ã¦ãã ã•ã„。 + </floater.string> + <floater.string name="pathing_choose_end_point"> + çµ‚äº†ç‚¹ã‚’é¸æŠžã—ã¦ãã ã•ã„。 + </floater.string> + <floater.string name="pathing_path_valid"> + パスã¯ã‚ªãƒ¬ãƒ³ã‚¸è‰²ã§è¡¨ç¤ºã•れã¦ã„ã¾ã™ã€‚ + </floater.string> + <floater.string name="pathing_path_invalid"> + é¸æŠžã—㟠2 点間ã®ãƒ‘スãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 + </floater.string> + <floater.string name="pathing_error"> + パスã®ç”Ÿæˆä¸ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ + </floater.string> + <tab_container name="view_test_tab_container"> + <panel label="表示" name="view_panel"> + <text name="show_label"> + 表示: + </text> + <check_box label="世界" name="show_world"/> + <check_box label="å¯å‹•物ã®ã¿" name="show_world_movables_only"/> + <check_box label="ナビメッシュ" name="show_navmesh"/> + <text name="show_walkability_label"> + æ©è¡Œå¯èƒ½ãƒžãƒƒãƒ—を表示: + </text> + <combo_box name="show_heatmap_mode"> + <combo_box.item label="表示ã—ãªã„" name="show_heatmap_mode_none"/> + <combo_box.item label="ã‚ャラクター タイプ A" name="show_heatmap_mode_a"/> + <combo_box.item label="ã‚ャラクター タイプ B" name="show_heatmap_mode_b"/> + <combo_box.item label="ã‚ャラクター タイプ C" name="show_heatmap_mode_c"/> + <combo_box.item label="ã‚ャラクター タイプ D" name="show_heatmap_mode_d"/> + </combo_box> + <check_box label="æ©è¡Œå¯èƒ½" name="show_walkables"/> + <check_box label="ç´ æãƒœãƒªãƒ¥ãƒ¼ãƒ " name="show_material_volumes"/> + <check_box label="é™çš„障害物" name="show_static_obstacles"/> + <check_box label="除外ボリューム" name="show_exclusion_volumes"/> + <check_box label="水上飛行機" name="show_water_plane"/> + <check_box label="X 線表示ã«ã‚ˆã‚‹" name="show_xray"/> + </panel> + <panel label="パスをテスト" name="test_panel"> + <text name="ctrl_click_label"> + Ctrl ã‚ーを押ã—ãªãŒã‚‰ã‚¯ãƒªãƒƒã‚¯ã—ã¦ã€é–‹å§‹ç‚¹ã‚’é¸æŠžã—ã¾ã™ã€‚ + </text> + <text name="shift_click_label"> + Shift ã‚ーを押ã—ãªãŒã‚‰ã‚¯ãƒªãƒƒã‚¯ã—ã¦ã€çµ‚äº†ç‚¹ã‚’é¸æŠžã—ã¾ã™ã€‚ + </text> + <text name="character_width_label"> + ã‚ャラクターã®å¹… + </text> + <slider name="character_width" value="1"/> + <text name="character_width_unit_label"> + m + </text> + <text name="character_type_label"> + ã‚ャラクタータイプ + </text> + <combo_box name="path_character_type"> + <combo_box.item label="ãªã—" name="path_character_type_none"/> + <combo_box.item label="A" name="path_character_type_a"/> + <combo_box.item label="B" name="path_character_type_b"/> + <combo_box.item label="C" name="path_character_type_c"/> + <combo_box.item label="D" name="path_character_type_d"/> + </combo_box> + <button label="パスをクリア" name="clear_path"/> + </panel> + </tab_container> +</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/ja/floater_pathfinding_linksets.xml new file mode 100644 index 0000000000..4441d5e738 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/floater_pathfinding_linksets.xml @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_linksets" title="パスファインディングリンクセット"> + <floater.string name="messaging_get_inprogress"> + パスファインディングリンクセットを照会ä¸... + </floater.string> + <floater.string name="messaging_get_error"> + パスファインディングリンクセットã®ç…§ä¼šä¸ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ + </floater.string> + <floater.string name="messaging_set_inprogress"> + é¸æŠžã—ãŸãƒ‘スファインディングリンクセットを修æ£ä¸... + </floater.string> + <floater.string name="messaging_set_error"> + é¸æŠžã—ãŸãƒ‘スファインディングリンクセットã®ä¿®æ£ä¸ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ + </floater.string> + <floater.string name="messaging_complete_none_found"> + パスファインディングリンクセットãŒã‚りã¾ã›ã‚“。 + </floater.string> + <floater.string name="messaging_complete_available"> + [NUM_TOTAL] ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆä¸ [NUM_SELECTED] リンクセットãŒé¸æŠžã•れã¾ã—ãŸã€‚ + </floater.string> + <floater.string name="messaging_not_enabled"> + ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã¯ãƒ‘スファインディングã«å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“。 + </floater.string> + <floater.string name="linkset_terrain_name"> + [Terrain] + </floater.string> + <floater.string name="linkset_terrain_description"> + -- + </floater.string> + <floater.string name="linkset_terrain_owner"> + -- + </floater.string> + <floater.string name="linkset_terrain_scripted"> + -- + </floater.string> + <floater.string name="linkset_terrain_land_impact"> + -- + </floater.string> + <floater.string name="linkset_terrain_dist_from_you"> + -- + </floater.string> + <floater.string name="linkset_owner_loading"> + [Loading] + </floater.string> + <floater.string name="linkset_owner_unknown"> + [Unknown] + </floater.string> + <floater.string name="linkset_owner_group"> + [group] + </floater.string> + <floater.string name="linkset_is_scripted"> + ã¯ã„ + </floater.string> + <floater.string name="linkset_is_not_scripted"> + ã„ã„㈠+ </floater.string> + <floater.string name="linkset_is_unknown_scripted"> + 䏿˜Ž + </floater.string> + <floater.string name="linkset_use_walkable"> + æ©è¡Œå¯èƒ½ + </floater.string> + <floater.string name="linkset_use_static_obstacle"> + é™çš„障害物 + </floater.string> + <floater.string name="linkset_use_dynamic_obstacle"> + å¯å‹•障害物 + </floater.string> + <floater.string name="linkset_use_material_volume"> + ç´ æãƒœãƒªãƒ¥ãƒ¼ãƒ + </floater.string> + <floater.string name="linkset_use_exclusion_volume"> + 除外ボリューム+ </floater.string> + <floater.string name="linkset_use_dynamic_phantom"> + å¯å‹•ボリューム+ </floater.string> + <floater.string name="linkset_is_terrain"> + [unmodifiable] + </floater.string> + <floater.string name="linkset_is_restricted_state"> + [restricted] + </floater.string> + <floater.string name="linkset_is_non_volume_state"> + [concave] + </floater.string> + <floater.string name="linkset_is_restricted_non_volume_state"> + [restricted,concave] + </floater.string> + <floater.string name="linkset_choose_use"> + リンクセットã®ç”¨é€”ã‚’é¸æŠž... + </floater.string> + <panel> + <combo_box name="filter_by_linkset_use"> + <combo_box.item label="リンクセットã®ç”¨é€”ã§ãƒ•ィルター..." name="filter_by_linkset_use_none"/> + <combo_box.item label="æ©è¡Œå¯èƒ½" name="filter_by_linkset_use_walkable"/> + <combo_box.item label="é™çš„障害物" name="filter_by_linkset_use_static_obstacle"/> + <combo_box.item label="å¯å‹•障害物" name="filter_by_linkset_use_dynamic_obstacle"/> + <combo_box.item label="ç´ æãƒœãƒªãƒ¥ãƒ¼ãƒ " name="filter_by_linkset_use_material_volume"/> + <combo_box.item label="除外ボリューム" name="filter_by_linkset_use_exclusion_volume"/> + <combo_box.item label="å¯å‹•ボリューム" name="filter_by_linkset_use_dynamic_phantom"/> + </combo_box> + <button label="é©ç”¨" name="apply_filters"/> + <button label="クリア" name="clear_filters"/> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="åå‰ï¼ˆãƒ«ãƒ¼ãƒˆãƒ—リム)" name="name"/> + <scroll_list.columns label="説明(ルートプリム)" name="description"/> + <scroll_list.columns label="所有者" name="owner"/> + <scroll_list.columns label="スクリプト" name="scripted"/> + <scroll_list.columns label="è² è·" name="land_impact"/> + <scroll_list.columns label="è·é›¢" name="dist_from_you"/> + <scroll_list.columns label="リンクセットã®ç”¨é€”" name="linkset_use"/> + <scroll_list.columns label="A %" name="a_percent"/> + <scroll_list.columns label="B %" name="b_percent"/> + <scroll_list.columns label="C %" name="c_percent"/> + <scroll_list.columns label="D %" name="d_percent"/> + </scroll_list> + <text name="messaging_status"> + リンクセット: + </text> + <button label="リスト更新" name="refresh_objects_list"/> + <button label="ã™ã¹ã¦é¸æŠž" name="select_all_objects"/> + <button label="ä½•ã‚‚é¸æŠžã—ãªã„" name="select_none_objects"/> + </panel> + <panel> + <check_box label="ビーコンを表示" name="show_beacon"/> + <button label="å–ã‚‹" name="take_objects"/> + <button label="コピーをå–ã‚‹" name="take_copy_objects"/> + <button label="ç§ã‚’ãã“ã«ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã™ã‚‹" name="teleport_me_to_object"/> + <button label="è¿”å´" name="return_objects"/> + <button label="削除" name="delete_objects"/> + </panel> + <panel> + <text name="walkability_coefficients_label"> + æ©è¡Œå¯èƒ½æ€§: + </text> + <text name="edit_a_label"> + A + </text> + <line_editor name="edit_a_value" tool_tip="タイプ A ã®ã‚ãƒ£ãƒ©ã‚¯ã‚¿ãƒ¼ã®æ©è¡Œå¯èƒ½æ€§ã€‚ã‚ャラクタータイプã®ä¾‹ã¯ãƒ’ューマノイドã§ã™ã€‚"/> + <text name="edit_b_label"> + B + </text> + <line_editor name="edit_b_value" tool_tip="タイプ B ã®ã‚ãƒ£ãƒ©ã‚¯ã‚¿ãƒ¼ã®æ©è¡Œå¯èƒ½æ€§ã€‚ã‚ャラクタータイプã®ä¾‹ã¯ã‚¯ãƒªãƒ¼ãƒãƒ£ãƒ¼ã§ã™ã€‚"/> + <text name="edit_c_label"> + C + </text> + <line_editor name="edit_c_value" tool_tip="タイプ C ã®ã‚ãƒ£ãƒ©ã‚¯ã‚¿ãƒ¼ã®æ©è¡Œå¯èƒ½æ€§ã€‚ã‚ャラクタータイプã®ä¾‹ã¯ãƒ¡ã‚«ãƒ‹ã‚«ãƒ«ã§ã™ã€‚"/> + <text name="edit_d_label"> + D + </text> + <line_editor name="edit_d_value" tool_tip="タイプ D ã®ã‚ãƒ£ãƒ©ã‚¯ã‚¿ãƒ¼ã®æ©è¡Œå¯èƒ½æ€§ã€‚ã‚ャラクタータイプã®ä¾‹ã¯ãã®ä»–ã§ã™ã€‚"/> + <button label="変更をé©ç”¨" name="apply_edit_values"/> + <text name="suggested_use_a_label"> + (ヒューマノイド) + </text> + <text name="suggested_use_b_label"> + (クリーãƒãƒ£ãƒ¼) + </text> + <text name="suggested_use_c_label"> + (メカニカル) + </text> + <text name="suggested_use_d_label"> + (ãã®ä»–) + </text> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_postcard.xml b/indra/newview/skins/default/xui/ja/floater_postcard.xml deleted file mode 100644 index 9d9b59fa51..0000000000 --- a/indra/newview/skins/default/xui/ja/floater_postcard.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="スナップショットをEメールã§é€ä¿¡"> - <text name="to_label"> - å—ä¿¡å…ˆã®Eメール: - </text> - <line_editor left="145" name="to_form" width="125"/> - <text name="from_label"> - ã‚ãªãŸã®Eメール: - </text> - <line_editor left="145" name="from_form" width="125"/> - <text name="name_label"> - ã‚ãªãŸã®åå‰ï¼š - </text> - <line_editor left="145" name="name_form" width="125"/> - <text name="subject_label"> - ä»¶å: - </text> - <line_editor label="ä»¶åを入力ã—ã¦ãã ã•ã„" left="145" name="subject_form" width="125"/> - <text name="msg_label"> - メッセージ: - </text> - <text_editor bottom_delta="-120" height="110" name="msg_form"> - メッセージをã“ã“ã«å…¥åŠ›ã—ã¦ãã ã•ã„。 - </text_editor> - <check_box label="Web上ã§å…¬é–‹" name="allow_publish_check" tool_tip="ã“ã®ãƒã‚¹ãƒˆã‚«ãƒ¼ãƒ‰ã‚’Web上ã§å…¬é–‹ã—ã¾ã™ã€‚"/> - <check_box label="æˆäººå‘ã‘コンテンツ" name="mature_check" tool_tip="ã“ã®ãƒã‚¹ãƒˆã‚«ãƒ¼ãƒ‰ã«ã¯æˆäººå‘ã‘内容ãŒå«ã¾ã‚Œã¾ã™ã€‚"/> - <button label="?" left="300" name="publish_help_btn"/> - <text name="fine_print"> - ã“ã®å—信者ãŒSLã«å‚åŠ ã™ã‚‹ã¨ã€ã‚ãªãŸã«ç´¹ä»‹ãƒœãƒ¼ãƒŠã‚¹ãŒå…¥ã‚Šã¾ã™ - </text> - <button bottom_delta="-52" label="å–り消ã—" name="cancel_btn"/> - <button label="é€ä¿¡" name="send_btn"/> - <text name="default_subject"> - [SECOND_LIFE] ã‹ã‚‰ã®ãƒã‚¹ãƒˆã‚«ãƒ¼ãƒ‰ã§ã™ã€‚ - </text> - <text name="default_message"> - ã“れã¯çµ¶å¯¾ãƒã‚§ãƒƒã‚¯ï¼ - </text> - <string name="upload_message"> - é€ä¿¡ä¸... - </string> -</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_spellcheck.xml b/indra/newview/skins/default/xui/ja/floater_spellcheck.xml new file mode 100644 index 0000000000..31fbef9bcf --- /dev/null +++ b/indra/newview/skins/default/xui/ja/floater_spellcheck.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_floater" title="スペルãƒã‚§ãƒƒã‚«ãƒ¼ã®è¨å®š"> + <check_box label="スペルãƒã‚§ãƒƒã‚«ãƒ¼ã‚’有効ã«ã™ã‚‹" name="spellcheck_enable"/> + <text name="spellcheck_main"> + メイン辞書: + </text> + <text label="ãƒã‚°ï¼š" name="spellcheck_additional"> + ãã®ä»–ã®è¾žæ›¸ï¼š + </text> + <text name="spellcheck_available"> + å…¥æ‰‹å¯ + </text> + <text name="spellcheck_active"> + 有効 + </text> + <button label="削除" name="spellcheck_remove_btn"/> + <button label="インãƒãƒ¼ãƒˆ..." name="spellcheck_import_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_spellcheck_import.xml b/indra/newview/skins/default/xui/ja/floater_spellcheck_import.xml new file mode 100644 index 0000000000..febe153d25 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/floater_spellcheck_import.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_import" title="辞書をインãƒãƒ¼ãƒˆ"> + <button label="å‚ç…§" label_selected="å‚ç…§" name="dictionary_path_browse"/> + <button label="インãƒãƒ¼ãƒˆ" name="ok_btn"/> + <button label="å–り消ã—" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_stats.xml b/indra/newview/skins/default/xui/ja/floater_stats.xml index da5358f06a..1922e4841a 100644 --- a/indra/newview/skins/default/xui/ja/floater_stats.xml +++ b/indra/newview/skins/default/xui/ja/floater_stats.xml @@ -53,7 +53,13 @@ <stat_bar label="オブジェクト" name="simobjects"/> <stat_bar label="アクティブãªã‚ªãƒ–ジェクト" name="simactiveobjects"/> <stat_bar label="アクティブãªã‚¹ã‚¯ãƒªãƒ—ト" name="simactivescripts"/> + <stat_bar label="スクリプト実行" name="simpctscriptsrun"/> <stat_bar label="スクリプトイベント" name="simscripteps"/> + <stat_view label="パスファインディング" name="simpathfinding"> + <stat_bar label="AIステップ時間" name="simsimaistepmsec"/> + <stat_bar label="スã‚ップã•れãŸã‚·ãƒ«ã‚¨ãƒƒãƒˆã‚¹ãƒ†ãƒƒãƒ—" name="simsimskippedsilhouettesteps"/> + <stat_bar label="æ›´æ–°ã•れãŸã‚ャラクター" name="simsimpctsteppedcharacters"/> + </stat_view> <stat_bar label="パケットイン" name="siminpps"/> <stat_bar label="パケットアウト" name="simoutpps"/> <stat_bar label="ä¿ç•™ä¸ã®ãƒ€ã‚¦ãƒ³ãƒãƒ¼ãƒ‰" name="simpendingdownloads"/> diff --git a/indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml index 55fe840658..3773812bb6 100644 --- a/indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml @@ -20,6 +20,8 @@ <button label="ブランク" label_selected="ブランク" name="Blank"/> <button label="ãªã—" label_selected="ãªã—" name="None"/> <button label="" label_selected="" name="Pipette"/> + <check_box initial_value="true" label="ライブプレビュー" name="apply_immediate_check"/> + <text name="preview_disabled" value="プレビュー無効"/> <filter_editor label="テクスãƒãƒ£ã‚’フィルター" name="inventory search editor"/> <check_box initial_value="false" label="フォルダを表示" name="show_folders_check"/> <button label="è¿½åŠ " label_selected="è¿½åŠ " name="l_add_btn"/> @@ -31,5 +33,4 @@ </scroll_list> <button label="OK" label_selected="OK" name="Select"/> <button label="å–り消ã—" label_selected="å–り消ã—" name="Cancel"/> - <check_box initial_value="true" label="ã™ãé©ç”¨" name="apply_immediate_check"/> </floater> diff --git a/indra/newview/skins/default/xui/ja/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/ja/floater_texture_fetch_debugger.xml index 4efdf7d40d..adc35137b5 100644 --- a/indra/newview/skins/default/xui/ja/floater_texture_fetch_debugger.xml +++ b/indra/newview/skins/default/xui/ja/floater_texture_fetch_debugger.xml @@ -45,10 +45,23 @@ <text name="total_time_refetch_vis_cache_label"> 15, ã‚ャッシュã‹ã‚‰è¡¨ç¤ºãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’å†å–å¾—ã€æ™‚間:[TIME] ç§’ã€å–得:[SIZE]KBã€[PIXEL]メガピクセル </text> + <text name="total_time_refetch_all_cache_label"> + 16ã€ã‚ャッシュã‹ã‚‰ã™ã¹ã¦ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’å†ãƒ•ェッãƒä¸ã€æ™‚é–“: [TIME] ç§’ã€ãƒ•ã‚§ãƒƒãƒæ¸ˆã¿: [SIZE]KBã€[PIXEL]メガピクセル + </text> <text name="total_time_refetch_vis_http_label"> - 16, HTTP ã‹ã‚‰è¡¨ç¤ºãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’å†å–å¾—ã€æ™‚間:[TIME] ç§’ã€å–得:[SIZE]KBã€[PIXEL]メガピクセル + 17ã€HTTP ã‹ã‚‰å¯è¦–ファイルをå†ãƒ•ェッãƒä¸ã€æ™‚é–“: [TIME] ç§’ã€ãƒ•ã‚§ãƒƒãƒæ¸ˆã¿: [SIZE]KBã€[PIXEL]メガピクセル + </text> + <text name="total_time_refetch_all_http_label"> + 18ã€HTTP ã‹ã‚‰ã™ã¹ã¦ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’å†ãƒ•ェッãƒä¸ã€æ™‚é–“: [TIME] ç§’ã€ãƒ•ã‚§ãƒƒãƒæ¸ˆã¿: [SIZE]KBã€[PIXEL]メガピクセル + </text> + <spinner label="19ã€ãƒ†ã‚»ãƒ«/ピクセル比:" name="texel_pixel_ratio"/> + <text name="texture_source_label"> + 20ã€ãƒ†ã‚¯ã‚¹ãƒãƒ£ ソース: </text> - <spinner label="17, テクセルï¼ãƒ”ã‚¯ã‚»ãƒ«ã®æ¯”率:" name="texel_pixel_ratio"/> + <radio_group name="texture_source"> + <radio_item label="ã‚ャッシュ + HTTP" name="0"/> + <radio_item label="HTTP ã®ã¿" name="1"/> + </radio_group> <button label="é–‹å§‹" name="start_btn"/> <button label="リセット" name="clear_btn"/> <button label="é–‰ã˜ã‚‹" name="close_btn"/> @@ -58,5 +71,7 @@ <button label="デコード" name="decode_btn"/> <button label="GL テクスãƒãƒ£" name="gl_btn"/> <button label="ã‚ャッシュ表示テクスãƒãƒ£å†å–å¾—" name="refetchviscache_btn"/> + <button label="ã™ã¹ã¦ã®ã‚ャッシュをå†ãƒ•ェッãƒ" name="refetchallcache_btn"/> <button label="HTTP表示テクスãƒãƒ£å†å–å¾—" name="refetchvishttp_btn"/> + <button label="ã™ã¹ã¦ã® HTTP ã‚’å†ãƒ•ェッãƒ" name="refetchallhttp_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/ja/floater_tools.xml b/indra/newview/skins/default/xui/ja/floater_tools.xml index 2d12a5e56a..4bd6439ad2 100644 --- a/indra/newview/skins/default/xui/ja/floater_tools.xml +++ b/indra/newview/skins/default/xui/ja/floater_tools.xml @@ -148,6 +148,12 @@ <panel.string name="text modify info 4"> ã“れらã®ã‚ªãƒ–ジェクトを修æ£ã§ãã¾ã›ã‚“ </panel.string> + <panel.string name="text modify info 5"> + 地域(リージョン)ã®å¢ƒç•Œã‚’è¶Šãˆã¦ã“ã®ã‚ªãƒ–ジェクトを修æ£ã§ãã¾ã›ã‚“ + </panel.string> + <panel.string name="text modify info 6"> + 地域(リージョン)ã®å¢ƒç•Œã‚’è¶Šãˆã¦ã“れらã®ã‚ªãƒ–ジェクトを修æ£ã§ãã¾ã›ã‚“ + </panel.string> <panel.string name="text modify warning"> ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆå…¨ä½“ã‚’é¸æŠžã—ã¦æ¨©é™ã®è¨å®šã‚’行ã£ã¦ãã ã•ã„。 </panel.string> @@ -203,12 +209,12 @@ <combo_box.item label="ズームã™ã‚‹" name="Zoom"/> </combo_box> <check_box label="販売対象:" name="checkbox for sale"/> + <spinner label="L$" name="Edit Cost"/> <combo_box name="sale type"> <combo_box.item label="コピー" name="Copy"/> <combo_box.item label="ä¸èº«" name="Contents"/> <combo_box.item label="オリジナル" name="Original"/> </combo_box> - <spinner label="ä¾¡æ ¼ï¼š L$" name="Edit Cost"/> <check_box label="検索ã«è¡¨ç¤º" name="search_check" tool_tip="æ¤œç´¢çµæžœã«ã“ã®ã‚ªãƒ–ジェクトを表示ã—ã¾ã™"/> <panel name="perms_build"> <text name="perm_modify"> @@ -244,6 +250,11 @@ F: </text> </panel> + <panel name="pathfinding_attrs_panel"> + <text name="pathfinding_attributes_label"> + パスファインディング属性: + </text> + </panel> </panel> <panel label="形状" name="Object"> <check_box label="ãƒãƒƒã‚¯" name="checkbox locked" tool_tip="オブジェクトã®ç§»å‹•ã¨å‰Šé™¤ã‚’ç¦æ¢ã—ã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã‚’使ã†ã¨ã€åˆ¶ä½œä¸ã®æ„図ã›ã¬ç·¨é›†ã‚’防ãã“ã¨ãŒã§ãã¾ã™"/> diff --git a/indra/newview/skins/default/xui/ja/floater_top_objects.xml b/indra/newview/skins/default/xui/ja/floater_top_objects.xml index bfc93e5624..c44f409d4e 100644 --- a/indra/newview/skins/default/xui/ja/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/ja/floater_top_objects.xml @@ -9,9 +9,6 @@ <floater.string name="scripts_score_label"> 時間 </floater.string> - <floater.string name="scripts_mono_time_label"> - Monoタイム- </floater.string> <floater.string name="top_colliders_title"> 上部コライダー </floater.string> @@ -32,9 +29,10 @@ <scroll_list.columns label="åå‰" name="name"/> <scroll_list.columns label="所有者" name="owner"/> <scroll_list.columns label="ãƒã‚±ãƒ¼ã‚·ãƒ§ãƒ³" name="location"/> + <scroll_list.columns label="区画" name="parcel"/> <scroll_list.columns label="時間" name="time"/> - <scroll_list.columns label="Monoタイム" name="mono_time"/> <scroll_list.columns label="URL" name="URLs"/> + <scroll_list.columns label="メモリ(KB)" name="memory"/> </scroll_list> <text name="id_text"> 物体ID: @@ -48,6 +46,10 @@ 所有者: </text> <button label="フィルタ" name="filter_owner_btn"/> + <text name="parcel_name_text"> + 区画: + </text> + <button label="フィルター" name="filter_parcel_btn"/> <button label="æ›´æ–°" name="refresh_btn"/> <button label="é¸æŠžå†…å®¹ã‚’è¿”å´" name="return_selected_btn"/> <button label="ã™ã¹ã¦è¿”å´" name="return_all_btn"/> diff --git a/indra/newview/skins/default/xui/ja/menu_bottomtray.xml b/indra/newview/skins/default/xui/ja/menu_bottomtray.xml deleted file mode 100644 index 7f106c1ab5..0000000000 --- a/indra/newview/skins/default/xui/ja/menu_bottomtray.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<menu name="hide_camera_move_controls_menu"> - <menu_item_check label="スピーカーボタン" name="EnableVoiceChat"/> - <menu_item_check label="ジェスãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³" name="ShowGestureButton"/> - <menu_item_check label="移動ボタン" name="ShowMoveButton"/> - <menu_item_check label="視界ボタン" name="ShowCameraButton"/> - <menu_item_check label="スナップショットボタン" name="ShowSnapshotButton"/> - <menu_item_check label="制作ボタン" name="ShowBuildButton"/> - <menu_item_check label="検索ボタン" name="ShowSearchButton"/> - <menu_item_check label="地図ボタン" name="ShowWorldMapButton"/> - <menu_item_check label="ミニマップボタン" name="ShowMiniMapButton"/> - <menu_item_call label="切りå–り" name="NearbyChatBar_Cut"/> - <menu_item_call label="コピー" name="NearbyChatBar_Copy"/> - <menu_item_call label="貼り付ã‘" name="NearbyChatBar_Paste"/> - <menu_item_call label="削除" name="NearbyChatBar_Delete"/> - <menu_item_call label="ã™ã¹ã¦é¸æŠž" name="NearbyChatBar_Select_All"/> -</menu> diff --git a/indra/newview/skins/default/xui/ja/menu_im_well_button.xml b/indra/newview/skins/default/xui/ja/menu_im_well_button.xml deleted file mode 100644 index 3397004bd7..0000000000 --- a/indra/newview/skins/default/xui/ja/menu_im_well_button.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<context_menu name="IM Well Button Context Menu"> - <menu_item_call label="ã™ã¹ã¦é–‰ã˜ã‚‹" name="Close All"/> -</context_menu> diff --git a/indra/newview/skins/default/xui/ja/menu_inventory.xml b/indra/newview/skins/default/xui/ja/menu_inventory.xml index d1893a0fc8..106b09453a 100644 --- a/indra/newview/skins/default/xui/ja/menu_inventory.xml +++ b/indra/newview/skins/default/xui/ja/menu_inventory.xml @@ -68,6 +68,7 @@ <menu_item_call label="システムフォルダを削除ã™ã‚‹" name="Delete System Folder"/> <menu_item_call label="コンファレンスãƒãƒ£ãƒƒãƒˆã‚’é–‹å§‹ã™ã‚‹" name="Conference Chat Folder"/> <menu_item_call label="å†ç”Ÿã™ã‚‹" name="Sound Play"/> + <menu_item_call label="SLurl をコピー" name="url_copy"/> <menu_item_call label="ãƒ©ãƒ³ãƒ‰ãƒžãƒ¼ã‚¯ã®æƒ…å ±" name="About Landmark"/> <menu_item_call label="インワールドã§å†ç”Ÿã™ã‚‹" name="Animation Play"/> <menu_item_call label="ãƒãƒ¼ã‚«ãƒ«ã§å†ç”Ÿã™ã‚‹" name="Animation Audition"/> diff --git a/indra/newview/skins/default/xui/ja/menu_mode_change.xml b/indra/newview/skins/default/xui/ja/menu_mode_change.xml deleted file mode 100644 index dff3392bd5..0000000000 --- a/indra/newview/skins/default/xui/ja/menu_mode_change.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<toggleable_menu name="Mode Change"> - <menu_item_check label="ベーシック" name="BasicMode"/> - <menu_item_check label="アドãƒãƒ³ã‚¹" name="AdvancedMode"/> -</toggleable_menu> diff --git a/indra/newview/skins/default/xui/ja/menu_object.xml b/indra/newview/skins/default/xui/ja/menu_object.xml index 4cee8089ee..01436ad12b 100644 --- a/indra/newview/skins/default/xui/ja/menu_object.xml +++ b/indra/newview/skins/default/xui/ja/menu_object.xml @@ -5,6 +5,8 @@ </menu_item_call> <menu_item_call label="編集" name="Edit..."/> <menu_item_call label="制作" name="Build"/> + <menu_item_call label="リンクセットã§è¡¨ç¤º" name="show_in_linksets"/> + <menu_item_call label="ã‚ャラクターã§è¡¨ç¤º" name="show_in_characters"/> <menu_item_call label="é–‹ã" name="Open"/> <menu_item_call label="ã“ã“ã«åº§ã‚‹" name="Object Sit"/> <menu_item_call label="ç«‹ã¡ä¸ŠãŒã‚‹" name="Object Stand Up"/> diff --git a/indra/newview/skins/default/xui/ja/menu_text_editor.xml b/indra/newview/skins/default/xui/ja/menu_text_editor.xml index fcb1038a6a..eda973c888 100644 --- a/indra/newview/skins/default/xui/ja/menu_text_editor.xml +++ b/indra/newview/skins/default/xui/ja/menu_text_editor.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Text editor context menu"> + <menu_item_call label="ï¼ˆä¸æ˜Žï¼‰" name="Suggestion 1"/> + <menu_item_call label="ï¼ˆä¸æ˜Žï¼‰" name="Suggestion 2"/> + <menu_item_call label="ï¼ˆä¸æ˜Žï¼‰" name="Suggestion 3"/> + <menu_item_call label="ï¼ˆä¸æ˜Žï¼‰" name="Suggestion 4"/> + <menu_item_call label="ï¼ˆä¸æ˜Žï¼‰" name="Suggestion 5"/> + <menu_item_call label="辞書ã«è¿½åŠ " name="Add to Dictionary"/> + <menu_item_call label="無視ã«è¿½åŠ " name="Add to Ignore"/> <menu_item_call label="切りå–り" name="Cut"/> <menu_item_call label="コピー" name="Copy"/> <menu_item_call label="貼り付ã‘" name="Paste"/> diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml index 3a398bd985..e60e6781c6 100644 --- a/indra/newview/skins/default/xui/ja/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml @@ -28,6 +28,7 @@ <menu_item_call label="環境è¨å®š..." name="Preferences"/> <menu_item_call label="ツールãƒãƒ¼ã®ãƒœã‚¿ãƒ³..." name="Toolbars"/> <menu_item_call label="å…¨ã¦ã®ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ«ã‚’éžè¡¨ç¤ºã«ã™ã‚‹" name="Hide UI"/> + <menu_item_check label="HUD を表示" name="Show HUD Attachments"/> <menu_item_call label="[APP_NAME] を終了" name="Quit"/> </menu> <menu label="コミュニケーション" name="Communicate"> @@ -39,6 +40,7 @@ <menu_item_call label="フレンド" name="My Friends"/> <menu_item_call label="グループ" name="My Groups"/> <menu_item_call label="è¿‘ãã«ã„る人" name="Active Speakers"/> + <menu_item_call label="リストをブãƒãƒƒã‚¯" name="Block List"/> </menu> <menu label="世界" name="World"> <menu_item_call label="ç¾åœ¨åœ°ã‚’ランドマーク" name="Create Landmark Here"/> @@ -124,6 +126,11 @@ <menu_item_call label="スクリプトを実行ä¸ã«ã™ã‚‹" name="Set Scripts to Running"/> <menu_item_call label="ã‚¹ã‚¯ãƒªãƒ—ãƒˆã‚’å®Ÿè¡Œåœæ¢ã«ã™ã‚‹" name="Set Scripts to Not Running"/> </menu> + <menu label="パスファインディング" name="Pathfinding"> + <menu_item_call label="リンクセット..." name="pathfinding_linksets_menu_item"/> + <menu_item_call label="ã‚ャラクター..." name="pathfinding_characters_menu_item"/> + <menu_item_call label="表示/テスト..." name="pathfinding_console_menu_item"/> + </menu> <menu label="オプション" name="Options"> <menu_item_check label="権é™ã®è©³ç´°ã‚’表示ã™ã‚‹" name="DebugPermissions"/> <menu_item_check label="ç§ã®ã‚ªãƒ–ジェクトã ã‘ã‚’é¸æŠžã™ã‚‹" name="Select Only My Objects"/> @@ -174,7 +181,6 @@ <menu_item_check label="パーティクルをéžè¡¨ç¤ºã«ã™ã‚‹" name="Hide Particles"/> <menu_item_check label="é¸æŠžã—ãŸã‚‚ã®ã‚’éžè¡¨ç¤ºã«ã™ã‚‹" name="Hide Selected"/> <menu_item_check label="逿˜Žéƒ¨åˆ†ã‚’ãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹" name="Highlight Transparent"/> - <menu_item_check label="HUD を表示ã™ã‚‹" name="Show HUD Attachments"/> <menu_item_check label="一人称視点ã®ã¨ãã«åå—線を表示ã™ã‚‹" name="ShowCrosshairs"/> </menu> <menu label="レンダリング(種類)" name="Rendering Types"> @@ -377,7 +383,6 @@ <menu_item_call label="ã‚ャラクタジオメトリã®åˆ‡ã‚Šæ›¿ãˆ" name="Toggle Character Geometry"/> <menu_item_call label="男性アãƒã‚¿ãƒ¼ã®ãƒ†ã‚¹ãƒˆ" name="Test Male"/> <menu_item_call label="女性アãƒã‚¿ãƒ¼ã®ãƒ†ã‚¹ãƒˆ" name="Test Female"/> - <menu_item_call label="PG ã®ãƒˆã‚°ãƒ«" name="Toggle PG"/> <menu_item_check label="é¸æŠžã‚¢ãƒã‚¿ãƒ¼è¨±å¯" name="Allow Select Avatar"/> </menu> <menu_item_call label="パラメータを強制的ã«ãƒ‡ãƒ•ォルトã«ã™ã‚‹" name="Force Params to Default"/> diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml index f35c0f0d14..d5cff18a24 100644 --- a/indra/newview/skins/default/xui/ja/notifications.xml +++ b/indra/newview/skins/default/xui/ja/notifications.xml @@ -37,6 +37,12 @@ <button name="Help" text="$helptext"/> </form> </template> + <template name="okhelpignore"> + <form> + <button name="OK_okhelpignore" text="$yestext"/> + <button name="Help_okhelpignore" text="$helptext"/> + </form> + </template> <template name="yesnocancelbuttons"> <form> <button name="Yes" text="$yestext"/> @@ -382,13 +388,19 @@ L$ ãŒä¸è¶³ã—ã¦ã„ã‚‹ã®ã§ã“ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å‚åŠ ã™ã‚‹ã“ã¨ãŒã§ãã [SECOND_LIFE] ã«å…¥ã‚‹ã«ã¯ã‚¢ã‚«ã‚¦ãƒ³ãƒˆãŒå¿…è¦ã§ã™ã€‚今ã™ãアカウントを作æˆã—ã¾ã™ã‹ï¼Ÿ <url name="url"> - https://join.secondlife.com/index.php?lang=ja-JP + [create_account_url] </url> <usetemplate name="okcancelbuttons" notext="ã‚‚ã†ä¸€åº¦è©¦ã™" yestext="æ–°ã—ã„アカウントを作æˆ"/> </notification> <notification name="InvalidCredentialFormat"> ユーザーåã®ãƒ•ィールドã«ã‚¢ãƒã‚¿ãƒ¼ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã‚‚ã—ãã¯æ°åを入力ã—ã¦ã‹ã‚‰ã€å†åº¦ãƒã‚°ã‚¤ãƒ³ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ </notification> + <notification name="InvalidGrid"> + '[GRID]' ã¯æœ‰åйãªã‚°ãƒªãƒƒãƒ‰ ID ã§ã¯ã‚りã¾ã›ã‚“。 + </notification> + <notification name="InvalidLocationSLURL"> + ãƒã‚°ã‚¤ãƒ³ä½ç½®ã§æœ‰åйãªã‚°ãƒªãƒƒãƒ‰ãŒæŒ‡å®šã•れã¾ã›ã‚“ã§ã—ãŸã€‚ + </notification> <notification name="DeleteClassified"> クラシファイド広告 [NAME] を削除ã—ã¾ã™ã‹ï¼Ÿ æ”¯æ‰•ã„æ¸ˆã¿ã®æ–™é‡‘ã¯è¿”金ã•れã¾ã›ã‚“。 @@ -495,7 +507,7 @@ L$ ãŒä¸è¶³ã—ã¦ã„ã‚‹ã®ã§ã“ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å‚åŠ ã™ã‚‹ã“ã¨ãŒã§ãã </notification> <notification name="StartRegionEmpty"> ãƒã‚°ã‚¤ãƒ³ä½ç½®ãŒæŒ‡å®šã•れã¦ã„ã¾ã›ã‚“。 -ãƒã‚°ã‚¤ãƒ³ä½ç½®ã®æ¬„ã«ãƒªãƒ¼ã‚¸ãƒ§ãƒ³åを入力ã™ã‚‹ã‹ã€ã€Œæœ€å¾Œã«ãƒã‚°ã‚¢ã‚¦ãƒˆã—ãŸå ´æ‰€ã€ã‹ã€Œãƒ›ãƒ¼ãƒ ã€ã‚’é¸æŠžã—ã¦ãã ã•ã„。 +ãƒã‚°ã‚¤ãƒ³ä½ç½®ã®æ¬„ã«ãƒªãƒ¼ã‚¸ãƒ§ãƒ³åを入力ã™ã‚‹ã‹ã€ã€Œæœ€å¾Œã«ãƒã‚°ã‚¢ã‚¦ãƒˆã—ãŸå ´æ‰€ã€ã‹ã€Œè‡ªå®…(ホーム)ã€ã‚’é¸æŠžã—ã¦ãã ã•ã„。 <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="CouldNotStartStopScript"> @@ -623,6 +635,9 @@ L$ ãŒä¸è¶³ã—ã¦ã„ã‚‹ã®ã§ã“ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å‚åŠ ã™ã‚‹ã“ã¨ãŒã§ãã ã©ã®ã‚ªãƒ–ジェクトもãƒãƒƒã‚¯ã•れã¦ãŠã‚‰ãšã€ã‚ãªãŸã®ã‚‚ã®ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 </notification> + <notification name="CannotLinkPermanent"> + 地域(リージョン)ã®å¢ƒç•Œã‚’è¶Šãˆã¦ã‚ªãƒ–ジェクトをリンクã§ãã¾ã›ã‚“。 + </notification> <notification name="CannotLinkDifferentOwners"> 所有者ãŒç•°ãªã‚‹ãŸã‚ã€ã‚ªãƒ–ジェクトをリンクã§ãã¾ã›ã‚“。 @@ -1009,6 +1024,40 @@ L$ ã¯è¿”金ã•れã¾ã›ã‚“。 <button name="Cancel" text="ã‚ャンセル"/> </form> </notification> + <notification label="自動置æ›ãƒªã‚¹ãƒˆã‚’è¿½åŠ " name="AddAutoReplaceList"> + æ–°ã—ã„リストã®åå‰: + <form name="form"> + <button name="SetName" text="OK"/> + </form> + </notification> + <notification label="自動置æ›ãƒªã‚¹ãƒˆã®åå‰ã‚’変更" name="RenameAutoReplaceList"> + åå‰ '[DUPNAME]' ã¯æ—¢ã«ä½¿ã‚れã¦ã„ã¾ã™ +一æ„ã®åå‰ã‚’入力ã—ã¦ãã ã•ã„: + <form name="form"> + <button name="ReplaceList" text="ç€ç”¨ä¸ã®ãƒªã‚¹ãƒˆã‚’入れ替ãˆã‚‹"/> + <button name="SetName" text="æ–°ã—ã„åå‰ã‚’使用"/> + </form> + </notification> + <notification name="InvalidAutoReplaceEntry"> + ã‚ーワードã¯ä¸€èªžã§ãªã‘れã°ãªã‚‰ãšã€ç½®æ›ã¯ç©ºã«ã§ãã¾ã›ã‚“。 + </notification> + <notification name="InvalidAutoReplaceList"> + ãã®ç½®æ›ãƒªã‚¹ãƒˆã¯ç„¡åйã§ã™ã€‚ + </notification> + <notification name="SpellingDictImportRequired"> + ファイルã€åå‰ãŠã‚ˆã³è¨€èªžã‚’指定ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + </notification> + <notification name="SpellingDictIsSecondary"> + 辞書 [DIC_NAME] ã«ã€Œaffã€ãƒ•ァイルãŒãªã„よã†ã§ã™ã€‚ã“れã¯ã“ã®è¾žæ›¸ãŒã€Œã‚»ã‚«ãƒ³ãƒ€ãƒªã€è¾žæ›¸ã§ã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +ã“ã®è¾žæ›¸ã¯è¿½åŠ è¾žæ›¸ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ãŒã€ãƒ¡ã‚¤ãƒ³è¾žæ›¸ã¨ã—ã¦ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 + +https://wiki.secondlife.com/wiki/Adding_Spelling_Dictionaries ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + </notification> + <notification name="SpellingDictImportFailed"> + [FROM_NAME] ã‹ã‚‰ + +[TO_NAME] ã¸ã‚³ãƒ”ーã§ãã¾ã›ã‚“ + </notification> <notification label="アウトフィットをä¿å˜ã™ã‚‹" name="SaveOutfitAs"> ç€ç”¨ä¸ã®ã‚¢ã‚¦ãƒˆãƒ•ィットを新ã—ã„アウトフットã¨ã—ã¦ä¿å˜ï¼š <form name="form"> @@ -1191,7 +1240,7 @@ L$ ã¯è¿”金ã•れã¾ã›ã‚“。 è¿‘ãã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«ç§»å‹•ã—ã¾ã—ãŸã€‚ </notification> <notification name="AvatarMovedLast"> - å‰å›žã„ãŸå ´æ‰€ã¯ç¾åœ¨ã”利用ã„ãŸã ã‘ã¾ã›ã‚“。 + リクエストã•れãŸå ´æ‰€ã¯ç¾åœ¨ã”利用ã„ãŸã ã‘ã¾ã›ã‚“。 è¿‘ãã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«ç§»å‹•ã—ã¾ã—ãŸã€‚ </notification> <notification name="AvatarMovedHome"> @@ -1210,8 +1259,7 @@ L$ ã¯è¿”金ã•れã¾ã›ã‚“。 [APP_NAME] ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãŒå®Œäº†ã—ã¾ã—ãŸã€‚ [SECOND_LIFE] を使ã£ãŸã“ã¨ãŒãªã„å ´åˆã¯ã€ãƒã‚°ã‚¤ãƒ³ã™ã‚‹å‰ã«ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã®ä½œæˆã‚’行ã£ã¦ãã ã•ã„。 -[http://join.secondlife.com/?lang=ja-JP] ã§æ–°ã—ã„アカウントを作æˆã—ã¾ã™ã‹ï¼Ÿ - <usetemplate name="okcancelbuttons" notext="続行" yestext="æ–°è¦ã‚¢ã‚«ã‚¦ãƒ³ãƒˆ..."/> + <usetemplate name="okcancelbuttons" notext="続行" yestext="アカウントを作æˆ..."/> </notification> <notification name="LoginPacketNeverReceived"> 接続ãŒãªã‹ãªã‹ã§ãã¾ã›ã‚“。 ãŠä½¿ã„ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆæŽ¥ç¶šã‹ã€[SECOND_LIFE_GRID] ã®å•題ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ã€‚ @@ -1733,83 +1781,128 @@ http://wiki.secondlife.com/wiki/Setting_your_display_name ã‚’å‚ç…§ã—ã¦ãã ã <usetemplate name="okcancelbuttons" notext="å–り消ã—" yestext="OK"/> </notification> <notification name="RegionEntryAccessBlocked"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã«ã‚ˆã‚Šã€ãã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆåœ°åŸŸï¼‰ã¸ã¯å…¥ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 年齢を確èªã™ã‚‹éš›ã®æƒ…å ±ã«ä¸è¶³ãŒã‚ã£ãŸãŸã‚ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ã€‚ - -最新ビューワãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã‚‹ã‹ã‚’ã”確èªãã ã•ã„。ã“ã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã§ã®ã‚¢ã‚¯ã‚»ã‚¹ã«é–¢ã™ã‚‹è©³ç´°ã¯ãƒŠãƒ¬ãƒƒã‚¸ãƒ™ãƒ¼ã‚¹ã‚’ã”覧ãã ã•ã„。 + 訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ç¾åœ¨ã®ç’°å¢ƒè¨å®šã‚’è¶…ãˆã‚‹ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚「ミー〠> 「環境è¨å®šã€ > 「一般ã€ã‚’é¸æŠžã—ã¦ã€ç’°å¢ƒè¨å®šã‚’変更ã§ãã¾ã™ã€‚ <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="RegionEntryAccessBlocked_KB"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã«ã‚ˆã‚Šã€ãã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆåœ°åŸŸï¼‰ã¸ã¯å…¥ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 - -ナレッジベースを開ãレーティング区分ã«ã¤ã„ã¦å¦ã³ã¾ã™ã‹ï¼Ÿ + <notification name="RegionEntryAccessBlocked_AdultsOnlyContent"> + 訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ã€æˆäººã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/ja + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="レーティング区分ã®åˆ¶é™ã®ãŸã‚ã€ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«å…¥ã‚‹ã“ã¨ãŒã§ããªã„ã¨ã" name="okcancelignore" notext="é–‰ã˜ã‚‹" yestext="ナレッジベースを開ã"/> + <usetemplate ignoretext="ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆåœ°åŸŸï¼‰ã®æ¨ªæ–:訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ã€æˆäººã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã§ãるコンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚" name="okcancelignore" notext="é–‰ã˜ã‚‹" yestext="ナレッジベースを開ã"/> </notification> <notification name="RegionEntryAccessBlocked_Notify"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã«ã‚ˆã‚Šã€ãã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆåœ°åŸŸï¼‰ã¸ã¯å…¥ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 + 訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ç¾åœ¨ã®ç’°å¢ƒè¨å®šã¯ [REGIONMATURITY] コンテンツ除外ã™ã‚‹ã‚ˆã†ã«è¨å®šã•れã¦ã„ã¾ã™ã€‚ + </notification> + <notification name="RegionEntryAccessBlocked_NotifyAdultsOnly"> + 訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ã€æˆäººã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ </notification> <notification name="RegionEntryAccessBlocked_Change"> - レーティング区分ã«é–¢ã™ã‚‹è¨å®šã«ã‚ˆã‚Šã€ãã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã«ã¯ç«‹ã¡å…¥ã‚Œã¾ã›ã‚“。 - -ãã®åœ°åŸŸã«å…¥ã‚‹ã«ã¯ã€ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã®è¨å®šã‚’変更ã—ã¦ãã ã•ã„。変更ã™ã‚‹ã¨ã€[REGIONMATURITY]ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®æ¤œç´¢ã‚„アクセスãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚å¤‰æ›´å†…å®¹ã‚’å…ƒã«æˆ»ã™ã«ã¯ã€ãƒŸãƒ¼ > 環境è¨å®š > ä¸€èˆ¬ã‚’é¸æŠžã—ã¦ãã ã•ã„。 + 訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ç¾åœ¨ã®ç’°å¢ƒè¨å®šã¯ [REGIONMATURITY] コンテンツを除外ã™ã‚‹ã‚ˆã†ã«è¨å®šã•れã¦ã„ã¾ã™ã€‚環境è¨å®šã‚’変更ã™ã‚‹ã‹ã€å–り消ã™ã“ã¨ãŒã§ãã¾ã™ã€‚環境è¨å®šã‚’変更ã—ãŸå¾Œã€ã‚‚ã†ä¸€åº¦ã€åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã«å…¥ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ <form name="form"> <button name="OK" text="環境è¨å®šã®å¤‰æ›´"/> - <button default="true" name="Cancel" text="é–‰ã˜ã‚‹"/> - <ignore name="ignore" text="é¸æŠžã—ãŸãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ãŒåŽŸå› ã§ã€ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«å…¥ã‚Œãªã„ã¨ã"/> + <button default="true" name="Cancel" text="å–り消ã—"/> + <ignore name="ignore" text="ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆåœ°åŸŸï¼‰ã®æ¨ªæ–:訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ç¾åœ¨ã®ç’°å¢ƒè¨å®šã«ã‚ˆã‚Šé™¤å¤–ã•れãŸã‚³ãƒ³ãƒ†ãƒ³ãƒ„ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚"/> </form> </notification> + <notification name="RegionEntryAccessBlocked_PreferencesOutOfSync"> + ã‚ãªãŸã®ç’°å¢ƒè¨å®šãŒã‚µãƒ¼ãƒãƒ¼ã¨åŒæœŸã—ã¦ã„ãªã„ãŸã‚ã€ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã«æŠ€è¡“çš„ãªå•題ãŒç™ºç”Ÿã—ã¦ã„ã¾ã™ã€‚ + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked"> + 訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ç¾åœ¨ã®ç’°å¢ƒè¨å®šã‚’è¶…ãˆã‚‹ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚「ミー〠> 「環境è¨å®šã€ > 「一般ã€ã‚’é¸æŠžã—ã¦ã€ç’°å¢ƒè¨å®šã‚’変更ã§ãã¾ã™ã€‚ + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked_AdultsOnlyContent"> + 訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ã€æˆäººã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + <url name="url"> + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview + </url> + <usetemplate ignoretext="テレãƒãƒ¼ãƒˆï¼šè¨ªå•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ã€æˆäººã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã§ãるコンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚" name="okcancelignore" notext="é–‰ã˜ã‚‹" yestext="ナレッジベースを開ã"/> + </notification> + <notification name="TeleportEntryAccessBlocked_Notify"> + 訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ç¾åœ¨ã®ç’°å¢ƒè¨å®šã¯ [REGIONMATURITY] コンテンツを除外ã™ã‚‹ã‚ˆã†ã«è¨å®šã•れã¦ã„ã¾ã™ã€‚ + </notification> + <notification name="TeleportEntryAccessBlocked_NotifyAdultsOnly"> + 訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ã€æˆäººã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + </notification> + <notification name="TeleportEntryAccessBlocked_ChangeAndReTeleport"> + 訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ç¾åœ¨ã®ç’°å¢ƒè¨å®šã¯ [REGIONMATURITY] コンテンツを除外ã™ã‚‹ã‚ˆã†ã«è¨å®šã•れã¦ã„ã¾ã™ã€‚環境è¨å®šã‚’変更ã—ã¦ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã‚’ç¶šã‘ã‚‹ã‹ã€ã“ã®ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã‚’å–り消ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + <form name="form"> + <button name="OK" text="変更ã—ã¦ç¶šã‘ã‚‹"/> + <button name="Cancel" text="å–り消ã—"/> + <ignore name="ignore" text="テレãƒãƒ¼ãƒˆï¼ˆå†èµ·å‹•å¯èƒ½ï¼‰ï¼šè¨ªå•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ç¾åœ¨ã®ç’°å¢ƒè¨å®šã«ã‚ˆã‚Šé™¤å¤–ã•れãŸã‚³ãƒ³ãƒ†ãƒ³ãƒ„ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚"/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_Change"> + 訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ç¾åœ¨ã®ç’°å¢ƒè¨å®šã¯ [REGIONMATURITY] コンテンツを除外ã™ã‚‹ã‚ˆã†ã«è¨å®šã•れã¦ã„ã¾ã™ã€‚環境è¨å®šã‚’変更ã™ã‚‹ã‹ã€ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã‚’å–り消ã™ã“ã¨ãŒã§ãã¾ã™ã€‚環境è¨å®šã‚’変更ã—ãŸå¾Œã€ã‚‚ã†ä¸€åº¦ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã‚’実行ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + <form name="form"> + <button name="OK" text="環境è¨å®šã®å¤‰æ›´"/> + <button name="Cancel" text="å–り消ã—"/> + <ignore name="ignore" text="テレãƒãƒ¼ãƒˆï¼ˆå†èµ·å‹•ä¸å¯ï¼‰ï¼šè¨ªå•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ç¾åœ¨ã®ç’°å¢ƒè¨å®šã«ã‚ˆã‚Šé™¤å¤–ã•れãŸã‚³ãƒ³ãƒ†ãƒ³ãƒ„ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚"/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_PreferencesOutOfSync"> + ã‚ãªãŸã®ç’°å¢ƒè¨å®šãŒã‚µãƒ¼ãƒãƒ¼ã¨åŒæœŸã—ã¦ã„ãªã„ãŸã‚ã€ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã«æŠ€è¡“çš„ãªå•題ãŒç™ºç”Ÿã—ã¦ã„ã¾ã™ã€‚ + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="PreferredMaturityChanged"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†è¨å®šã¯ç¾åœ¨ [RATING] ã§ã™ã€‚ + 今後ã€[RATING] コンテンツ付ãã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã‚’訪å•ã—よã†ã¨ã—ã¦ã„ã‚‹ã¨ã„ã†é€šçŸ¥ã‚’å—ã‘å–りã¾ã›ã‚“。後ã§ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ã®ã€ŒãƒŸãƒ¼ã€ > 「環境è¨å®šã€ > 「一般ã€ã‚’使用ã—ã¦ã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®ç’°å¢ƒè¨å®šã‚’変更ã§ãã¾ã™ã€‚ + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="MaturityChangeError"> + ç¾åœ¨ã€[PREFERRED_MATURITY] コンテンツを表示ã™ã‚‹ã‚ˆã†ã«ç’°å¢ƒè¨å®šã‚’変更ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ã‚ãªãŸã®ç’°å¢ƒè¨å®šã¯ã€[ACTUAL_MATURITY] コンテンツを表示ã™ã‚‹ã‚ˆã†ã«ãƒªã‚»ãƒƒãƒˆã•れã¾ã—ãŸã€‚メニューãƒãƒ¼ã®ã€ŒãƒŸãƒ¼ã€ > 「環境è¨å®šã€ > 「一般ã€ã‚’使用ã—ã¦ã€ã‚‚ã†ä¸€åº¦ç’°å¢ƒè¨å®šã‚’変更ã§ãã¾ã™ã€‚ + <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="LandClaimAccessBlocked"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã«ã‚ˆã‚Šã€ã“ã®åœŸåœ°ã‚’å–å¾—ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 年齢を確èªã™ã‚‹éš›ã®æƒ…å ±ã«ä¸è¶³ãŒã‚ã£ãŸãŸã‚ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ã€‚ - -最新ビューワãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã‚‹ã‹ã‚’ã”確èªãã ã•ã„。ã“ã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã§ã®ã‚¢ã‚¯ã‚»ã‚¹ã«é–¢ã™ã‚‹è©³ç´°ã¯ãƒŠãƒ¬ãƒƒã‚¸ãƒ™ãƒ¼ã‚¹ã‚’ã”覧ãã ã•ã„。 + å–å¾—ã—よã†ã¨ã—ã¦ã„る土地ã«ã¯ç¾åœ¨ã®ç’°å¢ƒè¨å®šã‚’è¶…ãˆã‚‹ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚「ミー〠> 「環境è¨å®šã€ > 「一般ã€ã‚’é¸æŠžã—ã¦ã€ç’°å¢ƒè¨å®šã‚’変更ã§ãã¾ã™ã€‚ <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandClaimAccessBlocked_KB"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã«ã‚ˆã‚Šã€ã“ã®åœŸåœ°ã‚’å–å¾—ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 - -ナレッジベースを開ãレーティング区分ã«ã¤ã„ã¦å¦ã³ã¾ã™ã‹ï¼Ÿ + <notification name="LandClaimAccessBlocked_AdultsOnlyContent"> + ã“ã®åœŸåœ°ã‚’購入ã§ãã‚‹ã®ã¯ã€æˆäººã ã‘ã§ã™ã€‚ <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/ja + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="レーティング区分ã®åˆ¶é™ã®ãŸã‚ã€ã“ã®åœŸåœ°ã‚’å–å¾—ã§ãã¾ã›ã‚“" name="okcancelignore" notext="é–‰ã˜ã‚‹" yestext="ナレッジベースを開ã"/> + <usetemplate ignoretext="ã“ã®åœŸåœ°ã‚’購入ã§ãã‚‹ã®ã¯ã€æˆäººã ã‘ã§ã™ã€‚" name="okcancelignore" notext="é–‰ã˜ã‚‹" yestext="ナレッジベースを開ã"/> </notification> <notification name="LandClaimAccessBlocked_Notify"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã«ã‚ˆã‚Šã€ã“ã®åœŸåœ°ã‚’å–å¾—ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + å–å¾—ã—よã†ã¨ã—ã¦ã„る土地ã«ã¯ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ç¾åœ¨ã®ç’°å¢ƒè¨å®šã¯ [REGIONMATURITY] コンテンツを除外ã™ã‚‹ã‚ˆã†ã«è¨å®šã•れã¦ã„ã¾ã™ã€‚ + </notification> + <notification name="LandClaimAccessBlocked_NotifyAdultsOnly"> + å–å¾—ã—よã†ã¨ã—ã¦ã„る土地ã«ã¯ã€æˆäººã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ </notification> <notification name="LandClaimAccessBlocked_Change"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†è¨å®šã«ã‚ˆã‚Šã€ã“ã®åœŸåœ°ã‚’å–å¾—ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 - -「è¨å®šã‚’変更ã€ã‚’クリックã—ã¦ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã‚’上ã’ã‚‹ã¨ã€å…¥ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ ã‚ãªãŸã¯ä»Šå¾Œ [REGIONMATURITY] ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®æ¤œç´¢åŠã³ã‚¢ã‚¯ã‚»ã‚¹ãŒå¯èƒ½ã¨ãªã‚Šã¾ã™ã€‚ ã‚ã¨ã§è¨å®šã‚’å…ƒã«æˆ»ã—ãŸã„å ´åˆã¯ã€ã€Œç·¨é›†ã€ï¼žã€Œç’°å¢ƒè¨å®šã€ã‚’ã”覧ãã ã•ã„。 - <usetemplate ignoretext="é¸æŠžã—ãŸãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ãŒåŽŸå› ã§ã€åœŸåœ°ã‚’å–å¾—ã§ããªã„ã¨ã" name="okcancelignore" notext="é–‰ã˜ã‚‹" yestext="è¨å®šã®å¤‰æ›´"/> + å–å¾—ã—よã†ã¨ã—ã¦ã„る土地ã«ã¯ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ç¾åœ¨ã®ç’°å¢ƒè¨å®šã¯ [REGIONMATURITY] コンテンツを除外ã™ã‚‹ã‚ˆã†ã«è¨å®šã•れã¦ã„ã¾ã™ã€‚環境è¨å®šã‚’変更ã—ã¦ã€ã‚‚ã†ä¸€åº¦åœŸåœ°ã®å–得を試ã¿ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + <form name="form"> + <button name="OK" text="環境è¨å®šã®å¤‰æ›´"/> + <button name="Cancel" text="å–り消ã—"/> + <ignore name="ignore" text="å–å¾—ã—よã†ã¨ã—ã¦ã„る土地ã«ã¯ç¾åœ¨ã®ç’°å¢ƒè¨å®šã«ã‚ˆã‚Šé™¤å¤–ã•れãŸã‚³ãƒ³ãƒ†ãƒ³ãƒ„ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚"/> + </form> </notification> <notification name="LandBuyAccessBlocked"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã«ã‚ˆã‚Šã€ã“ã®åœŸåœ°ã‚’購入ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 年齢を確èªã™ã‚‹éš›ã®æƒ…å ±ã«ä¸è¶³ãŒã‚ã£ãŸãŸã‚ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ã€‚ - -最新ビューワãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã‚‹ã‹ã‚’ã”確èªãã ã•ã„。ã“ã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã§ã®ã‚¢ã‚¯ã‚»ã‚¹ã«é–¢ã™ã‚‹è©³ç´°ã¯ãƒŠãƒ¬ãƒƒã‚¸ãƒ™ãƒ¼ã‚¹ã‚’ã”覧ãã ã•ã„。 + 購入ã—よã†ã¨ã—ã¦ã„る土地ã«ã¯ç¾åœ¨ã®ç’°å¢ƒè¨å®šã‚’è¶…ãˆã‚‹ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚「ミー〠> 「環境è¨å®šã€ > 「一般ã€ã‚’é¸æŠžã—ã¦ã€ç’°å¢ƒè¨å®šã‚’変更ã§ãã¾ã™ã€‚ <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandBuyAccessBlocked_KB"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã«ã‚ˆã‚Šã€ã“ã®åœŸåœ°ã‚’購入ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 - -ナレッジベースを開ãレーティング区分ã«ã¤ã„ã¦å¦ã³ã¾ã™ã‹ï¼Ÿ + <notification name="LandBuyAccessBlocked_AdultsOnlyContent"> + ã“ã®åœŸåœ°ã‚’å–å¾—ã§ãã‚‹ã®ã¯ã€æˆäººã ã‘ã§ã™ã€‚ <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/ja + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="レーティング区分ã®åˆ¶é™ã®ãŸã‚ã€ã“ã®åœŸåœ°ã‚’購入ã§ãã¾ã›ã‚“" name="okcancelignore" notext="é–‰ã˜ã‚‹" yestext="ナレッジベースを開ã"/> + <usetemplate ignoretext="ã“ã®åœŸåœ°ã‚’å–å¾—ã§ãã‚‹ã®ã¯ã€æˆäººã ã‘ã§ã™ã€‚" name="okcancelignore" notext="é–‰ã˜ã‚‹" yestext="ナレッジベースを開ã"/> </notification> <notification name="LandBuyAccessBlocked_Notify"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã«ã‚ˆã‚Šã€ã“ã®åœŸåœ°ã‚’購入ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + 購入ã—よã†ã¨ã—ã¦ã„る土地ã«ã¯ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ç¾åœ¨ã®ç’°å¢ƒè¨å®šã¯ [REGIONMATURITY] コンテンツを除外ã™ã‚‹ã‚ˆã†ã«è¨å®šã•れã¦ã„ã¾ã™ã€‚ + </notification> + <notification name="LandBuyAccessBlocked_NotifyAdultsOnly"> + 購入ã—よã†ã¨ã—ã¦ã„る土地ã«ã¯ã€æˆäººã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ </notification> <notification name="LandBuyAccessBlocked_Change"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†è¨å®šã«ã‚ˆã‚Šã€ã“ã®åœŸåœ°ã‚’購入ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 - -「è¨å®šã‚’変更ã€ã‚’クリックã—ã¦ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã‚’上ã’ã‚‹ã¨ã€å…¥ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ ã‚ãªãŸã¯ä»Šå¾Œ [REGIONMATURITY] ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®æ¤œç´¢åŠã³ã‚¢ã‚¯ã‚»ã‚¹ãŒå¯èƒ½ã¨ãªã‚Šã¾ã™ã€‚ ã‚ã¨ã§è¨å®šã‚’å…ƒã«æˆ»ã—ãŸã„å ´åˆã¯ã€ã€Œç·¨é›†ã€ï¼žã€Œç’°å¢ƒè¨å®šã€ã‚’ã”覧ãã ã•ã„。 - <usetemplate ignoretext="é¸æŠžã—ãŸãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ãŒåŽŸå› ã§ã€åœŸåœ°ã‚’購入ã§ããªã„ã¨ã" name="okcancelignore" notext="é–‰ã˜ã‚‹" yestext="è¨å®šã®å¤‰æ›´"/> + 購入ã—よã†ã¨ã—ã¦ã„る土地ã«ã¯ [REGIONMATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ç¾åœ¨ã®ç’°å¢ƒè¨å®šã¯ [REGIONMATURITY] コンテンツを除外ã™ã‚‹ã‚ˆã†ã«è¨å®šã•れã¦ã„ã¾ã™ã€‚環境è¨å®šã‚’変更ã—ã¦ã€ã‚‚ã†ä¸€åº¦åœŸåœ°ã®è³¼å…¥ã‚’試ã¿ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + <form name="form"> + <button name="OK" text="環境è¨å®šã®å¤‰æ›´"/> + <button name="Cancel" text="å–り消ã—"/> + <ignore name="ignore" text="購入ã—よã†ã¨ã—ã¦ã„る土地ã«ã¯ç¾åœ¨ã®ç’°å¢ƒè¨å®šã«ã‚ˆã‚Šé™¤å¤–ã•れãŸã‚³ãƒ³ãƒ†ãƒ³ãƒ„ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚"/> + </form> </notification> <notification name="TooManyPrimsSelected"> é¸æŠžã—ãŸãƒ—リムãŒå¤šã™ãŽã¾ã™ã€‚ [MAX_PRIM_COUNT] å€‹é¸æŠžã™ã‚‹ã‹ã€ãƒ—リム数を減らã—ã¦ã‚‚ã†ä¸€åº¦ãŠè©¦ã—ãã ã•ã„。 @@ -1867,10 +1960,9 @@ L$ [AMOUNT] ã§ã€ã“ã®ã‚¯ãƒ©ã‚·ãƒ•ァイド広告を今ã™ã公開ã—ã¾ã™ã </form> </notification> <notification label="地域ã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†æŒ‡å®šå¤‰æ›´æ¸ˆã¿" name="RegionMaturityChange"> - ã“ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆåœ°åŸŸï¼‰ã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ãŒã‚¢ãƒƒãƒ—デートã•れã¾ã—ãŸã€‚ -地図ã«å¤‰æ›´ãŒåæ˜ ã•れるã¾ã§æ•°åˆ†ã‹ã‹ã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ - -Adult 専用リージョンã«å…¥ã‚‹ã«ã¯ã€ä½äººã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆãŒå¹´é½¢ç¢ºèªã‹æ”¯æ‰•方法ã®ã„ãšã‚Œã‹ã§ã€Œç¢ºèªæ¸ˆã¿ã€ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + ã“ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ãŒå¤‰æ›´ã•れã¾ã—ãŸã€‚ +地図ã«ã“ã®å¤‰æ›´ãŒåæ˜ ã™ã‚‹ã«ã¯æ•°åˆ†ã‹ã‹ã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ + <usetemplate name="okbutton" yestext="OK"/> </notification> <notification label="ボイスãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ä¸ä¸€è‡´" name="VoiceVersionMismatch"> [APP_NAME] ã®ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ã“ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«ãŠã‘るボイスãƒãƒ£ãƒƒãƒˆã®äº’æ›æ€§ãŒã‚りã¾ã›ã‚“。 ボイスãƒãƒ£ãƒƒãƒˆã‚’æ£å¸¸ã«è¡Œã†ãŸã‚ã«ã¯ã€[APP_NAME] ã®ã‚¢ãƒƒãƒ—デートãŒå¿…è¦ã§ã™ã€‚ @@ -2165,14 +2257,11 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã <usetemplate ignoretext="「容姿ã€ã‚’編集ä¸ã«ã€ä½œæˆã™ã‚‹è¡£é¡žã‚’装ç€ã™ã‚‹ã¨ã" name="okcancelignore" notext="ã„ã„ãˆ" yestext="ã¯ã„"/> </notification> <notification name="NotAgeVerified"> - Second Life ã§ Adult 指定ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã‚„é ˜åŸŸã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ã®ã¯ 18 æ³ä»¥ä¸Šã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã¿ã§ã™ã€‚年齢確èªãƒšãƒ¼ã‚¸ã§ 18 æ³ä»¥ä¸Šã§ã‚ã‚‹ã“ã¨ã‚’証明ã—ã¦ãã ã•ã„。 -ã“れをクリックã™ã‚‹ã¨ã‚¦ã‚§ãƒ–ブラウザãŒé–‹ãã¾ã™ã€‚ - -[_URL] - <url name="url" option="0"> - https://secondlife.com/my/account/verification.php - </url> - <usetemplate ignoretext="å¹´é½¢ã®ç¢ºèªã‚’済ã¾ã›ã¦ã„ãªã„ã¨ã" name="okcancelignore" notext="å–り消ã—" yestext="年齢確èªãƒšãƒ¼ã‚¸ã‚’é–‹ã"/> + 訪å•ã—よã†ã¨ã—ã¦ã„ã‚‹ãƒã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã¯ã€18 æ‰ä»¥ä¸Šã®ä½äººã«åˆ¶é™ã•れã¦ã„ã¾ã™ã€‚ + <usetemplate ignoretext="年齢制é™ä»˜ãã®ã‚¨ãƒªã‚¢ã‚’訪å•ã™ã‚‹å¹´é½¢ã«é”ã—ã¦ã„ã¾ã›ã‚“。" name="okignore" yestext="OK"/> + </notification> + <notification name="NotAgeVerified_Notify"> + ãƒã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã¯ 18 æ‰ä»¥ä¸Šã«åˆ¶é™ã•れã¦ã„ã¾ã™ã€‚ </notification> <notification name="Cannot enter parcel: no payment info on file"> æ”¯æ‰•æƒ…å ±ãŒç™»éŒ²ã•れã¦ã„ãªã„ã¨ã“ã®ã‚¨ãƒªã‚¢ã‚’訪れるã“ã¨ãŒã§ãã¾ã›ã‚“。 [SECOND_LIFE] サイトã§ç™»éŒ²ã‚’行ã„ã¾ã™ã‹ï¼Ÿ @@ -2435,6 +2524,23 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã <notification name="NoBuild"> ã“ã®ã‚¨ãƒªã‚¢ã§ã¯åˆ¶ä½œãŒç¦æ¢ã•れã¦ã„ã¾ã™ã€‚ オブジェクトを制作ã—ãŸã‚Š Rez ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 </notification> + <notification name="PathfindingDirty"> + ã“ã®å€¤åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã«ã¯ã€ä¿ç•™ä¸ã®ãƒ‘スファインディングã®å¤‰æ›´ãŒã‚りã¾ã™ã€‚制作権ãŒã‚ã‚‹å ´åˆã¯ã€ã€Œåœ°åŸŸã®å†æ§‹ç¯‰ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ã€åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã‚’冿§‹ç¯‰ã§ãã¾ã™ã€‚ + </notification> + <notification name="DynamicPathfindingDisabled"> + ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã§ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ãƒ‘ã‚¹ãƒ•ã‚¡ã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãŒæœ‰åйã«ãªã£ã¦ã„ã¾ã›ã‚“。パスファインディング LSL 呼ã³å‡ºã—を使用ã™ã‚‹ã‚¹ã‚¯ãƒªãƒ—ト化ã•れãŸã‚ªãƒ–ジェクトãŒã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã§ã¯å‹•作ã§ãã¾ã›ã‚“。 + </notification> + <notification name="PathfindingRebakeNavmesh"> + ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã®ã‚ªãƒ–ジェクトを変更ã™ã‚‹ã¨ã€ä»–ã®ç§»å‹•ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ£ã—ã動作ã—ãªããªã‚‹æã‚ŒãŒã‚りã¾ã™ã€‚移動オブジェクトをæ£ã—ã動作ã•ã›ã‚‹ã«ã¯ã€ã€Œåœ°åŸŸã®å†æ§‹ç¯‰ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚詳ã—ã„æƒ…å ±ã¯è¦‹ã‚‹ã«ã¯ã€Œãƒ˜ãƒ«ãƒ—ã€ã‚’é¸æŠžã—ã¦ãã ã•ã„。 + <url name="url"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </url> + <usetemplate helptext="ヘルプ" ignoretext="ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã®ã‚ªãƒ–ジェクトを変更ã™ã‚‹ã¨ã€ä»–ã®ç§»å‹•ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ£ã—ã動作ã—ãªããªã‚‹æã‚ŒãŒã‚りã¾ã™ã€‚" name="okhelpignore" yestext="OK"/> + </notification> + <notification name="PathfindingCannotRebakeNavmesh"> + エラーãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ã«å•題ãŒã‚ã‚‹ã‹ã€åˆ¶ä½œæ¨©ãŒãªã„å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ã“ã®å•題ã¯ã€ä¸€åº¦ãƒã‚°ã‚¢ã‚¦ãƒˆã—ã¦ã‹ã‚‰ã€ãƒã‚°ã‚¤ãƒ³ã—ç›´ã™ã¨è§£æ±ºã•ã‚Œã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="SeeAvatars"> ã“ã®åŒºç”»ã«ã„ã‚‹ã‚¢ãƒã‚¿ãƒ¼ã‚„ã“ã®åŒºç”»å†…ã§è¡Œã‚れる文å—ãƒãƒ£ãƒƒãƒˆã¯ã€ä»–ã®åŒºç”»ã‹ã‚‰è¦‹ãˆã¾ã›ã‚“。ã‚ãªãŸã«ã¯ã€ã“ã®åŒºç”»å¤–ã«ã„ã‚‹ä½äººãŒè¦‹ãˆãšã€å¤–ã®ä½äººã«ã¯ã‚ãªãŸã®å§¿ãŒè¦‹ãˆã¾ã›ã‚“。ãƒãƒ£ãƒ³ãƒãƒ« 0 ã§ã®é€šå¸¸ã®æ–‡å—ãƒãƒ£ãƒƒãƒˆã‚‚ブãƒãƒƒã‚¯ã•れã¾ã™ã€‚ </notification> @@ -2453,9 +2559,7 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã ãã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«ã„ãªã„ã¨å…¬å…±ã®åœŸåœ°ã‚’å–å¾—ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 </notification> <notification name="RegionTPAccessBlocked"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã«ã‚ˆã‚Šãã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã¸ã¯å…¥ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 年齢確èªã‚’行ã†ã‹ã€æœ€æ–°ãƒ“ューワをインストールã—ã¦ãã ã•ã„。 - -ç¾åœ¨ã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã§ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ãªã‚¨ãƒªã‚¢ã«é–¢ã™ã‚‹è©³ç´°ã¯ãƒŠãƒ¬ãƒƒã‚¸ãƒ™ãƒ¼ã‚¹ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + 訪å•ã—よã†ã¨ã—ã¦ã„る地域(リージョン)ã«ã¯ç¾åœ¨ã®ç’°å¢ƒè¨å®šã‚’è¶…ãˆã‚‹ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚「ミー〠> 「環境è¨å®šã€ > 「一般ã€ã‚’é¸æŠžã—ã¦ã€ç’°å¢ƒè¨å®šã‚’変更ã§ãã¾ã™ã€‚ </notification> <notification name="URBannedFromRegion"> ã‚ãªãŸã¯ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã¸ã®ç«‹å…¥ãŒç¦æ¢ã•れã¦ã„ã¾ã™ã€‚ @@ -2466,11 +2570,11 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã <notification name="ImproperPaymentStatus"> ã“ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«å…¥ã‚‹ãŸã‚ã«é©ã—ãŸæ”¯æ‰•ã„ステータスãŒã‚りã¾ã›ã‚“。 </notification> - <notification name="MustGetAgeRgion"> - ã“ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«å…¥ã‚‹ãŸã‚ã«ã¯ã€å¹´é½¢ç¢ºèªã‚’済ã¾ã›ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + <notification name="MustGetAgeRegion"> + ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã«å…¥ã‚‹ã«ã¯ 18 æ‰ä»¥ä¸Šã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ </notification> <notification name="MustGetAgeParcel"> - ã“ã®åŒºç”»ã«å…¥ã‚‹ãŸã‚ã«ã¯ã€å¹´é½¢ç¢ºèªã‚’済ã¾ã›ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + ã“ã®åŒºç”»ã«å…¥ã‚‹ã«ã¯ 18 æ‰ä»¥ä¸Šã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ </notification> <notification name="NoDestRegion"> 目的地ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚ @@ -2572,12 +2676,33 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã <notification name="TeleportOffered"> [NAME_SLURL] ã¯ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã§ã‚ãªãŸã‚’呼んã§ã„ã¾ã™ã€‚ -[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] <form name="form"> <button name="Teleport" text="テレãƒãƒ¼ãƒˆ"/> <button name="Cancel" text="å–り消ã—"/> </form> </notification> + <notification name="TeleportOffered_MaturityExceeded"> + [NAME_SLURL] ã¯ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã§ã‚ãªãŸã‚’呼んã§ã„ã¾ã™ã€‚ + +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã«ã¯ [REGION_CONTENT_MATURITY] コンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ç¾åœ¨ã®ç’°å¢ƒè¨å®šã¯ [REGION_CONTENT_MATURITY] コンテンツを除外ã™ã‚‹ã‚ˆã†ã«è¨å®šã•れã¦ã„ã¾ã™ã€‚環境è¨å®šã‚’変更ã—ã¦ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã‚’ç¶šã‘ã‚‹ã‹ã€ã“ã®ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã‚’å–り消ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + <form name="form"> + <button name="Teleport" text="変更ã—ã¦ç¶šã‘ã‚‹"/> + <button name="Cancel" text="å–り消ã—"/> + </form> + </notification> + <notification name="TeleportOffered_MaturityBlocked"> + [NAME_SLURL] ã¯ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã§ã‚ãªãŸã‚’呼んã§ã„ã¾ã™ã€‚ + +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +ãŸã ã—ã€ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã«ã¯æˆäººã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã§ãるコンテンツãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + </notification> <notification name="TeleportOfferSent"> [TO_NAME] ã«ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã‚’é€ã‚Šã¾ã—ãŸã€‚ </notification> @@ -2900,18 +3025,6 @@ M ã‚ーを押ã—ã¦å¤‰æ›´ã—ã¾ã™ã€‚ [RESIDENTS] <usetemplate name="okcancelbuttons" notext="å–り消ã—" yestext="Ok"/> </notification> - <notification name="ShareFolderConfirmation"> - フォルダã¯ä¸€åº¦ã« 1 ã¤ã—ã‹å…±æœ‰ã§ãã¾ã›ã‚“。 - -次ã®ã‚¢ã‚¤ãƒ†ãƒ を共有ã—ã¾ã™ã‹ï¼Ÿ - -<nolink>[ITEMS]</nolink> - -次ã®ä½äººã¨å…±æœ‰ï¼š - -[RESIDENTS] - <usetemplate name="okcancelbuttons" notext="å–り消ã—" yestext="Ok"/> - </notification> <notification name="ItemsShared"> アイテムãŒå…±æœ‰ã•れã¾ã—ãŸã€‚ </notification> @@ -2990,6 +3103,10 @@ M ã‚ーを押ã—ã¦å¤‰æ›´ã—ã¾ã™ã€‚ ( 作æˆå¾Œ[EXISTENCE]秒経éŽï¼‰ '[BODYREGION]'ã®[RESOLUTION]ã®ãƒ™ãƒ¼ã‚¯ãƒ‰ãƒ†ã‚¯ã‚¹ãƒãƒ£ã¯[TIME]秒後ã«ãƒãƒ¼ã‚«ãƒ«ã«æ›´æ–°ã•れã¾ã—ãŸã€‚ </notification> + <notification name="LivePreviewUnavailable"> + コピーä¸å¯ãŠã‚ˆã³/ã¾ãŸã¯è»¢é€ä¸å¯ã®ãŸã‚ã€ã“ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’表示ã§ãã¾ã›ã‚“。 + <usetemplate ignoretext="コピーä¸å¯ãŠã‚ˆã³/ã¾ãŸã¯è»¢é€ä¸å¯ãƒ†ã‚¯ã‚¹ãƒãƒ£ã§ãƒ©ã‚¤ãƒ–プレビューモードを使用ã§ããªã„ã“ã¨ã‚’è¦å‘Šã™ã‚‹" name="okignore" yestext="OK"/> + </notification> <notification name="ConfirmLeaveCall"> ã“ã®ã‚³ãƒ¼ãƒ«ã‹ã‚‰æŠœã‘ã¾ã™ã‹ï¼Ÿ <usetemplate ignoretext="コールã‹ã‚‰æŠœã‘ã‚‹å‰ã®ç¢ºèª" name="okcancelignore" notext="ã„ã„ãˆ" yestext="ã¯ã„"/> @@ -3161,6 +3278,62 @@ M ã‚ーを押ã—ã¦å¤‰æ›´ã—ã¾ã™ã€‚ ã“ã®æ“作ã«ã‚ˆã‚Šã€å…¨ã¦ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ã¨ãƒœã‚¿ãƒ³ãŒéžè¡¨ç¤ºã«ãªã‚Šã¾ã™ã€‚å†ã³è¡¨ç¤ºã™ã‚‹ã«ã¯ [SHORTCUT] ã‚’ã‚‚ã†ä¸€åº¦ã‚¯ãƒªãƒƒã‚¯ã—ã¦ãã ã•ã„。 <usetemplate ignoretext="UI ã‚’éžè¡¨ç¤ºã«ã™ã‚‹å‰ã«ç¢ºèª" name="okcancelignore" notext="å–り消ã—" yestext="OK"/> </notification> + <notification name="PathfindingLinksets_WarnOnPhantom"> + é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ãƒ•ァントムフラグãŒåˆ‡ã‚Šæ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ + +ç¶šã‘ã¾ã™ã‹ï¼Ÿ + <usetemplate ignoretext="é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã®ãƒ•ァントムフラグãŒåˆ‡ã‚Šæ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚" name="okcancelignore" notext="å–り消ã—" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted"> + 一部ã®é¸æŠžã•れãŸãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ã€ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¸ã®æ¨©é™ãŒåˆ¶é™ã•れã¦ã„ã‚‹ãŸã‚ã€'[REQUESTED_TYPE]' ã«è¨å®šã§ãã¾ã›ã‚“。ã“れらã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ä»£ã‚り㫠'[RESTRICTED_TYPE]' ã«è¨å®šã•れã¾ã™ã€‚ + +ç¶šã‘ã¾ã™ã‹ï¼Ÿ + <usetemplate ignoretext="一部ã®é¸æŠžã•れãŸãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ã€ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¸ã®æ¨©é™ãŒåˆ¶é™ã•れã¦ã„ã‚‹ãŸã‚è¨å®šã§ãã¾ã›ã‚“。" name="okcancelignore" notext="å–り消ã—" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnVolume"> + é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ã€å½¢çжãŒå‡¸çжã§ãªã„ãŸã‚ã€'[REQUESTED_TYPE]' ã«è¨å®šã§ãã¾ã›ã‚“。 + +ç¶šã‘ã¾ã™ã‹ï¼Ÿ + <usetemplate ignoretext="é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ã€å½¢çжãŒå‡¸çжã§ãªã„ãŸã‚è¨å®šã§ãã¾ã›ã‚“。" name="okcancelignore" notext="å–り消ã—" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted"> + é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ãƒ•ァントムフラグãŒåˆ‡ã‚Šæ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ + +一部ã®é¸æŠžã•れãŸãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ã€ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¸ã®æ¨©é™ãŒåˆ¶é™ã•れã¦ã„ã‚‹ãŸã‚ã€'[REQUESTED_TYPE]' ã«è¨å®šã§ãã¾ã›ã‚“。ã“れらã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ä»£ã‚り㫠'[RESTRICTED_TYPE]' ã«è¨å®šã•れã¾ã™ã€‚ + +ç¶šã‘ã¾ã™ã‹ï¼Ÿ + <usetemplate ignoretext="é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã®ãƒ•ァントムフラグãŒåˆ‡ã‚Šæ›¿ãˆã‚‰ã‚Œã€ä»–ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¸ã®æ¨©é™ãŒåˆ¶é™ã•れã¦ã„ã‚‹ãŸã‚è¨å®šã§ãã¾ã›ã‚“。" name="okcancelignore" notext="å–り消ã—" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnVolume"> + é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ãƒ•ァントムフラグãŒåˆ‡ã‚Šæ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ + +é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ã€å½¢çжãŒå‡¸çжã§ãªã„ãŸã‚ã€'[REQUESTED_TYPE]' ã«è¨å®šã§ãã¾ã›ã‚“。 + +ç¶šã‘ã¾ã™ã‹ï¼Ÿ + <usetemplate ignoretext="é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã®ãƒ•ァントムフラグãŒåˆ‡ã‚Šæ›¿ãˆã‚‰ã‚Œã€ä»–ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯å½¢çжãŒå‡¸çжã§ãªã„ãŸã‚è¨å®šã§ãã¾ã›ã‚“。" name="okcancelignore" notext="å–り消ã—" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted_MismatchOnVolume"> + 一部ã®é¸æŠžã•れãŸãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ã€ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¸ã®æ¨©é™ãŒåˆ¶é™ã•れã¦ã„ã‚‹ãŸã‚ã€'[REQUESTED_TYPE]' ã«è¨å®šã§ãã¾ã›ã‚“。ã“れらã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ä»£ã‚り㫠'[RESTRICTED_TYPE]' ã«è¨å®šã•れã¾ã™ã€‚ + +é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ã€å½¢çжãŒå‡¸çжã§ãªã„ãŸã‚ã€'[REQUESTED_TYPE]' ã«è¨å®šã§ãã¾ã›ã‚“。ã“れらã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã®ç”¨é€”タイプã¯å¤‰ã‚りã¾ã›ã‚“。 + +ç¶šã‘ã¾ã™ã‹ï¼Ÿ + <usetemplate ignoretext="一部ã®é¸æŠžã•れãŸãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ã€ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¸ã®æ¨©é™ãŒåˆ¶é™ã•れã¦ãŠã‚Šã€ã¾ãŸå½¢çжãŒå‡¸çжã§ãªã„ãŸã‚è¨å®šã§ãã¾ã›ã‚“。" name="okcancelignore" notext="å–り消ã—" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted_MismatchOnVolume"> + é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ãƒ•ァントムフラグãŒåˆ‡ã‚Šæ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ + +一部ã®é¸æŠžã•れãŸãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ã€ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¸ã®æ¨©é™ãŒåˆ¶é™ã•れã¦ã„ã‚‹ãŸã‚ã€'[REQUESTED_TYPE]' ã«è¨å®šã§ãã¾ã›ã‚“。ã“れらã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ä»£ã‚り㫠'[RESTRICTED_TYPE]' ã«è¨å®šã•れã¾ã™ã€‚ + +é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ã€å½¢çжãŒå‡¸çжã§ãªã„ãŸã‚ã€'[REQUESTED_TYPE]' ã«è¨å®šã§ãã¾ã›ã‚“。ã“れらã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã®ç”¨é€”タイプã¯å¤‰ã‚りã¾ã›ã‚“。 + +ç¶šã‘ã¾ã™ã‹ï¼Ÿ + <usetemplate ignoretext="é¸æŠžã•れãŸä¸€éƒ¨ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã®ãƒ•ァントムフラグãŒåˆ‡ã‚Šæ›¿ãˆã‚‰ã‚Œã€ä»–ã®ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¯ãƒªãƒ³ã‚¯ã‚»ãƒƒãƒˆã¸ã®æ¨©é™ãŒåˆ¶é™ã•れã€ã¾ãŸå½¢çжãŒå‡¸çжã§ãªã„ãŸã‚è¨å®šã§ãã¾ã›ã‚“。" name="okcancelignore" notext="å–り消ã—" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_ChangeToFlexiblePath"> + é¸æŠžã•れãŸã‚ªãƒ–ジェクトã¯ãƒŠãƒ“メッシュã«å½±éŸ¿ã‚’与ãˆã¾ã™ã€‚オブジェクトをフレã‚シブルパスã«å¤‰æ›´ã™ã‚‹ã¨ã€ãƒŠãƒ“メッシュã‹ã‚‰å‰Šé™¤ã•れã¾ã™ã€‚ + <usetemplate ignoretext="é¸æŠžã•れãŸã‚ªãƒ–ジェクトã¯ãƒŠãƒ“メッシュã«å½±éŸ¿ã‚’与ãˆã¾ã™ã€‚オブジェクトをフレã‚シブルパスã«å¤‰æ›´ã™ã‚‹ã¨ã€ãƒŠãƒ“メッシュã‹ã‚‰å‰Šé™¤ã•れã¾ã™ã€‚" name="okcancelignore" notext="å–り消ã—" yestext="OK"/> + </notification> <global name="UnsupportedGLRequirements"> [APP_NAME] ã«å¿…è¦ãªãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ãŒãªã„よã†ã§ã™ã€‚ [APP_NAME] ã«ã¯ãƒžãƒ«ãƒãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ OpenGL グラフィックカードãŒå¿…è¦ã§ã™ã€‚ ãŠä½¿ã„ã®ã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚«ãƒ¼ãƒ‰ã®æœ€æ–°ãƒ‰ãƒ©ã‚¤ãƒãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã‚‹ã‹ã©ã†ã‹ã€ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã®ã‚µãƒ¼ãƒ“スパックã¨ãƒ‘ッãƒãŒå…¥ã£ã¦ã„ã‚‹ã‹ã‚’ã”確èªãã ã•ã„。 @@ -3197,4 +3370,12 @@ M ã‚ーを押ã—ã¦å¤‰æ›´ã—ã¾ã™ã€‚ é–‹ãã“ã¨ãŒã§ããªã„ã€ã¾ãŸã¯ãƒ‡ã‚³ãƒ¼ãƒ‰ã§ããªã„無効ã¾ãŸã¯èªã¿å–りä¸èƒ½ãªç”»åƒãƒ•ァイル [FNAME] ã‚’è¿½åŠ ã—よã†ã¨ã—ã¾ã—ãŸã€‚ ã“ã®è©¦è¡Œã¯ã‚ャンセルã•れã¾ã—ãŸã€‚ </notification> + <notification name="PathfindingReturnMultipleItems"> + [NUM_ITEMS] 個ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’è¿”å´ä¸ã§ã™ã€‚ç¶šã‘ã¾ã™ã‹ï¼Ÿ + <usetemplate ignoretext="複数ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’è¿”ã—ã¾ã™ã‹ï¼Ÿ" name="okcancelignore" notext="ã„ã„ãˆ" yestext="ã¯ã„"/> + </notification> + <notification name="PathfindingDeleteMultipleItems"> + [NUM_ITEMS] 個ã®ã‚¢ã‚¤ãƒ†ãƒ を削除ä¸ã§ã™ã€‚ç¶šã‘ã¾ã™ã‹ï¼Ÿ + <usetemplate ignoretext="複数ã®ã‚¢ã‚¤ãƒ†ãƒ を削除ã—ã¾ã™ã‹ï¼Ÿ" name="okcancelignore" notext="ã„ã„ãˆ" yestext="ã¯ã„"/> + </notification> </notifications> diff --git a/indra/newview/skins/default/xui/ja/panel_bottomtray.xml b/indra/newview/skins/default/xui/ja/panel_bottomtray.xml deleted file mode 100644 index 3529abbf36..0000000000 --- a/indra/newview/skins/default/xui/ja/panel_bottomtray.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="bottom_tray"> - <string name="DragIndicationImageName" value="Accordion_ArrowOpened_Off"/> - <string name="SpeakBtnToolTip" value="マイクã®ã‚ªãƒ³ãƒ»ã‚ªãƒ•"/> - <string name="VoiceControlBtnToolTip" value="ボイスコントãƒãƒ¼ãƒ«ãƒ‘ãƒãƒ«ã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> - <layout_stack name="toolbar_stack"> - <layout_panel name="speak_panel"> - <talk_button name="talk"> - <speak_button label="話ã™" label_selected="話ã™" name="speak_btn"/> - </talk_button> - </layout_panel> - <layout_panel name="gesture_panel"> - <gesture_combo_list label="ジェスãƒãƒ£ãƒ¼" name="Gesture" tool_tip="ジェスãƒãƒ£ãƒ¼ã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> - </layout_panel> - <layout_panel name="movement_panel"> - <bottomtray_button label="移動" name="movement_btn" tool_tip="移動コントãƒãƒ¼ãƒ«ã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> - </layout_panel> - <layout_panel name="cam_panel"> - <bottomtray_button label="視界" name="camera_btn" tool_tip="カメラコントãƒãƒ¼ãƒ«ã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> - </layout_panel> - <layout_panel name="snapshot_panel"> - <bottomtray_button label="" name="snapshots" tool_tip="スナップショットを撮りã¾ã™"/> - </layout_panel> - <layout_panel name="build_btn_panel"> - <bottomtray_button label="制作" name="build_btn" tool_tip="制作ツールã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> - </layout_panel> - <layout_panel name="search_btn_panel"> - <bottomtray_button label="検索" name="search_btn" tool_tip="検索ã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> - </layout_panel> - <layout_panel name="world_map_btn_panel"> - <bottomtray_button label="地図" name="world_map_btn" tool_tip="世界地図ã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> - </layout_panel> - <layout_panel name="mini_map_btn_panel"> - <bottomtray_button label="ミニマップ" name="mini_map_btn" tool_tip="ミニマップã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> - </layout_panel> - <layout_panel name="im_well_panel"> - <chiclet_im_well name="im_well"> - <button name="Unread IM messages" tool_tip="会話"/> - </chiclet_im_well> - </layout_panel> - <layout_panel name="notification_well_panel"> - <chiclet_notification name="notification_well"> - <button name="Unread" tool_tip="通知"/> - </chiclet_notification> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_group_invite.xml b/indra/newview/skins/default/xui/ja/panel_group_invite.xml index a21b340fdd..cc9ebc405b 100644 --- a/indra/newview/skins/default/xui/ja/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/ja/panel_group_invite.xml @@ -9,6 +9,9 @@ <panel.string name="already_in_group"> é¸æŠžã—ãŸä½äººã®ãªã‹ã«ã€æ—¢ã«ã‚°ãƒ«ãƒ¼ãƒ—ã«æ‰€å±žã—ã¦ã„る人ãŒã„ã‚‹ãŸã‚ã€æ‹›å¾…ã‚’é€ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ </panel.string> + <panel.string name="invite_selection_too_large"> + グループã¸ã®æ‹›å¾…ãŒé€ä¿¡ã•れã¦ã„ã¾ã›ã‚“: é¸æŠžã•れãŸä½äººãŒå¤šã™ãŽã¾ã™ã€‚グループã¸ã®æ‹›å¾…ã¯1回ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚ãŸã‚Š100人ã«åˆ¶é™ã•れã¦ã„ã¾ã™ã€‚ + </panel.string> <text bottom_delta="-96" font="SansSerifSmall" height="72" name="help_text"> グループã«ã¯ä¸€åº¦ã«è¤‡æ•°ã®ä½äººã‚’招待ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 「リストã‹ã‚‰ä½äººã‚’é¸æŠžã€ã‚’クリックã—ã¦ãã ã•ã„。 </text> diff --git a/indra/newview/skins/default/xui/ja/panel_login.xml b/indra/newview/skins/default/xui/ja/panel_login.xml index ac1fe455c7..396d9e65b1 100644 --- a/indra/newview/skins/default/xui/ja/panel_login.xml +++ b/indra/newview/skins/default/xui/ja/panel_login.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_login"> - <panel.string name="create_account_url"> - http://jp.secondlife.com/registration/ - </panel.string> <panel.string name="forgot_password_url"> http://secondlife.com/account/request.php?lang=ja </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> + <text name="log_in_text"> + ãƒã‚°ã‚¤ãƒ³ + </text> <text name="username_text"> ユーザーãƒãƒ¼ãƒ : </text> @@ -15,15 +15,8 @@ <text name="password_text"> パスワード: </text> - <check_box label="パスワードを記憶" name="remember_check"/> - <button label="ãƒã‚°ã‚¤ãƒ³" left_pad="30" name="connect_btn" width="60"/> - <text name="mode_selection_text"> - モード: - </text> - <combo_box name="mode_combo" tool_tip="ãƒ¢ãƒ¼ãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚ベーシックモードã§ã¯æŽ¢ç´¢ã‚„ãƒãƒ£ãƒƒãƒˆã‚’ã™ã°ã‚„ãç°¡å˜ã«å®Ÿè¡Œã§ãã€ã‚¢ãƒ‰ãƒãƒ³ã‚¹ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ã‚ˆã‚Šå¤šãã®æ©Ÿèƒ½ãŒåˆ©ç”¨ã§ãã¾ã™ã€‚"> - <combo_box.item label="ベーシック" name="Basic"/> - <combo_box.item label="アドãƒãƒ³ã‚¹" name="Advanced"/> - </combo_box> + </layout_panel> + <layout_panel name="start_location_panel"> <text name="start_location_text"> 開始地点: </text> @@ -33,16 +26,21 @@ <combo_box.item label="<地域åを入力>" name="Typeregionname"/> </combo_box> </layout_panel> - <layout_panel name="links"> - <text name="create_new_account_text"> - ãŠç”³ã—込㿠+ <layout_panel name="links_login_panel"> + <text name="login_help"> + ãƒã‚°ã‚¤ãƒ³ã®æ–¹æ³• </text> <text name="forgot_password_text"> ユーザーåã¾ãŸã¯ãƒ‘スワードをãŠå¿˜ã‚Œã§ã™ã‹ï¼Ÿ </text> - <text name="login_help"> - ãƒã‚°ã‚¤ãƒ³ã®æ–¹æ³• + <button label="ãƒã‚°ã‚¤ãƒ³" left_pad="30" name="connect_btn" width="60"/> + <check_box label="パスワードを記憶" name="remember_check"/> + </layout_panel> + <layout_panel name="links"> + <text name="create_account_text"> + アカウントを作æˆã—ã¦ãã ã•ã„ </text> + <button label="今ã™ãé–‹å§‹" name="create_new_account_btn"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml index 5998206f27..201fb0a376 100644 --- a/indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="chat_bar"> +<panel name="nearby_chat"> <line_editor label="ã“ã“をクリックã—ã¦ãƒãƒ£ãƒƒãƒˆã‚’é–‹å§‹ã—ã¾ã™ã€‚" name="chat_box" tool_tip="Enter ã‚ーを押ã—ã¦ç™ºè¨€ã—ã€Ctrl + Enter ã‚ーã§å«ã³ã¾ã™ã€‚"/> <button name="show_nearby_chat" tool_tip="è¿‘ãã®ãƒãƒ£ãƒƒãƒˆãƒã‚°ã‚’表示・éžè¡¨ç¤º"/> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml b/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml index 75bf28a3c8..b6e344ca48 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml @@ -29,5 +29,7 @@ <check_box label="IM ãƒãƒ£ãƒƒãƒˆ" name="EnableIMChatPopups" tool_tip="ã“ã‚Œã‚’é¸æŠžã™ã‚‹ã¨ã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å—ä¿¡ã—ãŸéš›ã«ãƒãƒƒãƒ—アップãŒè¡¨ç¤ºã•れã¾ã™"/> <spinner label="è¿‘ãã®ãƒãƒ£ãƒƒãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れる長ã•:" name="nearby_toasts_lifetime"/> <spinner label="è¿‘ãã®ãƒãƒ£ãƒƒãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒæ¶ˆãˆã‚‹ã¾ã§ã®é•·ã•:" name="nearby_toasts_fadingtime"/> - <button label="ãƒãƒ£ãƒƒãƒˆã®ç¿»è¨³è¨å®š" name="ok_btn"/> + <button label="ä»–ã®è¨€èªž..." name="ok_btn"/> + <button label="自動置æ›..." name="autoreplace_showgui"/> + <button label="スペルãƒã‚§ãƒƒã‚¯ä¸..." name="spellcheck_showgui"/> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_region_debug.xml b/indra/newview/skins/default/xui/ja/panel_region_debug.xml index f6865c12b1..169da27ce5 100644 --- a/indra/newview/skins/default/xui/ja/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/ja/panel_region_debug.xml @@ -36,5 +36,5 @@ <button label="?" name="top_scripts_help"/> <button label="地域å†èµ·å‹•" name="restart_btn" tool_tip="2分間ã®ã‚«ã‚¦ãƒ³ãƒˆãƒ€ã‚¦ãƒ³å¾Œã€åœ°åŸŸã‚’å†èµ·å‹•ã—ã¾ã™"/> <button label="?" name="restart_help"/> - <button label="å†èµ·å‹•ã‚’é…å»¶" name="cancel_restart_btn" tool_tip="地域ã®å†èµ·å‹•を1時間é…å»¶ã—ã¾ã™"/> + <button label="å†èµ·å‹•ã‚’ã‚ャンセル" name="cancel_restart_btn" tool_tip="リージョンã®å†èµ·å‹•ã‚’ã‚ャンセル"/> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_region_estate.xml b/indra/newview/skins/default/xui/ja/panel_region_estate.xml index 2e58c5a8f1..b5cc6b9765 100644 --- a/indra/newview/skins/default/xui/ja/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/ja/panel_region_estate.xml @@ -19,7 +19,7 @@ 次ã®ä½äººã«ã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ï¼š </text> <check_box label="æ”¯æ‰•æƒ…æƒ…å ±ãŒç™»éŒ²ã•れã¦ã„ã‚‹" name="limit_payment" tool_tip="æ”¯æ‰•æƒ…å ±ãŒç™»éŒ²ã•れã¦ã„ãªã„ã¨ã€ã“ã®ä¸å‹•産ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。詳細ã«ã¤ã„ã¦ã¯ã€[SUPPORT_SITE] ã‚’ã”覧ãã ã•ã„。"/> - <check_box label="年齢確èªãŒæ¸ˆã‚“ã§ã„ã‚‹" name="limit_age_verified" tool_tip="ã“ã®ä¸å‹•産ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€å¹´é½¢ç¢ºèªã‚’済ã¾ã›ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[SUPPORT_SITE] ã‚’ã”覧ãã ã•ã„。"/> + <check_box label="18 æ‰ä»¥ä¸Šã§ã™" name="limit_age_verified" tool_tip="ã“ã®ä¸å‹•産(エステート)ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€18 æ‰ä»¥ä¸Šã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。詳細ã«ã¤ã„ã¦ã¯ã€[SUPPORT_SITE] ã‚’ã”覧ãã ã•ã„。"/> <check_box label="ボイスãƒãƒ£ãƒƒãƒˆã‚’許å¯" name="voice_chat_check"/> <button label="?" name="voice_chat_help"/> <text name="abuse_email_text"> diff --git a/indra/newview/skins/default/xui/ja/panel_region_texture.xml b/indra/newview/skins/default/xui/ja/panel_region_texture.xml deleted file mode 100644 index 9e442ce091..0000000000 --- a/indra/newview/skins/default/xui/ja/panel_region_texture.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="地é¢ãƒ†ã‚¯ã‚¹ãƒãƒ£" name="Textures"> - <text name="region_text_lbl"> - 地域: - </text> - <text name="region_text"> - 未知 - </text> - <text name="detail_texture_text"> - 地形ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£ (512x512ã€24ビット .tgaファイルãŒå¿…è¦ã§ã™ï¼‰ - </text> - <text name="height_text_lbl"> - 1(低) - </text> - <text name="height_text_lbl2"> - 2 - </text> - <text name="height_text_lbl3"> - 3 - </text> - <text name="height_text_lbl4"> - 4(高) - </text> - <text name="height_text_lbl5"> - 地形テクスãƒãƒ£ã®éš†èµ·ç¯„囲 - </text> - <text name="height_text_lbl6"> - 北西 - </text> - <text name="height_text_lbl7"> - åŒ—æ± - </text> - <text name="height_text_lbl8"> - å—西 - </text> - <text name="height_text_lbl9"> - å—æ± - </text> - <spinner label="低" name="height_start_spin_0"/> - <spinner label="低" name="height_start_spin_1"/> - <spinner label="低" name="height_start_spin_2"/> - <spinner label="低" name="height_start_spin_3"/> - <spinner label="高" name="height_range_spin_0"/> - <spinner label="高" name="height_range_spin_1"/> - <spinner label="高" name="height_range_spin_2"/> - <spinner label="高" name="height_range_spin_3"/> - <text name="height_text_lbl10"> - 数値ã¯ä¸Šã®ãƒ†ã‚¯ã‚¹ãƒãƒ£ãŒèª¿å’Œã™ã‚‹ç¯„囲を示ã—ã¾ã™ã€‚ - </text> - <text name="height_text_lbl11"> - 計測å˜ä½ã¯ãƒ¡ãƒ¼ãƒˆãƒ«ã§ã€ã€Œä½Žã€ã®å€¤ã¯ã€1番ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£ã®é«˜ã•ã® -「最大値ã€ã§ã™ã€‚「高ã€ã®å€¤ã¯ã€4番ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£ã®é«˜ã•ã®ã€Œæœ€ä½Žå€¤ã€ã§ã™ã€‚ - </text> - <text name="height_text_lbl12"> - ãã—ã¦ã€Œé«˜ã€ã®å€¤ã¯ãƒ†ã‚¯ã‚¹ãƒãƒ£#4ã®é«˜ã•ã®ä¸‹é™ã¨ãªã‚Šã¾ã™ã€‚ - </text> - <button label="é©ç”¨" name="apply_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_side_tray.xml b/indra/newview/skins/default/xui/ja/panel_side_tray.xml deleted file mode 100644 index 3fd14ece06..0000000000 --- a/indra/newview/skins/default/xui/ja/panel_side_tray.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<!-- Side tray cannot show background because it is always - partially on screen to hold tab buttons. --> -<side_tray name="sidebar"> - <sidetray_tab description="サイドãƒãƒ¼ã‚’表示・éžè¡¨ç¤º" name="sidebar_openclose" tab_title="サイドãƒãƒ¼ã‚’é–‹ã・閉ã˜ã‚‹"/> - <sidetray_tab description="ホーム。" name="sidebar_home" tab_title="ホーム"> - <panel label="ホーム" name="panel_home"/> - </sidetray_tab> - <sidetray_tab description="ã‚ãªãŸã®å…¬é–‹ãƒ—ãƒãƒ•ィールã¨ãƒ”ックを編集ã—ã¦ãã ã•ã„。" name="sidebar_me" tab_title="マイ プãƒãƒ•ィール"> - <panel_container name="panel_container"> - <panel label="ミー" name="panel_me"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="フレンドã€é€£çµ¡å…ˆã€è¿‘ãã®äººã‚’探ã—ã¦ãã ã•ã„。" name="sidebar_people" tab_title="人"> - <panel_container name="panel_container"> - <panel label="ã‚°ãƒ«ãƒ¼ãƒ—æƒ…å ±" name="panel_group_info_sidetray"/> - <panel label="ブãƒãƒƒã‚¯ã•れãŸä½äººã¨ã‚ªãƒ–ジェクト" name="panel_block_list_sidetray"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="行ããŸã„å ´æ‰€ã€è¡Œã£ãŸã“ã¨ã®ã‚ã‚‹å ´æ‰€ã‚’æŽ¢ã—ã¦ãã ã•ã„。" label="å ´æ‰€" name="sidebar_places" tab_title="å ´æ‰€"> - <panel label="å ´æ‰€" name="panel_places"/> - </sidetray_tab> - <sidetray_tab description="ã‚ãªãŸã®æŒã¡ç‰©ã‚’眺ã‚ã¦ãã ã•ã„。" name="sidebar_inventory" tab_title="æŒã¡ç‰©"> - <panel label="æŒã¡ç‰©ã‚’編集" name="sidepanel_inventory"/> - </sidetray_tab> - <sidetray_tab description="ã‚ãªãŸã®å®¹å§¿ã‚„ç¾åœ¨ã®è¦‹ãŸç›®ã‚’変更ã—ã¦ãã ã•ã„。" name="sidebar_appearance" tab_title="容姿"> - <panel label="容姿ã®ç·¨é›†" name="sidepanel_appearance"/> - </sidetray_tab> -</side_tray> diff --git a/indra/newview/skins/default/xui/ja/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/ja/panel_volume_pulldown.xml new file mode 100644 index 0000000000..967dedf061 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_volume_pulldown.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="volumepulldown_floater"> + <slider label="マスター" name="System Volume"/> + <slider label="ボタン" name="UI Volume"/> + <slider label="環境音" name="Wind Volume"/> + <slider label="サウンド" name="SFX Volume"/> + <check_box name="gesture_audio_play_btn" tool_tip="ジェスãƒãƒ£ãƒ¼ã®éŸ³ã‚’有効ã«ã™ã‚‹"/> + <slider label="音楽" name="Music Volume"/> + <check_box name="enable_music" tool_tip="ストリーミング音楽を有効ã«ã™ã‚‹"/> + <slider label="メディア" name="Media Volume"/> + <check_box name="enable_media" tool_tip="ストリーミングメディアを有効ã«ã™ã‚‹"/> + <slider label="ボイス" name="Voice Volume"/> + <check_box name="enable_voice_check" tool_tip="ボイスãƒãƒ£ãƒƒãƒˆã‚’有効ã«ã™ã‚‹"/> +</panel> diff --git a/indra/newview/skins/default/xui/ja/sidepanel_item_info.xml b/indra/newview/skins/default/xui/ja/sidepanel_item_info.xml index 6931e448b3..e70d91d258 100644 --- a/indra/newview/skins/default/xui/ja/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/ja/sidepanel_item_info.xml @@ -1,8 +1,11 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="item properties" title="アイテムã®ãƒ—ãƒãƒ•ィール"> <panel.string name="unknown"> ï¼ˆä¸æ˜Žï¼‰ </panel.string> + <panel.string name="unknown_multiple"> + (䏿˜Ž/複数) + </panel.string> <panel.string name="public"> (公開) </panel.string> diff --git a/indra/newview/skins/default/xui/ja/sidepanel_task_info.xml b/indra/newview/skins/default/xui/ja/sidepanel_task_info.xml index eb2bfa993b..c61c73657f 100644 --- a/indra/newview/skins/default/xui/ja/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/ja/sidepanel_task_info.xml @@ -18,6 +18,12 @@ <panel.string name="text modify info 4"> ã“れらã®ã‚ªãƒ–ジェクトを修æ£ã§ãã¾ã›ã‚“ </panel.string> + <panel.string name="text modify info 5"> + 地域(リージョン)ã®å¢ƒç•Œã‚’è¶Šãˆã¦ã“ã®ã‚ªãƒ–ジェクトを修æ£ã§ãã¾ã›ã‚“ + </panel.string> + <panel.string name="text modify info 6"> + 地域(リージョン)ã®å¢ƒç•Œã‚’è¶Šãˆã¦ã“れらã®ã‚ªãƒ–ジェクトを修æ£ã§ãã¾ã›ã‚“ + </panel.string> <panel.string name="text modify warning"> ã“ã®ã‚ªãƒ–ジェクトã«ã¯ã€ãƒ‘ーツãŒãƒªãƒ³ã‚¯ã•れã¦ã„ã¾ã™ </panel.string> @@ -95,6 +101,9 @@ </combo_box> <spinner label="ä¾¡æ ¼ï¼š L$" name="Edit Cost"/> <check_box label="検索ã«è¡¨ç¤º" name="search_check" tool_tip="ã“ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’æ¤œç´¢çµæžœã«è¡¨ç¤ºã—ã¾ã™"/> + <text name="pathfinding_attributes_label"> + パスファインディング属性: + </text> <text name="B:"> B. </text> diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index f6b3edc57f..50697e5500 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -137,7 +137,7 @@ 終了 </string> <string name="create_account_url"> - http://join.secondlife.com/index.php?lang=ja-JP + http://join.secondlife.com/index.php?lang=ja-JP&sourceid=[sourceid] </string> <string name="LoginFailedViewerNotPermitted"> ãŠä½¿ã„ã®å¤ã„ビューワã§ã¯ Second Life ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã›ã‚“。以下ã®ãƒšãƒ¼ã‚¸ã‹ã‚‰æ–°ã—ã„ビューワをダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã•ã„: @@ -1006,6 +1006,9 @@ support@secondlife.com ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 <string name="script_files"> スクリプト </string> + <string name="dictionary_files"> + 辞書 + </string> <string name="AvatarSetNotAway"> 一時退å¸ä¸è§£é™¤ </string> @@ -1411,6 +1414,12 @@ support@secondlife.com ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 <string name="InvFolder favorite"> ãŠæ°—ã«å…¥ã‚Š </string> + <string name="InvFolder Favorites"> + ãŠæ°—ã«å…¥ã‚Š + </string> + <string name="InvFolder favorites"> + ãŠæ°—ã«å…¥ã‚Š + </string> <string name="InvFolder Current Outfit"> ç€ç”¨ä¸ã®ã‚¢ã‚¦ãƒˆãƒ•ィット </string> @@ -1426,6 +1435,12 @@ support@secondlife.com ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 <string name="InvFolder Meshes"> メッシュ </string> + <string name="InvFolder Received Items"> + å—ã‘å–ã£ãŸå•†å“ + </string> + <string name="InvFolder Merchant Outbox"> + マーãƒãƒ£ãƒ³ãƒˆã®ã‚¢ã‚¦ãƒˆãƒœãƒƒã‚¯ã‚¹ + </string> <string name="InvFolder Friends"> フレンド </string> @@ -3864,6 +3879,12 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã <string name="LocationCtrlSeeAVsTooltip"> ã“ã®åŒºç”»å¤–ã«ã‚¢ãƒã‚¿ãƒ¼ã‚’見ãˆã‚‹ã‚ˆã†ã«ã—ã¦ã€ãƒãƒ£ãƒƒãƒˆã‚‚è¨±å¯ </string> + <string name="LocationCtrlPathfindingDirtyTooltip"> + 地域(リージョン)ãŒå†æ§‹ç¯‰ã•れるã¾ã§ã€ç§»å‹•ã™ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¯æ£ã—ã動作ã—ãªã„å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ + </string> + <string name="LocationCtrlPathfindingDisabledTooltip"> + ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã§ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ãƒ‘ã‚¹ãƒ•ã‚¡ã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãŒæœ‰åйã«ãªã£ã¦ã„ã¾ã›ã‚“。 + </string> <string name="UpdaterWindowTitle"> [APP_NAME] アップデート </string> @@ -5006,6 +5027,21 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã <string name="Normal"> 普通 </string> + <string name="Pathfinding_Wiki_URL"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </string> + <string name="Pathfinding_Object_Attr_None"> + ãªã— + </string> + <string name="Pathfinding_Object_Attr_Permanent"> + ナビメッシュã«å½±éŸ¿ã‚’与ãˆã‚‹ + </string> + <string name="Pathfinding_Object_Attr_Character"> + ã‚ャラクター + </string> + <string name="Pathfinding_Object_Attr_MultiSelect"> + (複数) + </string> <string name="snapshot_quality_very_low"> éžå¸¸ã«ä½Žã„ </string> @@ -5021,4 +5057,10 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã <string name="snapshot_quality_very_high"> éžå¸¸ã«é«˜ã„ </string> + <string name="TeleportMaturityExceeded"> + ä½äººã¯ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã‚’訪å•ã§ãã¾ã›ã‚“。 + </string> + <string name="UserDictionary"> + [User] + </string> </strings> diff --git a/indra/newview/skins/default/xui/ja/teleport_strings.xml b/indra/newview/skins/default/xui/ja/teleport_strings.xml index 64f01f4030..7868c25807 100644 --- a/indra/newview/skins/default/xui/ja/teleport_strings.xml +++ b/indra/newview/skins/default/xui/ja/teleport_strings.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> <teleport_messages> <message_set name="errors"> <message name="invalid_tport"> @@ -47,6 +47,9 @@ <message name="no_inventory_host"> インベントリシステムã¯ç¾åœ¨åˆ©ç”¨ã§ãã¾ã›ã‚“。 </message> + <message name="MustGetAgeRegion"> + ã“ã®åœ°åŸŸï¼ˆãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã«å…¥ã‚‹ã«ã¯ 18 æ‰ä»¥ä¸Šã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + </message> </message_set> <message_set name="progress"> <message name="sending_dest"> @@ -82,5 +85,8 @@ <message name="requesting"> テレãƒãƒ¼ãƒˆã‚’リクエスト... </message> + <message name="pending"> + テレãƒãƒ¼ãƒˆã‚’ä¿ç•™ä¸... + </message> </message_set> </teleport_messages> diff --git a/indra/newview/skins/default/xui/pl/menu_im_well_button.xml b/indra/newview/skins/default/xui/pl/menu_im_well_button.xml deleted file mode 100644 index 207bc2211b..0000000000 --- a/indra/newview/skins/default/xui/pl/menu_im_well_button.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<context_menu name="IM Well Button Context Menu"> - <menu_item_call label="Zamknij wszystkie" name="Close All"/> -</context_menu> diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml index 0194293642..f255b1b8ea 100644 --- a/indra/newview/skins/default/xui/pl/notifications.xml +++ b/indra/newview/skins/default/xui/pl/notifications.xml @@ -1106,7 +1106,6 @@ Możesz normalnie używać [SECOND_LIFE], inni użytkownicy bÄ™dÄ… CiÄ™ widzieli Instalacja [APP_NAME] zakoÅ„czona. Jeżeli używasz [SECOND_LIFE] po raz pierwszy to musisz stworzyć konto żeby móc siÄ™ zalogować. -Czy chcesz przejść na stronÄ™ [http://join.secondlife.com secondlife.com] żeby stworzyć nowe konto? <usetemplate name="okcancelbuttons" notext="Kontynuuj" yestext="Nowe konto..."/> </notification> <notification name="LoginPacketNeverReceived"> diff --git a/indra/newview/skins/default/xui/pl/panel_login.xml b/indra/newview/skins/default/xui/pl/panel_login.xml index dc8e7399af..c87a3d3bd4 100644 --- a/indra/newview/skins/default/xui/pl/panel_login.xml +++ b/indra/newview/skins/default/xui/pl/panel_login.xml @@ -5,6 +5,9 @@ </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> + <text name="log_in_text"> + POÅÄ„CZ + </text> <text name="username_text"> Użytkownik: </text> @@ -12,15 +15,8 @@ <text name="password_text"> HasÅ‚o: </text> - <check_box label="ZapamiÄ™taj hasÅ‚o" name="remember_check"/> - <button label="Połącz" name="connect_btn"/> - <text name="mode_selection_text"> - Tryb życia: - </text> - <combo_box name="mode_combo" tool_tip="Wybierz tryb życia. Wybierz tryb turystyczny dla Å‚atwego zwiedzania i czatowania. Wybierz tryb zaawansowany aby mieć dostÄ™p do wiÄ™kszej iloÅ›ci opcji."> - <combo_box.item label="Turystyczny" name="Basic"/> - <combo_box.item label="Zaawansowany" name="Advanced"/> - </combo_box> + </layout_panel> + <layout_panel name="start_location_panel"> <text name="start_location_text"> Rozpocznij w: </text> @@ -30,16 +26,23 @@ <combo_box.item label="<Wpisz Region>" name="Typeregionname"/> </combo_box> </layout_panel> - <layout_panel name="links"> - <text name="create_new_account_text"> - Utwórz nowe konto + <layout_panel name="links_login_panel"> + <text name="login_help"> + Potrzebujesz pomocy z logowaniem siÄ™? </text> <text name="forgot_password_text"> ZapomniaÅ‚eÅ› swojej nazwy użytkownika lub hasÅ‚a? </text> - <text name="login_help"> - Potrzebujesz pomocy z logowaniem siÄ™? + <button label="Połącz" name="connect_btn"/> + <check_box label="ZapamiÄ™taj hasÅ‚o" name="remember_check"/> + </layout_panel> + <layout_panel name="links"> + <text name="create_account_text"> + CREATE YǾUR ACCǾUNT </text> + <button name="create_new_account_btn" + label="Utwórz nowe konto" + width="120"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/pl/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/pl/panel_nearby_chat_bar.xml index 63cf96b571..4ed3ff669b 100644 --- a/indra/newview/skins/default/xui/pl/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/pl/panel_nearby_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="chat_bar"> +<panel name="nearby_chat"> <string name="min_width"> 192 </string> diff --git a/indra/newview/skins/default/xui/pl/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/pl/panel_volume_pulldown.xml new file mode 100644 index 0000000000..1611900700 --- /dev/null +++ b/indra/newview/skins/default/xui/pl/panel_volume_pulldown.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel name="volumepulldown_floater"> + <slider label="Główny" name="System Volume"/> + <slider label="Przyciski" name="UI Volume"/> + <slider label="Okolica" name="Wind Volume"/> + <slider label="Efekty" name="SFX Volume"/> + <check_box name="gesture_audio_play_btn" tool_tip="Włącz dźwiÄ™ki gestów"/> + <slider label="Muzyka" name="Music Volume"/> + <check_box tool_tip="Włącz muzykÄ™ strumieniowÄ…" name="enable_music"/> + <slider label="Media" name="Media Volume"/> + <check_box tool_tip="Włącz media strumieniowe" name="enable_media"/> + <slider label="GÅ‚os" name="Voice Volume"/> + <check_box tool_tip="Włącz rozmowy gÅ‚osowe" name="enable_voice_check"/> +</panel> diff --git a/indra/newview/skins/default/xui/pt/floater_about.xml b/indra/newview/skins/default/xui/pt/floater_about.xml index e843e56090..299f88b22a 100644 --- a/indra/newview/skins/default/xui/pt/floater_about.xml +++ b/indra/newview/skins/default/xui/pt/floater_about.xml @@ -65,27 +65,26 @@ Versão do servidor de voz: [VOICE_VERSION] </panel> <panel label="Licenças" name="licenses_panel"> <text_editor name="credits_editor"> - 3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion - APR Copyright (C) 2000-2004 The Apache Software Foundation - Collada DOM Copyright 2005 Sony Computer Entertainment Inc. - cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se) + 3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion + APR Copyright (C) 2011 The Apache Software Foundation + Collada DOM Copyright 2006 Sony Computer Entertainment Inc. + cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se) DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc. expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. - FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org). + FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg. GL Copyright (C) 1999-2004 Brian Paul. GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University e David Luebke, Brenden Schubert, University of Virginia. google-perftools Copyright (c) 2005, Google Inc. Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited. jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW) jpeglib Copyright (C) 1991-1998, Thomas G. Lane. - ogg/vorbis Copyright (C) 2001, Xiphophorus - OpenSSL Copyright (C) 1998-2002 The OpenSSL Project. - PCRE Copyright (c) 1997-2008 University of Cambridge + ogg/vorbis Copyright (C) 2002, Xiphophorus + OpenSSL Copyright (C) 1998-2008 The OpenSSL Project. + PCRE Copyright (c) 1997-2012 University of Cambridge SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) xmlrpc-epi Copyright (C) 2000 Epinions, Inc. - zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler. - google-perftools Copyright (c) 2005, Google Inc. + zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler. O Visualizador do Second Life usa Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (e seus Licenciantes). Todos os direitos reservados. Consulte www.havok.com para obter detalhes. 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 cd0fb4c41b..f48280840c 100644 --- a/indra/newview/skins/default/xui/pt/floater_about_land.xml +++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml @@ -465,7 +465,7 @@ MÃdia: Permitir acesso apenas para residentes que: </text> <check_box label="Possuam Dados de pagamento fornecidos [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="Os residentes devem ter seus dados de pagamento cadastrados para acessar este lote. Consulte o [SUPPORT_SITE] para saber mais."/> - <check_box label="Tiveram sua idade verificada [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Os residentes devem ter a idade verificada para acessar este lote. Consulte o [SUPPORT_SITE] para saber mais."/> + <check_box label="Tem 18 anos ou mais [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Os residentes devem ter 18 anos ou mais para acessar este lote. Consulte o [SUPPORT_SITE] para obter mais informações."/> <check_box label="Permitir acesso do grupo: [GROUP]" name="GroupCheck" tool_tip="Definir grupo na aba Geral."/> <check_box label="Vender passes para:" name="PassCheck" tool_tip="Permite acesso temporário a este terreno"/> <combo_box name="pass_combo"> diff --git a/indra/newview/skins/default/xui/pt/floater_animation_preview.xml b/indra/newview/skins/default/xui/pt/floater_animation_preview.xml deleted file mode 100644 index 3ec81612a1..0000000000 --- a/indra/newview/skins/default/xui/pt/floater_animation_preview.xml +++ /dev/null @@ -1,187 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Animation Preview" title=""> - <floater.string name="failed_to_initialize"> - Não foi possÃvel iniciar o movimento - </floater.string> - <floater.string name="anim_too_long"> - O arquivo de animação tem [LENGTH] segundos de duração. - -A duração máxima de animação permitida é de [MAX_LENGTH] segundos. - </floater.string> - <floater.string name="failed_file_read"> - Não foi possÃvel ler o arquivo de animação. - -[STATUS] - </floater.string> - <floater.string name="E_ST_OK"> - OK - </floater.string> - <floater.string name="E_ST_EOF"> - Fim de arquivo prematuro - </floater.string> - <floater.string name="E_ST_NO_CONSTRAINT"> - ImpossÃvel ler definição constraint. - </floater.string> - <floater.string name="E_ST_NO_FILE"> - ImpossÃvel abrir arquivo BVH. - </floater.string> - <floater.string name="E_ST_NO_HIER"> - Invalid HIERARCHY header. - </floater.string> - <floater.string name="E_ST_NO_JOINT"> - RAIZ ou JUNTA não encontrados. - </floater.string> - <floater.string name="E_ST_NO_NAME"> - ImpossÃvel obter nome JOINT. - </floater.string> - <floater.string name="E_ST_NO_OFFSET"> - ImpossÃvel localizar OFFSET. - </floater.string> - <floater.string name="E_ST_NO_CHANNELS"> - ImpossÃvel localizar CHANNELS. - </floater.string> - <floater.string name="E_ST_NO_ROTATION"> - ImpossÃvel obter ordem de rotação. - </floater.string> - <floater.string name="E_ST_NO_AXIS"> - ImpossÃvel obter eixo de rotação. - </floater.string> - <floater.string name="E_ST_NO_MOTION"> - ImpossÃvel localizar MOTION. - </floater.string> - <floater.string name="E_ST_NO_FRAMES"> - ImpossÃvel determinar número de quadros. - </floater.string> - <floater.string name="E_ST_NO_FRAME_TIME"> - ImpossÃvel determinar tempo dos quadros. - </floater.string> - <floater.string name="E_ST_NO_POS"> - ImpossÃvel definir posicionamento. - </floater.string> - <floater.string name="E_ST_NO_ROT"> - ImpossÃvel definir valores da rotação. - </floater.string> - <floater.string name="E_ST_NO_XLT_FILE"> - ImpossÃvel abrir arquivo de tradução. - </floater.string> - <floater.string name="E_ST_NO_XLT_HEADER"> - ImpossÃvel ler cabeçalho de tradução. - </floater.string> - <floater.string name="E_ST_NO_XLT_NAME"> - ImpossÃvel ler nomes traduzidos. - </floater.string> - <floater.string name="E_ST_NO_XLT_IGNORE"> - ImpossÃvel obter valor traduzido a ignorar. - </floater.string> - <floater.string name="E_ST_NO_XLT_RELATIVE"> - ImpossÃvel obter valor traduzido relativo. - </floater.string> - <floater.string name="E_ST_NO_XLT_OUTNAME"> - ImpossÃvel obter valor traduzido. - </floater.string> - <floater.string name="E_ST_NO_XLT_MATRIX"> - ImpossÃvel ler matriz de tradução. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGECHILD"> - ImpossÃvel obter nome mergechild. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGEPARENT"> - ImpossÃvel obter nome mergeparent. - </floater.string> - <floater.string name="E_ST_NO_XLT_PRIORITY"> - ImpossÃvel obter valor prioritário. - </floater.string> - <floater.string name="E_ST_NO_XLT_LOOP"> - ImpossÃvel obter valor do loop. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEIN"> - ImpossÃvel obter valor easeIn. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEOUT"> - ImpossÃvel obter valor easeOut. - </floater.string> - <floater.string name="E_ST_NO_XLT_HAND"> - ImpossÃvel obter valor de morph da mão. - </floater.string> - <floater.string name="E_ST_NO_XLT_EMOTE"> - ImpossÃvel ler nome do emote. - </floater.string> - <floater.string name="E_ST_BAD_ROOT"> - Nome da junta incorreto, use "quadril". - </floater.string> - <text name="name_label"> - Nome: - </text> - <text name="description_label"> - Descrição: - </text> - <spinner label="Prioridade" label_width="72" name="priority" tool_tip="Controla quais animações podem ser interrompidas por esta animação" width="110"/> - <check_box label="Loop" name="loop_check" tool_tip="Executa esta animação sem parar"/> - <spinner label="Dentro(%)" label_width="56" left="65" name="loop_in_point" tool_tip="Define o ponto em que a animação em loop reinicia" width="116"/> - <spinner label="Fora(%)" label_width="40" left="185" name="loop_out_point" tool_tip="Define o ponto em que a animação em loop acaba"/> - <text name="hand_label"> - Pose de Mão - </text> - <combo_box left_delta="100" name="hand_pose_combo" tool_tip="Controla os gestos das mãos durante a animação" width="184"> - <combo_box.item label="Abrir" name="Spread"/> - <combo_box.item label="Relaxado" name="Relaxed"/> - <combo_box.item label="Apontar ambas" name="PointBoth"/> - <combo_box.item label="Punho" name="Fist"/> - <combo_box.item label="E relaxada" name="RelaxedLeft"/> - <combo_box.item label="Apontar E" name="PointLeft"/> - <combo_box.item label="Punho E" name="FistLeft"/> - <combo_box.item label="D relaxada" name="RelaxedRight"/> - <combo_box.item label="Apontar D" name="PointRight"/> - <combo_box.item label="Punho D" name="FistRight"/> - <combo_box.item label="Saudação D" name="SaluteRight"/> - <combo_box.item label="Escrevendo" name="Typing"/> - <combo_box.item label="Paz D" name="PeaceRight"/> - </combo_box> - <text name="emote_label"> - Expressão - </text> - <combo_box left_delta="100" name="emote_combo" tool_tip="Controla as expressões faciais durante a animação" width="184"> - <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"> - <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"/> - <button bottom_delta="-32" name="play_btn" tool_tip="Executar animação"/> - <button name="pause_btn" tool_tip="Pausar a animação"/> - <button label="" name="stop_btn" tool_tip="Interrompe a execução da animação."/> - <text name="bad_animation_text"> - Incapaz de ler o arquivo de animação. - -Nós recomendamos exportar arquivos BVH do -Poser 4. - </text> - <button label="Carregar (L$[AMOUNT])" name="ok_btn"/> - <button label="Cancelar" name="cancel_btn"/> -</floater> diff --git a/indra/newview/skins/default/xui/pt/floater_autoreplace.xml b/indra/newview/skins/default/xui/pt/floater_autoreplace.xml new file mode 100644 index 0000000000..ca813a8540 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/floater_autoreplace.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="autoreplace_floater" title="Configurações da substituição automática"> + <check_box label="Habilitar substituição automática" name="autoreplace_enable" tool_tip="Ao inserir texto de bate-papo, substitua quaisquer palavras-chave inseridas pela substituição correspondente"/> + <button label="Importar lista..." name="autoreplace_import_list" tool_tip="Carrega uma lista exportada anteriormente de um arquivo."/> + <button label="Exportar lista..." name="autoreplace_export_list" tool_tip="Salva um arquivo da lista selecionada para compartilhá-la."/> + <button label="Nova lista..." name="autoreplace_new_list" tool_tip="Cria uma nova lista."/> + <button label="Excluir lista" name="autoreplace_delete_list" tool_tip="Exclui a lista selecionada."/> + <button name="autoreplace_list_up" tool_tip="Aumenta a prioridade desta lista."/> + <button name="autoreplace_list_down" tool_tip="Diminui a prioridade desta lista."/> + <scroll_list name="autoreplace_list_replacements"> + <scroll_list.columns label="Palavra-chave" name="keyword"/> + <scroll_list.columns label="Substituição" name="replacement"/> + </scroll_list> + <button label="Adicionar..." name="autoreplace_add_entry"/> + <button label="Remover" name="autoreplace_delete_entry"/> + <button label="Salvar entrada" name="autoreplace_save_entry" tool_tip="Salva esta entrada."/> + <button label="Salvar alterações" name="autoreplace_save_changes" tool_tip="Salvar todas as alterações."/> + <button label="Cancelar" name="autoreplace_cancel" tool_tip="Descarta todas as alterações."/> +</floater> +<!-- + <text + top_pad="10" + left="10" + height="16" + width="260" + follows="left|top" + halign="center" + mouse_opaque="true" + name="autoreplace_text2"> + Entries + </text> +--> diff --git a/indra/newview/skins/default/xui/pt/floater_chat_bar.xml b/indra/newview/skins/default/xui/pt/floater_chat_bar.xml index 72016c6b40..2eb2c94940 100644 --- a/indra/newview/skins/default/xui/pt/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/pt/floater_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="chat_bar" title="BATE-PAPO LOCAL"> +<floater name="nearby_chat" title="BATE-PAPO LOCAL"> <panel name="bottom_panel"> <line_editor label="Clique aqui para bater papo." name="chat_box" tool_tip="Tecle Enter para falar, Ctrl+Enter para gritar"/> <button name="show_nearby_chat" tool_tip="Mostra/oculta o histórico do bate-papo local"/> diff --git a/indra/newview/skins/default/xui/pt/floater_inventory.xml b/indra/newview/skins/default/xui/pt/floater_inventory.xml deleted file mode 100644 index ae3312eab0..0000000000 --- a/indra/newview/skins/default/xui/pt/floater_inventory.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="MEU INVENTÃRIO"> - <floater.string name="Title"> - MEU INVENTÃRIO - </floater.string> - <floater.string name="TitleFetching"> - MEU INVENTÃRIO (Pegando [ITEM_COUNT] items...) [FILTER] - </floater.string> - <floater.string name="TitleCompleted"> - MEU INVENTÃRIO ([ITEM_COUNT] items) [FILTER] - </floater.string> - <floater.string name="Fetched"> - Obtido - </floater.string> - <panel label="Painel do inventário" name="Inventory Panel"/> -</floater> diff --git a/indra/newview/skins/default/xui/pt/floater_model_preview.xml b/indra/newview/skins/default/xui/pt/floater_model_preview.xml index 8960500831..8194278b16 100644 --- a/indra/newview/skins/default/xui/pt/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/pt/floater_model_preview.xml @@ -92,19 +92,54 @@ <text initial_value="Triângulos" name="triangles" value="Triângulos"/> <text initial_value="Vértices" name="vertices" value="Vértices"/> <text initial_value="Alto" name="high_label" value="Alto"/> + <combo_box name="lod_source_high"> + <item name="Load from file" value="Carregar do arquivo"/> + <item name="Generate" value="Gerar"/> + </combo_box> <button label="Procurar..." name="lod_browse_high"/> + <combo_box name="lod_mode_high"> + <item name="Triangle Limit" value="Limite de triângulos"/> + <item name="Error Threshold" value="Limite de erro"/> + </combo_box> <text initial_value="0" name="high_triangles" value="0"/> <text initial_value="0" name="high_vertices" value="0"/> <text initial_value="Médio" name="medium_label" value="Médio"/> + <combo_box name="lod_source_medium"> + <item name="Load from file" value="Carregar do arquivo"/> + <item name="Generate" value="Gerar"/> + <item name="Use LoD above" value="Usar LoD acima"/> + </combo_box> <button label="Procurar..." name="lod_browse_medium"/> + <combo_box name="lod_mode_medium"> + <item name="Triangle Limit" value="Limite de triângulos"/> + <item name="Error Threshold" value="Limite de erro"/> + </combo_box> <text initial_value="0" name="medium_triangles" value="0"/> <text initial_value="0" name="medium_vertices" value="0"/> <text initial_value="Baixo" name="low_label" value="Baixo"/> + <combo_box name="lod_source_low"> + <item name="Load from file" value="Carregar do arquivo"/> + <item name="Generate" value="Gerar"/> + <item name="Use LoD above" value="Usar LoD acima"/> + </combo_box> <button label="Procurar..." name="lod_browse_low"/> + <combo_box name="lod_mode_low"> + <item name="Triangle Limit" value="Limite de triângulos"/> + <item name="Error Threshold" value="Limite de erro"/> + </combo_box> <text initial_value="0" name="low_triangles" value="0"/> <text initial_value="0" name="low_vertices" value="0"/> <text initial_value="Mais baixo" name="lowest_label" value="Mais baixo"/> + <combo_box name="lod_source_lowest"> + <item name="Load from file" value="Carregar do arquivo"/> + <item name="Generate" value="Gerar"/> + <item name="Use LoD above" value="Usar LoD acima"/> + </combo_box> <button label="Procurar..." name="lod_browse_lowest"/> + <combo_box name="lod_mode_lowest"> + <item name="Triangle Limit" value="Limite de triângulos"/> + <item name="Error Threshold" value="Limite de erro"/> + </combo_box> <text initial_value="0" name="lowest_triangles" value="0"/> <text initial_value="0" name="lowest_vertices" value="0"/> <check_box label="Gerar normais" name="gen_normals"/> diff --git a/indra/newview/skins/default/xui/pt/floater_nearby_chat.xml b/indra/newview/skins/default/xui/pt/floater_nearby_chat.xml deleted file mode 100644 index 653861f7d8..0000000000 --- a/indra/newview/skins/default/xui/pt/floater_nearby_chat.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="nearby_chat" title="Bate-papo local"> - <check_box label="Traduzir bate-papo" name="translate_chat_checkbox"/> -</floater> diff --git a/indra/newview/skins/default/xui/pt/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/pt/floater_pathfinding_characters.xml new file mode 100644 index 0000000000..05784115e7 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/floater_pathfinding_characters.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_characters" title="Personagens do pathfinding"> + <floater.string name="messaging_get_inprogress"> + Procurando por personagens do pathfinding... + </floater.string> + <floater.string name="messaging_get_error"> + Erro detectado ao procurar por personagens do pathfinding. + </floater.string> + <floater.string name="messaging_complete_none_found"> + Nenhum personagem do pathfinding. + </floater.string> + <floater.string name="messaging_complete_available"> + [NUM_SELECTED] personagens selecionados de [NUM_TOTAL]. + </floater.string> + <floater.string name="messaging_not_enabled"> + Esta região não está habilitada para pathfinding. + </floater.string> + <floater.string name="character_cpu_time"> + [CPU_TIME] µs + </floater.string> + <floater.string name="character_owner_loading"> + [Carregando] + </floater.string> + <floater.string name="character_owner_unknown"> + [Desconhecido] + </floater.string> + <floater.string name="character_owner_group"> + [grupo] + </floater.string> + <panel> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Nome" name="name"/> + <scroll_list.columns label="Descrição" name="description"/> + <scroll_list.columns label="Proprietário" name="owner"/> + <scroll_list.columns label="CPU" name="cpu_time"/> + <scroll_list.columns label="Altitude" name="altitude"/> + </scroll_list> + <text name="messaging_status"> + Personagens: + </text> + <button label="Atualizar lista" name="refresh_objects_list"/> + <button label="Selecionar tudo" name="select_all_objects"/> + <button label="Selecionar nenhum" name="select_none_objects"/> + </panel> + <panel> + <text name="actions_label"> + Ações nos personagens selecionados: + </text> + <check_box label="Exibir baliza" name="show_beacon"/> + <check_box label="Exibir cápsula da fÃsica" name="show_physics_capsule"/> + <button label="Pegar" name="take_objects"/> + <button label="Pegar uma cópia" name="take_copy_objects"/> + <button label="Teletransportar-me até ele" name="teleport_me_to_object" tool_tip="Habilitado apenas quando um personagem é selecionado."/> + <button label="Devolver" name="return_objects"/> + <button label="Excluir" name="delete_objects"/> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/pt/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/pt/floater_pathfinding_console.xml new file mode 100644 index 0000000000..182f2513e0 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/floater_pathfinding_console.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_console" title="Visualização/teste do pathfinding"> + <floater.string name="navmesh_viewer_status_library_not_implemented"> + ImpossÃvel encontrar a implementação de biblioteca de pathing. + </floater.string> + <floater.string name="navmesh_viewer_status_region_not_enabled"> + Esta região não está habilitada para pathfinding. + </floater.string> + <floater.string name="navmesh_viewer_status_region_loading"> + Aguardando a conclusão do carregamento da região. + </floater.string> + <floater.string name="navmesh_viewer_status_checking_version"> + Verificando o status do navmesh. + </floater.string> + <floater.string name="navmesh_viewer_status_downloading"> + Baixando o navmesh. + </floater.string> + <floater.string name="navmesh_viewer_status_updating"> + O navmesh foi alterado no servidor. Baixando o navmesh mais recente. + </floater.string> + <floater.string name="navmesh_viewer_status_has_navmesh"> + O navmesh mais recente foi baixado. + </floater.string> + <floater.string name="navmesh_viewer_status_error"> + ImpossÃvel baixar o navmesh com êxito. + </floater.string> + <floater.string name="navmesh_simulator_status_pending"> + O navmesh tem alterações pendentes. + </floater.string> + <floater.string name="navmesh_simulator_status_building"> + O navmesh está compilando. + </floater.string> + <floater.string name="navmesh_simulator_status_some_pending"> + Algumas regiões navmesh têm alterações pendentes. + </floater.string> + <floater.string name="navmesh_simulator_status_some_building"> + Algumas regiões navmesh estão compilando. + </floater.string> + <floater.string name="navmesh_simulator_status_pending_and_building"> + Algumas regiões navmesh têm alterações pendentes e outras estão compilando. + </floater.string> + <floater.string name="navmesh_simulator_status_complete"> + O navmesh está atualizado. + </floater.string> + <floater.string name="pathing_library_not_implemented"> + ImpossÃvel encontrar a implementação de biblioteca de pathing. + </floater.string> + <floater.string name="pathing_region_not_enabled"> + Esta região não está habilitada para pathfinding. + </floater.string> + <floater.string name="pathing_choose_start_and_end_points"> + Escolha os pontos inicial e final. + </floater.string> + <floater.string name="pathing_choose_start_point"> + Escolha o ponto inicial. + </floater.string> + <floater.string name="pathing_choose_end_point"> + Escolha o ponto final. + </floater.string> + <floater.string name="pathing_path_valid"> + O caminho é exibido em laranja. + </floater.string> + <floater.string name="pathing_path_invalid"> + ImpossÃvel encontrar um caminho entre os pontos escolhidos. + </floater.string> + <floater.string name="pathing_error"> + Ocorreu um erro durante a geração do caminho. + </floater.string> + <tab_container name="view_test_tab_container"> + <panel label="Visualizar" name="view_panel"> + <text name="show_label"> + Exibir: + </text> + <check_box label="Mundo" name="show_world"/> + <check_box label="Apenas móveis" name="show_world_movables_only"/> + <check_box label="Navmesh" name="show_navmesh"/> + <text name="show_walkability_label"> + Exibir mapa de possibilidade de caminhar: + </text> + <combo_box name="show_heatmap_mode"> + <combo_box.item label="Não exibir" name="show_heatmap_mode_none"/> + <combo_box.item label="Tipo de personagem A" name="show_heatmap_mode_a"/> + <combo_box.item label="Tipo de personagem B" name="show_heatmap_mode_b"/> + <combo_box.item label="Tipo de personagem C" name="show_heatmap_mode_c"/> + <combo_box.item label="Tipo de personagem D" name="show_heatmap_mode_d"/> + </combo_box> + <check_box label="Caminháveis" name="show_walkables"/> + <check_box label="Volumes materiais" name="show_material_volumes"/> + <check_box label="Obstáculos estáticos" name="show_static_obstacles"/> + <check_box label="Volumes de exclusão" name="show_exclusion_volumes"/> + <check_box label="Plano aquático" name="show_water_plane"/> + <check_box label="Com visão de raio X" name="show_xray"/> + </panel> + <panel label="Testar caminho" name="test_panel"> + <text name="ctrl_click_label"> + Aperte a tecla Ctrl e clique com o mouse para selecionar o ponto inicial. + </text> + <text name="shift_click_label"> + Aperte a tecla Shift e clique com o mouse para selecionar o ponto final. + </text> + <text name="character_width_label"> + Largura do personagem + </text> + <slider name="character_width" value="1"/> + <text name="character_width_unit_label"> + m + </text> + <text name="character_type_label"> + Tipo de personagem + </text> + <combo_box name="path_character_type"> + <combo_box.item label="Nenhum" name="path_character_type_none"/> + <combo_box.item label="A" name="path_character_type_a"/> + <combo_box.item label="B" name="path_character_type_b"/> + <combo_box.item label="C" name="path_character_type_c"/> + <combo_box.item label="D" name="path_character_type_d"/> + </combo_box> + <button label="Limpar caminho" name="clear_path"/> + </panel> + </tab_container> +</floater> diff --git a/indra/newview/skins/default/xui/pt/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/pt/floater_pathfinding_linksets.xml new file mode 100644 index 0000000000..e0c60679dd --- /dev/null +++ b/indra/newview/skins/default/xui/pt/floater_pathfinding_linksets.xml @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_linksets" title="Linksets do pathfinding"> + <floater.string name="messaging_get_inprogress"> + Procurando por linksets do pathfinding... + </floater.string> + <floater.string name="messaging_get_error"> + Erro detectado ao procurar por linksets do pathfinding. + </floater.string> + <floater.string name="messaging_set_inprogress"> + Modificando os linksets do pathfinding selecionados... + </floater.string> + <floater.string name="messaging_set_error"> + Erro detectado ao modificar os linksets do pathfinding selecionados. + </floater.string> + <floater.string name="messaging_complete_none_found"> + Nenhum linkset do pathfinding. + </floater.string> + <floater.string name="messaging_complete_available"> + [NUM_SELECTED] linksets selecionados de [NUM_TOTAL]. + </floater.string> + <floater.string name="messaging_not_enabled"> + Esta região não está habilitada para pathfinding. + </floater.string> + <floater.string name="linkset_terrain_name"> + [Terreno] + </floater.string> + <floater.string name="linkset_terrain_description"> + -- + </floater.string> + <floater.string name="linkset_terrain_owner"> + -- + </floater.string> + <floater.string name="linkset_terrain_scripted"> + -- + </floater.string> + <floater.string name="linkset_terrain_land_impact"> + -- + </floater.string> + <floater.string name="linkset_terrain_dist_from_you"> + -- + </floater.string> + <floater.string name="linkset_owner_loading"> + [Carregando] + </floater.string> + <floater.string name="linkset_owner_unknown"> + [Desconhecido] + </floater.string> + <floater.string name="linkset_owner_group"> + [grupo] + </floater.string> + <floater.string name="linkset_is_scripted"> + Sim + </floater.string> + <floater.string name="linkset_is_not_scripted"> + Não + </floater.string> + <floater.string name="linkset_is_unknown_scripted"> + Desconhecido + </floater.string> + <floater.string name="linkset_use_walkable"> + Caminhável + </floater.string> + <floater.string name="linkset_use_static_obstacle"> + Obstáculo estático + </floater.string> + <floater.string name="linkset_use_dynamic_obstacle"> + Obstáculo móvel + </floater.string> + <floater.string name="linkset_use_material_volume"> + Volume material + </floater.string> + <floater.string name="linkset_use_exclusion_volume"> + Volume de exclusão + </floater.string> + <floater.string name="linkset_use_dynamic_phantom"> + Fantasma móvel + </floater.string> + <floater.string name="linkset_is_terrain"> + [inalterável] + </floater.string> + <floater.string name="linkset_is_restricted_state"> + [restrito] + </floater.string> + <floater.string name="linkset_is_non_volume_state"> + [côncavo] + </floater.string> + <floater.string name="linkset_is_restricted_non_volume_state"> + [restrito,côncavo] + </floater.string> + <floater.string name="linkset_choose_use"> + Escolher uso do linkset... + </floater.string> + <panel> + <combo_box name="filter_by_linkset_use"> + <combo_box.item label="Filtrar por uso do linkset..." name="filter_by_linkset_use_none"/> + <combo_box.item label="Caminhável" name="filter_by_linkset_use_walkable"/> + <combo_box.item label="Obstáculo estático" name="filter_by_linkset_use_static_obstacle"/> + <combo_box.item label="Obstáculo móvel" name="filter_by_linkset_use_dynamic_obstacle"/> + <combo_box.item label="Volume material" name="filter_by_linkset_use_material_volume"/> + <combo_box.item label="Volume de exclusão" name="filter_by_linkset_use_exclusion_volume"/> + <combo_box.item label="Fantasma móvel" name="filter_by_linkset_use_dynamic_phantom"/> + </combo_box> + <button label="Aplicar" name="apply_filters"/> + <button label="Limpar" name="clear_filters"/> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Nome (prim raiz)" name="name"/> + <scroll_list.columns label="Descrição (prim raiz)" name="description"/> + <scroll_list.columns label="Proprietário" name="owner"/> + <scroll_list.columns label="Com script" name="scripted"/> + <scroll_list.columns label="Impacto" name="land_impact"/> + <scroll_list.columns label="Distância" name="dist_from_you"/> + <scroll_list.columns label="Uso do linkset" name="linkset_use"/> + <scroll_list.columns label="A %" name="a_percent"/> + <scroll_list.columns label="B %" name="b_percent"/> + <scroll_list.columns label="C %" name="c_percent"/> + <scroll_list.columns label="D %" name="d_percent"/> + </scroll_list> + <text name="messaging_status"> + Linksets: + </text> + <button label="Atualizar lista" name="refresh_objects_list"/> + <button label="Selecionar tudo" name="select_all_objects"/> + <button label="Selecionar nenhum" name="select_none_objects"/> + </panel> + <panel> + <check_box label="Exibir baliza" name="show_beacon"/> + <button label="Pegar" name="take_objects"/> + <button label="Pegar uma cópia" name="take_copy_objects"/> + <button label="Teletransportar-me até ele" name="teleport_me_to_object"/> + <button label="Devolver" name="return_objects"/> + <button label="Excluir" name="delete_objects"/> + </panel> + <panel> + <text name="walkability_coefficients_label"> + Possibilidade de caminhar: + </text> + <text name="edit_a_label"> + A + </text> + <line_editor name="edit_a_value" tool_tip="Possibilidade de caminhar para os personagens do tipo A. Por exemplo: o tipo do personagem é humano."/> + <text name="edit_b_label"> + B + </text> + <line_editor name="edit_b_value" tool_tip="Possibilidade de caminhar para os personagens do tipo B. Por exemplo: o tipo do personagem é criatura."/> + <text name="edit_c_label"> + C + </text> + <line_editor name="edit_c_value" tool_tip="Possibilidade de caminhar para os personagens do tipo C. Por exemplo: o tipo do personagem é robô."/> + <text name="edit_d_label"> + D + </text> + <line_editor name="edit_d_value" tool_tip="Possibilidade de caminhar para os personagens do tipo D. Por exemplo: o tipo do personagem é outro."/> + <button label="Aplicar alterações" name="apply_edit_values"/> + <text name="suggested_use_a_label"> + (Humano) + </text> + <text name="suggested_use_b_label"> + (Criatura) + </text> + <text name="suggested_use_c_label"> + (Robô) + </text> + <text name="suggested_use_d_label"> + (Outro) + </text> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/pt/floater_postcard.xml b/indra/newview/skins/default/xui/pt/floater_postcard.xml deleted file mode 100644 index 9740fbcb4d..0000000000 --- a/indra/newview/skins/default/xui/pt/floater_postcard.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="ENVIAR FOTO VIA EMAIL"> - <text name="to_label" width="135"> - Para (email): - </text> - <line_editor left="143" name="to_form" width="127"/> - <text name="from_label"> - De (email): - </text> - <line_editor left="143" name="from_form" width="127"/> - <text name="name_label"> - Seu nome: - </text> - <line_editor left="143" name="name_form" width="127"/> - <text name="subject_label"> - Assunto: - </text> - <line_editor left="143" name="subject_form" width="127"/> - <line_editor label="Digite o assunto aqui" name="subject_form"/> - <text name="msg_label"> - Mensagem: - </text> - <text_editor name="msg_form"> - Digite sua mensagem aqui. - </text_editor> - <text name="fine_print"> - Se seu indicado entrar no [SECOND_LIFE], você receberá um bônus pela indicação. - </text> - <button label="Cancelar" name="cancel_btn"/> - <button label="Enviar" name="send_btn"/> - <string name="default_subject"> - Postal do [SECOND_LIFE]. - </string> - <string name="default_message"> - Dá uma olhada nisto! - </string> - <string name="upload_message"> - Enviando... - </string> -</floater> diff --git a/indra/newview/skins/default/xui/pt/floater_spellcheck.xml b/indra/newview/skins/default/xui/pt/floater_spellcheck.xml new file mode 100644 index 0000000000..02bb154d26 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/floater_spellcheck.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_floater" title="Configurações do verificador ortográfico"> + <check_box label="Habilitar verificador ortográfico" name="spellcheck_enable"/> + <text name="spellcheck_main"> + Dicionário principal: + </text> + <text label="Logs:" name="spellcheck_additional"> + Dicionários adicionais: + </text> + <text name="spellcheck_available"> + DisponÃvel + </text> + <text name="spellcheck_active"> + Ativo + </text> + <button label="Remover" name="spellcheck_remove_btn"/> + <button label="Importar..." name="spellcheck_import_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/pt/floater_spellcheck_import.xml b/indra/newview/skins/default/xui/pt/floater_spellcheck_import.xml new file mode 100644 index 0000000000..f4e95bddec --- /dev/null +++ b/indra/newview/skins/default/xui/pt/floater_spellcheck_import.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_import" title="Importar dicionário"> + <button label="Procurar" label_selected="Procurar" name="dictionary_path_browse"/> + <button label="Importar" name="ok_btn"/> + <button label="Cancelar" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/pt/floater_stats.xml b/indra/newview/skins/default/xui/pt/floater_stats.xml index e770c6ac38..be53624145 100644 --- a/indra/newview/skins/default/xui/pt/floater_stats.xml +++ b/indra/newview/skins/default/xui/pt/floater_stats.xml @@ -47,6 +47,12 @@ <stat_bar label="Low LOD Objects" name="physicslodtasks"/> <stat_bar label="Memory Allocated" name="physicsmemoryallocated"/> </stat_view> + <stat_bar label="Scripts executados" name="simpctscriptsrun"/> + <stat_view label="Pathfinding" name="simpathfinding"> + <stat_bar label="Tempo de etapa de AI" name="simsimaistepmsec"/> + <stat_bar label="Etapas de silhueta ignoradas" name="simsimskippedsilhouettesteps"/> + <stat_bar label="Personagens atualizados" name="simsimpctsteppedcharacters"/> + </stat_view> <stat_view label="Time (ms)" name="simperf"> <stat_bar label="Total Frame Time" name="simframemsec"/> <stat_bar label="Net Time" name="simnetmsec"/> diff --git a/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml index 57223beaeb..a75cf34a94 100644 --- a/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml @@ -19,6 +19,8 @@ <button label="Padrão" label_selected="Padrão" name="Default"/> <button label="Branco" label_selected="Branco" name="Blank"/> <button label="Nenhum" label_selected="Nenhum" name="None"/> + <check_box initial_value="true" label="Visualização em tempo real" name="apply_immediate_check"/> + <text name="preview_disabled" value="Visualização desativada"/> <filter_editor label="Filtrar texturas" name="inventory search editor"/> <check_box initial_value="false" label="Exibir pastas" name="show_folders_check"/> <button label="Adicionar" label_selected="Adicionar" name="l_add_btn"/> @@ -30,5 +32,4 @@ </scroll_list> <button label="OK" label_selected="OK" name="Select"/> <button label="Cancelar" label_selected="Cancelar" name="Cancel"/> - <check_box initial_value="true" label="Applicar agora" name="apply_immediate_check"/> </floater> diff --git a/indra/newview/skins/default/xui/pt/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/pt/floater_texture_fetch_debugger.xml index f20d50362e..0e897aea09 100644 --- a/indra/newview/skins/default/xui/pt/floater_texture_fetch_debugger.xml +++ b/indra/newview/skins/default/xui/pt/floater_texture_fetch_debugger.xml @@ -45,10 +45,23 @@ <text name="total_time_refetch_vis_cache_label"> 15, Obtendo novamente visÃveis do cache, Tempo: [TIME] segundos, Obtidos: [SIZE]KB, [PIXEL]MPixels </text> + <text name="total_time_refetch_all_cache_label"> + 16, Obtendo novamente todas as texturas do cache, Tempo: [TIME] segundos, Obtidos: [SIZE]KB, [PIXEL]MPixels + </text> <text name="total_time_refetch_vis_http_label"> - 16, Obtendo novamente visÃveis do HTTP, Tempo: [TIME] segundos, Obtidos: [SIZE]KB, [PIXEL]MPixels + 17, Obtendo novamente visÃveis do HTTP, Tempo: [TIME] segundos, Obtidos: [SIZE]KB, [PIXEL]MPixels + </text> + <text name="total_time_refetch_all_http_label"> + 18, Obtendo novamente todas as texturas do HTTP, Tempo: [TIME] segundos, Obtidos: [SIZE]KB, [PIXEL]MPixels + </text> + <spinner label="19, Proporção de texel/pixel:" name="texel_pixel_ratio"/> + <text name="texture_source_label"> + 20, Origem da textura: </text> - <spinner label="17, Proporção de texel/pixel:" name="texel_pixel_ratio"/> + <radio_group name="texture_source"> + <radio_item label="Cache + HTTP" name="0"/> + <radio_item label="Apenas HTTP" name="1"/> + </radio_group> <button label="Iniciar" name="start_btn"/> <button label="Redefinir" name="clear_btn"/> <button label="Fechar" name="close_btn"/> @@ -58,5 +71,7 @@ <button label="Decodificar" name="decode_btn"/> <button label="Textura GL" name="gl_btn"/> <button label="Obter novamente cache visÃvel" name="refetchviscache_btn"/> + <button label="Obter todo o cache novamente" name="refetchallcache_btn"/> <button label="Obter novamente HTTP visÃvel" name="refetchvishttp_btn"/> + <button label="Obter todo o HTTP novamente" name="refetchallhttp_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/pt/floater_tools.xml b/indra/newview/skins/default/xui/pt/floater_tools.xml index 4b31833602..8c245c582e 100644 --- a/indra/newview/skins/default/xui/pt/floater_tools.xml +++ b/indra/newview/skins/default/xui/pt/floater_tools.xml @@ -148,6 +148,12 @@ <panel.string name="text modify info 4"> Você não pode modificar estes objetos </panel.string> + <panel.string name="text modify info 5"> + Não é possÃvel modificar este objeto através de uma demarcação da região + </panel.string> + <panel.string name="text modify info 6"> + Não é possÃvel modificar estes objetos através de uma demarcação da região + </panel.string> <panel.string name="text modify warning"> Selecione o objeto inteiro para configurar as autorizações </panel.string> @@ -197,12 +203,12 @@ <combo_box.item label="Zoom" name="Zoom"/> </combo_box> <check_box label="À venda" name="checkbox for sale"/> + <spinner label="L$" name="Edit Cost"/> <combo_box name="sale type"> <combo_box.item label="Cópia" name="Copy"/> <combo_box.item label="Conteúdo" name="Contents"/> <combo_box.item label="Original" name="Original"/> </combo_box> - <spinner label="Preço: L$" name="Edit Cost"/> <check_box label="Mostrar na busca" name="search_check" tool_tip="Permitir que as pessoas vejam este objeto nos resultados de busca"/> <panel name="perms_build"> <text name="perm_modify"> @@ -238,6 +244,11 @@ F: </text> </panel> + <panel name="pathfinding_attrs_panel"> + <text name="pathfinding_attributes_label"> + Atributos do pathfinding: + </text> + </panel> </panel> <panel label="Objeto" name="Object"> <check_box label="Travado" name="checkbox locked" tool_tip="Previne que o objeto seja movido ou apagado. Muito útil para evitar edições não intencionais durante a construção."/> diff --git a/indra/newview/skins/default/xui/pt/floater_top_objects.xml b/indra/newview/skins/default/xui/pt/floater_top_objects.xml index c3d5820616..ef682714c6 100644 --- a/indra/newview/skins/default/xui/pt/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/pt/floater_top_objects.xml @@ -9,9 +9,6 @@ <floater.string name="scripts_score_label"> Tempo </floater.string> - <floater.string name="scripts_mono_time_label"> - Hora Mono - </floater.string> <floater.string name="top_colliders_title"> Principais Colidentes </floater.string> @@ -32,9 +29,10 @@ <scroll_list.columns label="Nome" name="name"/> <scroll_list.columns label="Proprietário" name="owner"/> <scroll_list.columns label="Local" name="location"/> + <scroll_list.columns label="Lote" name="parcel"/> <scroll_list.columns label="Tempo" name="time"/> - <scroll_list.columns label="Hora Mono" name="mono_time"/> <scroll_list.columns label="URLs" name="URLs"/> + <scroll_list.columns label="Memória (KB)" name="memory"/> </scroll_list> <text name="id_text"> ID do Objeto: @@ -51,6 +49,10 @@ </text> <line_editor font="SansSerifSmall" left="140" name="owner_name_editor" width="280"/> <button label="Filtro" name="filter_owner_btn"/> + <text name="parcel_name_text"> + Lote: + </text> + <button label="Filtrar" name="filter_parcel_btn"/> <button label="Atualizar" name="refresh_btn"/> <button label="Retornar Selecionado" name="return_selected_btn" width="170"/> <button label="Retornar Tudo" left="190" name="return_all_btn"/> diff --git a/indra/newview/skins/default/xui/pt/menu_bottomtray.xml b/indra/newview/skins/default/xui/pt/menu_bottomtray.xml deleted file mode 100644 index 4598b8ab25..0000000000 --- a/indra/newview/skins/default/xui/pt/menu_bottomtray.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<menu name="hide_camera_move_controls_menu"> - <menu_item_check label="Botão Falar" name="EnableVoiceChat"/> - <menu_item_check label="Botão de gestos" name="ShowGestureButton"/> - <menu_item_check label="Botão de movimento" name="ShowMoveButton"/> - <menu_item_check label="Botão de ver" name="ShowCameraButton"/> - <menu_item_check label="Botão de fotos" name="ShowSnapshotButton"/> - <menu_item_check label="Botão Construir" name="ShowBuildButton"/> - <menu_item_check label="Botão Buscar" name="ShowSearchButton"/> - <menu_item_check label="Botão Mapa" name="ShowWorldMapButton"/> - <menu_item_check label="Botão do Mini mapa" name="ShowMiniMapButton"/> - <menu_item_call label="Cortar" name="NearbyChatBar_Cut"/> - <menu_item_call label="Copiar" name="NearbyChatBar_Copy"/> - <menu_item_call label="Colar" name="NearbyChatBar_Paste"/> - <menu_item_call label="Excluir" name="NearbyChatBar_Delete"/> - <menu_item_call label="Selecionar tudo" name="NearbyChatBar_Select_All"/> -</menu> diff --git a/indra/newview/skins/default/xui/pt/menu_im_well_button.xml b/indra/newview/skins/default/xui/pt/menu_im_well_button.xml deleted file mode 100644 index 2d37cefd6f..0000000000 --- a/indra/newview/skins/default/xui/pt/menu_im_well_button.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<context_menu name="IM Well Button Context Menu"> - <menu_item_call label="Fechar tudo" name="Close All"/> -</context_menu> diff --git a/indra/newview/skins/default/xui/pt/menu_inventory.xml b/indra/newview/skins/default/xui/pt/menu_inventory.xml index 09e1fbf72e..a3a648eb34 100644 --- a/indra/newview/skins/default/xui/pt/menu_inventory.xml +++ b/indra/newview/skins/default/xui/pt/menu_inventory.xml @@ -68,6 +68,7 @@ <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"/> <menu_item_call label="Executar som" name="Sound Play"/> + <menu_item_call label="Copiar SLurl" name="url_copy"/> <menu_item_call label="Sobre o marco" name="About Landmark"/> <menu_item_call label="Executar animação" name="Animation Play"/> <menu_item_call label="Executar áudio" name="Animation Audition"/> diff --git a/indra/newview/skins/default/xui/pt/menu_mode_change.xml b/indra/newview/skins/default/xui/pt/menu_mode_change.xml deleted file mode 100644 index 314d3e409b..0000000000 --- a/indra/newview/skins/default/xui/pt/menu_mode_change.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<toggleable_menu name="Mode Change"> - <menu_item_check label="Básico" name="BasicMode"/> - <menu_item_check label="Avançado" name="AdvancedMode"/> -</toggleable_menu> diff --git a/indra/newview/skins/default/xui/pt/menu_object.xml b/indra/newview/skins/default/xui/pt/menu_object.xml index f4919e0c1f..28dd9febe2 100644 --- a/indra/newview/skins/default/xui/pt/menu_object.xml +++ b/indra/newview/skins/default/xui/pt/menu_object.xml @@ -5,6 +5,8 @@ </menu_item_call> <menu_item_call label="Editar" name="Edit..."/> <menu_item_call label="Construir" name="Build"/> + <menu_item_call label="Exibir em linksets" name="show_in_linksets"/> + <menu_item_call label="Exibir em personagens" name="show_in_characters"/> <menu_item_call label="Abrir" name="Open"/> <menu_item_call label="Sentar aqui" name="Object Sit"/> <menu_item_call label="Ficar de pé" name="Object Stand Up"/> diff --git a/indra/newview/skins/default/xui/pt/menu_text_editor.xml b/indra/newview/skins/default/xui/pt/menu_text_editor.xml index 31c284c6ed..a26b50e1c2 100644 --- a/indra/newview/skins/default/xui/pt/menu_text_editor.xml +++ b/indra/newview/skins/default/xui/pt/menu_text_editor.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Text editor context menu"> + <menu_item_call label="(desconhecido)" name="Suggestion 1"/> + <menu_item_call label="(desconhecido)" name="Suggestion 2"/> + <menu_item_call label="(desconhecido)" name="Suggestion 3"/> + <menu_item_call label="(desconhecido)" name="Suggestion 4"/> + <menu_item_call label="(desconhecido)" name="Suggestion 5"/> + <menu_item_call label="Adicionar ao dicionário" name="Add to Dictionary"/> + <menu_item_call label="Adicionar para ignorar" name="Add to Ignore"/> <menu_item_call label="Cortar" name="Cut"/> <menu_item_call label="Copiar" name="Copy"/> <menu_item_call label="Colar" name="Paste"/> diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index d93330e6df..ca378c1b58 100644 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -28,6 +28,7 @@ <menu_item_call label="Preferências..." name="Preferences"/> <menu_item_call label="Botões da barra de ferramentas..." name="Toolbars"/> <menu_item_call label="Ocultar todos os controles" name="Hide UI"/> + <menu_item_check label="Exibir anexos de HUD" name="Show HUD Attachments"/> <menu_item_call label="Sair do [APP_NAME]" name="Quit"/> </menu> <menu label="Comunicar" name="Communicate"> @@ -39,6 +40,7 @@ <menu_item_call label="Amigos" name="My Friends"/> <menu_item_call label="Grupos" name="My Groups"/> <menu_item_call label="Pessoas próximas" name="Active Speakers"/> + <menu_item_call label="Lista de bloqueados" name="Block List"/> </menu> <menu label="Mundo" name="World"> <menu_item_call label="Criar marco deste lugar" name="Create Landmark Here"/> @@ -124,6 +126,11 @@ <menu_item_call label="Scripts em modo execução" name="Set Scripts to Running"/> <menu_item_call label="Scripts em modo não execução" name="Set Scripts to Not Running"/> </menu> + <menu label="Pathfinding" name="Pathfinding"> + <menu_item_call label="Linksets..." name="pathfinding_linksets_menu_item"/> + <menu_item_call label="Personagens..." name="pathfinding_characters_menu_item"/> + <menu_item_call label="Visualização/teste..." name="pathfinding_console_menu_item"/> + </menu> <menu label="Opções" name="Options"> <menu_item_check label="Mostrar permissões avançadas" name="DebugPermissions"/> <menu_item_check label="Só selecionar meus objetos" name="Select Only My Objects"/> @@ -174,7 +181,6 @@ <menu_item_check label="Esconder partÃculas" name="Hide Particles"/> <menu_item_check label="Ocultar seleções" name="Hide Selected"/> <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> <menu label="Tipos de renderização" name="Rendering Types"> diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index 500a7f0c01..ff7382bf80 100644 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -37,6 +37,12 @@ <button name="Help" text="$helptext"/> </form> </template> + <template name="okhelpignore"> + <form> + <button name="OK_okhelpignore" text="$yestext"/> + <button name="Help_okhelpignore" text="$helptext"/> + </form> + </template> <template name="yesnocancelbuttons"> <form> <button name="Yes" text="$yestext"/> @@ -357,13 +363,19 @@ Digite o nome de usuário de seu avatar. É preciso ter uma conta para entrar no [SECOND_LIFE]. Deseja criar uma conta agora? <url name="url"> - https://join.secondlife.com/index.php?lang=pt-BR + [create_account_url] </url> <usetemplate name="okcancelbuttons" notext="Tentar novamente" yestext="Abrir conta"/> </notification> <notification name="InvalidCredentialFormat"> Digite o nome de usuário ou o nome e sobrenome do seu avatar no campo Nome de usuário, depois entre em sua conta novamente. </notification> + <notification name="InvalidGrid"> + '[GRID]' não é um identificador de grade válido. + </notification> + <notification name="InvalidLocationSLURL"> + Seu ponto de partida não especificou uma grade válida. + </notification> <notification name="DeleteClassified"> Apagar classificado'[NAME]'? Não há reembolso por taxas já pagas. @@ -466,8 +478,8 @@ O objeto pode estar fora de alcance ou ter sido deletado. Houve um problema em salvar uma compilação de script devido a seguinte razão: [REASON]. Por favor, tente salvar novamente o script mais tarde. </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 'Meu inÃcio' como ponto de partida. + Sua região de partida não está definida. +Digite o nome da região na caixa 'Ponto de partida' ou selecione 'Meu último local' ou 'Minha casa' como ponto de partida. <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="CouldNotStartStopScript"> @@ -594,6 +606,9 @@ Você pode unir um máximo de [MAX] objetos. Por favor, certifique-se de que nenhum deles está travado e que você é dono de todos eles. </notification> + <notification name="CannotLinkPermanent"> + Os objetos não podem ser vinculados através de demarcações de região. + </notification> <notification name="CannotLinkDifferentOwners"> Impossibilitado de unir porque nem todos os objetos são do mesmo dono. @@ -972,6 +987,41 @@ Oferecer amizade para [NAME]? <button name="Cancel" text="Cancelar"/> </form> </notification> + <notification label="Adicionar lista de substituição automática" name="AddAutoReplaceList"> + Nome para a nova lista: + <form name="form"> + <button name="SetName" text="OK"/> + </form> + </notification> + <notification label="Renomear lista de substituição automática" name="RenameAutoReplaceList"> + O nome '[DUPNAME]' já está em uso + Insira um novo nome exclusivo: + <form name="form"> + <button name="ReplaceList" text="Substituir lista atual"/> + <button name="SetName" text="Usar novo nome"/> + </form> + </notification> + <notification name="InvalidAutoReplaceEntry"> + A palavra-chave deve ser uma palavra única e a substituição não pode estar vazia. + </notification> + <notification name="InvalidAutoReplaceList"> + A lista de substituição é inválida. + </notification> + <notification name="SpellingDictImportRequired"> + Você deve especificar um arquivo, um nome e um idioma. + </notification> + <notification name="SpellingDictIsSecondary"> + O dicionário [DIC_NAME] não aparenta ter um arquivo "aff"; isso significa que ele é um dicionário "secundário". +Ele pode ser usado como dicionário adicional mas não como dicionário Principal. + +Consulte https://wiki.secondlife.com/wiki/Adding_Spelling_Dictionaries + </notification> + <notification name="SpellingDictImportFailed"> + ImpossÃvel copiar + [FROM_NAME] + para + [TO_NAME] + </notification> <notification label="Salvar este look" name="SaveOutfitAs"> Veja o meu novo visual: <form name="form"> @@ -1146,7 +1196,7 @@ para '[THIS_GPU]' Você chegou a uma região próxima. </notification> <notification name="AvatarMovedLast"> - Esse destino não está disponÃvel no momento. + O destino solicitado não está disponÃvel no momento. Você chegou a uma região próxima. </notification> <notification name="AvatarMovedHome"> @@ -1162,11 +1212,10 @@ Enquando isso, use o [SECOND_LIFE] normalmente. Seu visual será exibido correta </form> </notification> <notification name="FirstRun"> - A instalação do [APP_NAME] está pronta. + A instalação do [APP_NAME] está pronta. -Se você ainda não conhece o [SECOND_LIFE], basta criar uma conta para começar. -Voltar para [http://join.secondlife.com secondlife.com] para criar sua conta? - <usetemplate name="okcancelbuttons" notext="Continuar" yestext="Nova conta.."/> +Se você ainda não conhece o [SECOND_LIFE], basta criar uma conta para começar. + <usetemplate name="okcancelbuttons" notext="Continuar" yestext="Criar conta"/> </notification> <notification name="LoginPacketNeverReceived"> Estamos detectando um problema de conexão. Pode haver um problema com a sua conexão à internet ou com o [SECOND_LIFE_GRID]. @@ -1682,83 +1731,128 @@ Isto mudará milhares de regiões e fará o spaceserver soluçar. <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Mudar"/> </notification> <notification name="RegionEntryAccessBlocked"> - Você não é permitido na Região devido à sua Classificação de maturidade. Isto pode ser o resultado da falta de informação de validação de sua idade. - -Por favor, verifique se você está com o último Visualizador instalado e vá ao Banco de Conhecimento para detalhes em como acessar áreas com esta classificação de maturidade. + A região que você está tentando visitar tem conteúdo que excede suas preferências atuais. Você pode alterar suas preferências acessando Eu > Preferências > Geral. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="RegionEntryAccessBlocked_KB"> - Você não é permitido nesta região devido à sua Classificação de maturidade. - -Ir para o Banco de Conhecimento para maiores informações sobre Classificações de maturidade? + <notification name="RegionEntryAccessBlocked_AdultsOnlyContent"> + A região que você está tentando visitar tem conteúdo [REGIONMATURITY], acessÃvel apenas para adultos. <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/pt + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="Não posso entrar nessa região devido à classificação do conteúdo" name="okcancelignore" notext="Fechar" yestext="Ir para o Banco de Conhecimento"/> + <usetemplate ignoretext="Passagem de região: A região que você está tentando visitar tem conteúdo acessÃvel apenas para adultos." name="okcancelignore" notext="Fechar" yestext="Ir para a Base de Conhecimento"/> </notification> <notification name="RegionEntryAccessBlocked_Notify"> - Você não é permitido nesta região devido à sua Classificação de maturidade. + A região que você está tentando visitar tem conteúdo [REGIONMATURITY], mas suas preferências atuais estão definidas para excluir conteúdo [REGIONMATURITY]. + </notification> + <notification name="RegionEntryAccessBlocked_NotifyAdultsOnly"> + A região que você está tentando visitar tem conteúdo [REGIONMATURITY], acessÃvel apenas para adultos. </notification> <notification name="RegionEntryAccessBlocked_Change"> - Você não pode entrar nessa região devido à sua seleção de maturidade. - -Para entrar na região desejada, mude o nÃvel de maturidade. Você então poderá fazer buscas e acessar conteúdo [REGIONMATURITY]. Para desfazer qualquer mudança, vá para Eu > Preferências > Geral. + A região que você está tentando visitar tem conteúdo [REGIONMATURITY], mas suas preferências atuais estão definidas para excluir conteúdo [REGIONMATURITY]. Podemos alterar suas preferências ou você pode cancelar. Após a alteração de suas preferências, você pode tentar acessar a região novamente. + <form name="form"> + <button name="OK" text="Mudar preferências"/> + <button default="true" name="Cancel" text="Cancelar"/> + <ignore name="ignore" text="Passagem de região: A região que você está tentando visitar tem conteúdo excluÃdo por suas preferências."/> + </form> + </notification> + <notification name="RegionEntryAccessBlocked_PreferencesOutOfSync"> + Estamos tendo dificuldades técnicas com seu teletransporte, pois suas preferências estão dessincronizadas com o servidor. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked"> + A região que você está tentando visitar tem conteúdo que excede suas preferências atuais. Você pode alterar suas preferências acessando Eu > Preferências > Geral. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked_AdultsOnlyContent"> + A região que você está tentando visitar tem conteúdo [REGIONMATURITY], acessÃvel apenas para adultos. + <url name="url"> + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview + </url> + <usetemplate ignoretext="Teletransportar: A região que você está tentando visitar tem conteúdo acessÃvel apenas para adultos." name="okcancelignore" notext="Fechar" yestext="Ir para a Base de Conhecimento"/> + </notification> + <notification name="TeleportEntryAccessBlocked_Notify"> + A região que você está tentando visitar tem conteúdo [REGIONMATURITY], mas suas preferências atuais estão definidas para excluir conteúdo [REGIONMATURITY]. + </notification> + <notification name="TeleportEntryAccessBlocked_NotifyAdultsOnly"> + A região que você está tentando visitar tem conteúdo [REGIONMATURITY], acessÃvel apenas para adultos. + </notification> + <notification name="TeleportEntryAccessBlocked_ChangeAndReTeleport"> + A região que você está tentando visitar tem conteúdo [REGIONMATURITY], mas suas preferências atuais estão definidas para excluir conteúdo [REGIONMATURITY]. Podemos alterar suas preferências e continuar o teletransporte, ou você pode cancelar este teletransporte. <form name="form"> - <button name="OK" text="Mudar preferência"/> - <button default="true" name="Cancel" text="Fechar"/> - <ignore name="ignore" text="Minha preferência de maturidade impede que eu vá a uma região"/> + <button name="OK" text="Alterar e continuar"/> + <button name="Cancel" text="Cancelar"/> + <ignore name="ignore" text="Teletransportar (reinicializável): A região que você está tentando visitar tem conteúdo excluÃdo por suas preferências."/> </form> </notification> + <notification name="TeleportEntryAccessBlocked_Change"> + A região que você está tentando visitar tem conteúdo [REGIONMATURITY], mas suas preferências atuais estão definidas para excluir conteúdo [REGIONMATURITY]. Podemos alterar suas preferências ou você pode cancelar o teletransporte. Após a alteração de suas preferências, você pode tentar se teletransportar novamente. + <form name="form"> + <button name="OK" text="Mudar preferências"/> + <button name="Cancel" text="Cancelar"/> + <ignore name="ignore" text="Teletransportar (não reinicializável): A região que você está tentando visitar tem conteúdo excluÃdo por suas preferências."/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_PreferencesOutOfSync"> + Estamos tendo dificuldades técnicas com seu teletransporte, pois suas preferências estão dessincronizadas com o servidor. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="PreferredMaturityChanged"> - Sua opção de nÃvel de maturidade é [RATING]. + Você não receberá mais notificações de que está prestes a visitar uma região com conteúdo [RATING]. Posteriormente você poderá alterar suas preferências de conteúdo acessando Eu > Preferências > Geral da barra do menu. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="MaturityChangeError"> + ImpossÃvel alterar suas preferências para visualizar conteúdo [PREFERRED_MATURITY] no momento. Suas preferências foram redefinidas para visualizar conteúdo [ACTUAL_MATURITY]. Você pode tentar alterar suas preferências novamente acessando Eu > Preferências > Geral na barra do menu. + <usetemplate name="okbutton" yestext="OK"/> </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. - -Por favor, verifique se você tem o último Visualizador instalado e vá para o Banco de Conhecimento para detalhes sobre o acesso de áreas com esta Classificação de maturidade. + O terreno que você está tentando reivindicar possui uma classificação de maturidade que excede suas preferências atuais. Você pode alterar suas preferências acessando Eu > Preferências > Geral. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandClaimAccessBlocked_KB"> - Você não pode reclamar esta terra devido à sua Classificação de maturidade. - -Ir para a o Banco de Conhecimento para maiores informações sobre Classificações de maturidade? + <notification name="LandClaimAccessBlocked_AdultsOnlyContent"> + Apenas adultos podem reivindicar este terreno. <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/pt + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="Não reivindicar essa região devido à classificação do conteúdo" name="okcancelignore" notext="Fechar" yestext="Ir para o Banco de Conhecimento"/> + <usetemplate ignoretext="Apenas adultos podem reivindicar este terreno." name="okcancelignore" notext="Fechar" yestext="Ir para a Base de Conhecimento"/> </notification> <notification name="LandClaimAccessBlocked_Notify"> - Você não pode reclamar esta terra devido à sua Classificação de maturidade. + O terreno que você está tentando reivindicar tem conteúdo [REGIONMATURITY], mas suas preferências atuais estão definidas para excluir conteúdo [REGIONMATURITY]. + </notification> + <notification name="LandClaimAccessBlocked_NotifyAdultsOnly"> + O terreno que você está tentando reivindicar tem conteúdo [REGIONMATURITY], que é acessÃvel apenas para adultos. </notification> <notification name="LandClaimAccessBlocked_Change"> - Você não pode reivindicar essa região devido à sua preferência de maturidade - -Clique em 'Mudar preferência' para aumentar o nÃvel de maturidade e entrar nessa região. De agora em diante você pode buscar e acessar conteúdo [REGIONMATURITY] . Para modificar esta configuração, vá à Eu > Preferências > Geral. - <usetemplate ignoretext="Minha preferência de conteúdo impede que eu reivindique terrenos" name="okcancelignore" notext="Fechar" yestext="Mudar Preferência"/> + O terreno que você está tentando reivindicar tem conteúdo [REGIONMATURITY], mas suas preferências atuais estão definidas para excluir conteúdo [REGIONMATURITY]. Podemos alterar suas preferências e, então, você poderá tentar reivindicar a região novamente. + <form name="form"> + <button name="OK" text="Mudar preferências"/> + <button name="Cancel" text="Cancelar"/> + <ignore name="ignore" text="O terreno que você está tentando reivindicar tem conteúdo excluÃdo por suas preferências."/> + </form> </notification> <notification name="LandBuyAccessBlocked"> - Você não pode comprar esta terra devido à sua Classificação de maturidade. Isto pode ser o resultado de falta de informação na validação de sua idade. - -Por favor, verifique se você tem o último Visualizador instalado e vá para o Banco de Conhecimento para detalhes sobre o acesso de áreas com esta Classificação de maturidade. + O terreno que você está tentando comprar possui uma classificação de maturidade que excede suas preferências atuais. Você pode alterar suas preferências acessando Eu > Preferências > Geral. <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandBuyAccessBlocked_KB"> - Você não pode comprar esta terra devido à sua Classificação de maturidade. - -Ir para o Banco de Conhecimento para maiores informações sobre Classificações de Maturidade? + <notification name="LandBuyAccessBlocked_AdultsOnlyContent"> + Apenas adultos podem comprar este terreno. <url name="url"> - http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview/pt + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="Não posso comprar essa região devido à classificação do conteúdo" name="okcancelignore" notext="Fechar" yestext="Ir para o Banco de Conhecimento"/> + <usetemplate ignoretext="Apenas adultos podem comprar este terreno." name="okcancelignore" notext="Fechar" yestext="Ir para a Base de Conhecimento"/> </notification> <notification name="LandBuyAccessBlocked_Notify"> - Você não pode comprar esta terra devido à sua Classificação de maturidade. + O terreno que você está tentando comprar tem conteúdo [REGIONMATURITY], mas suas preferências atuais estão definidas para excluir conteúdo [REGIONMATURITY]. + </notification> + <notification name="LandBuyAccessBlocked_NotifyAdultsOnly"> + A região que você está tentando visitar tem conteúdo [REGIONMATURITY], que é acessÃvel apenas para adultos. </notification> <notification name="LandBuyAccessBlocked_Change"> - Você não pode comprar esse terreno devido à sua preferência de maturidade - -Clique em 'Mudar preferência' para aumentar o nÃvel de maturidade e entrar nessa região. De agora em diante você pode buscar e acessar conteúdo [REGIONMATURITY] . Para modificar esta configuração, vá à Eu > Preferências > Geral. - <usetemplate ignoretext="Minha preferência de conteúdo não me deixa comprar terrenos" name="okcancelignore" notext="Fechar" yestext="Mudar Preferência"/> + O terreno que você está tentando comprar tem conteúdo [REGIONMATURITY], mas suas preferências atuais estão definidas para excluir conteúdo [REGIONMATURITY]. Podemos alterar suas preferências e, então, você poderá tentar comprar a região novamente. + <form name="form"> + <button name="OK" text="Mudar preferências"/> + <button name="Cancel" text="Cancelar"/> + <ignore name="ignore" text="O terreno que você está tentando comprar tem conteúdo excluÃdo por suas preferências."/> + </form> </notification> <notification name="TooManyPrimsSelected"> Muitos prims foram selecionados. Selecione [MAX_PRIM_COUNT] ou menos prims, e tente de novo @@ -1813,10 +1907,9 @@ Publicar este classificado agora por L$ [AMOUNT]? </form> </notification> <notification label="Modificar a maturidade da Região" name="RegionMaturityChange"> - O conteúdo desta região foi reclassificado. -Talvez leve algum tempo para a mudança ser refletida no mapa. - -Para ir a regiões de conteúdo Adulto, é preciso ter uma conta verificada, seja comprovando a idade ou com dados de pagamento. + A classificação de maturidade desta região foi alterada. +Talvez leve algum tempo para que esta mudança seja refletida no mapa. + <usetemplate name="okbutton" yestext="OK"/> </notification> <notification label="Discordância de Versão de Voz" name="VoiceVersionMismatch"> Esta versão do [APP_NAME] não é compatÃvel com o recurso 'Bate-papo de voz' desta região. Para o bate-papo de voz funcionar, atualize o [APP_NAME]. @@ -2106,14 +2199,11 @@ Inclua um link para facilitar o acesso para visitantes. Teste o link na barra de <usetemplate ignoretext="Vestir as roupas que eu criar enquanto edito minha aparência" name="okcancelignore" notext="Não" yestext="Sim"/> </notification> <notification name="NotAgeVerified"> - Você deve ter no mÃnimo 18 anos para acessar conteúdo e áreas adultas no Second Life. Visite nossa página de verificação de idade para confirmar que você tem mais de 18 anos. -Isso abrirá o seu navegador. - -[_URL] - <url name="url" option="0"> - https://secondlife.com/my/account/verification.php - </url> - <usetemplate ignoretext="Ainda não comprovei minha idade" name="okcancelignore" notext="Cancelar" yestext="Ir para verificação de idade"/> + O local que você está tentando visitar é restrito a residentes com 18 anos ou mais. + <usetemplate ignoretext="Não tenho idade suficiente para visitar áreas com restrição de idade." name="okignore" yestext="OK"/> + </notification> + <notification name="NotAgeVerified_Notify"> + Localização restrita para 18 anos de idade ou mais. </notification> <notification name="Cannot enter parcel: no payment info on file"> Ãrea restrita a residentes que já cadastraram seus dados de pagamento Deseja ir ao site do [SECOND_LIFE] para cuidar disso? @@ -2371,6 +2461,23 @@ Logo, não é possÃvel voar aqui. <notification name="NoBuild"> Esta área desativou a opção de construir. Não é possÃvel construir ou fazer rez de objetos nesta área. </notification> + <notification name="PathfindingDirty"> + A região possui alterações de pathfinding pendentes. Se você possui direitos de construção, poderá recarregar a região clicando no botão “Recarregar regiãoâ€. + </notification> + <notification name="DynamicPathfindingDisabled"> + O pathfinding dinâmico não está habilitado nesta região. Os objetos com script usando chamadas LSL de pathfinding podem não operar como o esperado na região. + </notification> + <notification name="PathfindingRebakeNavmesh"> + A alteração de determinados objetos nesta região pode resultar no comportamento incorreto de outros objeto em movimento. Para fazer com que os objetos em movimento se comportem corretamente, clique no botão “Recarregar regiãoâ€. Escolha “Ajuda†para obter mais informações. + <url name="url"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </url> + <usetemplate helptext="Ajuda" ignoretext="A alteração de determinados objetos nesta região pode resultar no comportamento incorreto de outros objeto em movimento." name="okhelpignore" yestext="OK"/> + </notification> + <notification name="PathfindingCannotRebakeNavmesh"> + Erro. Pode haver um erro de rede ou do servidor, ou você pode não ter direitos de construção. Às vezes, fazer login e logout novamente resolve este problema. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="SeeAvatars"> Este terreno oculta os avatares e bate-papo de outro terreno. Não é possÃvel ver residentes fora do terreno e vice-versa. O bate-papo por texto no canal 0 também está bloqueado. </notification> @@ -2389,9 +2496,7 @@ Os únicos scripts que funcionam são os do proprietário do terreno. Você só pode reivindicar terrenos públicos na região onde você está. </notification> <notification name="RegionTPAccessBlocked"> - Você não é permitido na Região devido à sua Classificação de maturidade. Você precisa validar sua idade e/ou instalar o último Visualizador. - -Por favor, vá ao Banco de Conhecimento para detalhes sobre o acesso de áreas com esta Classificação de maturidade. + A região que você está tentando visitar tem conteúdo que excede suas preferências atuais. Você pode alterar suas preferências acessando Eu > Preferências > Geral. </notification> <notification name="URBannedFromRegion"> Você está banido da região. @@ -2402,8 +2507,11 @@ Por favor, vá ao Banco de Conhecimento para detalhes sobre o acesso de áreas c <notification name="ImproperPaymentStatus"> Você não tem o status de pagamento adequado para entrar nesta região. </notification> + <notification name="MustGetAgeRegion"> + Você deve ter 18 anos ou mais para acessar esta região. + </notification> <notification name="MustGetAgeParcel"> - Você precisa ter a idade verificada para entrar neste lote. + Você deve ter 18 anos ou mais para acessar este lote. </notification> <notification name="NoDestRegion"> Nenhuma região de destino encontrada. @@ -2505,12 +2613,33 @@ Por favor, tente novamente em alguns instantes. <notification name="TeleportOffered"> [NAME_SLURL] quer teletransportar você para a região deles: -[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] <form name="form"> <button name="Teleport" text="Teletransporte"/> <button name="Cancel" text="Cancelar"/> </form> </notification> + <notification name="TeleportOffered_MaturityExceeded"> + [NAME_SLURL] quer teletransportar você para a região deles: + +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +A região tem conteúdo [REGION_CONTENT_MATURITY], mas suas preferências atuais estão definidas para excluir conteúdo [REGION_CONTENT_MATURITY]. Podemos alterar suas preferências e continuar o teletransporte, ou você pode cancelar este teletransporte. + <form name="form"> + <button name="Teleport" text="Alterar e continuar"/> + <button name="Cancel" text="Cancelar"/> + </form> + </notification> + <notification name="TeleportOffered_MaturityBlocked"> + [NAME_SLURL] quer teletransportar você para a região deles: + +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +No entanto, esta região tem conteúdo acessÃvel apenas para adultos. + </notification> <notification name="TeleportOfferSent"> Oferta de teletransporte enviada para [TO_NAME] </notification> @@ -2908,6 +3037,10 @@ Você carregou uma textura com [RESOLUTION] para o(a) '[BODYREGION]' e ( [EXISTENCE] segundos de vida ) Você carregou uma textura com [RESOLUTION] para o(a) '[BODYREGION]' em [TIME] segundos. </notification> + <notification name="LivePreviewUnavailable"> + Não podemos exibir uma visualização desta textura, pois ela é cópia proibida e/ou transferência proibida. + <usetemplate ignoretext="Avise-me quando o modo Visualização em Tempo Real estiver indisponÃvel para texturas de cópia proibida e/ou transferência proibida" name="okignore" yestext="OK"/> + </notification> <notification name="ConfirmLeaveCall"> Tem certeza de que quer sair desta ligação? <usetemplate ignoretext="Confirmar antes de deixar ligação" name="okcancelignore" notext="Não" yestext="Sim"/> @@ -3077,6 +3210,62 @@ Se o botão Falar for ocultado, o recurso de voz será desabilitado. Essa ação irá ocultar todos os itens de menu e botões. Para trazê-los de volta, clique em [SHORTCUT] novamente. <usetemplate ignoretext="Confirmar antes de ocultar interface" name="okcancelignore" notext="Cancelar" yestext="OK"/> </notification> + <notification name="PathfindingLinksets_WarnOnPhantom"> + Alguns linksets selecionados terão suas sinalizações fantasmas alternadas. + +Deseja continuar? + <usetemplate ignoretext="Algumas sinalizações fantasmas dos linksets selecionados serão alternadas." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted"> + Algumas sinalizações fantasmas dos linksets selecionados não podem ser definidas como '[REQUESTED_TYPE]' devido à s restrições de permissão no linkset. Ao invés disso, estes linksets serão definidos como '[RESTRICTED_TYPE]'. + +Deseja continuar? + <usetemplate ignoretext="Alguns linksets selecionados não podem ser definidos devido à s restrições de permissão no linkset." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnVolume"> + Alguns linksets selecionados não podem ser definidos como '[REQUESTED_TYPE]', pois a forma não é convexa. + +Deseja continuar? + <usetemplate ignoretext="Alguns linksets selecionados não podem ser definidos, pois a forma não é convexa." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted"> + Alguns linksets selecionados terão suas sinalizações fantasmas alternadas. + +Algumas sinalizações fantasmas dos linksets selecionados não podem ser definidas como '[REQUESTED_TYPE]' devido à s restrições de permissão no linkset. Ao invés disso, estes linksets serão definidos como '[RESTRICTED_TYPE]'. + +Deseja continuar? + <usetemplate ignoretext="Algumas sinalizações fantasmas dos linksets selecionados serão alternadas e outras não poderão ser definidas devido à s restrições de permissão no linkset." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnVolume"> + Alguns linksets selecionados terão suas sinalizações fantasmas alternadas. + +Alguns linksets selecionados não podem ser definidos como '[REQUESTED_TYPE]', pois a forma não é convexa. + +Deseja continuar? + <usetemplate ignoretext="Algumas sinalizações fantasmas dos linksets selecionados serão alternadas e outros não podem ser definidas, pois a forma não é convexa." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted_MismatchOnVolume"> + Algumas sinalizações fantasmas dos linksets selecionados não podem ser definidas como '[REQUESTED_TYPE]' devido à s restrições de permissão no linkset. Ao invés disso, estes linksets serão definidos como '[RESTRICTED_TYPE]'. + +Alguns linksets selecionados não podem ser definidos como '[REQUESTED_TYPE]', pois a forma não é convexa. Estes tipos de uso de linksets não mudarão. + +Deseja continuar? + <usetemplate ignoretext="Alguns linksets selecionados não podem ser definidos devido à s restrições de permissão no linkset e porque a forma não é convexa." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted_MismatchOnVolume"> + Alguns linksets selecionados terão suas sinalizações fantasmas alternadas. + +Algumas sinalizações fantasmas dos linksets selecionados não podem ser definidas como '[REQUESTED_TYPE]' devido à s restrições de permissão no linkset. Ao invés disso, estes linksets serão definidos como '[RESTRICTED_TYPE]'. + +Alguns linksets selecionados não podem ser definidos como '[REQUESTED_TYPE]', pois a forma não é convexa. Estes tipos de uso de linksets não mudarão. + +Deseja continuar? + <usetemplate ignoretext="Algumas sinalizações fantasmas dos linksets selecionados serão alternadas e outras não poderão ser definidas, pois a forma não é convexa." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_ChangeToFlexiblePath"> + O objeto selecionado afeta o navmesh. Alterá-lo para um Caminho FlexÃvel irá removê-lo do navmesh. + <usetemplate ignoretext="O objeto selecionado afeta o navmesh. Alterá-lo para um Caminho FlexÃvel irá removê-lo do navmesh." name="okcancelignore" notext="Cancelar" yestext="OK"/> + </notification> <global name="UnsupportedGLRequirements"> Aparentemente a sua máquina não atende os requisitos de hardware do [APP_NAME]. [APP_NAME] requer placas de vÃdeo OpenGL com suporte a multitexturas. Se sua place de vÃdeo tiver este perfil, atualize o driver da placa de vÃdeo, assim como patches e service packs do sistema operacional. @@ -3113,4 +3302,12 @@ Desabilitando atualizações futuras deste arquivo. Tentativa de adição de um formato de imagem inválido ou ilegÃvel [FNAME] que não pode ser aberto ou decodificado. Tentativa cancelada. </notification> + <notification name="PathfindingReturnMultipleItems"> + Você está devolvendo [NUM_ITEMS] itens. Tem certeza de que deseja continuar? + <usetemplate ignoretext="Tem certeza de que deseja devolver múltiplos itens?" name="okcancelignore" notext="Não" yestext="Sim"/> + </notification> + <notification name="PathfindingDeleteMultipleItems"> + Você está excluindo [NUM_ITEMS] itens. Tem certeza de que deseja continuar? + <usetemplate ignoretext="Tem certeza de que deseja excluir múltiplos itens?" name="okcancelignore" notext="Não" yestext="Sim"/> + </notification> </notifications> diff --git a/indra/newview/skins/default/xui/pt/panel_bottomtray.xml b/indra/newview/skins/default/xui/pt/panel_bottomtray.xml deleted file mode 100644 index cb517f643c..0000000000 --- a/indra/newview/skins/default/xui/pt/panel_bottomtray.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="bottom_tray"> - <string name="DragIndicationImageName" value="Accordion_ArrowOpened_Off"/> - <string name="SpeakBtnToolTip" value="Liga e desliga o microfone"/> - <string name="VoiceControlBtnToolTip" value="Mostra/oculta os controles de voz"/> - <layout_stack name="toolbar_stack"> - <layout_panel name="speak_panel"> - <talk_button name="talk"> - <speak_button label="Falar" label_selected="Falar" name="speak_btn"/> - </talk_button> - </layout_panel> - <layout_panel name="gesture_panel"> - <gesture_combo_list label="Gesto" name="Gesture" tool_tip="Mostra/oculta os gestos"/> - </layout_panel> - <layout_panel name="movement_panel"> - <bottomtray_button label="Movimentar" name="movement_btn" tool_tip="Mostra/oculta os controles de movimento"/> - </layout_panel> - <layout_panel name="cam_panel"> - <bottomtray_button label="Exibir" name="camera_btn" tool_tip="Mostra/oculta os controles da câmera"/> - </layout_panel> - <layout_panel name="snapshot_panel"> - <bottomtray_button label="" name="snapshots" tool_tip="Tirar foto"/> - </layout_panel> - <layout_panel name="build_btn_panel"> - <bottomtray_button label="Construir" name="build_btn" tool_tip="Mostra/oculta ferramentas de Construção"/> - </layout_panel> - <layout_panel name="search_btn_panel"> - <bottomtray_button label="Busca" name="search_btn" tool_tip="Mostra/oculta os gestos"/> - </layout_panel> - <layout_panel name="world_map_btn_panel"> - <bottomtray_button label="Mapa" name="world_map_btn" tool_tip="Mostra/oculta o Mapa Múndi"/> - </layout_panel> - <layout_panel name="mini_map_btn_panel"> - <bottomtray_button label="Mini Mapa" name="mini_map_btn" tool_tip="Mostra/oculta o Mini Mapa"/> - </layout_panel> - <layout_panel name="im_well_panel"> - <chiclet_im_well name="im_well"> - <button name="Unread IM messages" tool_tip="Conversas"/> - </chiclet_im_well> - </layout_panel> - <layout_panel name="notification_well_panel"> - <chiclet_notification name="notification_well"> - <button name="Unread" tool_tip="Notificações"/> - </chiclet_notification> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_group_invite.xml b/indra/newview/skins/default/xui/pt/panel_group_invite.xml index c7def0ed96..de057481de 100644 --- a/indra/newview/skins/default/xui/pt/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/pt/panel_group_invite.xml @@ -9,6 +9,9 @@ <panel.string name="already_in_group"> Alguns dos residentes selecionados já estão no grupo, portanto não receberam convite. </panel.string> + <panel.string name="invite_selection_too_large"> + Os convites para o grupo não foram enviados: muitos residentes selecionados. Os convites para o grupo são limitados a 100 por solicitação. + </panel.string> <text name="help_text" width="214"> Selecione um ou mais residentes para convidar. Clique em 'Abrir seletor de residentes' para começar. </text> diff --git a/indra/newview/skins/default/xui/pt/panel_login.xml b/indra/newview/skins/default/xui/pt/panel_login.xml index f4af6a7108..d7e9fa76ea 100644 --- a/indra/newview/skins/default/xui/pt/panel_login.xml +++ b/indra/newview/skins/default/xui/pt/panel_login.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_login"> - <panel.string name="create_account_url"> - http://join.secondlife.com/ - </panel.string> <panel.string name="forgot_password_url"> http://secondlife.com/account/request.php?lang=pt </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> + <text name="log_in_text"> + LOGIN + </text> <text name="username_text"> Nome de usuário: </text> @@ -15,33 +15,32 @@ <text name="password_text"> Senha: </text> - <check_box label="Lembrar senha" name="remember_check"/> - <button label="conectar" name="connect_btn"/> - <text name="mode_selection_text"> - Modo: - </text> - <combo_box name="mode_combo" tool_tip="Selecione o modo. O modo Básico é mais rápido e ideal para explorar e conversar. Use o modo Avançado para acessar mais recursos."> - <combo_box.item label="Básico" name="Basic"/> - <combo_box.item label="Avançado" name="Advanced"/> - </combo_box> + </layout_panel> + <layout_panel name="start_location_panel"> <text name="start_location_text"> Começar em: </text> <combo_box name="start_location_combo"> <combo_box.item label="Última posição" name="MyLastLocation"/> - <combo_box.item label="Meu inÃcio" name="MyHome"/> + <combo_box.item label="Minha casa" name="MyHome"/> + <combo_box.item label="<Digite o nome da região>" name="Typeregionname"/> </combo_box> </layout_panel> - <layout_panel name="links"> - <text name="create_new_account_text"> - Cadastre-se + <layout_panel name="links_login_panel"> + <text name="login_help"> + Precisa de ajuda com o login? </text> <text name="forgot_password_text"> Esqueceu seu nome ou senha? </text> - <text name="login_help"> - Precisa de ajuda ao conectar? + <button label="Login" name="connect_btn"/> + <check_box label="Lembrar senha" name="remember_check"/> + </layout_panel> + <layout_panel name="links"> + <text name="create_account_text"> + CRIE SUA CONTA </text> + <button label="Comece agora" name="create_new_account_btn"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml index 9b993488be..5628a87109 100644 --- a/indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="chat_bar"> +<panel name="nearby_chat"> <line_editor label="Clique aqui para bater papo." name="chat_box" tool_tip="Tecle Enter para falar, Ctrl+Enter para gritar"/> <button name="show_nearby_chat" tool_tip="Mostra/oculta o histórico do bate-papo local"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml index c5a4febb0e..350d53b81c 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml @@ -29,5 +29,7 @@ <check_box label="Bate-papos de MI" name="EnableIMChatPopups" tool_tip="Exibir pop-up de mensagens instantâneas novas"/> <spinner label="Transição de avisos de bate-papos por perto:" name="nearby_toasts_lifetime"/> <spinner label="Transição de avisos de bate-papos por perto:" name="nearby_toasts_fadingtime"/> - <button label="Configurações de tradução de bate-papo" name="ok_btn"/> + <button label="Tradução..." name="ok_btn"/> + <button label="Substituição automática..." name="autoreplace_showgui"/> + <button label="Verificando a ortografia..." name="spellcheck_showgui"/> </panel> 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 f2cc9f644d..be15d40d74 100644 --- a/indra/newview/skins/default/xui/pt/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/pt/panel_region_debug.xml @@ -36,5 +36,5 @@ <button label="?" left="297" name="top_scripts_help"/> <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="Adiar reinÃcio" name="cancel_restart_btn" tool_tip="Adiar o reinÃcio da região por uma hora"/> + <button label="Cancelar reinÃcio" name="cancel_restart_btn" tool_tip="Cancelar reinÃcio da região"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_region_estate.xml b/indra/newview/skins/default/xui/pt/panel_region_estate.xml index 6c5945aa15..b1453c9c32 100644 --- a/indra/newview/skins/default/xui/pt/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/pt/panel_region_estate.xml @@ -26,7 +26,7 @@ Permitir acesso apenas para residentes que: </text> <check_box label="Dados de pagamento constam no registro." name="limit_payment" tool_tip="Propriedade de acesso restrito a residentes que já cadastraram seus dados de pagamento Consulte o [SUPPORT_SITE] para saber mais."/> - <check_box label="A idade foi verificada" name="limit_age_verified" tool_tip="Residentes devem ter a idade verificada para acessar esta propriedade. Consulte o [SUPPORT_SITE] para saber mais."/> + <check_box label="Tem 18 anos ou mais" name="limit_age_verified" tool_tip="Os residentes devem ter 18 anos ou mais para acessar esta propriedade. Consulte o [SUPPORT_SITE] para obter mais informações."/> <check_box label="Permitir conversa de voz" name="voice_chat_check"/> <button label="?" name="voice_chat_help"/> <check_box label="Permitir Tele-transporte direto" name="allow_direct_teleport"/> diff --git a/indra/newview/skins/default/xui/pt/panel_region_texture.xml b/indra/newview/skins/default/xui/pt/panel_region_texture.xml deleted file mode 100644 index 35928ccc67..0000000000 --- a/indra/newview/skins/default/xui/pt/panel_region_texture.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Texturas de Chão" name="Textures"> - <text name="region_text_lbl"> - Região: - </text> - <text name="region_text"> - desconhecido - </text> - <text name="detail_texture_text" width="380"> - Texturas de Terreno (requer 512x512, arquivos 24 bit .tga ) - </text> - <text name="height_text_lbl"> - 1 (baixo) - </text> - <text name="height_text_lbl2"> - 2 - </text> - <text name="height_text_lbl3"> - 3 - </text> - <text name="height_text_lbl4"> - 4 (alto) - </text> - <text name="height_text_lbl5"> - Escalas de Elevação de Terreno - </text> - <text name="height_text_lbl6"> - Noroeste - </text> - <text name="height_text_lbl7"> - Nordeste - </text> - <text name="height_text_lbl8"> - Sudoeste - </text> - <text name="height_text_lbl9"> - Sudeste - </text> - <spinner label="Baixo" name="height_start_spin_0"/> - <spinner label="Baixo" name="height_start_spin_1"/> - <spinner label="Baixo" name="height_start_spin_2"/> - <spinner label="Baixo" name="height_start_spin_3"/> - <spinner label="Alto" name="height_range_spin_0"/> - <spinner label="Alto" name="height_range_spin_1"/> - <spinner label="Alto" name="height_range_spin_2"/> - <spinner label="Alto" name="height_range_spin_3"/> - <text name="height_text_lbl10"> - Os valores representam o intervalo de mistura das texturas acima. - </text> - <text name="height_text_lbl11"> - Em metros, o valor BAIXO é a altura MÃXIMA da Textura 1, e HIGH é a altura MÃNIMA da Textura 4. - </text> - <text name="height_text_lbl12"> - e o valor Alto é a altura MÃnima da Textura #4. - </text> - <button label="Aplicar" name="apply_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_side_tray.xml b/indra/newview/skins/default/xui/pt/panel_side_tray.xml deleted file mode 100644 index 1a424fb7f1..0000000000 --- a/indra/newview/skins/default/xui/pt/panel_side_tray.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<!-- Side tray cannot show background because it is always - 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="InÃcio" name="sidebar_home" tab_title="InÃcio"> - <panel label="InÃcio" name="panel_home"/> - </sidetray_tab> - <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="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="Lugares"> - <panel label="Lugares" name="panel_places"/> - </sidetray_tab> - <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 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_volume_pulldown.xml b/indra/newview/skins/default/xui/pt/panel_volume_pulldown.xml new file mode 100644 index 0000000000..1dfd2a69ca --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_volume_pulldown.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="volumepulldown_floater"> + <slider label="Master" name="System Volume"/> + <slider label="Botões" name="UI Volume"/> + <slider label="Ambiente" name="Wind Volume"/> + <slider label="Sons" name="SFX Volume"/> + <check_box name="gesture_audio_play_btn" tool_tip="Ativar sons dos gestos"/> + <slider label="Música" name="Music Volume"/> + <check_box name="enable_music" tool_tip="Ativar streaming de música"/> + <slider label="MÃdia" name="Media Volume"/> + <check_box name="enable_media" tool_tip="Ativar mÃdia em stream"/> + <slider label="Voz" name="Voice Volume"/> + <check_box name="enable_voice_check" tool_tip="Ativar bate-papo de voz"/> +</panel> diff --git a/indra/newview/skins/default/xui/pt/sidepanel_item_info.xml b/indra/newview/skins/default/xui/pt/sidepanel_item_info.xml index e6370ea830..d3cb087108 100644 --- a/indra/newview/skins/default/xui/pt/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/pt/sidepanel_item_info.xml @@ -3,6 +3,9 @@ <panel.string name="unknown"> (desconhecido) </panel.string> + <panel.string name="unknown_multiple"> + (desconhecido / múltiplo) + </panel.string> <panel.string name="public"> (público) </panel.string> diff --git a/indra/newview/skins/default/xui/pt/sidepanel_task_info.xml b/indra/newview/skins/default/xui/pt/sidepanel_task_info.xml index 8092e6c145..3cfe0fe4f4 100644 --- a/indra/newview/skins/default/xui/pt/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/pt/sidepanel_task_info.xml @@ -18,6 +18,12 @@ <panel.string name="text modify info 4"> Você não pode modificar estes objetos </panel.string> + <panel.string name="text modify info 5"> + Não é possÃvel modificar este objeto através de uma demarcação da região + </panel.string> + <panel.string name="text modify info 6"> + Não é possÃvel modificar estes objetos através de uma demarcação da região + </panel.string> <panel.string name="text modify warning"> O objeto contém links ligando suas partes </panel.string> @@ -95,6 +101,9 @@ </combo_box> <spinner label="Preço: L$" name="Edit Cost"/> <check_box label="Mostrar nos resultados de busca" name="search_check" tool_tip="Incluir o objeto nos resultados de busca"/> + <text name="pathfinding_attributes_label"> + Atributos do pathfinding: + </text> <text name="B:"> B: </text> diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index fd8f22f331..bc72b86020 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -128,7 +128,7 @@ Sair </string> <string name="create_account_url"> - http://join.secondlife.com/index.php?lang=pt-BR + http://join.secondlife.com/index.php?lang=pt-BR&sourceid=[sourceid] </string> <string name="LoginFailedViewerNotPermitted"> O visualizador utilizado já não é compatÃvel com o Second Life. Visite a página abaixo para baixar uma versão atual: http://secondlife.com/download @@ -952,6 +952,9 @@ Pessoas com contas gratuitas não poderão acessar o Second Life no momento para <string name="script_files"> Scripts </string> + <string name="dictionary_files"> + Dicionários + </string> <string name="AvatarSetNotAway"> deixar como ausente </string> @@ -1351,6 +1354,12 @@ Pessoas com contas gratuitas não poderão acessar o Second Life no momento para <string name="InvFolder favorite"> Meus favoritos </string> + <string name="InvFolder Favorites"> + Meus favoritos + </string> + <string name="InvFolder favorites"> + Meus favoritos + </string> <string name="InvFolder Current Outfit"> Look atual </string> @@ -1366,6 +1375,12 @@ Pessoas com contas gratuitas não poderão acessar o Second Life no momento para <string name="InvFolder Meshes"> Meshes: </string> + <string name="InvFolder Received Items"> + Itens recebidos + </string> + <string name="InvFolder Merchant Outbox"> + Caixa de saÃda do lojista + </string> <string name="InvFolder Friends"> Amigos </string> @@ -3740,6 +3755,12 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="LocationCtrlSeeAVsTooltip"> Avatar visÃveis e bate-papo permitido fora deste terreno </string> + <string name="LocationCtrlPathfindingDirtyTooltip"> + Os objetos que se movem podem não se comportar corretamente nesta região até que ela seja recarregada. + </string> + <string name="LocationCtrlPathfindingDisabledTooltip"> + O pathfinding dinâmico não está habilitado nesta região. + </string> <string name="UpdaterWindowTitle"> [APP_NAME] Atualização </string> @@ -4873,6 +4894,21 @@ Tente colocar o caminho do editor entre aspas. <string name="Normal"> Normal </string> + <string name="Pathfinding_Wiki_URL"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </string> + <string name="Pathfinding_Object_Attr_None"> + Nenhum + </string> + <string name="Pathfinding_Object_Attr_Permanent"> + Afeta o navmesh + </string> + <string name="Pathfinding_Object_Attr_Character"> + Personagem + </string> + <string name="Pathfinding_Object_Attr_MultiSelect"> + (Múltiplo) + </string> <string name="snapshot_quality_very_low"> Muito baixo </string> @@ -4888,4 +4924,10 @@ Tente colocar o caminho do editor entre aspas. <string name="snapshot_quality_very_high"> Muito alto </string> + <string name="TeleportMaturityExceeded"> + O residente não pode visitar a região. + </string> + <string name="UserDictionary"> + [Usuário] + </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 3fb77a02d2..40fb4caebf 100644 --- a/indra/newview/skins/default/xui/pt/teleport_strings.xml +++ b/indra/newview/skins/default/xui/pt/teleport_strings.xml @@ -43,6 +43,9 @@ Vá para a 'Ilha Welcome Pública' para repetir o tutorial. <message name="no_inventory_host"> O sistema de inventário está indisponÃvel no momento. </message> + <message name="MustGetAgeRegion"> + Você deve ter 18 anos ou mais para acessar esta região. + </message> </message_set> <message_set name="progress"> <message name="sending_dest"> @@ -78,5 +81,8 @@ Vá para a 'Ilha Welcome Pública' para repetir o tutorial. <message name="requesting"> Solicitando teletransporte... </message> + <message name="pending"> + Teletransporte pendente... + </message> </message_set> </teleport_messages> diff --git a/indra/newview/skins/default/xui/ru/floater_about.xml b/indra/newview/skins/default/xui/ru/floater_about.xml index 119f104906..bb6266ac9a 100644 --- a/indra/newview/skins/default/xui/ru/floater_about.xml +++ b/indra/newview/skins/default/xui/ru/floater_about.xml @@ -62,27 +62,26 @@ </panel> <panel label="Лицензии" name="licenses_panel"> <text_editor name="credits_editor"> - 3Dconnexion SDK (C) 1992-2007 3Dconnexion - APR (C) 2000-2004 The Apache Software Foundation - Collada DOM (C) 2005 Sony Computer Entertainment Inc. - cURL (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se) + 3Dconnexion SDK (C) 1992-2009 3Dconnexion + APR (C) 2011 The Apache Software Foundation + Collada DOM (C) 2006 Sony Computer Entertainment Inc. + cURL (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se) DBus/dbus-glib (C) 2002, 2003 CodeFactory AB / (C) 2003, 2004 Red Hat, Inc. expat (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. - FreeType (C) 1996-2002, The FreeType Project (www.freetype.org). + FreeType (C) 1996-2002, 2006 David Turner, Robert Wilhelm и Werner Lemberg. GL (C) 1999-2004 Brian Paul. GLOD (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, УниверÑитет Джона ГопкинÑа и David Luebke, Brenden Schubert, УниверÑитет Вирджинии. google-perftools (c) 2005, Google Inc. Havok.com(TM) (C) 1999-2001, Telekinesys Research Limited. jpeg2000 (C) 2001, David Taubman, УниверÑитет Ðового Южного УÑльÑа (UNSW) jpeglib (C) 1991-1998, Thomas G. Lane. - ogg/vorbis (C) 2001, Xiphophorus - OpenSSL (C) 1998-2002 The OpenSSL Project. - PCRE (c) 1997-2008, КембриджÑкий универÑитет + ogg/vorbis (C) 2002, Xiphophorus + OpenSSL (C) 1998-2008 The OpenSSL Project. + PCRE (c) 1997-2012, КембриджÑкий универÑитет SDL (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga SSLeay (C) 1995-1998 Eric Young (eay@cryptsoft.com) xmlrpc-epi (C) 2000 Epinions, Inc. - zlib (C) 1995-2002 Jean-loup Gailly и Mark Adler. - google-perftools (c) 2005, Google Inc. + zlib (C) 1995-2012 Jean-loup Gailly и Mark Adler. Ð’ клиенте Second Life иÑпользуетÑÑ Ñ‚ÐµÑ…Ð½Ð¾Ð»Ð¾Ð³Ð¸Ñ Havok (TM) Physics. (C) 1999-2010 Havok.com Inc. (и лицензиары компании). Ð’Ñе права защищены. Подробнее Ñм. веб-Ñайт www.havok.com. diff --git a/indra/newview/skins/default/xui/ru/floater_about_land.xml b/indra/newview/skins/default/xui/ru/floater_about_land.xml index ee74aad5cc..12691df684 100644 --- a/indra/newview/skins/default/xui/ru/floater_about_land.xml +++ b/indra/newview/skins/default/xui/ru/floater_about_land.xml @@ -451,7 +451,7 @@ Разрешить доÑтуп только таким жителÑм: </text> <check_box label="ЗарегиÑтрирована Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾Ð± оплате [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="Ð”Ð»Ñ Ð´Ð¾Ñтупа к Ñтому учаÑтку у Ð¶Ð¸Ñ‚ÐµÐ»Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° быть зарегиÑтрирована Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾Ð± оплате. Более Ð¿Ð¾Ð´Ñ€Ð¾Ð±Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð·Ð´ÐµÑÑŒ: [SUPPORT_SITE]."/> - <check_box label="Подтвержден возраÑÑ‚ [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Ð”Ð»Ñ Ð´Ð¾Ñтупа к Ñтому учаÑтку житель должен подтвердить Ñвой возраÑÑ‚. Более Ð¿Ð¾Ð´Ñ€Ð¾Ð±Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð·Ð´ÐµÑÑŒ: [SUPPORT_SITE]."/> + <check_box label="18 лет и Ñтарше [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="ДоÑтуп к Ñтому учаÑтку имеют только жители 18 лет и Ñтарше. Более Ð¿Ð¾Ð´Ñ€Ð¾Ð±Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð·Ð´ÐµÑÑŒ: [SUPPORT_SITE]."/> <check_box label="Разрешить доÑтуп группе: [GROUP]" name="GroupCheck" tool_tip="Группа уÑтанавливаетÑÑ Ð½Ð° оÑновной вкладке."/> <check_box label="Продать доÑтуп:" name="PassCheck" tool_tip="Разрешить временный доÑтуп к учаÑтку."/> <combo_box name="pass_combo"> diff --git a/indra/newview/skins/default/xui/ru/floater_animation_preview.xml b/indra/newview/skins/default/xui/ru/floater_animation_preview.xml deleted file mode 100644 index b7075fbf97..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_animation_preview.xml +++ /dev/null @@ -1,183 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Animation Preview"> - <floater.string name="failed_to_initialize"> - Ðевозможно инициализировать движение - </floater.string> - <floater.string name="anim_too_long"> - Длина файла анимации: [LENGTH] Ñ. -МакÑÐ¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ð´Ð»Ð¸Ð½Ð° анимации: [MAX_LENGTH] Ñ. - </floater.string> - <floater.string name="failed_file_read"> - Ðевозможно прочитать файл анимации. -[STATUS] - </floater.string> - <floater.string name="E_ST_OK"> - ОК - </floater.string> - <floater.string name="E_ST_EOF"> - Преждевременный конец файла. - </floater.string> - <floater.string name="E_ST_NO_CONSTRAINT"> - Ðе могу прочитать определение ограничений. - </floater.string> - <floater.string name="E_ST_NO_FILE"> - Ðе удалоÑÑŒ открыть BVH-файл. - </floater.string> - <floater.string name="E_ST_NO_HIER"> - Ðеправильный заголовок HIERARCHY. - </floater.string> - <floater.string name="E_ST_NO_JOINT"> - Ðе удалоÑÑŒ найти ROOT или JOINT. - </floater.string> - <floater.string name="E_ST_NO_NAME"> - Ðе удалоÑÑŒ получить Ð¸Ð¼Ñ JOINT. - </floater.string> - <floater.string name="E_ST_NO_OFFSET"> - Ðе удалоÑÑŒ найти OFFSET. - </floater.string> - <floater.string name="E_ST_NO_CHANNELS"> - Ðе удалоÑÑŒ найти CHANNELS. - </floater.string> - <floater.string name="E_ST_NO_ROTATION"> - Ðе удалоÑÑŒ получить порÑдок вращениÑ. - </floater.string> - <floater.string name="E_ST_NO_AXIS"> - Ðе удалоÑÑŒ получить оÑи вращениÑ. - </floater.string> - <floater.string name="E_ST_NO_MOTION"> - Ðе удалоÑÑŒ найти MOTION. - </floater.string> - <floater.string name="E_ST_NO_FRAMES"> - Ðе удалоÑÑŒ получить количеÑтво кадров. - </floater.string> - <floater.string name="E_ST_NO_FRAME_TIME"> - Ðе удалоÑÑŒ получить Ð²Ñ€ÐµÐ¼Ñ ÐºÐ°Ð´Ñ€Ð°. - </floater.string> - <floater.string name="E_ST_NO_POS"> - Ðе удалоÑÑŒ получить Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ position. - </floater.string> - <floater.string name="E_ST_NO_ROT"> - Ðе удалоÑÑŒ получить Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ rotation. - </floater.string> - <floater.string name="E_ST_NO_XLT_FILE"> - Ðе удалоÑÑŒ открыть файл перевода. - </floater.string> - <floater.string name="E_ST_NO_XLT_HEADER"> - Ðе удалоÑÑŒ прочитать заголовок перевода. - </floater.string> - <floater.string name="E_ST_NO_XLT_NAME"> - Ðе удалоÑÑŒ прочитать имена перевода. - </floater.string> - <floater.string name="E_ST_NO_XLT_IGNORE"> - Ðе удалоÑÑŒ прочитать значение перевода ignore. - </floater.string> - <floater.string name="E_ST_NO_XLT_RELATIVE"> - Ðе удалоÑÑŒ прочитать значение перевода relative. - </floater.string> - <floater.string name="E_ST_NO_XLT_OUTNAME"> - Ðе удалоÑÑŒ прочитать значение перевода outname. - </floater.string> - <floater.string name="E_ST_NO_XLT_MATRIX"> - Ðе удалоÑÑŒ прочитать матрицу перевода. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGECHILD"> - Ðе удалоÑÑŒ получить Ð¸Ð¼Ñ mergechild. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGEPARENT"> - Ðе удалоÑÑŒ получить Ð¸Ð¼Ñ mergeparent. - </floater.string> - <floater.string name="E_ST_NO_XLT_PRIORITY"> - Ðе удалоÑÑŒ получить значение priority. - </floater.string> - <floater.string name="E_ST_NO_XLT_LOOP"> - Ðе удалоÑÑŒ получить значение loop. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEIN"> - Ðе удалоÑÑŒ получить Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ easeIn. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEOUT"> - Ðе удалоÑÑŒ получить Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ easeOut. - </floater.string> - <floater.string name="E_ST_NO_XLT_HAND"> - Ðе удалоÑÑŒ получить значение hand morph. - </floater.string> - <floater.string name="E_ST_NO_XLT_EMOTE"> - Ðе удалоÑÑŒ прочитать Ð¸Ð¼Ñ emote. - </floater.string> - <floater.string name="E_ST_BAD_ROOT"> - Ðеверное Ð¸Ð¼Ñ ÐºÐ¾Ñ€Ð½ÐµÐ²Ð¾Ð³Ð¾ ÑоединениÑ, должно быть «hip». - </floater.string> - <text name="name_label"> - Ðазвание: - </text> - <text name="description_label"> - ОпиÑание: - </text> - <spinner label="Приоритет" name="priority" tool_tip="УправлÑет тем, как другие анимации могут перекрыватьÑÑ Ñтой"/> - <check_box label="Цикл" name="loop_check" tool_tip="Делает анимацию зацикленной"/> - <spinner label="Ðачало(%)" name="loop_in_point" tool_tip="УÑтанавливает точку возврата цикла"/> - <spinner label="Конец(%)" name="loop_out_point" tool_tip="УÑтанавливает точку конца цикла"/> - <text name="hand_label"> - Положение пальцев - </text> - <combo_box name="hand_pose_combo" tool_tip="Контролирует положение пальцев во Ð²Ñ€ÐµÐ¼Ñ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ð¸"> - <combo_box.item label="Разведены" name="Spread"/> - <combo_box.item label="РаÑÑлаблены" name="Relaxed"/> - <combo_box.item label="Указывают" name="PointBoth"/> - <combo_box.item label="Сжаты в кулаки" name="Fist"/> - <combo_box.item label="Левые раÑÑлаблены" name="RelaxedLeft"/> - <combo_box.item label="Левые указывают" name="PointLeft"/> - <combo_box.item label="Левые в кулак" name="FistLeft"/> - <combo_box.item label="Правые раÑÑлаблены" name="RelaxedRight"/> - <combo_box.item label="Правые указывают" name="PointRight"/> - <combo_box.item label="Правые в кулак" name="FistRight"/> - <combo_box.item label="Правые в приветÑтвии" name="SaluteRight"/> - <combo_box.item label="Печатают" name="Typing"/> - <combo_box.item label="Правые «V»" name="PeaceRight"/> - </combo_box> - <text name="emote_label"> - Выражение лица - </text> - <combo_box name="emote_combo" tool_tip="Контролирует выражение лица во Ð²Ñ€ÐµÐ¼Ñ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ð¸"> - <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="ДразнитÑÑ" name="Plllppt" value="ДразнитÑÑ"/> - <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 name="preview_base_anim" tool_tip="ПроÑмотр вашей анимации во Ð²Ñ€ÐµÐ¼Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð°Ð²Ð°Ñ‚Ð°Ñ€Ð¾Ð¼ дейÑтвий."> - <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="КоличеÑтво времени (в Ñекундах) Ð´Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð° из анимации"/> - <button name="play_btn" tool_tip="Проиграть анимацию"/> - <button name="pause_btn" tool_tip="ПриоÑтановить анимацию"/> - <button name="stop_btn" tool_tip="ОÑтановить проигрывание анимации"/> - <text name="bad_animation_text"> - Ðевозможно прочитать файл анимации. -РекомендуетÑÑ Ð¸Ñпользовать BVH-файлы, ÑкÑпортированные из Poser 4. - </text> - <button label="Передать (L$[AMOUNT])" name="ok_btn"/> - <button label="Отмена" name="cancel_btn"/> -</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_autoreplace.xml b/indra/newview/skins/default/xui/ru/floater_autoreplace.xml new file mode 100644 index 0000000000..6827931e5d --- /dev/null +++ b/indra/newview/skins/default/xui/ru/floater_autoreplace.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="autoreplace_floater" title="ÐаÑтройки автозамены"> + <check_box label="Включить автозамену" name="autoreplace_enable" tool_tip="Ð’ чате по мере ввода текÑта ключевые Ñлова будут заменÑтьÑÑ ÑоответÑтвующими заменителÑми"/> + <button label="Импорт ÑпиÑка..." name="autoreplace_import_list" tool_tip="Загрузить ранее ÑкÑпортированный ÑпиÑок из файла."/> + <button label="ÐкÑпорт ÑпиÑка..." name="autoreplace_export_list" tool_tip="Сохранить выбранный ÑпиÑок в файл Ð´Ð»Ñ Ð¿Ð¾Ñледующего раÑпроÑтранениÑ."/> + <button label="Ðовый ÑпиÑок..." name="autoreplace_new_list" tool_tip="Создать новый ÑпиÑок."/> + <button label="Удалить ÑпиÑок" name="autoreplace_delete_list" tool_tip="Удалить выбранный ÑпиÑок."/> + <button name="autoreplace_list_up" tool_tip="ПовыÑить приоритет ÑпиÑка."/> + <button name="autoreplace_list_down" tool_tip="Понизить приоритет ÑпиÑка."/> + <scroll_list name="autoreplace_list_replacements"> + <scroll_list.columns label="Ключевое Ñлово" name="keyword"/> + <scroll_list.columns label="Замена" name="replacement"/> + </scroll_list> + <button label="Добавить..." name="autoreplace_add_entry"/> + <button label="Удалить" name="autoreplace_delete_entry"/> + <button label="Сохранить запиÑÑŒ" name="autoreplace_save_entry" tool_tip="Сохранить Ñту запиÑÑŒ."/> + <button label="Сохранить изменениÑ" name="autoreplace_save_changes" tool_tip="Сохранить вÑе изменениÑ."/> + <button label="Отмена" name="autoreplace_cancel" tool_tip="Отменить вÑе изменениÑ."/> +</floater> +<!-- + <text + top_pad="10" + left="10" + height="16" + width="260" + follows="left|top" + halign="center" + mouse_opaque="true" + name="autoreplace_text2"> + Entries + </text> +--> diff --git a/indra/newview/skins/default/xui/ru/floater_chat_bar.xml b/indra/newview/skins/default/xui/ru/floater_chat_bar.xml index 79b7b033fb..f6b2fc81e1 100644 --- a/indra/newview/skins/default/xui/ru/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/ru/floater_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="chat_bar" title="ЛОКÐЛЬÐЫЙ ЧÐТ"> +<floater name="nearby_chat" title="ЛОКÐЛЬÐЫЙ ЧÐТ"> <panel name="bottom_panel"> <line_editor label="Щелкните здеÑÑŒ Ð´Ð»Ñ Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ." name="chat_box" tool_tip="Ðажмите Enter, чтобы Ñказать, Ctrl+Enter, чтобы прокричать"/> <button name="show_nearby_chat" tool_tip="Показать/Ñкрыть лог локального чата"/> diff --git a/indra/newview/skins/default/xui/ru/floater_env_settings.xml b/indra/newview/skins/default/xui/ru/floater_env_settings.xml deleted file mode 100644 index a3e77d61de..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_env_settings.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Environment Editor Floater" title="РЕДÐКТОРСРЕДЫ"> - <floater.string name="timeStr"> - [hour,datetime,utc]:[min,datetime,utc] - </floater.string> - <text name="EnvTimeText"> - Ð’Ñ€ÐµÐ¼Ñ Ñуток - </text> - <text name="EnvTimeText2"> - 12:00 - </text> - <text name="EnvCloudText"> - ОблачноÑть - </text> - <text name="EnvWaterColorText"> - Цвет воды - </text> - <color_swatch name="EnvWaterColor" tool_tip="Щелкните Ð´Ð»Ñ Ð²Ñ‹Ð±Ð¾Ñ€Ð° цвета"/> - <text name="EnvWaterFogText"> - Водный туман - </text> - <button label="ИÑпользовать Ð²Ñ€ÐµÐ¼Ñ Ð² землевладении" name="EnvUseEstateTimeButton"/> - <button label="Улучшенное небо" name="EnvAdvancedSkyButton"/> - <button label="Ð£Ð»ÑƒÑ‡ÑˆÐµÐ½Ð½Ð°Ñ Ð²Ð¾Ð´Ð°" name="EnvAdvancedWaterButton"/> -</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_inventory.xml b/indra/newview/skins/default/xui/ru/floater_inventory.xml deleted file mode 100644 index 35cbcf177d..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_inventory.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="МОЙ ИÐВЕÐТÐРЬ"> - <panel label="Панель инвентарÑ" name="Inventory Panel"/> -</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_model_preview.xml b/indra/newview/skins/default/xui/ru/floater_model_preview.xml index 5bb96b8de4..0c6d41b4ef 100644 --- a/indra/newview/skins/default/xui/ru/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/ru/floater_model_preview.xml @@ -92,19 +92,54 @@ <text initial_value="Треугольники" name="triangles" value="Треугольники"/> <text initial_value="Вершины" name="vertices" value="Вершины"/> <text initial_value="Ð’Ñ‹Ñокий" name="high_label" value="Ð’Ñ‹Ñокий"/> + <combo_box name="lod_source_high"> + <item name="Load from file" value="Загрузка из файла"/> + <item name="Generate" value="Создать"/> + </combo_box> <button label="Обзор..." name="lod_browse_high"/> + <combo_box name="lod_mode_high"> + <item name="Triangle Limit" value="Предельное чиÑло треугольников"/> + <item name="Error Threshold" value="Порог ошибки"/> + </combo_box> <text initial_value="0" name="high_triangles" value="0"/> <text initial_value="0" name="high_vertices" value="0"/> <text initial_value="Средний" name="medium_label" value="Средний"/> + <combo_box name="lod_source_medium"> + <item name="Load from file" value="Загрузка из файла"/> + <item name="Generate" value="Создать"/> + <item name="Use LoD above" value="ИÑпользовать УД выше"/> + </combo_box> <button label="Обзор..." name="lod_browse_medium"/> + <combo_box name="lod_mode_medium"> + <item name="Triangle Limit" value="Предельное чиÑло треугольников"/> + <item name="Error Threshold" value="Порог ошибки"/> + </combo_box> <text initial_value="0" name="medium_triangles" value="0"/> <text initial_value="0" name="medium_vertices" value="0"/> <text initial_value="Ðизкий" name="low_label" value="Ðизкий"/> + <combo_box name="lod_source_low"> + <item name="Load from file" value="Загрузка из файла"/> + <item name="Generate" value="Создать"/> + <item name="Use LoD above" value="ИÑпользовать УД выше"/> + </combo_box> <button label="Обзор..." name="lod_browse_low"/> + <combo_box name="lod_mode_low"> + <item name="Triangle Limit" value="Предельное чиÑло треугольников"/> + <item name="Error Threshold" value="Порог ошибки"/> + </combo_box> <text initial_value="0" name="low_triangles" value="0"/> <text initial_value="0" name="low_vertices" value="0"/> <text initial_value="Самый низкий" name="lowest_label" value="Самый низкий"/> + <combo_box name="lod_source_lowest"> + <item name="Load from file" value="Загрузка из файла"/> + <item name="Generate" value="Создать"/> + <item name="Use LoD above" value="ИÑпользовать УД выше"/> + </combo_box> <button label="Обзор..." name="lod_browse_lowest"/> + <combo_box name="lod_mode_lowest"> + <item name="Triangle Limit" value="Предельное чиÑло треугольников"/> + <item name="Error Threshold" value="Порог ошибки"/> + </combo_box> <text initial_value="0" name="lowest_triangles" value="0"/> <text initial_value="0" name="lowest_vertices" value="0"/> <check_box label="Генерировать нормали" name="gen_normals"/> diff --git a/indra/newview/skins/default/xui/ru/floater_nearby_chat.xml b/indra/newview/skins/default/xui/ru/floater_nearby_chat.xml deleted file mode 100644 index 184c753e40..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_nearby_chat.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="nearby_chat" title="ЛОКÐЛЬÐЫЙ ЧÐТ"> - <check_box label="Перевод чата" name="translate_chat_checkbox"/> -</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/ru/floater_pathfinding_characters.xml new file mode 100644 index 0000000000..ce7ffc3d20 --- /dev/null +++ b/indra/newview/skins/default/xui/ru/floater_pathfinding_characters.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_characters" title="ПерÑонажи Ñ Ð¿Ð¾Ð¸Ñком пути"> + <floater.string name="messaging_get_inprogress"> + ÐžÐ¿Ñ€Ð¾Ñ Ð¿ÐµÑ€Ñонажей Ñ Ð¿Ð¾Ð¸Ñком пути... + </floater.string> + <floater.string name="messaging_get_error"> + Ошибка при опроÑе перÑонажей Ñ Ð¿Ð¾Ð¸Ñком пути. + </floater.string> + <floater.string name="messaging_complete_none_found"> + Ðет перÑонажей Ñ Ð¿Ð¾Ð¸Ñком пути. + </floater.string> + <floater.string name="messaging_complete_available"> + Выбрано перÑонажей: [NUM_SELECTED] из [NUM_TOTAL]. + </floater.string> + <floater.string name="messaging_not_enabled"> + Ð’ Ñтом регионе не разрешен поиÑк пути. + </floater.string> + <floater.string name="character_cpu_time"> + [CPU_TIME] Ð¼ÐºÑ + </floater.string> + <floater.string name="character_owner_loading"> + [Загрузка] + </floater.string> + <floater.string name="character_owner_unknown"> + [ÐеизвеÑтно] + </floater.string> + <floater.string name="character_owner_group"> + [группа] + </floater.string> + <panel> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="ИмÑ" name="name"/> + <scroll_list.columns label="ОпиÑание" name="description"/> + <scroll_list.columns label="Владелец" name="owner"/> + <scroll_list.columns label="ЦП" name="cpu_time"/> + <scroll_list.columns label="Ð’Ñ‹Ñота" name="altitude"/> + </scroll_list> + <text name="messaging_status"> + ПерÑонажи: + </text> + <button label="Обновить ÑпиÑок" name="refresh_objects_list"/> + <button label="Выбрать вÑе" name="select_all_objects"/> + <button label="Отменить выбор" name="select_none_objects"/> + </panel> + <panel> + <text name="actions_label"> + ДейÑÑ‚Ð²Ð¸Ñ Ñ Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ñ‹Ð¼Ð¸ перÑонажами: + </text> + <check_box label="Показать метку" name="show_beacon"/> + <check_box label="Показать физичеÑкую капÑулу" name="show_physics_capsule"/> + <button label="ВзÑть" name="take_objects"/> + <button label="Сделать копию" name="take_copy_objects"/> + <button label="Телепортировать Ð¼ÐµÐ½Ñ Ñ‚ÑƒÐ´Ð°" name="teleport_me_to_object" tool_tip="Разрешено, только еÑли выбран один перÑонаж."/> + <button label="Возврат" name="return_objects"/> + <button label="Удалить" name="delete_objects"/> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/ru/floater_pathfinding_console.xml new file mode 100644 index 0000000000..fa72df04fd --- /dev/null +++ b/indra/newview/skins/default/xui/ru/floater_pathfinding_console.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_console" title="ПроÑмотр/теÑтирование поиÑка пути"> + <floater.string name="navmesh_viewer_status_library_not_implemented"> + Ðе удалоÑÑŒ найти реализацию библиотеки поиÑка пути + </floater.string> + <floater.string name="navmesh_viewer_status_region_not_enabled"> + Ð’ Ñтом регионе не разрешен поиÑк пути. + </floater.string> + <floater.string name="navmesh_viewer_status_region_loading"> + Ожидание Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ региона. + </floater.string> + <floater.string name="navmesh_viewer_status_checking_version"> + Проверка ÑоÑтоÑÐ½Ð¸Ñ Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð¾Ð¹ Ñетки. + </floater.string> + <floater.string name="navmesh_viewer_status_downloading"> + Загрузка навигационной Ñетки. + </floater.string> + <floater.string name="navmesh_viewer_status_updating"> + Ðа Ñервере изменилаÑÑŒ Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ Ñетка. Загрузка новой навигационной Ñетки. + </floater.string> + <floater.string name="navmesh_viewer_status_has_navmesh"> + Загружена поÑледнÑÑ Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ Ñетка. + </floater.string> + <floater.string name="navmesh_viewer_status_error"> + Ðе удалоÑÑŒ загрузить навигационную Ñетку. + </floater.string> + <floater.string name="navmesh_simulator_status_pending"> + Ð’ навигационной Ñетке еÑть незавершенные изменениÑ. + </floater.string> + <floater.string name="navmesh_simulator_status_building"> + Идет поÑтроение навигационной Ñетки. + </floater.string> + <floater.string name="navmesh_simulator_status_some_pending"> + Ð’ некоторых регионах навигационной Ñетки еÑть незавершенные изменениÑ. + </floater.string> + <floater.string name="navmesh_simulator_status_some_building"> + Идет поÑтроение регионов навигационной Ñетки. + </floater.string> + <floater.string name="navmesh_simulator_status_pending_and_building"> + Ð’ некоторых регионах навигационной Ñетки еÑть незавершенные изменениÑ, идет поÑтроение других регионов. + </floater.string> + <floater.string name="navmesh_simulator_status_complete"> + ÐÐ°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ Ñетка уже обновлена. + </floater.string> + <floater.string name="pathing_library_not_implemented"> + Ðе удалоÑÑŒ найти реализацию библиотеки поиÑка пути + </floater.string> + <floater.string name="pathing_region_not_enabled"> + Ð’ Ñтом регионе не разрешен поиÑк пути. + </floater.string> + <floater.string name="pathing_choose_start_and_end_points"> + Выберите начальную и конечную точки. + </floater.string> + <floater.string name="pathing_choose_start_point"> + Выберите начальную точку. + </floater.string> + <floater.string name="pathing_choose_end_point"> + Выберите конечную точку. + </floater.string> + <floater.string name="pathing_path_valid"> + Путь показан оранжевым цветом. + </floater.string> + <floater.string name="pathing_path_invalid"> + Ðе удалоÑÑŒ найти путь между выбранными точками. + </floater.string> + <floater.string name="pathing_error"> + Ошибка при Ñоздании пути. + </floater.string> + <tab_container name="view_test_tab_container"> + <panel label="Вид" name="view_panel"> + <text name="show_label"> + Показать: + </text> + <check_box label="Мир" name="show_world"/> + <check_box label="Только перемещаемые предметы" name="show_world_movables_only"/> + <check_box label="ÐÐ°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ Ñетка" name="show_navmesh"/> + <text name="show_walkability_label"> + Показать карту проходимоÑти: + </text> + <combo_box name="show_heatmap_mode"> + <combo_box.item label="Ðе показывать" name="show_heatmap_mode_none"/> + <combo_box.item label="Тип перÑонажа A" name="show_heatmap_mode_a"/> + <combo_box.item label="Тип перÑонажа B" name="show_heatmap_mode_b"/> + <combo_box.item label="Тип перÑонажа C" name="show_heatmap_mode_c"/> + <combo_box.item label="Тип перÑонажа D" name="show_heatmap_mode_d"/> + </combo_box> + <check_box label="Проходимые меÑта" name="show_walkables"/> + <check_box label="Материальные объемы" name="show_material_volumes"/> + <check_box label="Статичные препÑÑ‚ÑтвиÑ" name="show_static_obstacles"/> + <check_box label="ИÑключающие объемы" name="show_exclusion_volumes"/> + <check_box label="Водное зеркало" name="show_water_plane"/> + <check_box label="РентгеновÑкое зрение" name="show_xray"/> + </panel> + <panel label="Проверить путь" name="test_panel"> + <text name="ctrl_click_label"> + Ctrl-щелчок Ð´Ð»Ñ Ð²Ñ‹Ð±Ð¾Ñ€Ð° начальной точки. + </text> + <text name="shift_click_label"> + Shift-щелчок Ð´Ð»Ñ Ð²Ñ‹Ð±Ð¾Ñ€Ð° конечной точки. + </text> + <text name="character_width_label"> + Ширина перÑонажа + </text> + <slider name="character_width" value="1"/> + <text name="character_width_unit_label"> + м + </text> + <text name="character_type_label"> + Тип перÑонажа + </text> + <combo_box name="path_character_type"> + <combo_box.item label="Ðет" name="path_character_type_none"/> + <combo_box.item label="A" name="path_character_type_a"/> + <combo_box.item label="B" name="path_character_type_b"/> + <combo_box.item label="C" name="path_character_type_c"/> + <combo_box.item label="D" name="path_character_type_d"/> + </combo_box> + <button label="Удалить путь" name="clear_path"/> + </panel> + </tab_container> +</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/ru/floater_pathfinding_linksets.xml new file mode 100644 index 0000000000..db100fa415 --- /dev/null +++ b/indra/newview/skins/default/xui/ru/floater_pathfinding_linksets.xml @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_linksets" title="Ðаборы ÑвÑзей Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка пути"> + <floater.string name="messaging_get_inprogress"> + Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð½Ð°Ð±Ð¾Ñ€Ð¾Ð² ÑвÑзей Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка пути... + </floater.string> + <floater.string name="messaging_get_error"> + Ошибка при запроÑе наборов ÑвÑзей Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка пути. + </floater.string> + <floater.string name="messaging_set_inprogress"> + Изменение выбранных наборов ÑвÑзей Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка пути... + </floater.string> + <floater.string name="messaging_set_error"> + Ошибка при изменении выбранных наборов ÑвÑзей Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка пути. + </floater.string> + <floater.string name="messaging_complete_none_found"> + Ðет наборов ÑвÑзей Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка пути. + </floater.string> + <floater.string name="messaging_complete_available"> + Выбрано наборов ÑвÑзей: [NUM_SELECTED] из [NUM_TOTAL]. + </floater.string> + <floater.string name="messaging_not_enabled"> + Ð’ Ñтом регионе не разрешен поиÑк пути. + </floater.string> + <floater.string name="linkset_terrain_name"> + [Ландшафт] + </floater.string> + <floater.string name="linkset_terrain_description"> + -- + </floater.string> + <floater.string name="linkset_terrain_owner"> + -- + </floater.string> + <floater.string name="linkset_terrain_scripted"> + -- + </floater.string> + <floater.string name="linkset_terrain_land_impact"> + -- + </floater.string> + <floater.string name="linkset_terrain_dist_from_you"> + -- + </floater.string> + <floater.string name="linkset_owner_loading"> + [Загрузка] + </floater.string> + <floater.string name="linkset_owner_unknown"> + [ÐеизвеÑтно] + </floater.string> + <floater.string name="linkset_owner_group"> + [группа] + </floater.string> + <floater.string name="linkset_is_scripted"> + Да + </floater.string> + <floater.string name="linkset_is_not_scripted"> + Ðет + </floater.string> + <floater.string name="linkset_is_unknown_scripted"> + ÐеизвеÑтно + </floater.string> + <floater.string name="linkset_use_walkable"> + Проходимое меÑто + </floater.string> + <floater.string name="linkset_use_static_obstacle"> + Статичное препÑÑ‚Ñтвие + </floater.string> + <floater.string name="linkset_use_dynamic_obstacle"> + Перемещаемое препÑÑ‚Ñтвие + </floater.string> + <floater.string name="linkset_use_material_volume"> + Материальный объем + </floater.string> + <floater.string name="linkset_use_exclusion_volume"> + ИÑключающий объем + </floater.string> + <floater.string name="linkset_use_dynamic_phantom"> + Перемещаемый фантом + </floater.string> + <floater.string name="linkset_is_terrain"> + [неизменÑемый] + </floater.string> + <floater.string name="linkset_is_restricted_state"> + [ограниченный] + </floater.string> + <floater.string name="linkset_is_non_volume_state"> + [вогнутый] + </floater.string> + <floater.string name="linkset_is_restricted_non_volume_state"> + [ограниченный,вогнутый] + </floater.string> + <floater.string name="linkset_choose_use"> + Выберите Ñтепень иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½Ð°Ð±Ð¾Ñ€Ð¾Ð² ÑвÑзей... + </floater.string> + <panel> + <combo_box name="filter_by_linkset_use"> + <combo_box.item label="Фильтр по Ñтепени иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½Ð°Ð±Ð¾Ñ€Ð¾Ð² ÑвÑзей..." name="filter_by_linkset_use_none"/> + <combo_box.item label="Проходимое меÑто" name="filter_by_linkset_use_walkable"/> + <combo_box.item label="Статичное препÑÑ‚Ñтвие" name="filter_by_linkset_use_static_obstacle"/> + <combo_box.item label="Перемещаемое препÑÑ‚Ñтвие" name="filter_by_linkset_use_dynamic_obstacle"/> + <combo_box.item label="Материальный объем" name="filter_by_linkset_use_material_volume"/> + <combo_box.item label="ИÑключающий объем" name="filter_by_linkset_use_exclusion_volume"/> + <combo_box.item label="Перемещаемый фантом" name="filter_by_linkset_use_dynamic_phantom"/> + </combo_box> + <button label="Применить" name="apply_filters"/> + <button label="ЧиÑто" name="clear_filters"/> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Ð˜Ð¼Ñ (корневой примитив)" name="name"/> + <scroll_list.columns label="ОпиÑание (корневой примитив)" name="description"/> + <scroll_list.columns label="Владелец" name="owner"/> + <scroll_list.columns label="Скриптовые" name="scripted"/> + <scroll_list.columns label="ВоздейÑтвие" name="land_impact"/> + <scroll_list.columns label="РаÑÑтоÑние" name="dist_from_you"/> + <scroll_list.columns label="ИÑпользование набора ÑвÑзей" name="linkset_use"/> + <scroll_list.columns label="A %" name="a_percent"/> + <scroll_list.columns label="B %" name="b_percent"/> + <scroll_list.columns label="C %" name="c_percent"/> + <scroll_list.columns label="D %" name="d_percent"/> + </scroll_list> + <text name="messaging_status"> + Ðаборы ÑвÑзей: + </text> + <button label="Обновить ÑпиÑок" name="refresh_objects_list"/> + <button label="Выбрать вÑе" name="select_all_objects"/> + <button label="Отменить выбор" name="select_none_objects"/> + </panel> + <panel> + <check_box label="Показать метку" name="show_beacon"/> + <button label="ВзÑть" name="take_objects"/> + <button label="Сделать копию" name="take_copy_objects"/> + <button label="Телепортировать Ð¼ÐµÐ½Ñ Ñ‚ÑƒÐ´Ð°" name="teleport_me_to_object"/> + <button label="Возврат" name="return_objects"/> + <button label="Удалить" name="delete_objects"/> + </panel> + <panel> + <text name="walkability_coefficients_label"> + ПроходимоÑть: + </text> + <text name="edit_a_label"> + A + </text> + <line_editor name="edit_a_value" tool_tip="ПроходимоÑть Ð´Ð»Ñ Ð¿ÐµÑ€Ñонажей типа A. Пример перÑонажа – гуманоид."/> + <text name="edit_b_label"> + B + </text> + <line_editor name="edit_b_value" tool_tip="ПроходимоÑть Ð´Ð»Ñ Ð¿ÐµÑ€Ñонажей типа B. Пример перÑонажа – ÑущеÑтво."/> + <text name="edit_c_label"> + C + </text> + <line_editor name="edit_c_value" tool_tip="ПроходимоÑть Ð´Ð»Ñ Ð¿ÐµÑ€Ñонажей типа C. Пример перÑонажа – механизм."/> + <text name="edit_d_label"> + D + </text> + <line_editor name="edit_d_value" tool_tip="ПроходимоÑть Ð´Ð»Ñ Ð¿ÐµÑ€Ñонажей типа D. Пример перÑонажа – иное."/> + <button label="Применить изменениÑ" name="apply_edit_values"/> + <text name="suggested_use_a_label"> + (Гуманоид) + </text> + <text name="suggested_use_b_label"> + (СущеÑтво) + </text> + <text name="suggested_use_c_label"> + (Механизм) + </text> + <text name="suggested_use_d_label"> + (Иное) + </text> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_postcard.xml b/indra/newview/skins/default/xui/ru/floater_postcard.xml deleted file mode 100644 index 889d219511..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_postcard.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="ПОСЛÐТЬ СÐИМОК ПО EMAIL"> - <floater.string name="default_subject"> - Открытка из [SECOND_LIFE]. - </floater.string> - <floater.string name="default_message"> - Побывай здеÑÑŒ! - </floater.string> - <floater.string name="upload_message"> - Отправка... - </floater.string> - <text name="to_label"> - Email получателÑ: - </text> - <text name="from_label"> - Ваш Email: - </text> - <text name="name_label"> - Ваше имÑ: - </text> - <text name="subject_label"> - Тема: - </text> - <line_editor label="Введите тему пиÑьма." name="subject_form"/> - <text name="msg_label"> - Сообщение: - </text> - <text_editor name="msg_form"> - Введите текÑÑ‚ пиÑьма. - </text_editor> - <button label="Отмена" name="cancel_btn"/> - <button label="Отправить" name="send_btn"/> -</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_spellcheck.xml b/indra/newview/skins/default/xui/ru/floater_spellcheck.xml new file mode 100644 index 0000000000..691b4a89c3 --- /dev/null +++ b/indra/newview/skins/default/xui/ru/floater_spellcheck.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_floater" title="ÐаÑтройки проверки правопиÑаниÑ"> + <check_box label="Включить проверку правопиÑаниÑ" name="spellcheck_enable"/> + <text name="spellcheck_main"> + ОÑновной Ñловарь: + </text> + <text label="Журналы:" name="spellcheck_additional"> + Дополнительные Ñловари: + </text> + <text name="spellcheck_available"> + ДоÑтупно + </text> + <text name="spellcheck_active"> + Ðктивно + </text> + <button label="Удалить" name="spellcheck_remove_btn"/> + <button label="Импорт..." name="spellcheck_import_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_spellcheck_import.xml b/indra/newview/skins/default/xui/ru/floater_spellcheck_import.xml new file mode 100644 index 0000000000..a01866db73 --- /dev/null +++ b/indra/newview/skins/default/xui/ru/floater_spellcheck_import.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_import" title="Импорт ÑловарÑ"> + <button label="Обзор" label_selected="Обзор" name="dictionary_path_browse"/> + <button label="Импорт" name="ok_btn"/> + <button label="Отмена" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_stats.xml b/indra/newview/skins/default/xui/ru/floater_stats.xml index 2243c0f385..46426495dc 100644 --- a/indra/newview/skins/default/xui/ru/floater_stats.xml +++ b/indra/newview/skins/default/xui/ru/floater_stats.xml @@ -53,7 +53,13 @@ <stat_bar label="Объекты" name="simobjects"/> <stat_bar label="Ðктивные объекты" name="simactiveobjects"/> <stat_bar label="Ðктивные Ñкрипты" name="simactivescripts"/> + <stat_bar label="Запущенные Ñкрипты" name="simpctscriptsrun"/> <stat_bar label="Ð¡Ð¾Ð±Ñ‹Ñ‚Ð¸Ñ Ñкрипта" name="simscripteps"/> + <stat_view label="ПоиÑк пути" name="simpathfinding"> + <stat_bar label="Ð’Ñ€ÐµÐ¼Ñ ÑˆÐ°Ð³Ð° ИИ" name="simsimaistepmsec"/> + <stat_bar label="Пропущенные ÑилуÑтные шаги" name="simsimskippedsilhouettesteps"/> + <stat_bar label="Обновленные перÑонажи" name="simsimpctsteppedcharacters"/> + </stat_view> <stat_bar label="ВходÑщие пакеты" name="siminpps"/> <stat_bar label="ИÑходÑщие пакеты" name="simoutpps"/> <stat_bar label="Отложенные загрузки" name="simpendingdownloads"/> diff --git a/indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml index f8693b8359..db37089aeb 100644 --- a/indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml @@ -19,6 +19,8 @@ <button label="По умолчанию" label_selected="По умолчанию" name="Default"/> <button label="ОчиÑтить" label_selected="ОчиÑтить" name="Blank"/> <button label="Ðет" label_selected="Ðет" name="None"/> + <check_box initial_value="иÑтина" label="ПроÑмотр вживую" name="apply_immediate_check"/> + <text name="preview_disabled" value="ПроÑмотр отключен"/> <filter_editor label="Фильтровать текÑтуры" name="inventory search editor"/> <check_box initial_value="ложь" label="Показывать папки" name="show_folders_check"/> <button label="Добавить" label_selected="Добавить" name="l_add_btn"/> @@ -30,5 +32,4 @@ </scroll_list> <button label="ОК" label_selected="ОК" name="Select"/> <button label="Отмена" label_selected="Отмена" name="Cancel"/> - <check_box initial_value="иÑтина" label="Применить ÑейчаÑ" name="apply_immediate_check"/> </floater> diff --git a/indra/newview/skins/default/xui/ru/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/ru/floater_texture_fetch_debugger.xml index 034106f24c..628e6c5c87 100644 --- a/indra/newview/skins/default/xui/ru/floater_texture_fetch_debugger.xml +++ b/indra/newview/skins/default/xui/ru/floater_texture_fetch_debugger.xml @@ -45,10 +45,23 @@ <text name="total_time_refetch_vis_cache_label"> 15, Повторное извлечение из кÑша, времÑ: [TIME] Ñ, извлечено: [SIZE] КБ, [PIXEL] МпикÑелов </text> + <text name="total_time_refetch_all_cache_label"> + 16, Повторное извлечение вÑех текÑтур из кÑша, времÑ: [TIME] Ñ, извлечено: [SIZE] КБ, [PIXEL] МпикÑелов + </text> <text name="total_time_refetch_vis_http_label"> - 16, Повторное извлечение из HTTP, времÑ: [TIME] Ñ, извлечено: [SIZE] КБ, [PIXEL] МпикÑелов + 17, Повторное извлечение из HTTP, времÑ: [TIME] Ñ, извлечено: [SIZE] КБ, [PIXEL] МпикÑелов + </text> + <text name="total_time_refetch_all_http_label"> + 18, Повторное извлечение вÑех текÑтур из HTTP, времÑ: [TIME] Ñ, извлечено: [SIZE] КБ, [PIXEL] МпикÑелов + </text> + <spinner label="19, Отношение текÑелы/пикÑелы:" name="texel_pixel_ratio"/> + <text name="texture_source_label"> + 20, ИÑтоÑник текÑтур: </text> - <spinner label="17, Отношение текÑелы/пикÑелы" name="texel_pixel_ratio"/> + <radio_group name="texture_source"> + <radio_item label="КÑш + HTTP" name="0"/> + <radio_item label="Только HTTP" name="1"/> + </radio_group> <button label="ПуÑк" name="start_btn"/> <button label="СброÑ" name="clear_btn"/> <button label="Закрыть" name="close_btn"/> @@ -58,5 +71,7 @@ <button label="Декодировать" name="decode_btn"/> <button label="ТекÑтура GL" name="gl_btn"/> <button label="Повторно извлечь из кÑша" name="refetchviscache_btn"/> + <button label="Повторно извлечь вÑе из кÑша" name="refetchallcache_btn"/> <button label="Повторно извлечь из HTTP" name="refetchvishttp_btn"/> + <button label="Повторно извлечь вÑе из HTTP" name="refetchallhttp_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/ru/floater_tools.xml b/indra/newview/skins/default/xui/ru/floater_tools.xml index 3d7d1198f0..c312f73428 100644 --- a/indra/newview/skins/default/xui/ru/floater_tools.xml +++ b/indra/newview/skins/default/xui/ru/floater_tools.xml @@ -150,6 +150,12 @@ <panel.string name="text modify info 4"> Ðти объекты Ð½ÐµÐ»ÑŒÐ·Ñ Ð¸Ð·Ð¼ÐµÐ½Ñть </panel.string> + <panel.string name="text modify info 5"> + Ðтот объект Ð½ÐµÐ»ÑŒÐ·Ñ Ð¸Ð·Ð¼ÐµÐ½Ñть через границу региона + </panel.string> + <panel.string name="text modify info 6"> + Ðти объекты Ð½ÐµÐ»ÑŒÐ·Ñ Ð¸Ð·Ð¼ÐµÐ½Ñть через границу региона + </panel.string> <panel.string name="text modify warning"> Чтобы задать права доÑтупа, нужно выделить объект целиком </panel.string> @@ -199,12 +205,12 @@ <combo_box.item label="Увеличение" name="Zoom"/> </combo_box> <check_box label="Ð”Ð»Ñ Ð¿Ñ€Ð¾Ð´Ð°Ð¶Ð¸:" name="checkbox for sale"/> + <spinner label="L$" name="Edit Cost"/> <combo_box name="sale type"> <combo_box.item label="Копировать" name="Copy"/> <combo_box.item label="Контент" name="Contents"/> <combo_box.item label="Оригинал" name="Original"/> </combo_box> - <spinner label="Цена: L$" name="Edit Cost"/> <check_box label="Показать в поиÑке" name="search_check" tool_tip="Показывать объект в результатах поиÑка"/> <panel name="perms_build"> <text name="perm_modify"> @@ -240,6 +246,11 @@ F: </text> </panel> + <panel name="pathfinding_attrs_panel"> + <text name="pathfinding_attributes_label"> + Ðтрибуты поиÑка пути: + </text> + </panel> </panel> <panel label="Объект" name="Object"> <check_box label="ФикÑированный" name="checkbox locked" tool_tip="Предотвращение Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð°. Обычно Ñта Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¿Ð¾Ð»ÐµÐ·Ð½Ð° во Ð²Ñ€ÐµÐ¼Ñ Ñтройки Ð´Ð»Ñ Ð¸Ð·Ð±ÐµÐ¶Ð°Ð½Ð¸Ñ Ð½ÐµÐ¶ÐµÐ»Ð°Ñ‚ÐµÐ»ÑŒÐ½Ñ‹Ñ… изменений."/> diff --git a/indra/newview/skins/default/xui/ru/floater_top_objects.xml b/indra/newview/skins/default/xui/ru/floater_top_objects.xml index a6ffe5c030..c7ece5c9c9 100644 --- a/indra/newview/skins/default/xui/ru/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/ru/floater_top_objects.xml @@ -9,9 +9,6 @@ <floater.string name="scripts_score_label"> Ð’Ñ€ÐµÐ¼Ñ </floater.string> - <floater.string name="scripts_mono_time_label"> - Ð’Ñ€ÐµÐ¼Ñ Ð¼Ð¾Ð½Ð¾ - </floater.string> <floater.string name="top_colliders_title"> Лучшие ÑÑ‚Ð¾Ð»ÐºÐ½Ð¾Ð²ÐµÐ½Ð¸Ñ </floater.string> @@ -32,9 +29,10 @@ <scroll_list.columns label="Ðазвание" name="name"/> <scroll_list.columns label="Владелец" name="owner"/> <scroll_list.columns label="МеÑто" name="location"/> + <scroll_list.columns label="УчаÑток" name="parcel"/> <scroll_list.columns label="ВремÑ" name="time"/> - <scroll_list.columns label="Ð’Ñ€ÐµÐ¼Ñ Ð¼Ð¾Ð½Ð¾" name="mono_time"/> <scroll_list.columns label="URL-адреÑа" name="URLs"/> + <scroll_list.columns label="ПамÑть (КБ)" name="memory"/> </scroll_list> <text name="id_text"> ID объекта: @@ -48,6 +46,10 @@ Владелец: </text> <button label="Фильтр" name="filter_owner_btn"/> + <text name="parcel_name_text"> + УчаÑток: + </text> + <button label="Фильтр" name="filter_parcel_btn"/> <button label="Вернуть выбранное" name="return_selected_btn"/> <button label="Вернуть вÑе" name="return_all_btn"/> <button label="Отключить выбранное" name="disable_selected_btn"/> diff --git a/indra/newview/skins/default/xui/ru/floater_water.xml b/indra/newview/skins/default/xui/ru/floater_water.xml deleted file mode 100644 index 5030351f5b..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_water.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Water Floater" title="Ð ÐСШИРЕÐÐЫЙ РЕДÐКТОРВОДЫ"> - <floater.string name="WLDefaultWaterNames"> - По умолчанию:глÑнец:пруд:туман:Second Plague:SNAKE!!!:Valdez - </floater.string> - <text name="KeyFramePresetsText"> - ÐаÑтройки воды: - </text> - <button label="Создать" label_selected="Создать" name="WaterNewPreset"/> - <button label="Сохранить" label_selected="Сохранить" name="WaterSavePreset"/> - <button label="Удалить" label_selected="Удалить" name="WaterDeletePreset"/> - <tab_container name="Water Tabs"> - <panel label="ÐÐСТРОЙКИ" name="Settings"> - <text name="BHText"> - Цвет водного тумана - </text> - <color_swatch name="WaterFogColor" tool_tip="Щелкните Ð´Ð»Ñ Ð²Ñ‹Ð±Ð¾Ñ€Ð° цвета"/> - <text name="WaterFogDensText"> - ПлотноÑть тумана - </text> - <text name="WaterUnderWaterFogModText"> - Подводный туман - </text> - <text name="BDensText"> - Уровень Ð¾Ñ‚Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð²Ð¾Ð»Ð½ - </text> - <slider label="1" name="WaterNormalScaleX"/> - <slider label="2" name="WaterNormalScaleY"/> - <slider label="3" name="WaterNormalScaleZ"/> - <text name="HDText"> - МаÑштаб Ð¤Ñ€ÐµÐ½ÐµÐ»Ñ - </text> - <text name="FresnelOffsetText"> - Сдвиг Ð¤Ñ€ÐµÐ½ÐµÐ»Ñ - </text> - <text name="DensMultText"> - Преломление над водой - </text> - <text name="WaterScaleBelowText"> - Преломление под водой - </text> - <text name="MaxAltText"> - КоÑффициент Ñ€Ð°Ð·Ð¼Ñ‹Ñ‚Ð¸Ñ - </text> - </panel> - <panel label="ИЗОБРÐЖЕÐИЕ" name="Waves"> - <text name="BHText"> - Ðаправление больших волн - </text> - <text name="WaterWave1DirXText"> - X - </text> - <text name="WaterWave1DirYText"> - Y - </text> - <text name="BHText2"> - Ðаправление маленьких волн - </text> - <text name="WaterWave2DirXText"> - X - </text> - <text name="WaterWave2DirYText"> - Y - </text> - <text name="BHText3"> - Карта поверхноÑти - </text> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_windlight_options.xml b/indra/newview/skins/default/xui/ru/floater_windlight_options.xml deleted file mode 100644 index bbb37aaaa0..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_windlight_options.xml +++ /dev/null @@ -1,167 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="WindLight floater" title="Ð ÐСШИРЕÐÐЫЙ РЕДÐКТОРÐЕБÐ"> - <floater.string name="WLDefaultSkyNames"> - A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor's Delight:Sheer Sensuality - </floater.string> - <text name="KeyFramePresetsText"> - ÐаÑтройки неба: - </text> - <button label="ÐоваÑ" label_selected="ÐоваÑ" name="WLNewPreset"/> - <button label="Сохранить" label_selected="Сохранить" name="WLSavePreset"/> - <button label="Удалить" label_selected="Удалить" name="WLDeletePreset"/> - <button label="Редактор Ñуточных циклов" label_selected="Редактор Ñуточных циклов" name="WLDayCycleMenuButton"/> - <tab_container name="WindLight Tabs"> - <panel label="ÐТМОСФЕРÐ" name="Atmosphere"> - <text name="BHText"> - Голубой горизонт - </text> - <text name="BHText2"> - R - </text> - <text name="BHText3"> - G - </text> - <text name="BHText4"> - B - </text> - <text name="BHText5"> - I - </text> - <text name="BDensText"> - Дымка на горизонте - </text> - <text name="BDensText2"> - ÐаÑыщенноÑть голубого - </text> - <text name="BHText6"> - R - </text> - <text name="BHText7"> - G - </text> - <text name="BHText8"> - B - </text> - <text name="BHText9"> - I - </text> - <text name="HDText"> - ПлотноÑть дымки - </text> - <text name="DensMultText"> - КоÑффициент плотноÑти - </text> - <text name="WLDistanceMultText"> - КоÑффициент раÑÑтоÑÐ½Ð¸Ñ - </text> - <text name="MaxAltText"> - МакÑÐ¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ð²Ñ‹Ñота - </text> - </panel> - <panel label="ОСВЕЩЕÐИЕ" name="Lighting"> - <text name="SLCText"> - Цвет Ñолнца/луны - </text> - <text name="BHText"> - R - </text> - <text name="BHText2"> - G - </text> - <text name="BHText3"> - B - </text> - <text name="BHText4"> - I - </text> - <text name="TODText"> - Положение Ñолнца/луны - </text> - <text name="WLAmbientText"> - РаÑÑеÑнное - </text> - <text name="BHText5"> - R - </text> - <text name="BHText6"> - G - </text> - <text name="BHText7"> - B - </text> - <text name="BHText8"> - I - </text> - <text name="WLEastAngleText"> - Смещение отноÑительно воÑтока - </text> - <text name="SunGlowText"> - СиÑние Ñолнца - </text> - <slider label="ФокуÑ" name="WLGlowB"/> - <slider label="Размер" name="WLGlowR"/> - <text name="SceneGammaText"> - Гамма-ÐºÐ¾Ñ€Ñ€ÐµÐºÑ†Ð¸Ñ Ñцены - </text> - <text name="WLStarText"> - ЯркоÑть звезд - </text> - </panel> - <panel label="ОБЛÐКÐ" name="Clouds"> - <text name="WLCloudColorText"> - Цвет - </text> - <text name="BHText"> - R - </text> - <text name="BHText2"> - G - </text> - <text name="BHText3"> - B - </text> - <text name="BHText4"> - I - </text> - <text name="WLCloudColorText2"> - Положение и плотноÑть - </text> - <text name="BHText5"> - X - </text> - <text name="BHText6"> - Y - </text> - <text name="BHText7"> - П - </text> - <text name="WLCloudCoverageText"> - ОблачноÑть - </text> - <text name="WLCloudScaleText"> - Размеры - </text> - <text name="WLCloudDetailText"> - Ð”ÐµÑ‚Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ (положение/плотноÑть) - </text> - <text name="BHText8"> - X - </text> - <text name="BHText9"> - Y - </text> - <text name="BHText10"> - П - </text> - <text name="WLCloudScrollXText"> - СкороÑть по X - </text> - <check_box label="Ðа меÑте" name="WLCloudLockX"/> - <text name="WLCloudScrollYText"> - СкороÑть по Y - </text> - <check_box label="Ðа меÑте" name="WLCloudLockY"/> - <check_box label="Создать клаÑÑичеÑкие облака" name="DrawClassicClouds"/> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/ru/menu_bottomtray.xml b/indra/newview/skins/default/xui/ru/menu_bottomtray.xml deleted file mode 100644 index fa3558945b..0000000000 --- a/indra/newview/skins/default/xui/ru/menu_bottomtray.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<menu name="hide_camera_move_controls_menu"> - <menu_item_check label="Кнопка разговора" name="EnableVoiceChat"/> - <menu_item_check label="Кнопка жеÑтов" name="ShowGestureButton"/> - <menu_item_check label="Кнопка движениÑ" name="ShowMoveButton"/> - <menu_item_check label="Кнопка камеры" name="ShowCameraButton"/> - <menu_item_check label="Кнопка Ñнимка" name="ShowSnapshotButton"/> - <menu_item_check label="Кнопка ÑтроительÑтва" name="ShowBuildButton"/> - <menu_item_check label="Кнопка поиÑка" name="ShowSearchButton"/> - <menu_item_check label="Кнопка карты" name="ShowWorldMapButton"/> - <menu_item_check label="Кнопка миникарты" name="ShowMiniMapButton"/> - <menu_item_call label="Вырезать" name="NearbyChatBar_Cut"/> - <menu_item_call label="Копировать" name="NearbyChatBar_Copy"/> - <menu_item_call label="Ð’Ñтавить" name="NearbyChatBar_Paste"/> - <menu_item_call label="Удалить" name="NearbyChatBar_Delete"/> - <menu_item_call label="Выделить вÑе" name="NearbyChatBar_Select_All"/> -</menu> diff --git a/indra/newview/skins/default/xui/ru/menu_im_well_button.xml b/indra/newview/skins/default/xui/ru/menu_im_well_button.xml deleted file mode 100644 index 5a5bde61b9..0000000000 --- a/indra/newview/skins/default/xui/ru/menu_im_well_button.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<context_menu name="IM Well Button Context Menu"> - <menu_item_call label="Закрыть вÑе" name="Close All"/> -</context_menu> diff --git a/indra/newview/skins/default/xui/ru/menu_inventory.xml b/indra/newview/skins/default/xui/ru/menu_inventory.xml index 49f7281b4e..37ee19fc1d 100644 --- a/indra/newview/skins/default/xui/ru/menu_inventory.xml +++ b/indra/newview/skins/default/xui/ru/menu_inventory.xml @@ -68,6 +68,7 @@ <menu_item_call label="Удалить ÑиÑтемную папку" name="Delete System Folder"/> <menu_item_call label="Ðачать конференцию" name="Conference Chat Folder"/> <menu_item_call label="ВоÑпроизвеÑти" name="Sound Play"/> + <menu_item_call label="Копировать URL SL" name="url_copy"/> <menu_item_call label="О закладке" name="About Landmark"/> <menu_item_call label="Проиграть Ð´Ð»Ñ Ð²Ñех" name="Animation Play"/> <menu_item_call label="Проиграть Ð´Ð»Ñ ÑебÑ" name="Animation Audition"/> diff --git a/indra/newview/skins/default/xui/ru/menu_mode_change.xml b/indra/newview/skins/default/xui/ru/menu_mode_change.xml deleted file mode 100644 index 25d6e9af27..0000000000 --- a/indra/newview/skins/default/xui/ru/menu_mode_change.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<toggleable_menu name="Mode Change"> - <menu_item_check label="ОÑновной" name="BasicMode"/> - <menu_item_check label="РаÑширенный" name="AdvancedMode"/> -</toggleable_menu> diff --git a/indra/newview/skins/default/xui/ru/menu_object.xml b/indra/newview/skins/default/xui/ru/menu_object.xml index d6abfd12a2..288df3beb9 100644 --- a/indra/newview/skins/default/xui/ru/menu_object.xml +++ b/indra/newview/skins/default/xui/ru/menu_object.xml @@ -3,6 +3,8 @@ <menu_item_call label="КоÑнутьÑÑ" name="Object Touch"/> <menu_item_call label="Изменить" name="Edit..."/> <menu_item_call label="СтроительÑтво" name="Build"/> + <menu_item_call label="Показывать в наборах ÑвÑзей" name="show_in_linksets"/> + <menu_item_call label="Показывать в перÑонажах" name="show_in_characters"/> <menu_item_call label="Открыто" name="Open"/> <menu_item_call label="СеÑть здеÑÑŒ" name="Object Sit"/> <menu_item_call label="Ð’Ñтать" name="Object Stand Up"/> diff --git a/indra/newview/skins/default/xui/ru/menu_text_editor.xml b/indra/newview/skins/default/xui/ru/menu_text_editor.xml index 113dd85318..0c928308a1 100644 --- a/indra/newview/skins/default/xui/ru/menu_text_editor.xml +++ b/indra/newview/skins/default/xui/ru/menu_text_editor.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Text editor context menu"> + <menu_item_call label="(неизвеÑтно)" name="Suggestion 1"/> + <menu_item_call label="(неизвеÑтно)" name="Suggestion 2"/> + <menu_item_call label="(неизвеÑтно)" name="Suggestion 3"/> + <menu_item_call label="(неизвеÑтно)" name="Suggestion 4"/> + <menu_item_call label="(неизвеÑтно)" name="Suggestion 5"/> + <menu_item_call label="Добавить в Ñловарь" name="Add to Dictionary"/> + <menu_item_call label="Добавить в ÑпиÑок игнорируемых" name="Add to Ignore"/> <menu_item_call label="Вырезать" name="Cut"/> <menu_item_call label="Копировать" name="Copy"/> <menu_item_call label="Ð’Ñтавить" name="Paste"/> diff --git a/indra/newview/skins/default/xui/ru/menu_viewer.xml b/indra/newview/skins/default/xui/ru/menu_viewer.xml index 701f097ddb..d9425937c3 100644 --- a/indra/newview/skins/default/xui/ru/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ru/menu_viewer.xml @@ -26,6 +26,7 @@ <menu_item_call label="ÐаÑтройки..." name="Preferences"/> <menu_item_call label="Кнопки панели инÑтрументов..." name="Toolbars"/> <menu_item_call label="Скрыть вÑе Ñлементы управлениÑ" name="Hide UI"/> + <menu_item_check label="Показывать приÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ HUD" name="Show HUD Attachments"/> <menu_item_call label="Выход из [APP_NAME]" name="Quit"/> </menu> <menu label="Общение" name="Communicate"> @@ -37,6 +38,7 @@ <menu_item_call label="ДрузьÑ" name="My Friends"/> <menu_item_call label="Группы" name="My Groups"/> <menu_item_call label="Люди неподалеку" name="Active Speakers"/> + <menu_item_call label="Черный ÑпиÑок" name="Block List"/> </menu> <menu label="Мир" name="World"> <menu_item_call label="Добавить закладку на Ñто меÑто" name="Create Landmark Here"/> @@ -122,6 +124,11 @@ <menu_item_call label="ЗапуÑтить Ñкрипты" name="Set Scripts to Running"/> <menu_item_call label="ОÑтановить Ñкрипты" name="Set Scripts to Not Running"/> </menu> + <menu label="ПоиÑк пути" name="Pathfinding"> + <menu_item_call label="Ðаборы ÑвÑзей..." name="pathfinding_linksets_menu_item"/> + <menu_item_call label="ПерÑонажи..." name="pathfinding_characters_menu_item"/> + <menu_item_call label="ПроÑмотр/теÑтирование..." name="pathfinding_console_menu_item"/> + </menu> <menu label="Параметры" name="Options"> <menu_item_check label="Показать раÑширенные разрешениÑ" name="DebugPermissions"/> <menu_item_check label="Выбирать только мои объекты" name="Select Only My Objects"/> @@ -172,7 +179,6 @@ <menu_item_check label="Скрыть чаÑтицы" name="Hide Particles"/> <menu_item_check label="Скрыть выбранное" name="Hide Selected"/> <menu_item_check label="ПодÑветка прозрачного" name="Highlight Transparent"/> - <menu_item_check label="Показывать приÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ HUD" name="Show HUD Attachments"/> <menu_item_check label="Показывать прицел при обзоре мышью" name="ShowCrosshairs"/> </menu> <menu label="Типы визуализации" name="Rendering Types"> @@ -375,7 +381,6 @@ <menu_item_call label="Ðктивировать геометрию перÑонажа" name="Toggle Character Geometry"/> <menu_item_call label="Проверка мужчины" name="Test Male"/> <menu_item_call label="Проверка женщины" name="Test Female"/> - <menu_item_call label="Ðктивировать PG-контент" name="Toggle PG"/> <menu_item_check label="Разрешить выбор аватара" name="Allow Select Avatar"/> </menu> <menu_item_call label="Скинуть параметры" name="Force Params to Default"/> diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml index 97e5ee8c65..85b7074253 100644 --- a/indra/newview/skins/default/xui/ru/notifications.xml +++ b/indra/newview/skins/default/xui/ru/notifications.xml @@ -37,6 +37,12 @@ <button name="Help" text="$helptext"/> </form> </template> + <template name="okhelpignore"> + <form> + <button name="OK_okhelpignore" text="$yestext"/> + <button name="Help_okhelpignore" text="$helptext"/> + </form> + </template> <template name="yesnocancelbuttons"> <form> <button name="Yes" text="$yestext"/> @@ -360,13 +366,19 @@ Ð”Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в [SECOND_LIFE] нужен аккаунт. Создать его? <url name="url"> - http://join.secondlife.com/ + [create_account_url] </url> <usetemplate name="okcancelbuttons" notext="Повторить попытку" yestext="Создать новый аккаунт"/> </notification> <notification name="InvalidCredentialFormat"> Введите Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¸Ð»Ð¸ Ð¸Ð¼Ñ Ð¸ фамилию вашего аватара в поле Â«Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ», затем Ñнова войдите в программу. </notification> + <notification name="InvalidGrid"> + «[GRID]» – недопуÑтимый идентификатор Ñетки. + </notification> + <notification name="InvalidLocationSLURL"> + Ð’ меÑте Ñтарта не указана Ð¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ Ñетка. + </notification> <notification name="DeleteClassified"> Удалить рекламу «[NAME]»? Плата за нее не будет возвращена. @@ -472,8 +484,8 @@ Ошибка при Ñохранении Ñкомпилированного Ñкрипта по Ñледующей причине: [REASON]. Попробуйте Ñохранить Ñкрипт через некоторое времÑ. </notification> <notification name="StartRegionEmpty"> - Ðй-Ñй-Ñй, ваш Ñтартовый регион не определен. -Введите название региона в поле «МеÑто Ñтарта» или выберите в качеÑтве меÑта Ñтарта «Мое поÑледнее меÑтоположение» или «Мой дом». + Ваш Ñтартовый регион не определен. +Введите название региона в поле «МеÑто Ñтарта» или выберите в качеÑтве меÑта Ñтарта «Мое поÑледнее меÑто» или «Мой дом». <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="CouldNotStartStopScript"> @@ -600,6 +612,9 @@ УбедитеÑÑŒ, что вÑе объекты разблокированы и что вы владеете вÑеми ими. </notification> + <notification name="CannotLinkPermanent"> + Объекты Ð½ÐµÐ»ÑŒÐ·Ñ ÑвÑзывать через границу региона. + </notification> <notification name="CannotLinkDifferentOwners"> Ðевозможно объединить объекты: не у вÑех объектов один владелец. @@ -978,6 +993,41 @@ <button name="Cancel" text="Отмена"/> </form> </notification> + <notification label="Добавить ÑпиÑок автозамены" name="AddAutoReplaceList"> + Ð˜Ð¼Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ ÑпиÑка: + <form name="form"> + <button name="SetName" text="OK"/> + </form> + </notification> + <notification label="Переименовать ÑпиÑок автозамены" name="RenameAutoReplaceList"> + Ð˜Ð¼Ñ Â«[DUPNAME]» уже занÑто. + Введите новое уникальное имÑ: + <form name="form"> + <button name="ReplaceList" text="Заменить текущий ÑпиÑок"/> + <button name="SetName" text="ИÑпользовать новое имÑ"/> + </form> + </notification> + <notification name="InvalidAutoReplaceEntry"> + Ключевое Ñлово должно быть одним Ñловом, а поле замены не может быть пуÑтым. + </notification> + <notification name="InvalidAutoReplaceList"> + ÐедопуÑтимый ÑпиÑок замены. + </notification> + <notification name="SpellingDictImportRequired"> + Следует указать файл, Ð¸Ð¼Ñ Ð¸ Ñзык. + </notification> + <notification name="SpellingDictIsSecondary"> + Словарь [DIC_NAME] не ÑвлÑетÑÑ aff-файлом, Ñ‚. е. Ñто «вÑпомогательный» Ñловарь. +Он может иÑпользоватьÑÑ ÐºÐ°Ðº дополнительный, но не как оÑновной Ñловарь. + +См. https://wiki.secondlife.com/wiki/Adding_Spelling_Dictionaries + </notification> + <notification name="SpellingDictImportFailed"> + Ðевозможно Ñкопировать + [FROM_NAME] + в + [TO_NAME] + </notification> <notification label="Сохранить коÑтюм" name="SaveOutfitAs"> Сохранить текущую одежду как новый коÑтюм: <form name="form"> @@ -1157,7 +1207,7 @@ Ð’Ñ‹ перемещены в ÑоÑедний регион. </notification> <notification name="AvatarMovedLast"> - Ваше поÑледнее меÑтоположение ÑÐµÐ¹Ñ‡Ð°Ñ Ð½ÐµÐ´Ð¾Ñтупно. + Требуемое вами меÑтоположение ÑÐµÐ¹Ñ‡Ð°Ñ Ð½ÐµÐ´Ð¾Ñтупно. Ð’Ñ‹ перемещены в ÑоÑедний регион. </notification> <notification name="AvatarMovedHome"> @@ -1176,7 +1226,6 @@ УÑтановка [APP_NAME] завершена. ЕÑли вы иÑпользуете [SECOND_LIFE] впервые, Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в программу вам потребуетÑÑ Ñоздать аккаунт. -ВернутьÑÑ Ð½Ð° [http://join.secondlife.com secondlife.com] Ð´Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð°ÐºÐºÐ°ÑƒÐ½Ñ‚Ð°? <usetemplate name="okcancelbuttons" notext="Продолжить" yestext="Создать аккаунт..."/> </notification> <notification name="LoginPacketNeverReceived"> @@ -1694,83 +1743,128 @@ http://secondlife.com/download. <usetemplate name="okcancelbuttons" notext="Отмена" yestext="OK"/> </notification> <notification name="RegionEntryAccessBlocked"> - Вам Ð½ÐµÐ»ÑŒÐ·Ñ Ð±Ñ‹Ñ‚ÑŒ в Ñтом регионе из-за вашего рейтинга зрелоÑти. Возможно, Ñто результат недоÑтатка информации, подтверждающей ваш возраÑÑ‚. - -УбедитеÑÑŒ, что у Ð²Ð°Ñ ÑƒÑтановлена поÑледнÑÑ Ð²ÐµÑ€ÑÐ¸Ñ ÐºÐ»Ð¸ÐµÐ½Ñ‚Ð°, и прочитайте в Базе знаний о доÑтупе к облаÑÑ‚Ñм Ñ Ñтим рейтингом зрелоÑти. + Ð’Ñ‹ пытаетеÑÑŒ поÑетить регион, контент в котором не ÑоответÑтвует вашим наÑтройкам. Попробуйте изменить наÑтройки в меню «Я > ÐаÑтройки > Общие». <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="RegionEntryAccessBlocked_KB"> - Вам Ð½ÐµÐ»ÑŒÐ·Ñ Ð±Ñ‹Ñ‚ÑŒ в Ñтом регионе из-за вашего рейтинга зрелоÑти. - -Перейти в Базу знаний и ознакомитьÑÑ Ñ Ñ€ÐµÐ¹Ñ‚Ð¸Ð½Ð³Ð°Ð¼Ð¸ зрелоÑти? + <notification name="RegionEntryAccessBlocked_AdultsOnlyContent"> + Ð’Ñ‹ пытаетеÑÑŒ поÑетить регион, контент в котором имеет рейтинг [REGIONMATURITY] и предназначен только Ð´Ð»Ñ Ð²Ð·Ñ€Ð¾Ñлых. <url name="url"> http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="Я не могу войти в Ñтот регион из-за ограничений по рейтингу зрелоÑти" name="okcancelignore" notext="Закрыть" yestext="Перейти в Базу знаний"/> + <usetemplate ignoretext="ПереÑечение региона: вы пытаетеÑÑŒ поÑетить регион, контент в котором предназначен только Ð´Ð»Ñ Ð²Ð·Ñ€Ð¾Ñлых." name="okcancelignore" notext="Закрыть" yestext="Перейти в Базу знаний"/> </notification> <notification name="RegionEntryAccessBlocked_Notify"> - Вам Ð½ÐµÐ»ÑŒÐ·Ñ Ð±Ñ‹Ñ‚ÑŒ в Ñтом регионе из-за вашего рейтинга зрелоÑти. + Ð’Ñ‹ пытаетеÑÑŒ поÑетить регион, контент в котором имеет рейтинг [REGIONMATURITY], но ваши наÑтройки не допуÑкают контента [REGIONMATURITY]. + </notification> + <notification name="RegionEntryAccessBlocked_NotifyAdultsOnly"> + Ð’Ñ‹ пытаетеÑÑŒ поÑетить регион, контент в котором имеет рейтинг [REGIONMATURITY] и предназначен только Ð´Ð»Ñ Ð²Ð·Ñ€Ð¾Ñлых. </notification> <notification name="RegionEntryAccessBlocked_Change"> - Вам Ð½ÐµÐ»ÑŒÐ·Ñ Ð±Ñ‹Ñ‚ÑŒ в Ñтом регионе из-за вашей наÑтройки рейтинга зрелоÑти. - -Ð”Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в желаемый регион измените наÑтройку рейтинга зрелоÑти. ПоÑле Ñтого вам будет разрешено иÑкать и проÑматривать контент [REGIONMATURITY]. Ð”Ð»Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ñ‹ изменений выберите команды «Я > ÐаÑтройки > Общие». + Ð’Ñ‹ пытаетеÑÑŒ поÑетить регион, контент в котором имеет рейтинг [REGIONMATURITY], но ваши наÑтройки не допуÑкают контента [REGIONMATURITY]. Ð’Ñ‹ можете отказатьÑÑ Ð¾Ñ‚ поÑещениÑ, или ваши наÑтройки будут изменены. ПоÑле Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð½Ð°Ñтроек вы можете попробовать войти в регион Ñнова. <form name="form"> - <button name="OK" text="Изменить наÑтройку"/> - <button name="Cancel" text="Закрыть"/> - <ignore name="ignore" text="Ð’Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð°Ñ Ð¼Ð½Ð¾Ð¹ наÑтройка рейтинга запрещает мне вход в регион"/> + <button name="OK" text="Изменить наÑтройки"/> + <button name="Cancel" text="Отмена"/> + <ignore name="ignore" text="ПереÑечение региона: вы пытаетеÑÑŒ поÑетить регион, контент в котором запрещен вашими наÑтройками."/> </form> </notification> + <notification name="RegionEntryAccessBlocked_PreferencesOutOfSync"> + При телепортации возникли техничеÑкие проблемы, так как ваши наÑтройки не Ñинхронизированы Ñ Ñервером. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked"> + Ð’Ñ‹ пытаетеÑÑŒ поÑетить регион, контент в котором не ÑоответÑтвует вашим наÑтройкам. Попробуйте изменить наÑтройки в меню «Я > ÐаÑтройки > Общие». + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TeleportEntryAccessBlocked_AdultsOnlyContent"> + Ð’Ñ‹ пытаетеÑÑŒ поÑетить регион, контент в котором имеет рейтинг [REGIONMATURITY] и предназначен только Ð´Ð»Ñ Ð²Ð·Ñ€Ð¾Ñлых. + <url name="url"> + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview + </url> + <usetemplate ignoretext="ТелепортациÑ: вы пытаетеÑÑŒ поÑетить регион, контент в котором предназначен только Ð´Ð»Ñ Ð²Ð·Ñ€Ð¾Ñлых." name="okcancelignore" notext="Закрыть" yestext="Перейти в Базу знаний"/> + </notification> + <notification name="TeleportEntryAccessBlocked_Notify"> + Ð’Ñ‹ пытаетеÑÑŒ поÑетить регион, контент в котором имеет рейтинг [REGIONMATURITY], но ваши наÑтройки не допуÑкают контента [REGIONMATURITY]. + </notification> + <notification name="TeleportEntryAccessBlocked_NotifyAdultsOnly"> + Ð’Ñ‹ пытаетеÑÑŒ поÑетить регион, контент в котором имеет рейтинг [REGIONMATURITY] и предназначен только Ð´Ð»Ñ Ð²Ð·Ñ€Ð¾Ñлых. + </notification> + <notification name="TeleportEntryAccessBlocked_ChangeAndReTeleport"> + Ð’Ñ‹ пытаетеÑÑŒ поÑетить регион, контент в котором имеет рейтинг [REGIONMATURITY], но ваши наÑтройки не допуÑкают контента [REGIONMATURITY]. Ð’Ñ‹ можете отказатьÑÑ Ð¾Ñ‚ телепортации, или ваши наÑтройки будут изменены. + <form name="form"> + <button name="OK" text="Изменить и продолжить"/> + <button name="Cancel" text="Отмена"/> + <ignore name="ignore" text="Ð¢ÐµÐ»ÐµÐ¿Ð¾Ñ€Ñ‚Ð°Ñ†Ð¸Ñ (возобновлÑемаÑ): вы пытаетеÑÑŒ поÑетить регион, контент в котором запрещен вашими наÑтройками."/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_Change"> + Ð’Ñ‹ пытаетеÑÑŒ поÑетить регион, контент в котором имеет рейтинг [REGIONMATURITY], но ваши наÑтройки не допуÑкают контента [REGIONMATURITY]. Ð’Ñ‹ можете отказатьÑÑ Ð¾Ñ‚ телепортации, или ваши наÑтройки будут изменены. ПоÑле Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð½Ð°Ñтроек вы можете попробовать телепортироватьÑÑ Ñнова. + <form name="form"> + <button name="OK" text="Изменить наÑтройки"/> + <button name="Cancel" text="Отмена"/> + <ignore name="ignore" text="Ð¢ÐµÐ»ÐµÐ¿Ð¾Ñ€Ñ‚Ð°Ñ†Ð¸Ñ (невозобновлÑемаÑ): вы пытаетеÑÑŒ поÑетить регион, контент в котором запрещен вашими наÑтройками."/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_PreferencesOutOfSync"> + При телепортации возникли техничеÑкие проблемы, так как ваши наÑтройки не Ñинхронизированы Ñ Ñервером. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="PreferredMaturityChanged"> - Теперь ваша наÑтройка рейтинга зрелоÑти: [RATING]. + Ð’Ñ‹ больше не будете получать уведомлений о поÑещении региона Ñ ÐºÐ¾Ð½Ñ‚ÐµÐ½Ñ‚Ð¾Ð¼ рейтинга [RATING]. ÐаÑтройки Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐ½Ñ‚Ð° можно изменить на будущее Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ команд меню «Я > ÐаÑтройки > Общие». + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="MaturityChangeError"> + Ðе удалоÑÑŒ изменить ваши наÑтройки так, чтобы вы могли видеть контент Ñ Ñ€ÐµÐ¹Ñ‚Ð¸Ð½Ð³Ð¾Ð¼ [PREFERRED_MATURITY]. Ваши теперешние наÑтройки разрешают проÑматривать контент [ACTUAL_MATURITY]. Попробуйте изменить наÑтройки Ñнова Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ команд меню «Я > ÐаÑтройки > Общие». + <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="LandClaimAccessBlocked"> - Ð’Ñ‹ не можете претендовать на Ñту землю из-за вашего рейтинга зрелоÑти. Возможно, Ñто результат недоÑтатка информации, подтверждающей ваш возраÑÑ‚. - -УбедитеÑÑŒ, что у Ð²Ð°Ñ ÑƒÑтановлена поÑледнÑÑ Ð²ÐµÑ€ÑÐ¸Ñ ÐºÐ»Ð¸ÐµÐ½Ñ‚Ð°, и прочитайте в Базе знаний о доÑтупе к облаÑÑ‚Ñм Ñ Ñтим рейтингом зрелоÑти. + Ð’Ñ‹ претендуете на землю, рейтинг зрелоÑти контента на которой не ÑоответÑтвует вашим наÑтройкам. Попробуйте изменить наÑтройки в меню «Я > ÐаÑтройки > Общие». <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandClaimAccessBlocked_KB"> - Ð’Ñ‹ не можете претендовать на Ñту землю из-за вашего рейтинга зрелоÑти. - -Перейти в Базу знаний и ознакомитьÑÑ Ñ Ñ€ÐµÐ¹Ñ‚Ð¸Ð½Ð³Ð°Ð¼Ð¸ зрелоÑти? + <notification name="LandClaimAccessBlocked_AdultsOnlyContent"> + Ðа Ñту землю могут претендовать только взроÑлые. <url name="url"> http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="Я не могу претендовать на Ñту землю из-за ограничений по рейтингу зрелоÑти" name="okcancelignore" notext="Закрыть" yestext="Перейти в Базу знаний"/> + <usetemplate ignoretext="Ðа Ñту землю могут претендовать только взроÑлые." name="okcancelignore" notext="Закрыть" yestext="Перейти в Базу знаний"/> </notification> <notification name="LandClaimAccessBlocked_Notify"> - Ð’Ñ‹ не можете претендовать на Ñту землю из-за вашего рейтинга зрелоÑти. + Ð’Ñ‹ претендуете на землю, контент на которой имеет рейтинг [REGIONMATURITY], но ваши наÑтройки не допуÑкают контента [REGIONMATURITY]. + </notification> + <notification name="LandClaimAccessBlocked_NotifyAdultsOnly"> + Ð’Ñ‹ претендуете на землю Ñ ÐºÐ¾Ð½Ñ‚ÐµÐ½Ñ‚Ð¾Ð¼ [REGIONMATURITY], который предназначен только Ð´Ð»Ñ Ð²Ð·Ñ€Ð¾Ñлых. </notification> <notification name="LandClaimAccessBlocked_Change"> - Ð’Ñ‹ не можете претендовать на Ñту землю из-за вашей наÑтройки рейтинга зрелоÑти. - -Ðажмите кнопку «Изменить наÑтройку», чтобы повыÑить Ñвой рейтинг зрелоÑти. ПоÑле Ñтого вам будет разрешено иÑкать и проÑматривать контент [REGIONMATURITY]. ЕÑли в будущем понадобитÑÑ Ð¾Ñ‚Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ Ñто изменение, выберите команды «Я > ÐаÑтройки > Общие». - <usetemplate ignoretext="Ð’Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð°Ñ Ð¼Ð½Ð¾Ð¹ наÑтройка рейтинга запрещает мне претендовать на землю" name="okcancelignore" notext="Закрыть" yestext="Изменить наÑтройку"/> + Ð’Ñ‹ претендуете на землю, контент на которой имеет рейтинг [REGIONMATURITY], но ваши наÑтройки не допуÑкают контента [REGIONMATURITY]. Мы можем изменить ваши наÑтройки, поÑле чего вы Ñможете претендовать на землю Ñнова. + <form name="form"> + <button name="OK" text="Изменить наÑтройки"/> + <button name="Cancel" text="Отмена"/> + <ignore name="ignore" text="Ð’Ñ‹ претендуете на землю, контент на которой запрещен вашими наÑтройками."/> + </form> </notification> <notification name="LandBuyAccessBlocked"> - Ð’Ñ‹ не можете купить Ñту землю из-за вашего рейтинга зрелоÑти. Возможно, Ñто результат недоÑтатка информации, подтверждающей ваш возраÑÑ‚. - -УбедитеÑÑŒ, что у Ð²Ð°Ñ ÑƒÑтановлена поÑледнÑÑ Ð²ÐµÑ€ÑÐ¸Ñ ÐºÐ»Ð¸ÐµÐ½Ñ‚Ð°, и прочитайте в Базе знаний о доÑтупе к облаÑÑ‚Ñм Ñ Ñтим рейтингом зрелоÑти. + Ð’Ñ‹ пытаетеÑÑŒ купить землю, рейтинг зрелоÑти контента на которой не ÑоответÑтвует вашим наÑтройкам. Попробуйте изменить наÑтройки в меню «Я > ÐаÑтройки > Общие». <usetemplate name="okbutton" yestext="OK"/> </notification> - <notification name="LandBuyAccessBlocked_KB"> - Ð’Ñ‹ не можете купить Ñту землю из-за вашего рейтинга зрелоÑти. - -Перейти в Базу знаний и ознакомитьÑÑ Ñ Ñ€ÐµÐ¹Ñ‚Ð¸Ð½Ð³Ð°Ð¼Ð¸ зрелоÑти? + <notification name="LandBuyAccessBlocked_AdultsOnlyContent"> + Ðту землю могут купить только взроÑлые. <url name="url"> http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="Я не могу купить Ñту землю из-за ограничений по рейтингу зрелоÑти" name="okcancelignore" notext="Закрыть" yestext="Перейти в Базу знаний"/> + <usetemplate ignoretext="Ðту землю могут купить только взроÑлые." name="okcancelignore" notext="Закрыть" yestext="Перейти в Базу знаний"/> </notification> <notification name="LandBuyAccessBlocked_Notify"> - Ð’Ñ‹ не можете купить Ñту землю из-за вашего рейтинга зрелоÑти. + Ð’Ñ‹ пытаетеÑÑŒ купить землю, контент на которой имеет рейтинг [REGIONMATURITY], но ваши наÑтройки не допуÑкают контента [REGIONMATURITY]. + </notification> + <notification name="LandBuyAccessBlocked_NotifyAdultsOnly"> + Ð’Ñ‹ пытаетеÑÑŒ купить землю Ñ ÐºÐ¾Ð½Ñ‚ÐµÐ½Ñ‚Ð¾Ð¼ [REGIONMATURITY], который предназначен только Ð´Ð»Ñ Ð²Ð·Ñ€Ð¾Ñлых. </notification> <notification name="LandBuyAccessBlocked_Change"> - Ð’Ñ‹ не можете купить Ñту землю из-за выбранного вами рейтинга зрелоÑти. - -Ðажмите кнопку «Изменить наÑтройку», чтобы повыÑить Ñвой рейтинг зрелоÑти. ПоÑле Ñтого вам будет разрешено иÑкать и проÑматривать контент [REGIONMATURITY]. ЕÑли в будущем понадобитÑÑ Ð¾Ñ‚Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ Ñто изменение, выберите команды «Я > ÐаÑтройки > Общие». - <usetemplate ignoretext="Ð’Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð°Ñ Ð¼Ð½Ð¾Ð¹ наÑтройка рейтинга запрещает мне покупать землю" name="okcancelignore" notext="Закрыть" yestext="Изменить наÑтройку"/> + Ð’Ñ‹ пытаетеÑÑŒ купить землю, контент на которой имеет рейтинг [REGIONMATURITY], но ваши наÑтройки не допуÑкают контента [REGIONMATURITY]. Мы можем изменить ваши наÑтройки, поÑле чего вы Ñможете попробовать купить землю Ñнова. + <form name="form"> + <button name="OK" text="Изменить наÑтройки"/> + <button name="Cancel" text="Отмена"/> + <ignore name="ignore" text="Ð’Ñ‹ пытаетеÑÑŒ купить землю, контент на которой запрещен вашими наÑтройками."/> + </form> </notification> <notification name="TooManyPrimsSelected"> Выбрано Ñлишком много примитивов. Выберите [MAX_PRIM_COUNT] или меньше примитивов и повторите попытку. @@ -1824,10 +1918,9 @@ http://secondlife.com/download. </form> </notification> <notification label="Изменен рейтинг зрелоÑти региона" name="RegionMaturityChange"> - Рейтинг зрелоÑти Ð´Ð»Ñ Ñтого региона будет обновлен. + Рейтинг зрелоÑти Ð´Ð»Ñ Ñтого региона был изменен. Отображение Ñтого Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð½Ð° карте может занÑть некоторое времÑ. - -Ð”Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в регионы Ð´Ð»Ñ Ð²Ð·Ñ€Ð¾Ñлых у Ð¶Ð¸Ñ‚ÐµÐ»Ñ Ð´Ð¾Ð»Ð¶ÐµÐ½ быть подтвержденный аккаунт: либо Ñ Ð¿Ð¾Ð´Ñ‚Ð²ÐµÑ€Ð¶Ð´ÐµÐ½Ð¸ÐµÐ¼ возраÑта, либо Ñ Ð¿Ð¾Ð´Ñ‚Ð²ÐµÑ€Ð¶Ð´ÐµÐ½Ð¸ÐµÐ¼ оплаты. + <usetemplate name="okbutton" yestext="OK"/> </notification> <notification label="ÐеÑоответÑтвие верÑии голоÑа" name="VoiceVersionMismatch"> Ð”Ð°Ð½Ð½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ [APP_NAME] неÑовмеÑтима Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸ÐµÐ¹ голоÑового чата в Ñтом регионе. Ð”Ð»Ñ Ð¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð¾Ð¹ работы голоÑового чата необходимо обновить [APP_NAME]. @@ -2117,14 +2210,11 @@ http://secondlife.com/download. <usetemplate ignoretext="Ðадевать одежду, Ñоздаваемую при редактировании моей внешноÑти" name="okcancelignore" notext="Ðет" yestext="Да"/> </notification> <notification name="NotAgeVerified"> - ДоÑтуп к контенту и облаÑÑ‚Ñм Ð´Ð»Ñ Ð²Ð·Ñ€Ð¾Ñлых в Second Life разрешен только Ñ 18 лет. ПоÑетите нашу Ñтраницу проверки возраÑта и подтвердите, что вам уже иÑполнилоÑÑŒ 18. -Страница будет открыта в браузере. - -[_URL] - <url name="url"> - https://secondlife.com/my/account/verification.php - </url> - <usetemplate ignoretext="Мой возраÑÑ‚ не подтвержден" name="okcancelignore" notext="Отмена" yestext="Перейти к проверке возраÑта"/> + Ð’Ñ‹ пытаетеÑÑŒ поÑетить меÑто, доÑтуп в которое разрешен только жителÑм 18 лет и Ñтарше. + <usetemplate ignoretext="Мне еще рано поÑещать меÑта Ñ Ð¾Ð³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ñми по возраÑту." name="okignore" yestext="OK"/> + </notification> + <notification name="NotAgeVerified_Notify"> + Ðто меÑто разрешено Ð´Ð»Ñ Ð¶Ð¸Ñ‚ÐµÐ»ÐµÐ¹ 18 лет и Ñтарше. </notification> <notification name="Cannot enter parcel: no payment info on file"> Ð”Ð»Ñ Ð¿Ð¾ÑÐµÑ‰ÐµÐ½Ð¸Ñ Ñтой облаÑти необходимо зарегиÑтрировать платеж. Перейти на веб-Ñайт [SECOND_LIFE] и ввеÑти Ñту информацию? @@ -2386,6 +2476,23 @@ http://secondlife.com/download. <notification name="NoBuild"> Ð’ Ñтой облаÑти запрещено ÑтроительÑтво. ЗдеÑÑŒ вы не Ñможете Ñтроить или выкладывать объекты. </notification> + <notification name="PathfindingDirty"> + Ð’ регионе еÑть незавершенные Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð¸Ñка пути. ЕÑли у Ð²Ð°Ñ ÐµÑть права на ÑтроительÑтво, воÑÑтановите регион, нажав кнопку «ВоÑÑтановить регион». + </notification> + <notification name="DynamicPathfindingDisabled"> + Ð’ Ñтом регионе не разрешен динамичеÑкий поиÑк пути. Возможны Ð½Ð°Ñ€ÑƒÑˆÐµÐ½Ð¸Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñкриптовых объектов Ñ Ð¸Ñпользованием вызовов LSL поиÑка пути. + </notification> + <notification name="PathfindingRebakeNavmesh"> + Изменение некоторых объектов в регионе может привеÑти к неправильному поведению других подвижных объектов. Чтобы иÑправить их поведение, нажмите кнопку «ВоÑÑтановить регион». Более Ð¿Ð¾Ð´Ñ€Ð¾Ð±Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ â€“ по ÑÑылке «Справка». + <url name="url"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </url> + <usetemplate helptext="Справка" ignoretext="Изменение некоторых объектов в регионе может привеÑти к неправильному поведению других подвижных объектов." name="okhelpignore" yestext="OK"/> + </notification> + <notification name="PathfindingCannotRebakeNavmesh"> + Произошла ошибка. Возможно, неполадка в Ñети или на Ñервере, или у Ð²Ð°Ñ Ð½ÐµÑ‚ прав на ÑтроительÑтво. Иногда Ð´Ð»Ñ ÑƒÑÑ‚Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ñтой проблемы доÑтаточно выйти и Ñнова войти. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="SeeAvatars"> Ðа Ñтом учаÑтке аватары и текÑтовый чат Ñкрыты от другого учаÑтка. Жителей за пределами Ñтого учаÑтка не будет видно, а они не будут видеть ваÑ. Обычный текÑтовый чат на канале 0 также блокируетÑÑ. </notification> @@ -2404,9 +2511,7 @@ http://secondlife.com/download. Ð’Ñ‹ можете претендовать на публичную землю только в регионе, в котором вы находитеÑÑŒ. </notification> <notification name="RegionTPAccessBlocked"> - Вам Ð½ÐµÐ»ÑŒÐ·Ñ Ð±Ñ‹Ñ‚ÑŒ в Ñтом регионе из-за вашего рейтинга зрелоÑти. Подтвердите Ñвой возраÑÑ‚ и/или уÑтановите поÑледнюю верÑию клиента. - -Прочитайте в Базе знаний о доÑтупе к облаÑÑ‚Ñм Ñ Ñтим рейтингом зрелоÑти. + Ð’Ñ‹ пытаетеÑÑŒ поÑетить регион, контент в котором не ÑоответÑтвует вашим наÑтройкам. Попробуйте изменить наÑтройки в меню «Я > ÐаÑтройки > Общие». </notification> <notification name="URBannedFromRegion"> Ð’Ñ‹ забанены в регионе. @@ -2417,11 +2522,11 @@ http://secondlife.com/download. <notification name="ImproperPaymentStatus"> У Ð²Ð°Ñ Ð½ÐµÑ‚ необходимого ÑтатуÑа оплаты Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в Ñтот регион. </notification> - <notification name="MustGetAgeRgion"> - Ð”Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в Ñтот регион необходимо подтверждение возраÑта. + <notification name="MustGetAgeRegion"> + Входить в Ñтот регион могут только жители 18 лет и Ñтарше. </notification> <notification name="MustGetAgeParcel"> - Ð”Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° на Ñтот учаÑток необходимо подтверждение возраÑта. + Входить на Ñтот учаÑток могут только жители 18 лет и Ñтарше. </notification> <notification name="NoDestRegion"> Ðе найден регион назначениÑ. @@ -2523,12 +2628,33 @@ http://secondlife.com/download. <notification name="TeleportOffered"> [NAME_SLURL] предложил(а) телепортировать Ð²Ð°Ñ Ðº Ñебе: -[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> +«[MESSAGE]» +<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] <form name="form"> <button name="Teleport" text="ТелепортациÑ"/> <button name="Cancel" text="Отмена"/> </form> </notification> + <notification name="TeleportOffered_MaturityExceeded"> + [NAME_SLURL] предложил(а) телепортировать Ð²Ð°Ñ Ðº Ñебе: + +«[MESSAGE]» +<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +Ðтот регион Ñодержит контент Ñ Ñ€ÐµÐ¹Ñ‚Ð¸Ð½Ð³Ð¾Ð¼ [REGION_CONTENT_MATURITY], но ваши наÑтройки не допуÑкают контента [REGION_CONTENT_MATURITY]. Ð’Ñ‹ можете отказатьÑÑ Ð¾Ñ‚ телепортации, или ваши наÑтройки будут изменены. + <form name="form"> + <button name="Teleport" text="Изменить и продолжить"/> + <button name="Cancel" text="Отмена"/> + </form> + </notification> + <notification name="TeleportOffered_MaturityBlocked"> + [NAME_SLURL] предложил(а) телепортировать Ð²Ð°Ñ Ðº Ñебе: + +«[MESSAGE]» +<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +Однако Ñтот регион Ñодержит контент, доÑтупный только Ð´Ð»Ñ Ð²Ð·Ñ€Ð¾Ñлых. + </notification> <notification name="TeleportOfferSent"> Предложение телепортации отправлено [TO_NAME] </notification> @@ -2932,6 +3058,10 @@ http://secondlife.com/download. ( [EXISTENCE] Ñек. жизни ) Ð’Ñ‹ локально обновили готовую текÑтуру [RESOLUTION] Ð´Ð»Ñ Â«[BODYREGION]» через [TIME] Ñек. </notification> + <notification name="LivePreviewUnavailable"> + ПроÑмотр Ñтой текÑтуры невозможен, так как запрещено ее копирование и/или переноÑ. + <usetemplate ignoretext="Предупреждать, еÑли режим проÑмотра вживую недоÑтупен Ð´Ð»Ñ Ñ‚ÐµÐºÑтур Ñ Ð·Ð°Ð¿Ñ€ÐµÑ‰ÐµÐ½Ð½Ñ‹Ð¼ копированием и/или переноÑом" name="okignore" yestext="OK"/> + </notification> <notification name="ConfirmLeaveCall"> ДейÑтвительно покинуть Ñтот разговор? <usetemplate ignoretext="Подтверждать перед выходом из разговора" name="okcancelignore" notext="Ðет" yestext="Да"/> @@ -3103,6 +3233,62 @@ http://secondlife.com/download. Ðто дейÑтвие приведет к Ñкрытию вÑех меню и кнопок. Чтобы вернуть их, щелкните [SHORTCUT] Ñнова. <usetemplate ignoretext="Подтверждать перед Ñкрытием интерфейÑа" name="okcancelignore" notext="Отмена" yestext="OK"/> </notification> + <notification name="PathfindingLinksets_WarnOnPhantom"> + Признак фантомноÑти некоторых выбранных наборов ÑвÑзей будет изменен. + +Продолжить? + <usetemplate ignoretext="Признак фантомноÑти некоторых выбранных наборов ÑвÑзей будет изменен." name="okcancelignore" notext="Отмена" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted"> + Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… выбранных наборов ÑвÑзей Ð½ÐµÐ»ÑŒÐ·Ñ Ð·Ð°Ð´Ð°Ñ‚ÑŒ тип «[REQUESTED_TYPE]» из-за ограничений Ñтих наборов. Ðти наборы ÑвÑзей будут иметь тип «[RESTRICTED_TYPE]». + +Продолжить? + <usetemplate ignoretext="ÐÐµÐ»ÑŒÐ·Ñ Ð·Ð°Ð´Ð°Ñ‚ÑŒ некоторые выбранные наборы ÑвÑзей из-за ограничений Ñтих наборов." name="okcancelignore" notext="Отмена" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnVolume"> + Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… выбранных наборов ÑвÑзей невозможно задать тип «[REQUESTED_TYPE]», так как фигура не выпуклаÑ. + +Продолжить? + <usetemplate ignoretext="ÐÐµÐ»ÑŒÐ·Ñ Ð·Ð°Ð´Ð°Ñ‚ÑŒ некоторые выбранные наборы ÑвÑзей, так как фигура не выпуклаÑ." name="okcancelignore" notext="Отмена" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted"> + Признак фантомноÑти некоторых выбранных наборов ÑвÑзей будет изменен. + +Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… выбранных наборов ÑвÑзей Ð½ÐµÐ»ÑŒÐ·Ñ Ð·Ð°Ð´Ð°Ñ‚ÑŒ тип «[REQUESTED_TYPE]» из-за ограничений Ñтих наборов. Ðти наборы ÑвÑзей будут иметь тип «[RESTRICTED_TYPE]». + +Продолжить? + <usetemplate ignoretext="Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… выбранных наборов ÑвÑзей будет изменен признак фантомноÑти, а другие наборы Ð½ÐµÐ»ÑŒÐ·Ñ Ð·Ð°Ð´Ð°Ñ‚ÑŒ из-за ограничений Ñтих наборов." name="okcancelignore" notext="Отмена" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnVolume"> + Признак фантомноÑти некоторых выбранных наборов ÑвÑзей будет изменен. + +Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… выбранных наборов ÑвÑзей невозможно задать тип «[REQUESTED_TYPE]», так как фигура не выпуклаÑ. + +Продолжить? + <usetemplate ignoretext="Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… выбранных наборов ÑвÑзей будет изменен признак фантомноÑти, а другие наборы Ð½ÐµÐ»ÑŒÐ·Ñ Ð·Ð°Ð´Ð°Ñ‚ÑŒ, так как фигура не выпуклаÑ." name="okcancelignore" notext="Отмена" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted_MismatchOnVolume"> + Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… выбранных наборов ÑвÑзей Ð½ÐµÐ»ÑŒÐ·Ñ Ð·Ð°Ð´Ð°Ñ‚ÑŒ тип «[REQUESTED_TYPE]» из-за ограничений Ñтих наборов. Ðти наборы ÑвÑзей будут иметь тип «[RESTRICTED_TYPE]». + +Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… выбранных наборов ÑвÑзей невозможно задать тип «[REQUESTED_TYPE]», так как фигура не выпуклаÑ. Тип иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñтих наборов ÑвÑзей не изменитÑÑ. + +Продолжить? + <usetemplate ignoretext="ÐÐµÐ»ÑŒÐ·Ñ Ð·Ð°Ð´Ð°Ñ‚ÑŒ некоторые выбранные наборы ÑвÑзей из-за ограничений Ñтих наборов и потому, что фигура не выпуклаÑ." name="okcancelignore" notext="Отмена" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted_MismatchOnVolume"> + Признак фантомноÑти некоторых выбранных наборов ÑвÑзей будет изменен. + +Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… выбранных наборов ÑвÑзей Ð½ÐµÐ»ÑŒÐ·Ñ Ð·Ð°Ð´Ð°Ñ‚ÑŒ тип «[REQUESTED_TYPE]» из-за ограничений Ñтих наборов. Ðти наборы ÑвÑзей будут иметь тип «[RESTRICTED_TYPE]». + +Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… выбранных наборов ÑвÑзей невозможно задать тип «[REQUESTED_TYPE]», так как фигура не выпуклаÑ. Тип иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñтих наборов ÑвÑзей не изменитÑÑ. + +Продолжить? + <usetemplate ignoretext="Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… выбранных наборов ÑвÑзей будет изменен признак фантомноÑти, а другие наборы Ð½ÐµÐ»ÑŒÐ·Ñ Ð·Ð°Ð´Ð°Ñ‚ÑŒ из-за ограничений Ñтих наборов и потому, что фигура не выпуклаÑ." name="okcancelignore" notext="Отмена" yestext="OK"/> + </notification> + <notification name="PathfindingLinksets_ChangeToFlexiblePath"> + Выбранный объект влиÑет на навигационную Ñетку. ЕÑли заменить его на гибкий путь, он будет удален из навигационной Ñетки. + <usetemplate ignoretext="Выбранный объект влиÑет на навигационную Ñетку. ЕÑли заменить его на гибкий путь, он будет удален из навигационной Ñетки." name="okcancelignore" notext="Отмена" yestext="OK"/> + </notification> <global name="UnsupportedGLRequirements"> По-видимому, ваше оборудование не удовлетворÑет требованиÑм [APP_NAME]. Ð”Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ [APP_NAME] необходима графичеÑÐºÐ°Ñ ÐºÐ°Ñ€Ñ‚Ð° OpenGL Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ¾Ð¹ мультитекÑтур. ЕÑли у Ð²Ð°Ñ ÐµÑть Ñ‚Ð°ÐºÐ°Ñ ÐºÐ°Ñ€Ñ‚Ð°, убедитеÑÑŒ, что уÑтановлены новейшие верÑии драйверов Ð´Ð»Ñ Ð½ÐµÐµ и пакеты обновлений и иÑÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð¾Ð¹ ÑиÑтемы. @@ -3139,4 +3325,12 @@ http://secondlife.com/download. Попытка добавить недопуÑтимый или нечитаемый файл Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ [FNAME], который не удалоÑÑŒ открыть или декодировать. Попытка отменена. </notification> + <notification name="PathfindingReturnMultipleItems"> + Возвращено [NUM_ITEMS] Ñлементов. Продолжить? + <usetemplate ignoretext="Возвратить неÑколько предметов?" name="okcancelignore" notext="Ðет" yestext="Да"/> + </notification> + <notification name="PathfindingDeleteMultipleItems"> + Ð’Ñ‹ удалÑете неÑколько предметов ([NUM_ITEMS]). Продолжить? + <usetemplate ignoretext="Удалить неÑколько предметов?" name="okcancelignore" notext="Ðет" yestext="Да"/> + </notification> </notifications> diff --git a/indra/newview/skins/default/xui/ru/panel_bottomtray.xml b/indra/newview/skins/default/xui/ru/panel_bottomtray.xml deleted file mode 100644 index ebf6c4264b..0000000000 --- a/indra/newview/skins/default/xui/ru/panel_bottomtray.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="bottom_tray"> - <string name="DragIndicationImageName" value="Accordion_ArrowOpened_Off"/> - <string name="SpeakBtnToolTip" value="Включить/выключить микрофон"/> - <string name="VoiceControlBtnToolTip" value="Показать/Ñкрыть панель ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð³Ð¾Ð»Ð¾Ñом"/> - <layout_stack name="toolbar_stack"> - <layout_panel name="speak_panel"> - <talk_button name="talk"> - <speak_button label="Говорить" label_selected="Говорить" name="speak_btn"/> - </talk_button> - </layout_panel> - <layout_panel name="gesture_panel"> - <gesture_combo_list label="ЖеÑты" name="Gesture" tool_tip="Показать/Ñкрыть жеÑты"/> - </layout_panel> - <layout_panel name="movement_panel"> - <bottomtray_button label="Перемещение" name="movement_btn" tool_tip="Показать/Ñкрыть панель ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð²Ð¸Ð¶ÐµÐ½Ð¸ÐµÐ¼"/> - </layout_panel> - <layout_panel name="cam_panel"> - <bottomtray_button label="Камера" name="camera_btn" tool_tip="Показать/Ñкрыть управление камерой"/> - </layout_panel> - <layout_panel name="snapshot_panel"> - <bottomtray_button name="snapshots" tool_tip="Сделать Ñнимок"/> - </layout_panel> - <layout_panel name="build_btn_panel"> - <bottomtray_button label="СтроительÑтво" name="build_btn" tool_tip="Показать/Ñкрыть инÑтрументы"/> - </layout_panel> - <layout_panel name="search_btn_panel"> - <bottomtray_button label="ПоиÑк" name="search_btn" tool_tip="Показать/Ñкрыть поиÑк"/> - </layout_panel> - <layout_panel name="world_map_btn_panel"> - <bottomtray_button label="Карта" name="world_map_btn" tool_tip="Показать/Ñкрыть карту мира"/> - </layout_panel> - <layout_panel name="mini_map_btn_panel"> - <bottomtray_button label="Миникарта" name="mini_map_btn" tool_tip="Показать/Ñкрыть миникарту"/> - </layout_panel> - <layout_panel name="im_well_panel"> - <chiclet_im_well name="im_well"> - <button name="Unread IM messages" tool_tip="Общение"/> - </chiclet_im_well> - </layout_panel> - <layout_panel name="notification_well_panel"> - <chiclet_notification name="notification_well"> - <button name="Unread" tool_tip="УведомлениÑ"/> - </chiclet_notification> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/ru/panel_group_invite.xml b/indra/newview/skins/default/xui/ru/panel_group_invite.xml index 3041046041..68dac5cd7e 100644 --- a/indra/newview/skins/default/xui/ru/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/ru/panel_group_invite.xml @@ -9,6 +9,9 @@ <panel.string name="already_in_group"> ÐеÑколько выбранных жителей уже ÑоÑтоÑÑ‚ в группе. Им Ð¿Ñ€Ð¸Ð³Ð»Ð°ÑˆÐµÐ½Ð¸Ñ Ð½Ðµ были отправлены. </panel.string> + <panel.string name="invite_selection_too_large"> + Групповые Ð¿Ñ€Ð¸Ð³Ð»Ð°ÑˆÐµÐ½Ð¸Ñ Ð½Ðµ отправлены: выбрано Ñлишком много жителей. Групповые Ð¿Ñ€Ð¸Ð³Ð»Ð°ÑˆÐµÐ½Ð¸Ñ Ð¼Ð¾Ð³ÑƒÑ‚ охватывать не более 100 пользователей за один запроÑ. + </panel.string> <text name="help_text"> Можно выбрать неÑколько жителей Ð´Ð»Ñ Ð¿Ñ€Ð¸Ð³Ð»Ð°ÑˆÐµÐ½Ð¸Ñ Ð² группу. Чтобы начать, щелкните «Выбрать жителей». </text> diff --git a/indra/newview/skins/default/xui/ru/panel_login.xml b/indra/newview/skins/default/xui/ru/panel_login.xml index 7928191fa6..f0877731c6 100644 --- a/indra/newview/skins/default/xui/ru/panel_login.xml +++ b/indra/newview/skins/default/xui/ru/panel_login.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_login"> - <panel.string name="create_account_url"> - http://join.secondlife.com/ - </panel.string> <panel.string name="forgot_password_url"> http://secondlife.com/account/request.php </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> + <text name="log_in_text"> + ВОЙТИ + </text> <text name="username_text"> Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ: </text> @@ -15,15 +15,8 @@ <text name="password_text"> Пароль: </text> - <check_box label="Запомнить пароль" name="remember_check"/> - <button label="Войти" name="connect_btn"/> - <text name="mode_selection_text"> - Режим: - </text> - <combo_box name="mode_combo" tool_tip="Выберите режим. ОÑновной – Ð´Ð»Ñ Ð±Ñ‹Ñтрого и проÑтого Ð¾Ð·Ð½Ð°ÐºÐ¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ñ Ð¸Ð³Ñ€Ð¾Ð¹, а также общениÑ. РаÑширенный – Ð´Ð»Ñ Ð´Ð¾Ñтупа к более широким возможноÑÑ‚Ñм."> - <combo_box.item label="ОÑновной" name="Basic"/> - <combo_box.item label="РаÑширенный" name="Advanced"/> - </combo_box> + </layout_panel> + <layout_panel name="start_location_panel"> <text name="start_location_text"> МеÑто Ñтарта: </text> @@ -33,16 +26,21 @@ <combo_box.item label="<Введите название региона>" name="Typeregionname"/> </combo_box> </layout_panel> - <layout_panel name="links"> - <text name="create_new_account_text"> - РегиÑÑ‚Ñ€Ð°Ñ†Ð¸Ñ + <layout_panel name="links_login_panel"> + <text name="login_help"> + Ðужна помощь при входе? </text> <text name="forgot_password_text"> Забыли Ð¸Ð¼Ñ Ð¸Ð»Ð¸ пароль? </text> - <text name="login_help"> - Ðужна помощь при входе? + <button label="Войти" name="connect_btn"/> + <check_box label="Запомнить пароль" name="remember_check"/> + </layout_panel> + <layout_panel name="links"> + <text name="create_account_text"> + СОЗДÐЙТЕ СВОЙ ÐККÐУÐТ </text> + <button label="Ðачать" name="create_new_account_btn"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/ru/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/ru/panel_nearby_chat_bar.xml index 804ba7def7..395c643b0b 100644 --- a/indra/newview/skins/default/xui/ru/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/ru/panel_nearby_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="chat_bar"> +<panel name="nearby_chat"> <line_editor label="Щелкните здеÑÑŒ Ð´Ð»Ñ Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ" name="chat_box" tool_tip="Ðажмите Enter, чтобы Ñказать, Ctrl+Enter, чтобы прокричать"/> <button name="show_nearby_chat" tool_tip="Показать/Ñкрыть лог локального чата"/> </panel> diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml b/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml index a9d5569c7f..9283fc9e6e 100644 --- a/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml @@ -29,5 +29,7 @@ <check_box label="ТекÑтовые чаты" name="EnableIMChatPopups" tool_tip="Отображать вÑплывающие ÑƒÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¸ получении IM-Ñообщений"/> <spinner label="Ð’Ñ€ÐµÐ¼Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð²Ñплывающих реплик:" name="nearby_toasts_lifetime"/> <spinner label="Ð’Ñ€ÐµÐ¼Ñ Ð·Ð°Ñ‚ÑƒÑ…Ð°Ð½Ð¸Ñ Ð²Ñплывающих реплик:" name="nearby_toasts_fadingtime"/> - <button label="ÐаÑтройки перевода чата" name="ok_btn"/> + <button label="Перевод..." name="ok_btn"/> + <button label="Ðвтозамена..." name="autoreplace_showgui"/> + <button label="Проверка правопиÑаниÑ..." name="spellcheck_showgui"/> </panel> diff --git a/indra/newview/skins/default/xui/ru/panel_region_debug.xml b/indra/newview/skins/default/xui/ru/panel_region_debug.xml index c21d2d7051..4be1e781fa 100644 --- a/indra/newview/skins/default/xui/ru/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/ru/panel_region_debug.xml @@ -30,5 +30,5 @@ <button label="Самые активные учаÑтники Ñтолкновений..." name="top_colliders_btn" tool_tip="СпиÑок объектов, Ð´Ð»Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… ÑÑ‚Ð¾Ð»ÐºÐ½Ð¾Ð²ÐµÐ½Ð¸Ñ Ð½Ð°Ð¸Ð±Ð¾Ð»ÐµÐµ вероÑтны"/> <button label="СпиÑок лучших Ñкриптов..." name="top_scripts_btn" tool_tip="Объекты, в которых Ñкрипты выполнÑÑŽÑ‚ÑÑ Ð´Ð¾Ð»ÑŒÑˆÐµ вÑего"/> <button label="Перезагрузить регион" name="restart_btn" tool_tip="ОтÑчитать 2 минуты и перезагрузить регион"/> - <button label="Отложить перезагрузку" name="cancel_restart_btn" tool_tip="Отложить перезагрузку региона на чаÑ"/> + <button label="Отменить перезапуÑк" name="cancel_restart_btn" tool_tip="Отменить перезапуÑк региона"/> </panel> diff --git a/indra/newview/skins/default/xui/ru/panel_region_estate.xml b/indra/newview/skins/default/xui/ru/panel_region_estate.xml index 93b21704bc..bcfb974fcb 100644 --- a/indra/newview/skins/default/xui/ru/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/ru/panel_region_estate.xml @@ -23,7 +23,7 @@ Разрешить доÑтуп только таким жителÑм: </text> <check_box label="ЗарегиÑтрирована Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾Ð± оплате" name="limit_payment" tool_tip="Ð”Ð»Ñ Ð´Ð¾Ñтупа к Ñтому землевладению у Ð¶Ð¸Ñ‚ÐµÐ»Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° быть зарегиÑтрирована Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾Ð± оплате. Более Ð¿Ð¾Ð´Ñ€Ð¾Ð±Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð·Ð´ÐµÑÑŒ: [SUPPORT_SITE]."/> - <check_box label="Подтвержден возраÑÑ‚" name="limit_age_verified" tool_tip="Ð”Ð»Ñ Ð´Ð¾Ñтупа к Ñтому землевладению житель должен подтвердить Ñвой возраÑÑ‚. Более Ð¿Ð¾Ð´Ñ€Ð¾Ð±Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð·Ð´ÐµÑÑŒ: [SUPPORT_SITE]."/> + <check_box label="18 лет и Ñтарше" name="limit_age_verified" tool_tip="ДоÑтуп к Ñтому землевладению имеют только жители 18 лет и Ñтарше. Более Ð¿Ð¾Ð´Ñ€Ð¾Ð±Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð·Ð´ÐµÑÑŒ: [SUPPORT_SITE]."/> <check_box label="Разрешить голоÑовое общение" name="voice_chat_check"/> <check_box label="Разрешить прÑмой телепорт" name="allow_direct_teleport"/> <button label="Применить" name="apply_btn"/> diff --git a/indra/newview/skins/default/xui/ru/panel_region_texture.xml b/indra/newview/skins/default/xui/ru/panel_region_texture.xml deleted file mode 100644 index c4b35a536d..0000000000 --- a/indra/newview/skins/default/xui/ru/panel_region_texture.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="ТекÑтуры земли" name="Textures"> - <text name="region_text_lbl"> - Регион: - </text> - <text name="region_text"> - неизвеÑтен - </text> - <text name="detail_texture_text"> - ТекÑтуры ландшафта (требованиÑ: 512x512, 24-битные TGA-файлы) - </text> - <text name="height_text_lbl"> - 1 (низ) - </text> - <text name="height_text_lbl2"> - 2 - </text> - <text name="height_text_lbl3"> - 3 - </text> - <text name="height_text_lbl4"> - 4 (верх) - </text> - <text name="height_text_lbl5"> - Диапазон выÑот текÑтур - </text> - <text name="height_text_lbl6"> - Северо-запад - </text> - <text name="height_text_lbl7"> - Северо-воÑток - </text> - <spinner label="Ðиз" name="height_start_spin_1"/> - <spinner label="Ðиз" name="height_start_spin_3"/> - <spinner label="Верх" name="height_range_spin_1"/> - <spinner label="Верх" name="height_range_spin_3"/> - <text name="height_text_lbl8"> - Юго-запад - </text> - <text name="height_text_lbl9"> - Юго-воÑток - </text> - <spinner label="Ðиз" name="height_start_spin_0"/> - <spinner label="Ðиз" name="height_start_spin_2"/> - <spinner label="Верх" name="height_range_spin_0"/> - <spinner label="Верх" name="height_range_spin_2"/> - <text name="height_text_lbl10"> - Ðти Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶Ð°ÑŽÑ‚ диапазон Ð¿ÐµÑ€ÐµÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ð²Ñ‹ÑˆÐµÑƒÐºÐ°Ð·Ð°Ð½Ð½Ñ‹Ñ… текÑтур. - </text> - <text name="height_text_lbl11"> - ИзмерÑетÑÑ Ð² метрах, значение «Ðиз» – Ñто МÐКСИМÐЛЬÐÐЯ выÑота текÑтуры â„–1, значение «Верх» – Ñто МИÐИМÐЛЬÐÐЯ выÑота текÑтуры â„–4. - </text> - <button label="Применить" name="apply_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/ru/panel_side_tray.xml b/indra/newview/skins/default/xui/ru/panel_side_tray.xml deleted file mode 100644 index 10c5775291..0000000000 --- a/indra/newview/skins/default/xui/ru/panel_side_tray.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<!-- Side tray cannot show background because it is always - partially on screen to hold tab buttons. --> -<side_tray name="sidebar"> - <sidetray_tab description="Открыть/закрыть боковую панель" name="sidebar_openclose" tab_title="Открыть/закрыть боковую панель"/> - <sidetray_tab description="Дом." name="sidebar_home" tab_title="Дом"> - <panel label="дом" name="panel_home"/> - </sidetray_tab> - <sidetray_tab description="Изменение Ñвоего Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ Ð¸ подборки." name="sidebar_me" tab_title="Мой профиль"> - <panel_container name="panel_container"> - <panel label="Я" name="panel_me"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="ПоиÑк друзей, контактов и находÑщихÑÑ Ð¿Ð¾Ð±Ð»Ð¸Ð·Ð¾Ñти людей." name="sidebar_people" tab_title="Люди"> - <panel_container name="panel_container"> - <panel label="Профиль группы" name="panel_group_info_sidetray"/> - <panel label="Черный ÑпиÑок жителей и объектов" name="panel_block_list_sidetray"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="ПоиÑк меÑÑ‚, которые можно было бы поÑетить или которые вы уже поÑещали ранее." label="МеÑта" name="sidebar_places" tab_title="МеÑта"> - <panel label="МеÑта" name="panel_places"/> - </sidetray_tab> - <sidetray_tab description="ПроÑмотрите Ñвой инвентарь." name="sidebar_inventory" tab_title="Мой инвентарь"> - <panel label="Изменить инвентарь" name="sidepanel_inventory"/> - </sidetray_tab> - <sidetray_tab description="Изменение внешнего вида и текущего образа." name="sidebar_appearance" tab_title="Мой внешний вид"> - <panel label="Изменить внешний вид" name="sidepanel_appearance"/> - </sidetray_tab> -</side_tray> diff --git a/indra/newview/skins/default/xui/ru/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/ru/panel_volume_pulldown.xml new file mode 100644 index 0000000000..fe044cd083 --- /dev/null +++ b/indra/newview/skins/default/xui/ru/panel_volume_pulldown.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="volumepulldown_floater"> + <slider label="ОбщаÑ" name="System Volume"/> + <slider label="Кнопки" name="UI Volume"/> + <slider label="ОкружающаÑ" name="Wind Volume"/> + <slider label="Звуки" name="SFX Volume"/> + <check_box name="gesture_audio_play_btn" tool_tip="Включить звуки от жеÑтов"/> + <slider label="Музыка" name="Music Volume"/> + <check_box name="enable_music" tool_tip="Включить потоковую музыку"/> + <slider label="Медиа" name="Media Volume"/> + <check_box name="enable_media" tool_tip="Включить потоковое медиа"/> + <slider label="ГолоÑ" name="Voice Volume"/> + <check_box name="enable_voice_check" tool_tip="Включить голоÑовой чат"/> +</panel> diff --git a/indra/newview/skins/default/xui/ru/sidepanel_item_info.xml b/indra/newview/skins/default/xui/ru/sidepanel_item_info.xml index 62095acbaf..0106ed50ac 100644 --- a/indra/newview/skins/default/xui/ru/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/ru/sidepanel_item_info.xml @@ -3,6 +3,9 @@ <panel.string name="unknown"> (неизвеÑтно) </panel.string> + <panel.string name="unknown_multiple"> + (неизвеÑтно/неÑколько) + </panel.string> <panel.string name="public"> (публичное) </panel.string> diff --git a/indra/newview/skins/default/xui/ru/sidepanel_task_info.xml b/indra/newview/skins/default/xui/ru/sidepanel_task_info.xml index 8e56dd80c0..e9dd3760b5 100644 --- a/indra/newview/skins/default/xui/ru/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/ru/sidepanel_task_info.xml @@ -18,6 +18,12 @@ <panel.string name="text modify info 4"> Ðти объекты Ð½ÐµÐ»ÑŒÐ·Ñ Ð¸Ð·Ð¼ÐµÐ½Ñть </panel.string> + <panel.string name="text modify info 5"> + Ðтот объект Ð½ÐµÐ»ÑŒÐ·Ñ Ð¸Ð·Ð¼ÐµÐ½Ñть через границу региона + </panel.string> + <panel.string name="text modify info 6"> + Ðти объекты Ð½ÐµÐ»ÑŒÐ·Ñ Ð¸Ð·Ð¼ÐµÐ½Ñть через границу региона + </panel.string> <panel.string name="text modify warning"> Ðтот объект Ñодержит объединенные чаÑти </panel.string> @@ -95,6 +101,9 @@ </combo_box> <spinner label="Цена: L$" name="Edit Cost"/> <check_box label="Показать в результатах поиÑка" name="search_check" tool_tip="Показывать объект в результатах поиÑка"/> + <text name="pathfinding_attributes_label"> + Ðтрибуты поиÑка пути: + </text> <text name="B:"> Ð: </text> diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index 6461e10e2d..f9ded799bf 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -137,7 +137,7 @@ Выйти </string> <string name="create_account_url"> - http://join.secondlife.com/ + http://join.secondlife.com/index.php?lang=ru-RU&sourceid=[sourceid] </string> <string name="LoginFailedViewerNotPermitted"> У клиента, которым вы пользуетеÑÑŒ, больше нет доÑтупа к игре Second Life. Загрузить новую верÑию клиента можно по адреÑу @@ -1003,6 +1003,9 @@ support@secondlife.com. <string name="script_files"> Скрипты </string> + <string name="dictionary_files"> + Словари + </string> <string name="AvatarSetNotAway"> Ðа меÑте </string> @@ -1408,6 +1411,12 @@ support@secondlife.com. <string name="InvFolder favorite"> Мое избранное </string> + <string name="InvFolder Favorites"> + Мое избранное + </string> + <string name="InvFolder favorites"> + Мое избранное + </string> <string name="InvFolder Current Outfit"> Текущий коÑтюм </string> @@ -1423,6 +1432,12 @@ support@secondlife.com. <string name="InvFolder Meshes"> Меши </string> + <string name="InvFolder Received Items"> + Полученные вещи + </string> + <string name="InvFolder Merchant Outbox"> + Торговые иÑходÑщие + </string> <string name="InvFolder Friends"> Ð”Ñ€ÑƒÐ·ÑŒÑ </string> @@ -3858,6 +3873,12 @@ support@secondlife.com. <string name="LocationCtrlSeeAVsTooltip"> Ð’Ñе жители Ñ Ð´Ñ€ÑƒÐ³Ð¸Ñ… учаÑтков могут видеть аватары и общатьÑÑ Ð² чате </string> + <string name="LocationCtrlPathfindingDirtyTooltip"> + Возможны неполадки подвижных объектов в Ñтом регионе, пока регион не будет воÑÑтановлен. + </string> + <string name="LocationCtrlPathfindingDisabledTooltip"> + Ð’ Ñтом регионе не разрешен динамичеÑкий поиÑк пути. + </string> <string name="UpdaterWindowTitle"> Обновление [APP_NAME] </string> @@ -5012,6 +5033,21 @@ support@secondlife.com. <string name="Normal"> Ðормальный </string> + <string name="Pathfinding_Wiki_URL"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </string> + <string name="Pathfinding_Object_Attr_None"> + Ðет + </string> + <string name="Pathfinding_Object_Attr_Permanent"> + ВлиÑет на навигационную Ñетку + </string> + <string name="Pathfinding_Object_Attr_Character"> + ПерÑонаж + </string> + <string name="Pathfinding_Object_Attr_MultiSelect"> + (неÑколько) + </string> <string name="snapshot_quality_very_low"> Очень низкий </string> @@ -5027,4 +5063,10 @@ support@secondlife.com. <string name="snapshot_quality_very_high"> Очень выÑокий </string> + <string name="TeleportMaturityExceeded"> + Житель не может поÑетить Ñтот регион. + </string> + <string name="UserDictionary"> + [Пользователь] + </string> </strings> diff --git a/indra/newview/skins/default/xui/ru/teleport_strings.xml b/indra/newview/skins/default/xui/ru/teleport_strings.xml index feff286111..40c9267408 100644 --- a/indra/newview/skins/default/xui/ru/teleport_strings.xml +++ b/indra/newview/skins/default/xui/ru/teleport_strings.xml @@ -45,6 +45,9 @@ <message name="no_inventory_host"> СиÑтема Ð¸Ð½Ð²ÐµÐ½Ñ‚Ð°Ñ€Ñ ÑÐµÐ¹Ñ‡Ð°Ñ Ð½ÐµÐ´Ð¾Ñтупна. </message> + <message name="MustGetAgeRegion"> + Входить в Ñтот регион могут только жители 18 лет и Ñтарше. + </message> </message_set> <message_set name="progress"> <message name="sending_dest"> @@ -80,5 +83,8 @@ <message name="requesting"> Ð—Ð°Ð¿Ñ€Ð¾Ñ Ñ‚ÐµÐ»ÐµÐ¿Ð¾Ñ€Ñ‚Ð°Ñ†Ð¸Ð¸â€¦ </message> + <message name="pending"> + Ð¢ÐµÐ»ÐµÐ¿Ð¾Ñ€Ñ‚Ð°Ñ†Ð¸Ñ Ð½Ðµ закончена... + </message> </message_set> </teleport_messages> diff --git a/indra/newview/skins/default/xui/tr/floater_about.xml b/indra/newview/skins/default/xui/tr/floater_about.xml index 8fa12ea759..9cc9c7a220 100644 --- a/indra/newview/skins/default/xui/tr/floater_about.xml +++ b/indra/newview/skins/default/xui/tr/floater_about.xml @@ -63,27 +63,26 @@ Ses Sunucusu Sürümü: [VOICE_VERSION] </panel> <panel label="Lisanslar" name="licenses_panel"> <text_editor name="credits_editor"> - 3Dconnexion SDK Telif Hakkı (C) 1992-2007 3Dconnexion - APR Telif Hakkı (C) 2000-2004 The Apache Software Foundation - Collada DOM Telif Hakkı 2005 Sony Computer Entertainment Inc. - cURL Telif Hakkı (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se) + 3Dconnexion SDK Telif Hakkı (C) 1992-2009 3Dconnexion + APR Telif Hakkı (C) 2011 The Apache Software Foundation + Collada DOM Telif Hakkı 2006 Sony Computer Entertainment Inc. + cURL Telif Hakkı (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se) DBus/dbus-glib Telif Hakkı (C) 2002, 2003 CodeFactory AB / Telif Hakkı (C) 2003, 2004 Red Hat, Inc. expat Telif Hakkı (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. - FreeType Telif Hakkı (C) 1996-2002, The FreeType Project (www.freetype.org). + FreeType Telif Hakkı (C) 1996-2002, 2006 David Turner, Robert Wilhelm ve Werner Lemberg. GL Telif Hakkı (C) 1999-2004 Brian Paul. GLOD Telif Hakkı (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University ve David Luebke, Brenden Schubert, University of Virginia. google-perftools Telif Hakkı (c) 2005, Google Inc. Havok.com(TM) Telif Hakkı (C) 1999-2001, Telekinesys Research Limited. jpeg2000 Telif Hakkı (C) 2001, David Taubman, The University of New South Wales (UNSW) jpeglib Telif Hakkı (C) 1991-1998, Thomas G. Lane. - ogg/vorbis Telif Hakkı (C) 2001, Xiphophorus - OpenSSL Telif Hakkı (C) 1998-2002 The OpenSSL Project. - PCRE Telif Hakkı (c) 1997-2008 University of Cambridge + ogg/vorbis Telif Hakkı (C) 2002, Xiphophorus + OpenSSL Telif Hakkı (C) 1998-2008 The OpenSSL Project. + PCRE Telif Hakkı (c) 1997-2012 University of Cambridge SDL Telif Hakkı (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga SSLeay Telif Hakkı (C) 1995-1998 Eric Young (eay@cryptsoft.com) xmlrpc-epi Telif Hakkı (C) 2000 Epinions, Inc. - zlib Telif Hakkı (C) 1995-2002 Jean-loup Gailly ve Mark Adler. - google-perftools Telif Hakkı (c) 2005, Google Inc. + zlib Telif Hakkı (C) 1995-2012 Jean-loup Gailly ve Mark Adler. Second Life Görüntüleyicisi Havok (TM) Fizik motorunu kullanmaktadır. (c)Telif Hakkı 1999-2010 Havok.com Inc. (ve Lisans Verenleri). Tüm Hakları Saklıdır. Ayrıntılı bilgi için bkz. www.havok.com diff --git a/indra/newview/skins/default/xui/tr/floater_about_land.xml b/indra/newview/skins/default/xui/tr/floater_about_land.xml index a478d347a8..481fc540d0 100644 --- a/indra/newview/skins/default/xui/tr/floater_about_land.xml +++ b/indra/newview/skins/default/xui/tr/floater_about_land.xml @@ -451,7 +451,7 @@ Sadece büyük parseller aramada görünür. Sadece ÅŸu Sakinlere eriÅŸim izni verin: </text> <check_box label="Ödeme bilgileri kayıtlı [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="Sakinlerin bu parsele eriÅŸebilmesi için ödeme bilgilerinin kayıtlı olması gerekir. Daha fazla bilgi için [SUPPORT_SITE] adresini ziyaret edin."/> - <check_box label="YaÅŸ doÄŸrulaması yapılmış [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Sakinlerin bu parsele eriÅŸebilmesi için yaÅŸ doÄŸrulamalarının yapılmış olması gerekir. Daha fazla bilgi için [SUPPORT_SITE] adresini ziyaret edin."/> + <check_box label="18 veya üzeri bir yaÅŸta [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Sakinlerin bu parsele eriÅŸebilmesi için 18 veya üzeri bir yaÅŸta olmaları gerekir. Daha fazla bilgi için [SUPPORT_SITE] adresini ziyaret edin."/> <check_box label="Grup EriÅŸimine İzin Ver: [GROUP]" name="GroupCheck" tool_tip="Genel sekmesinde grup ayarla."/> <check_box label="GeçiÅŸ haklr. ÅŸuna sat:" name="PassCheck" tool_tip="Bu parsele geçici eriÅŸim verir"/> <combo_box name="pass_combo"> diff --git a/indra/newview/skins/default/xui/tr/floater_animation_preview.xml b/indra/newview/skins/default/xui/tr/floater_animation_preview.xml deleted file mode 100644 index f8800c674d..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_animation_preview.xml +++ /dev/null @@ -1,186 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Animation Preview"> - <floater.string name="failed_to_initialize"> - Hareket baÅŸlatılamadı - </floater.string> - <floater.string name="anim_too_long"> - Animasyon dosyası [LENGTH] saniye uzunluÄŸunda. - -Maksimum animasyon uzunluÄŸu [LENGTH] saniye. - </floater.string> - <floater.string name="failed_file_read"> - Animasyon dosyası okunamadı. - -[STATUS] - </floater.string> - <floater.string name="E_ST_OK"> - Tamam - </floater.string> - <floater.string name="E_ST_EOF"> - Dosyanın zamanından önce sonu. - </floater.string> - <floater.string name="E_ST_NO_CONSTRAINT"> - Kısıtlama tanımı okunamadı. - </floater.string> - <floater.string name="E_ST_NO_FILE"> - BVH dosyası açılamadı. - </floater.string> - <floater.string name="E_ST_NO_HIER"> - Geçersiz HİYERARŞİ üst bilgisi. - </floater.string> - <floater.string name="E_ST_NO_JOINT"> - KÖK veya EKLEM bulunamadı. - </floater.string> - <floater.string name="E_ST_NO_NAME"> - EKLEM adı alınamadı. - </floater.string> - <floater.string name="E_ST_NO_OFFSET"> - OFSET bulunamadı. - </floater.string> - <floater.string name="E_ST_NO_CHANNELS"> - KANALLAR bulunamadı. - </floater.string> - <floater.string name="E_ST_NO_ROTATION"> - Döndürme sırası alınamadı. - </floater.string> - <floater.string name="E_ST_NO_AXIS"> - Döndürme ekseni alınamadı. - </floater.string> - <floater.string name="E_ST_NO_MOTION"> - HAREKET bulunamadı. - </floater.string> - <floater.string name="E_ST_NO_FRAMES"> - kARE SAYISI alınamadı. - </floater.string> - <floater.string name="E_ST_NO_FRAME_TIME"> - Kare zamanı alınamadı. - </floater.string> - <floater.string name="E_ST_NO_POS"> - Konum deÄŸerleri alınamadı. - </floater.string> - <floater.string name="E_ST_NO_ROT"> - Döndürme deÄŸerleri alınamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_FILE"> - Çeviri dosyası açılamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_HEADER"> - Çeviri üst bilgisi okunamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_NAME"> - Çeviri adları okunamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_IGNORE"> - Çeviri yoksay deÄŸeri okunamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_RELATIVE"> - Çeviri nisbi deÄŸeri okunamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_OUTNAME"> - Çeviri çıkış adı deÄŸeri okunamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_MATRIX"> - Çeviri matrisi okunamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGECHILD"> - BirleÅŸtirme alt birim adı alınamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGEPARENT"> - BirleÅŸtirme üst birim adı alınamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_PRIORITY"> - Öncelik deÄŸerleri alınamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_LOOP"> - Döngü (tekrar) deÄŸerleri alınamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEIN"> - Easln (YavaÅŸ BaÅŸlangıç) deÄŸerleri alınamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEOUT"> - EaseOut (YavaÅŸ BitiÅŸ) deÄŸerleri alınamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_HAND"> - El ÅŸekillendirme deÄŸeri alınamadı. - </floater.string> - <floater.string name="E_ST_NO_XLT_EMOTE"> - Duygu ifadesi adı okunamadı. - </floater.string> - <floater.string name="E_ST_BAD_ROOT"> - Yanlış kök eklem adı, "kalça" kullanın - </floater.string> - <text name="name_label"> - Ad: - </text> - <text name="description_label"> - Açıklama: - </text> - <spinner label="Öncelik" name="priority" tool_tip="Bu animasyonun diÄŸer animasyonları geçersiz kılabileceÄŸi kontrolleri"/> - <check_box label="Döngü" name="loop_check" tool_tip="Bu animasyonun döngülenmesini (tekrarlanmasını) saÄŸlar"/> - <spinner label="İç (%)" name="loop_in_point" tool_tip="Döngünün döndüğü animasyon noktasını belirler"/> - <spinner label="Dış (%)" name="loop_out_point" tool_tip="Animasyonda döngünün bittiÄŸi noktayı belirler"/> - <text name="hand_label"> - El DuruÅŸu - </text> - <combo_box name="hand_pose_combo" tool_tip="Ellerin animasyon sırasında neler yaptığını kontrol eder"> - <combo_box.item label="Yayılım" name="Spread"/> - <combo_box.item label="Rahat" name="Relaxed"/> - <combo_box.item label="Her İkisi de İşaret Ediyor" name="PointBoth"/> - <combo_box.item label="Yumruk" name="Fist"/> - <combo_box.item label="Sol Rahat" name="RelaxedLeft"/> - <combo_box.item label="Sol İşaret Ediyor" name="PointLeft"/> - <combo_box.item label="Sol Yumruk" name="FistLeft"/> - <combo_box.item label="SaÄŸ Rahat" name="RelaxedRight"/> - <combo_box.item label="SaÄŸ İşaret Ediyor" name="PointRight"/> - <combo_box.item label="SaÄŸ Yumruk" name="FistRight"/> - <combo_box.item label="Sağı Selamlıyor" name="SaluteRight"/> - <combo_box.item label="Yazı Yazıyor" name="Typing"/> - <combo_box.item label="SaÄŸ Barış" name="PeaceRight"/> - </combo_box> - <text name="emote_label"> - İfade - </text> - <combo_box name="emote_combo" tool_tip="Yüzün animasyon sırasındaki ifadesini kontrol eder"> - <item label="(Hiçbiri)" name="[None]" value=""/> - <item label="Aaaaah" name="Aaaaah" value="Aaaaah"/> - <item label="KorkmuÅŸ" name="Afraid" value="KorkmuÅŸ"/> - <item label="Kızgın" name="Angry" value="Kızgın"/> - <item label="Yaygın GülümseyiÅŸ" name="BigSmile" value="Yaygın GülümseyiÅŸ"/> - <item label="Canı Sıkılmış" name="Bored" value="Canı Sıkılmış"/> - <item label="AÄŸlama" name="Cry" value="AÄŸlama"/> - <item label="Dudak Bükme" name="Disdain" value="Dudak Bükme"/> - <item label="Utanmış" name="Embarrassed" value="Utanmış"/> - <item label="KaÅŸ Çatma" name="Frown" value="KaÅŸ Çatma"/> - <item label="Öpücük" name="Kiss" value="Öpücük"/> - <item label="Gülme" name="Laugh" value="Gülme"/> - <item label="Kahkaha" name="Plllppt" value="Kahkaha"/> - <item label="TiksinmiÅŸ" name="Repulsed" value="TiksinmiÅŸ"/> - <item label="Üzgün" name="Sad" value="Üzgün"/> - <item label="Omuz Silkme" name="Shrug" value="Omuz Silkme"/> - <item label="Gülümseme" name="Smile" value="Gülümseme"/> - <item label="Sürpriz" name="Surprise" value="Sürpriz"/> - <item label="Göz Kırpma" name="Wink" value="Göz Kırpma"/> - <item label="EndiÅŸelenme" name="Worry" value="EndiÅŸelenme"/> - </combo_box> - <text name="preview_label"> - Åžu sırada önizle - </text> - <combo_box name="preview_base_anim" tool_tip="Animasyon davranışınızı avatarınız genel hareketleri yaparken test etmek için bunu kullanın."> - <item label="Ayakta Duruyor" name="Standing" value="Ayakta Duruyor"/> - <item label="Yürüyor" name="Walking" value="Yürüyor"/> - <item label="Oturuyor" name="Sitting" value="Oturuyor"/> - <item label="Uçuyor" name="Flying" value="Uçuyor"/> - </combo_box> - <spinner label="YavaÅŸ BaÅŸlangıç (saniye)" name="ease_in_time" tool_tip="Animasyonun kaynaÅŸtığı süre (saniye olarak)"/> - <spinner label="YavaÅŸ BitiÅŸ (saniye)" name="ease_out_time" tool_tip="Animasyonun ayrıştığı süre (saniye olarak)"/> - <button name="play_btn" tool_tip="Animasyonunu oynat"/> - <button name="pause_btn" tool_tip="Animasyonunu duraklat"/> - <button name="stop_btn" tool_tip="Animasyo oynatmayı durdur"/> - <text name="bad_animation_text"> - Animasyon dosyası okunamadı. - -Poser 4'ten aktarılan BHV dosyalarını tavsiye ederiz. - </text> - <button label="Karşıya Yükle (L$[AMOUNT])" name="ok_btn"/> - <button label="İptal" name="cancel_btn"/> -</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_autoreplace.xml b/indra/newview/skins/default/xui/tr/floater_autoreplace.xml new file mode 100644 index 0000000000..e52e05dc61 --- /dev/null +++ b/indra/newview/skins/default/xui/tr/floater_autoreplace.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="autoreplace_floater" title="Otomatik Yerine Koyma Ayarları"> + <check_box label="Otomatik Yerine Koymayı EtkinleÅŸtir" name="autoreplace_enable" tool_tip="Siz sohbet metni girdikçe, girilen herhangi bir anahtar kelimenin yerine karşılık gelen deÄŸiÅŸtirmeyi koyabilirsiniz"/> + <button label="Listeyi İçeri Aktar..." name="autoreplace_import_list" tool_tip="Daha önce aktarılan bir listeyi yükler."/> + <button label="Listeyi Aktarın..." name="autoreplace_export_list" tool_tip="Seçilen listeyi bir dosyaya kaydederek paylaşın."/> + <button label="Yeni Liste..." name="autoreplace_new_list" tool_tip="Yeni bir liste oluÅŸturun."/> + <button label="Listeyi Sil" name="autoreplace_delete_list" tool_tip="Seçilen listeyi silin."/> + <button name="autoreplace_list_up" tool_tip="Bu listenin önceliÄŸini yükseltin."/> + <button name="autoreplace_list_down" tool_tip="Bu listenin önceliÄŸini azaltın."/> + <scroll_list name="autoreplace_list_replacements"> + <scroll_list.columns label="Anahtar kelime" name="keyword"/> + <scroll_list.columns label="DeÄŸiÅŸtirme" name="replacement"/> + </scroll_list> + <button label="Ekle..." name="autoreplace_add_entry"/> + <button label="Kaldır" name="autoreplace_delete_entry"/> + <button label="GiriÅŸi Kaydet" name="autoreplace_save_entry" tool_tip="Bu giriÅŸi kaydet."/> + <button label="DeÄŸiÅŸiklikleri Kaydet" name="autoreplace_save_changes" tool_tip="Tüm deÄŸiÅŸiklikleri kaydet."/> + <button label="İptal" name="autoreplace_cancel" tool_tip="Tüm deÄŸiÅŸiklikleri iptal et."/> +</floater> +<!-- + <text + top_pad="10" + left="10" + height="16" + width="260" + follows="left|top" + halign="center" + mouse_opaque="true" + name="autoreplace_text2"> + Entries + </text> +--> diff --git a/indra/newview/skins/default/xui/tr/floater_chat_bar.xml b/indra/newview/skins/default/xui/tr/floater_chat_bar.xml index 988c845982..cd999b4b7a 100644 --- a/indra/newview/skins/default/xui/tr/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/tr/floater_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="chat_bar" title="YAKINDAKİ SOHBET"> +<floater name="nearby_chat" title="YAKINDAKİ SOHBET"> <panel name="bottom_panel"> <line_editor label="Sohbet etmek için buraya tıklayın." name="chat_box" tool_tip="Söylemek için Enter, bağırmak için Ctrl+Enter yapın"/> <button name="show_nearby_chat" tool_tip="Yakın sohbet günlüğünü gösterir/gizler"/> diff --git a/indra/newview/skins/default/xui/tr/floater_env_settings.xml b/indra/newview/skins/default/xui/tr/floater_env_settings.xml deleted file mode 100644 index d53629f6fe..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_env_settings.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Environment Editor Floater" title="ÇEVRE DÜZENLEYİCİ"> - <floater.string name="timeStr"> - [hour12,datetime,utc]:[min,datetime,utc] [ampm,datetime,utc] - </floater.string> - <text name="EnvTimeText"> - Günün Saati - </text> - <text name="EnvTimeText2"> - 12:00 PM - </text> - <text name="EnvCloudText"> - Bulut Örtüsü - </text> - <text name="EnvWaterColorText"> - Su Rengi - </text> - <color_swatch name="EnvWaterColor" tool_tip="Renk seçiciyi açmak için tıklayın"/> - <text name="EnvWaterFogText"> - Su Sisi - </text> - <button label="Gayrimenkul Saati Kullan" name="EnvUseEstateTimeButton"/> - <button label="GeliÅŸmiÅŸ Gökyüzü" name="EnvAdvancedSkyButton"/> - <button label="GeliÅŸmiÅŸ Su" name="EnvAdvancedWaterButton"/> -</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_inventory.xml b/indra/newview/skins/default/xui/tr/floater_inventory.xml deleted file mode 100644 index cfb12d4b68..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_inventory.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="ENVANTERİM"> - <panel label="Envanter Paneli" name="Inventory Panel"/> -</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_model_preview.xml b/indra/newview/skins/default/xui/tr/floater_model_preview.xml index 0c7cabc6ea..c00cadd3bd 100644 --- a/indra/newview/skins/default/xui/tr/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/tr/floater_model_preview.xml @@ -92,19 +92,54 @@ <text initial_value="Üçgenler" name="triangles" value="Üçgenler"/> <text initial_value="Köşeler" name="vertices" value="Köşeler"/> <text initial_value="Yüksek" name="high_label" value="Yüksek"/> + <combo_box name="lod_source_high"> + <item name="Load from file" value="Dosyadan yükle"/> + <item name="Generate" value="OluÅŸtur"/> + </combo_box> <button label="Gözat..." name="lod_browse_high"/> + <combo_box name="lod_mode_high"> + <item name="Triangle Limit" value="Üçgen Limiti"/> + <item name="Error Threshold" value="Hata EÅŸiÄŸi"/> + </combo_box> <text initial_value="0" name="high_triangles" value="0"/> <text initial_value="0" name="high_vertices" value="0"/> <text initial_value="Orta" name="medium_label" value="Orta"/> + <combo_box name="lod_source_medium"> + <item name="Load from file" value="Dosyadan yükle"/> + <item name="Generate" value="OluÅŸtur"/> + <item name="Use LoD above" value="Yukarıdaki ayrıntı seviyesini kullan"/> + </combo_box> <button label="Gözat..." name="lod_browse_medium"/> + <combo_box name="lod_mode_medium"> + <item name="Triangle Limit" value="Üçgen Limiti"/> + <item name="Error Threshold" value="Hata EÅŸiÄŸi"/> + </combo_box> <text initial_value="0" name="medium_triangles" value="0"/> <text initial_value="0" name="medium_vertices" value="0"/> <text initial_value="Düşük" name="low_label" value="Düşük"/> + <combo_box name="lod_source_low"> + <item name="Load from file" value="Dosyadan yükle"/> + <item name="Generate" value="OluÅŸtur"/> + <item name="Use LoD above" value="Yukarıdaki ayrıntı seviyesini kullan"/> + </combo_box> <button label="Gözat..." name="lod_browse_low"/> + <combo_box name="lod_mode_low"> + <item name="Triangle Limit" value="Üçgen Limiti"/> + <item name="Error Threshold" value="Hata EÅŸiÄŸi"/> + </combo_box> <text initial_value="0" name="low_triangles" value="0"/> <text initial_value="0" name="low_vertices" value="0"/> <text initial_value="En Düşük" name="lowest_label" value="En Düşük"/> + <combo_box name="lod_source_lowest"> + <item name="Load from file" value="Dosyadan yükle"/> + <item name="Generate" value="OluÅŸtur"/> + <item name="Use LoD above" value="Yukarıdaki ayrıntı seviyesini kullan"/> + </combo_box> <button label="Gözat..." name="lod_browse_lowest"/> + <combo_box name="lod_mode_lowest"> + <item name="Triangle Limit" value="Üçgen Limiti"/> + <item name="Error Threshold" value="Hata EÅŸiÄŸi"/> + </combo_box> <text initial_value="0" name="lowest_triangles" value="0"/> <text initial_value="0" name="lowest_vertices" value="0"/> <check_box label="Normalleri OluÅŸtur" name="gen_normals"/> diff --git a/indra/newview/skins/default/xui/tr/floater_nearby_chat.xml b/indra/newview/skins/default/xui/tr/floater_nearby_chat.xml deleted file mode 100644 index 6b12ad0ef5..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_nearby_chat.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="nearby_chat" title="YAKINDAKİ SOHBET"> - <check_box label="Sohbeti çevir" name="translate_chat_checkbox"/> -</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/tr/floater_pathfinding_characters.xml new file mode 100644 index 0000000000..f38d8c84c6 --- /dev/null +++ b/indra/newview/skins/default/xui/tr/floater_pathfinding_characters.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_characters" title="Yol bulma karakterleri"> + <floater.string name="messaging_get_inprogress"> + Yol bulma karakterleri için sorgulama yapılıyor ... + </floater.string> + <floater.string name="messaging_get_error"> + Yol bulma karakterleri için sorgulama yapılırken hata saptandı. + </floater.string> + <floater.string name="messaging_complete_none_found"> + Yol bulma karakterleri yok. + </floater.string> + <floater.string name="messaging_complete_available"> + Toplam [NUM_TOTAL] karakter içerisinden [NUM_SELECTED] adet seçildi. + </floater.string> + <floater.string name="messaging_not_enabled"> + Bu bölgede yol bulma etkin deÄŸil. + </floater.string> + <floater.string name="character_cpu_time"> + [CPU_TIME] µs + </floater.string> + <floater.string name="character_owner_loading"> + [Yükleniyor] + </floater.string> + <floater.string name="character_owner_unknown"> + [Bilinmiyor] + </floater.string> + <floater.string name="character_owner_group"> + [grup] + </floater.string> + <panel> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Ad" name="name"/> + <scroll_list.columns label="Açıklama" name="description"/> + <scroll_list.columns label="Sahip" name="owner"/> + <scroll_list.columns label="CPU" name="cpu_time"/> + <scroll_list.columns label="İrtifa" name="altitude"/> + </scroll_list> + <text name="messaging_status"> + Karakterler: + </text> + <button label="Listeyi yenile" name="refresh_objects_list"/> + <button label="Tümünü seç" name="select_all_objects"/> + <button label="Hiçbirini seçme" name="select_none_objects"/> + </panel> + <panel> + <text name="actions_label"> + Seçilen karakterler üzerinde eylemler: + </text> + <check_box label="İşareti göster" name="show_beacon"/> + <check_box label="Fizik kapsülünü göster" name="show_physics_capsule"/> + <button label="Al" name="take_objects"/> + <button label="Kopya al" name="take_copy_objects"/> + <button label="Beni ona ışınla" name="teleport_me_to_object" tool_tip="Sadece bir karakter seçildiÄŸinde etkindir."/> + <button label="İade Et" name="return_objects"/> + <button label="Sil" name="delete_objects"/> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/tr/floater_pathfinding_console.xml new file mode 100644 index 0000000000..6eecc7fb77 --- /dev/null +++ b/indra/newview/skins/default/xui/tr/floater_pathfinding_console.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_console" title="Yol bulma görüntüleme / test"> + <floater.string name="navmesh_viewer_status_library_not_implemented"> + Yol bulma kütüphanesi uygulaması bulunamıyor. + </floater.string> + <floater.string name="navmesh_viewer_status_region_not_enabled"> + Bu bölgede yol bulma etkin deÄŸil. + </floater.string> + <floater.string name="navmesh_viewer_status_region_loading"> + Bölgenin yüklenmesinin bitmesi bekleniyor. + </floater.string> + <floater.string name="navmesh_viewer_status_checking_version"> + Navigasyon örgüsünün durumu kontrol ediliyor. + </floater.string> + <floater.string name="navmesh_viewer_status_downloading"> + Navigasyon örgüsü indiriliyor. + </floater.string> + <floater.string name="navmesh_viewer_status_updating"> + Sunucudaki navigasyon örgüsü deÄŸiÅŸti. En son navigasyon örgüsü indiriliyor. + </floater.string> + <floater.string name="navmesh_viewer_status_has_navmesh"> + En son navigasyon örgüsü indirildi. + </floater.string> + <floater.string name="navmesh_viewer_status_error"> + Navigasyon örgüsü baÅŸarıyla indirilemedi. + </floater.string> + <floater.string name="navmesh_simulator_status_pending"> + Navigasyon örgüsünde bekleyen deÄŸiÅŸiklikler var. + </floater.string> + <floater.string name="navmesh_simulator_status_building"> + Navigasyon örgüsü oluÅŸturuluyor. + </floater.string> + <floater.string name="navmesh_simulator_status_some_pending"> + Bazı navigasyon örgüsü bölgelerinde bekleyen deÄŸiÅŸiklikler var. + </floater.string> + <floater.string name="navmesh_simulator_status_some_building"> + Bazı navigasyon örgüsü bölgeleri oluÅŸturuluyor. + </floater.string> + <floater.string name="navmesh_simulator_status_pending_and_building"> + Bazı navigasyon örgüsü bölgelerinde bekleyen deÄŸiÅŸiklikler var, bazıları ise oluÅŸturuluyor. + </floater.string> + <floater.string name="navmesh_simulator_status_complete"> + Navigasyon örgüsü güncel. + </floater.string> + <floater.string name="pathing_library_not_implemented"> + Yol bulma kütüphanesi uygulaması bulunamıyor. + </floater.string> + <floater.string name="pathing_region_not_enabled"> + Bu bölgede yol bulma etkin deÄŸil. + </floater.string> + <floater.string name="pathing_choose_start_and_end_points"> + Lütfen baÅŸlangıç ve bitim noktalarını seçin. + </floater.string> + <floater.string name="pathing_choose_start_point"> + Lütfen baÅŸlangıç noktasını seçin. + </floater.string> + <floater.string name="pathing_choose_end_point"> + Lütfen bitim noktasını seçin. + </floater.string> + <floater.string name="pathing_path_valid"> + Yol turuncu olarak gösterilmiÅŸtir. + </floater.string> + <floater.string name="pathing_path_invalid"> + Seçilen noktalar arasında bir yol bulunamıyor. + </floater.string> + <floater.string name="pathing_error"> + Yol oluÅŸturma sırasında bir hata meydana geldi. + </floater.string> + <tab_container name="view_test_tab_container"> + <panel label="Görünüm" name="view_panel"> + <text name="show_label"> + Göster: + </text> + <check_box label="Dünya" name="show_world"/> + <check_box label="Sadece hareket ettirilebilir nesneler" name="show_world_movables_only"/> + <check_box label="Navigasyon örgüsü" name="show_navmesh"/> + <text name="show_walkability_label"> + Yürüyebilirlik haritasını göster: + </text> + <combo_box name="show_heatmap_mode"> + <combo_box.item label="Gösterme" name="show_heatmap_mode_none"/> + <combo_box.item label="A karakter tipi" name="show_heatmap_mode_a"/> + <combo_box.item label="B karakter tipi" name="show_heatmap_mode_b"/> + <combo_box.item label="C karakter tipi" name="show_heatmap_mode_c"/> + <combo_box.item label="D karakter tipi" name="show_heatmap_mode_d"/> + </combo_box> + <check_box label="Yürüyebilirler" name="show_walkables"/> + <check_box label="Maddi hacimler" name="show_material_volumes"/> + <check_box label="Statik engeller" name="show_static_obstacles"/> + <check_box label="Hariç tutma hacimleri" name="show_exclusion_volumes"/> + <check_box label="Su düzlemi" name="show_water_plane"/> + <check_box label="X-ışını görünümü ile" name="show_xray"/> + </panel> + <panel label="Yolu test et" name="test_panel"> + <text name="ctrl_click_label"> + BaÅŸlangıç noktasını seçmek için Ctrl tuÅŸuna basarak tıklayın. + </text> + <text name="shift_click_label"> + Bitim noktasını seçmek için Shift tuÅŸuna basarak tıklayın. + </text> + <text name="character_width_label"> + Karakter geniÅŸliÄŸi + </text> + <slider name="character_width" value="1"/> + <text name="character_width_unit_label"> + m + </text> + <text name="character_type_label"> + Karakter tipi + </text> + <combo_box name="path_character_type"> + <combo_box.item label="Hiçbiri" name="path_character_type_none"/> + <combo_box.item label="A" name="path_character_type_a"/> + <combo_box.item label="B" name="path_character_type_b"/> + <combo_box.item label="C" name="path_character_type_c"/> + <combo_box.item label="D" name="path_character_type_d"/> + </combo_box> + <button label="Yolu temizle" name="clear_path"/> + </panel> + </tab_container> +</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/tr/floater_pathfinding_linksets.xml new file mode 100644 index 0000000000..2e416c9311 --- /dev/null +++ b/indra/newview/skins/default/xui/tr/floater_pathfinding_linksets.xml @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_linksets" title="Yol bulma baÄŸlantı kümeleri"> + <floater.string name="messaging_get_inprogress"> + Yol bulma baÄŸlantı kümeleri için sorgulama yapılıyor ... + </floater.string> + <floater.string name="messaging_get_error"> + Yol bulma baÄŸlantı kümeleri için sorgulama yapılırken hata saptandı. + </floater.string> + <floater.string name="messaging_set_inprogress"> + Seçilen yol bulma baÄŸlantı kümeleri deÄŸiÅŸtiriliyor ... + </floater.string> + <floater.string name="messaging_set_error"> + Seçilen yol bulma baÄŸlantı kümeleri deÄŸiÅŸtirilirken hata saptandı. + </floater.string> + <floater.string name="messaging_complete_none_found"> + Yol bulma baÄŸlantı kümeleri yok. + </floater.string> + <floater.string name="messaging_complete_available"> + Toplam [NUM_TOTAL] baÄŸlantı kümesi içerisinden [NUM_SELECTED] adet seçildi. + </floater.string> + <floater.string name="messaging_not_enabled"> + Bu bölgede yol bulma etkin deÄŸil. + </floater.string> + <floater.string name="linkset_terrain_name"> + [Yüzey] + </floater.string> + <floater.string name="linkset_terrain_description"> + -- + </floater.string> + <floater.string name="linkset_terrain_owner"> + -- + </floater.string> + <floater.string name="linkset_terrain_scripted"> + -- + </floater.string> + <floater.string name="linkset_terrain_land_impact"> + -- + </floater.string> + <floater.string name="linkset_terrain_dist_from_you"> + -- + </floater.string> + <floater.string name="linkset_owner_loading"> + [Yükleniyor] + </floater.string> + <floater.string name="linkset_owner_unknown"> + [Bilinmiyor] + </floater.string> + <floater.string name="linkset_owner_group"> + [grup] + </floater.string> + <floater.string name="linkset_is_scripted"> + Evet + </floater.string> + <floater.string name="linkset_is_not_scripted"> + Hayır + </floater.string> + <floater.string name="linkset_is_unknown_scripted"> + Bilinmiyor + </floater.string> + <floater.string name="linkset_use_walkable"> + Yürüyebilir + </floater.string> + <floater.string name="linkset_use_static_obstacle"> + Statik engel + </floater.string> + <floater.string name="linkset_use_dynamic_obstacle"> + Hareket ettirilebilir engel + </floater.string> + <floater.string name="linkset_use_material_volume"> + Maddi hacim + </floater.string> + <floater.string name="linkset_use_exclusion_volume"> + Hariç tutma hacmi + </floater.string> + <floater.string name="linkset_use_dynamic_phantom"> + Hareket ettirilebilir fantom + </floater.string> + <floater.string name="linkset_is_terrain"> + [deÄŸiÅŸtirilemez] + </floater.string> + <floater.string name="linkset_is_restricted_state"> + [kısıtlı] + </floater.string> + <floater.string name="linkset_is_non_volume_state"> + [konkav] + </floater.string> + <floater.string name="linkset_is_restricted_non_volume_state"> + [kısıtlı, konkav] + </floater.string> + <floater.string name="linkset_choose_use"> + BaÄŸlantı kümesi kullanımını seç... + </floater.string> + <panel> + <combo_box name="filter_by_linkset_use"> + <combo_box.item label="BaÄŸlantı kümesi kullanımına göre filtrele..." name="filter_by_linkset_use_none"/> + <combo_box.item label="Yürüyebilir" name="filter_by_linkset_use_walkable"/> + <combo_box.item label="Statik engel" name="filter_by_linkset_use_static_obstacle"/> + <combo_box.item label="Hareket ettirilebilir engel" name="filter_by_linkset_use_dynamic_obstacle"/> + <combo_box.item label="Maddi hacim" name="filter_by_linkset_use_material_volume"/> + <combo_box.item label="Hariç tutma hacmi" name="filter_by_linkset_use_exclusion_volume"/> + <combo_box.item label="Hareket ettirilebilir fantom" name="filter_by_linkset_use_dynamic_phantom"/> + </combo_box> + <button label="Uygula" name="apply_filters"/> + <button label="Temizle" name="clear_filters"/> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="Ad (kök prim)" name="name"/> + <scroll_list.columns label="Açıklama (kök prim)" name="description"/> + <scroll_list.columns label="Sahip" name="owner"/> + <scroll_list.columns label="Komut Dosyalı" name="scripted"/> + <scroll_list.columns label="Etki" name="land_impact"/> + <scroll_list.columns label="Mesafe" name="dist_from_you"/> + <scroll_list.columns label="BaÄŸlantı kümesi kullanımı" name="linkset_use"/> + <scroll_list.columns label="% A" name="a_percent"/> + <scroll_list.columns label="% B" name="b_percent"/> + <scroll_list.columns label="% C" name="c_percent"/> + <scroll_list.columns label="% D" name="d_percent"/> + </scroll_list> + <text name="messaging_status"> + BaÄŸlantı kümeleri: + </text> + <button label="Listeyi yenile" name="refresh_objects_list"/> + <button label="Tümünü seç" name="select_all_objects"/> + <button label="Hiçbirini seçme" name="select_none_objects"/> + </panel> + <panel> + <check_box label="İşareti göster" name="show_beacon"/> + <button label="Al" name="take_objects"/> + <button label="Kopya al" name="take_copy_objects"/> + <button label="Beni ona ışınla" name="teleport_me_to_object"/> + <button label="İade Et" name="return_objects"/> + <button label="Sil" name="delete_objects"/> + </panel> + <panel> + <text name="walkability_coefficients_label"> + Yürüyebilirlik: + </text> + <text name="edit_a_label"> + A + </text> + <line_editor name="edit_a_value" tool_tip="A tipi karakterleri için yürüyebilirlik. Örnek karakter tipi humanoiddir."/> + <text name="edit_b_label"> + B + </text> + <line_editor name="edit_b_value" tool_tip="B tipi karakterleri için yürüyebilirlik. Örnek karakter tipi yaratıktır."/> + <text name="edit_c_label"> + C + </text> + <line_editor name="edit_c_value" tool_tip="C tipi karakterleri için yürüyebilirlik. Örnek karakter tipi mekaniktir."/> + <text name="edit_d_label"> + D + </text> + <line_editor name="edit_d_value" tool_tip="D tipi karakterleri için yürüyebilirlik. Örnek karakter tipi diÄŸerdir."/> + <button label="DeÄŸiÅŸiklikleri uygula" name="apply_edit_values"/> + <text name="suggested_use_a_label"> + (Humanoid) + </text> + <text name="suggested_use_b_label"> + (Yaratık) + </text> + <text name="suggested_use_c_label"> + (Mekanik) + </text> + <text name="suggested_use_d_label"> + (DiÄŸer) + </text> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_postcard.xml b/indra/newview/skins/default/xui/tr/floater_postcard.xml deleted file mode 100644 index ef11c68afe..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_postcard.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="ANLIK GÖRÜNTÜYÜ E-POSTAYLA GÖNDER"> - <floater.string name="default_subject"> - SECOND_LIFE]'dan posta kartı. - </floater.string> - <floater.string name="default_message"> - Buna bakın! - </floater.string> - <floater.string name="upload_message"> - Gönderiyor... - </floater.string> - <text name="to_label"> - Alıcının E-postası: - </text> - <text name="from_label"> - E-postanız: - </text> - <text name="name_label"> - Adınız: - </text> - <text name="subject_label"> - Konu: - </text> - <line_editor label="Konunuzu buraya yazın." name="subject_form"/> - <text name="msg_label"> - İleti: - </text> - <text_editor name="msg_form"> - İletinizi buraya yazın. - </text_editor> - <button label="İptal" name="cancel_btn"/> - <button label="Gönder" name="send_btn"/> -</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_spellcheck.xml b/indra/newview/skins/default/xui/tr/floater_spellcheck.xml new file mode 100644 index 0000000000..f5f0ba8fd9 --- /dev/null +++ b/indra/newview/skins/default/xui/tr/floater_spellcheck.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_floater" title="Yazım Denetimcisi Ayarları"> + <check_box label="Yazım denetimcisini etkinleÅŸtir" name="spellcheck_enable"/> + <text name="spellcheck_main"> + Ana sözlük : + </text> + <text label="Günlükler:" name="spellcheck_additional"> + İlave sözlükler : + </text> + <text name="spellcheck_available"> + Mevcut + </text> + <text name="spellcheck_active"> + Etkin + </text> + <button label="Kaldır" name="spellcheck_remove_btn"/> + <button label="İçeri Aktar..." name="spellcheck_import_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_spellcheck_import.xml b/indra/newview/skins/default/xui/tr/floater_spellcheck_import.xml new file mode 100644 index 0000000000..ded71cad40 --- /dev/null +++ b/indra/newview/skins/default/xui/tr/floater_spellcheck_import.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_import" title="Sözlüğü İçeri Aktar"> + <button label="Gözat" label_selected="Gözat" name="dictionary_path_browse"/> + <button label="İçeri Aktar" name="ok_btn"/> + <button label="İptal" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_stats.xml b/indra/newview/skins/default/xui/tr/floater_stats.xml index e3f54fc338..afce87bdaa 100644 --- a/indra/newview/skins/default/xui/tr/floater_stats.xml +++ b/indra/newview/skins/default/xui/tr/floater_stats.xml @@ -53,7 +53,13 @@ <stat_bar label="Nesneler" name="simobjects"/> <stat_bar label="Etkin Nesneler" name="simactiveobjects"/> <stat_bar label="Etkin Komut Dosyaları" name="simactivescripts"/> + <stat_bar label="Çalıştırılan Komut Dosyaları" name="simpctscriptsrun"/> <stat_bar label="Komut Dosyası Etkinlikleri" name="simscripteps"/> + <stat_view label="Yol bulma" name="simpathfinding"> + <stat_bar label="Yapay Zeka Adım Süresi" name="simsimaistepmsec"/> + <stat_bar label="Atlanan Siluet Adımları" name="simsimskippedsilhouettesteps"/> + <stat_bar label="Güncellenen Karakterler" name="simsimpctsteppedcharacters"/> + </stat_view> <stat_bar label="Gelen Paketler" name="siminpps"/> <stat_bar label="Giden Paketler" name="simoutpps"/> <stat_bar label="Bekleyen Karşıdan Yüklemeler" name="simpendingdownloads"/> diff --git a/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml index 67bf9071b3..889425f23a 100644 --- a/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml @@ -19,6 +19,8 @@ <button label="Varsayılan" label_selected="Varsayılan" name="Default"/> <button label="BoÅŸ" label_selected="BoÅŸ" name="Blank"/> <button label="Hiçbiri" label_selected="Hiçbiri" name="None"/> + <check_box initial_value="true" label="Canlı Önizleme" name="apply_immediate_check"/> + <text name="preview_disabled" value="Önizleme Devre Dışı"/> <filter_editor label="Dokuları Filtrele" name="inventory search editor"/> <check_box initial_value="false" label="Klasörleri göster" name="show_folders_check"/> <button label="Ekle" label_selected="Ekle" name="l_add_btn"/> @@ -30,5 +32,4 @@ </scroll_list> <button label="Tamam" label_selected="Tamam" name="Select"/> <button label="İptal" label_selected="İptal" name="Cancel"/> - <check_box initial_value="true" label="Åžimdi uygula" name="apply_immediate_check"/> </floater> diff --git a/indra/newview/skins/default/xui/tr/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/tr/floater_texture_fetch_debugger.xml index a592479b6c..42426225c7 100644 --- a/indra/newview/skins/default/xui/tr/floater_texture_fetch_debugger.xml +++ b/indra/newview/skins/default/xui/tr/floater_texture_fetch_debugger.xml @@ -45,10 +45,23 @@ <text name="total_time_refetch_vis_cache_label"> 15, Görünür dokuların önbellekten tekrar alınması, Süre: [TIME] saniye, Alınan: [SIZE]KB, [PIXEL]MPiksel </text> + <text name="total_time_refetch_all_cache_label"> + 16, Tüm dokuların önbellekten tekrar alınması, Süre: [TIME] saniye, Alınan: [SIZE]KB, [PIXEL]MPiksel + </text> <text name="total_time_refetch_vis_http_label"> - 16, Görünür dokuların HTTP'den tekrar alınması, Süre: [TIME] saniye, Alınan: [SIZE]KB, [PIXEL]MPiksel + 17, Görünür dokuların HTTP'den tekrar alınması, Süre: [TIME] saniye, Alınan: [SIZE]KB, [PIXEL]MPiksel + </text> + <text name="total_time_refetch_all_http_label"> + 18, Tüm dokuların HTTP'den tekrar alınması, Süre: [TIME] saniye, Alınan: [SIZE]KB, [PIXEL]MPiksel + </text> + <spinner label="19, Teksel/Piksel Oranı:" name="texel_pixel_ratio"/> + <text name="texture_source_label"> + 20, Doku Kaynağı: </text> - <spinner label="17, Teksel/Piksel Oranı:" name="texel_pixel_ratio"/> + <radio_group name="texture_source"> + <radio_item label="Önbellek + HTTP" name="0"/> + <radio_item label="Sadece HTTP" name="1"/> + </radio_group> <button label="BaÅŸla" name="start_btn"/> <button label="Sıfırla" name="clear_btn"/> <button label="Kapat" name="close_btn"/> @@ -58,5 +71,7 @@ <button label="Åžifre Çöz" name="decode_btn"/> <button label="GL Dokusu" name="gl_btn"/> <button label="Görünür Dokuları Önbellekten Tekrar Al" name="refetchviscache_btn"/> + <button label="Tüm ÖnbelleÄŸi Tekrar Al" name="refetchallcache_btn"/> <button label="Görünür Dokuları HTTP'den Tekrar Al" name="refetchvishttp_btn"/> + <button label="Tüm HTTP'yi Tekrar Al" name="refetchallhttp_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/tr/floater_tools.xml b/indra/newview/skins/default/xui/tr/floater_tools.xml index b0c59ced42..4bf0372a8a 100644 --- a/indra/newview/skins/default/xui/tr/floater_tools.xml +++ b/indra/newview/skins/default/xui/tr/floater_tools.xml @@ -150,6 +150,12 @@ <panel.string name="text modify info 4"> Bu nesneleri deÄŸiÅŸtiremezsiniz </panel.string> + <panel.string name="text modify info 5"> + Bir bölge sınırı üzerinden bu nesneyi deÄŸiÅŸtiremezsiniz + </panel.string> + <panel.string name="text modify info 6"> + Bir bölge sınırı üzerinden bu nesneleri deÄŸiÅŸtiremezsiniz + </panel.string> <panel.string name="text modify warning"> İzinleri ayarlamak için tüm nesneyi seçmelisiniz </panel.string> @@ -199,12 +205,12 @@ <combo_box.item label="YakınlaÅŸtır" name="Zoom"/> </combo_box> <check_box label="Satılık:" name="checkbox for sale"/> + <spinner label="L$" name="Edit Cost"/> <combo_box name="sale type"> <combo_box.item label="Kopyala" name="Copy"/> <combo_box.item label="İçerik" name="Contents"/> <combo_box.item label="Orijinal" name="Original"/> </combo_box> - <spinner label="Fiyat: L$" name="Edit Cost"/> <check_box label="Aramada göster" name="search_check" tool_tip="KiÅŸiler arama sonuçlarında bu nesneyi görebilsin"/> <panel name="perms_build"> <text name="perm_modify"> @@ -240,6 +246,11 @@ F: </text> </panel> + <panel name="pathfinding_attrs_panel"> + <text name="pathfinding_attributes_label"> + Yol bulma özellikleri: + </text> + </panel> </panel> <panel label="Nesne" name="Object"> <check_box label="Kilitli" name="checkbox locked" tool_tip="Nesnenin hareket ettirilmesini veya silinmesini engeller. Arzulanmayan düzenlemelerden kaçınmak için inÅŸa iÅŸlemleri sırasında oldukça faydalıdır."/> diff --git a/indra/newview/skins/default/xui/tr/floater_top_objects.xml b/indra/newview/skins/default/xui/tr/floater_top_objects.xml index e726f583cc..19420c68e3 100644 --- a/indra/newview/skins/default/xui/tr/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/tr/floater_top_objects.xml @@ -9,9 +9,6 @@ <floater.string name="scripts_score_label"> Süre </floater.string> - <floater.string name="scripts_mono_time_label"> - Mono Süre - </floater.string> <floater.string name="top_colliders_title"> En Çok Çarpışanlar </floater.string> @@ -32,9 +29,10 @@ <scroll_list.columns label="Ad" name="name"/> <scroll_list.columns label="Sahip" name="owner"/> <scroll_list.columns label="Konum" name="location"/> + <scroll_list.columns label="Parsel" name="parcel"/> <scroll_list.columns label="Süre" name="time"/> - <scroll_list.columns label="Mono Süre" name="mono_time"/> <scroll_list.columns label="URL'ler" name="URLs"/> + <scroll_list.columns label="Bellek (KB)" name="memory"/> </scroll_list> <text name="id_text"> Nesne KimliÄŸi: @@ -48,6 +46,10 @@ Sahip: </text> <button label="Filtrele" name="filter_owner_btn"/> + <text name="parcel_name_text"> + Parsel: + </text> + <button label="Filtrele" name="filter_parcel_btn"/> <button label="Seçileni İade Et" name="return_selected_btn"/> <button label="Tümünü İade Et" name="return_all_btn"/> <button label="Seçileni Devre Dışı Bırak" name="disable_selected_btn"/> diff --git a/indra/newview/skins/default/xui/tr/floater_water.xml b/indra/newview/skins/default/xui/tr/floater_water.xml deleted file mode 100644 index 66d6c1e30d..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_water.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Water Floater" title="GELİŞMİŞ SU DÜZENLEYİCİ"> - <floater.string name="WLDefaultWaterNames"> - Varsayılan:Camsı:Havuz:çamurlu:İkinci Veba:YILAN!!!:Valdez - </floater.string> - <text name="KeyFramePresetsText"> - Su Ön Ayarları: - </text> - <button label="Yeni" label_selected="Yeni" name="WaterNewPreset"/> - <button label="Kaydet" label_selected="Kaydet" name="WaterSavePreset"/> - <button label="Sil" label_selected="Sil" name="WaterDeletePreset"/> - <tab_container name="Water Tabs"> - <panel label="AYARLAR" name="Settings"> - <text name="BHText"> - Su Sisi Rengi - </text> - <color_swatch name="WaterFogColor" tool_tip="Renk seçiciyi açmak için tıklayın"/> - <text name="WaterFogDensText"> - Su YoÄŸunluk Üssü - </text> - <text name="WaterUnderWaterFogModText"> - Sualtı Sis DeÄŸiÅŸtiricisi - </text> - <text name="BDensText"> - Yansıma Dalgacığı ÖlçeÄŸi - </text> - <slider label="1" name="WaterNormalScaleX"/> - <slider label="2" name="WaterNormalScaleY"/> - <slider label="3" name="WaterNormalScaleZ"/> - <text name="HDText"> - Fresnel ÖlçeÄŸi - </text> - <text name="FresnelOffsetText"> - Fresnel Dengeleyicisi - </text> - <text name="DensMultText"> - Yukarıdan Kırılma ÖlçeÄŸi - </text> - <text name="WaterScaleBelowText"> - AÅŸağıdan Kırılma ÖlçeÄŸi - </text> - <text name="MaxAltText"> - BulanıklaÅŸtırma Çarpanı - </text> - </panel> - <panel label="GÖRÜNTÜ" name="Waves"> - <text name="BHText"> - Büyük Dalga Yönü - </text> - <text name="WaterWave1DirXText"> - X - </text> - <text name="WaterWave1DirYText"> - Y - </text> - <text name="BHText2"> - Küçük Dalga Yönü - </text> - <text name="WaterWave2DirXText"> - X - </text> - <text name="WaterWave2DirYText"> - Y - </text> - <text name="BHText3"> - Normal Harita - </text> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_windlight_options.xml b/indra/newview/skins/default/xui/tr/floater_windlight_options.xml deleted file mode 100644 index 6c5fba374c..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_windlight_options.xml +++ /dev/null @@ -1,167 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="WindLight floater" title="GELİŞMİŞ GÖKYÜZÜ DÜZENLEYİCİ"> - <floater.string name="WLDefaultSkyNames"> - A-12:A-24:A-3:A-15:A-16.30:A-6:A-18:A-9:A-21:Barselona:Tipi:Mavi Gün Ortası:Sahilde Öğleden Sonra:Sahilde Gün Batımı:Varsayılan:Çölde Gün Batımı:Güzel Bir Gün:Kabarık Büyük Bulutlar:Sisli:Şık Şık:Şık Şık Şık:Dondurma:Hayalet:Uygunsuz Gerçekler:Gün Ortası1:Gün Ortası 2:Gün Ortası 3:Gün Ortası 4:Gece:Korsan:Mor:Denizcinin Keyfi:Saf Tensel - </floater.string> - <text name="KeyFramePresetsText"> - Gökyüzü Ön Ayarları: - </text> - <button label="Yeni" label_selected="Yeni" name="WLNewPreset"/> - <button label="Kaydet" label_selected="Kaydet" name="WLSavePreset"/> - <button label="Sil" label_selected="Sil" name="WLDeletePreset"/> - <button label="Gün Döngüsü Düzenleyici" label_selected="Gün Döngüsü Düzenleyici" name="WLDayCycleMenuButton"/> - <tab_container name="WindLight Tabs"> - <panel label="ATMOSFER" name="Atmosphere"> - <text name="BHText"> - Mavi Ufuk - </text> - <text name="BHText2"> - R - </text> - <text name="BHText3"> - G - </text> - <text name="BHText4"> - B - </text> - <text name="BHText5"> - I - </text> - <text name="BDensText"> - Puslu Ufuk - </text> - <text name="BDensText2"> - Mavi YoÄŸunluÄŸu - </text> - <text name="BHText6"> - R - </text> - <text name="BHText7"> - G - </text> - <text name="BHText8"> - B - </text> - <text name="BHText9"> - I - </text> - <text name="HDText"> - Pus YoÄŸunluÄŸu - </text> - <text name="DensMultText"> - YoÄŸunluk Çarpanı - </text> - <text name="WLDistanceMultText"> - Mesafe Çarpanı - </text> - <text name="MaxAltText"> - Maks İrtifa - </text> - </panel> - <panel label="AYDINLATMA" name="Lighting"> - <text name="SLCText"> - GüneÅŸ/Ay Rengi - </text> - <text name="BHText"> - R - </text> - <text name="BHText2"> - G - </text> - <text name="BHText3"> - B - </text> - <text name="BHText4"> - I - </text> - <text name="TODText"> - GüneÅŸ/Ay Konumu - </text> - <text name="WLAmbientText"> - Ortam - </text> - <text name="BHText5"> - R - </text> - <text name="BHText6"> - G - </text> - <text name="BHText7"> - B - </text> - <text name="BHText8"> - I - </text> - <text name="WLEastAngleText"> - DoÄŸu Açısı - </text> - <text name="SunGlowText"> - GüneÅŸ Parıltısı - </text> - <slider label="Odak" name="WLGlowB"/> - <slider label="Büyüklük" name="WLGlowR"/> - <text name="SceneGammaText"> - Sahne Gaması - </text> - <text name="WLStarText"> - Yıldız Parlaklığı - </text> - </panel> - <panel label="BULUTLAR" name="Clouds"> - <text name="WLCloudColorText"> - Bulut Rengi - </text> - <text name="BHText"> - R - </text> - <text name="BHText2"> - G - </text> - <text name="BHText3"> - B - </text> - <text name="BHText4"> - I - </text> - <text name="WLCloudColorText2"> - Bulut XY/YoÄŸunluÄŸu - </text> - <text name="BHText5"> - X - </text> - <text name="BHText6"> - Y - </text> - <text name="BHText7"> - D - </text> - <text name="WLCloudCoverageText"> - Bulut Örtüsü - </text> - <text name="WLCloudScaleText"> - Bulut YüksekliÄŸi - </text> - <text name="WLCloudDetailText"> - Bulut Ayrıntısı (XY/YoÄŸunluÄŸu) - </text> - <text name="BHText8"> - X - </text> - <text name="BHText9"> - Y - </text> - <text name="BHText10"> - D - </text> - <text name="WLCloudScrollXText"> - Bulut Kaydırma X - </text> - <check_box label="Kilitle" name="WLCloudLockX"/> - <text name="WLCloudScrollYText"> - Bulut Kaydırma Y - </text> - <check_box label="Kilitle" name="WLCloudLockY"/> - <check_box label="Klasik Bulutlar Çiz" name="DrawClassicClouds"/> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/tr/menu_bottomtray.xml b/indra/newview/skins/default/xui/tr/menu_bottomtray.xml deleted file mode 100644 index f17c0f9971..0000000000 --- a/indra/newview/skins/default/xui/tr/menu_bottomtray.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<menu name="hide_camera_move_controls_menu"> - <menu_item_check label="KonuÅŸma Düğmesi" name="EnableVoiceChat"/> - <menu_item_check label="Mimik düğmesi" name="ShowGestureButton"/> - <menu_item_check label="Taşıma düğmesi" name="ShowMoveButton"/> - <menu_item_check label="Görüntüleme düğmesi" name="ShowCameraButton"/> - <menu_item_check label="Anlık görüntü düğmesi" name="ShowSnapshotButton"/> - <menu_item_check label="İnÅŸa Et düğmesi" name="ShowBuildButton"/> - <menu_item_check label="Arama düğmesi" name="ShowSearchButton"/> - <menu_item_check label="Harita düğmesi" name="ShowWorldMapButton"/> - <menu_item_check label="Mini-harita düğmesi" name="ShowMiniMapButton"/> - <menu_item_call label="Kes" name="NearbyChatBar_Cut"/> - <menu_item_call label="Kopyala" name="NearbyChatBar_Copy"/> - <menu_item_call label="Yapıştır" name="NearbyChatBar_Paste"/> - <menu_item_call label="Sil" name="NearbyChatBar_Delete"/> - <menu_item_call label="Tümünü Seç" name="NearbyChatBar_Select_All"/> -</menu> diff --git a/indra/newview/skins/default/xui/tr/menu_im_well_button.xml b/indra/newview/skins/default/xui/tr/menu_im_well_button.xml deleted file mode 100644 index c3e559a723..0000000000 --- a/indra/newview/skins/default/xui/tr/menu_im_well_button.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<context_menu name="IM Well Button Context Menu"> - <menu_item_call label="Tümünü Kapat" name="Close All"/> -</context_menu> diff --git a/indra/newview/skins/default/xui/tr/menu_inventory.xml b/indra/newview/skins/default/xui/tr/menu_inventory.xml index 170cdebd24..51049427af 100644 --- a/indra/newview/skins/default/xui/tr/menu_inventory.xml +++ b/indra/newview/skins/default/xui/tr/menu_inventory.xml @@ -68,6 +68,7 @@ <menu_item_call label="Sistem Klasörünü Sil" name="Delete System Folder"/> <menu_item_call label="Konferans Sohbeti BaÅŸlat" name="Conference Chat Folder"/> <menu_item_call label="Oyna" name="Sound Play"/> + <menu_item_call label="SLurl'i Kopyala" name="url_copy"/> <menu_item_call label="Yer İmi Hakkında" name="About Landmark"/> <menu_item_call label="SL Dünyasında Oynat" name="Animation Play"/> <menu_item_call label="Yerel Olarak Oynat" name="Animation Audition"/> diff --git a/indra/newview/skins/default/xui/tr/menu_mode_change.xml b/indra/newview/skins/default/xui/tr/menu_mode_change.xml deleted file mode 100644 index 678950b633..0000000000 --- a/indra/newview/skins/default/xui/tr/menu_mode_change.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<toggleable_menu name="Mode Change"> - <menu_item_check label="Temel" name="BasicMode"/> - <menu_item_check label="GeliÅŸmiÅŸ" name="AdvancedMode"/> -</toggleable_menu> diff --git a/indra/newview/skins/default/xui/tr/menu_object.xml b/indra/newview/skins/default/xui/tr/menu_object.xml index d60c68e5e9..72f7adf016 100644 --- a/indra/newview/skins/default/xui/tr/menu_object.xml +++ b/indra/newview/skins/default/xui/tr/menu_object.xml @@ -3,6 +3,8 @@ <menu_item_call label="Dokun" name="Object Touch"/> <menu_item_call label="Düzenle" name="Edit..."/> <menu_item_call label="İnÅŸa Et" name="Build"/> + <menu_item_call label="BaÄŸlantı kümelerinde göster" name="show_in_linksets"/> + <menu_item_call label="Karakterlerde göster" name="show_in_characters"/> <menu_item_call label="Aç" name="Open"/> <menu_item_call label="Buraya Otur" name="Object Sit"/> <menu_item_call label="Kalk" name="Object Stand Up"/> diff --git a/indra/newview/skins/default/xui/tr/menu_text_editor.xml b/indra/newview/skins/default/xui/tr/menu_text_editor.xml index ffbf309e84..76c7b43e1e 100644 --- a/indra/newview/skins/default/xui/tr/menu_text_editor.xml +++ b/indra/newview/skins/default/xui/tr/menu_text_editor.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Text editor context menu"> + <menu_item_call label="(bilinmiyor)" name="Suggestion 1"/> + <menu_item_call label="(bilinmiyor)" name="Suggestion 2"/> + <menu_item_call label="(bilinmiyor)" name="Suggestion 3"/> + <menu_item_call label="(bilinmiyor)" name="Suggestion 4"/> + <menu_item_call label="(bilinmiyor)" name="Suggestion 5"/> + <menu_item_call label="Sözlüğe Ekle" name="Add to Dictionary"/> + <menu_item_call label="Yok saya ekle" name="Add to Ignore"/> <menu_item_call label="Kes" name="Cut"/> <menu_item_call label="Kopyala" name="Copy"/> <menu_item_call label="Yapıştır" name="Paste"/> diff --git a/indra/newview/skins/default/xui/tr/menu_viewer.xml b/indra/newview/skins/default/xui/tr/menu_viewer.xml index ea84e7d24b..7a7faf6ac4 100644 --- a/indra/newview/skins/default/xui/tr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/tr/menu_viewer.xml @@ -26,6 +26,7 @@ <menu_item_call label="Tercihler..." name="Preferences"/> <menu_item_call label="Araç çubuÄŸu düğmeleri..." name="Toolbars"/> <menu_item_call label="Tüm denetimleri sakla" name="Hide UI"/> + <menu_item_check label="BÜG Aksesuarlarını Göster" name="Show HUD Attachments"/> <menu_item_call label="[APP_NAME]'den Çık" name="Quit"/> </menu> <menu label="İletiÅŸim Kur" name="Communicate"> @@ -37,6 +38,7 @@ <menu_item_call label="ArkadaÅŸlar" name="My Friends"/> <menu_item_call label="Gruplar" name="My Groups"/> <menu_item_call label="Yakındaki kiÅŸiler" name="Active Speakers"/> + <menu_item_call label="Engelleme Listesi" name="Block List"/> </menu> <menu label="Dünya" name="World"> <menu_item_call label="Bu Yeri Yer İmlerine Ekle" name="Create Landmark Here"/> @@ -122,6 +124,11 @@ <menu_item_call label="Komut Dosyalarını Çalışıyor Olarak Ayarla" name="Set Scripts to Running"/> <menu_item_call label="Komut Dosyalarını Çalışmıyor Olarak Ayarla" name="Set Scripts to Not Running"/> </menu> + <menu label="Yol bulma" name="Pathfinding"> + <menu_item_call label="BaÄŸlantı kümeleri..." name="pathfinding_linksets_menu_item"/> + <menu_item_call label="Karakterler..." name="pathfinding_characters_menu_item"/> + <menu_item_call label="Görüntüleme / test..." name="pathfinding_console_menu_item"/> + </menu> <menu label="Seçenklr." name="Options"> <menu_item_check label="GeliÅŸmiÅŸ İzinleri Göster" name="DebugPermissions"/> <menu_item_check label="Sadece Nesnelerimi Seç" name="Select Only My Objects"/> @@ -172,7 +179,6 @@ <menu_item_check label="Parçacıkları Gizle" name="Hide Particles"/> <menu_item_check label="Seçilenleri Gizle" name="Hide Selected"/> <menu_item_check label="Saydamı Vurgula" name="Highlight Transparent"/> - <menu_item_check label="BÜG Aksesuarlarını Göster" name="Show HUD Attachments"/> <menu_item_check label="Fare Üzerinden Görünüm Artı İşaretini Göster" name="ShowCrosshairs"/> </menu> <menu label="İşleme Türleri" name="Rendering Types"> @@ -375,7 +381,6 @@ <menu_item_call label="Karakter Geometrisini Aç/Kapa" name="Toggle Character Geometry"/> <menu_item_call label="Test ErkeÄŸi" name="Test Male"/> <menu_item_call label="Test DiÅŸisi" name="Test Female"/> - <menu_item_call label="PG'yi Aç/Kapa" name="Toggle PG"/> <menu_item_check label="Avatar Seçimine İzin Ver" name="Allow Select Avatar"/> </menu> <menu_item_call label="Parametreleri Varsayılana Zorla" name="Force Params to Default"/> diff --git a/indra/newview/skins/default/xui/tr/notifications.xml b/indra/newview/skins/default/xui/tr/notifications.xml index 27f0deaf4a..488702f9ca 100644 --- a/indra/newview/skins/default/xui/tr/notifications.xml +++ b/indra/newview/skins/default/xui/tr/notifications.xml @@ -37,6 +37,12 @@ <button name="Help" text="$helptext"/> </form> </template> + <template name="okhelpignore"> + <form> + <button name="OK_okhelpignore" text="$yestext"/> + <button name="Help_okhelpignore" text="$helptext"/> + </form> + </template> <template name="yesnocancelbuttons"> <form> <button name="Yes" text="$yestext"/> @@ -360,13 +366,19 @@ Avatarınızın Kullanıcı adını girmeniz gerekmektedir. [SECOND_LIFE]'a giriÅŸ yapmak için bir hesabınız olması gerekir. Åžimdi bir hesap oluÅŸturmak ister misiniz? <url name="url"> - http://join.secondlife.com/ + [create_account_url] </url> <usetemplate name="okcancelbuttons" notext="Tekrar dene" yestext="Yeni bir hesap oluÅŸtur"/> </notification> <notification name="InvalidCredentialFormat"> Kullanıcı adı alanına Avatarınızın Kullanıcı adını ya da Ad ve Soyadını girmeniz ve yeniden oturum açmanız gerekmektedir. </notification> + <notification name="InvalidGrid"> + '[GRID]' geçerli bir aÄŸ tanımlayıcısı deÄŸil. + </notification> + <notification name="InvalidLocationSLURL"> + BaÅŸlangıç konumunuz için geçerli bir aÄŸ belirtilmedi. + </notification> <notification name="DeleteClassified"> '[NAME]' ilanı silinsin mi? Ödenen ücretler iade edilmeyecektir. @@ -472,8 +484,8 @@ Nesne aralık dışında ya da silinmiÅŸ olabilir. AÅŸağıdaki nedenden dolayı, derlenen komut dosyası kaydedilirken bir sorun oluÅŸtu: [REASON]. Lütfen komut dosyasını kaydetmeyi daha sonra tekrar deneyin. </notification> <notification name="StartRegionEmpty"> - Hata. BaÅŸlangıç Bölgeniz tanımlanmamış. -Lütfen BaÅŸlangıç Konumu kutusuna Bölge adını yazın ya da Son Konumum veya Ana Konumumu BaÅŸlangıç Konumu olarak seçin. + BaÅŸlangıç Bölgeniz tanımlanmamış. +Lütfen BaÅŸlangıç Konumu kutusuna Bölge adını yazın ya da Son BulunduÄŸum Konum veya Ana Konumumu BaÅŸlangıç Konumu olarak seçin. <usetemplate name="okbutton" yestext="Tamam"/> </notification> <notification name="CouldNotStartStopScript"> @@ -600,6 +612,9 @@ En fazla [MAX] nesneyi birbirine baÄŸlayabilirsiniz. Lütfen hiçbirinin kilitli olmadığından ve hepsine sahip olduÄŸunuzdan emin olun. </notification> + <notification name="CannotLinkPermanent"> + Nesneler bölge sınırları üzerinden baÄŸlantılandırılamaz. + </notification> <notification name="CannotLinkDifferentOwners"> Nesnelerin hepsinin sahibi aynı olmadığı için nesneler birbirine baÄŸlanamıyor. @@ -978,6 +993,41 @@ Etkin grubunuz adına arazi satın almak için gerekli izne sahip deÄŸilsiniz. <button name="Cancel" text="İptal"/> </form> </notification> + <notification label="Otomatik Yerine Koyma Listesine Ekle" name="AddAutoReplaceList"> + Yeni liste için isim: + <form name="form"> + <button name="SetName" text="Tamam"/> + </form> + </notification> + <notification label="Otomatik Yerine Koyma Listesinin Adını DeÄŸiÅŸtir" name="RenameAutoReplaceList"> + '[DUPNAME]' adı kullanılıyor + Benzersiz yeni bir ad girin: + <form name="form"> + <button name="ReplaceList" text="Mevcut Listenin Yerine Koy"/> + <button name="SetName" text="Yeni Adı Kullan"/> + </form> + </notification> + <notification name="InvalidAutoReplaceEntry"> + Anahtar kelime tek bir kelime olmalıdır; deÄŸiÅŸtirme boÅŸ olamaz. + </notification> + <notification name="InvalidAutoReplaceList"> + Bu deÄŸiÅŸtirme listesi geçerli deÄŸil. + </notification> + <notification name="SpellingDictImportRequired"> + Bir dosya, ad ve dil belirtmelisiniz. + </notification> + <notification name="SpellingDictIsSecondary"> + [DIC_NAME] sözlüğünde bir "aff" dosyası yok gibi görünüyor; bu da "ikincil" bir sözlük olduÄŸu anlamına gelir. +İlave bir sözlük olarak kullanılabilir; ancak Ana sözlüğünüz olarak kullanılamaz. + +Bkz. https://wiki.secondlife.com/wiki/Adding_Spelling_Dictionaries + </notification> + <notification name="SpellingDictImportFailed"> + Åžu kopyalama yapılamıyor: + [FROM_NAME] + kaynağından ÅŸuraya: + [TO_NAME] + </notification> <notification label="Dış Görünümü Kaydet" name="SaveOutfitAs"> Üzerimdekileri yeni bir Dış Görünüm olarak kaydet: <form name="form"> @@ -1157,7 +1207,7 @@ sonraki: '[THIS_GPU]' Yakınındaki baÅŸka bir bölgeye taşındınız. </notification> <notification name="AvatarMovedLast"> - Son konumunuz ÅŸu anda kullanılamıyor. + Talep ettiÄŸiniz konum ÅŸu anda kullanılamıyor. Yakınındaki baÅŸka bir bölgeye taşındınız. </notification> <notification name="AvatarMovedHome"> @@ -1173,11 +1223,10 @@ Yeni bir ana konum ayarlamak isteyebilirsiniz. </form> </notification> <notification name="FirstRun"> - [APP_NAME] kurulumu tamamlandı. + [APP_NAME] yüklemesi tamamlandı. [SECOND_LIFE]'ı ilk kez kullanıyorsanız, oturum açmadan önce bir hesap oluÅŸturmalısınız. -Yeni bir hesap oluÅŸturmak için [http://join.secondlife.com secondlife.com] adresine dönülsün mü? - <usetemplate name="okcancelbuttons" notext="Devam" yestext="Yeni Hesap..."/> + <usetemplate name="okcancelbuttons" notext="Devam" yestext="Hesap OluÅŸtur..."/> </notification> <notification name="LoginPacketNeverReceived"> BaÄŸlantıda sorun yaşıyoruz. İnternet baÄŸlantınızda ya da [SECOND_LIFE_GRID] uygulamasında bir problem olabilir. @@ -1694,83 +1743,128 @@ Binlerce bölgeyi deÄŸiÅŸtirecek ve alan sunucusunu kesintiye uÄŸratacaktır. <usetemplate name="okcancelbuttons" notext="İptal" yestext="Tamam"/> </notification> <notification name="RegionEntryAccessBlocked"> - EriÅŸkinlik Seviyesi ayarlarınızdan dolayı bu Bölgeye giremezsiniz. Bu sorun yaşınızı doÄŸrulamak için gerekli bilgilerin eksik olmasından kaynaklanabilir. - -Lütfen en son Görüntüleyicinin yüklü olduÄŸunu doÄŸrulayın ve bu eriÅŸkinlik seviyesi ile eriÅŸilecek alanlar hakkında ayrıntılı bilgi edinmek için Bilgi Bankası'nı ziyaret edin. + Ziyaret etmeye çalıştığınız bölge, mevcut tercihlerinizi aÅŸan içeriÄŸe sahip. Ben > Tercihler > Genel sekmesini kullanarak tercihlerinizi deÄŸiÅŸtirebilirsiniz. <usetemplate name="okbutton" yestext="Tamam"/> </notification> - <notification name="RegionEntryAccessBlocked_KB"> - EriÅŸkinlik Seviyesi ayarlarınızdan dolayı bu bölgeye giremezsiniz. - -EriÅŸkinlik Seviyeleri hakkında daha fazla bilgi edinmek için Bilgi Bankası'nı ziyaret etmek ister misiniz? + <notification name="RegionEntryAccessBlocked_AdultsOnlyContent"> + Ziyaret etmeye çalıştığınız bölge [REGIONMATURITY] içeriÄŸe sahip, buna sadece yetiÅŸkinler eriÅŸebilir. <url name="url"> http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="EriÅŸkinlik Seviyesi ile ilgili kısıtlamalardan dolayı bu Bölgeye giremiyorum" name="okcancelignore" notext="Kapat" yestext="Bilgi Bankası'na Git"/> + <usetemplate ignoretext="Bölge geçiÅŸi: Ziyaret etmeye çalıştığınız bölge, sadece yetiÅŸkinlerin eriÅŸebileceÄŸi içeriÄŸe sahip." name="okcancelignore" notext="Kapat" yestext="Bilgi Bankası'na Git"/> </notification> <notification name="RegionEntryAccessBlocked_Notify"> - EriÅŸkinlik Seviyesi ayarlarınızdan dolayı bu bölgeye giremezsiniz. + Ziyaret etmeye çalıştığınız bölgede [REGIONMATURITY] içeriÄŸi mevcut, ama mevcut tercihleriniz [REGIONMATURITY] içeriÄŸini dışlayacak ÅŸekilde ayarlanmış. + </notification> + <notification name="RegionEntryAccessBlocked_NotifyAdultsOnly"> + Ziyaret etmeye çalıştığınız bölge [REGIONMATURITY] içeriÄŸe sahip, buna sadece yetiÅŸkinler eriÅŸebilir. </notification> <notification name="RegionEntryAccessBlocked_Change"> - EriÅŸkinlik Seviyesi tercihlerinizden dolayı bu Bölgeye giremezsiniz. - -İstenilen bölgeye girmek için, lütfen eriÅŸkinlik Seviyesi tercihinizi deÄŸiÅŸtirin. Bu tercih [REGIONMATURITY] içerikli alanlar içinde arama yapabilmenizi ve bu alanlara eriÅŸebilmenizi saÄŸlayacak. DeÄŸiÅŸiklikleri geri almak için, Ben > Tercihler > Genel sekmesine gidin. + Ziyaret etmeye çalıştığınız bölgede [REGIONMATURITY] içeriÄŸi mevcut, ama mevcut tercihleriniz [REGIONMATURITY] içeriÄŸini dışlayacak ÅŸekilde ayarlanmış. Tercihlerinizi deÄŸiÅŸtirebilirsiniz veya iptal edebilirsiniz. Tercihleriniz deÄŸiÅŸtikten sonra bölgeye tekrar girmeye çalışabilirsiniz. + <form name="form"> + <button name="OK" text="Tercihleri deÄŸiÅŸtirin"/> + <button name="Cancel" text="İptal"/> + <ignore name="ignore" text="Bölge geçiÅŸi: Ziyaret etmeye çalıştığınız bölge, mevcut tercihleriniz tarafından dışlanan içeriÄŸe sahip."/> + </form> + </notification> + <notification name="RegionEntryAccessBlocked_PreferencesOutOfSync"> + Tercihleriniz ile sunucu arasında senkronizasyon eksikliÄŸi olduÄŸu için ışınlama iÅŸleminizde teknik sorunlar yaÅŸanıyoruz. + <usetemplate name="okbutton" yestext="Tamam"/> + </notification> + <notification name="TeleportEntryAccessBlocked"> + Ziyaret etmeye çalıştığınız bölge, mevcut tercihlerinizi aÅŸan içeriÄŸe sahip. Ben > Tercihler > Genel sekmesini kullanarak tercihlerinizi deÄŸiÅŸtirebilirsiniz. + <usetemplate name="okbutton" yestext="Tamam"/> + </notification> + <notification name="TeleportEntryAccessBlocked_AdultsOnlyContent"> + Ziyaret etmeye çalıştığınız bölge [REGIONMATURITY] içeriÄŸe sahip, buna sadece yetiÅŸkinler eriÅŸebilir. + <url name="url"> + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview + </url> + <usetemplate ignoretext="Işınla: Ziyaret etmeye çalıştığınız bölge, sadece yetiÅŸkinlerin eriÅŸebileceÄŸi içeriÄŸe sahip." name="okcancelignore" notext="Kapat" yestext="Bilgi Bankası'na Git"/> + </notification> + <notification name="TeleportEntryAccessBlocked_Notify"> + Ziyaret etmeye çalıştığınız bölgede [REGIONMATURITY] içeriÄŸi mevcut, ama mevcut tercihleriniz [REGIONMATURITY] içeriÄŸini dışlayacak ÅŸekilde ayarlanmış. + </notification> + <notification name="TeleportEntryAccessBlocked_NotifyAdultsOnly"> + Ziyaret etmeye çalıştığınız bölge [REGIONMATURITY] içeriÄŸe sahip, buna sadece yetiÅŸkinler eriÅŸebilir. + </notification> + <notification name="TeleportEntryAccessBlocked_ChangeAndReTeleport"> + Ziyaret etmeye çalıştığınız bölgede [REGIONMATURITY] içeriÄŸi mevcut, ama mevcut tercihleriniz [REGIONMATURITY] içeriÄŸini dışlayacak ÅŸekilde ayarlanmış. Tercihlerinizi deÄŸiÅŸtirebilirsiniz ve ışınlamaya devam edebilirsiniz veya bu ışınlama iÅŸlemini iptal edebilirsiniz. <form name="form"> - <button name="OK" text="Tercihi DeÄŸiÅŸtir"/> - <button name="Cancel" text="Kapat"/> - <ignore name="ignore" text="SeçtiÄŸim Seviye tercihleri bir bölgeye girmemi engelliyor"/> + <button name="OK" text="DeÄŸiÅŸtir ve devam et"/> + <button name="Cancel" text="İptal"/> + <ignore name="ignore" text="Işınlama (yeniden baÅŸlatılabilir): Ziyaret etmeye çalıştığınız bölge, mevcut tercihleriniz tarafından dışlanan içeriÄŸe sahip."/> </form> </notification> + <notification name="TeleportEntryAccessBlocked_Change"> + Ziyaret etmeye çalıştığınız bölgede [REGIONMATURITY] içeriÄŸi mevcut, ama mevcut tercihleriniz [REGIONMATURITY] içeriÄŸini dışlayacak ÅŸekilde ayarlanmış. Tercihlerinizi deÄŸiÅŸtirebilirsiniz veya ışınlamayı iptal edebilirsiniz. Tercihleriniz deÄŸiÅŸtikten sonra ışınlamayı tekrar yapmaya kalkışmanız gerekecek. + <form name="form"> + <button name="OK" text="Tercihleri deÄŸiÅŸtirin"/> + <button name="Cancel" text="İptal"/> + <ignore name="ignore" text="Işınlama (yeniden baÅŸlatılamaz): Ziyaret etmeye çalıştığınız bölge, mevcut tercihleriniz tarafından dışlanan içeriÄŸe sahip."/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_PreferencesOutOfSync"> + Tercihleriniz ile sunucu arasında senkronizasyon eksikliÄŸi olduÄŸu için ışınlama iÅŸleminizde teknik sorunlar yaÅŸanıyoruz. + <usetemplate name="okbutton" yestext="Tamam"/> + </notification> <notification name="PreferredMaturityChanged"> - EriÅŸkinlik Seviyesi tercihiniz artık [RATING]. + [RATING] içeriÄŸine sahip bir bölgeyi ziyaret edeceÄŸiniz hakkında baÅŸka bildirim almayacaksınız. Daha sonra menü çubuÄŸunda Ben > Tercihler > Genel sekmesini kullanarak tercihlerinizi deÄŸiÅŸtirebilirsiniz. + <usetemplate name="okbutton" yestext="Tamam"/> + </notification> + <notification name="MaturityChangeError"> + Åžu anda [PREFERRED_MATURITY] içeriÄŸini görüntüleyecek ÅŸekilde tercihlerinizi deÄŸiÅŸtiremedik. Tercihleriniz, [ACTUAL_MATURITY] içeriÄŸini görüntüleyecek ÅŸekilde sıfırlandı. Menü çubuÄŸunda Ben > Tercihler > Genel sekmesini kullanarak tercihlerinizi tekrar deÄŸiÅŸtirmeyi deneyebilirsiniz. + <usetemplate name="okbutton" yestext="Tamam"/> </notification> <notification name="LandClaimAccessBlocked"> - EriÅŸkinlik Seviyesi ayarlarınızdan dolayı bu arazi üzerinde hak talebinde bulunamazsınız. Bu sorun yaşınızı doÄŸrulamak için gerekli bilgilerin eksik olmasından kaynaklanabilir. - -Lütfen en son Görüntüleyicinin yüklü olduÄŸunu doÄŸrulayın ve bu eriÅŸkinlik seviyesi ile eriÅŸilecek alanlar hakkında ayrıntılı bilgi edinmek için Bilgi Bankası'nı ziyaret edin. + Hak talebinde bulunduÄŸunuz arazinin eriÅŸkinlik seviyesi mevcut tercihlerinizi aşıyor. Ben > Tercihler > Genel sekmesini kullanarak tercihlerinizi deÄŸiÅŸtirebilirsiniz. <usetemplate name="okbutton" yestext="Tamam"/> </notification> - <notification name="LandClaimAccessBlocked_KB"> - EriÅŸkinlik Seviyesi ayarlarınızdan dolayı bu arazi üzerinde hak talebinde bulunamazsınız. - -EriÅŸkinlik Seviyeleri hakkında daha fazla bilgi edinmek için Bilgi Bankası'nı ziyaret etmek ister misiniz? + <notification name="LandClaimAccessBlocked_AdultsOnlyContent"> + Bu arazi üzerinde sadece yetiÅŸkinler hak talebinde bulunabilir. <url name="url"> http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="EriÅŸkinlik Seviyesi ile ilgili kısıtlandırmalardan dolayı bu Arazi üzerinde hak talebinde bulunamıyorum." name="okcancelignore" notext="Kapat" yestext="Bilgi Bankası'na Git"/> + <usetemplate ignoretext="Bu arazi üzerinde sadece yetiÅŸkinler hak talebinde bulunabilir." name="okcancelignore" notext="Kapat" yestext="Bilgi Bankası'na Git"/> </notification> <notification name="LandClaimAccessBlocked_Notify"> - EriÅŸkinlik Seviyesi ayarlarınızdan dolayı bu arazi üzerinde hak talebinde bulunamazsınız. + Hak talebinde bulunduÄŸunuz arazide [REGIONMATURITY] içeriÄŸi mevcut, ama mevcut tercihleriniz [REGIONMATURITY] içeriÄŸini dışlayacak ÅŸekilde ayarlanmış. + </notification> + <notification name="LandClaimAccessBlocked_NotifyAdultsOnly"> + Hak talebinde bulunduÄŸunuz arazi [REGIONMATURITY] içeriÄŸe sahip, buna sadece yetiÅŸkinler eriÅŸebilir. </notification> <notification name="LandClaimAccessBlocked_Change"> - EriÅŸkinlik Seviyesi tercihinizden dolayı bu arazi üzerinde hak talebinde bulunamazsınız. - -EriÅŸkinlik Seviyesi tercihinizi ÅŸimdi yükseltmek ve araziye girebilmek için 'Tercihi DeÄŸiÅŸtir' seçeneÄŸini tıklatabilirsiniz. Böylece [REGIONMATURITY] içerikli alanlar içinde arama yapabilecek ve bu alanlara eriÅŸebileceksiniz. İleride bu ayarı eski haline döndürmek isterseniz, Ben > Tercihler > Genel sekmesine gidin. - <usetemplate ignoretext="SeçtiÄŸim Seviye tercihi Arazi üzerinde hak talebinde bulunmamı engelliyor" name="okcancelignore" notext="Kapat" yestext="Tercihi DeÄŸiÅŸtir"/> + Hak talebinde bulunduÄŸunuz arazide [REGIONMATURITY] içeriÄŸi mevcut, ama mevcut tercihleriniz [REGIONMATURITY] içeriÄŸini dışlayacak ÅŸekilde ayarlanmış. Tercihlerinizi deÄŸiÅŸtirebilirsiniz, sonra arazi üzerinde tekar hak talebinde bulunabilirsiniz. + <form name="form"> + <button name="OK" text="Tercihleri deÄŸiÅŸtirin"/> + <button name="Cancel" text="İptal"/> + <ignore name="ignore" text="Hak talebinde bulunduÄŸunuz arazi, mevcut tercihleriniz tarafından dışlanan içeriÄŸe sahip."/> + </form> </notification> <notification name="LandBuyAccessBlocked"> - EriÅŸkinlik Seviyesi ayarlarınızdan dolayı bu araziyi satın alamazsınız. Bu sorun yaşınızı doÄŸrulamak için gerekli bilgilerin eksik olmasından kaynaklanabilir. - -Lütfen en son Görüntüleyicinin yüklü olduÄŸunu doÄŸrulayın ve bu eriÅŸkinlik seviyesi ile eriÅŸilecek alanlar hakkında ayrıntılı bilgi edinmek için Bilgi Bankası'nı ziyaret edin. + Satın almaya çalıştığınız arazinin eriÅŸkinlik seviyesi mevcut tercihlerinizi aşıyor. Ben > Tercihler > Genel sekmesini kullanarak tercihlerinizi deÄŸiÅŸtirebilirsiniz. <usetemplate name="okbutton" yestext="Tamam"/> </notification> - <notification name="LandBuyAccessBlocked_KB"> - EriÅŸkinlik Seviyesi ayarlarınızdan dolayı bu araziyi satın alamazsınız. - -EriÅŸkinlik Seviyeleri hakkında daha fazla bilgi edinmek için Bilgi Bankası'nı ziyaret etmek ister misiniz? + <notification name="LandBuyAccessBlocked_AdultsOnlyContent"> + Bu araziyi sadece yetiÅŸkinler satın alabilir. <url name="url"> http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="EriÅŸkinlik Seviyesi ile ilgili kısıtlandırmalardan dolayı bu Araziyi satın alamıyorum" name="okcancelignore" notext="Kapat" yestext="Bilgi Bankası'na Git"/> + <usetemplate ignoretext="Bu araziyi sadece yetiÅŸkinler satın alabilir." name="okcancelignore" notext="Kapat" yestext="Bilgi Bankası'na Git"/> </notification> <notification name="LandBuyAccessBlocked_Notify"> - EriÅŸkinlik Seviyesi ayarlarınızdan dolayı bu araziyi satın alamazsınız. + Satın almaya çalıştığınız arazide [REGIONMATURITY] içeriÄŸi mevcut, ama mevcut tercihleriniz [REGIONMATURITY] içeriÄŸini dışlayacak ÅŸekilde ayarlanmış. + </notification> + <notification name="LandBuyAccessBlocked_NotifyAdultsOnly"> + Ziyaret etmeye çalıştığınız arazi [REGIONMATURITY] içeriÄŸe sahip, buna sadece yetiÅŸkinler eriÅŸebilir. </notification> <notification name="LandBuyAccessBlocked_Change"> - EriÅŸkinlik Seviyesi tercihinizden dolayı bu araziyi satın alamazsınız. - -EriÅŸkinlik Seviyesi tercihinizi ÅŸimdi yükseltmek ve araziye girebilmek için 'Tercihi DeÄŸiÅŸtir' seçeneÄŸini tıklatabilirsiniz. Böylece [REGIONMATURITY] içerikli alanlar içinde arama yapabilecek ve bu alanlara eriÅŸebileceksiniz. İleride bu ayarı eski haline döndürmek isterseniz, Ben > Tercihler > Genel sekmesine gidin. - <usetemplate ignoretext="SeçtiÄŸim Seviye tercihi Araziyi satın almamı engelliyor" name="okcancelignore" notext="Kapat" yestext="Tercihi DeÄŸiÅŸtir"/> + Satın almaya çalıştığınız arazide [REGIONMATURITY] içeriÄŸi mevcut, ama mevcut tercihleriniz [REGIONMATURITY] içeriÄŸini dışlayacak ÅŸekilde ayarlanmış. Tercihlerinizi deÄŸiÅŸtirebilirsiniz, sonra araziyi tekrar satın almaya çalışabilirsiniz. + <form name="form"> + <button name="OK" text="Tercihleri deÄŸiÅŸtirin"/> + <button name="Cancel" text="İptal"/> + <ignore name="ignore" text="Satın almaya çalıştığınız arazi, mevcut tercihleriniz tarafından dışlanan içeriÄŸe sahip."/> + </form> </notification> <notification name="TooManyPrimsSelected"> Çok fazla prim seçilmiÅŸ. Lütfen [MAX_PRIM_COUNT] ya da daha az prim seçin ve tekrar deneyin @@ -1824,10 +1918,9 @@ EriÅŸkinlik Seviyesi tercihinizi ÅŸimdi yükseltmek ve araziye girebilmek için </form> </notification> <notification label="Bölgenin EriÅŸkinlik Seviyesi DeÄŸiÅŸti" name="RegionMaturityChange"> - Bu bölgenin eriÅŸkinlik seviyesi güncellendi. -DeÄŸiÅŸikliÄŸin harita üzerine yansıtılması biraz zaman alabilir. - -YetiÅŸkin bölgelerine girebilmek için, Sakinlerin yaÅŸ doÄŸrulama ya da ödeme doÄŸrulama yoluyla DoÄŸrulanmış bir Hesaba sahip olmaları gerekmektedir. + Bu bölgenin yetiÅŸkin içerik seviyesi deÄŸiÅŸti. +Bu deÄŸiÅŸikliÄŸin harita üzerine yansıtılması biraz zaman alabilir. + <usetemplate name="okbutton" yestext="Tamam"/> </notification> <notification label="Sesli Sohbet Sürüm UyumsuzluÄŸu" name="VoiceVersionMismatch"> [APP_NAME] uygulamasının bu sürümü bu bölgedeki Sesli Sohbet özelliÄŸi ile uyumlu deÄŸil. Sesli Sohbet özelliÄŸinin düzgün bir ÅŸekilde çalışabilmesi için [APP_NAME] uygulamasını güncellemeniz gerekiyor. @@ -2117,14 +2210,11 @@ DiÄŸer kiÅŸilerin bu konuma kolayca eriÅŸmesini saÄŸlamak için bu adrese bir we <usetemplate ignoretext="Görünümümü düzenlerken oluÅŸturduÄŸum giysiyi giy" name="okcancelignore" notext="Hayır" yestext="Evet"/> </notification> <notification name="NotAgeVerified"> - Second Life içinde yetiÅŸkinlere yönelik içeriÄŸe ve bölgelere eriÅŸmek için en az 18 yaşında olmalısınız. 18 yaşından büyük olduÄŸunuzu onaylamak için lütfen yaÅŸ doÄŸrulama sayfamızı ziyaret edin. -Bu adımda web tarayıcınızın baÅŸlatılacağına dikkat edin. - -[_URL] - <url name="url"> - https://secondlife.com/my/account/verification.php - </url> - <usetemplate ignoretext="Yaşımı doÄŸrulatmadım" name="okcancelignore" notext="İptal" yestext="YaÅŸ DoÄŸrulamasına Git"/> + Ziyaret etmeye çalıştığınız konum, yaşı 18 ve üzeri olan sakinlere kısıtlanmıştır. + <usetemplate ignoretext="YaÅŸ kısıtı olan alanları ziyaret etmek için yaşım yeterli deÄŸil." name="okignore" yestext="Tamam"/> + </notification> + <notification name="NotAgeVerified_Notify"> + Konum, 18 veya üzeri bir yaÅŸta olanlara kısıtlanmıştır. </notification> <notification name="Cannot enter parcel: no payment info on file"> Bu alanı ziyaret edebilmek için ödeme bilgilerinizin kayıtlı olması gerekir. [SECOND_LIFE] web sitesine gitmek ve bunu ayarlamak istiyor musunuz? @@ -2185,7 +2275,7 @@ Bu adımda web tarayıcınızın baÅŸlatılacağına dikkat edin. Terrain.raw karşıdan yüklendi </notification> <notification name="GestureMissing"> - Hmm. [NAME] mimiÄŸi veri tabanında yok. + [NAME] mimiÄŸi veri tabanında yok. </notification> <notification name="UnableToLoadGesture"> [NAME] mimiÄŸi karşıya yüklenemiyor. @@ -2386,6 +2476,23 @@ Burada uçamazsınız. <notification name="NoBuild"> Bu alanda inÅŸa etme özelliÄŸi devre dışı. Burada nesne inÅŸa edemez ve oluÅŸturamazsınız. </notification> + <notification name="PathfindingDirty"> + Bu bölgede bekleyen yol bulma deÄŸiÅŸiklikleri var. EÄŸer oluÅŸturma haklarına sahipseniz, “Bölgeyi yeniden kaydet†düğmesine tıklayarak bölgeyi yeniden kaydedebilirsiniz. + </notification> + <notification name="DynamicPathfindingDisabled"> + Bu bölgede dinamik yol bulma etkin deÄŸil. Yol bulma LSL çaÄŸrılarını kullanan komut dosyalı nesneler, bu bölgede beklendiiÄŸi gibi çalışmayabilir. + </notification> + <notification name="PathfindingRebakeNavmesh"> + Bu bölgede belirli diÄŸer nesneleri deÄŸiÅŸtirmek, hareket eden baÅŸka nesnelerin yanlış davranmasına neden olabilir. Hareket eden baÅŸka nesnelerin doÄŸru davranmasını saÄŸlamak için “Bölgeyi yeniden kaydet†düğmesine tıklayın. Daha fazla bilgi edinmek için “Yardım†seçimini yapın. + <url name="url"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </url> + <usetemplate helptext="Yardım" ignoretext="Bu bölgede belirli diÄŸer nesneleri deÄŸiÅŸtirmek, hareket eden baÅŸka nesnelerin yanlış davranmasına neden olabilir." name="okhelpignore" yestext="Tamam"/> + </notification> + <notification name="PathfindingCannotRebakeNavmesh"> + Bir hata meydana geldi. Bir aÄŸ veya sunucu sorunu olabilir ya da oluÅŸturma haklarına sahip olmayabilirsiniz. Bazen oturumu kapatıp, tekrar açmak bu sorunu çözer. + <usetemplate name="okbutton" yestext="Tamam"/> + </notification> <notification name="SeeAvatars"> Bu parsel, avatarları ve metin sohbetini baÅŸka bir parselden saklar. Parselin dışındaki diÄŸer sakinleri göremezsiniz, dışardakiler de sizi göremez. 0. kanaldaki normal metin sohbeti de engellenmiÅŸtir. </notification> @@ -2404,9 +2511,7 @@ Arazi sahibine ait olanlar dışında hiçbir komut dosyası çalışmayacak. İçinde bulunduÄŸunuz Bölgede sadece kamuya ait araziler üzerinde hak talebinde bulunabilirsiniz. </notification> <notification name="RegionTPAccessBlocked"> - EriÅŸkinlik Seviyesi ayarlarınızdan dolayı bu Bölgeye giremezsiniz. Yaşınızı doÄŸrulatmanız ve/veya en son Görüntüleyici'yi yüklemeniz gerekebilir. - -Lütfen bu eriÅŸkinlik Seviyesi ile eriÅŸilecek alanlar hakkında ayrıntılı bilgi edinmek için Bilgi Bankası'na gidin. + Ziyaret etmeye çalıştığınız bölge, mevcut tercihlerinizi aÅŸan içeriÄŸe sahip. Ben > Tercihler > Genel sekmesini kullanarak tercihlerinizi deÄŸiÅŸtirebilirsiniz. </notification> <notification name="URBannedFromRegion"> Bu bölgeye eriÅŸiminiz yasaklandı. @@ -2417,11 +2522,11 @@ Lütfen bu eriÅŸkinlik Seviyesi ile eriÅŸilecek alanlar hakkında ayrıntılı b <notification name="ImproperPaymentStatus"> Bu bölgeye girmek için gerekli ödeme durumuna sahip deÄŸilsiniz. </notification> - <notification name="MustGetAgeRgion"> - Bu bölgeye girebilmek için yaÅŸ doÄŸrulamanızın yapılmış olması gerekir. + <notification name="MustGetAgeRegion"> + Bu bölgeye girebilmek için 18 veya üzeri bir yaÅŸta olmanız gerekir. </notification> <notification name="MustGetAgeParcel"> - Bu parsele girebilmek için yaÅŸ doÄŸrulamanızın yapılmış olması gerekir. + Bu parsele girebilmek için 18 veya üzeri bir yaÅŸta olmanız gerekir. </notification> <notification name="NoDestRegion"> Seçili hedef bölge yok. @@ -2523,12 +2628,33 @@ Lütfen biraz sonra tekrar deneyin. <notification name="TeleportOffered"> [NAME_SLURL] size kendi konumuna ışınlanmayı teklif etti: -[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] <form name="form"> <button name="Teleport" text="Işınla"/> <button name="Cancel" text="İptal"/> </form> </notification> + <notification name="TeleportOffered_MaturityExceeded"> + [NAME_SLURL] size kendi konumuna ışınlanmayı teklif etti: + +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +Bu bölgede [REGION_CONTENT_MATURITY] içeriÄŸi mevcut, ama mevcut tercihleriniz [REGION_CONTENT_MATURITY] içeriÄŸini dışlayacak ÅŸekilde ayarlanmış durumda. Tercihlerinizi deÄŸiÅŸtirebilirsiniz ve ışınlamaya devam edebilirsiniz veya bu ışınlama iÅŸlemini iptal edebilirsiniz. + <form name="form"> + <button name="Teleport" text="DeÄŸiÅŸtir ve Devam Et"/> + <button name="Cancel" text="İptal"/> + </form> + </notification> + <notification name="TeleportOffered_MaturityBlocked"> + [NAME_SLURL] size kendi konumuna ışınlanmayı teklif etti: + +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +Ancak bu bölge sadece yetiÅŸkinlerin eriÅŸebileceÄŸi içeriÄŸe sahip. + </notification> <notification name="TeleportOfferSent"> Işınlanma teklifi [TO_NAME] adlı kiÅŸiye gönderildi </notification> @@ -2932,6 +3058,10 @@ Lütfen aÄŸ ve güvenlik duvarı ayarlarınızı kontrol edin. ( [EXISTENCE] saniyedir hayatta ) '[BODYREGION]' için [RESOLUTION] çözünürlükte kaydedilmiÅŸ bir dokuyu [TIME] saniye sonra yerel olarak güncellediniz. </notification> + <notification name="LivePreviewUnavailable"> + Kopyalanamaz ve/veya aktarılamaz olduÄŸu için bu dokunun bir önizlemesini görüntüleyemiyoruz. + <usetemplate ignoretext="Kopyalanamayan ve/veya aktarılamayan dokular için Canlı Önizleme modu mevcut olmayınca beni uyar" name="okignore" yestext="Tamam"/> + </notification> <notification name="ConfirmLeaveCall"> Bu aramadan çıkmak istediÄŸinize emin misiniz? <usetemplate ignoretext="Aramadan çıkmadan önce doÄŸrulama iste" name="okcancelignore" notext="Hayır" yestext="Evet"/> @@ -3103,6 +3233,62 @@ Görünümünüzü döndürmek için dünya üzerindeki herhangi bir yeri tıkla Bu eylem tüm menü öğelerini ve düğmelerini gizler. Bunları geri almak için [SHORTCUT] üzerine tekrar tıklayın. <usetemplate ignoretext="KA'ni gizlemeden önce onayla" name="okcancelignore" notext="İptal" yestext="Tamam"/> </notification> + <notification name="PathfindingLinksets_WarnOnPhantom"> + Bazı seçili baÄŸlantı kümelerinin Fantom bayrağı dönüştürülecek. + +Devam etmek istiyor musunuz? + <usetemplate ignoretext="Bazı seçili baÄŸlantı kümelerinin fantom bayrağı dönüştürülecek." name="okcancelignore" notext="İptal" yestext="Tamam"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted"> + Seçilen bazı baÄŸlantı kümeleri, baÄŸlantı kümesi için izin kısıtlamaları nedeniyle '[REQUESTED_TYPE]' olarak ayarlanamıyor. Bunun yerine bu baÄŸlantı kümeleri '[RESTRICTED_TYPE]' olarak ayarlanacak. + +Devam etmek istiyor musunuz? + <usetemplate ignoretext="Seçilen bazı baÄŸlantı kümeleri, baÄŸlantı kümesi için izin kısıtlamaları nedeniyle ayarlanamıyor." name="okcancelignore" notext="İptal" yestext="Tamam"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnVolume"> + Seçilen bazı baÄŸlantı kümeleri '[REQUESTED_TYPE]' olarak ayarlanamaz, çünkü ÅŸekil konveks deÄŸil. + +Devam etmek istiyor musunuz? + <usetemplate ignoretext="Seçilen bazı baÄŸlantı kümeleri ayarlanamaz, çünkü ÅŸekil konveks deÄŸil." name="okcancelignore" notext="İptal" yestext="Tamam"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted"> + Bazı seçili baÄŸlantı kümelerinin Fantom bayrağı dönüştürülecek. + +Seçilen bazı baÄŸlantı kümeleri, baÄŸlantı kümesi için izin kısıtlamaları nedeniyle '[REQUESTED_TYPE]' olarak ayarlanamıyor. Bunun yerine bu baÄŸlantı kümeleri '[RESTRICTED_TYPE]' olarak ayarlanacak. + +Devam etmek istiyor musunuz? + <usetemplate ignoretext="Bazı seçili baÄŸlantı kümelerinin fantom bayrağı dönüştürülecek, diÄŸerleri ise baÄŸlantı kümesi için izin kısıtlamaları nedeniyle ayarlanamıyor." name="okcancelignore" notext="İptal" yestext="Tamam"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnVolume"> + Bazı seçili baÄŸlantı kümelerinin Fantom bayrağı dönüştürülecek. + +Seçilen bazı baÄŸlantı kümeleri '[REQUESTED_TYPE]' olarak ayarlanamaz, çünkü ÅŸekil konveks deÄŸil. + +Devam etmek istiyor musunuz? + <usetemplate ignoretext="Bazı seçili baÄŸlantı kümelerinin fantom bayrağı dönüştürülecek, diÄŸerleri ise ÅŸekil konveks olmadığı için ayarlanamıyor" name="okcancelignore" notext="İptal" yestext="Tamam"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted_MismatchOnVolume"> + Seçilen bazı baÄŸlantı kümeleri, baÄŸlantı kümesi için izin kısıtlamaları nedeniyle '[REQUESTED_TYPE]' olarak ayarlanamıyor. Bunun yerine bu baÄŸlantı kümeleri '[RESTRICTED_TYPE]' olarak ayarlanacak. + +Seçilen bazı baÄŸlantı kümeleri '[REQUESTED_TYPE]' olarak ayarlanamaz, çünkü ÅŸekil konveks deÄŸil. Bu baÄŸlantı kümelerinin kullanım tipleri deÄŸiÅŸmez. + +Devam etmek istiyor musunuz? + <usetemplate ignoretext="Seçilen bazı baÄŸlantı kümeleri, baÄŸlantı kümesi için izin kısıtlamaları nedeniyle ve ÅŸekil konveks olmadığı için ayarlanamıyor." name="okcancelignore" notext="İptal" yestext="Tamam"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted_MismatchOnVolume"> + Bazı seçili baÄŸlantı kümelerinin Fantom bayrağı dönüştürülecek. + +Seçilen bazı baÄŸlantı kümeleri, baÄŸlantı kümesi için izin kısıtlamaları nedeniyle '[REQUESTED_TYPE]' olarak ayarlanamıyor. Bunun yerine bu baÄŸlantı kümeleri '[RESTRICTED_TYPE]' olarak ayarlanacak. + +Seçilen bazı baÄŸlantı kümeleri '[REQUESTED_TYPE]' olarak ayarlanamaz, çünkü ÅŸekil konveks deÄŸil. Bu baÄŸlantı kümelerinin kullanım tipleri deÄŸiÅŸmez. + +Devam etmek istiyor musunuz? + <usetemplate ignoretext="Bazı seçili baÄŸlantı kümelerinin fantom bayrağı dönüştürülecek, diÄŸerleri ise baÄŸlantı kümesi için izin kısıtlamaları nedeniyle ve ÅŸekil konveks olmadığı için ayarlanamıyor." name="okcancelignore" notext="İptal" yestext="Tamam"/> + </notification> + <notification name="PathfindingLinksets_ChangeToFlexiblePath"> + Seçilen nesne navigasyon örgüsünü etkiliyor. Bunu bir Esnek Yol olarak deÄŸiÅŸtirirseniz, navigasyon örgüsünden çıkartmış olursunuz. + <usetemplate ignoretext="Seçilen nesne navigasyon örgüsünü etkiliyor. Bunu bir Esnek Yol olarak deÄŸiÅŸtirirseniz, navigasyon örgüsünden çıkartmış olursunuz." name="okcancelignore" notext="İptal" yestext="Tamam"/> + </notification> <global name="UnsupportedGLRequirements"> [APP_NAME] uygulaması için gerekli donanım gereksinimlerine sahip olmadığınız görünüyor. [APP_NAME] çoklu doku desteÄŸi sunan bir OpenGL grafik kartı gerektiriyor. EÄŸer grafik kartınız bu özellikteyse, grafik kartınızın en son sürücülerine ve iÅŸletim sisteminiz için gerekli Service Pack ve yamalara sahip olup olmadığınızı kontrol etmeyi deneyebilirsiniz. @@ -3139,4 +3325,12 @@ Bundan sonra bu dosya için güncellemeler devre dışı bırakılacak. Geçersiz veya okunamayan bir görüntü dosyası [FNAME] eklenmeye kalkışıldı, ancak dosya açılamadı veya ÅŸifresi çözülemedi. GiriÅŸim iptal edildi. </notification> + <notification name="PathfindingReturnMultipleItems"> + [NUM_ITEMS] öğeyi iade ediyorsunuz. Devam etmek istediÄŸinize emin misiniz? + <usetemplate ignoretext="Birden çok öğeyi iade etmek istediÄŸinize emin misiniz?" name="okcancelignore" notext="Hayır" yestext="Evet"/> + </notification> + <notification name="PathfindingDeleteMultipleItems"> + [NUM_ITEMS] öğeyi siliyorsunuz. Devam etmek istediÄŸinize emin misiniz? + <usetemplate ignoretext="Birden çok öğeyi silmek istediÄŸinize emin misiniz?" name="okcancelignore" notext="Hayır" yestext="Evet"/> + </notification> </notifications> diff --git a/indra/newview/skins/default/xui/tr/panel_bottomtray.xml b/indra/newview/skins/default/xui/tr/panel_bottomtray.xml deleted file mode 100644 index 26118d8b39..0000000000 --- a/indra/newview/skins/default/xui/tr/panel_bottomtray.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="bottom_tray"> - <string name="DragIndicationImageName" value="Accordion_ArrowOpened_Off"/> - <string name="SpeakBtnToolTip" value="Mikrofonu açar/kapatır"/> - <string name="VoiceControlBtnToolTip" value="Ses kontrol panelini gösterir/gizler"/> - <layout_stack name="toolbar_stack"> - <layout_panel name="speak_panel"> - <talk_button name="talk"> - <speak_button label="KonuÅŸ" label_selected="KonuÅŸ" name="speak_btn"/> - </talk_button> - </layout_panel> - <layout_panel name="gesture_panel"> - <gesture_combo_list label="Mimik" name="Gesture" tool_tip="Mimikleri gösterir/gizler"/> - </layout_panel> - <layout_panel name="movement_panel"> - <bottomtray_button label="Hareket Et" name="movement_btn" tool_tip="Hareket kontrollerini gösterir/gizler"/> - </layout_panel> - <layout_panel name="cam_panel"> - <bottomtray_button label="Görünüm" name="camera_btn" tool_tip="Kamera kontrollerini gösterir/gizler"/> - </layout_panel> - <layout_panel name="snapshot_panel"> - <bottomtray_button name="snapshots" tool_tip="Anlık görüntü al"/> - </layout_panel> - <layout_panel name="build_btn_panel"> - <bottomtray_button label="İnÅŸa Et" name="build_btn" tool_tip="İnÅŸa Et Aracını gösterir/gizler"/> - </layout_panel> - <layout_panel name="search_btn_panel"> - <bottomtray_button label="Ara" name="search_btn" tool_tip="Aramayı gösterir/gizler"/> - </layout_panel> - <layout_panel name="world_map_btn_panel"> - <bottomtray_button label="Harita" name="world_map_btn" tool_tip="Dünya Haritasını gösterir/gizler"/> - </layout_panel> - <layout_panel name="mini_map_btn_panel"> - <bottomtray_button label="Mini-Harita" name="mini_map_btn" tool_tip="Mini Haritayı gösterir/gizler"/> - </layout_panel> - <layout_panel name="im_well_panel"> - <chiclet_im_well name="im_well"> - <button name="Unread IM messages" tool_tip="Sohbetler"/> - </chiclet_im_well> - </layout_panel> - <layout_panel name="notification_well_panel"> - <chiclet_notification name="notification_well"> - <button name="Unread" tool_tip="Bildirimler"/> - </chiclet_notification> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/tr/panel_group_invite.xml b/indra/newview/skins/default/xui/tr/panel_group_invite.xml index 9b0c7f799a..4ba5761edb 100644 --- a/indra/newview/skins/default/xui/tr/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/tr/panel_group_invite.xml @@ -9,6 +9,9 @@ <panel.string name="already_in_group"> SeçtiÄŸiniz bazı Sakinler zaten grupta yer alıyor, bu yüzden bunlara davetiye gönderilmedi. </panel.string> + <panel.string name="invite_selection_too_large"> + Gönderilmeyen Grup Davetiyeleri: Çok fazla Sakin seçilmiÅŸ. Grup Davetiyelerinde talep başına 100 sınırı vardır. + </panel.string> <text name="help_text"> Grubunuza davet etmek için birden fazla Sakin seçebilirsiniz. BaÅŸlamak için "Sakin Seçiciyi Aç" üzerine tıklayın. </text> diff --git a/indra/newview/skins/default/xui/tr/panel_login.xml b/indra/newview/skins/default/xui/tr/panel_login.xml index acd6aa1921..28d316e46b 100644 --- a/indra/newview/skins/default/xui/tr/panel_login.xml +++ b/indra/newview/skins/default/xui/tr/panel_login.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_login"> - <panel.string name="create_account_url"> - http://join.secondlife.com/ - </panel.string> <panel.string name="forgot_password_url"> http://secondlife.com/account/request.php </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> + <text name="log_in_text"> + OTURUM AÇ + </text> <text name="username_text"> Kullanıcı Adı: </text> @@ -15,15 +15,8 @@ <text name="password_text"> Parola: </text> - <check_box label="Parolayı hatırla" name="remember_check"/> - <button label="Oturum Aç" name="connect_btn"/> - <text name="mode_selection_text"> - Mod: - </text> - <combo_box name="mode_combo" tool_tip="Modunuzu seçin. Hızlı, kolay keÅŸif yapmak ve sohbet için Temel seçimini yapın. Daha fazla özelliÄŸe eriÅŸmek için GeliÅŸmiÅŸ seçimini yapın."> - <combo_box.item label="Temel" name="Basic"/> - <combo_box.item label="GeliÅŸmiÅŸ" name="Advanced"/> - </combo_box> + </layout_panel> + <layout_panel name="start_location_panel"> <text name="start_location_text"> Buradan baÅŸla: </text> @@ -33,16 +26,21 @@ <combo_box.item label="<Bölge adını girin>" name="Typeregionname"/> </combo_box> </layout_panel> - <layout_panel name="links"> - <text name="create_new_account_text"> - Kaydolun + <layout_panel name="links_login_panel"> + <text name="login_help"> + Oturum açarken yardım mı gerekiyor? </text> <text name="forgot_password_text"> Kullanıcı adınızı veya parolanızı mı unuttunuz? </text> - <text name="login_help"> - Oturum açarken yardım mı gerekiyor? + <button label="Oturum Aç" name="connect_btn"/> + <check_box label="Parolayı hatırla" name="remember_check"/> + </layout_panel> + <layout_panel name="links"> + <text name="create_account_text"> + HESABINIZI OLUÅžTURUN </text> + <button label="Åžimdi baÅŸla" name="create_new_account_btn"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/tr/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/tr/panel_nearby_chat_bar.xml index fd954475ac..7d191191c4 100644 --- a/indra/newview/skins/default/xui/tr/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/tr/panel_nearby_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="chat_bar"> +<panel name="nearby_chat"> <line_editor label="Sohbet etmek için buraya tıklayın." name="chat_box" tool_tip="Söylemek için Enter, bağırmak için Ctrl+Enter yapın"/> <button name="show_nearby_chat" tool_tip="yakın sohbet günlüğünü gösterir/gizler"/> </panel> diff --git a/indra/newview/skins/default/xui/tr/panel_preferences_chat.xml b/indra/newview/skins/default/xui/tr/panel_preferences_chat.xml index 9caf95a122..231e8fc5fe 100644 --- a/indra/newview/skins/default/xui/tr/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/tr/panel_preferences_chat.xml @@ -29,5 +29,7 @@ <check_box label="Aİ Sohbetleri" name="EnableIMChatPopups" tool_tip="Bir anlık ileti geldiÄŸinde açılır pencereleri görmek için iÅŸaretle"/> <spinner label="Yakındaki sohbet iletilerinin vurgulanma süresi:" name="nearby_toasts_lifetime"/> <spinner label="Yakındaki sohbet iletilerinin sönme süresi:" name="nearby_toasts_fadingtime"/> - <button label="Sohbet Çevirisi Ayarları" name="ok_btn"/> + <button label="Çeviri..." name="ok_btn"/> + <button label="Otomatik Yerine Koy..." name="autoreplace_showgui"/> + <button label="Yazım Denetimi Yapılıyor..." name="spellcheck_showgui"/> </panel> diff --git a/indra/newview/skins/default/xui/tr/panel_region_debug.xml b/indra/newview/skins/default/xui/tr/panel_region_debug.xml index 6e15e0f6f6..834ece563f 100644 --- a/indra/newview/skins/default/xui/tr/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/tr/panel_region_debug.xml @@ -30,5 +30,5 @@ <button label="En Çok Çarpışanlar..." name="top_colliders_btn" tool_tip="En çok potansiyel çarpışma yaÅŸayan nesnelerin listesi"/> <button label="En Çok Komut Dsy. ÇalÅŸtr...." name="top_scripts_btn" tool_tip="Komut dosyalarını çalıştırırken en çok zaman harcayan nesnelerin listesi"/> <button label="Bölgeyi Yeniden BaÅŸlat" name="restart_btn" tool_tip="2 dakikalık bir geri sayımdan sonra bölgeyi yeniden baÅŸlat"/> - <button label="Yeniden BaÅŸlatmayı Ertele" name="cancel_restart_btn" tool_tip="Bölgenin yeniden baÅŸlatılmasını 1 saat ertele"/> + <button label="Yeniden BaÅŸlatmayı İptal Et" name="cancel_restart_btn" tool_tip="Bölge yeniden baÅŸlatmasını iptal et"/> </panel> diff --git a/indra/newview/skins/default/xui/tr/panel_region_estate.xml b/indra/newview/skins/default/xui/tr/panel_region_estate.xml index f1df13df61..4a9028643f 100644 --- a/indra/newview/skins/default/xui/tr/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/tr/panel_region_estate.xml @@ -23,7 +23,7 @@ Sadece ÅŸu Sakinlere eriÅŸim izni verin: </text> <check_box label="Ödeme bilgileri kayıtlı" name="limit_payment" tool_tip="Sakinlerin bu gayrimenkule eriÅŸebilmesi için ödeme bilgilerinin kayıtlı olması gerekir. Daha fazla bilgi için [SUPPORT_SITE] adresini ziyaret edin."/> - <check_box label="YaÅŸ doÄŸrulaması yapılmış" name="limit_age_verified" tool_tip="Sakinlerin bu gayrimenkule eriÅŸebilmesi için yaÅŸ doÄŸrulamalarının yapılmış olması gerekir. Daha fazla bilgi için [SUPPORT_SITE] adresini ziyaret edin."/> + <check_box label="18 veya üzeri bir yaÅŸta" name="limit_age_verified" tool_tip="Sakinlerin bu gayrimenkule eriÅŸebilmesi için 18 veya üzeri bir yaÅŸta olmaları gerekir. Daha fazla bilgi için [SUPPORT_SITE] adresini ziyaret edin."/> <check_box label="Sesli Sohbete İzin Ver" name="voice_chat_check"/> <check_box label="DoÄŸrudan Işınlamaya İzin Ver" name="allow_direct_teleport"/> <button label="Uygula" name="apply_btn"/> diff --git a/indra/newview/skins/default/xui/tr/panel_region_texture.xml b/indra/newview/skins/default/xui/tr/panel_region_texture.xml deleted file mode 100644 index fd7ca2a893..0000000000 --- a/indra/newview/skins/default/xui/tr/panel_region_texture.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Zemin Dokuları" name="Textures"> - <text name="region_text_lbl"> - Bölge: - </text> - <text name="region_text"> - bilinmiyor - </text> - <text name="detail_texture_text"> - Yüzey Dokuları (512x512, 24 bit .tga dosyalar gerektirir) - </text> - <text name="height_text_lbl"> - 1 (Düşük) - </text> - <text name="height_text_lbl2"> - 2 - </text> - <text name="height_text_lbl3"> - 3 - </text> - <text name="height_text_lbl4"> - 4 (Yüksek) - </text> - <text name="height_text_lbl5"> - Doku Yükselti Aralıkları - </text> - <text name="height_text_lbl6"> - Kuzeybatı - </text> - <text name="height_text_lbl7"> - KuzeydoÄŸu - </text> - <spinner label="Düşük" name="height_start_spin_1"/> - <spinner label="Düşük" name="height_start_spin_3"/> - <spinner label="Yüksek" name="height_range_spin_1"/> - <spinner label="Yüksek" name="height_range_spin_3"/> - <text name="height_text_lbl8"> - Güneybatı - </text> - <text name="height_text_lbl9"> - GüneydoÄŸu - </text> - <spinner label="Düşük" name="height_start_spin_0"/> - <spinner label="Düşük" name="height_start_spin_2"/> - <spinner label="Yüksek" name="height_range_spin_0"/> - <spinner label="Yüksek" name="height_range_spin_2"/> - <text name="height_text_lbl10"> - Bu deÄŸerler yukarıdaki dokular için karışım aralığını temsil eder. - </text> - <text name="height_text_lbl11"> - Metre cinsinden olan bu deÄŸerler için, DÜŞÜK deÄŸer 1. Dokunun MAKSİMUM yüksekliÄŸi, YÜKSEK deÄŸer ise 4. Dokunun MİNİMUM yüksekliÄŸidir. - </text> - <button label="Uygula" name="apply_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/tr/panel_side_tray.xml b/indra/newview/skins/default/xui/tr/panel_side_tray.xml deleted file mode 100644 index 97bca38a50..0000000000 --- a/indra/newview/skins/default/xui/tr/panel_side_tray.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<!-- Side tray cannot show background because it is always - partially on screen to hold tab buttons. --> -<side_tray name="sidebar"> - <sidetray_tab description="Yan ÇubuÄŸu Aç/Kapa." name="sidebar_openclose" tab_title="Yan ÇubuÄŸu Aç/Kapa"/> - <sidetray_tab description="Ana konum." name="sidebar_home" tab_title="Ana konum"> - <panel label="ana konum" name="panel_home"/> - </sidetray_tab> - <sidetray_tab description="Kamuya açık profilinizi ve Favorilerinizi düzenleyin." name="sidebar_me" tab_title="Profilim"> - <panel_container name="panel_container"> - <panel label="Ben" name="panel_me"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="Yakındaki arkadaÅŸlarınızı, irtibatları ve kiÅŸileri bulun." name="sidebar_people" tab_title="KiÅŸiler"> - <panel_container name="panel_container"> - <panel label="Grup Profili" name="panel_group_info_sidetray"/> - <panel label="EngellenmiÅŸ Sakinler ve Nesneler" name="panel_block_list_sidetray"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="Gitmek istediÄŸiniz yerleri ve daha önce uÄŸradığınız yerleri bulun." label="Yerler" name="sidebar_places" tab_title="Yerler"> - <panel label="Yerler" name="panel_places"/> - </sidetray_tab> - <sidetray_tab description="Envanterinize göz atın." name="sidebar_inventory" tab_title="Envanterim"> - <panel label="Envanteri Düzenle" name="sidepanel_inventory"/> - </sidetray_tab> - <sidetray_tab description="Görünümünüzü deÄŸiÅŸtirin." name="sidebar_appearance" tab_title="Görünümüm"> - <panel label="Görünümü Düzenle" name="sidepanel_appearance"/> - </sidetray_tab> -</side_tray> diff --git a/indra/newview/skins/default/xui/tr/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/tr/panel_volume_pulldown.xml new file mode 100644 index 0000000000..0c8c7b68b5 --- /dev/null +++ b/indra/newview/skins/default/xui/tr/panel_volume_pulldown.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="volumepulldown_floater"> + <slider label="Ana" name="System Volume"/> + <slider label="Düğmeler" name="UI Volume"/> + <slider label="Ortam" name="Wind Volume"/> + <slider label="Sesler" name="SFX Volume"/> + <check_box name="gesture_audio_play_btn" tool_tip="Mimiklerdeki sesleri etkinleÅŸtir"/> + <slider label="Müzik" name="Music Volume"/> + <check_box name="enable_music" tool_tip="Müzik Akışını EtkinleÅŸtir"/> + <slider label="Ortam" name="Media Volume"/> + <check_box name="enable_media" tool_tip="Akış Ortamını EtkinleÅŸtir"/> + <slider label="Ses" name="Voice Volume"/> + <check_box name="enable_voice_check" tool_tip="Sesli Sohbeti EtkinleÅŸtir"/> +</panel> diff --git a/indra/newview/skins/default/xui/tr/sidepanel_item_info.xml b/indra/newview/skins/default/xui/tr/sidepanel_item_info.xml index 81291a431c..86b684c497 100644 --- a/indra/newview/skins/default/xui/tr/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/tr/sidepanel_item_info.xml @@ -3,6 +3,9 @@ <panel.string name="unknown"> (bilinmiyor) </panel.string> + <panel.string name="unknown_multiple"> + (bilinmiyor veya birden çok deÄŸer) + </panel.string> <panel.string name="public"> (kamuya açık) </panel.string> diff --git a/indra/newview/skins/default/xui/tr/sidepanel_task_info.xml b/indra/newview/skins/default/xui/tr/sidepanel_task_info.xml index 2fa6281f05..b0b9ab7716 100644 --- a/indra/newview/skins/default/xui/tr/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/tr/sidepanel_task_info.xml @@ -18,6 +18,12 @@ <panel.string name="text modify info 4"> Bu nesneleri deÄŸiÅŸtiremezsiniz </panel.string> + <panel.string name="text modify info 5"> + Bir bölge sınırı üzerinden bu nesneyi deÄŸiÅŸtiremezsiniz + </panel.string> + <panel.string name="text modify info 6"> + Bir bölge sınırı üzerinden bu nesneleri deÄŸiÅŸtiremezsiniz + </panel.string> <panel.string name="text modify warning"> Bu nesne baÄŸlantılı parçalara sahip </panel.string> @@ -95,6 +101,9 @@ </combo_box> <spinner label="Fiyat: L$" name="Edit Cost"/> <check_box label="Aramada göster" name="search_check" tool_tip="KiÅŸiler arama sonuçlarında bu nesneyi görebilsin"/> + <text name="pathfinding_attributes_label"> + Yol bulma özellikleri: + </text> <text name="B:"> B: </text> diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml index a8a691a98e..1be8f5974c 100644 --- a/indra/newview/skins/default/xui/tr/strings.xml +++ b/indra/newview/skins/default/xui/tr/strings.xml @@ -137,7 +137,7 @@ Çık </string> <string name="create_account_url"> - http://join.secondlife.com/ + http://join.secondlife.com/index.php?lang=tr-TR&sourceid=[sourceid] </string> <string name="LoginFailedViewerNotPermitted"> Kullandığınız görüntüleyici ile artık Second Life'a eriÅŸemezsiniz. Yeni bir görüntüleyiciyi karşıdan yüklemek için lütfen ÅŸu sayfayı ziyaret edin: @@ -1003,6 +1003,9 @@ Lütfen bir dakika içerisinde tekrar oturum açmayı deneyin. <string name="script_files"> Komut Dosyaları </string> + <string name="dictionary_files"> + Sözlükler + </string> <string name="AvatarSetNotAway"> Uzakta DeÄŸil </string> @@ -1408,6 +1411,12 @@ Lütfen bir dakika içerisinde tekrar oturum açmayı deneyin. <string name="InvFolder favorite"> Favorilerim </string> + <string name="InvFolder Favorites"> + Sık Kullanılanlarım + </string> + <string name="InvFolder favorites"> + Sık Kullanılanlarım + </string> <string name="InvFolder Current Outfit"> Mevcut Dış Görünüm </string> @@ -1423,6 +1432,12 @@ Lütfen bir dakika içerisinde tekrar oturum açmayı deneyin. <string name="InvFolder Meshes"> Örgüler </string> + <string name="InvFolder Received Items"> + Alınan Öğeler + </string> + <string name="InvFolder Merchant Outbox"> + Satıcı Giden Kutusu + </string> <string name="InvFolder Friends"> ArkadaÅŸlar </string> @@ -3861,6 +3876,12 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne baÅŸvurun. <string name="LocationCtrlSeeAVsTooltip"> Bu parselin dışında avatarlar görünür durumda ve sohbete izin veriliyor </string> + <string name="LocationCtrlPathfindingDirtyTooltip"> + Bölge yeniden kaydedilinceye kadar hareket eden nesneler bu bölgede doÄŸru davranmayabilir. + </string> + <string name="LocationCtrlPathfindingDisabledTooltip"> + Bu bölgede dinamik yol bulma etkin deÄŸil. + </string> <string name="UpdaterWindowTitle"> [APP_NAME] GüncelleÅŸtirme </string> @@ -5013,6 +5034,21 @@ Düzenleyici yolunu çift tırnakla çevrelemeyi deneyin. <string name="Normal"> Normal </string> + <string name="Pathfinding_Wiki_URL"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </string> + <string name="Pathfinding_Object_Attr_None"> + Hiçbiri + </string> + <string name="Pathfinding_Object_Attr_Permanent"> + Navigasyon örgüsünü etkiler + </string> + <string name="Pathfinding_Object_Attr_Character"> + Karakter + </string> + <string name="Pathfinding_Object_Attr_MultiSelect"> + (Birden çok) + </string> <string name="snapshot_quality_very_low"> Çok Düşük </string> @@ -5028,4 +5064,10 @@ Düzenleyici yolunu çift tırnakla çevrelemeyi deneyin. <string name="snapshot_quality_very_high"> Çok Yüksek </string> + <string name="TeleportMaturityExceeded"> + Sakin bu bölgeyi ziyaret edemez. + </string> + <string name="UserDictionary"> + [User] + </string> </strings> diff --git a/indra/newview/skins/default/xui/tr/teleport_strings.xml b/indra/newview/skins/default/xui/tr/teleport_strings.xml index 62aaaf671f..20d09b1ee2 100644 --- a/indra/newview/skins/default/xui/tr/teleport_strings.xml +++ b/indra/newview/skins/default/xui/tr/teleport_strings.xml @@ -45,6 +45,9 @@ Bir dakika sonra tekrar deneyin. <message name="no_inventory_host"> Envanter sistemi ÅŸu anda kullanılamıyor. </message> + <message name="MustGetAgeRegion"> + Bu bölgeye girebilmek için 18 veya üzeri bir yaÅŸta olmanız gerekir. + </message> </message_set> <message_set name="progress"> <message name="sending_dest"> @@ -80,5 +83,8 @@ Bir dakika sonra tekrar deneyin. <message name="requesting"> Işınlanma talep ediliyor... </message> + <message name="pending"> + Işınlama Bekliyor... + </message> </message_set> </teleport_messages> diff --git a/indra/newview/skins/default/xui/zh/floater_aaa.xml b/indra/newview/skins/default/xui/zh/floater_aaa.xml index 0d110c0456..e2d6a2b004 100644 --- a/indra/newview/skins/default/xui/zh/floater_aaa.xml +++ b/indra/newview/skins/default/xui/zh/floater_aaa.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="Test Floater" title="測試浮動視窗"> <string name="test_the_vlt"> - This string CHANGE2 is extracted. + å—串 CHANGE2 已抽å–。 </string> <string name="testing_eli"> é€™åªæ˜¯æ¸¬è©¦ - 變更。 diff --git a/indra/newview/skins/default/xui/zh/floater_about.xml b/indra/newview/skins/default/xui/zh/floater_about.xml index 7e19c124a1..643881e416 100644 --- a/indra/newview/skins/default/xui/zh/floater_about.xml +++ b/indra/newview/skins/default/xui/zh/floater_about.xml @@ -5,10 +5,10 @@ [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] </floater.string> <floater.string name="AboutCompiler"> - Built with [COMPILER] version [COMPILER_VERSION] + 以 [COMPILER_VERSION] 版本 [COMPILER] 建置 </floater.string> <floater.string name="AboutPosition"> - You are at [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] located at <nolink>[HOSTNAME]</nolink> ([HOSTIP]) + ä½ çš„æ–¹ä½æ˜¯ [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1],地å€å:[REGION],主機:<nolink>[HOSTNAME]</nolink> ([HOSTIP]) [SERVER_VERSION] [SERVER_RELEASE_NOTES_URL] </floater.string> @@ -20,10 +20,10 @@ 顯示å¡ï¼š[GRAPHICS_CARD] </floater.string> <floater.string name="AboutDriver"> - Windows Graphics Driver Version: [GRAPHICS_DRIVER_VERSION] + Windows 顯示驅動程å¼ç‰ˆæœ¬ï¼š[GRAPHICS_DRIVER_VERSION] </floater.string> <floater.string name="AboutLibs"> - OpenGL Version: [OPENGL_VERSION] + OpenGL 版本:[OPENGL_VERSION] libcurl 版本: [LIBCURL_VERSION] J2C 解碼器版本: [J2C_VERSION] @@ -37,47 +37,60 @@ Qt Webkit 版本: [QT_WEBKIT_VERSION] <floater.string name="AboutTraffic"> å°åŒ…æå¤±ï¼š[PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%) </floater.string> + <floater.string name="ErrorFetchingServerReleaseNotesURL"> + æ“·å–伺æœå™¨ç‰ˆæœ¬èªªæ˜Ž URL 時出錯。 + </floater.string> <tab_container name="about_tab"> <panel label="資訊" name="support_panel"> <button label="覆製到剪貼簿" name="copy_btn"/> </panel> - <panel label="Credits" name="credits_panel"> - <text_editor name="credits_editor"> - Second Life is brought to you by ..., and many others. - -Thank you to the following Residents for helping to ensure that this is the best version yet: ..., and many others. - - - - -"The work goes on, the cause endures, the hope still lives, and the dreams shall never die" - Edward Kennedy + <panel label="貸記" name="credits_panel"> + <text name="linden_intro"> + 「第二人生ã€ç”±ä»¥ä¸‹çš„ Linden å®¶æ—å¸¶çµ¦ä½ ï¼š + </text> + <text name="contrib_intro"> + 這些人士åšäº†é–‹æ”¾æºç¢¼çš„è²¢ç»ï¼š + </text> + <text_editor name="contrib_names"> + 執行時期被å–代的å‡å稱 + </text_editor> + <text name="trans_intro"> + 以下人士æä¾›ç¿»è¯ï¼š + </text> + <text_editor name="trans_names"> + 執行時期被å–代的å‡å稱 </text_editor> </panel> - <panel label="Licenses" name="licenses_panel"> + <panel label="許å¯" name="licenses_panel"> <text_editor name="credits_editor"> - 3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion -APR Copyright (C) 2000-2004 The Apache Software Foundation -cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se) -DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc. -expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. -FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org). -GL Copyright (C) 1999-2004 Brian Paul. -google-perftools Copyright (c) 2005, Google Inc. -Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited. -jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW) -jpeglib Copyright (C) 1991-1998, Thomas G. Lane. -ogg/vorbis Copyright (C) 2001, Xiphophorus -OpenSSL Copyright (C) 1998-2002 The OpenSSL Project. -Pth Copyright (C) 1999-2006 Ralf S. Engelschall <rse@gnu.org> -SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga -SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) -xmlrpc-epi Copyright (C) 2000 Epinions, Inc. -zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler. -google-perftools Copyright (c) 2005, Google Inc. + 3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion + APR Copyright (C) 2011 The Apache Software Foundation + Collada DOM Copyright 2006 Sony Computer Entertainment Inc. + cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se) + DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc. + expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. + FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg. + GL Copyright (C) 1999-2004 Brian Paul. + GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University and David Luebke, Brenden Schubert, University of Virginia. + google-perftools Copyright (c) 2005, Google Inc. + Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited. + jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW) + jpeglib Copyright (C) 1991-1998, Thomas G. Lane. + ogg/vorbis Copyright (C) 2002, Xiphophorus + OpenSSL Copyright (C) 1998-2008 The OpenSSL Project. + PCRE Copyright (c) 1997-2012 University of Cambridge + SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga + SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + xmlrpc-epi Copyright (C) 2000 Epinions, Inc. + zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler. + + 第二人生 Viewer 採用 Havok (TM) 物ç†å¼•擎。 (c)Copyright 1999-2010 Havok.com Inc.(åŠå…¶æ”¾ç…§äººï¼‰ã€‚ ä¿ç•™ä¸€åˆ‡æ¬Šåˆ©ã€‚ 詳情見 www.havok.com。 + + æœ¬è»Ÿé«”å«æœ‰ NVIDIA Corporation æä¾›çš„æºç¨‹å¼ç¢¼ã€‚ -All rights reserved. See licenses.txt for details. + ä¿ç•™ä¸€åˆ‡æ¬Šåˆ©ã€‚ 詳情見 licenses.txt。 -語音èŠå¤©éŸ³é »ç·¨ç¢¼ï¼šPolycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C) + 語音èŠå¤©éŸ³é »æŠ€è¡“:Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C) </text_editor> </panel> </tab_container> diff --git a/indra/newview/skins/default/xui/zh/floater_about_land.xml b/indra/newview/skins/default/xui/zh/floater_about_land.xml index 2568d492f0..76db621951 100644 --- a/indra/newview/skins/default/xui/zh/floater_about_land.xml +++ b/indra/newview/skins/default/xui/zh/floater_about_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterland" title="關於土地"> +<floater name="floaterland" title="土地資料"> <floater.string name="maturity_icon_general"> "Parcel_PG_Dark" </floater.string> @@ -10,39 +10,39 @@ "Parcel_R_Dark" </floater.string> <floater.string name="Minutes"> - [MINUTES] minutes + [MINUTES] åˆ†é˜ </floater.string> <floater.string name="Minute"> - minute + åˆ†é˜ </floater.string> <floater.string name="Seconds"> - [SECONDS] seconds + [SECONDS] ç§’ </floater.string> <floater.string name="Remaining"> - remaining + 剩餘時間 </floater.string> <tab_container name="landtab"> <panel label="一般" name="land_general_panel"> <panel.string name="new users only"> - New Residents only + åƒ…é™æ–°å±…æ°‘ </panel.string> <panel.string name="anyone"> - Anyone + 任何人 </panel.string> <panel.string name="area_text"> å€åŸŸ </panel.string> <panel.string name="area_size_text"> - [AREA] m² + [AREA] 平方公尺 </panel.string> <panel.string name="auction_id_text"> - Auction ID: [ID] + æ‹è³£ ID:[ID] </panel.string> <panel.string name="need_tier_to_modify"> - You must approve your purchase to modify this land. + ä½ å¿…é ˆæ‰¹å‡†è³¼è²·æ‰èƒ½ä¿®æ”¹é€™å¡ŠåœŸåœ°ã€‚ </panel.string> <panel.string name="group_owned_text"> - ï¼ˆç¾¤çµ„æ‰€æ“æœ‰ï¼‰ + ï¼ˆç”±ç¾¤çµ„æ‰€æ“æœ‰ï¼‰ </panel.string> <panel.string name="profile_text"> 檔案 @@ -57,10 +57,10 @@ (無) </panel.string> <panel.string name="sale_pending_text"> - (Sale Pending) + (擱置銷售) </panel.string> <panel.string name="no_selection_text"> - No parcel selected. + æœªé¸æ“‡åœ°æ®µã€‚ </panel.string> <panel.string name="time_stamp_template"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] @@ -75,7 +75,7 @@ 類型: </text> <text name="LandTypeText"> - Mainland / Homestead + 大陸 / 家園 </text> <text name="ContentRating"> 分級: @@ -84,37 +84,37 @@ 完全æˆäºº </text> <text name="Owner:"> - æ“æœ‰è€…: + 所有人: </text> <text name="Group:"> 群組: </text> <button label="è¨å®š" name="Set..."/> - <check_box label="å…許讓渡給群組" name="check deed" tool_tip="A group officer can deed this land to the group, so it will be supported by the group's land allocation."/> - <button label="讓渡" name="Deed..." tool_tip="You may only deed land if you are an officer in the selected group."/> - <check_box label="Owner Makes Contribution With Deed" name="check contrib" tool_tip="When the land is deeded to the group, the former owner contributes enough land allocation to support it."/> + <check_box label="å…許讓渡給群組" name="check deed" tool_tip="群組工作人員å¯å°‡é€™åœŸåœ°è®“渡給群組,使其得到群組土地é…置的支æ´ã€‚"/> + <button label="讓渡" name="Deed..." tool_tip="ä½ å¿…é ˆæ˜¯æ‰€é¸ç¾¤çµ„的工作人員æ‰èƒ½è®“渡土地。"/> + <check_box label="所有人é€éŽè®“渡動作進行æç»" name="check contrib" tool_tip="將土地讓渡給群組,表示上一個所有人會æç»è¶³å¤ 土地來支æŒè®“渡。"/> <text name="For Sale:"> - 出售: + 出售ä¸ï¼š </text> <text name="Not for sale."> ä¸å‡ºå”® </text> <text name="For Sale: Price L$[PRICE]."> - Price: L$[PRICE] (L$[PRICE_PER_SQM]/m²) + åƒ¹æ ¼ï¼šL$[PRICE] (L$[PRICE_PER_SQM]/平方公尺) </text> <button label="出售土地" name="Sell Land..."/> <text name="For sale to"> 出售給:[BUYER] </text> <text name="Sell with landowners objects in parcel."> - Objects included in sale + 物件連帶一起出售 </text> <text name="Selling with no objects in parcel."> - Objects not included in sale + æ¤æ¬¡å‡ºå”®ä¸å«ç‰©ä»¶ </text> - <button label="Cancel Land Sale" label_selected="Cancel Land Sale" name="Cancel Land Sale"/> + <button label="å–æ¶ˆåœŸåœ°å‡ºå”®" label_selected="å–æ¶ˆåœŸåœ°å‡ºå”®" name="Cancel Land Sale"/> <text name="Claimed:"> - Claimed: + 已收å–: </text> <text name="DateClaimText"> Tue Aug 15 13:47:25 2006 @@ -123,52 +123,52 @@ é¢ç©ï¼š </text> <text name="PriceText"> - 4048 m² + 4048 平方公尺 </text> <text name="Traffic:"> æµé‡ï¼š </text> <text name="DwellText"> - 0 + 載入ä¸... </text> <button label="購買土地" name="Buy Land..."/> + <button label="Linden 出售" name="Linden Sale..." tool_tip="åœŸåœ°å¿…é ˆæœ‰äººæ“æœ‰ã€å·²è¨æœ‰å…§å®¹ï¼Œä¸¦ä¸”ä¸åœ¨æ‹è³£ä¸ã€‚"/> <button label="腳本資訊" name="Scripts..."/> <button label="為群組購買" name="Buy For Group..."/> <button label="購買通行權" name="Buy Pass..." tool_tip="通行權å…è¨±ä½ æš«æ™‚å¯å‡ºå…¥é€™å¡ŠåœŸåœ°ã€‚"/> <button label="放棄土地" name="Abandon Land..."/> - <button label="Reclaim Land" name="Reclaim Land..."/> - <button label="Linden Sale" name="Linden Sale..." tool_tip="Land must be owned, set content, and not already for auction."/> + <button label="收回土地" name="Reclaim Land..."/> </panel> <panel label="契約" name="land_covenant_panel"> <panel.string name="can_resell"> - Purchased land in this region may be resold. + 購買這地å€çš„土地å…許轉售。 </panel.string> <panel.string name="can_not_resell"> - Purchased land in this region may not be resold. + 購買這地å€çš„土地ä¸å…許轉售。 </panel.string> <panel.string name="can_change"> - Purchased land in this region may be joined or subdivided. + 購買這地å€çš„土地å…許進行åˆä½µæˆ–分割。 </panel.string> <panel.string name="can_not_change"> - Purchased land in this region may not be joined or subdivided. + 購買這地å€çš„土地ä¸å…許進行åˆä½µæˆ–分割。 </panel.string> <text name="estate_section_lbl"> é ˜åœ°ï¼š </text> <text name="estate_name_text"> - mainland + 大陸 </text> <text name="estate_owner_lbl"> - æ“æœ‰è€…: + 所有人: </text> <text name="estate_owner_text"> (無) </text> <text_editor name="covenant_editor"> - There is no Covenant provided for this Estate. + æ¤é ˜åœ°æ²’æœ‰ä»»ä½•å¥‘ç´„è¦æ±‚。 </text_editor> <text name="covenant_timestamp_text"> - Last Modified Wed Dec 31 16:00:00 1969 + 上次修改於 Wed Dec 31 16:00:00 1969 </text> <text name="region_section_lbl"> 地å€ï¼š @@ -180,7 +180,7 @@ 類型: </text> <text name="region_landtype_text"> - Mainland / Homestead + 大陸 / 家園 </text> <text name="region_maturity_lbl"> 分級: @@ -189,54 +189,54 @@ 完全æˆäºº </text> <text name="resellable_lbl"> - Resale: + 轉售: </text> <text name="resellable_clause"> - Land in this region may not be resold. + 這地å€çš„土地ä¸èƒ½è½‰å”®ã€‚ </text> <text name="changeable_lbl"> - Subdivide: + 分割: </text> <text name="changeable_clause"> - Land in this region may not be joined/subdivided. + 這地å€çš„土地ä¸èƒ½åˆä½µæˆ–分割。 </text> </panel> <panel label="物件" name="land_objects_panel"> <panel.string name="objects_available_text"> - [COUNT] out of [MAX] ([AVAILABLE] available) + 使用 [MAX] ä¸çš„ [COUNT] (剩餘 [AVAILABLE] å¯ç”¨ï¼‰ </panel.string> <panel.string name="objects_deleted_text"> - [COUNT] out of [MAX] ([DELETED] will be deleted) + ç›®å‰ [COUNT],最多å…許 [MAX] ([DELETED] 將被刪除) </panel.string> <text name="parcel_object_bonus"> - Region Object Bonus Factor: [BONUS] + 地å€ç‰©ä»¶è² è·å€æ•¸ï¼š[BONUS] </text> <text name="Simulator primitive usage:"> - 幾何元件使用: + 地å€å®¹ç´é‡ï¼š </text> <text name="objects_available"> 使用 [MAX] ä¸çš„ [COUNT] (剩餘 [AVAILABLE] å¯ç”¨ï¼‰ </text> <text name="Primitives parcel supports:"> - 地段所æä¾›çš„幾何元件數: + 地段土地容ç´é‡ï¼š </text> <text name="object_contrib_text"> [COUNT] </text> <text name="Primitives on parcel:"> - 地段上的幾何元件數: + åœ°æ®µåœŸåœ°è¡æ“Šé‡ï¼š </text> <text name="total_objects_text"> [COUNT] </text> <text name="Owned by parcel owner:"> - åœ°æ®µæ“æœ‰è€…æ‰€æ“æœ‰ï¼š + åœ°æ®µæ‰€æœ‰äººæ‰€æ“æœ‰ï¼š </text> <text name="owner_objects_text"> [COUNT] </text> <button label="顯示" label_selected="顯示" name="ShowOwner"/> - <button label="退回" name="ReturnOwner..." tool_tip="é€€å›žç‰©ä»¶çµ¦å®ƒå€‘çš„æ“æœ‰è€…。"/> + <button label="退回" name="ReturnOwner..." tool_tip="退回物件給它們的所有人。"/> <text name="Set to group:"> è¨å®šç¾¤çµ„: </text> @@ -244,7 +244,7 @@ [COUNT] </text> <button label="顯示" label_selected="顯示" name="ShowGroup"/> - <button label="退回" name="ReturnGroup..." tool_tip="é€€å›žç‰©ä»¶çµ¦å®ƒå€‘çš„æ“æœ‰è€…。"/> + <button label="退回" name="ReturnGroup..." tool_tip="退回物件給它們的所有人。"/> <text name="Owned by others:"> å…¶ä»–äººæ‰€æ“æœ‰ï¼š </text> @@ -252,26 +252,26 @@ [COUNT] </text> <button label="顯示" label_selected="顯示" name="ShowOther"/> - <button label="退回" name="ReturnOther..." tool_tip="é€€å›žç‰©ä»¶çµ¦å®ƒå€‘çš„æ“æœ‰è€…。"/> + <button label="退回" name="ReturnOther..." tool_tip="退回物件給它們的所有人。"/> <text name="Selected / sat upon:"> - Selected / sat upon: + å·²é¸ / å在上é¢ï¼š </text> <text name="selected_objects_text"> [COUNT] </text> <text name="Autoreturn"> - Auto return other Residents' objects (minutes, 0 for off): + 自動é€è¿”其他居民的物件(分é˜ï¼Œè¨ç‚º 0 å¯å–消自動): </text> <text name="Object Owners:"> - ç‰©ä»¶æ“æœ‰è€…: + 物件所有人: </text> <button name="Refresh List" tool_tip="刷新物件清單"/> <button label="退回物件" name="Return objects..."/> <name_list name="owner list"> - <name_list.columns label="Type" name="type"/> + <name_list.columns label="類型" name="type"/> <name_list.columns label="å稱" name="name"/> - <name_list.columns label="Count" name="count"/> - <name_list.columns label="Most Recent" name="mostrecent"/> + <name_list.columns label="計數" name="count"/> + <name_list.columns label="最近" name="mostrecent"/> </name_list> </panel> <panel label="é¸é …" name="land_options_panel"> @@ -279,8 +279,8 @@ 讓其他人å¯ä»¥åœ¨æœå°‹çµæžœä¸çœ‹åˆ°é€™å¡Šåœ°æ®µ </panel.string> <panel.string name="search_disabled_small_tooltip"> - This option is disabled because this parcel's area is 128 m² or smaller. -Only large parcels can be listed in search. + 這個é¸é …å·²åœç”¨ï¼Œå› 為這個地段é¢ç©å°æ–¼ 128 平方公尺。 +大é¢ç©åœ°æ®µæ‰å¯åˆ—å…¥æœå°‹çµæžœã€‚ </panel.string> <panel.string name="search_disabled_permissions_tooltip"> 這個é¸é …å·²é—œé–‰å› ç‚ºä½ ä¸èƒ½ä¿®æ”¹é€™å€‹åœ°æ®µçš„é¸é …。 @@ -292,10 +292,10 @@ Only large parcels can be listed in search. 完全æˆäººå…§å®¹ </panel.string> <panel.string name="mature_check_mature_tooltip"> - Your parcel information or content is considered moderate. + ä½ çš„åœ°æ®µè³‡è¨Šæˆ–å…§å®¹è¢«è¦–ç‚ºé©åº¦æˆäººåˆ†ç´šã€‚ </panel.string> <panel.string name="mature_check_adult_tooltip"> - Your parcel information or content is considered adult. + ä½ çš„åœ°æ®µè³‡è¨Šæˆ–å…§å®¹è¢«è¦–ç‚ºå®Œå…¨æˆäººåˆ†ç´šã€‚ </panel.string> <panel.string name="landing_point_none"> (無) @@ -309,8 +309,10 @@ Only large parcels can be listed in search. <text name="allow_label"> å…許其他居民去: </text> - <check_box label="編輯地形" name="edit land check" tool_tip="若勾é¸å‰‡ä»»ä½•人將å¯ä»¥è®Šå½¢ä½ çš„åœŸåœ°ï¼Œæœ€å¥½æ˜¯ä¿æŒæœªå‹¾é¸ï¼Œå› ç‚ºä½ éš¨æ™‚å¯ä»¥ç·¨è¼¯è®Šæ›´ä½ 的土地。"/> - <check_box label="飛行" name="check fly" tool_tip="逤勾é¸å‰‡å±…æ°‘å¯ä»¥åœ¨ä½ 飛行,ä¸ç„¶å°±åªèƒ½ç”±å¤–é¢é£›å…¥æˆ–é£›è¶Šä½ çš„åœŸåœ°ã€‚"/> + <text name="allow_label0"> + 飛行: + </text> + <check_box label="任何人" name="check fly" tool_tip="如果勾é¸ï¼Œå±…æ°‘å¯åœ¨ä½ 土地上飛行。 如果ä¸å‹¾é¸ï¼Œå±…民僅å¯é£›è¶Šä½ 土地。"/> <text name="allow_label2"> å»ºé€ ï¼š </text> @@ -326,67 +328,68 @@ Only large parcels can be listed in search. </text> <check_box label="任何人" name="check other scripts"/> <check_box label="群組" name="check group scripts"/> - <text name="land_options_label"> - 土地é¸é …: - </text> - <check_box label="安全(無傷害)" name="check safe" tool_tip="若勾é¸å‰‡è¨æ‡‰åœŸåœ°ç‚ºå®‰å…¨çš„,傷害性的戰鬥將被關閉。清除勾é¸å¾Œæ‰èƒ½é€²è¡Œå‚·å®³æ€§çš„æˆ°é¬¥ã€‚"/> - <check_box label="ç¦æ¢æŽ¨æ’ž" name="PushRestrictCheck" tool_tip="防æ¢ä½¿ç”¨è…³æœ¬æŽ¨æ’žã€‚勾é¸é€™å€‹é¸é …å°‡å¯ä»¥æœ‰æ•ˆé˜²æ¢ä½ åœŸåœ°ä¸Šçš„ç ´å£žè¡Œç‚ºã€‚"/> + <check_box label="安全(無傷害)" name="check safe" tool_tip="若勾é¸ï¼Œå°‡æŠŠåœŸåœ°è¨ç‚ºå®‰å…¨ï¼Œç¦çµ•傷害性的戰鬥。 若未勾é¸ï¼Œå‰‡å…許傷害性的戰鬥。"/> + <check_box label="ç¦æ¢æŽ¨æ’ž" name="PushRestrictCheck" tool_tip="ç¦æ¢ä½¿ç”¨è…³æœ¬æŽ¨æ’žã€‚ 勾é¸é€™é¸é …坿œ‰æ•ˆé˜²æ¢ä½ åœŸåœ°ä¸Šå‡ºç¾æ»‹äº‹è¡Œç‚ºã€‚"/> <check_box label="將地點刊登顯示在æœå°‹ä¸ï¼ˆL$30 / æ¯é€±ï¼‰" name="ShowDirectoryCheck" tool_tip="讓其他人å¯ä»¥åœ¨æœå°‹çµæžœä¸çœ‹åˆ°é€™å¡Šåœ°æ®µ"/> <combo_box name="land category with adult"> <combo_box.item label="任何類別" name="item0"/> - <combo_box.item label="Linden Location" name="item1"/> + <combo_box.item label="æž—ç™»ä½ç½®" name="item1"/> <combo_box.item label="完全æˆäºº" name="item2"/> <combo_box.item label="è—術與文化" name="item3"/> <combo_box.item label="商æ¥" name="item4"/> <combo_box.item label="教育" name="item5"/> <combo_box.item label="éŠæˆ²" name="item6"/> <combo_box.item label="èšæœƒæ‰€" name="item7"/> - <combo_box.item label="新手å‹å–„" name="item8"/> - <combo_box.item label="公園與自然" name="item9"/> + <combo_box.item label="æ¡è¿Žæ–°æ‰‹å…‰è‡¨" name="item8"/> + <combo_box.item label="公園與自然景觀" name="item9"/> <combo_box.item label="ä½å®…" name="item10"/> - <combo_box.item label="採購" name="item11"/> - <combo_box.item label="Rental" name="item13"/> - <combo_box.item label="Other" name="item12"/> + <combo_box.item label="購物" name="item11"/> + <combo_box.item label="出租" name="item13"/> + <combo_box.item label="å…¶ä»–" name="item12"/> </combo_box> <combo_box name="land category"> <combo_box.item label="任何類別" name="item0"/> - <combo_box.item label="Linden Location" name="item1"/> + <combo_box.item label="æž—ç™»ä½ç½®" name="item1"/> <combo_box.item label="è—術與文化" name="item3"/> <combo_box.item label="商æ¥" name="item4"/> <combo_box.item label="教育" name="item5"/> <combo_box.item label="éŠæˆ²" name="item6"/> <combo_box.item label="èšæœƒæ‰€" name="item7"/> - <combo_box.item label="新手å‹å–„" name="item8"/> - <combo_box.item label="公園與自然" name="item9"/> + <combo_box.item label="æ¡è¿Žæ–°æ‰‹å…‰è‡¨" name="item8"/> + <combo_box.item label="公園與自然景觀" name="item9"/> <combo_box.item label="ä½å®…" name="item10"/> - <combo_box.item label="採購" name="item11"/> - <combo_box.item label="Rental" name="item13"/> - <combo_box.item label="Other" name="item12"/> + <combo_box.item label="購物" name="item11"/> + <combo_box.item label="出租" name="item13"/> + <combo_box.item label="å…¶ä»–" name="item12"/> </combo_box> <check_box label="é©åº¦æˆäººå…§å®¹" name="MatureCheck" tool_tip=" "/> <text name="Snapshot:"> 快照: </text> - <texture_picker name="snapshot_ctrl" tool_tip="點擊以挑é¸åœ–åƒ"/> + <texture_picker name="snapshot_ctrl" tool_tip="點按以挑é¸åœ–片"/> + <text name="allow_label5"> + 其他地段的化身å¯ä»¥çœ‹è¦‹æœ¬åœ°æ®µè£¡çš„化身,並與之交談 + </text> + <check_box label="察看化身" name="SeeAvatarsCheck" tool_tip="å…è¨±å…¶ä»–åœ°æ®µçš„åŒ–èº«çœ‹åˆ°æœ¬åœ°æ®µåŒ…æ‹¬ä½ åœ¨å…§çš„åŒ–èº«ï¼Œä¸¦å¯äº’相交談。"/> <text name="landing_point"> 登陸點:[LANDING] </text> - <button label="è¨å®š" label_selected="è¨å®š" name="Set" tool_tip="Sets the landing point where visitors arrive. Sets to your avatar's location inside this parcel."/> + <button label="è¨å®š" label_selected="è¨å®š" name="Set" tool_tip="è¨å®šè¨ªå®¢ç™»é™¸åœ°é»žã€‚ è¨å®šä½ 的化身在æ¤åœ°æ®µå…§çš„ä½ç½®ã€‚"/> <button label="清除" label_selected="清除" name="Clear" tool_tip="清除登陸點"/> <text name="Teleport Routing: "> 瞬間傳é€è·¯å¾‘: </text> - <combo_box name="landing type" tool_tip="Teleport Routing -- select how to handle teleports onto your land"> - <combo_box.item label="Blocked" name="Blocked"/> - <combo_box.item label="Landing Point" name="LandingPoint"/> - <combo_box.item label="Anywhere" name="Anywhere"/> + <combo_box name="landing type" tool_tip="瞬間傳é€ç¹žè·¯ -- è¨å®šå¦‚何處ç†å‰å¾€ä½ 土地的瞬間傳é€"> + <combo_box.item label="å°éŽ–çš„" name="Blocked"/> + <combo_box.item label="登陸點" name="LandingPoint"/> + <combo_box.item label="任何地點" name="Anywhere"/> </combo_box> </panel> - <panel label="MEDIA" name="land_media_panel"> + <panel label="媒體" name="land_media_panel"> <text name="with media:"> 類型: </text> - <combo_box name="media type" tool_tip="Specify if the URL is a movie, web page, or other media"/> + <combo_box name="media type" tool_tip="指明這 URL 是影片ã€ç¶²é 還是其他媒體類型"/> <text name="at URL:"> 首é : </text> @@ -394,27 +397,27 @@ Only large parcels can be listed in search. <text name="Description:"> æè¿°ï¼š </text> - <line_editor name="url_description" tool_tip="Text displayed next to play/load button"/> + <line_editor name="url_description" tool_tip="æ’æ”¾ / 載入按鈕æ—顯示的文å—"/> <text name="Media texture:"> å–代æè³ªï¼š </text> - <texture_picker name="media texture" tool_tip="點擊以挑é¸åœ–åƒ"/> + <texture_picker name="media texture" tool_tip="點按以挑é¸åœ–片"/> <text name="replace_texture_help"> - Objects using this texture will show the movie or web page after you click the play arrow. Select the thumbnail to choose a different texture. + ä½¿ç”¨æ¤æè³ªçš„ç‰©ä»¶ï¼Œå°‡åœ¨ä½ é»žæŒ‰ã€Œæ’æ”¾ã€ç®é å¾Œæ’æ”¾å½±ç‰‡æˆ–顯示網é 。 é¸å–縮圖å³å¯é¸æ“‡ä¸åŒçš„æè³ªã€‚ </text> - <check_box label="自動縮放" name="media_auto_scale" tool_tip="Checking this option will scale the content for this parcel automatically. It may be slightly slower and lower quality visually but no other texture scaling or alignment will be required."/> - <text name="media_size" tool_tip="Size to render Web media, leave 0 for default."> + <check_box label="自動縮放" name="media_auto_scale" tool_tip="勾鏿¤é¸é …將會在æ¤åœ°æ®µè‡ªå‹•變更內容的比例。 速度å¯èƒ½ç¨æ…¢ï¼Œè¦–覺效果å¯èƒ½ç•¥éœï¼Œä½†ä¸éœ€è¦èª¿æ•´å…¶ä»–æè³ªçš„æ¯”ä¾‹æˆ–åŠ ä»¥å°é½Šã€‚"/> + <text name="media_size" tool_tip="ç¶²ä¸Šåª’é«”çš„é¡¯ç¤ºå°ºå¯¸ï¼Œè¨ 0 將採用é è¨å€¼ã€‚"> 尺寸: </text> - <spinner name="media_size_width" tool_tip="Size to render Web media, leave 0 for default."/> - <spinner name="media_size_height" tool_tip="Size to render Web media, leave 0 for default."/> + <spinner name="media_size_width" tool_tip="ç¶²ä¸Šåª’é«”çš„é¡¯ç¤ºå°ºå¯¸ï¼Œè¨ 0 將採用é è¨å€¼ã€‚"/> + <spinner name="media_size_height" tool_tip="ç¶²ä¸Šåª’é«”çš„é¡¯ç¤ºå°ºå¯¸ï¼Œè¨ 0 將採用é è¨å€¼ã€‚"/> <text name="pixels"> åƒç´ </text> <text name="Options:"> é¸é …: </text> - <check_box label="Loop" name="media_loop" tool_tip="Play media in a loop. When the media has finished playing, it will restart from the beginning."/> + <check_box label="連續" name="media_loop" tool_tip="é€£çºŒæ’æ”¾åª’體。 åª’é«”æ’æ”¾çµæŸå¾Œï¼Œæœƒå¾žé ç¹¼çºŒæ’æ”¾ã€‚"/> </panel> <panel label="è²éŸ³" name="land_audio_panel"> <text name="MusicURL:"> @@ -423,45 +426,45 @@ Only large parcels can be listed in search. <text name="Sound:"> è²éŸ³ï¼š </text> - <check_box label="Restrict gesture and object sounds to this parcel" name="check sound local"/> + <check_box label="將姿勢和物件的è²éŸ³é™åˆ¶æ–¼æ¤åœ°æ®µ" name="check sound local"/> + <text name="Avatar Sounds:"> + 化身è²éŸ³ï¼š + </text> + <check_box label="任何人" name="all av sound check"/> + <check_box label="群組" name="group av sound check"/> <text name="Voice settings:"> - Voice: + 語音: </text> - <check_box label="Enable Voice" name="parcel_enable_voice_channel"/> - <check_box label="Enable Voice (established by the Estate)" name="parcel_enable_voice_channel_is_estate_disabled"/> - <check_box label="Restrict Voice to this parcel" name="parcel_enable_voice_channel_local"/> + <check_box label="啟用語音" name="parcel_enable_voice_channel"/> + <check_box label="啟用è²éŸ³ï¼ˆç”±é ˜åœ°æ‰€ç¢ºç«‹ï¼‰" name="parcel_enable_voice_channel_is_estate_disabled"/> + <check_box label="å°‡è²éŸ³é™åˆ¶æ–¼æ¤åœ°æ®µ" name="parcel_enable_voice_channel_local"/> </panel> - <panel label="ACCESS" name="land_access_panel"> + <panel label="出入許å¯" name="land_access_panel"> <panel.string name="access_estate_defined"> - (Defined by the Estate) - </panel.string> - <panel.string name="allow_public_access"> - Allow Public Access ([MATURITY]) (Note: Unchecking this will create ban lines) + ï¼ˆç”±é ˜åœ°å®šç¾©ï¼‰ </panel.string> <panel.string name="estate_override"> - One or more of these options is set at the estate level + 至少一個é¸é …åœ¨é ˜åœ°çš„å±¤ç´šè¨å®š </panel.string> - <text name="Limit access to this parcel to:"> - 出入æ¤åœ°æ®µ - </text> + <check_box label="å…許公開出入(若未勾é¸ï¼Œå°‡è¨ç«‹ç¦è¶Šç·šï¼‰" name="public_access"/> <text name="Only Allow"> - Restrict Access to Residents verified by: + 僅å…許符åˆä»¥ä¸‹æ¢ä»¶çš„居民進入: </text> - <check_box label="Payment Information on File [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="Ban unidentified Residents."/> - <check_box label="å¹´é½¡é©—è‰ [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Ban Residents who have not verified their age. See the [SUPPORT_SITE] for more information."/> + <check_box label="å·²é 留付款資料 [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="å±…æ°‘å¿…é ˆæä¾›ä»˜æ¬¾è³‡æ–™æ‰èƒ½é€²å…¥é€™åœ°æ®µã€‚ åƒé–± [SUPPORT_SITE] ç²å–進一æ¥è³‡è¨Šã€‚"/> + <check_box label="年滿 18 æ² [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="å±…æ°‘å¿…é ˆå¹´æ»¿ 18 æ²æ‰èƒ½é€²å…¥é€™åœ°æ®µã€‚ åƒé–± [SUPPORT_SITE] ç²å–進一æ¥è³‡è¨Šã€‚"/> <check_box label="å…許出入的群組:[GROUP]" name="GroupCheck" tool_tip="è¨å®šç¾¤çµ„於一般é 籤。"/> <check_box label="出售通行權給:" name="PassCheck" tool_tip="å…許暫時出入這個地段"/> <combo_box name="pass_combo"> - <combo_box.item label="Anyone" name="Anyone"/> + <combo_box.item label="任何人" name="Anyone"/> <combo_box.item label="群組" name="Group"/> </combo_box> - <spinner label="Price in L$:" name="PriceSpin"/> - <spinner label="Hours of access:" name="HoursSpin"/> + <spinner label="åƒ¹æ ¼ï¼ˆL$):" name="PriceSpin"/> + <spinner label="出入時間:" name="HoursSpin"/> <panel name="Allowed_layout_panel"> - <text label="Always Allow" name="AllowedText"> - Allowed Residents + <text label="æ°¸é å…許" name="AllowedText"> + å…許的居民 </text> - <name_list name="AccessList" tool_tip="([LISTED] listed, [MAX] max)"/> + <name_list name="AccessList" tool_tip="(已列入 [LISTED],最多å¯åˆ— [MAX])"/> <button label="æ·»åŠ " name="add_allowed"/> <button label="移除" label_selected="移除" name="remove_allowed"/> </panel> @@ -469,7 +472,7 @@ Only large parcels can be listed in search. <text label="ç¦æ¢" name="BanCheck"> 被å°éŽ–çš„å±…æ°‘ </text> - <name_list name="BannedList" tool_tip="([LISTED] listed, [MAX] max)"/> + <name_list name="BannedList" tool_tip="(已列入 [LISTED],最多å¯åˆ— [MAX])"/> <button label="æ·»åŠ " name="add_banned"/> <button label="移除" label_selected="移除" name="remove_banned"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/floater_activeim.xml b/indra/newview/skins/default/xui/zh/floater_activeim.xml index 93017bf5b2..b148ca8eb4 100644 --- a/indra/newview/skins/default/xui/zh/floater_activeim.xml +++ b/indra/newview/skins/default/xui/zh/floater_activeim.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_activeim" title="ACTIVE IM"/> +<floater name="floater_activeim" title="進行ä¸çš„ IM"/> diff --git a/indra/newview/skins/default/xui/zh/floater_animation_anim_preview.xml b/indra/newview/skins/default/xui/zh/floater_animation_anim_preview.xml new file mode 100644 index 0000000000..76cb9079c4 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_animation_anim_preview.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Anim Preview" title="ANIMATION.ANIM"> + <text name="name_label"> + å稱: + </text> + <text name="description_label"> + æè¿°ï¼š + </text> + <button label="上傳(L$[AMOUNT])" name="ok_btn"/> + <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_animation_bvh_preview.xml b/indra/newview/skins/default/xui/zh/floater_animation_bvh_preview.xml new file mode 100644 index 0000000000..ffb0de8a68 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_animation_bvh_preview.xml @@ -0,0 +1,186 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Animation Preview"> + <floater.string name="failed_to_initialize"> + 動作åˆå§‹åŒ–失敗 + </floater.string> + <floater.string name="anim_too_long"> + 動作檔長度為 [LENGTH] 秒。 + +動作檔長度最多å¯ç‚º [MAX_LENGTH] 秒。 + </floater.string> + <floater.string name="failed_file_read"> + 無法讀å–動作檔。 + +[STATUS] + </floater.string> + <floater.string name="E_ST_OK"> + 確定 + </floater.string> + <floater.string name="E_ST_EOF"> + 檔案çµå°¾ä¸æ£å¸¸ã€‚ + </floater.string> + <floater.string name="E_ST_NO_CONSTRAINT"> + 無法讀å–ç´„æŸå®šç¾©ã€‚ + </floater.string> + <floater.string name="E_ST_NO_FILE"> + 無法開啟 BVH 檔案。 + </floater.string> + <floater.string name="E_ST_NO_HIER"> + HIERARCHY 檔é 無效。 + </floater.string> + <floater.string name="E_ST_NO_JOINT"> + 找ä¸åˆ° ROOT 或 JOINT。 + </floater.string> + <floater.string name="E_ST_NO_NAME"> + 無法å–å¾— JOINT å稱。 + </floater.string> + <floater.string name="E_ST_NO_OFFSET"> + 無法尋找ä½ç§»ã€‚ + </floater.string> + <floater.string name="E_ST_NO_CHANNELS"> + 找ä¸åˆ°é »é“。 + </floater.string> + <floater.string name="E_ST_NO_ROTATION"> + 無法å–得旋轉åºã€‚ + </floater.string> + <floater.string name="E_ST_NO_AXIS"> + 無法å–得旋轉軸。 + </floater.string> + <floater.string name="E_ST_NO_MOTION"> + 找ä¸åˆ°å‹•作。 + </floater.string> + <floater.string name="E_ST_NO_FRAMES"> + 無法å–得幀數。 + </floater.string> + <floater.string name="E_ST_NO_FRAME_TIME"> + 無法å–得幀時間。 + </floater.string> + <floater.string name="E_ST_NO_POS"> + 無法å–å¾—ä½ç½®å€¼ã€‚ + </floater.string> + <floater.string name="E_ST_NO_ROT"> + 無法å–得旋轉值。 + </floater.string> + <floater.string name="E_ST_NO_XLT_FILE"> + 無法開啟平移檔案。 + </floater.string> + <floater.string name="E_ST_NO_XLT_HEADER"> + 無法讀å–平移檔é 。 + </floater.string> + <floater.string name="E_ST_NO_XLT_NAME"> + 無法讀å–平移å稱。 + </floater.string> + <floater.string name="E_ST_NO_XLT_IGNORE"> + 無法讀å–平移忽略值。 + </floater.string> + <floater.string name="E_ST_NO_XLT_RELATIVE"> + 無法讀å–平移相å°å€¼ã€‚ + </floater.string> + <floater.string name="E_ST_NO_XLT_OUTNAME"> + 無法讀å–平移輸出å稱。 + </floater.string> + <floater.string name="E_ST_NO_XLT_MATRIX"> + 無法讀å–平移矩陣。 + </floater.string> + <floater.string name="E_ST_NO_XLT_MERGECHILD"> + 無法å–å¾— mergechild å稱。 + </floater.string> + <floater.string name="E_ST_NO_XLT_MERGEPARENT"> + 無法å–å¾— mergeparent å稱。 + </floater.string> + <floater.string name="E_ST_NO_XLT_PRIORITY"> + 無法å–得優先值。 + </floater.string> + <floater.string name="E_ST_NO_XLT_LOOP"> + 無法å–得迴圈值。 + </floater.string> + <floater.string name="E_ST_NO_XLT_EASEIN"> + 無法å–å¾— easeIn 值。 + </floater.string> + <floater.string name="E_ST_NO_XLT_EASEOUT"> + 無法å–å¾— easeOut 值。 + </floater.string> + <floater.string name="E_ST_NO_XLT_HAND"> + 無法å–å¾— hand morph 值。 + </floater.string> + <floater.string name="E_ST_NO_XLT_EMOTE"> + 無法讀å–表情符號å稱。 + </floater.string> + <floater.string name="E_ST_BAD_ROOT"> + root joint åç¨±ä¸æ£ç¢ºï¼Œä½¿ç”¨ "hip"。 + </floater.string> + <text name="name_label"> + å稱: + </text> + <text name="description_label"> + æè¿°ï¼š + </text> + <spinner label="優先度" name="priority" tool_tip="其他動作的控制å¯è¢«æ¤å‹•作強行å–代"/> + <check_box label="連續" name="loop_check" tool_tip="讓æ¤å‹•ä½œä¸æ–·é‡è¦†æ¼”ç¹¹"/> + <spinner label="å…¥(%)" name="loop_in_point" tool_tip="è¨å®šå‹•作ä¸é‡è¦†æ¼”繹的起始點"/> + <spinner label="出(%)" name="loop_out_point" tool_tip="è¨å®šå‹•作ä¸é‡è¦†æ¼”ç¹¹çš„çµæŸé»ž"/> + <text name="hand_label"> + 手部姿勢 + </text> + <combo_box name="hand_pose_combo" tool_tip="控制動作演繹時雙手的姿勢"> + <combo_box.item label="張開" name="Spread"/> + <combo_box.item label="放鬆" name="Relaxed"/> + <combo_box.item label="雙手伸出指é " name="PointBoth"/> + <combo_box.item label="拳é " name="Fist"/> + <combo_box.item label="左邊放鬆" name="RelaxedLeft"/> + <combo_box.item label="左邊伸指" name="PointLeft"/> + <combo_box.item label="å·¦é‚Šæ¡æ‹³" name="FistLeft"/> + <combo_box.item label="å³é‚Šæ”¾é¬†" name="RelaxedRight"/> + <combo_box.item label="å³é‚Šä¼¸æŒ‡" name="PointRight"/> + <combo_box.item label="å³é‚Šæ¡æ‹³" name="FistRight"/> + <combo_box.item label="峿‰‹æ•¬ç¦®" name="SaluteRight"/> + <combo_box.item label="打å—" name="Typing"/> + <combo_box.item label="峿‰‹æ¯”出和平手勢" name="PeaceRight"/> + </combo_box> + <text name="emote_label"> + 表情 + </text> + <combo_box name="emote_combo" tool_tip="控制動作演繹時臉部的姿態"> + <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="嫌惡貌" name="Plllppt" value="嫌惡貌"/> + <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 name="preview_base_anim" tool_tip="ç”¨é€™å€‹ä¾†æ¸¬è©¦ä½ çš„åŒ–èº«å¾žä¸€èˆ¬å‹•ä½œè½‰å…¥å‹•ä½œæ¼”ç¹¹æ™‚çš„æƒ…æ³ã€‚"> + <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="動作攙混淡出的時間長度(秒)"/> + <button name="play_btn" tool_tip="æ’æ”¾ä½ 的動作"/> + <button name="pause_btn" tool_tip="æš«åœä½ 的動åš"/> + <button name="stop_btn" tool_tip="åœæ¢æ’放動作"/> + <text name="bad_animation_text"> + 無法讀å–動作檔。 + +æˆ‘å€‘å»ºè°æŽ¡ç”¨ç”± Poser 4 匯出的 BVH æª”æ¡ˆæ ¼å¼ã€‚ + </text> + <button label="上傳(L$[AMOUNT])" name="ok_btn"/> + <button label="å–æ¶ˆ" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_animation_preview.xml b/indra/newview/skins/default/xui/zh/floater_animation_preview.xml deleted file mode 100644 index c5e2eac446..0000000000 --- a/indra/newview/skins/default/xui/zh/floater_animation_preview.xml +++ /dev/null @@ -1,186 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Animation Preview"> - <floater.string name="failed_to_initialize"> - Failed to initialize motion - </floater.string> - <floater.string name="anim_too_long"> - Animation file is [LENGTH] seconds in length. - -Maximum animation length is [MAX_LENGTH] seconds. - </floater.string> - <floater.string name="failed_file_read"> - 無法讀å–動作檔。 - -[STATUS] - </floater.string> - <floater.string name="E_ST_OK"> - 確定 - </floater.string> - <floater.string name="E_ST_EOF"> - Premature end of file. - </floater.string> - <floater.string name="E_ST_NO_CONSTRAINT"> - Cannot read constraint definition. - </floater.string> - <floater.string name="E_ST_NO_FILE"> - 無法開啟 BVH 檔案。 - </floater.string> - <floater.string name="E_ST_NO_HIER"> - Invalid HIERARCHY header. - </floater.string> - <floater.string name="E_ST_NO_JOINT"> - Cannot find ROOT or JOINT. - </floater.string> - <floater.string name="E_ST_NO_NAME"> - Cannot get JOINT name. - </floater.string> - <floater.string name="E_ST_NO_OFFSET"> - 無法尋找ä½ç§»ã€‚ - </floater.string> - <floater.string name="E_ST_NO_CHANNELS"> - Cannot find CHANNELS. - </floater.string> - <floater.string name="E_ST_NO_ROTATION"> - Cannot get rotation order. - </floater.string> - <floater.string name="E_ST_NO_AXIS"> - Cannot get rotation axis. - </floater.string> - <floater.string name="E_ST_NO_MOTION"> - Cannot find MOTION. - </floater.string> - <floater.string name="E_ST_NO_FRAMES"> - Cannot get number of frames. - </floater.string> - <floater.string name="E_ST_NO_FRAME_TIME"> - Cannot get frame time. - </floater.string> - <floater.string name="E_ST_NO_POS"> - Cannot get position values. - </floater.string> - <floater.string name="E_ST_NO_ROT"> - Cannot get rotation values. - </floater.string> - <floater.string name="E_ST_NO_XLT_FILE"> - Cannot open translation file. - </floater.string> - <floater.string name="E_ST_NO_XLT_HEADER"> - Cannot read translation header. - </floater.string> - <floater.string name="E_ST_NO_XLT_NAME"> - Cannot read translation names. - </floater.string> - <floater.string name="E_ST_NO_XLT_IGNORE"> - Cannot read translation ignore value. - </floater.string> - <floater.string name="E_ST_NO_XLT_RELATIVE"> - Cannot read translation relative value. - </floater.string> - <floater.string name="E_ST_NO_XLT_OUTNAME"> - Cannot read translation outname value. - </floater.string> - <floater.string name="E_ST_NO_XLT_MATRIX"> - Cannot read translation matrix. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGECHILD"> - Cannot get mergechild name. - </floater.string> - <floater.string name="E_ST_NO_XLT_MERGEPARENT"> - Cannot get mergeparent name. - </floater.string> - <floater.string name="E_ST_NO_XLT_PRIORITY"> - Cannot get priority value. - </floater.string> - <floater.string name="E_ST_NO_XLT_LOOP"> - Cannot get loop value. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEIN"> - Cannot get easeIn values. - </floater.string> - <floater.string name="E_ST_NO_XLT_EASEOUT"> - Cannot get easeOut values. - </floater.string> - <floater.string name="E_ST_NO_XLT_HAND"> - Cannot get hand morph value. - </floater.string> - <floater.string name="E_ST_NO_XLT_EMOTE"> - Cannot read emote name. - </floater.string> - <floater.string name="E_ST_BAD_ROOT"> - Incorrect root joint name, use "hip". - </floater.string> - <text name="name_label"> - å稱: - </text> - <text name="description_label"> - æè¿°ï¼š - </text> - <spinner label="優先度" name="priority" tool_tip="Controls which other animations can be overridden by this animation"/> - <check_box label="Loop" name="loop_check" tool_tip="Makes this animation loop"/> - <spinner label="In(%)" name="loop_in_point" tool_tip="Sets point in animation that looping returns to"/> - <spinner label="Out(%)" name="loop_out_point" tool_tip="Sets point in animation that ends a loop"/> - <text name="hand_label"> - Hand Pose - </text> - <combo_box name="hand_pose_combo" tool_tip="Controls what hands do during animation"> - <combo_box.item label="Spread" name="Spread"/> - <combo_box.item label="Relaxed" name="Relaxed"/> - <combo_box.item label="Point Both" name="PointBoth"/> - <combo_box.item label="Fist" name="Fist"/> - <combo_box.item label="Relaxed Left" name="RelaxedLeft"/> - <combo_box.item label="Point Left" name="PointLeft"/> - <combo_box.item label="Fist Left" name="FistLeft"/> - <combo_box.item label="Relaxed Right" name="RelaxedRight"/> - <combo_box.item label="Point Right" name="PointRight"/> - <combo_box.item label="Fist Right" name="FistRight"/> - <combo_box.item label="Salute Right" name="SaluteRight"/> - <combo_box.item label="Typing" name="Typing"/> - <combo_box.item label="Peace Right" name="PeaceRight"/> - </combo_box> - <text name="emote_label"> - Expression - </text> - <combo_box name="emote_combo" tool_tip="Controls what face does during animation"> - <item label="(無)" name="[None]" value=""/> - <item label="Aaaaah" name="Aaaaah" value="Aaaaah"/> - <item label="Afraid" name="Afraid" value="Afraid"/> - <item label="Angry" name="Angry" value="Angry"/> - <item label="Big Smile" name="BigSmile" value="Big Smile"/> - <item label="Bored" name="Bored" value="Bored"/> - <item label="Cry" name="Cry" value="Cry"/> - <item label="Disdain" name="Disdain" value="Disdain"/> - <item label="Embarrassed" name="Embarrassed" value="Embarrassed"/> - <item label="Frown" name="Frown" value="Frown"/> - <item label="Kiss" name="Kiss" value="Kiss"/> - <item label="Laugh" name="Laugh" value="Laugh"/> - <item label="Plllppt" name="Plllppt" value="Plllppt"/> - <item label="Repulsed" name="Repulsed" value="Repulsed"/> - <item label="Sad" name="Sad" value="Sad"/> - <item label="Shrug" name="Shrug" value="Shrug"/> - <item label="Smile" name="Smile" value="Smile"/> - <item label="Surprise" name="Surprise" value="Surprise"/> - <item label="Wink" name="Wink" value="Wink"/> - <item label="Worry" name="Worry" value="Worry"/> - </combo_box> - <text name="preview_label"> - Preview while - </text> - <combo_box name="preview_base_anim" tool_tip="Use this to test your animation behavior while your avatar performs common actions."> - <item label="Standing" name="Standing" value="Standing"/> - <item label="Walking" name="Walking" value="Walking"/> - <item label="Sitting" name="Sitting" value="Sitting"/> - <item label="飛行" name="Flying" value="飛行"/> - </combo_box> - <spinner label="淡入(秒)" name="ease_in_time" tool_tip="Amount of time (in seconds) over which animations blends in"/> - <spinner label="淡出(秒)" name="ease_out_time" tool_tip="Amount of time (in seconds) over which animations blends out"/> - <button name="play_btn" tool_tip="æ’æ”¾ä½ 的動作"/> - <button name="pause_btn" tool_tip="æš«åœä½ 的動åš"/> - <button name="stop_btn" tool_tip="Stop animation playback"/> - <text name="bad_animation_text"> - Unable to read animation file. - -We recommend BVH files exported from Poser 4. - </text> - <button label="上傳(L$[AMOUNT])" name="ok_btn"/> - <button label="å–æ¶ˆ" name="cancel_btn"/> -</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_auction.xml b/indra/newview/skins/default/xui/zh/floater_auction.xml index b1862bc582..1b589a92cc 100644 --- a/indra/newview/skins/default/xui/zh/floater_auction.xml +++ b/indra/newview/skins/default/xui/zh/floater_auction.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_auction" title="START LINDEN LAND SALE"> +<floater name="floater_auction" title="é–‹å§‹ Linden 土地出售"> <floater.string name="already for sale"> - You cannot auction parcels which are already for sale. + 出售ä¸çš„地段無法進行æ‹è³£ã€‚ </floater.string> - <check_box initial_value="true" label="Include yellow selection fence" name="fence_check"/> - <button label="Snapshot" label_selected="Snapshot" name="snapshot_btn"/> - <button label="Sell to Anyone" label_selected="Sell to Anyone" name="sell_to_anyone_btn"/> + <check_box initial_value="true" label="包括黃色åœç·š" name="fence_check"/> + <button label="å¿«ç…§" label_selected="å¿«ç…§" name="snapshot_btn"/> + <button label="出售給任何人" label_selected="出售給任何人" name="sell_to_anyone_btn"/> <button label="清除è¨å®š" label_selected="清除è¨å®š" name="reset_parcel_btn"/> - <button label="Start Auction" label_selected="Start Auction" name="start_auction_btn"/> + <button label="é–‹å§‹æ‹è³£" label_selected="é–‹å§‹æ‹è³£" name="start_auction_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_autoreplace.xml b/indra/newview/skins/default/xui/zh/floater_autoreplace.xml new file mode 100644 index 0000000000..4ee07e6295 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_autoreplace.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="autoreplace_floater" title="自動å–代è¨å®š"> + <check_box label="啟用自動å–代" name="autoreplace_enable" tool_tip="在輸入èŠå¤©å…§å®¹çš„åŒæ™‚,將輸入的關éµå—代æ›ç‚ºç›¸æ‡‰çš„å–代文å—。"/> + <button label="匯入清單…" name="autoreplace_import_list" tool_tip="從檔案載入先å‰åŒ¯å‡ºéŽçš„æ¸…單。"/> + <button label="匯出清單…" name="autoreplace_export_list" tool_tip="å°‡æ‰€é¸æ¸…單儲å˜åˆ°æª”案以便和他人分享。"/> + <button label="新的清單…" name="autoreplace_new_list" tool_tip="新建一個清單。"/> + <button label="刪除清單" name="autoreplace_delete_list" tool_tip="åˆªé™¤æ‰€é¸æ¸…單。"/> + <button name="autoreplace_list_up" tool_tip="æé«˜æ¤æ¸…單的優先次åºã€‚"/> + <button name="autoreplace_list_down" tool_tip="é™ä½Žæ¤æ¸…單的優先次åºã€‚"/> + <scroll_list name="autoreplace_list_replacements"> + <scroll_list.columns label="é—œéµå—" name="keyword"/> + <scroll_list.columns label="å–代文å—" name="replacement"/> + </scroll_list> + <button label="æ·»åŠ ..." name="autoreplace_add_entry"/> + <button label="移除" name="autoreplace_delete_entry"/> + <button label="儲å˜é …ç›®" name="autoreplace_save_entry" tool_tip="å„²å˜æ¤é …目。"/> + <button label="儲å˜è®Šæ›´" name="autoreplace_save_changes" tool_tip="å„²å˜æ‰€æœ‰è®Šæ›´ã€‚"/> + <button label="å–æ¶ˆ" name="autoreplace_cancel" tool_tip="放棄所有變更。"/> +</floater> +<!-- + <text + top_pad="10" + left="10" + height="16" + width="260" + follows="left|top" + halign="center" + mouse_opaque="true" + name="autoreplace_text2"> + Entries + </text> +--> diff --git a/indra/newview/skins/default/xui/zh/floater_avatar.xml b/indra/newview/skins/default/xui/zh/floater_avatar.xml new file mode 100644 index 0000000000..55b1a95a41 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_avatar.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Avatar" title="鏿“‡ä¸€å€‹åŒ–身"/> diff --git a/indra/newview/skins/default/xui/zh/floater_avatar_picker.xml b/indra/newview/skins/default/xui/zh/floater_avatar_picker.xml index 7e2d74c728..c19369c859 100644 --- a/indra/newview/skins/default/xui/zh/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/zh/floater_avatar_picker.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="avatarpicker" title="挑é¸å±…æ°‘"> <floater.string name="not_found"> - '[TEXT]' not found + 查無「[TEXT]〠</floater.string> <floater.string name="no_one_near"> - No one near + 附近無人 </floater.string> <floater.string name="no_results"> - No results + æ²’æœ‰çµæžœ </floater.string> <floater.string name="searching"> æœå°‹ä¸... @@ -21,9 +21,9 @@ <tab_container name="ResidentChooserTabs"> <panel label="æœå°‹" name="SearchPanel"> <text name="InstructSearchResidentName"> - Type part of a person's name: + éµå…¥äººå的一部分: </text> - <button label="Go" label_selected="Go" name="Find"/> + <button label="å‰å¾€" label_selected="å‰å¾€" name="Find"/> <scroll_list name="SearchResults"> <columns label="å稱" name="name"/> <columns label="使用者å稱" name="username"/> diff --git a/indra/newview/skins/default/xui/zh/floater_avatar_textures.xml b/indra/newview/skins/default/xui/zh/floater_avatar_textures.xml index 36dae7c798..69309c96de 100644 --- a/indra/newview/skins/default/xui/zh/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/zh/floater_avatar_textures.xml @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="avatar_texture_debug" title="化身æè³ª"> <floater.string name="InvalidAvatar"> - INVALID AVATAR + 無效的化身 </floater.string> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> <text name="label"> - Baked -Textures + 確定產出的 +æè³ª </text> <text name="composite_label"> - Composite -Textures + åˆæˆ +æè³ª </text> - <button label="Dump IDs to Console" label_selected="Dump" name="Dump"/> + <button label="å‚¾å° ID 到控制臺" label_selected="傾å°" name="Dump"/> <panel name="scroll_content_panel"> <texture_picker label="é é«®" name="hair-baked"/> <texture_picker label="é é«®" name="hair_grain"/> @@ -25,7 +25,7 @@ Textures <texture_picker label="眼ç›" name="eyes-baked"/> <texture_picker label="眼ç›" name="eyes_iris"/> <texture_picker label="眼ç›åŠé€æ˜Ž" name="eyes_alpha"/> - <texture_picker label="上åŠèº«åŠé€æ˜Ž" name="upper-baked"/> + <texture_picker label="上åŠèº«" name="upper-baked"/> <texture_picker label="上åŠèº«èº«é«”部ä½" name="upper_bodypaint"/> <texture_picker label="å…§è¡£" name="upper_undershirt"/> <texture_picker label="手套" name="upper_gloves"/> diff --git a/indra/newview/skins/default/xui/zh/floater_beacons.xml b/indra/newview/skins/default/xui/zh/floater_beacons.xml index 1613b23e75..83e10804d6 100644 --- a/indra/newview/skins/default/xui/zh/floater_beacons.xml +++ b/indra/newview/skins/default/xui/zh/floater_beacons.xml @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="beacons" title="BEACONS"> +<floater name="beacons" title="指標"> <panel name="beacons_panel"> <text name="label_show"> - Show : + 顯示: </text> - <check_box label="Beacons" name="beacons"/> - <check_box label="Highlights" name="highlights"/> - <text name="beacon_width_label" tool_tip="Beacon width"> - Width: + <check_box label="指標" name="beacons"/> + <check_box label="高亮顯示" name="highlights"/> + <text name="beacon_width_label" tool_tip="指標寬度"> + 寬: </text> <text name="label_objects"> - For these objects: + å°è±¡ç‰©ä»¶ï¼š </text> - <check_box label="Physical" name="physical"/> - <check_box label="Scripted" name="scripted"/> - <check_box label="Touch only" name="touch_only"/> - <check_box label="Sound sources" name="sounds"/> - <check_box label="Particle sources" name="particles"/> - <check_box label="Media sources" name="moapbeacon"/> + <check_box label="ç‰©ç†æ€§" name="physical"/> + <check_box label="有腳本" name="scripted"/> + <check_box label="僅å¯è§¸ç¢°" name="touch_only"/> + <check_box label="è²éŸ³ä¾†æº" name="sounds"/> + <check_box label="例å來æº" name="particles"/> + <check_box label="媒體來æº" name="moapbeacon"/> </panel> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_build_options.xml b/indra/newview/skins/default/xui/zh/floater_build_options.xml index b9d3b6b849..29f36b461c 100644 --- a/indra/newview/skins/default/xui/zh/floater_build_options.xml +++ b/indra/newview/skins/default/xui/zh/floater_build_options.xml @@ -1,9 +1,32 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="build options floater" title="æ ¼ç·šé¸é …"> - <spinner label="æ ¼ç·šå–®ä½ï¼ˆå…¬å°ºï¼‰" name="GridResolution"/> - <spinner label="Grid Extents (meters)" name="GridDrawSize"/> + <floater.string name="grid_screen_text"> + 螢幕 + </floater.string> + <floater.string name="grid_local_text"> + 本地 + </floater.string> + <floater.string name="grid_world_text"> + 世界 + </floater.string> + <floater.string name="grid_reference_text"> + åƒè€ƒ + </floater.string> + <floater.string name="grid_attachment_text"> + 附件 + </floater.string> + <text name="grid_mode_label" tool_tip="æ ¼ç·šä¸é€æ˜Žåº¦"> + æ¨¡å¼ + </text> + <combo_box name="combobox grid mode" tool_tip="鏿“‡ç‰©ä»¶å®šä½åƒè€ƒçš„æ ¼ç·šå°ºåº¦é¡žåž‹"> + <combo_box.item label="ä¸–ç•Œæ ¼ç·š" name="World"/> + <combo_box.item label="åœ°æ–¹æ ¼ç·š" name="Local"/> + <combo_box.item label="åƒè€ƒæ ¼ç·š" name="Reference"/> + </combo_box> + <spinner label="å–®ä½ï¼ˆå…¬å°ºï¼‰" name="GridResolution"/> + <spinner label="範åœï¼ˆå…¬å°ºï¼‰" name="GridDrawSize"/> <check_box label="貼齊至åå–®ä½" name="GridSubUnit"/> - <check_box label="View cross-sections" name="GridCrossSection"/> + <check_box label="檢視橫剖é¢" name="GridCrossSection"/> <text name="grid_opacity_label" tool_tip="æ ¼ç·šä¸é€æ˜Žåº¦"> ä¸é€æ˜Žåº¦ï¼š </text> diff --git a/indra/newview/skins/default/xui/zh/floater_bulk_perms.xml b/indra/newview/skins/default/xui/zh/floater_bulk_perms.xml index 660710fb7b..59751a3a46 100644 --- a/indra/newview/skins/default/xui/zh/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/zh/floater_bulk_perms.xml @@ -33,13 +33,13 @@ <text name="AnyoneLabel"> 任何人: </text> - <check_box label="覆製" name="everyone_copy"/> + <check_box label="æšåº¨" name="everyone_copy"/> <text name="NextOwnerLabel"> - ä¸‹ä¸€å€‹æ“æœ‰è€…: + 下一個所有人: </text> <check_box label="修改" name="next_owner_modify"/> - <check_box label="覆製" name="next_owner_copy"/> - <check_box initial_value="true" label="轉移" name="next_owner_transfer" tool_tip="ä¸‹ä¸€å€‹æ“æœ‰è€…能é€å‡ºæˆ–轉售這個物件"/> + <check_box label="æšåº¨" name="next_owner_copy"/> + <check_box initial_value="true" label="轉移" name="next_owner_transfer" tool_tip="下一個所有人å¯è´ˆé€æˆ–轉售這個物件"/> <button label="確定" name="apply"/> <button label="å–æ¶ˆ" name="close"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_buy_contents.xml b/indra/newview/skins/default/xui/zh/floater_buy_contents.xml index 44d3394a52..5e4153de66 100644 --- a/indra/newview/skins/default/xui/zh/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/zh/floater_buy_contents.xml @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_buy_contents" title="BUY CONTENTS"> +<floater name="floater_buy_contents" title="購買內容"> <floater.string name="no_copy_text"> - (no copy) + ï¼ˆç¦æ¢è¤‡è£½ï¼‰ </floater.string> <floater.string name="no_modify_text"> - (no modify) + ï¼ˆç¦æ¢ä¿®æ”¹ï¼‰ </floater.string> <floater.string name="no_transfer_text"> - (no transfer) + ï¼ˆç¦æ¢è½‰è®“) </floater.string> <text name="contains_text"> - [NAME] contains: + <nolink>[NAME]</nolink> å…§å«ï¼š </text> <text name="buy_text"> - Buy for L$[AMOUNT] from [NAME]? + 是å¦èб L$[AMOUNT] å‘ [NAME] 購買? </text> <check_box label="ç«‹å³ç©¿ä¸Šæœè£" name="wear_check"/> <button label="購買" label_selected="購買" name="buy_btn"/> diff --git a/indra/newview/skins/default/xui/zh/floater_buy_currency.xml b/indra/newview/skins/default/xui/zh/floater_buy_currency.xml index 9f6591faf9..fcf2800728 100644 --- a/indra/newview/skins/default/xui/zh/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/zh/floater_buy_currency.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="buy currency" title="購買 L$"> <floater.string name="buy_currency"> - Buy L$ [LINDENS] for approx. [LOCALAMOUNT] + 購買 L$ [LINDENS],所需花費約為 [LOCALAMOUNT] </floater.string> <text name="info_need_more"> - ä½ éœ€è¦æ›´å¤š L$ + ä½ çš„ L$ ä¸è¶³ </text> <text name="contacting"> è¯æŽ¥åˆ° LindeX ä¸... @@ -31,10 +31,10 @@ 以æ¤åƒ¹æ ¼ </text> <text name="currency_est"> - approx. [LOCALAMOUNT] + ç´„åˆ [LOCALAMOUNT] </text> <text name="getting_data"> - Estimating... + ä¼°ç®—ä¸â€¦ </text> <text name="buy_action"> [ACTION] @@ -46,16 +46,16 @@ L$ [AMT] </text> <text name="currency_links"> - [http://www.secondlife.com/my/account/payment_method_management.php payment method] | [http://www.secondlife.com/my/account/currency.php currency] + [http://www.secondlife.com/my/account/payment_method_management.php 付費方å¼] | [http://www.secondlife.com/my/account/currency.php 幣種] </text> <text name="exchange_rate_note"> - Re-enter amount to see the latest exchange rate. + 釿–°è¼¸å…¥é‡‘é¡å³å¯å¯Ÿçœ‹æœ€æ–°çš„匯率。 </text> <text name="purchase_warning_repurchase"> - Confirming this purchase only buys L$, not the object. + 確èªé€™æ¬¡è³¼è²·åªæ˜¯æ·»è³¼ L$,並éžè³¼è²·ç‰©ä»¶ã€‚ </text> <text name="purchase_warning_notenough"> - ä½ ä¸¦æœªè³¼è²·è¶³å¤ çš„æž—ç™»å¹£ï¼Œè«‹å…ˆæ·»åŠ ä¸€äº›æ•¸é‡ã€‚ + ä½ è³¼è²·çš„æž—ç™»å¹£ä¸è¶³ï¼Œ è«‹å¢žåŠ æ•¸é¡ã€‚ </text> <button label="ç«‹å³è³¼è²·" name="buy_btn"/> <button label="å–æ¶ˆ" name="cancel_btn"/> diff --git a/indra/newview/skins/default/xui/zh/floater_buy_land.xml b/indra/newview/skins/default/xui/zh/floater_buy_land.xml index 336d14747d..51bbd6a561 100644 --- a/indra/newview/skins/default/xui/zh/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/zh/floater_buy_land.xml @@ -1,29 +1,29 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="buy land" title="購買土地"> <floater.string name="can_resell"> - May be resold. + 得以å†å‡ºå”®ã€‚ </floater.string> <floater.string name="can_not_resell"> - May not be resold. + ä¸å¾—å†å‡ºå”®ã€‚ </floater.string> <floater.string name="can_change"> - May be joined or subdivided. + 得以åˆä½µæˆ–分割。 </floater.string> <floater.string name="can_not_change"> - May not be joined or subdivided. + ä¸å¾—åˆä½µæˆ–分割。 </floater.string> <floater.string name="cant_buy_for_group"> - You do not have permission to buy land for your active group. + ä½ æ²’æœ‰æ¬Šé™ç‚ºä½ ç•¶å‰çš„群組購買土地。 </floater.string> <floater.string name="no_land_selected"> ç„¡åœŸåœ°è¢«é¸æ“‡ã€‚ </floater.string> <floater.string name="multiple_parcels_selected"> - Multiple different parcels selected. -Try selecting a smaller area. + é¸å–了多個ä¸åŒåœ°æ®µã€‚ +請嘗試é¸å–較å°å€åŸŸã€‚ </floater.string> <floater.string name="no_permission"> - You do not have permission to buy land for your active group. + ä½ æ²’æœ‰æ¬Šé™ç‚ºä½ ç•¶å‰çš„群組購買土地。 </floater.string> <floater.string name="parcel_not_for_sale"> æ‰€é¸æ“‡çš„地段ä¸å‡ºå”®ã€‚. @@ -35,37 +35,37 @@ Try selecting a smaller area. ä½ å·²ç¶“æ“æœ‰é€™å€‹åœ°æ®µã€‚ </floater.string> <floater.string name="set_to_sell_to_other"> - The selected parcel is set to sell to another party. + 所é¸åœ°æ®µå·²è¨ç‚ºå¾…售給他人。 </floater.string> <floater.string name="no_public_land"> - The selected area has no public land. + 所é¸å€åŸŸå…§ç„¡å…¬å…±åœŸåœ°ã€‚ </floater.string> <floater.string name="not_owned_by_you"> - Land owned by another Resident is selected. -Try selecting a smaller area. + é¸å–了å¦ä¸€ä½å±…æ°‘æ‰€æ“æœ‰åœŸåœ°ã€‚ +請嘗試é¸å–較å°å€åŸŸã€‚ </floater.string> <floater.string name="processing"> - Processing your purchase... + æ£åœ¨è™•ç†ä½ 的購買… -(éŽç¨‹é€™å°‡æœƒèŠ±è²»ä¸€åˆ°å…©åˆ†é˜ï¼‰ +(這éŽç¨‹å°‡æœƒèŠ±è²»ä¸€åˆ°å…©åˆ†é˜ã€‚) </floater.string> <floater.string name="fetching_error"> - There has been an error while fetching land buying information. + æ“·å–è³¼åœ°è¨Šæ¯æ™‚發生錯誤。 </floater.string> <floater.string name="buying_will"> - Buying this land will: + 購買這塊土地後: </floater.string> <floater.string name="buying_for_group"> - Buying land for group will: + 為群組購買土地後: </floater.string> <floater.string name="cannot_buy_now"> - Cannot buy now: + ç¾åœ¨ç„¡æ³•購買: </floater.string> <floater.string name="not_for_sale"> ä¸å‡ºå”®ï¼š </floater.string> <floater.string name="none_needed"> - none needed + ä¸éœ€è¦ </floater.string> <floater.string name="must_upgrade"> ä½ çš„å¸³æˆ¶å¿…é ˆè¦å‡ç´šæ‰èƒ½æ“有土地。 @@ -77,52 +77,52 @@ Try selecting a smaller area. ä½ æŒæœ‰ [BUYER] m² 土地。 </floater.string> <floater.string name="pay_to_for_land"> - Pay L$ [AMOUNT] to [SELLER] for this land + 支付 L$ [AMOUNT] 給 [SELLER] 購買這土地 </floater.string> <floater.string name="buy_for_US"> - Buy L$ [AMOUNT] for approx. [LOCAL_AMOUNT], + 購買 L$ [AMOUNT],所需花費約為 [LOCAL_AMOUNT], </floater.string> <floater.string name="parcel_meters"> - 這個地段為 [AMOUNT] m² + 這個地段有 [AMOUNT] 平方公尺 </floater.string> <floater.string name="premium_land"> - This land is premium, and will charge as [AMOUNT] m². + 這土地屬於高價地段,將計為 [AMOUNT] 平方公尺。 </floater.string> <floater.string name="discounted_land"> - This land is discounted, and will charge as [AMOUNT] m². + 這土地有折扣,將計為 [AMOUNT] 平方公尺。 </floater.string> <floater.string name="meters_supports_object"> - [AMOUNT] m² -supports [AMOUNT2] objects + [AMOUNT] 平方公尺 +æ”¯æ´ [AMOUNT2] é …ç‰©ä»¶ </floater.string> <floater.string name="sold_with_objects"> - sold with objects + å«ç‰©ä»¶å‡ºå”® </floater.string> <floater.string name="sold_without_objects"> - objects not included + ä¸å«ç‰©ä»¶ </floater.string> <floater.string name="info_price_string"> - L$ [PRICE] -(L$ [PRICE_PER_SQM]/m²) + L$[PRICE] +(L$ [PRICE_PER_SQM]/平方公尺) [SOLD_WITH_OBJECTS] </floater.string> <floater.string name="insufficient_land_credits"> - The group [GROUP] will need sufficient contributed land use credits to cover this parcel before the purchase will complete. + 群組 [GROUP] éœ€å…ˆæœ‰è¶³å¤ çš„æåœ°ä½¿ç”¨é¡åº¦ä¾†æ”¯æ‡‰é€™å€‹åœ°æ®µï¼Œæ‰å¯å®Œæˆè³¼è²·ã€‚ </floater.string> <floater.string name="have_enough_lindens"> - You have L$ [AMOUNT], which is enough to buy this land. + ä½ æœ‰ L$ [AMOUNT],足以購買這土地。 </floater.string> <floater.string name="not_enough_lindens"> - You have only L$ [AMOUNT], and need L$ [AMOUNT2] more. + ä½ åªæœ‰ L$ [AMOUNT],尚缺 L$ [AMOUNT2]。 </floater.string> <floater.string name="balance_left"> - After the purchase, you will have L$ [AMOUNT] left. + è³¼è²·å¾Œï¼Œä½ å°‡å‰©é¤˜ L$ [AMOUNT]。 </floater.string> <floater.string name="balance_needed"> - You need to buy at least L$ [AMOUNT] to afford this land. + ä½ è‡³å°‘å¿…é ˆè³¼è²· L$ [AMOUNT] æ‰èƒ½æ·»è³¼é€™åœŸåœ°ã€‚ </floater.string> <floater.string name="no_parcel_selected"> - ï¼ˆç„¡åœ°æ®µè¢«é¸æ“‡ï¼‰ + ï¼ˆæœªé¸æ“‡åœ°æ®µï¼‰ </floater.string> <text name="region_name_label"> 地å€ï¼š @@ -143,27 +143,27 @@ supports [AMOUNT2] objects (未知) </text> <text name="estate_owner_label"> - é ˜åœ°æ“æœ‰è€…: + é ˜åœ°æ‰€æœ‰äººï¼š </text> <text name="estate_owner_text"> (未知) </text> <text name="resellable_changeable_label"> - Purchased land in this region: + 在本地å€å·²è³¼åœŸåœ°ï¼š </text> <text name="resellable_clause"> - May or may not be resold. + 是å¦å¯å†å”®å‡ºã€‚ </text> <text name="changeable_clause"> - May or may not be joined or subdivided. + 是å¦å¯åˆä½µæˆ–分割。 </text> <text name="covenant_text"> - You must agree to the Estate Covenant: + ä½ å¿…é ˆåŒæ„é ˜åœ°å¥‘ç´„ï¼š </text> <text_editor name="covenant_editor"> 載入ä¸... </text_editor> - <check_box label="I Agree to the Covenant Defined Above." name="agree_covenant"/> + <check_box label="æˆ‘åŒæ„以上所訂契約。" name="agree_covenant"/> <text name="info_parcel_label"> 地段: </text> @@ -174,60 +174,60 @@ supports [AMOUNT2] objects 尺寸: </text> <text name="info_size"> - 1024 m² + 1024 平方公尺 </text> <text name="info_price_label"> åƒ¹æ ¼ï¼š </text> <text name="info_price"> L$ 1500 -(L$ 1.1/m²) -sold with objects +(L$ 1.1/平方公尺) +å«ç‰©ä»¶å‡ºå”® </text> <text name="info_action"> - Buying this land will: + 購買這塊土地後: </text> <text name="error_message"> - Something ain't right. + ææ€•出å•題了。 </text> <button label="å‰å¾€ç¶²ç«™" name="error_web"/> <text name="account_action"> - Upgrade you to premium membership. + å°‡ä½ å‡ç´šç‚ºä»˜è²»ç”¨æˆ¶ </text> <text name="account_reason"> - Only premimum members may own land. + åªæœ‰ä»˜è²»ç”¨æˆ¶æ‰èƒ½æ“有土地。 </text> <combo_box name="account_level"> - <combo_box.item label="US$9.95/month, billed monthly" name="US$9.95/month,billedmonthly"/> - <combo_box.item label="US$7.50/month, billed quarterly" name="US$7.50/month,billedquarterly"/> - <combo_box.item label="US$6.00/month, billed annually" name="US$6.00/month,billedannually"/> + <combo_box.item label="æ¯æœˆ US$9.95,按月支付" name="US$9.95/month,billedmonthly"/> + <combo_box.item label="æ¯æœˆ US$7.50ï¼ŒæŒ‰å£æ”¯ä»˜" name="US$7.50/month,billedquarterly"/> + <combo_box.item label="æ¯æœˆ US$6.00,一年支付一次" name="US$6.00/month,billedannually"/> </combo_box> <text name="land_use_action"> - Increase your monthly land use fees to US$ 40/month. + å°‡ä½ çš„æ¯æœˆåœŸåœ°ä½¿ç”¨è²»å¢žåŠ ç‚ºæ¯æœˆ US$ 40。 </text> <text name="land_use_reason"> - You hold 1309 m² of land. -This parcel is 512 m² of land. + ä½ æŒæœ‰ 1309 平方公尺土地。 +這地段有 512 平方公尺的土地。 </text> <text name="purchase_action"> - Pay Joe Resident L$ 4000 for the land + 支付給居民 Joe L$ 4000 購買土地 </text> <text name="currency_reason"> - You have L$ 2,100. + ä½ æœ‰ L$ 2,100。 </text> <text name="currency_action"> - Buy additional L$ + 購買更多 L$ </text> <line_editor name="currency_amt"> 1000 </line_editor> <text name="currency_est"> - for approx. [LOCAL_AMOUNT] + 花費大約 [LOCAL_AMOUNT] </text> <text name="currency_balance"> - You have L$ 2,100. + ä½ æœ‰ L$ 2,100。 </text> - <check_box label="Remove [AMOUNT] m² of contribution from group." name="remove_contribution"/> - <button label="Purchase" name="buy_btn"/> + <check_box label="從群組移除 [AMOUNT] 平方公尺的æå‡ºåœ°ã€‚" name="remove_contribution"/> + <button label="購買" name="buy_btn"/> <button label="å–æ¶ˆ" name="cancel_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_buy_object.xml b/indra/newview/skins/default/xui/zh/floater_buy_object.xml index 507e482766..ff4a1feedb 100644 --- a/indra/newview/skins/default/xui/zh/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/zh/floater_buy_object.xml @@ -4,25 +4,25 @@ 購買 </floater.string> <floater.string name="title_buy_copy_text"> - Buy a copy of + 購買一個 </floater.string> <floater.string name="no_copy_text"> - (no copy) + ï¼ˆç¦æ¢è¤‡è£½ï¼‰ </floater.string> <floater.string name="no_modify_text"> - (no modify) + ï¼ˆç¦æ¢ä¿®æ”¹ï¼‰ </floater.string> <floater.string name="no_transfer_text"> - (no transfer) + ï¼ˆç¦æ¢è½‰è®“) </floater.string> <text name="contents_text"> - Contains: + å…§å«ï¼š </text> <text name="buy_text"> - Buy for L$[AMOUNT] from: + 購買,支付 L$[AMOUNT] 給: </text> <text name="buy_name_text"> - [NAME]? + [NAME]? </text> <button label="購買" label_selected="購買" name="buy_btn"/> <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="cancel_btn"/> diff --git a/indra/newview/skins/default/xui/zh/floater_camera.xml b/indra/newview/skins/default/xui/zh/floater_camera.xml index b75474340c..becb7b9546 100644 --- a/indra/newview/skins/default/xui/zh/floater_camera.xml +++ b/indra/newview/skins/default/xui/zh/floater_camera.xml @@ -1,13 +1,22 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="camera_floater"> +<floater name="camera_floater" title="æ”影機控制"> <floater.string name="rotate_tooltip"> - Rotate Camera Around Focus + 繞著焦點轉動æ”影機 </floater.string> <floater.string name="zoom_tooltip"> - Zoom Camera Towards Focus + æ”影機移近焦點 </floater.string> <floater.string name="move_tooltip"> - Move Camera Up and Down, Left and Right + æ”影機上下左å³ç§»å‹• + </floater.string> + <floater.string name="camera_modes_title"> + æ”å½±æ©Ÿæ¨¡å¼ + </floater.string> + <floater.string name="pan_mode_title"> + 環繞縮放平移 + </floater.string> + <floater.string name="presets_mode_title"> + é è¨è¦–è§’ </floater.string> <floater.string name="free_mode_title"> 視角物件 @@ -43,14 +52,14 @@ </panel_camera_item> </panel> <panel name="zoom"> - <joystick_rotate name="cam_rotate_stick" tool_tip="Orbit camera around focus"/> - <slider_bar name="zoom_slider" tool_tip="Zoom camera toward focus"/> + <joystick_rotate name="cam_rotate_stick" tool_tip="æ”影機繞焦點旋轉"/> + <slider_bar name="zoom_slider" tool_tip="æ”影機移近焦點"/> <joystick_track name="cam_track_stick" tool_tip="移動æ”影機上下左å³"/> </panel> </panel> <panel name="buttons"> <button label="" name="presets_btn" tool_tip="é è¨è¦–è§’"/> - <button label="" name="pan_btn" tool_tip="Orbit Zoom Pan"/> + <button label="" name="pan_btn" tool_tip="環繞縮放平移"/> <button label="" name="avatarview_btn" tool_tip="æ”影機模å¼"/> </panel> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_chat_bar.xml b/indra/newview/skins/default/xui/zh/floater_chat_bar.xml new file mode 100644 index 0000000000..f1a69a7688 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_chat_bar.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="chat_bar" title="附近的èŠå¤©"> + <panel name="bottom_panel"> + <line_editor label="點按æ¤è™•é–‹å§‹èŠå¤©ã€‚" name="chat_box" tool_tip="按下 Enter éµä¾†èªªæˆ–按下 Ctrl+Enter 來喊å«"/> + <button name="show_nearby_chat" tool_tip="顯示 / éš±è— é™„è¿‘çš„èŠå¤©ç´€éŒ„"/> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_color_picker.xml b/indra/newview/skins/default/xui/zh/floater_color_picker.xml index a7ac78e419..fa7b795d4f 100644 --- a/indra/newview/skins/default/xui/zh/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/zh/floater_color_picker.xml @@ -10,13 +10,13 @@ è—色: </text> <text name="h_val_text"> - Hue: + 色調: </text> <text name="s_val_text"> - Sat: + 飽和度: </text> <text name="l_val_text"> - Lum: + 亮度: </text> <check_box label="ç«‹å³å¥—用" name="apply_immediate"/> <button label="確定" label_selected="確定" name="select_btn"/> @@ -25,6 +25,6 @@ ç›®å‰é¡è‰²ï¼š </text> <text name="(Drag below to save.)"> - (Drag below to save) + (拖曳到下方å³å¯å„²å˜ï¼‰ </text> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/zh/floater_delete_env_preset.xml new file mode 100644 index 0000000000..4aafb31952 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_delete_env_preset.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<floater name="Delete Env Preset" title="刪除環境自訂é…ç½®"> + <string name="title_water"> + 刪除水的自訂é…ç½® + </string> + <string name="title_sky"> + 刪除天空自訂é…ç½® + </string> + <string name="title_day_cycle"> + 刪除日循環 + </string> + <string name="label_water"> + 自訂é…置: + </string> + <string name="label_sky"> + 自訂é…置: + </string> + <string name="label_day_cycle"> + 日循環: + </string> + <string name="msg_confirm_deletion"> + 確定è¦åˆªé™¤æ‰€é¸è‡ªè¨‚é…置? + </string> + <string name="msg_sky_is_referenced"> + 無法刪除日循環有所指涉的自訂é…置。 + </string> + <string name="combo_label"> + -鏿“‡ä¸€å€‹è‡ªè¨‚é…ç½®- + </string> + <text name="label"> + 自訂é…置: + </text> + <button label="刪除" name="delete"/> + <button label="å–æ¶ˆ" name="cancel"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_destinations.xml b/indra/newview/skins/default/xui/zh/floater_destinations.xml new file mode 100644 index 0000000000..f50a6a631a --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_destinations.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Destinations" title="目的地"/> diff --git a/indra/newview/skins/default/xui/zh/floater_display_name.xml b/indra/newview/skins/default/xui/zh/floater_display_name.xml index 01b5088794..aa71bba769 100644 --- a/indra/newview/skins/default/xui/zh/floater_display_name.xml +++ b/indra/newview/skins/default/xui/zh/floater_display_name.xml @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="Display Name" title="變更顯示å稱"> <text name="info_text"> - The name you give your avatar is called your Display Name. You can change it once a week. + ä½ ç‚ºä½ çš„åŒ–èº«å–çš„åå—å«åšã€Œé¡¯ç¤ºå稱ã€ã€‚ 一星期å¯ä»¥ä¿®æ”¹ä¸€æ¬¡ã€‚ </text> <text name="lockout_text"> - You cannot change your Display Name until: [TIME]. + ä½ ä¸‹æ¬¡èƒ½å†æ›´æ”¹é¡¯ç¤ºå稱的時間為 [TIME]。 </text> <text name="set_name_label"> 新顯示å稱: </text> <text name="name_confirm_label"> - Type your new name again to confirm: + 冿¬¡è¼¸å…¥ä½ 的新å稱以便確èªï¼š </text> - <button label="儲å˜" name="save_btn" tool_tip="儲å˜ä½ 的新顯示å稱"/> - <button label="é‡è¨" name="reset_btn" tool_tip="Make Display Name the same as Username"/> + <button label="儲å˜" name="save_btn" tool_tip="儲å˜ä½ 的新的顯示å稱"/> + <button label="é‡è¨" name="reset_btn" tool_tip="將顯示åç¨±è¨æˆå’Œä½¿ç”¨è€…å稱相åŒ"/> <button label="å–æ¶ˆ" name="cancel_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_edit_day_cycle.xml b/indra/newview/skins/default/xui/zh/floater_edit_day_cycle.xml new file mode 100644 index 0000000000..b84a4027ea --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_edit_day_cycle.xml @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Edit Day cycle" title="編輯日循環"> + <string name="title_new"> + 新建一個日循環 + </string> + <string name="title_edit"> + 編輯日循環 + </string> + <string name="hint_new"> + 為日循環定å,調整å„é …æŽ§åˆ¶ç¢ºå®šç´°ç¯€ï¼Œå†é»žæŒ‰ã€Œå„²å˜ã€ã€‚ + </string> + <string name="hint_edit"> + è‹¥è¦ç·¨è¼¯ä½ 的日循環,請調整下方å„é …æŽ§åˆ¶ï¼Œå†é»žæŒ‰ã€Œå„²å˜ã€ã€‚ + </string> + <string name="combo_label"> + -鏿“‡ä¸€å€‹è‡ªè¨‚é…ç½®- + </string> + <text name="label"> + 自訂é…ç½®å稱: + </text> + <text name="note"> + 注æ„:更改自訂é…置的å稱將會新建一個自訂é…ç½®ï¼Œä¸æœƒæ”¹è®ŠåŽŸæœ‰çš„è‡ªè¨‚é…置。 + </text> + <text name="hint_item1"> + - 點按一個é 籤,編輯特定的天空è¨å®šå’Œæ™‚間。 + </text> + <text name="hint_item2"> + - 點按並拖曳å„個é 籤,å³å¯è¨å®šéŽæ¸¡æ™‚間。 + </text> + <text name="hint_item3"> + - 使用 scrubber é è¦½ä½ çš„æ—¥å¾ªç’°ã€‚ + </text> + <panel name="day_cycle_slider_panel"> + <multi_slider initial_value="0" name="WLTimeSlider"/> + <multi_slider initial_value="0" name="WLDayCycleKeys"/> + <button label="新增éµ" label_selected="新增éµ" name="WLAddKey"/> + <button label="刪除éµ" label_selected="刪除éµ" name="WLDeleteKey"/> + <text name="WL12am"> + åˆå¤œ 12 點 + </text> + <text name="WL3am"> + 凌晨 3 點 + </text> + <text name="WL6am"> + ä¸Šåˆ 6 點 + </text> + <text name="WL9amHash"> + ä¸Šåˆ 9 點 + </text> + <text name="WL12pmHash"> + ä¸åˆ 12 點 + </text> + <text name="WL3pm"> + ä¸‹åˆ 3 點 + </text> + <text name="WL6pm"> + ä¸‹åˆ 6 點 + </text> + <text name="WL9pm"> + ä¸‹åˆ 9 點 + </text> + <text name="WL12am2"> + åˆå¤œ 12 點 + </text> + <text name="WL12amHash"> + | + </text> + <text name="WL3amHash"> + I + </text> + <text name="WL6amHash"> + | + </text> + <text name="WL9amHash2"> + I + </text> + <text name="WL12pmHash2"> + | + </text> + <text name="WL3pmHash"> + I + </text> + <text name="WL6pmHash"> + | + </text> + <text name="WL9pmHash"> + I + </text> + <text name="WL12amHash2"> + | + </text> + </panel> + <text name="WLCurKeyPresetText"> + 天空è¨å®šï¼š + </text> + <combo_box label="é è¨å€¼" name="WLSkyPresets"/> + <text name="WLCurKeyTimeText"> + 時間: + </text> + <time name="time" value="ä¸Šåˆ 6 點"/> + <check_box label="æ ¹æ“šé€™è¨å®šè®Šæ›´æˆ‘的日循環" name="make_default_cb"/> + <button label="儲å˜" name="save"/> + <button label="å–æ¶ˆ" name="cancel"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_edit_sky_preset.xml b/indra/newview/skins/default/xui/zh/floater_edit_sky_preset.xml new file mode 100644 index 0000000000..1ff832cdc4 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_edit_sky_preset.xml @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Edit Sky Preset" title="編輯天空自訂é…ç½®"> + <string name="title_new"> + 建立新的天空自訂é…ç½® + </string> + <string name="title_edit"> + 編輯天空自訂é…ç½® + </string> + <string name="hint_new"> + 為自訂é…置定å,調整å„é …æŽ§åˆ¶ç¢ºå®šé…置細節,完æˆå¾Œé»žæŒ‰ã€Œå„²å˜ã€ã€‚ + </string> + <string name="hint_edit"> + è‹¥è¦ç·¨è¼¯ä½ 的天空自訂é…置,請調整å„é …æŽ§åˆ¶ï¼Œå†é»žæŒ‰ã€Œå„²å˜ã€ã€‚ + </string> + <string name="combo_label"> + -鏿“‡ä¸€å€‹è‡ªè¨‚é…ç½®- + </string> + <text name="hint"> + è‹¥è¦ç·¨è¼¯ä½ 的自訂é…置,請調整å„é …æŽ§åˆ¶ï¼Œå†é»žæŒ‰ã€Œå„²å˜ã€ã€‚ + </text> + <text name="label"> + 自訂é…ç½®å稱: + </text> + <text name="note"> + 注æ„:更改自訂é…置的å稱將會新建一個自訂é…ç½®ï¼Œä¸æœƒæ”¹è®ŠåŽŸæœ‰çš„è‡ªè¨‚é…置。 + </text> + <tab_container name="WindLight Tabs"> + <panel label="大氣" name="Atmosphere"> + <text name="BHText"> + è—天水平線 + </text> + <text name="BDensText"> + 陰霾水平線 + </text> + <text name="BDensText2"> + è—天密度 + </text> + <text name="HDText"> + 陰霾密度 + </text> + <text name="DensMultText"> + 密度å€å¢ž + </text> + <text name="WLDistanceMultText"> + è·é›¢å€å¢ž + </text> + <text name="MaxAltText"> + 最大高度 + </text> + </panel> + <panel label="照明" name="Lighting"> + <text name="SLCText"> + æ—¥ï¼æœˆ é¡è‰² + </text> + <text name="WLAmbientText"> + 環境 + </text> + <text name="SunGlowText"> + å¤ªé™½å…‰è¼ + </text> + <slider label="èšç„¦" name="WLGlowB"/> + <slider label="尺寸" name="WLGlowR"/> + <text name="WLStarText"> + 星空亮度 + </text> + <text name="SceneGammaText"> + å ´æ™¯ Gamma 值 + </text> + <text name="TODText"> + æ—¥ï¼æœˆ ä½ç½® + </text> + <multi_slider initial_value="0" name="WLSunPos"/> + <text name="WL12amHash"> + | + </text> + <text name="WL6amHash"> + | + </text> + <text name="WL12pmHash2"> + | + </text> + <text name="WL6pmHash"> + | + </text> + <text name="WL12amHash2"> + | + </text> + <text name="WL12am"> + åˆå¤œ 12 點 + </text> + <text name="WL6am"> + ä¸Šåˆ 6 點 + </text> + <text name="WL12pmHash"> + ä¸åˆ 12 點 + </text> + <text name="WL6pm"> + ä¸‹åˆ 6 點 + </text> + <text name="WL12am2"> + åˆå¤œ 12 點 + </text> + <time name="WLDayTime" value="ä¸Šåˆ 6 點"/> + <text name="WLEastAngleText"> + æ±å‡è§’度 + </text> + </panel> + <panel label="雲彩" name="Clouds"> + <text name="WLCloudColorText"> + 雲彩é¡è‰² + </text> + <text name="WLCloudColorText2"> + 雲彩 XY 軸 / 密度 + </text> + <slider label="X" name="WLCloudX"/> + <slider label="Y" name="WLCloudY"/> + <slider label="D" name="WLCloudDensity"/> + <text name="WLCloudCoverageText"> + 雲彩覆蓋 + </text> + <text name="WLCloudScaleText"> + é›²å½©è¦æ¨¡ + </text> + <text name="WLCloudDetailText"> + 雲彩細節(XY 軸 / 密度) + </text> + <slider label="X" name="WLCloudDetailX"/> + <slider label="Y" name="WLCloudDetailY"/> + <slider label="D" name="WLCloudDetailDensity"/> + <text name="WLCloudScrollXText"> + 雲彩 X 滾軸 + </text> + <check_box label="鎖定" name="WLCloudLockX"/> + <text name="WLCloudScrollYText"> + 雲彩 Y 滾軸 + </text> + <check_box label="鎖定" name="WLCloudLockY"/> + </panel> + </tab_container> + <check_box label="æ ¹æ“šé€™è‡ªè¨‚é…置變更我的天空è¨å®š" name="make_default_cb"/> + <button label="儲å˜" name="save"/> + <button label="å–æ¶ˆ" name="cancel"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_edit_water_preset.xml b/indra/newview/skins/default/xui/zh/floater_edit_water_preset.xml new file mode 100644 index 0000000000..7943866e72 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_edit_water_preset.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Edit Water Preset" title="編輯水的自訂é…ç½®"> + <string name="title_new"> + 新建水的自訂é…ç½® + </string> + <string name="title_edit"> + 編輯水的自訂é…ç½® + </string> + <string name="hint_new"> + 為自訂é…置定å,調整å„é …æŽ§åˆ¶ç¢ºå®šé…置細節,完æˆå¾Œé»žæŒ‰ã€Œå„²å˜ã€ã€‚ + </string> + <string name="hint_edit"> + è‹¥è¦ç·¨è¼¯æ°´çš„自訂é…置,請調整å„é …æŽ§åˆ¶ï¼Œå†é»žæŒ‰ã€Œå„²å˜ã€ã€‚ + </string> + <string name="combo_label"> + -鏿“‡ä¸€å€‹è‡ªè¨‚é…ç½®- + </string> + <text name="hint"> + è‹¥è¦ç·¨è¼¯ä½ 的自訂é…置,請調整å„é …æŽ§åˆ¶ï¼Œå†é»žæŒ‰ã€Œå„²å˜ã€ã€‚ + </text> + <text name="label"> + 自訂é…ç½®å稱: + </text> + <text name="note"> + 注æ„:更改自訂é…置的å稱將會新建一個自訂é…ç½®ï¼Œä¸æœƒæ”¹è®ŠåŽŸæœ‰çš„è‡ªè¨‚é…置。 + </text> + <panel name="panel_water_preset"> + <text name="water_color_label"> + 水霧é¡è‰² + </text> + <text name="water_fog_density_label"> + 霧密度指數 + </text> + <text name="underwater_fog_modifier_label"> + 水底霧修飾元 + </text> + <text name="BHText"> + å¤§æ³¢æµªæ–¹å‘ + </text> + <slider label="X" name="WaterWave1DirX"/> + <slider label="Y" name="WaterWave1DirY"/> + <text name="BDensText"> + åå°„åæ³¢æ¯”例 + </text> + <text name="HDText"> + è²æ¶…耳比例 + </text> + <text name="FresnelOffsetText"> + è²æ¶…耳åè· + </text> + <text name="BHText2"> + å°æ³¢æµªæ–¹å‘ + </text> + <slider label="X" name="WaterWave2DirX"/> + <slider label="Y" name="WaterWave2DirY"/> + <text name="DensMultText"> + 上折射比例 + </text> + <text name="WaterScaleBelowText"> + 下折射比例 + </text> + <text name="MaxAltText"> + æ¨¡ç³Šå€æ•¸ + </text> + <text name="BHText3"> + æ£å¸¸åœ°åœ– + </text> + </panel> + <check_box label="æ ¹æ“šé€™è‡ªè¨‚é…置變更我水的è¨å®š" name="make_default_cb"/> + <button label="儲å˜" name="save"/> + <button label="å–æ¶ˆ" name="cancel"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_env_settings.xml b/indra/newview/skins/default/xui/zh/floater_env_settings.xml deleted file mode 100644 index 534ee7f0d0..0000000000 --- a/indra/newview/skins/default/xui/zh/floater_env_settings.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Environment Editor Floater" title="ENVIRONMENT EDITOR"> - <floater.string name="timeStr"> - [hour12,datetime,utc]:[min,datetime,utc] [ampm,datetime,utc] - </floater.string> - <text name="EnvTimeText"> - Time of Day - </text> - <text name="EnvTimeText2"> - 12:00 PM - </text> - <text name="EnvCloudText"> - Cloud Cover - </text> - <text name="EnvWaterColorText"> - 水色 - </text> - <color_swatch name="EnvWaterColor" tool_tip="Click to open color picker"/> - <text name="EnvWaterFogText"> - 水霧 - </text> - <button label="Use Estate Time" name="EnvUseEstateTimeButton"/> - <button label="進階天空" name="EnvAdvancedSkyButton"/> - <button label="進階水文" name="EnvAdvancedWaterButton"/> -</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_environment_settings.xml b/indra/newview/skins/default/xui/zh/floater_environment_settings.xml new file mode 100644 index 0000000000..1c6f2f936d --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_environment_settings.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Environment Editor Floater" title="環境è¨å®š"> + <text name="note"> + 使用以下的é¸é …è‡ªè¨‚ä½ Viewer 的環境è¨å®šã€‚ + </text> + <radio_group name="region_settings_radio_group"> + <radio_item label="使用地å€è¨å®š" name="use_region_settings"/> + <radio_item label="自訂我的環境" name="use_my_settings"/> + </radio_group> + <panel name="user_environment_settings"> + <text name="note"> + 注æ„ï¼šä½ çš„è‡ªè¨‚è¨å®šä¸æœƒè¢«å…¶ä»–使用者看見。 + </text> + <text name="water_settings_title"> + æ°´çš„è¨å®š + </text> + <combo_box name="water_settings_preset_combo"> + <combo_box.item label="-鏿“‡ä¸€å€‹è‡ªè¨‚é…ç½®-" name="item0"/> + </combo_box> + <text name="sky_dayc_settings_title"> + 天空 / 日循環 + </text> + <radio_group name="sky_dayc_settings_radio_group"> + <radio_item label="固定天空" name="my_sky_settings"/> + <radio_item label="日循環" name="my_dayc_settings"/> + </radio_group> + <combo_box name="sky_settings_preset_combo"> + <combo_box.item label="-鏿“‡ä¸€å€‹è‡ªè¨‚é…ç½®-" name="item0"/> + </combo_box> + <combo_box name="dayc_settings_preset_combo"> + <combo_box.item label="-鏿“‡ä¸€å€‹è‡ªè¨‚é…ç½®-" name="item0"/> + </combo_box> + </panel> + <button label="確定" name="ok_btn"/> + <button label="å–æ¶ˆ" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_event.xml b/indra/newview/skins/default/xui/zh/floater_event.xml index 349b5717f2..7175731fef 100644 --- a/indra/newview/skins/default/xui/zh/floater_event.xml +++ b/indra/newview/skins/default/xui/zh/floater_event.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater label="Event" name="Event" title="EVENT DETAILS"> +<floater label="活動" name="Event" title="活動細節"> <floater.string name="loading_text"> 載入ä¸... </floater.string> <floater.string name="done_text"> - Done + å®Œæˆ </floater.string> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_fast_timers.xml b/indra/newview/skins/default/xui/zh/floater_fast_timers.xml new file mode 100644 index 0000000000..871849305c --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_fast_timers.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="fast_timers"> + <string name="pause"> + æš«åœ + </string> + <string name="run"> + è·‘æ¥ + </string> + <button label="æš«åœ" name="pause_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_gesture.xml b/indra/newview/skins/default/xui/zh/floater_gesture.xml index a809cf085c..e7b1ed1de3 100644 --- a/indra/newview/skins/default/xui/zh/floater_gesture.xml +++ b/indra/newview/skins/default/xui/zh/floater_gesture.xml @@ -7,17 +7,17 @@ ï¼ˆæ’æ”¾ä¸ï¼‰ </floater.string> <floater.string name="copy_name"> - Copy of [COPY_NAME] + [COPY_NAME] 複本 </floater.string> <scroll_list name="gesture_list"> <scroll_list.columns label="å稱" name="name"/> <scroll_list.columns label="èŠå¤©" name="trigger"/> - <scroll_list.columns label="Key" name="shortcut"/> + <scroll_list.columns label="éµ" name="shortcut"/> </scroll_list> <panel label="bottom_panel" name="bottom_panel"> <menu_button name="gear_btn" tool_tip="更多é¸é …"/> <button name="new_gesture_btn" tool_tip="製作新姿勢e"/> - <button name="activate_btn" tool_tip="Activate/Deactivate selected gesture"/> + <button name="activate_btn" tool_tip="啟動/åœæ¢æ‰€é¸å§¿å‹¢"/> <button name="del_btn" tool_tip="刪除這個姿勢"/> </panel> <button label="編輯" name="edit_btn"/> diff --git a/indra/newview/skins/default/xui/zh/floater_god_tools.xml b/indra/newview/skins/default/xui/zh/floater_god_tools.xml index 448113bf74..69a6eadc8c 100644 --- a/indra/newview/skins/default/xui/zh/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/zh/floater_god_tools.xml @@ -8,42 +8,42 @@ <text name="Region Name:"> 地å€å稱: </text> - <check_box label="Prelude" name="check prelude" tool_tip="Set this to make the region a prelude"/> - <check_box label="固定太陽" name="check fixed sun" tool_tip="Fix the sun position (like in Region/Estate > Terrain"/> - <check_box label="Reset Home On Teleport" name="check reset home" tool_tip="When Resident teleports out, reset their home to the destination position."/> - <check_box label="Visible" name="check visible" tool_tip="Set this to make the region visible to non-gods"/> - <check_box label="傷害" name="check damage" tool_tip="Set this to enable damage in this region"/> - <check_box label="é˜»æ¢æµé‡è¿½è¹¤" name="block dwell" tool_tip="Set this to make the region not compute traffic"/> - <check_box label="阻æ¢è®Šå½¢" name="block terraform" tool_tip="Set this to disallow people terraforming their land"/> - <check_box label="沙盒" name="is sandbox" tool_tip="Toggle whether this is a sandbox region"/> - <button label="Bake Terrain" label_selected="Bake Terrain" name="Bake Terrain" tool_tip="儲å˜ç›®å‰çš„地形為é è¨"/> - <button label="Revert Terrain" label_selected="Revert Terrain" name="Revert Terrain" tool_tip="Replace the current terrain with default"/> - <button label="Swap Terrain" label_selected="Swap Terrain" name="Swap Terrain" tool_tip="Swap current terrain with default"/> + <check_box label="導引å€" name="check prelude" tool_tip="在æ¤è¨å®šï¼Œå°‡å€åŸŸè¨ç‚ºå°Žå¼•å€"/> + <check_box label="固定太陽" name="check fixed sun" tool_tip="固定太陽ä½ç½®ï¼ˆå¦‚åŒåœ°å€/é ˜åœ° > 地形)"/> + <check_box label="çž¬é–“å‚³é€æ™‚é‡è¨å®¶çš„ä½ç½®" name="check reset home" tool_tip="居民瞬間傳é€é›¢é–‹æ™‚,將他們的家é‡è¨ç‚ºçž¬é–“傳é€çš„目的地。"/> + <check_box label="å¯çœ‹åˆ°" name="check visible" tool_tip="在æ¤è¨å®šï¼Œå°‡å€åŸŸè¨ç‚ºå¯è®“éžç¥žè€…看到。"/> + <check_box label="傷害" name="check damage" tool_tip="在æ¤è¨å®šï¼Œä½¿æœ¬åœ°å€å…許傷害。"/> + <check_box label="é˜»æ¢æµé‡è¿½è¹¤" name="block dwell" tool_tip="在æ¤è¨å®šï¼Œä½¿æœ¬å€åŸŸä¸è¨ˆç®—æµé‡ã€‚"/> + <check_box label="阻æ¢åœŸåœ°è®Šå½¢" name="block terraform" tool_tip="è¨å®šç¦æ¢äººå€‘將其土地變形。"/> + <check_box label="沙盤" name="is sandbox" tool_tip="åˆ‡æ›æ˜¯å¦è¨ç‚ºæ²™ç›¤å€åŸŸã€‚"/> + <button label="確定地形" label_selected="確定地形" name="Bake Terrain" tool_tip="將目å‰çš„地形儲å˜ç‚ºé è¨å€¼"/> + <button label="回復原地形" label_selected="回復原地形" name="Revert Terrain" tool_tip="以é è¨å€¼å–代目å‰çš„地形"/> + <button label="交æ›åœ°å½¢" label_selected="交æ›åœ°å½¢" name="Swap Terrain" tool_tip="將目å‰çš„地形和é è¨å€¼äº¤æ›"/> <text name="estate id"> é ˜åœ° ID: </text> <text name="parent id"> - Parent ID: + æ¯é ˜åœ° ID: </text> - <line_editor name="parentestate" tool_tip="This is the parent estate for this region"/> + <line_editor name="parentestate" tool_tip="這是本å€åŸŸçš„æ¯é ˜åœ°"/> <text name="Grid Pos: "> ç¶²æ ¼ä½ç½®ï¼š </text> - <line_editor name="gridposx" tool_tip="This is the grid x position for this region"/> - <line_editor name="gridposy" tool_tip="This is the grid y position for this region"/> + <line_editor name="gridposx" tool_tip="這是本å€åŸŸçš„ç¶²æ ¼ X ä½ç½®"/> + <line_editor name="gridposy" tool_tip="這是本å€åŸŸçš„ç¶²æ ¼ Y ä½ç½®"/> <text name="Redirect to Grid: "> - Redirect to Grid: + 釿–°å°Žå‘è‡³ç¶²æ ¼ï¼š </text> <text name="billable factor text"> - Billable Factor: + 收費率: </text> <text name="land cost text"> - L$ per m²: + æ¯å¹³æ–¹å…¬å°º L$: </text> - <button label="釿–°æ•´ç†" label_selected="釿–°æ•´ç†" name="Refresh" tool_tip="Click here to refresh the above information"/> - <button label="套用" label_selected="套用" name="Apply" tool_tip="點擊æ¤è™•以接å—套用上述變更"/> - <button label="鏿“‡åœ°å€" label_selected="鏿“‡åœ°å€" name="Select Region" tool_tip="Select the whole region with the land tool"/> - <button label="ç«‹å³è‡ªå‹•儲å˜" label_selected="ç«‹å³è‡ªå‹•儲å˜" name="Autosave now" tool_tip="Save gzipped state to autosave directory"/> + <button label="釿–°æ•´ç†" label_selected="釿–°æ•´ç†" name="Refresh" tool_tip="點按這裡刷新上列資料"/> + <button label="套用" label_selected="套用" name="Apply" tool_tip="點按æ¤è™•以接å—套用上述變更"/> + <button label="鏿“‡åœ°å€" label_selected="鏿“‡åœ°å€" name="Select Region" tool_tip="以土地工具é¸å–整個å€åŸŸ"/> + <button label="ç«‹å³è‡ªå‹•儲å˜" label_selected="ç«‹å³è‡ªå‹•儲å˜" name="Autosave now" tool_tip="å„²å˜ gzip 壓縮狀態至自動儲å˜ç›®éŒ„"/> </panel> <panel label="物件" name="objects"> <panel.string name="no_target"> @@ -53,44 +53,44 @@ 地å€å稱: </text> <text name="region name"> - Welsh + å¨çˆ¾æ–¯ </text> <check_box label="關閉腳本" name="disable scripts" tool_tip="關閉這個地å€ç¾åœ¨çš„全部腳本"/> - <check_box label="Disable Collisions" name="disable collisions" tool_tip="Set this to disable non-agent collisions in this region"/> - <check_box label="Disable Physics" name="disable physics" tool_tip="Set this to disable all physics in this region"/> - <button label="套用" label_selected="套用" name="Apply" tool_tip="Click here to apply any changes from above"/> - <button label="Set Target" label_selected="Set Target" name="Set Target" tool_tip="Set the target avatar for object deletion"/> + <check_box label="ç¦æ¢ç¢°æ’ž" name="disable collisions" tool_tip="è¨ç½®é—œé–‰åœ°å€å…§é™¤äº†äººä»¥å¤–的碰撞"/> + <check_box label="關閉物ç†" name="disable physics" tool_tip="è¨ç½®é—œé–‰æœ¬å€åŸŸå…§æ‰€æœ‰ç‰©ç†"/> + <button label="套用" label_selected="套用" name="Apply" tool_tip="點按æ¤è™•以接å—套用上述變更"/> + <button label="è¨å®šç›®æ¨™" label_selected="è¨å®šç›®æ¨™" name="Set Target" tool_tip="將目標化身è¨ç‚ºå¾…刪除的物件"/> <text name="target_avatar_name"> (無目標) </text> - <button label="Delete Target's Scripted Objects On Others Land" label_selected="Delete Target's Scripted Objects On Others Land" name="Delete Target's Scripted Objects On Others Land" tool_tip="Delete all scripted objects owned by the target on land not owned by the target. (no copy) objects will be returned."/> - <button label="Delete Target's Scripted Objects On *Any* Land" label_selected="Delete Target's Scripted Objects On *Any* Land" name="Delete Target's Scripted Objects On *Any* Land" tool_tip="Delete all scripted objects owned by the target in this region. (no copy) objects will be returned."/> - <button label="Delete *ALL* Of Target's Objects" label_selected="Delete *ALL* Of Target's Objects" name="Delete *ALL* Of Target's Objects" tool_tip="Delete all objects owned by the target in this region. (no copy) objects will be returned."/> - <button label="Get Top Colliders" label_selected="Get Top Colliders" name="Get Top Colliders" tool_tip="Gets list of objects experiencing the most narrowphase callbacks"/> - <button label="Get Top Scripts" label_selected="Get Top Scripts" name="Get Top Scripts" tool_tip="Gets list of objects spending the most time running scripts"/> - <button label="Scripts digest" label_selected="Scripts digest" name="Scripts digest" tool_tip="Gets a list of all scripts and number of occurences of each"/> + <button label="刪除目標物在其他土地的帶腳本的物件" label_selected="刪除目標物在其他土地的帶腳本的物件" name="Delete Target's Scripted Objects On Others Land" tool_tip="åœ¨ä¸æ˜¯ç›®æ¨™ç‰©æ‰€æ“有的土地上,刪除屬於該目標物的所有帶腳本的物件。 ã€Œç¦æ¢è¤‡è£½ã€çš„物件將被é€å›žã€‚"/> + <button label="刪除目標物在任何土地的帶腳本的物件" label_selected="刪除目標物在任何土地的帶腳本的物件" name="Delete Target's Scripted Objects On *Any* Land" tool_tip="刪除本å€åŸŸå…§å±¬æ–¼ç›®æ¨™ç‰©çš„æ‰€æœ‰å¸¶è…³æœ¬çš„物件。 ã€Œç¦æ¢è¤‡è£½ã€çš„物件將被é€å›žã€‚"/> + <button label="刪除目標物所有的物件" label_selected="刪除目標物所有的物件" name="Delete *ALL* Of Target's Objects" tool_tip="刪除本å€åŸŸå…§å±¬æ–¼ç›®æ¨™ç‰©çš„æ‰€æœ‰ç‰©ä»¶ã€‚ ã€Œç¦æ¢è¤‡è£½ã€çš„物件將被é€å›žã€‚"/> + <button label="å–得最常碰撞的物件" label_selected="å–得最常碰撞的物件" name="Get Top Colliders" tool_tip="å–å¾—ç¶“æ·æœ€å¤šæ¬¡ã€Œçª„相ã€å›žèª¿çš„物件清單"/> + <button label="å–å¾—æŽ’åæœ€é«˜çš„腳本" label_selected="å–å¾—æŽ’åæœ€é«˜çš„腳本" name="Get Top Scripts" tool_tip="å–得花最多時間執行腳本的物件清單"/> + <button label="腳本集" label_selected="腳本集" name="Scripts digest" tool_tip="å–得所有腳本清單,並列出發生次數,é‡å°æ¯ä¸€"/> </panel> - <panel label="Request" name="request"> + <panel label="請求" name="request"> <text name="Destination:"> - Destination: + 目的地: </text> <combo_box name="destination"> - <combo_box.item label="Selection" name="item1"/> - <combo_box.item label="Agent Region" name="item2"/> + <combo_box.item label="鏿“‡" name="item1"/> + <combo_box.item label="用戶地å€" name="item2"/> </combo_box> <text name="Request:"> - Request: + 請求: </text> <combo_box name="request"> - <combo_box.item label="colliders <steps>" name="item1"/> - <combo_box.item label="scripts <count>,<optional pattern>" name="item2"/> - <combo_box.item label="objects <pattern>" name="item3"/> + <combo_box.item label="碰撞物 <æ¥é©Ÿ>" name="item1"/> + <combo_box.item label="腳本 <計數>,<éžå¿…è¦å½¢æ…‹>" name="item2"/> + <combo_box.item label="物件 <形態>" name="item3"/> <combo_box.item label="rez <asset_id>" name="item4"/> </combo_box> <text name="Parameter:"> - Parameter: + åƒæ•¸ï¼š </text> - <button label="Make Request" label_selected="Make Request" name="Make Request"/> + <button label="æå‡ºè«‹æ±‚" label_selected="æå‡ºè«‹æ±‚" name="Make Request"/> </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_hardware_settings.xml b/indra/newview/skins/default/xui/zh/floater_hardware_settings.xml index 1465dcb256..9e3bb88ac0 100644 --- a/indra/newview/skins/default/xui/zh/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/zh/floater_hardware_settings.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="Hardware Settings Floater" title="硬體è¨å®š"> <text name="Filtering:"> - Filtering: + éŽæ¿¾ï¼š </text> - <check_box label="Anisotropic Filtering (slower when enabled)" name="ani"/> - <text name="Antialiasing:"> - Antialiasing: + <check_box label="å„å‘ç•°æ€§éŽæ¿¾ï¼ˆè‹¥å•Ÿç”¨æœƒè®Šæ…¢ï¼‰" name="ani"/> + <text name="antialiasing label"> + 消除鋸齒: </text> - <combo_box label="Antialiasing" name="fsaa"> - <combo_box.item label="Disabled" name="FSAADisabled"/> + <combo_box label="消除鋸齒" name="fsaa"> + <combo_box.item label="å·²åœç”¨" name="FSAADisabled"/> <combo_box.item label="2x" name="2x"/> <combo_box.item label="4x" name="4x"/> <combo_box.item label="8x" name="8x"/> @@ -17,15 +17,19 @@ <text name="antialiasing restart"> ï¼ˆé ˆé‡æ–°å•Ÿå‹•ç€è¦½å™¨ï¼‰ </text> - <spinner label="Gamma:" name="gamma"/> + <spinner label="伽瑪值:" name="gamma"/> <text name="(brightness, lower is brighter)"> - (0 = default brightness, lower = brighter) + (0 = é è¨äº®åº¦ï¼›å€¼è¶Šå° = 亮度越高) </text> <text name="Enable VBO:"> - Enable VBO: + å•Ÿç”¨é ‚é»žç·©è¡ç‰©ä»¶(VBO): </text> - <check_box initial_value="true" label="Enable OpenGL Vertex Buffer Objects" name="vbo" tool_tip="Enabling this on modern hardware gives a performance gain. However, older hardware often has poor implementations of VBOs and you may get crashes when this is enabled."/> - <slider label="æè³ªè¨˜æ†¶é«”(MB):" name="GraphicsCardTextureMemory" tool_tip="Amount of memory to allocate for textures. Defaults to video card memory. Reducing this may improve performance but may also make textures blurry."/> - <spinner label="Fog Distance Ratio:" name="fog"/> + <check_box initial_value="true" label="啟用 OpenGL é ‚é»žç·©è¡ç‰©ä»¶(VBO)" name="vbo" tool_tip="åœ¨è¼ƒæ–°ç¡¬é«”ä¸Šå•Ÿç”¨ï¼Œå¯æå‡æ•ˆèƒ½ã€‚ 但是,較舊硬體的 VBO 實作ä¸ä½³ï¼Œè‹¥å•Ÿç”¨å¯èƒ½å°Žè‡´ç•¶æ©Ÿã€‚"/> + <text name="tc label"> + 啟用 S3TC: + </text> + <check_box initial_value="true" label="啟用æè³ªå£“ç¸®ï¼ˆé ˆé‡æ–°å•Ÿå‹•)" name="texture compression" tool_tip="在影片記憶體ä¸å£“縮æè³ªï¼Œè®“高解æžåº¦æè³ªå¯ä»¥è¼‰å…¥ï¼Œä½†è‰²å½©å“質ç¨å·®ã€‚"/> + <slider label="æè³ªè¨˜æ†¶é«”(MB):" name="GraphicsCardTextureMemory" tool_tip="é…置給æè³ªä½¿ç”¨çš„記憶體é‡ã€‚ é è¨ç‚ºé¡¯åƒå¡è¨˜æ†¶é«”。 é™ä½Žæ¤å€¼å¯ä»¥æå‡æ•ˆèƒ½ï¼Œä½†æè³ªä¹Ÿæœƒè®Šæ¨¡ç³Šã€‚"/> + <spinner label="霧è·é›¢æ¯”率:" name="fog"/> <button label="確定" label_selected="確定" name="OK"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_how_to.xml b/indra/newview/skins/default/xui/zh/floater_how_to.xml new file mode 100644 index 0000000000..e033327165 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_how_to.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_how_to" title="簡易教å¸"/> diff --git a/indra/newview/skins/default/xui/zh/floater_im_session.xml b/indra/newview/skins/default/xui/zh/floater_im_session.xml index e8db97560e..808a0b6720 100644 --- a/indra/newview/skins/default/xui/zh/floater_im_session.xml +++ b/indra/newview/skins/default/xui/zh/floater_im_session.xml @@ -2,7 +2,7 @@ <floater name="panel_im"> <layout_stack name="im_panels"> <layout_panel> - <line_editor label="To" name="chat_editor"/> + <line_editor label="至" name="chat_editor"/> </layout_panel> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_image_preview.xml b/indra/newview/skins/default/xui/zh/floater_image_preview.xml index 1260601f90..d2de37fa6a 100644 --- a/indra/newview/skins/default/xui/zh/floater_image_preview.xml +++ b/indra/newview/skins/default/xui/zh/floater_image_preview.xml @@ -26,7 +26,7 @@ 請嘗試儲å˜åœ–åƒç‚º 24 ä½å…ƒ Targa(.tgaï¼‰æ ¼å¼ã€‚ </text> - <check_box label="Use lossless compression" name="lossless_check"/> + <check_box label="使用零失真壓縮" name="lossless_check"/> <button label="å–æ¶ˆ" name="cancel_btn"/> <button label="上傳(L$[AMOUNT])" name="ok_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_import_collada.xml b/indra/newview/skins/default/xui/zh/floater_import_collada.xml new file mode 100644 index 0000000000..8f6b476ccf --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_import_collada.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Import Collada" title="åŒ¯å…¥å ´æ™¯"> + <text name="mesh count"> + ç¶²é¢ï¼š[COUNT] + </text> + <text name="texture count"> + æè³ªï¼š [COUNT] + </text> + <text name="status"> + 狀態:[STATUS] + </text> + <button label="å–æ¶ˆ" name="cancel"/> + <button label="確定" name="ok"/> + <string name="status_idle"> + é–’ç½®ä¸ + </string> + <string name="status_uploading"> + æ£åœ¨ä¸Šå‚³ [NAME] + </string> + <string name="status_creating"> + æ£åœ¨å»ºç«‹ [NAME] 物件 + </string> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_incoming_call.xml b/indra/newview/skins/default/xui/zh/floater_incoming_call.xml index a0f31fa11f..45a003d3c8 100644 --- a/indra/newview/skins/default/xui/zh/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/zh/floater_incoming_call.xml @@ -4,28 +4,28 @@ 5 </floater.string> <floater.string name="localchat"> - 附近的音èŠå¤© + 附近的語音èŠå¤© </floater.string> <floater.string name="anonymous"> 匿å </floater.string> <floater.string name="VoiceInviteP2P"> - 通話ä¸ã€‚ + 來電ä¸ã€‚ </floater.string> <floater.string name="VoiceInviteAdHoc"> - å·²åŠ è¨´å…¥æœƒè°äº¤è«‡ä¸çš„語音èŠå¤©ã€‚ + å·²åŠ å…¥å¤šæ–¹èªžéŸ³é€šè©±ã€‚ </floater.string> <floater.string name="VoiceInviteGroup"> å‰›åŠ å…¥ '[GROUP]' èªžéŸ³é »é“。 </floater.string> <floater.string name="VoiceInviteQuestionGroup"> - Would you like to leave [CURRENT_CHAT] and join the call with '[GROUP]'? + 是å¦é›¢é–‹ [CURRENT_CHAT] ä¸¦åŠ å…¥å’Œã€Œ[GROUP]ã€é€šè©±ï¼Ÿ </floater.string> <floater.string name="VoiceInviteQuestionDefault"> - Do you want to leave [CURRENT_CHAT] and join this voice chat? + 是å¦é›¢é–‹ [CURRENT_CHAT] ä¸¦åŠ å…¥é€™å€‹èªžéŸ³èŠå¤©ï¼Ÿ </floater.string> <text name="question"> - Do you want to leave [CURRENT_CHAT] and join this voice chat? + 是å¦é›¢é–‹ [CURRENT_CHAT] ä¸¦åŠ å…¥é€™å€‹èªžéŸ³èŠå¤©ï¼Ÿ </text> <button label="接å—" label_selected="接å—" name="Accept"/> <button label="拒絕" label_selected="拒絕" name="Reject"/> diff --git a/indra/newview/skins/default/xui/zh/floater_inspect.xml b/indra/newview/skins/default/xui/zh/floater_inspect.xml index ea3d9d0c3e..4e1f4b24fd 100644 --- a/indra/newview/skins/default/xui/zh/floater_inspect.xml +++ b/indra/newview/skins/default/xui/zh/floater_inspect.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="inspect" title="INSPECT OBJECTS"> +<floater name="inspect" title="檢視物件"> <floater.string name="timeStamp"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] </floater.string> - <scroll_list name="object_list" tool_tip="Select an object from this list to highlight it in-world"> + <scroll_list name="object_list" tool_tip="從清單ä¸é¸å–一物件,在虛擬世界ä¸åŠ ä»¥é«˜äº®é¡¯ç¤ºã€‚"> <scroll_list.columns label="物件å稱" name="object_name"/> - <scroll_list.columns label="æ“æœ‰è€…å稱" name="owner_name"/> + <scroll_list.columns label="所有人å稱" name="owner_name"/> <scroll_list.columns label="å‰µé€ è€…å稱" name="creator_name"/> <scroll_list.columns label="å‰µé€ æ—¥æœŸ" name="creation_date"/> </scroll_list> - <button label="å¯Ÿçœ‹æ“æœ‰è€…檔案..." name="button owner" tool_tip="See profile of the highlighted object's owner"/> - <button label="å¯Ÿçœ‹å‰µé€ è€…æª”æ¡ˆ..." name="button creator" tool_tip="See profile of the highlighted object's original creator"/> + <button label="察看所有人檔案..." name="button owner" tool_tip="察看高亮顯示的物件的物主個人檔案"/> + <button label="å¯Ÿçœ‹å‰µé€ äººæª”æ¡ˆ..." name="button creator" tool_tip="察看高亮顯示的物件的原創人個人檔案"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_inventory.xml b/indra/newview/skins/default/xui/zh/floater_inventory.xml deleted file mode 100644 index da4619c964..0000000000 --- a/indra/newview/skins/default/xui/zh/floater_inventory.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="我的收ç´å€"> - <panel label="æ”¶ç´å€é¢æ¿" name="Inventory Panel"/> -</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/zh/floater_inventory_item_properties.xml index a41be7ef9a..6998df75f3 100644 --- a/indra/newview/skins/default/xui/zh/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/zh/floater_inventory_item_properties.xml @@ -10,7 +10,7 @@ ä½ å¯ä»¥ï¼š </floater.string> <floater.string name="owner_can"> - æ“æœ‰è€…å¯ä»¥ï¼š + 所有人å¯ä»¥ï¼š </floater.string> <floater.string name="acquiredDate"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] @@ -26,11 +26,11 @@ </text> <button label="檔案..." name="BtnCreator"/> <text name="LabelOwnerTitle"> - æ“æœ‰è€…: + 所有人: </text> <button label="檔案..." name="BtnOwner"/> <text name="LabelAcquiredTitle"> - Acquired: + å–得於: </text> <text name="LabelAcquiredDate"> Wed May 24 12:50:46 2006 @@ -39,25 +39,25 @@ ä½ ï¼š </text> <check_box label="編輯" name="CheckOwnerModify"/> - <check_box label="覆製" name="CheckOwnerCopy"/> + <check_box label="æšåº¨" name="CheckOwnerCopy"/> <check_box label="轉售" name="CheckOwnerTransfer"/> <text name="AnyoneLabel"> 任何人: </text> - <check_box label="覆製" name="CheckEveryoneCopy"/> + <check_box label="æšåº¨" name="CheckEveryoneCopy"/> <text name="GroupLabel"> 群組: </text> <check_box label="分享" name="CheckShareWithGroup"/> <text name="NextOwnerLabel"> - ä¸‹ä¸€å€‹æ“æœ‰è€…: + 下一個所有人: </text> <check_box label="編輯" name="CheckNextOwnerModify"/> - <check_box label="覆製" name="CheckNextOwnerCopy"/> + <check_box label="æšåº¨" name="CheckNextOwnerCopy"/> <check_box label="轉售" name="CheckNextOwnerTransfer"/> <check_box label="出售" name="CheckPurchase"/> <combo_box name="combobox sale copy"> - <combo_box.item label="副本" name="Copy"/> + <combo_box.item label="æšåº¨" name="Copy"/> <combo_box.item label="原件" name="Original"/> </combo_box> <spinner label="åƒ¹æ ¼ï¼š" name="Edit Cost"/> diff --git a/indra/newview/skins/default/xui/zh/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/zh/floater_inventory_view_finder.xml index d698edf5e5..6d1d18b67c 100644 --- a/indra/newview/skins/default/xui/zh/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/zh/floater_inventory_view_finder.xml @@ -5,16 +5,17 @@ <check_box label="æœè£" name="check_clothing"/> <check_box label="å§¿å‹¢" name="check_gesture"/> <check_box label="地標" name="check_landmark"/> + <check_box label="ç¶²é¢" name="check_mesh"/> <check_box label="記事å¡" name="check_notecard"/> - <check_box label="Objects" name="check_object"/> + <check_box label="物件" name="check_object"/> <check_box label="腳本" name="check_script"/> - <check_box label="Sounds" name="check_sound"/> + <check_box label="è²éŸ³" name="check_sound"/> <check_box label="æè³ª" name="check_texture"/> - <check_box label="Snapshots" name="check_snapshot"/> + <check_box label="å¿«ç…§" name="check_snapshot"/> <button label="全部" label_selected="全部" name="All"/> <button label="ç„¡" label_selected="ç„¡" name="None"/> - <check_box label="Always show folders" name="check_show_empty"/> - <check_box label="Since Logoff" name="check_since_logoff"/> + <check_box label="固定顯示資料夾" name="check_show_empty"/> + <check_box label="自上次登出" name="check_since_logoff"/> <text name="- OR -"> - 或 - </text> diff --git a/indra/newview/skins/default/xui/zh/floater_joystick.xml b/indra/newview/skins/default/xui/zh/floater_joystick.xml index 1721f7cd1e..e0b2cf5a1c 100644 --- a/indra/newview/skins/default/xui/zh/floater_joystick.xml +++ b/indra/newview/skins/default/xui/zh/floater_joystick.xml @@ -1,79 +1,79 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Joystick" title="JOYSTICK CONFIGURATION"> +<floater name="Joystick" title="æ–æ¡¿è¨ç½®"> <floater.string name="NoDevice"> æœªåµæ¸¬åˆ°è¨å‚™ </floater.string> - <check_box label="Enable Joystick:" name="enable_joystick"/> - <spinner label="X Axis Mapping" name="JoystickAxis1"/> - <spinner label="Y Axis Mapping" name="JoystickAxis2"/> - <spinner label="Z Axis Mapping" name="JoystickAxis0"/> - <spinner label="Pitch Mapping" name="JoystickAxis4"/> - <spinner label="Yaw Mapping" name="JoystickAxis5"/> - <spinner label="Roll Mapping" name="JoystickAxis3"/> - <spinner label="Zoom Mapping" name="JoystickAxis6"/> - <check_box label="Direct Zoom" name="ZoomDirect"/> - <check_box label="3D Cursor" name="Cursor3D"/> - <check_box label="Auto Level" name="AutoLeveling"/> + <check_box label="å•Ÿç”¨æ–æ¡¿ï¼š" name="enable_joystick"/> + <spinner label="X è»¸æ˜ å°„" name="JoystickAxis1"/> + <spinner label="Y è»¸æ˜ å°„" name="JoystickAxis2"/> + <spinner label="Z è»¸æ˜ å°„" name="JoystickAxis0"/> + <spinner label="ä¿¯ä»°æ˜ å°„" name="JoystickAxis4"/> + <spinner label="åæ“ºæ˜ å°„" name="JoystickAxis5"/> + <spinner label="ç¿»æ»¾æ˜ å°„" name="JoystickAxis3"/> + <spinner label="ç¸®æ”¾æ˜ å°„" name="JoystickAxis6"/> + <check_box label="直接縮放" name="ZoomDirect"/> + <check_box label="ä¸‰ç¶æ¸¸æ¨™" name="Cursor3D"/> + <check_box label="自動水平" name="AutoLeveling"/> <text name="Control Modes:"> - Control Modes: + 控制模å¼ï¼š </text> <check_box label="化身" name="JoystickAvatarEnabled"/> <check_box label="å»ºé€ " name="JoystickBuildEnabled"/> - <check_box label="Flycam" name="JoystickFlycamEnabled"/> - <stat_view label="Joystick Monitor" name="axis_view"> - <stat_bar label="Axis 0" name="axis0"/> - <stat_bar label="Axis 1" name="axis1"/> - <stat_bar label="Axis 2" name="axis2"/> - <stat_bar label="Axis 3" name="axis3"/> - <stat_bar label="Axis 4" name="axis4"/> - <stat_bar label="Axis 5" name="axis5"/> + <check_box label="移動æ”影機" name="JoystickFlycamEnabled"/> + <stat_view label="æ–æ¡¿ç›£æŽ§å™¨" name="axis_view"> + <stat_bar label="軸 0" name="axis0"/> + <stat_bar label="軸 1" name="axis1"/> + <stat_bar label="軸 2" name="axis2"/> + <stat_bar label="軸 3" name="axis3"/> + <stat_bar label="軸 4" name="axis4"/> + <stat_bar label="軸 5" name="axis5"/> </stat_view> <text name="XScale"> - X Scale + X 比例 </text> <text name="YScale"> - Y Scale + Y 比例 </text> <text name="ZScale"> - Z Scale + Z 比例 </text> <text name="PitchScale"> - Pitch Scale + 俯仰比例 </text> <text name="YawScale"> - Yaw Scale + åæ“ºæ¯”例 </text> <text name="RollScale"> - Roll Scale + 翻滾比例 </text> <text name="XDeadZone"> - X Dead Zone + X æ»å€ </text> <text name="YDeadZone"> - Y Dead Zone + Y æ»å€ </text> <text name="ZDeadZone"> - Z Dead Zone + Z æ»å€ </text> <text name="PitchDeadZone"> - Pitch Dead Zone + 俯仰æ»å€ </text> <text name="YawDeadZone"> - Yaw Dead Zone + åæ“ºæ»å€ </text> <text name="RollDeadZone"> - Roll Dead Zone + 翻滾æ»å€ </text> <text name="Feathering"> - Feathering + é‡é‡å應 </text> <text name="ZoomScale2"> - Zoom Scale + 縮放比例 </text> <text name="ZoomDeadZone"> - Zoom Dead Zone + 縮放æ»å€ </text> - <button label="SpaceNavigator Defaults" name="SpaceNavigatorDefaults"/> + <button label="SpaceNavigator é è¨å€¼" name="SpaceNavigatorDefaults"/> <button label="確定" label_selected="確定" name="ok_btn"/> <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="cancel_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_lagmeter.xml b/indra/newview/skins/default/xui/zh/floater_lagmeter.xml index 6e58e7332f..e9a082288a 100644 --- a/indra/newview/skins/default/xui/zh/floater_lagmeter.xml +++ b/indra/newview/skins/default/xui/zh/floater_lagmeter.xml @@ -7,7 +7,7 @@ 360 </floater.string> <floater.string name="min_title_msg"> - Lag + å»¶é² </floater.string> <floater.string name="min_width_px"> 90 @@ -22,28 +22,28 @@ 15 </floater.string> <floater.string name="client_frame_time_window_bg_msg"> - Normal, window in background + æ£å¸¸ï¼Œè¦–çª—ä½æ–¼èƒŒæ™¯ </floater.string> <floater.string name="client_frame_time_critical_msg"> - Client frame rate below [CLIENT_FRAME_RATE_CRITICAL] + 客戶端幀率低於 [CLIENT_FRAME_RATE_CRITICAL] </floater.string> <floater.string name="client_frame_time_warning_msg"> - Client frame rate between [CLIENT_FRAME_RATE_CRITICAL] and [CLIENT_FRAME_RATE_WARNING] + 客戶端幀率介於 [CLIENT_FRAME_RATE_CRITICAL] å’Œ [CLIENT_FRAME_RATE_WARNING] 之間 </floater.string> <floater.string name="client_frame_time_normal_msg"> æ£å¸¸ </floater.string> <floater.string name="client_draw_distance_cause_msg"> - Possible cause: Draw distance set too high + å¯èƒ½åŽŸå› ï¼šå¯è¦–è·é›¢è¨å¾—太é </floater.string> <floater.string name="client_texture_loading_cause_msg"> - Possible cause: Images loading + å¯èƒ½åŽŸå› ï¼šæ£åœ¨è¼‰å…¥åœ–åƒ </floater.string> <floater.string name="client_texture_memory_cause_msg"> - Possible cause: Too many images in memory + å¯èƒ½åŽŸå› ï¼šè¨˜æ†¶é«”è£¡åœ–åƒå¤ªå¤š </floater.string> <floater.string name="client_complex_objects_cause_msg"> - Possible cause: Too many complex objects in scene + å¯èƒ½åŽŸå› ï¼šå ´æ™¯å…§è¤‡é›œç‰©ä»¶å¤ªå¤š </floater.string> <floater.string name="network_text_msg"> 網路 @@ -55,10 +55,10 @@ 5 </floater.string> <floater.string name="network_packet_loss_critical_msg"> - Connection is dropping over [NETWORK_PACKET_LOSS_CRITICAL]% of packets + 這次連通丟失了至少 [NETWORK_PACKET_LOSS_CRITICAL]% çš„å°åŒ… </floater.string> <floater.string name="network_packet_loss_warning_msg"> - Connection is dropping [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% of packets + 這次連通丟失了 [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% çš„å°åŒ… </floater.string> <floater.string name="network_performance_normal_msg"> æ£å¸¸ @@ -70,16 +70,16 @@ 300 </floater.string> <floater.string name="network_ping_critical_msg"> - Connection ping time is over [NETWORK_PING_CRITICAL] ms + æŽ¢æ¸¬é€£é€šå›žæ‡‰æ™‚é–“è¶…éŽ [NETWORK_PING_CRITICAL] 毫秒 </floater.string> <floater.string name="network_ping_warning_msg"> - Connection ping time is [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms + 探測連通回應時間為 [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] 毫秒 </floater.string> <floater.string name="network_packet_loss_cause_msg"> - Possible bad connection or 'Bandwidth' pref too high. + å¯èƒ½é€£é€šä¸è‰¯ï¼Œæˆ–所è¨çš„åå¥½é€£é€šé »å¯¬éŽé«˜ã€‚ </floater.string> <floater.string name="network_ping_cause_msg"> - Possible bad connection or file-sharing app. + å¯èƒ½é€£é€šä¸è‰¯ï¼Œæˆ–使用檔案分享應用程å¼ã€‚ </floater.string> <floater.string name="server_text_msg"> 伺æœå™¨ diff --git a/indra/newview/skins/default/xui/zh/floater_land_holdings.xml b/indra/newview/skins/default/xui/zh/floater_land_holdings.xml index 1d172f63e1..aae2cfb466 100644 --- a/indra/newview/skins/default/xui/zh/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/zh/floater_land_holdings.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="land holdings floater" title="我的土地"> <floater.string name="area_string"> - [AREA] m² + [AREA] 平方公尺 </floater.string> <scroll_list name="parcel list"> <scroll_list.columns label="地段" name="name"/> @@ -12,28 +12,28 @@ <button label="瞬間傳é€" label_selected="瞬間傳é€" name="Teleport" tool_tip="瞬間傳é€åˆ°é€™åœŸåœ°çš„ä¸å¤®ã€‚"/> <button label="地圖" label_selected="地圖" name="Show on Map" tool_tip="將這塊土地顯示在世界地圖上。"/> <text name="contrib_label"> - Contributions to your groups: + å°ä½ 的群組的貢ç»ï¼š </text> <scroll_list name="grant list"> <scroll_list.columns label="群組" name="group"/> <scroll_list.columns label="å€åŸŸ" name="area"/> </scroll_list> <text name="allowed_label"> - Allowed land holdings at current payment plan: + ç›®å‰ä»˜è²»è¨ˆåŠƒæ‰€å…è¨±æ“æœ‰çš„土地: </text> <text name="allowed_text"> - [AREA] m² + [AREA] 平方公尺 </text> <text name="current_label"> - Current land holdings: + ç›®å‰æ“有的土地: </text> <text name="current_text"> - [AREA] m² + [AREA] 平方公尺 </text> <text name="available_label"> - Available for land purchases: + å¯è³¼åœŸåœ°ï¼š </text> <text name="available_text"> - [AREA] m² + [AREA] 平方公尺 </text> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/zh/floater_live_lsleditor.xml index fe61c312ed..f4a7ba5cca 100644 --- a/indra/newview/skins/default/xui/zh/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/zh/floater_live_lsleditor.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="script ed float" title="腳本: 新腳本"> <floater.string name="not_allowed"> - You can not view or edit this script, since it has been set as "no copy". You need full permissions to view or edit a script inside an object. + ä½ ç„¡æ³•å¯Ÿçœ‹æˆ–ç·¨è¼¯é€™è…³æœ¬ï¼Œå®ƒè¢«è¨ç‚ºã€Œç¦æ¢è¤‡è£½ã€ã€‚ ä½ éœ€è¦å®Œæ•´æ¬Šé™åŽ»å¯Ÿçœ‹æˆ–ç·¨è¼¯ç‰©ä»¶å…§çš„è…³æœ¬ã€‚ </floater.string> <floater.string name="script_running"> åŸ·è¡Œä¸ diff --git a/indra/newview/skins/default/xui/zh/floater_lsl_guide.xml b/indra/newview/skins/default/xui/zh/floater_lsl_guide.xml index e5c3c47827..b10a480b06 100644 --- a/indra/newview/skins/default/xui/zh/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/zh/floater_lsl_guide.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="script ed float" title="LSL REFERENCE"> - <check_box label="Follow cursor" name="lock_check"/> - <combo_box label="Lock" name="history_combo"/> - <button label="Back" name="back_btn"/> - <button label="Forward" name="fwd_btn"/> +<floater name="script ed float" title="LSL åƒè€ƒ"> + <check_box label="跟隨游標" name="lock_check"/> + <combo_box label="鎖定" name="history_combo"/> + <button label="返回" name="back_btn"/> + <button label="å‘å‰" name="fwd_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_map.xml b/indra/newview/skins/default/xui/zh/floater_map.xml index b535ef0074..8a030b3b3f 100644 --- a/indra/newview/skins/default/xui/zh/floater_map.xml +++ b/indra/newview/skins/default/xui/zh/floater_map.xml @@ -1,36 +1,36 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Map" title=""> +<floater name="Map" title="è¿·ä½ åœ°åœ–"> <floater.string name="ToolTipMsg"> - [REGION](Double-click to open Map, shift-drag to pan) + [REGION](雙擊以開啟地圖,按下 shift 鵿‹–曳來平移) </floater.string> <floater.string name="AltToolTipMsg"> - [REGION](Double-click to teleport, shift-drag to pan) + [REGION](雙擊以瞬間傳é€ï¼ŒæŒ‰ä¸‹ shift 鵿‹–曳來平移) </floater.string> <floater.string name="mini_map_caption"> - MINIMAP + è¿·ä½ åœ°åœ– </floater.string> - <text label="N" name="floater_map_north"> - N + <text label="北" name="floater_map_north"> + 北 </text> <text label="E" name="floater_map_east"> E </text> - <text label="W" name="floater_map_west"> - W + <text label="西" name="floater_map_west"> + 西 </text> - <text label="S" name="floater_map_south"> - S + <text label="å—" name="floater_map_south"> + å— </text> - <text label="SE" name="floater_map_southeast"> - SE + <text label="æ±å—" name="floater_map_southeast"> + æ±å— </text> - <text label="NE" name="floater_map_northeast"> - NE + <text label="æ±åŒ—" name="floater_map_northeast"> + æ±åŒ— </text> - <text label="SW" name="floater_map_southwest"> - SW + <text label="西å—" name="floater_map_southwest"> + è¥¿å— </text> - <text label="NW" name="floater_map_northwest"> - NW + <text label="西北" name="floater_map_northwest"> + 西北 </text> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_media_browser.xml b/indra/newview/skins/default/xui/zh/floater_media_browser.xml index 6e75016fad..7f030924e1 100644 --- a/indra/newview/skins/default/xui/zh/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/zh/floater_media_browser.xml @@ -8,13 +8,13 @@ </floater.string> <layout_stack name="stack1"> <layout_panel name="nav_controls"> - <button label="å‘後" name="back"/> + <button label="返回" name="back"/> <button label="å‘å‰" name="forward"/> - <button label="é‡è¼‰" name="reload"/> - <button label="Go" name="go"/> + <button label="釿–°è¼‰å…¥" name="reload"/> + <button label="å‰å¾€" name="go"/> </layout_panel> <layout_panel name="time_controls"> - <button label="rewind" name="rewind"/> + <button label="倒轉" name="rewind"/> <button label="åœæ¢" name="stop"/> <button label="å‘å‰" name="seek"/> </layout_panel> @@ -22,8 +22,8 @@ <button label="é€å‡ºç›®å‰é é¢åˆ°åœ°æ®µ" name="assign"/> </layout_panel> <layout_panel name="external_controls"> - <button label="在我的網é ç€è¦½å™¨ä¸é–‹å•Ÿ" name="open_browser"/> - <check_box label="總是在我的網é ç€è¦½å™¨ä¸é–‹å•Ÿ" name="open_always"/> + <button label="用我的ç€è¦½å™¨é–‹å•Ÿ" name="open_browser"/> + <check_box label="固定用我的ç€è¦½å™¨é–‹å•Ÿ" name="open_always"/> <button label="關閉" name="close"/> </layout_panel> </layout_stack> diff --git a/indra/newview/skins/default/xui/zh/floater_media_settings.xml b/indra/newview/skins/default/xui/zh/floater_media_settings.xml index f42c0af3d9..3984095a65 100644 --- a/indra/newview/skins/default/xui/zh/floater_media_settings.xml +++ b/indra/newview/skins/default/xui/zh/floater_media_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="media_settings" title="MEDIA SETTINGS"> +<floater name="media_settings" title="媒體è¨å®š"> <button label="確定" label_selected="確定" name="OK"/> <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="Cancel"/> <button label="套用" label_selected="套用" name="Apply"/> diff --git a/indra/newview/skins/default/xui/zh/floater_mem_leaking.xml b/indra/newview/skins/default/xui/zh/floater_mem_leaking.xml index 93c1b58df6..350254e385 100644 --- a/indra/newview/skins/default/xui/zh/floater_mem_leaking.xml +++ b/indra/newview/skins/default/xui/zh/floater_mem_leaking.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="MemLeak" title="SIMULATE A MEMORY LEAK"> - <spinner label="Leaking Speed (bytes per frame):" name="leak_speed"/> - <spinner label="Max Leaked Memory (MB):" name="max_leak"/> +<floater name="MemLeak" title="模擬記憶體æ¼è€—"> + <spinner label="æ¼è€—速度(ä½å…ƒçµ„/幀):" name="leak_speed"/> + <spinner label="最大記憶體æ¼è€—(MB):" name="max_leak"/> <text name="total_leaked_label"> - Current leaked memory: [SIZE] KB + ç›®å‰å·²æ¼è€—記憶體:[SIZE] KB </text> <text name="note_label_1"> [NOTE1] @@ -11,8 +11,8 @@ <text name="note_label_2"> [NOTE2] </text> - <button label="Start" name="start_btn"/> + <button label="é–‹å§‹" name="start_btn"/> <button label="åœæ¢" name="stop_btn"/> - <button label="Release" name="release_btn"/> + <button label="釋放" name="release_btn"/> <button label="關閉" name="close_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/zh/floater_merchant_outbox.xml new file mode 100644 index 0000000000..6b6126c8e0 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_merchant_outbox.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_merchant_outbox" title="商家發件匣"> + <string name="OutboxFolderCount1"> + 1 個資料夾 + </string> + <string name="OutboxFolderCountN"> + [NUM] 個資料夾 + </string> + <string name="OutboxImporting"> + æ£åœ¨å‚³é€è³‡æ–™å¤¾â€¦ + </string> + <string name="OutboxInitializing"> + æ£åœ¨åˆå§‹åŒ–… + </string> + <panel label=""> + <panel> + <panel name="outbox_inventory_placeholder_panel"> + <text name="outbox_inventory_placeholder_title"> + 載入ä¸... + </text> + </panel> + </panel> + <panel> + <button label="é€å¾€ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚集" name="outbox_import_btn" tool_tip="推到我第二人生購物市集的店é¢"/> + </panel> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_model_preview.xml b/indra/newview/skins/default/xui/zh/floater_model_preview.xml new file mode 100644 index 0000000000..22b3d3b065 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_model_preview.xml @@ -0,0 +1,312 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Model Preview" title="上傳模型"> + <string name="status_idle"/> + <string name="status_parse_error"> + éŒ¯èª¤ï¼šå‰–æž dae 時出錯,詳見記錄檔。 + </string> + <string name="status_material_mismatch"> + éŒ¯èª¤ï¼šæ¨¡åž‹ææ–™ä¸¦éžåƒè€ƒæ¨¡åž‹çš„å集åˆã€‚ + </string> + <string name="status_reading_file"> + 載入ä¸... + </string> + <string name="status_generating_meshes"> + æ£åœ¨ç”Ÿæˆç¶²é¢â€¦ + </string> + <string name="status_vertex_number_overflow"> + éŒ¯èª¤ï¼šé ‚é»žæ•¸ç›®è¶…éŽ 65534,程åºå·²ä¸æ¢ï¼ + </string> + <string name="bad_element"> + 錯誤:無效的元件 + </string> + <string name="high"> + 高 + </string> + <string name="medium"> + ä¸ + </string> + <string name="low"> + 低 + </string> + <string name="lowest"> + 最低 + </string> + <string name="mesh_status_good"> + ç¢ºå®šç”¢ç”Ÿï¼ + </string> + <string name="mesh_status_na"> + ä¸é©ç”¨ + </string> + <string name="mesh_status_none"> + ç„¡ + </string> + <string name="mesh_status_submesh_mismatch"> + 細節層次裡,å¯ä½¿ç”¨æè³ªçš„臉部數目ä¸åŒã€‚ + </string> + <string name="mesh_status_mesh_mismatch"> + 細節層次裡,網é¢å¯¦ä¾‹çš„æ•¸ç›®ä¸åŒã€‚ + </string> + <string name="mesh_status_too_many_vertices"> + ç´°ç¯€å±¤æ¬¡è£¡ï¼Œé ‚é»žæ•¸ç›®å¤ªå¤šã€‚ + </string> + <string name="mesh_status_missing_lod"> + 缺ä¹éœ€è¦çš„細節層次。 + </string> + <string name="mesh_status_invalid_material_list"> + ç´°ç¯€å±¤æ¬¡ææ–™ä¸¦éžåƒè€ƒæ¨¡åž‹çš„å集åˆã€‚ + </string> + <string name="layer_all"> + 全部 + </string> + <string name="decomposing"> + 分æžä¸â€¦ + </string> + <string name="simplifying"> + 簡化ä¸â€¦ + </string> + <string name="tbd"> + (未定) + </string> + <panel name="left_panel"> + <panel name="model_name_representation_panel"> + <text name="name_label"> + 模型å稱: + </text> + <text name="model_category_label"> + 這模型代表… + </text> + <combo_box name="model_category_combo"> + <combo_item label="鏿“‡ä¸€é ……" name="Choose one"/> + <combo_item label="化身形狀" name="Avatar shape"/> + <combo_item label="化身附件" name="Avatar attachment"/> + <combo_item label="會移動的物件(車輛ã€å‹•物)" name="Moving object (vehicle, animal)"/> + <combo_item label="建製元件" name="Building Component"/> + <combo_item label="大型ã€ä¸æœƒç§»å‹•ç‰é¡žåž‹" name="Large, non moving etc"/> + <combo_item label="較å°åž‹ã€ä¸æœƒç§»å‹•ç‰é¡žåž‹" name="Smaller, non-moving etc"/> + <combo_item label="並éžå…¶ä¸ä»»ä½•一個" name="Not really any of these"/> + </combo_box> + </panel> + <tab_container name="import_tab"> + <panel label="細節層次" name="lod_panel" title="細節層次"> + <text initial_value="來æº" name="source" value="來æº"/> + <text initial_value="三角形" name="triangles" value="三角形"/> + <text initial_value="é ‚é»ž" name="vertices" value="é ‚é»ž"/> + <text initial_value="高" name="high_label" value="高"/> + <combo_box name="lod_source_high"> + <item name="Load from file" value="從檔案載入"/> + <item name="Generate" value="產生"/> + </combo_box> + <button label="ç€è¦½â€¦" name="lod_browse_high"/> + <combo_box name="lod_mode_high"> + <item name="Triangle Limit" value="三角形上é™"/> + <item name="Error Threshold" value="錯誤門檻"/> + </combo_box> + <text initial_value="0" name="high_triangles" value="0"/> + <text initial_value="0" name="high_vertices" value="0"/> + <text initial_value="ä¸" name="medium_label" value="ä¸"/> + <combo_box name="lod_source_medium"> + <item name="Load from file" value="從檔案載入"/> + <item name="Generate" value="產生"/> + <item name="Use LoD above" value="以上使用低階細節"/> + </combo_box> + <button label="ç€è¦½â€¦" name="lod_browse_medium"/> + <combo_box name="lod_mode_medium"> + <item name="Triangle Limit" value="三角形上é™"/> + <item name="Error Threshold" value="錯誤門檻"/> + </combo_box> + <text initial_value="0" name="medium_triangles" value="0"/> + <text initial_value="0" name="medium_vertices" value="0"/> + <text initial_value="低" name="low_label" value="低"/> + <combo_box name="lod_source_low"> + <item name="Load from file" value="從檔案載入"/> + <item name="Generate" value="產生"/> + <item name="Use LoD above" value="以上使用低階細節"/> + </combo_box> + <button label="ç€è¦½â€¦" name="lod_browse_low"/> + <combo_box name="lod_mode_low"> + <item name="Triangle Limit" value="三角形上é™"/> + <item name="Error Threshold" value="錯誤門檻"/> + </combo_box> + <text initial_value="0" name="low_triangles" value="0"/> + <text initial_value="0" name="low_vertices" value="0"/> + <text initial_value="最低" name="lowest_label" value="最低"/> + <combo_box name="lod_source_lowest"> + <item name="Load from file" value="從檔案載入"/> + <item name="Generate" value="產生"/> + <item name="Use LoD above" value="以上使用低階細節"/> + </combo_box> + <button label="ç€è¦½â€¦" name="lod_browse_lowest"/> + <combo_box name="lod_mode_lowest"> + <item name="Triangle Limit" value="三角形上é™"/> + <item name="Error Threshold" value="錯誤門檻"/> + </combo_box> + <text initial_value="0" name="lowest_triangles" value="0"/> + <text initial_value="0" name="lowest_vertices" value="0"/> + <check_box label="產生法線" name="gen_normals"/> + <text initial_value="皺褶角度:" name="crease_label" value="皺褶角度:"/> + <spinner name="crease_angle" value="75"/> + </panel> + <panel label="物ç†" name="physics_panel"> + <panel name="physics geometry"> + <text name="first_step_name"> + æ¥é©Ÿ 1:細節層次 + </text> + <combo_box name="physics_lod_combo" tool_tip="物ç†å½¢ç‹€æ‰€æŽ¡ç”¨çš„細節層次"> + <combo_item name="choose_one"> + 鏿“‡ä¸€é …… + </combo_item> + <combo_item name="physics_high"> + 高 + </combo_item> + <combo_item name="physics_medium"> + ä¸ + </combo_item> + <combo_item name="physics_low"> + 低 + </combo_item> + <combo_item name="physics_lowest"> + 最低 + </combo_item> + <combo_item name="load_from_file"> + 來自檔案 + </combo_item> + </combo_box> + <button label="ç€è¦½â€¦" name="physics_browse"/> + </panel> + <panel name="physics analysis"> + <text name="method_label"> + æ¥é©Ÿ 2ï¼šåˆ†æž + </text> + <text name="analysis_method_label"> + 方法: + </text> + <text name="quality_label"> + å“質: + </text> + <text name="smooth_method_label"> + 平滑: + </text> + <check_box label="關閉洞å£" name="Close Holes (Slow)"/> + <button label="分æž" name="Decompose"/> + <button label="å–æ¶ˆ" name="decompose_cancel"/> + </panel> + <panel name="physics simplification"> + <text name="second_step_label"> + æ¥é©Ÿ 3:簡化 + </text> + <text name="simp_method_header"> + 方法: + </text> + <text name="pass_method_header"> + 階段數: + </text> + <text name="Detail Scale label"> + 細節比例: + </text> + <text name="Retain%_label"> + ä¿ç•™ï¼š + </text> + <combo_box name="Combine Quality" value="1"/> + <button label="簡化" name="Simplify"/> + <button label="å–æ¶ˆ" name="simplify_cancel"/> + </panel> + <panel name="physics info"> + <text name="results_text"> + çµæžœï¼š + </text> + <text name="physics_triangles"> + 三角形:[TRIANGLES], + </text> + <text name="physics_points"> + é ‚é»žï¼š[POINTS], + </text> + <text name="physics_hulls"> + 殼é¢ï¼š[HULLS] + </text> + </panel> + </panel> + <panel label="上傳é¸é …" name="modifiers_panel"> + <text name="scale_label"> + 比例(1 = 原比例): + </text> + <spinner name="import_scale" value="1.0"/> + <text name="dimensions_label"> + è¦æ ¼ï¼š + </text> + <text name="import_dimensions"> + [X] X [Y] X [Z] + </text> + <check_box label="åŒ…å«æè³ª" name="upload_textures"/> + <text name="include_label"> + 僅é™åŒ–身模型: + </text> + <check_box label="包å«è¡¨çš®é‡é‡" name="upload_skin"/> + <check_box label="åŒ…å«æŽ¥é»žä½ç½®" name="upload_joints"/> + <text name="pelvis_offset_label"> + Z åè·ï¼ˆå‡é«˜æˆ–é™ä½ŽåŒ–身): + </text> + <spinner name="pelvis_offset" value="0.0"/> + </panel> + </tab_container> + <panel name="weights_and_warning_panel"> + <button label="計算é‡é‡å’Œè²»ç”¨" name="calculate_btn" tool_tip="計算é‡é‡å’Œè²»ç”¨"/> + <button label="å–æ¶ˆ" name="cancel_btn"/> + <button label="上傳" name="ok_btn" tool_tip="上傳至模擬器"/> + <button label="清除è¨å®šä¸¦é‡è¨å½¢å¼" name="reset_btn"/> + <text name="upload_fee"> + 上傳費用:L$ [FEE] + </text> + <text name="prim_weight"> + åœŸåœ°è¡æ“Šé‡ï¼š[EQ] + </text> + <text name="download_weight"> + 下載:[ST] + </text> + <text name="physics_weight"> + 物ç†ï¼š[PH] + </text> + <text name="server_weight"> + 伺æœå™¨ï¼š[SIM] + </text> + <text name="warning_title"> + 附註: + </text> + <text name="warning_message"> + ä½ ç„¡æ¬Šä¸Šå‚³ç¶²é¢æ¨¡åž‹ã€‚ [[VURL] çžè§£å¦‚何]通éŽèªè‰ã€‚ + </text> + <text name="status"> + [STATUS] + </text> + </panel> + </panel> + <text name="lod_label"> + é 覽: + </text> + <panel name="right_panel"> + <combo_box name="preview_lod_combo" tool_tip="è¦åœ¨å‘ˆåƒé 覽ä¸å¯Ÿçœ‹çš„細節層次"> + <combo_item name="high"> + 高 + </combo_item> + <combo_item name="medium"> + ä¸ + </combo_item> + <combo_item name="low"> + 低 + </combo_item> + <combo_item name="lowest"> + 最低 + </combo_item> + </combo_box> + <text name="label_display"> + 顯示… + </text> + <check_box label="邊" name="show_edges"/> + <check_box label="物ç†" name="show_physics"/> + <check_box label="æè³ª" name="show_textures"/> + <check_box label="表皮é‡é‡" name="show_skin_weight"/> + <check_box label="接點" name="show_joint_positions"/> + <text name="physics_explode_label"> + é 覽伸展: + </text> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_moveview.xml b/indra/newview/skins/default/xui/zh/floater_moveview.xml index e1155bdf34..0b267e8fae 100644 --- a/indra/newview/skins/default/xui/zh/floater_moveview.xml +++ b/indra/newview/skins/default/xui/zh/floater_moveview.xml @@ -1,28 +1,28 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="move_floater"> +<floater name="move_floater" title="行走 / è·‘æ¥ / 飛行"> <string name="walk_forward_tooltip"> - Walk Forward (press Up Arrow or W) + å‘å‰èµ°ï¼ˆæŒ‰ä¸‹å‘上ç®é 或 W éµï¼‰ </string> <string name="walk_back_tooltip"> - Walk Backwards (press Down Arrow or S) + 倒退行走(按下å‘下ç®é 或 S éµï¼‰ </string> <string name="walk_left_tooltip"> - Walk left (press Shift + Left Arrow or A) + å‘左走(按下 Shift åŠ å·¦æ–¹å‘鵿ˆ–按 A éµï¼‰ </string> <string name="walk_right_tooltip"> - Walk right (press Shift + Right Arrow or D) + å‘å³èµ°ï¼ˆæŒ‰ä¸‹ Shift åŠ å³æ–¹å‘鵿ˆ–按 D éµï¼‰ </string> <string name="run_forward_tooltip"> - Run Forward (press Up Arrow or W) + å‘å‰è·‘(按下å‘上ç®é 或 W éµï¼‰ </string> <string name="run_back_tooltip"> - Run Backwards (press Down Arrow or S) + 倒退跑æ¥ï¼ˆæŒ‰ä¸‹å‘下ç®é 或 S éµï¼‰ </string> <string name="run_left_tooltip"> - Run left (press Shift + Left Arrow or A) + å‘左跑(按下 Shift + 左方å‘鵿ˆ–按 A éµï¼‰ </string> <string name="run_right_tooltip"> - Run right (press Shift + Right Arrow or D) + å‘å³è·‘(按下 Shift + 峿–¹å‘鵿ˆ–按 D éµï¼‰ </string> <string name="fly_forward_tooltip"> å‘å‰é£›ï¼ˆæŒ‰ä¸‹å‘上ç®é 或 W éµï¼‰ @@ -65,7 +65,7 @@ <joystick_turn name="forward btn" tool_tip="å‘å‰èµ°ï¼ˆæŒ‰å‘上方å‘鵿ˆ–按 W éµï¼‰"/> <joystick_turn name="backward btn" tool_tip="å‘後退(按å‘下方å‘鵿ˆ–按 S éµï¼‰"/> <button name="move up btn" tool_tip="å‘上飛(按下 E éµï¼‰"/> - <button name="move down btn" tool_tip="å‘下飛(按下 C 建)"/> + <button name="move down btn" tool_tip="å‘下飛(按下 C éµï¼‰"/> </panel> <panel name="panel_modes"> <button label="" name="mode_walk_btn" tool_tip="行走模å¼"/> diff --git a/indra/newview/skins/default/xui/zh/floater_mute_object.xml b/indra/newview/skins/default/xui/zh/floater_mute_object.xml index 606e061395..64998d3e28 100644 --- a/indra/newview/skins/default/xui/zh/floater_mute_object.xml +++ b/indra/newview/skins/default/xui/zh/floater_mute_object.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="block by name" title="ä¾å稱å°éŽ–ç‰©ä»¶"> <text name="message"> - Block an object: + å°éŽ–ä¸€å€‹ç‰©ä»¶ï¼š </text> <line_editor name="object_name"> 物件å稱 </line_editor> <text name="note"> - * Only blocks object text, not sounds + * åªå°éŽ–ç‰©ä»¶æ–‡å—,ä¸å°éŽ–è²éŸ³ </text> <button label="確定" name="OK"/> <button label="å–æ¶ˆ" name="Cancel"/> diff --git a/indra/newview/skins/default/xui/zh/floater_my_appearance.xml b/indra/newview/skins/default/xui/zh/floater_my_appearance.xml new file mode 100644 index 0000000000..217ea5d1f9 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_my_appearance.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_my_appearance" title="外觀"> + <panel label="編輯外觀" name="main_panel"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_my_inventory.xml b/indra/newview/skins/default/xui/zh/floater_my_inventory.xml new file mode 100644 index 0000000000..187597f4eb --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_my_inventory.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_my_inventory" title="æ”¶ç´å€"/> diff --git a/indra/newview/skins/default/xui/zh/floater_nearby_chat.xml b/indra/newview/skins/default/xui/zh/floater_nearby_chat.xml deleted file mode 100644 index 38a5dab523..0000000000 --- a/indra/newview/skins/default/xui/zh/floater_nearby_chat.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="nearby_chat" title="附近的èŠå¤©"> - <check_box label="Translate chat" name="translate_chat_checkbox"/> -</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_object_weights.xml b/indra/newview/skins/default/xui/zh/floater_object_weights.xml new file mode 100644 index 0000000000..d2875b24b4 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_object_weights.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="object_weights" title="進階"> + <floater.string name="nothing_selected" value="--"/> + <text name="selected_text" value="å·²é¸"/> + <text name="objects" value="--"/> + <text name="objects_label" value="物件"/> + <text name="prims" value="--"/> + <text name="prims_label" value="幾何元件"/> + <text name="weights_of_selected_text" value="所é¸ç‰©é‡é‡"/> + <text name="download" value="--"/> + <text name="download_label" value="下載"/> + <text name="physics" value="--"/> + <text name="physics_label" value="物ç†"/> + <text name="server" value="--"/> + <text name="server_label" value="伺æœå™¨"/> + <text name="display" value="--"/> + <text name="display_label" value="顯示"/> + <text name="land_impacts_text" value="åœŸåœ°è¡æ“Šé‡"/> + <text name="selected" value="--"/> + <text name="selected_label" value="鏿“‡"/> + <text name="rezzed_on_land" value="--"/> + <text name="rezzed_on_land_label" value="已產生到土地上"/> + <text name="remaining_capacity" value="--"/> + <text name="remaining_capacity_label" value="剩餘容ç´é‡"/> + <text name="total_capacity" value="--"/> + <text name="total_capacity_label" value="總容ç´é‡"/> + <text name="help_SLURL" value="[secondlife:///app/help/object_weights 這是什麼?]"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_openobject.xml b/indra/newview/skins/default/xui/zh/floater_openobject.xml index 61ac3cb1fc..ce6869487a 100644 --- a/indra/newview/skins/default/xui/zh/floater_openobject.xml +++ b/indra/newview/skins/default/xui/zh/floater_openobject.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="objectcontents" title="物件內容"> <text name="object_name"> - [DESC]: + [DESC]: </text> <button label="覆製到收ç´å€" label_selected="覆製到收ç´å€" name="copy_to_inventory_button"/> <button label="覆製且穿上" label_selected="覆製且穿上" name="copy_and_wear_button"/> diff --git a/indra/newview/skins/default/xui/zh/floater_outfit_save_as.xml b/indra/newview/skins/default/xui/zh/floater_outfit_save_as.xml index a557e1c2e3..9e786edcdd 100644 --- a/indra/newview/skins/default/xui/zh/floater_outfit_save_as.xml +++ b/indra/newview/skins/default/xui/zh/floater_outfit_save_as.xml @@ -3,9 +3,9 @@ <button label="儲å˜" label_selected="儲å˜" name="Save"/> <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="Cancel"/> <text name="Save item as:"> - å„²å˜æˆ‘æ£åœ¨ç©¿çš„ç‚ºæ–°è£æ‰®ï¼š + å„²å˜æˆ‘ç¾åœ¨çš„ç©¿è‘—ç‚ºæ–°è£æ‰®ï¼š </text> <line_editor name="name ed"> - [DESC] (新) + [DESC](新) </line_editor> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_outgoing_call.xml b/indra/newview/skins/default/xui/zh/floater_outgoing_call.xml index 63da47f4de..e57374f4d7 100644 --- a/indra/newview/skins/default/xui/zh/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/zh/floater_outgoing_call.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="outgoing call" title="CALLING"> +<floater name="outgoing call" title="打電話"> <floater.string name="lifetime"> 5 </floater.string> @@ -10,31 +10,31 @@ 匿å </floater.string> <floater.string name="VoiceInviteP2P"> - 通話ä¸ã€‚ + 來電ä¸ã€‚ </floater.string> <floater.string name="VoiceInviteAdHoc"> - has joined a Voice Chat call with a conference chat. + å·²åŠ å…¥å¤šæ–¹èªžéŸ³é€šè©±ã€‚ </floater.string> <text name="connecting"> - Connecting to [CALLEE_NAME] + æ£åœ¨é€£é€š [CALLEE_NAME] </text> <text name="calling"> - Calling [CALLEE_NAME] + æ£åœ¨æ‰“給 [CALLEE_NAME] </text> <text name="noanswer"> - 無應ç”,請ç¨å€™å†è©¦ã€‚ + 無人接è½ã€‚ è«‹ç¨å€™å†è©¦ä¸€æ¬¡ã€‚ </text> <text name="nearby"> - You have been disconnected from [VOICE_CHANNEL_NAME]. [RECONNECT_NEARBY] + ä½ çš„ [VOICE_CHANNEL_NAME] é€šè©±å·²ç¶“ä¸æ–·ã€‚ [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_other"> - Your call has ended. [RECONNECT_NEARBY] + ä½ çš„é€šè©±å·²ç¶“çµæŸã€‚ [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_agent"> - You have ended the call. [RECONNECT_NEARBY] + ä½ å·²ç¶“çµæŸé€šè©±ã€‚ [RECONNECT_NEARBY] </text> <text name="leaving"> - Leaving [CURRENT_CHAT]. + 離開 [CURRENT_CHAT]。 </text> <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="Cancel"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/zh/floater_pathfinding_characters.xml new file mode 100644 index 0000000000..e6971d111f --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_pathfinding_characters.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_characters" title="尋徑角色"> + <floater.string name="messaging_get_inprogress"> + 尋徑角色查詢ä¸â€¦ + </floater.string> + <floater.string name="messaging_get_error"> + 查詢尋徑角色時出錯。 + </floater.string> + <floater.string name="messaging_complete_none_found"> + 沒有尋徑角色。 + </floater.string> + <floater.string name="messaging_complete_available"> + 從 [NUM_TOTAL] 個角色ä¸é¸å–了 [NUM_SELECTED] 個。 + </floater.string> + <floater.string name="messaging_not_enabled"> + 這地å€ä¸¦æœªå•Ÿç”¨å°‹å¾‘。 + </floater.string> + <floater.string name="character_cpu_time"> + [CPU_TIME] 微秒 + </floater.string> + <floater.string name="character_owner_loading"> + [Loading] + </floater.string> + <floater.string name="character_owner_unknown"> + [Unknown] + </floater.string> + <floater.string name="character_owner_group"> + [group] + </floater.string> + <panel> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="å稱" name="name"/> + <scroll_list.columns label="æè¿°" name="description"/> + <scroll_list.columns label="所有人" name="owner"/> + <scroll_list.columns label="ä¸å¤®è™•ç†å™¨" name="cpu_time"/> + <scroll_list.columns label="高度" name="altitude"/> + </scroll_list> + <text name="messaging_status"> + 角色: + </text> + <button label="刷新清單" name="refresh_objects_list"/> + <button label="å…¨é¸" name="select_all_objects"/> + <button label="全都ä¸é¸" name="select_none_objects"/> + </panel> + <panel> + <text name="actions_label"> + 所é¸è§’色所採動作: + </text> + <check_box label="顯示指標" name="show_beacon"/> + <check_box label="顯示物ç†å›Š" name="show_physics_capsule"/> + <button label="å–å¾—" name="take_objects"/> + <button label="æ‹¿å–副本" name="take_copy_objects"/> + <button label="çž¬é–“å‚³é€æˆ‘到那裡" name="teleport_me_to_object" tool_tip="åªåœ¨é¸å–了一個角色時啟用。"/> + <button label="退回" name="return_objects"/> + <button label="刪除" name="delete_objects"/> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/zh/floater_pathfinding_console.xml new file mode 100644 index 0000000000..be009b54d8 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_pathfinding_console.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_console" title="尋徑察看 / 測試"> + <floater.string name="navmesh_viewer_status_library_not_implemented"> + 找ä¸åˆ°å°‹å¾‘函å¼åº«å¯¦ä½œã€‚ + </floater.string> + <floater.string name="navmesh_viewer_status_region_not_enabled"> + 這地å€ä¸¦æœªå•Ÿç”¨å°‹å¾‘。 + </floater.string> + <floater.string name="navmesh_viewer_status_region_loading"> + ç‰å¾…地å€å®Œæˆè¼‰å…¥ã€‚ + </floater.string> + <floater.string name="navmesh_viewer_status_checking_version"> + æ£åœ¨æª¢æŸ¥å°Žèˆªç¶²é¢ç‹€æ…‹ã€‚ + </floater.string> + <floater.string name="navmesh_viewer_status_downloading"> + æ£åœ¨ä¸‹è¼‰å°Žèˆªç¶²é¢ã€‚ + </floater.string> + <floater.string name="navmesh_viewer_status_updating"> + 伺æœå™¨ä¸Šçš„導航網é¢å·²è®Šæ›´ã€‚ æ£åœ¨ä¸‹è¼‰æœ€æ–°çš„導航網é¢ã€‚ + </floater.string> + <floater.string name="navmesh_viewer_status_has_navmesh"> + 最新的導航網é¢ä¸‹è¼‰å®Œæˆã€‚ + </floater.string> + <floater.string name="navmesh_viewer_status_error"> + 無法完æˆå°Žèˆªç¶²é¢ä¸‹è¼‰ã€‚ + </floater.string> + <floater.string name="navmesh_simulator_status_pending"> + å°Žèˆªç¶²é¢æœ‰è®Šæ›´å¾…å˜ã€‚ + </floater.string> + <floater.string name="navmesh_simulator_status_building"> + æ£åœ¨å»ºæ§‹å°Žèˆªç¶²é¢ã€‚ + </floater.string> + <floater.string name="navmesh_simulator_status_some_pending"> + æŸäº›å°Žèˆªç¶²é¢åœ°å€æœ‰è®Šæ›´å¾…å˜ã€‚ + </floater.string> + <floater.string name="navmesh_simulator_status_some_building"> + æ£åœ¨å»ºæ§‹æŸäº›å°Žèˆªç¶²é¢åœ°å€ã€‚ + </floater.string> + <floater.string name="navmesh_simulator_status_pending_and_building"> + æŸäº›å°Žèˆªç¶²é¢åœ°å€æœ‰è®Šæ›´å¾…å˜ï¼Œå…¶ä»–çš„æ£åœ¨å»ºæ§‹ä¸ã€‚ + </floater.string> + <floater.string name="navmesh_simulator_status_complete"> + 導航網é¢å·²å…¨é¢æ›´æ–°ã€‚ + </floater.string> + <floater.string name="pathing_library_not_implemented"> + 找ä¸åˆ°å°‹å¾‘函å¼åº«å¯¦ä½œã€‚ + </floater.string> + <floater.string name="pathing_region_not_enabled"> + 這地å€ä¸¦æœªå•Ÿç”¨å°‹å¾‘。 + </floater.string> + <floater.string name="pathing_choose_start_and_end_points"> + è«‹é¸æ“‡èµ·é»žå’Œçµ‚點。 + </floater.string> + <floater.string name="pathing_choose_start_point"> + è«‹é¸æ“‡èµ·é»žã€‚ + </floater.string> + <floater.string name="pathing_choose_end_point"> + è«‹é¸æ“‡çµ‚點。 + </floater.string> + <floater.string name="pathing_path_valid"> + 路徑以橘色顯示。 + </floater.string> + <floater.string name="pathing_path_invalid"> + 在所é¸çš„點之間找ä¸åˆ°è·¯å¾‘。 + </floater.string> + <floater.string name="pathing_error"> + 產生路徑時出錯。 + </floater.string> + <tab_container name="view_test_tab_container"> + <panel label="視角" name="view_panel"> + <text name="show_label"> + 顯示: + </text> + <check_box label="世界" name="show_world"/> + <check_box label="僅é™å¯ç§»å‹•çš„" name="show_world_movables_only"/> + <check_box label="導航網é¢" name="show_navmesh"/> + <text name="show_walkability_label"> + 顯示å¯è¡Œèµ°åœ°åœ–: + </text> + <combo_box name="show_heatmap_mode"> + <combo_box.item label="ä¸é¡¯ç¤º" name="show_heatmap_mode_none"/> + <combo_box.item label="類型 A 角色" name="show_heatmap_mode_a"/> + <combo_box.item label="類型 B 角色" name="show_heatmap_mode_b"/> + <combo_box.item label="類型 C 角色" name="show_heatmap_mode_c"/> + <combo_box.item label="類型 D 角色" name="show_heatmap_mode_d"/> + </combo_box> + <check_box label="å¯è¡Œèµ°çš„" name="show_walkables"/> + <check_box label="實質體ç©" name="show_material_volumes"/> + <check_box label="éœæ…‹éšœç¤™" name="show_static_obstacles"/> + <check_box label="排除體ç©" name="show_exclusion_volumes"/> + <check_box label="æ°´å¹³é¢" name="show_water_plane"/> + <check_box label="å…· X å…‰é€è¦–力" name="show_xray"/> + </panel> + <panel label="測試路徑" name="test_panel"> + <text name="ctrl_click_label"> + æŒ‰ä½ Ctrl 並點按å³å¯é¸æ“‡èµ·é»žã€‚ + </text> + <text name="shift_click_label"> + æŒ‰ä½ Shift 並點按å³å¯é¸æ“‡çµ‚點。 + </text> + <text name="character_width_label"> + 角色寬度 + </text> + <slider name="character_width" value="1"/> + <text name="character_width_unit_label"> + 公尺 + </text> + <text name="character_type_label"> + 角色類型 + </text> + <combo_box name="path_character_type"> + <combo_box.item label="ç„¡" name="path_character_type_none"/> + <combo_box.item label="A" name="path_character_type_a"/> + <combo_box.item label="B" name="path_character_type_b"/> + <combo_box.item label="C" name="path_character_type_c"/> + <combo_box.item label="D" name="path_character_type_d"/> + </combo_box> + <button label="清除路徑" name="clear_path"/> + </panel> + </tab_container> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/zh/floater_pathfinding_linksets.xml new file mode 100644 index 0000000000..22e5d2e846 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_pathfinding_linksets.xml @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_pathfinding_linksets" title="尋徑è¯çµé›†"> + <floater.string name="messaging_get_inprogress"> + 尋徑è¯çµé›†æŸ¥è©¢ä¸â€¦ + </floater.string> + <floater.string name="messaging_get_error"> + 查詢尋徑è¯çµé›†æ™‚出錯。 + </floater.string> + <floater.string name="messaging_set_inprogress"> + æ£åœ¨ä¿®æ”¹æ‰€é¸å°‹å¾‘è¯çµé›†â€¦ + </floater.string> + <floater.string name="messaging_set_error"> + 修改所é¸å°‹å¾‘è¯çµé›†æ™‚出錯。 + </floater.string> + <floater.string name="messaging_complete_none_found"> + 沒有尋徑è¯çµé›†ã€‚ + </floater.string> + <floater.string name="messaging_complete_available"> + 從 [NUM_TOTAL] 個è¯çµé›†ä¸é¸å–了 [NUM_SELECTED] 個。 + </floater.string> + <floater.string name="messaging_not_enabled"> + 這地å€ä¸¦æœªå•Ÿç”¨å°‹å¾‘。 + </floater.string> + <floater.string name="linkset_terrain_name"> + [Terrain] + </floater.string> + <floater.string name="linkset_terrain_description"> + -- + </floater.string> + <floater.string name="linkset_terrain_owner"> + -- + </floater.string> + <floater.string name="linkset_terrain_scripted"> + -- + </floater.string> + <floater.string name="linkset_terrain_land_impact"> + -- + </floater.string> + <floater.string name="linkset_terrain_dist_from_you"> + -- + </floater.string> + <floater.string name="linkset_owner_loading"> + [Loading] + </floater.string> + <floater.string name="linkset_owner_unknown"> + [Unknown] + </floater.string> + <floater.string name="linkset_owner_group"> + [group] + </floater.string> + <floater.string name="linkset_is_scripted"> + 是 + </floater.string> + <floater.string name="linkset_is_not_scripted"> + å¦ + </floater.string> + <floater.string name="linkset_is_unknown_scripted"> + 未知 + </floater.string> + <floater.string name="linkset_use_walkable"> + å¯è¡Œèµ°çš„ + </floater.string> + <floater.string name="linkset_use_static_obstacle"> + éœæ…‹éšœç¤™ + </floater.string> + <floater.string name="linkset_use_dynamic_obstacle"> + å¯ç§»å‹•障礙 + </floater.string> + <floater.string name="linkset_use_material_volume"> + å¯¦è³ªé«”ç© + </floater.string> + <floater.string name="linkset_use_exclusion_volume"> + æŽ’é™¤é«”ç© + </floater.string> + <floater.string name="linkset_use_dynamic_phantom"> + å¯ç§»å‹•幻影 + </floater.string> + <floater.string name="linkset_is_terrain"> + [unmodifiable] + </floater.string> + <floater.string name="linkset_is_restricted_state"> + [restricted] + </floater.string> + <floater.string name="linkset_is_non_volume_state"> + [concave] + </floater.string> + <floater.string name="linkset_is_restricted_non_volume_state"> + [restricted,concave] + </floater.string> + <floater.string name="linkset_choose_use"> + 鏿“‡è¯çµé›†çš„使用… + </floater.string> + <panel> + <combo_box name="filter_by_linkset_use"> + <combo_box.item label="按è¯çµé›†çš„ä½¿ç”¨ä¾†éŽæ¿¾â€¦" name="filter_by_linkset_use_none"/> + <combo_box.item label="å¯è¡Œèµ°çš„" name="filter_by_linkset_use_walkable"/> + <combo_box.item label="éœæ…‹éšœç¤™" name="filter_by_linkset_use_static_obstacle"/> + <combo_box.item label="å¯ç§»å‹•障礙" name="filter_by_linkset_use_dynamic_obstacle"/> + <combo_box.item label="實質體ç©" name="filter_by_linkset_use_material_volume"/> + <combo_box.item label="排除體ç©" name="filter_by_linkset_use_exclusion_volume"/> + <combo_box.item label="å¯ç§»å‹•幻影" name="filter_by_linkset_use_dynamic_phantom"/> + </combo_box> + <button label="套用" name="apply_filters"/> + <button label="清除" name="clear_filters"/> + <scroll_list name="objects_scroll_list"> + <scroll_list.columns label="åç¨±ï¼ˆæ ¹å¹¾ä½•å…ƒä»¶ï¼‰" name="name"/> + <scroll_list.columns label="æè¿°ï¼ˆæ ¹å¹¾ä½•元件)" name="description"/> + <scroll_list.columns label="所有人" name="owner"/> + <scroll_list.columns label="有腳本" name="scripted"/> + <scroll_list.columns label="è¡æ“Š" name="land_impact"/> + <scroll_list.columns label="è·é›¢" name="dist_from_you"/> + <scroll_list.columns label="è¯çµé›†çš„使用" name="linkset_use"/> + <scroll_list.columns label="A %" name="a_percent"/> + <scroll_list.columns label="B %" name="b_percent"/> + <scroll_list.columns label="C %" name="c_percent"/> + <scroll_list.columns label="D %" name="d_percent"/> + </scroll_list> + <text name="messaging_status"> + è¯çµé›†ï¼š + </text> + <button label="刷新清單" name="refresh_objects_list"/> + <button label="å…¨é¸" name="select_all_objects"/> + <button label="全都ä¸é¸" name="select_none_objects"/> + </panel> + <panel> + <check_box label="顯示指標" name="show_beacon"/> + <button label="å–å¾—" name="take_objects"/> + <button label="æ‹¿å–副本" name="take_copy_objects"/> + <button label="çž¬é–“å‚³é€æˆ‘到那裡" name="teleport_me_to_object"/> + <button label="退回" name="return_objects"/> + <button label="刪除" name="delete_objects"/> + </panel> + <panel> + <text name="walkability_coefficients_label"> + å¯è¡Œèµ°æ€§ï¼š + </text> + <text name="edit_a_label"> + A + </text> + <line_editor name="edit_a_value" tool_tip="A 類型角色的å¯è¡Œèµ°æ€§ã€‚以類人類為範例角色類型。"/> + <text name="edit_b_label"> + B + </text> + <line_editor name="edit_b_value" tool_tip="B 類型角色的å¯è¡Œèµ°æ€§ã€‚以ç¸é¡žç‚ºç¯„例角色類型。"/> + <text name="edit_c_label"> + C + </text> + <line_editor name="edit_c_value" tool_tip="C 類型角色的å¯è¡Œèµ°æ€§ã€‚以機械類為範例角色類型。"/> + <text name="edit_d_label"> + D + </text> + <line_editor name="edit_d_value" tool_tip="D 類型角色的å¯è¡Œèµ°æ€§ã€‚以其他種類為範例角色類型。"/> + <button label="套用變更" name="apply_edit_values"/> + <text name="suggested_use_a_label"> + (類人類) + </text> + <text name="suggested_use_b_label"> + (ç¸é¡žï¼‰ + </text> + <text name="suggested_use_c_label"> + (機械類) + </text> + <text name="suggested_use_d_label"> + (其他) + </text> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_pay.xml b/indra/newview/skins/default/xui/zh/floater_pay.xml index 0a823cd82e..69427605a4 100644 --- a/indra/newview/skins/default/xui/zh/floater_pay.xml +++ b/indra/newview/skins/default/xui/zh/floater_pay.xml @@ -7,14 +7,14 @@ 支付居民 </string> <text name="payee_name"> - Test Name That Is Extremely Long To Check Clipping + 測試一個長度éžå¸¸éžå¸¸éžå¸¸é•·çš„å稱,檢查是å¦è¢«åˆ‡æ–· </text> <button label="L$1" label_selected="L$1" name="fastpay 1"/> <button label="L$5" label_selected="L$5" name="fastpay 5"/> <button label="L$10" label_selected="L$10" name="fastpay 10"/> <button label="L$20" label_selected="L$20" name="fastpay 20"/> <text name="amount text"> - æˆ–ï¼Œé¸æ“‡ä¸€å€‹é‡‘é¡ï¼š + æˆ–é¸æ“‡ä¸€å€‹é‡‘é¡ï¼š </text> <button label="支付" label_selected="支付" name="pay btn"/> <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="cancel btn"/> diff --git a/indra/newview/skins/default/xui/zh/floater_pay_object.xml b/indra/newview/skins/default/xui/zh/floater_pay_object.xml index 39259524d7..7d20b44bc6 100644 --- a/indra/newview/skins/default/xui/zh/floater_pay_object.xml +++ b/indra/newview/skins/default/xui/zh/floater_pay_object.xml @@ -14,14 +14,14 @@ </text> <icon name="icon_object" tool_tip="物件"/> <text name="object_name_text"> - My awesome object with a really damn long name + 這是我å稱很長很長很長很長的一個很棒的物件 </text> <button label="L$1" label_selected="L$1" name="fastpay 1"/> <button label="L$5" label_selected="L$5" name="fastpay 5"/> <button label="L$10" label_selected="L$10" name="fastpay 10"/> <button label="L$20" label_selected="L$20" name="fastpay 20"/> <text name="amount text"> - æˆ–è€…ï¼Œé¸æ“‡ä¸€å€‹é‡‘é¡ï¼š + æˆ–é¸æ“‡ä¸€å€‹é‡‘é¡ï¼š </text> <button label="支付" label_selected="支付" name="pay btn"/> <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="cancel btn"/> diff --git a/indra/newview/skins/default/xui/zh/floater_people.xml b/indra/newview/skins/default/xui/zh/floater_people.xml new file mode 100644 index 0000000000..f629f2f184 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_people.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_people" title="人群"> + <panel_container name="main_panel"> + <panel label="群組檔案" name="panel_group_info_sidetray"/> + <panel label="被å°éŽ–çš„å±…æ°‘èˆ‡ç‰©ä»¶" name="panel_block_list_sidetray"/> + </panel_container> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_perm_prefs.xml b/indra/newview/skins/default/xui/zh/floater_perm_prefs.xml index 498848ee56..b38db59ff3 100644 --- a/indra/newview/skins/default/xui/zh/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/zh/floater_perm_prefs.xml @@ -4,10 +4,10 @@ <check_box label="與群組分享" name="share_with_group"/> <check_box label="å…許任何人覆製" name="everyone_copy"/> <text name="NextOwnerLabel"> - ä¸‹ä¸€å€‹æ“æœ‰è€…å¯ä»¥ï¼š + 下一個所有人å¯ä»¥ï¼š </text> <check_box label="修改" name="next_owner_modify"/> - <check_box label="覆製" name="next_owner_copy"/> + <check_box label="æšåº¨" name="next_owner_copy"/> <check_box initial_value="true" label="轉售 / é€äºº" name="next_owner_transfer"/> </panel> <button label="確定" label_selected="確定" name="ok"/> diff --git a/indra/newview/skins/default/xui/zh/floater_picks.xml b/indra/newview/skins/default/xui/zh/floater_picks.xml new file mode 100644 index 0000000000..a8bfcd99e3 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_picks.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_picks" title="ç²¾é¸åœ°é»ž"/> diff --git a/indra/newview/skins/default/xui/zh/floater_places.xml b/indra/newview/skins/default/xui/zh/floater_places.xml new file mode 100644 index 0000000000..f6ef1e2141 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_places.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_places" title="地點"> + <panel label="地點" name="main_panel"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_post_process.xml b/indra/newview/skins/default/xui/zh/floater_post_process.xml index 0972c6dfa6..2908f7c1d0 100644 --- a/indra/newview/skins/default/xui/zh/floater_post_process.xml +++ b/indra/newview/skins/default/xui/zh/floater_post_process.xml @@ -1,50 +1,50 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Post-Process Floater" title="POST-PROCESS SETTINGS"> +<floater name="Post-Process Floater" title="後處ç†è¨å®šï¼š"> <tab_container name="Post-Process Tabs"> - <panel label="Color Filter" name="wmiColorFilterPanel"> - <check_box label="Enable" name="wmiColorFilterToggle"/> + <panel label="é¡è‰²éŽæ¿¾" name="wmiColorFilterPanel"> + <check_box label="啟用" name="wmiColorFilterToggle"/> <text name="wmiColorFilterBrightnessText"> - Brightness + 亮度 </text> <text name="wmiColorFilterSaturationText"> - Saturation + 飽和度 </text> <text name="wmiColorFilterContrastText"> - Contrast + å°æ¯” </text> <text name="wmiColorFilterBaseText"> - Contrast Base Color + å°æ¯”基本色 </text> <slider label="R" name="wmiColorFilterBaseR"/> <slider label="G" name="wmiColorFilterBaseG"/> <slider label="B" name="wmiColorFilterBaseB"/> <slider label="I" name="wmiColorFilterBaseI"/> </panel> - <panel label="Night Vision" name="wmiNightVisionPanel"> - <check_box label="Enable" name="wmiNightVisionToggle"/> + <panel label="夜視" name="wmiNightVisionPanel"> + <check_box label="啟用" name="wmiNightVisionToggle"/> <text name="wmiNightVisionBrightMultText"> - Light Amplification Multiple + å…‰æ”¾å¤§å€æ•¸ </text> <text name="wmiNightVisionNoiseSizeText"> - Noise Size + å™ªéŸ³è¦æ¨¡ </text> <text name="wmiNightVisionNoiseStrengthText"> - Noise Strength + 噪音強度 </text> </panel> - <panel label="Bloom" name="wmiBloomPanel"> - <check_box label="Enable" name="wmiBloomToggle"/> + <panel label="開花" name="wmiBloomPanel"> + <check_box label="啟用" name="wmiBloomToggle"/> <text name="wmiBloomExtractText"> - Luminosity Extraction + 光度èƒå– </text> <text name="wmiBloomSizeText"> - Bloom Size + é–‹èŠ±å¤§å° </text> <text name="wmiBloomStrengthText"> - Bloom Strength + 開花強度 </text> </panel> - <panel label="Extras" name="Extras"> + <panel label="å…¶ä»–" name="Extras"> <button label="LoadEffect" label_selected="LoadEffect" name="PPLoadEffect"/> <button label="SaveEffect" label_selected="SaveEffect" name="PPSaveEffect"/> <line_editor label="效果å稱" name="PPEffectNameEditor"/> diff --git a/indra/newview/skins/default/xui/zh/floater_preferences.xml b/indra/newview/skins/default/xui/zh/floater_preferences.xml index 396a4893e0..b0a27e8c1f 100644 --- a/indra/newview/skins/default/xui/zh/floater_preferences.xml +++ b/indra/newview/skins/default/xui/zh/floater_preferences.xml @@ -3,11 +3,11 @@ <button label="確定" label_selected="確定" name="OK"/> <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="Cancel"/> <tab_container name="pref core"> - <panel label="一般" name="general"/> - <panel label="圖形" name="display"/> + <panel label="基本è¨å®š" name="general"/> + <panel label="顯åƒ" name="display"/> <panel label="è²éŸ³èˆ‡åª’é«”" name="audio"/> <panel label="èŠå¤©" name="chat"/> - <panel label="移動與視角" name="move"/> + <panel label="移動/視野" name="move"/> <panel label="通知" name="msgs"/> <panel label="é¡è‰²" name="colors"/> <panel label="éš±ç§" name="im"/> diff --git a/indra/newview/skins/default/xui/zh/floater_preferences_proxy.xml b/indra/newview/skins/default/xui/zh/floater_preferences_proxy.xml new file mode 100644 index 0000000000..f91d5c5cdb --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_preferences_proxy.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Proxy Settings Floater" title="代ç†ä¼ºæœå™¨è¨å®š"> + <check_box initial_value="false" label="使用 HTTP 代ç†ä¼ºæœå™¨ç€è¦½ç¶²é " name="web_proxy_enabled"/> + <text name="http_proxy_label"> + HTTP 代ç†ä¼ºæœå™¨ï¼š + </text> + <line_editor name="web_proxy_editor" tool_tip="ä½ å¸Œæœ›ä½¿ç”¨çš„ HTTP 代ç†ä¼ºæœå™¨çš„ DNS å稱或 IP ä½å€ã€‚"/> + <spinner label="åŸ è™Ÿï¼š" name="web_proxy_port" tool_tip="ä½ å¸Œæœ›ä½¿ç”¨çš„ HTTP 代ç†ä¼ºæœå™¨çš„åŸ è™Ÿã€‚"/> + <check_box label="使用 SOCKS 5 代ç†ä¼ºæœå™¨è™•ç† UDP 資料æµ" name="socks_proxy_enabled"/> + <text name="socks5_proxy_label"> + SOCKS 5 代ç†ä¼ºæœå™¨ï¼š + </text> + <line_editor name="socks_proxy_editor" tool_tip="ä½ å¸Œæœ›ä½¿ç”¨çš„ SOCKS 5 代ç†ä¼ºæœå™¨çš„ DNS å稱或 IP ä½å€ã€‚"/> + <spinner label="åŸ è™Ÿï¼š" name="socks_proxy_port" tool_tip="ä½ å¸Œæœ›ä½¿ç”¨çš„ SOCKS 5 代ç†ä¼ºæœå™¨çš„åŸ è™Ÿã€‚"/> + <text name="socks_auth_label"> + SOCKS é‘’èªï¼š + </text> + <radio_group name="socks5_auth_type"> + <radio_item label="ç„¡é‘’èª" name="Socks5NoAuth" tool_tip="Socks5 代ç†ä¼ºæœå™¨ç„¡éœ€é‘’èªã€‚" value="ç„¡"/> + <radio_item label="使用者å稱 / 密碼" name="Socks5UserPass" tool_tip="Socks5 代ç†ä¼ºæœå™¨éœ€è¦é€éŽä½¿ç”¨è€…å稱 / 密碼鑒èªã€‚" value="UserPass"/> + </radio_group> + <text name="socks5_username_label"> + 使用者å稱: + </text> + <text name="socks5_password_label"> + 密碼: + </text> + <line_editor name="socks5_username" tool_tip="ä½ çš„ SOCKS 5 伺æœå™¨é‘’èªæ‰€ç”¨çš„使用者å稱"/> + <line_editor name="socks5_password" tool_tip="ä½ çš„ SOCKS 5 伺æœå™¨é‘’èªæ‰€ç”¨çš„密碼"/> + <text name="other_proxy_label"> + å…¶ä»– HTTP 資料æµä»£ç†ä¼ºæœå™¨ï¼š + </text> + <radio_group name="other_http_proxy_type"> + <radio_item label="ä¸ä½¿ç”¨ä»£ç†ä¼ºæœå™¨" name="OtherNoProxy" tool_tip="éžç¶²é çš„ HTTP 資料æµä¸æœƒè¢«å°Žå‘任何代ç†ä¼ºæœå™¨ã€‚" value="ç„¡"/> + <radio_item label="使用 HTTP 代ç†ä¼ºæœå™¨" name="OtherHTTPProxy" tool_tip="éžç¶²é çš„ HTTP 資料æµå°‡å°Žå‘所è¨çš„ç¶²é 代ç†ä¼ºæœå™¨ã€‚" value="ç¶²é "/> + <radio_item label="使用 SOCKS 5 代ç†ä¼ºæœå™¨" name="OtherSocksProxy" tool_tip="éžç¶²é çš„ HTTP 資料æµå°‡å°Žå‘所è¨çš„ Socks 5 代ç†ä¼ºæœå™¨ã€‚" value="網路套接"/> + </radio_group> + <button label="確定" label_selected="確定" name="OK"/> + <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="Cancel"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_preview_animation.xml b/indra/newview/skins/default/xui/zh/floater_preview_animation.xml index c435ddc0bd..b94d67b7ef 100644 --- a/indra/newview/skins/default/xui/zh/floater_preview_animation.xml +++ b/indra/newview/skins/default/xui/zh/floater_preview_animation.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="preview_anim"> <floater.string name="Title"> - 動作: [NAME] + 動作:[NAME] </floater.string> <text name="desc txt"> æè¿°ï¼š </text> - <button label="æ’æ”¾æ–¼è™›æ“¬ä¸–界" label_selected="åœæ¢" name="Anim play btn" tool_tip="Play this animation so that others can see it"/> - <button label="æ’æ”¾æ–¼æœ¬åœ°" label_selected="åœæ¢" name="Anim audition btn" tool_tip="Play this animation so that only you can see it"/> + <button label="åœ¨è™›æ“¬ä¸–ç•Œæ’æ”¾" label_selected="åœæ¢" name="Inworld" tool_tip="æ’æ”¾æ¤å‹•作讓他人看見"/> + <button label="åœ¨æœ¬åœ°æ’æ”¾" label_selected="åœæ¢" name="Locally" tool_tip="æ’æ”¾æ¤å‹•作,åªçµ¦è‡ªå·±çœ‹"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_preview_gesture.xml b/indra/newview/skins/default/xui/zh/floater_preview_gesture.xml index ad49370423..be75038a09 100644 --- a/indra/newview/skins/default/xui/zh/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/zh/floater_preview_gesture.xml @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="gesture_preview"> <floater.string name="step_anim"> - Animation to play: + è¦æ’放的動作: </floater.string> <floater.string name="step_sound"> - Sound to play: + è¦æ’放的è²éŸ³ï¼š </floater.string> <floater.string name="step_chat"> - Chat to say: + è¦èªªå‡ºçš„èŠå¤©æ–‡å—: </floater.string> <floater.string name="step_wait"> - Wait: + ç‰å¾…: </floater.string> <floater.string name="stop_txt"> åœæ¢ @@ -22,20 +22,20 @@ -- ç„¡ -- </floater.string> <floater.string name="Title"> - Gesture: [NAME] + 姿勢:[NAME] </floater.string> <text name="desc_label"> æè¿°ï¼š </text> <text name="trigger_label"> - Trigger: + 觸發: </text> - <text name="replace_text" tool_tip="Replace the trigger word(s) with these words. For example, trigger 'hello' replace with 'howdy' will turn the chat 'I wanted to say hello' into 'I wanted to say howdy' as well as playing the gesture!"> - Replace with: + <text name="replace_text" tool_tip="用這些å—眼å–代觸發å—眼。 例如,觸發 'hello' å–代為 'howdy' 後,將使得èŠå¤©æ–‡å—「我想說 helloã€è®Šæˆã€Œæˆ‘想說 howdyã€ï¼ŒåŒæ™‚é‚„æœƒæ’æ”¾è©²å§¿å‹¢ï¼"> + å–代æˆï¼š </text> - <line_editor name="replace_editor" tool_tip="Replace the trigger word(s) with these words. For example, trigger 'hello' replace with 'howdy' will turn the chat 'I wanted to say hello' into 'I wanted to say howdy' as well as playing the gesture"/> + <line_editor name="replace_editor" tool_tip="用這些å—眼å–代觸發å—眼。 例如,觸發 'hello' å–代為 'howdy' 後,將使得èŠå¤©æ–‡å—「我想說 helloã€è®Šæˆã€Œæˆ‘想說 howdyã€ï¼ŒåŒæ™‚é‚„æœƒæ’æ”¾è©²å§¿å‹¢ã€‚"/> <text name="key_label"> - Shortcut Key: + å¿«æ·éµï¼š </text> <combo_box label="ç„¡" name="modifier_combo"/> <combo_box label="ç„¡" name="key_combo"/> @@ -50,10 +50,10 @@ </scroll_list> <button label="æ·»åŠ >>" name="add_btn"/> <text name="steps_label"> - Steps: + æ¥é©Ÿï¼š </text> - <button label="Up" name="up_btn"/> - <button label="Down" name="down_btn"/> + <button label="上移éµ" name="up_btn"/> + <button label="下移éµ" name="down_btn"/> <button label="移除" name="delete_btn"/> <text name="options_text"> (é¸é …) @@ -63,11 +63,11 @@ <radio_item label="åœæ¢" name="stop"/> </radio_group> <check_box label="ç›´åˆ°å‹•ä½œçµæŸã€‚" name="wait_anim_check"/> - <check_box label="time in seconds:" name="wait_time_check"/> + <check_box label="時間(秒):" name="wait_time_check"/> <text name="help_label"> - All steps happen simultaneously, unless you add wait steps. + 所有æ¥é©Ÿéƒ½æœƒåŒæ™‚進行,除éžä½ åŠ å…¥ã€Œç‰å¾…ã€æ¥é©Ÿã€‚ </text> - <check_box label="Active" name="active_check" tool_tip="Active gestures can be triggered by chatting their trigger phrases or pressing their hot keys. Gestures usually become inactive when there is a key binding conflict."/> + <check_box label="å¯ç”¨" name="active_check" tool_tip="ä½ å¯ä»¥åœ¨èŠå¤©ä¸éµå…¥ã€Œè§¸ç™¼å—眼ã€ï¼Œæˆ–按æŸå§¿å‹¢çš„熱éµä¾†å•Ÿå‹•å¯ç”¨çš„姿勢。 熱éµçš„ç¶å®šè‹¥æœ‰è¡çªï¼Œé€šå¸¸æœƒä½¿å§¿å‹¢è®Šæˆä¸å¯ç”¨ã€‚"/> <button label="é 覽" name="preview_btn"/> <button label="儲å˜" name="save_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_preview_sound.xml b/indra/newview/skins/default/xui/zh/floater_preview_sound.xml index 46844349de..d04428a36d 100644 --- a/indra/newview/skins/default/xui/zh/floater_preview_sound.xml +++ b/indra/newview/skins/default/xui/zh/floater_preview_sound.xml @@ -6,6 +6,6 @@ <text name="desc txt"> æè¿°ï¼š </text> - <button label="æ’æ”¾æ–¼è™›æ“¬ä¸–界" label_selected="æ’æ”¾æ–¼è™›æ“¬ä¸–界" name="Sound play btn" tool_tip="Play this sound so that others can hear it"/> - <button label="æ’æ”¾æ–¼æœ¬åœ°" label_selected="æ’æ”¾æ–¼æœ¬åœ°" name="Sound audition btn" tool_tip="Play this sound so that only you can hear it"/> + <button label="åœ¨è™›æ“¬ä¸–ç•Œæ’æ”¾" label_selected="åœ¨è™›æ“¬ä¸–ç•Œæ’æ”¾" name="Sound play btn" tool_tip="æ’æ”¾æ¤è²éŸ³è®“他人è½è¦‹"/> + <button label="åœ¨æœ¬åœ°æ’æ”¾" label_selected="åœ¨æœ¬åœ°æ’æ”¾" name="Sound audition btn" tool_tip="æ’æ”¾æ¤è²éŸ³ï¼Œåªè®“自己è½è¦‹"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_preview_texture.xml b/indra/newview/skins/default/xui/zh/floater_preview_texture.xml index 02e26cea24..c56b1c2987 100644 --- a/indra/newview/skins/default/xui/zh/floater_preview_texture.xml +++ b/indra/newview/skins/default/xui/zh/floater_preview_texture.xml @@ -10,31 +10,31 @@ æè¿°ï¼š </text> <text name="dimensions"> - [WIDTH]px x [HEIGHT]px + [WIDTH] åƒç´ X [HEIGHT] åƒç´ </text> <text name="aspect_ratio"> - Preview aspect ratio + é 覽長寬比 </text> - <combo_box name="combo_aspect_ratio" tool_tip="Preview at a fixed aspect ratio"> + <combo_box name="combo_aspect_ratio" tool_tip="以固定長寬比é 覽"> <combo_item name="Unconstrained"> - Unconstrained + ä¸å—é™ </combo_item> - <combo_item name="1:1" tool_tip="Group insignia or Real World profile"> + <combo_item name="1:1" tool_tip="ç¾¤çµ„å¾½ç« æˆ–ç¾å¯¦ä¸–ç•Œå°æª”案"> 1:1 </combo_item> <combo_item name="4:3" tool_tip="[SECOND_LIFE] 檔案"> 4:3 </combo_item> - <combo_item name="10:7" tool_tip="Classifieds and search listings, landmarks"> + <combo_item name="10:7" tool_tip="個人廣告和æœç´¢åˆŠç™»å»£å‘Šã€åœ°æ¨™"> 10:7 </combo_item> - <combo_item name="3:2" tool_tip="關於土地"> + <combo_item name="3:2" tool_tip="土地資料"> 3:2 </combo_item> <combo_item name="16:10"> 16:10 </combo_item> - <combo_item name="16:9" tool_tip="Profile picks"> + <combo_item name="16:9" tool_tip="個人檔案精é¸"> 16:9 </combo_item> <combo_item name="2:1"> @@ -42,6 +42,6 @@ </combo_item> </combo_box> <button label="確定" name="Keep"/> - <button label="Discard" name="Discard"/> - <button label="å¦å˜" name="save_tex_btn"/> + <button label="丟棄" name="Discard"/> + <button label="å¦å˜ç‚º" name="save_tex_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_price_for_listing.xml b/indra/newview/skins/default/xui/zh/floater_price_for_listing.xml new file mode 100644 index 0000000000..078b490655 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_price_for_listing.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="price_for_listing" title="刊登個人廣告"> + <text name="explanation_text"> + ä½ çš„å€‹äººå»£å‘Šå°‡å¾žåˆŠç™»æ—¥èµ·é€£çºŒåˆŠè¼‰ä¸€æ˜ŸæœŸã€‚ + +ä½ çš„å»£å‘Šåœ¨å€‹äººå»£å‘Šæ¬„å‡ºç¾çš„ä½ç½®ï¼Œå–æ±ºæ–¼ä½ æ±ºå®šä»˜è²»çš„å¤šå¯¡ã€‚ + +付費越多的個人廣告會出ç¾åœ¨æŽ¥è¿‘最上方ä½ç½®ï¼Œä¸¦é¡¯ç¤ºæ–¼æœå°‹çµæžœçš„å‰é¢ã€‚ + </text> + <text name="price_text"> + 刊登費: + </text> + <text name="price_symbol"> + L$ + </text> + <button label="確定" name="set_price_btn"/> + <button label="å–æ¶ˆ" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_publish_classified.xml b/indra/newview/skins/default/xui/zh/floater_publish_classified.xml index 5f0ffea182..b810af0145 100644 --- a/indra/newview/skins/default/xui/zh/floater_publish_classified.xml +++ b/indra/newview/skins/default/xui/zh/floater_publish_classified.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="publish_classified" title="Publishing Classified"> +<floater name="publish_classified" title="刊登個人廣告"> <text name="explanation_text"> - Your classified ad will run for one week from the date it is published. + ä½ çš„å€‹äººå»£å‘Šå°‡å¾žåˆŠç™»æ—¥èµ·é€£çºŒåˆŠè¼‰ä¸€æ˜ŸæœŸã€‚ -Remember, Classified fees are non-refundable. +請注æ„,個人廣告刊登費æ•ä¸é€€é‚„。 </text> - <spinner label="åƒ¹æ ¼ï¼š L$" name="price_for_listing" tool_tip="刊登費用。" value="50"/> + <spinner label="åƒ¹æ ¼ï¼š L$" name="price_for_listing" tool_tip="刊登費。" value="50"/> <button label="發布" name="publish_btn"/> <button label="å–æ¶ˆ" name="cancel_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_report_abuse.xml b/indra/newview/skins/default/xui/zh/floater_report_abuse.xml index 436f5cdcc5..8dbc216ab5 100644 --- a/indra/newview/skins/default/xui/zh/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/zh/floater_report_abuse.xml @@ -14,66 +14,66 @@ 地å€å稱 </text> <text name="pos_title"> - Position: + ä½ç½®ï¼š </text> <text name="pos_field"> {128.1, 128.1, 15.4} </text> <text name="select_object_label"> - Click the button, then the abusive object: + 點按按鈕,å†é»žæŒ‰é•紀的物件: </text> - <button name="pick_btn" tool_tip="Object Picker - Identify an object as the subject of this report"/> + <button name="pick_btn" tool_tip="物件é¸å–器 - æŒ‡æ˜Žæœ¬èˆ‰å ±çš„å°è±¡ç‰©ä»¶"/> <text name="object_name_label"> 物件: </text> <text name="owner_name_label"> - æ“æœ‰è€…: + 所有人: </text> - <combo_box name="category_combo" tool_tip="Category -- select the category that best describes this report"> + <combo_box name="category_combo" tool_tip="類別 -- 鏿“‡æœ€ç¬¦åˆæ¤æ¬¡èˆ‰å ±å…§å®¹çš„類別"> <combo_box.item label="鏿“‡é¡žåˆ¥" name="Select_category"/> - <combo_box.item label="Age > Age play" name="Age__Age_play"/> - <combo_box.item label="Age > Adult Resident on Teen Second Life" name="Age__Adult_resident_on_Teen_Second_Life"/> - <combo_box.item label="Age > Underage Resident outside of Teen Second Life" name="Age__Underage_resident_outside_of_Teen_Second_Life"/> - <combo_box.item label="Assault > Combat sandbox / unsafe area" name="Assault__Combat_sandbox___unsafe_area"/> - <combo_box.item label="Assault > Safe area" name="Assault__Safe_area"/> - <combo_box.item label="Assault > Weapons testing sandbox" name="Assault__Weapons_testing_sandbox"/> - <combo_box.item label="Commerce > Failure to deliver product or service" name="Commerce__Failure_to_deliver_product_or_service"/> - <combo_box.item label="Disclosure > Real world information" name="Disclosure__Real_world_information"/> - <combo_box.item label="Disclosure > Remotely monitoring chat" name="Disclosure__Remotely_monitoring chat"/> - <combo_box.item label="Disclosure > Second Life information/chat/IMs" name="Disclosure__Second_Life_information_chat_IMs"/> - <combo_box.item label="Disturbing the peace > Unfair use of region resources" name="Disturbing_the_peace__Unfair_use_of_region_resources"/> - <combo_box.item label="Disturbing the peace > Excessive scripted objects" name="Disturbing_the_peace__Excessive_scripted_objects"/> - <combo_box.item label="Disturbing the peace > Object littering" name="Disturbing_the_peace__Object_littering"/> - <combo_box.item label="Disturbing the peace > Repetitive spam" name="Disturbing_the_peace__Repetitive_spam"/> - <combo_box.item label="Disturbing the peace > Unwanted advert spam" name="Disturbing_the_peace__Unwanted_advert_spam"/> - <combo_box.item label="Fraud > L$" name="Fraud__L$"/> - <combo_box.item label="Fraud > Land" name="Fraud__Land"/> - <combo_box.item label="Fraud > Pyramid scheme or chain letter" name="Fraud__Pyramid_scheme_or_chain_letter"/> - <combo_box.item label="Fraud > US$" name="Fraud__US$"/> - <combo_box.item label="Harassment > Advert farms / visual spam" name="Harassment__Advert_farms___visual_spam"/> - <combo_box.item label="Harassment > Defaming individuals or groups" name="Harassment__Defaming_individuals_or_groups"/> - <combo_box.item label="Harassment > Impeding movement" name="Harassment__Impeding_movement"/> - <combo_box.item label="Harassment > Sexual harassment" name="Harassment__Sexual_harassment"/> - <combo_box.item label="Harassment > Solicting/inciting others to violate ToS" name="Harassment__Solicting_inciting_others_to_violate_ToS"/> - <combo_box.item label="Harassment > Verbal abuse" name="Harassment__Verbal_abuse"/> - <combo_box.item label="Indecency > Broadly offensive content or conduct" name="Indecency__Broadly_offensive_content_or_conduct"/> - <combo_box.item label="Indecency > Inappropriate avatar name" name="Indecency__Inappropriate_avatar_name"/> - <combo_box.item label="Indecency > Inappropriate content or conduct in a PG region" name="Indecency__Mature_content_in_PG_region"/> - <combo_box.item label="Indecency > Inappropriate content or conduct in a Moderate region" name="Indecency__Inappropriate_content_in_Mature_region"/> - <combo_box.item label="Intellectual property infringement > Content Removal" name="Intellectual_property_infringement_Content_Removal"/> - <combo_box.item label="Intellectual property infringement > CopyBot or Permissions Exploit" name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit"/> - <combo_box.item label="Intolerance" name="Intolerance"/> - <combo_box.item label="Land > Abuse of sandbox resources" name="Land__Abuse_of_sandbox_resources"/> - <combo_box.item label="Land > Encroachment > Objects/textures" name="Land__Encroachment__Objects_textures"/> - <combo_box.item label="Land > Encroachment > Particles" name="Land__Encroachment__Particles"/> - <combo_box.item label="Land > Encroachment > Trees/plants" name="Land__Encroachment__Trees_plants"/> - <combo_box.item label="Wagering/gambling" name="Wagering_gambling"/> + <combo_box.item label="年齡 > 年齡 play" name="Age__Age_play"/> + <combo_box.item label="年齡 > æˆäººå±…民出ç¾åœ¨é’少年專用第二人生" name="Age__Adult_resident_on_Teen_Second_Life"/> + <combo_box.item label="年齡 > 未æˆå¹´å±…民出ç¾åœ¨é’å°‘å¹´å°ˆç”¨ç¬¬äºŒäººç”Ÿä»¥å¤–å ´æ‰€" name="Age__Underage_resident_outside_of_Teen_Second_Life"/> + <combo_box.item label="攻擊 > 戰鬥沙盤 / ä¸å®‰å…¨å€åŸŸ" name="Assault__Combat_sandbox___unsafe_area"/> + <combo_box.item label="攻擊 > 安全å€åŸŸ" name="Assault__Safe_area"/> + <combo_box.item label="攻擊 > 測試æ¦å™¨çš„æ²™ç›¤" name="Assault__Weapons_testing_sandbox"/> + <combo_box.item label="å•†æ¥ > 未é€äº¤ç”¢å“或履行æœå‹™" name="Commerce__Failure_to_deliver_product_or_service"/> + <combo_box.item label="æéœ² > 真實世界資訊" name="Disclosure__Real_world_information"/> + <combo_box.item label="æéœ² > é 端監控èŠå¤©å…§å®¹" name="Disclosure__Remotely_monitoring chat"/> + <combo_box.item label="æéœ² > 第二人生資訊 / èŠå¤©å…§å®¹ / 峿™‚訊æ¯" name="Disclosure__Second_Life_information_chat_IMs"/> + <combo_box.item label="擾亂 > ä¸å…¬å¹³ä½¿ç”¨åœ°å€è³‡æº" name="Disturbing_the_peace__Unfair_use_of_region_resources"/> + <combo_box.item label="擾亂 > éŽåº¦ä½¿ç”¨å¸¶è…³æœ¬çš„物件" name="Disturbing_the_peace__Excessive_scripted_objects"/> + <combo_box.item label="擾亂 > ä»»æ„æ£„置物件" name="Disturbing_the_peace__Object_littering"/> + <combo_box.item label="擾亂 > 一å†ç™¼å‡ºåžƒåœ¾è¨Šæ¯" name="Disturbing_the_peace__Repetitive_spam"/> + <combo_box.item label="擾亂 > ä¸å—æ¡è¿Žçš„垃圾廣告" name="Disturbing_the_peace__Unwanted_advert_spam"/> + <combo_box.item label="è©æ¬º > L$" name="Fraud__L$"/> + <combo_box.item label="è©æ¬º > 土地" name="Fraud__Land"/> + <combo_box.item label="è©æ¬º > å±¤å£“å¼æŽ¨éŠ·æˆ–é€£ç’°ä¿¡" name="Fraud__Pyramid_scheme_or_chain_letter"/> + <combo_box.item label="è©æ¬º > 美金" name="Fraud__US$"/> + <combo_box.item label="騷擾 > å»£å‘Šè¾²å ´ / 視覺轟炸" name="Harassment__Advert_farms___visual_spam"/> + <combo_box.item label="騷擾 > 詆è個人或群組" name="Harassment__Defaming_individuals_or_groups"/> + <combo_box.item label="騷擾 > 阻撓移動" name="Harassment__Impeding_movement"/> + <combo_box.item label="騷擾 > 性騷擾" name="Harassment__Sexual_harassment"/> + <combo_box.item label="騷擾 > é¼“å¹ / 教唆他人é•åæœå‹™æ¢æ¬¾" name="Harassment__Solicting_inciting_others_to_violate_ToS"/> + <combo_box.item label="騷擾 > 言語暴力" name="Harassment__Verbal_abuse"/> + <combo_box.item label="ä¸é›… > 令大多人ä¸å¿«çš„內容或行為" name="Indecency__Broadly_offensive_content_or_conduct"/> + <combo_box.item label="ä¸é›… > 冒犯人的化身å稱" name="Indecency__Inappropriate_avatar_name"/> + <combo_box.item label="ä¸é›… > 在一般普級地å€å‡ºç¾å†’犯人的內容或行為" name="Indecency__Mature_content_in_PG_region"/> + <combo_box.item label="ä¸é›… > 在é©åº¦æˆäººåœ°å€å‡ºç¾å†’犯人的內容或行為" name="Indecency__Inappropriate_content_in_Mature_region"/> + <combo_box.item label="侵犯智產權 > 移除內容" name="Intellectual_property_infringement_Content_Removal"/> + <combo_box.item label="侵犯智產權 > 複製機器程å¼ç¢¼ CopyBot 或濫用權é™" name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit"/> + <combo_box.item label="ä¸å®¹ç•°å·±" name="Intolerance"/> + <combo_box.item label="土地 > ä¸ç•¶ä½¿ç”¨æ²™ç›¤è³‡æº" name="Land__Abuse_of_sandbox_resources"/> + <combo_box.item label="土地 > 侵佔 > 物件 / æè³ª" name="Land__Encroachment__Objects_textures"/> + <combo_box.item label="土地 > 侵佔 > ç²’å" name="Land__Encroachment__Particles"/> + <combo_box.item label="土地 > 侵佔 > 樹種 / æ¤ç‰©" name="Land__Encroachment__Trees_plants"/> + <combo_box.item label="下注 / è³åš" name="Wagering_gambling"/> <combo_box.item label="å…¶ä»–" name="Other"/> </combo_box> <text name="abuser_name_title"> 濫用者å稱: </text> - <button label="鏿“‡" name="select_abuser" tool_tip="Select the name of the abuser from a list"/> + <button label="鏿“‡" name="select_abuser" tool_tip="從清單ä¸é¸æ“‡é•紀者姓å"/> <text name="abuser_name_title2"> 濫用ä½ç½®ï¼š </text> @@ -84,11 +84,11 @@ 細節: </text> <text name="bug_aviso"> - Please be as specific as possible + 請盡å¯èƒ½æä¾›å…·é«”細節 </text> <text name="incomplete_title"> - * Incomplete reports won't be investigated + * ä¸å®Œæ•´çš„èˆ‰å ±å…§å®¹æ¦‚ä¸å—ç†èª¿æŸ¥ </text> - <button label="èˆ‰å ±æ¿«ç”¨" label_selected="èˆ‰å ±æ¿«ç”¨" name="send_btn"/> + <button label="é•è¦èˆ‰å ±" label_selected="é•è¦èˆ‰å ±" name="send_btn"/> <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="cancel_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_script_preview.xml b/indra/newview/skins/default/xui/zh/floater_script_preview.xml index c3d05402c0..a6c6c76181 100644 --- a/indra/newview/skins/default/xui/zh/floater_script_preview.xml +++ b/indra/newview/skins/default/xui/zh/floater_script_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="preview lsl text" title="SCRIPT: ROTATION SCRIPT"> +<floater name="preview lsl text" title="腳本:旋轉腳本"> <floater.string name="Title"> 腳本:[NAME] </floater.string> diff --git a/indra/newview/skins/default/xui/zh/floater_script_queue.xml b/indra/newview/skins/default/xui/zh/floater_script_queue.xml index ff02946d86..7c253aa74c 100644 --- a/indra/newview/skins/default/xui/zh/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/zh/floater_script_queue.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="queue" title="RESET PROGRESS"> +<floater name="queue" title="é‡è¨é€²åº¦"> <floater.string name="Starting"> - Starting [START] of [COUNT] items. + æ£åœ¨å•Ÿå‹• [START] é …ï¼Œå…± [COUNT] é …ã€‚ </floater.string> <floater.string name="Done"> - Done. + 完æˆã€‚ </floater.string> <floater.string name="Resetting"> é‡è¨ä¸ diff --git a/indra/newview/skins/default/xui/zh/floater_script_search.xml b/indra/newview/skins/default/xui/zh/floater_script_search.xml index 400ef4be81..11c23d933f 100644 --- a/indra/newview/skins/default/xui/zh/floater_script_search.xml +++ b/indra/newview/skins/default/xui/zh/floater_script_search.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="script search" title="腳本æœå°‹"> - <check_box label="Case Insensitive" name="case_text"/> + <check_box label="大å°å¯«è¦–為相åŒ" name="case_text"/> <button label="æœå°‹" label_selected="æœå°‹" name="search_btn"/> <button label="å–代" label_selected="å–代" name="replace_btn"/> <button label="全部å–代" label_selected="全部å–代" name="replace_all_btn"/> diff --git a/indra/newview/skins/default/xui/zh/floater_search.xml b/indra/newview/skins/default/xui/zh/floater_search.xml index bb693b7a70..3e85a529ae 100644 --- a/indra/newview/skins/default/xui/zh/floater_search.xml +++ b/indra/newview/skins/default/xui/zh/floater_search.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_search" title="尋找"> +<floater name="floater_search" title=""> <floater.string name="loading_text"> 載入ä¸... </floater.string> <floater.string name="done_text"> - Done + å®Œæˆ </floater.string> <layout_stack name="stack1"> <layout_panel name="browser_layout"> <text name="refresh_search"> - Redo search to reflect current God level + 以目å‰å…·å‚™çš„ç¥žéšŽç´šå†æœå°‹ä¸€æ¬¡ </text> </layout_panel> </layout_stack> diff --git a/indra/newview/skins/default/xui/zh/floater_select_key.xml b/indra/newview/skins/default/xui/zh/floater_select_key.xml index c1661635f1..231eb48b04 100644 --- a/indra/newview/skins/default/xui/zh/floater_select_key.xml +++ b/indra/newview/skins/default/xui/zh/floater_select_key.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="modal container"> <text name="Save item as:"> - Press a key to set your Speak button trigger. + 按任一éµè¨å®šã€Œèªªè©±ã€æŒ‰éˆ•的觸發。 </text> <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="Cancel"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_sell_land.xml b/indra/newview/skins/default/xui/zh/floater_sell_land.xml index 19580c99a1..9030f7eb63 100644 --- a/indra/newview/skins/default/xui/zh/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/zh/floater_sell_land.xml @@ -12,16 +12,16 @@ 尺寸: </text> <text name="info_size"> - [AREA] m² + [AREA] 平方公尺 </text> <text name="info_action"> - To sell this parcel: + 出售地段: </text> <text name="price_label"> - 1. Set a price: + 1. è¨‚å®šåƒ¹æ ¼ï¼š </text> <text name="price_text"> - Choose an appropriate price. + 鏿“‡é©åˆçš„åƒ¹æ ¼ã€‚ </text> <text name="price_ld"> L$ @@ -30,13 +30,13 @@ 0 </line_editor> <text name="price_per_m"> - (L$[PER_METER] per m²) + (æ¯å¹³æ–¹å…¬å°º L$[PER_METER]) </text> <text name="sell_to_label"> - 2. Sell the land to: + 2. 出售土地給: </text> <text name="sell_to_text"> - Choose whether to sell to anyone or a particular buyer. + 鏿“‡è¦è³£çµ¦ä»»ä½•人或賣給特定買主。 </text> <combo_box name="sell_to"> <combo_box.item label="- 鏿“‡ä¸€å€‹ -" name="--selectone--"/> @@ -45,20 +45,20 @@ </combo_box> <button label="鏿“‡" name="sell_to_select_agent"/> <text name="sell_objects_label"> - 3. Sell the objects with the land? + 3. 物件連åŒåœŸåœ°ä¸€èµ·å”®å‡ºï¼Ÿ </text> <text name="sell_objects_text"> - Land owner's transferable objects on parcel will change ownership. + 地段上地主的å¯è½‰è®“物件將éŽç¹¼æ‰€æœ‰æ¬Šã€‚ </text> <radio_group name="sell_objects"> - <radio_item label="No, keep ownership of objects" name="no"/> - <radio_item label="Yes, sell objects with land" name="yes"/> + <radio_item label="ä¸ï¼Œæˆ‘è¦ä¿ç•™ç‰©ä»¶æ‰€æœ‰æ¬Š" name="no"/> + <radio_item label="好,物件連åŒåœŸåœ°ä¸€èµ·å”®å‡º" name="yes"/> </radio_group> <button label="顯示物件" name="show_objects"/> <text name="nag_message_label"> - REMEMBER: All sales are final. + 請記ä½ï¼šå”®å¾Œä¸€æ¦‚ä¸é€€ã€‚ </text> - <button label="Set Land For Sale" name="sell_btn"/> + <button label="è¨å®šåœŸåœ°å¾…å”®" name="sell_btn"/> <button label="å–æ¶ˆ" name="cancel_btn"/> </panel> </scroll_container> diff --git a/indra/newview/skins/default/xui/zh/floater_snapshot.xml b/indra/newview/skins/default/xui/zh/floater_snapshot.xml index 9edc19969f..e86e20829f 100644 --- a/indra/newview/skins/default/xui/zh/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/zh/floater_snapshot.xml @@ -1,74 +1,65 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="SNAPSHOT PREVIEW"> +<floater name="Snapshot" title="å¿«ç…§é 覽"> <floater.string name="unknown"> 未知 </floater.string> - <radio_group label="Snapshot type" name="snapshot_type_radio"> - <radio_item label="Email" name="postcard"/> - <radio_item label="我的收ç´å€ï¼ˆL$[AMOUNT])" name="texture"/> - <radio_item label="Save to my computer" name="local"/> - </radio_group> + <string name="postcard_progress_str"> + æ£åœ¨ç™¼é€é›»éƒµ + </string> + <string name="profile_progress_str"> + 發佈 + </string> + <string name="inventory_progress_str"> + 儲å˜åˆ°æ”¶ç´å€ + </string> + <string name="local_progress_str"> + æ£åœ¨å˜åˆ°é›»è…¦ + </string> + <string name="profile_succeeded_str"> + 圖åƒå·²ä¸Šå‚³ + </string> + <string name="postcard_succeeded_str"> + é›»éƒµç™¼é€æˆåŠŸï¼ + </string> + <string name="inventory_succeeded_str"> + æˆåŠŸå˜å…¥æ”¶ç´å€ï¼ + </string> + <string name="local_succeeded_str"> + æˆåŠŸå˜å…¥é›»è…¦ï¼ + </string> + <string name="profile_failed_str"> + 上傳圖åƒåˆ°ä½ 的檔案訊æ¯ç™¼ä½ˆæ™‚出錯。 + </string> + <string name="postcard_failed_str"> + 電郵傳é€å¤±æ•—。 + </string> + <string name="inventory_failed_str"> + 無法å˜å…¥æ”¶ç´å€ã€‚ + </string> + <string name="local_failed_str"> + 無法儲入電腦。 + </string> + <button name="advanced_options_btn" tool_tip="進階é¸é …"/> + <text name="image_res_text"> + [WIDTH] x [HEIGHT] åƒç´ + </text> <text name="file_size_label"> [SIZE] KB </text> - <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="more_btn" tool_tip="進階é¸é …"/> - <button label="æ›´å°‘" name="less_btn" tool_tip="進階é¸é …"/> - <button label="å–æ¶ˆ" name="discard_btn"/> - <text name="type_label2"> - 尺寸 - </text> - <text name="format_label"> - Format - </text> - <combo_box label="Resolution" name="postcard_size_combo"> - <combo_box.item label="ç›®å‰è¦–窗" 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="自訂" name="Custom"/> - </combo_box> - <combo_box label="Resolution" name="texture_size_combo"> - <combo_box.item label="ç›®å‰è¦–窗" name="CurrentWindow"/> - <combo_box.item label="Small (128x128)" name="Small(128x128)"/> - <combo_box.item label="Medium (256x256)" name="Medium(256x256)"/> - <combo_box.item label="Large (512x512)" name="Large(512x512)"/> - <combo_box.item label="自訂" name="Custom"/> - </combo_box> - <combo_box label="Resolution" name="local_size_combo"> - <combo_box.item label="ç›®å‰è¦–窗" 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="Custom" 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="Width" name="snapshot_width"/> - <spinner label="Height" name="snapshot_height"/> - <check_box label="Constrain proportions" name="keep_aspect_check"/> - <slider label="圖åƒå“質" name="image_quality_slider"/> - <text name="layer_type_label"> - Capture: - </text> - <combo_box label="圖層" name="layer_types"> - <combo_box.item label="Colors" name="Colors"/> - <combo_box.item label="Depth" name="Depth"/> - </combo_box> - <check_box label="Interface" name="ui_check"/> - <check_box label="HUDs" name="hud_check"/> - <check_box label="Keep open after saving" name="keep_open_check"/> - <check_box label="å‡çµæ¡†æž¶ï¼ˆå…¨èž¢å¹•)" name="freeze_frame_check"/> - <check_box label="Auto-refresh" name="auto_snapshot_check"/> + <panel name="advanced_options_panel"> + <text name="advanced_options_label"> + 進階é¸é … + </text> + <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> + <check_box label="介é¢" name="ui_check"/> + <check_box label="æ“¡é 顯示" name="hud_check"/> + <check_box label="將幀å‡çµï¼ˆå…¨èž¢å¹•)" name="freeze_frame_check"/> + <check_box label="自動刷新" name="auto_snapshot_check"/> + </panel> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_sound_devices.xml b/indra/newview/skins/default/xui/zh/floater_sound_devices.xml new file mode 100644 index 0000000000..0374c74f8f --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_sound_devices.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_sound_devices" title="è²éŸ³è£ç½®"> + <text name="voice_label"> + 語音èŠå¤© + </text> + <check_box label="已啟用" name="enable_voice"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_spellcheck.xml b/indra/newview/skins/default/xui/zh/floater_spellcheck.xml new file mode 100644 index 0000000000..f5a6665844 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_spellcheck.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_floater" title="æ‹¼å—æª¢æŸ¥è¨å®š"> + <check_box label="å•Ÿç”¨æ‹¼å—æª¢æŸ¥" name="spellcheck_enable"/> + <text name="spellcheck_main"> + 主è¦å—典: + </text> + <text label="記錄:" name="spellcheck_additional"> + é™„åŠ å—典: + </text> + <text name="spellcheck_available"> + å¯ç”¨çš„ + </text> + <text name="spellcheck_active"> + å¯ç”¨ + </text> + <button label="移除" name="spellcheck_remove_btn"/> + <button label="匯入…" name="spellcheck_import_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_spellcheck_import.xml b/indra/newview/skins/default/xui/zh/floater_spellcheck_import.xml new file mode 100644 index 0000000000..6094a3bbce --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_spellcheck_import.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="spellcheck_import" title="匯入å—å…¸"> + <button label="ç€è¦½" label_selected="ç€è¦½" name="dictionary_path_browse"/> + <button label="匯入" name="ok_btn"/> + <button label="å–æ¶ˆ" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_stats.xml b/indra/newview/skins/default/xui/zh/floater_stats.xml index 582572d0e2..4af5684ec1 100644 --- a/indra/newview/skins/default/xui/zh/floater_stats.xml +++ b/indra/newview/skins/default/xui/zh/floater_stats.xml @@ -3,67 +3,84 @@ <scroll_container name="statistics_scroll"> <container_view name="statistics_view"> <stat_view label="基本" name="basic"> - <stat_bar label="FPS" name="fps"/> + <stat_bar label="æ¯ç§’幀數" name="fps"/> <stat_bar label="é »å¯¬" name="bandwidth"/> <stat_bar label="å°åŒ…æå¤±" name="packet_loss"/> - <stat_bar label="Ping Sim" name="ping"/> + <stat_bar label="æŽ¢è©¢æ¨¡æ“¬å™¨æœ‰ç„¡åæ‡‰" name="ping"/> </stat_view> <stat_view label="進階" name="advanced"> - <stat_view label="Render" name="render"> - <stat_bar label="KTris Drawn" name="ktrisframe"/> - <stat_bar label="KTris Drawn" name="ktrissec"/> + <stat_view label="呈åƒ" name="render"> + <stat_bar label="繪出的 KTris(æ¯å¹€ï¼‰" name="ktrisframe"/> + <stat_bar label="繪出的 KTris(æ¯ç§’)" name="ktrissec"/> <stat_bar label="物件總計" name="objs"/> <stat_bar label="新物件" name="newobjs"/> + <stat_bar label="物件快å–讀å–率" name="object_cache_hits"/> </stat_view> <stat_view label="æè³ª" name="texture"> + <stat_bar label="å¿«å–讀å–率" name="texture_cache_hits"/> + <stat_bar label="å¿«å–讀å–å»¶é²" name="texture_cache_read_latency"/> <stat_bar label="計數" name="numimagesstat"/> - <stat_bar label="Raw Count" name="numrawimagesstat"/> - <stat_bar label="GL Mem" name="gltexmemstat"/> - <stat_bar label="Formatted Mem" name="formattedmemstat"/> - <stat_bar label="Raw Mem" name="rawmemstat"/> - <stat_bar label="Bound Mem" name="glboundmemstat"/> + <stat_bar label="原始計數" name="numrawimagesstat"/> + <stat_bar label="GL 記憶" name="gltexmemstat"/> + <stat_bar label="æ ¼å¼åŒ–記憶" name="formattedmemstat"/> + <stat_bar label="原始記憶" name="rawmemstat"/> + <stat_bar label="界é™è¨˜æ†¶" name="glboundmemstat"/> </stat_view> <stat_view label="網路" name="network"> - <stat_bar label="Packets In" name="packetsinstat"/> - <stat_bar label="Packets Out" name="packetsoutstat"/> + <stat_bar label="進入å°åŒ…" name="packetsinstat"/> + <stat_bar label="出去å°åŒ…" name="packetsoutstat"/> <stat_bar label="物件" name="objectkbitstat"/> <stat_bar label="æè³ª" name="texturekbitstat"/> <stat_bar label="資產" name="assetkbitstat"/> - <stat_bar label="Layers" name="layerskbitstat"/> - <stat_bar label="Actual In" name="actualinkbitstat"/> - <stat_bar label="Actual Out" name="actualoutkbitstat"/> - <stat_bar label="VFS Pending Ops" name="vfspendingoperations"/> + <stat_bar label="層次" name="layerskbitstat"/> + <stat_bar label="實入" name="actualinkbitstat"/> + <stat_bar label="實出" name="actualoutkbitstat"/> + <stat_bar label="VFS 待行作æ¥" name="vfspendingoperations"/> </stat_view> </stat_view> <stat_view label="模擬器" name="sim"> - <stat_bar label="Time Dilation" name="simtimedilation"/> - <stat_bar label="Sim FPS" name="simfps"/> - <stat_bar label="Physics FPS" name="simphysicsfps"/> - <stat_view label="Physics Details" name="physicsdetail"> - <stat_bar label="Pinned Objects" name="physicspinnedtasks"/> - <stat_bar label="Low LOD Objects" name="physicslodtasks"/> + <stat_bar label="時間膨脹" name="simtimedilation"/> + <stat_bar label="模擬器æ¯ç§’幀數" name="simfps"/> + <stat_bar label="物ç†å¼•擎æ¯ç§’幀數" name="simphysicsfps"/> + <stat_view label="物ç†ç´°ç¯€" name="physicsdetail"> + <stat_bar label="固ä½ç‰©ä»¶" name="physicspinnedtasks"/> + <stat_bar label="低細節層次物件" name="physicslodtasks"/> <stat_bar label="記憶體é…ç½®" name="physicsmemoryallocated"/> </stat_view> - <stat_bar label="Agent Updates/Sec" name="simagentups"/> - <stat_bar label="Main Agents" name="simmainagents"/> - <stat_bar label="Child Agents" name="simchildagents"/> + <stat_bar label="用戶更新 / ç§’" name="simagentups"/> + <stat_bar label="主è¦ç”¨æˆ¶" name="simmainagents"/> + <stat_bar label="兒童用戶" name="simchildagents"/> <stat_bar label="物件" name="simobjects"/> - <stat_bar label="Active Objects" name="simactiveobjects"/> - <stat_bar label="Active Scripts" name="simactivescripts"/> + <stat_bar label="使用ä¸ç‰©ä»¶" name="simactiveobjects"/> + <stat_bar label="使用ä¸è…³æœ¬" name="simactivescripts"/> + <stat_bar label="腳本執行" name="simpctscriptsrun"/> <stat_bar label="腳本事件" name="simscripteps"/> + <stat_view label="尋徑" name="simpathfinding"> + <stat_bar label="人工智慧æ¥é©Ÿæ™‚é–“" name="simsimaistepmsec"/> + <stat_bar label="已略éŽè¼ªå»“æ¥é©Ÿ" name="simsimskippedsilhouettesteps"/> + <stat_bar label="角色已更新" name="simsimpctsteppedcharacters"/> + </stat_view> <stat_bar label="進入å°åŒ…" name="siminpps"/> <stat_bar label="出去å°åŒ…" name="simoutpps"/> <stat_bar label="擱置下載" name="simpendingdownloads"/> <stat_bar label="擱置上傳" name="simpendinguploads"/> - <stat_bar label="Total Unacked Bytes" name="simtotalunackedbytes"/> - <stat_view label="Time (ms)" name="simperf"> - <stat_bar label="Total Frame Time" name="simframemsec"/> - <stat_bar label="Net Time" name="simnetmsec"/> - <stat_bar label="Physics Time" name="simsimphysicsmsec"/> - <stat_bar label="Simulation Time" name="simsimothermsec"/> - <stat_bar label="Agent Time" name="simagentmsec"/> - <stat_bar label="Images Time" name="simimagesmsec"/> + <stat_bar label="未承èªçš„總ä½å…ƒçµ„數" name="simtotalunackedbytes"/> + <stat_view label="時間(毫秒)" name="simperf"> + <stat_bar label="總禎時間" name="simframemsec"/> + <stat_bar label="淨時間" name="simnetmsec"/> + <stat_bar label="ç‰©ç†æ™‚é–“" name="simsimphysicsmsec"/> + <stat_bar label="模擬時間" name="simsimothermsec"/> + <stat_bar label="用戶時間" name="simagentmsec"/> + <stat_bar label="åœ–åƒæ™‚é–“" name="simimagesmsec"/> <stat_bar label="腳本時間" name="simscriptmsec"/> + <stat_bar label="閒置時間" name="simsparemsec"/> + <stat_view label="時間細節(毫秒)" name="timedetails"> + <stat_bar label="ç‰©ç†æ¥é©Ÿ" name="simsimphysicsstepmsec"/> + <stat_bar label="更新物ç†å½¢ç‹€" name="simsimphysicsshapeupdatemsec"/> + <stat_bar label="物ç†ï¼ˆå…¶ä»–)" name="simsimphysicsothermsec"/> + <stat_bar label="ç¡çœ 時間" name="simsleepmsec"/> + <stat_bar label="Pump IO" name="simpumpiomsec"/> + </stat_view> </stat_view> </stat_view> </container_view> diff --git a/indra/newview/skins/default/xui/zh/floater_sys_well.xml b/indra/newview/skins/default/xui/zh/floater_sys_well.xml index fd27e944ac..ca0b7f146d 100644 --- a/indra/newview/skins/default/xui/zh/floater_sys_well.xml +++ b/indra/newview/skins/default/xui/zh/floater_sys_well.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="sys_well_window" title="通知"> <string name="title_im_well_window"> - CONVERSATIONS + 交談 </string> <string name="title_notification_well_window"> 通知 diff --git a/indra/newview/skins/default/xui/zh/floater_telehub.xml b/indra/newview/skins/default/xui/zh/floater_telehub.xml index b4c9f3ab29..ee21a78e90 100644 --- a/indra/newview/skins/default/xui/zh/floater_telehub.xml +++ b/indra/newview/skins/default/xui/zh/floater_telehub.xml @@ -1,29 +1,29 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Explicit left edge to avoid overlapping build tools --> -<floater name="telehub" title="TELEHUB"> +<floater name="telehub" title="瞬間傳é€ä¸å¿ƒ"> <text name="status_text_connected"> - Telehub connected to object [OBJECT] + 瞬間傳é€ä¸å¿ƒå·²é€£é€šç‰©ä»¶ [OBJECT] </text> <text name="status_text_not_connected"> - No telehub connected. + 無連通的瞬間傳é€ä¸å¿ƒã€‚ </text> <text name="help_text_connected"> - To remove, click Disconnect. + é»žæŒ‰ã€Œä¸æ–·ã€å³å¯ç§»é™¤ã€‚ </text> <text name="help_text_not_connected"> - Select object and click Connect Telehub. + 鏿“‡ç‰©ä»¶ï¼Œä¸¦é»žæŒ‰ã€Œé€£é€šçž¬é–“傳é€ä¸å¿ƒã€ã€‚ </text> - <button label="Connect Telehub" name="connect_btn"/> - <button label="Disconnect" name="disconnect_btn"/> + <button label="連通瞬間傳é€ä¸å¿ƒ" name="connect_btn"/> + <button label="䏿–·" name="disconnect_btn"/> <text name="spawn_points_text"> - Spawn Points (positions, not objects): + 產生點(ä½ç½®è€Œéžç‰©ä»¶ï¼‰ï¼š </text> - <button label="Add Spawn" name="add_spawn_point_btn"/> - <button label="Remove Spawn" name="remove_spawn_point_btn"/> + <button label="新增產生" name="add_spawn_point_btn"/> + <button label="移除產生" name="remove_spawn_point_btn"/> <text name="spawn_point_help"> - Select object and click "Add Spawn" to specify position. -You can then move or delete the object. -Positions are relative to the telehub center. -Select an item in list to highlight it inworld. + 鏿“‡ç‰©ä»¶ï¼Œä¸¦é»žæŒ‰ã€Œæ–°å¢žç”¢ç”Ÿã€ä¾†æŒ‡å®šä½ç½®ã€‚ +ä½ å¯ä»¥æŽ¥è‘—移動或刪除該物件。 +ä½ç½®æ˜¯èˆ‡çž¬é–“傳é€ä¸å¿ƒç›¸å°ã€‚ +從清單ä¸é¸å–ä¸€é …ï¼Œåœ¨è™›æ“¬ä¸–ç•Œä¸ä»¥é«˜äº®é¡¯ç¤ºã€‚ </text> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_test_layout_stacks.xml b/indra/newview/skins/default/xui/zh/floater_test_layout_stacks.xml new file mode 100644 index 0000000000..68fcf3f7f7 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_test_layout_stacks.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Test Floater" title="LAYOUTSTACK 測試"/> diff --git a/indra/newview/skins/default/xui/zh/floater_test_text_vertical_aligment.xml b/indra/newview/skins/default/xui/zh/floater_test_text_vertical_aligment.xml new file mode 100644 index 0000000000..83b6df6fe5 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_test_text_vertical_aligment.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Test Floater" title="測試浮動視窗"/> diff --git a/indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml index 01586ac153..e909a67e2c 100644 --- a/indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml @@ -1,23 +1,35 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="texture picker" title="PICK: TEXTURE"> +<floater name="texture picker" title="ç²¾é¸ï¼šæè³ª"> <floater.string name="choose_picture"> - 點擊以挑é¸åœ–åƒ + 點按以挑é¸åœ–片 </floater.string> <floater.string name="pick title"> - Pick: + ç²¾é¸åœ°é»žï¼š </floater.string> <text name="Multiple"> - Multiple textures + å¤šé‡æè³ª </text> + <radio_group name="mode_selection"> + <radio_item label="æ”¶ç´å€" name="inventory" value="0"/> + <radio_item label="本地" name="local" value="1"/> + </radio_group> <text name="unknown"> 尺寸:[DIMENSIONS] </text> <button label="é è¨" label_selected="é è¨" name="Default"/> + <button label="空白" label_selected="空白" name="Blank"/> <button label="ç„¡" label_selected="ç„¡" name="None"/> - <button label="Blank" label_selected="Blank" name="Blank"/> - <check_box initial_value="true" label="ç«‹å³å¥—用" name="apply_immediate_check"/> + <check_box initial_value="true" label="實時é 覽" name="apply_immediate_check"/> + <text name="preview_disabled" value="å·²åœç”¨é 覽"/> <filter_editor label="æè³ªéŽæ¿¾å™¨" name="inventory search editor"/> <check_box initial_value="false" label="顯示資料夾" name="show_folders_check"/> + <button label="æ·»åŠ " label_selected="æ·»åŠ " name="l_add_btn"/> + <button label="移除" label_selected="移除" name="l_rem_btn"/> + <button label="上傳" label_selected="上傳" name="l_upl_btn"/> + <scroll_list name="l_name_list"> + <column label="å稱" name="unit_name"/> + <column label="ID" name="unit_id_HIDDEN"/> + </scroll_list> <button label="確定" label_selected="確定" name="Select"/> <button label="å–æ¶ˆ" label_selected="å–æ¶ˆ" name="Cancel"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/zh/floater_texture_fetch_debugger.xml new file mode 100644 index 0000000000..0dcac17a75 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_texture_fetch_debugger.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="TexFetchDebugger" title="æè³ªæ“·å–除錯器"> + <text name="total_num_fetched_label"> + 1. å·²æ“·å–æè³ªç¸½æ•¸ï¼š[NUM] + </text> + <text name="total_num_fetching_requests_label"> + 2. 總擷å–請求數:[NUM] + </text> + <text name="total_num_cache_hits_label"> + 3. å¿«å–ç¸½è®€å–æ•¸ï¼š[NUM] + </text> + <text name="total_num_visible_tex_label"> + 4. å¯è¦‹æè³ªç¸½æ•¸ï¼š[NUM] + </text> + <text name="total_num_visible_tex_fetch_req_label"> + 5. å¯è¦‹æè³ªæ“·å–總請求數:[NUM] + </text> + <text name="total_fetched_data_label"> + 6. 總擷å–資料é‡ï¼š[SIZE1] KB,解碼資料é‡ï¼š[SIZE2] KB,[PIXEL] 百è¬åƒç´ + </text> + <text name="total_fetched_vis_data_label"> + 7. å¯è¦‹è³‡æ–™ç¸½é‡ï¼š[SIZE1] KB,解碼資料é‡ï¼š[SIZE2] KB + </text> + <text name="total_fetched_rendered_data_label"> + 8. 總呈åƒè³‡æ–™é‡ï¼š[SIZE1] KB,解碼資料é‡ï¼š[SIZE2] KB,[PIXEL] 百è¬åƒç´ + </text> + <text name="total_time_cache_read_label"> + 9. å¿«å–讀å–總時間:[TIME] ç§’ + </text> + <text name="total_time_cache_write_label"> + 10. å¿«å–寫入總時間:[TIME] ç§’ + </text> + <text name="total_time_decode_label"> + 11. 解碼總時間:[TIME] ç§’ + </text> + <text name="total_time_gl_label"> + 12. 建立 gl æè³ªç¸½æ™‚間:[TIME] ç§’ + </text> + <text name="total_time_http_label"> + 13. HTTP æ“·å–總時間:[TIME] ç§’ + </text> + <text name="total_time_fetch_label"> + 14. 所有擷å–動作總時間:[TIME] ç§’ + </text> + <text name="total_time_refetch_vis_cache_label"> + 15. 自快å–釿–°æ“·å–å¯è¦‹æè³ªï¼Œæ™‚間:[TIME] 秒,擷å–é‡ï¼š[SIZE] KB,[PIXEL] 百è¬åƒç´ + </text> + <text name="total_time_refetch_all_cache_label"> + 16. 從快å–釿–°æ“·å–所有æè³ªï¼Œæ™‚間:[TIME] 秒,擷å–é‡ï¼š[SIZE] KB,[PIXEL] 百è¬åƒç´ + </text> + <text name="total_time_refetch_vis_http_label"> + 17. 自 HTTP 釿–°æ“·å–å¯è¦‹æè³ªï¼Œæ™‚間:[TIME] 秒,擷å–é‡ï¼š[SIZE] KB,[PIXEL] 百è¬åƒç´ + </text> + <text name="total_time_refetch_all_http_label"> + 18. 自 HTTP 釿–°æ“·å–所有æè³ªï¼Œæ™‚間:[TIME] 秒,擷å–é‡ï¼š[SIZE] KB,[PIXEL] 百è¬åƒç´ + </text> + <spinner label="19. æè³ª/åƒç´ 比率:" name="texel_pixel_ratio"/> + <text name="texture_source_label"> + 20. æè³ªä¾†æºï¼š + </text> + <radio_group name="texture_source"> + <radio_item label="å¿«å– + HTTP" name="0"/> + <radio_item label="åƒ…é™ HTTP" name="1"/> + </radio_group> + <button label="é–‹å§‹" name="start_btn"/> + <button label="é‡è¨" name="clear_btn"/> + <button label="關閉" name="close_btn"/> + <button label="å¿«å–讀å–" name="cacheread_btn"/> + <button label="å¿«å–寫入" name="cachewrite_btn"/> + <button label="HTTP" name="http_btn"/> + <button label="解碼" name="decode_btn"/> + <button label="GL æè³ª" name="gl_btn"/> + <button label="å¿«å–é‡å–å¯è¦‹æè³ª" name="refetchviscache_btn"/> + <button label="釿–°æ“·å–所有快å–" name="refetchallcache_btn"/> + <button label="HTTP é‡å–å¯è¦‹æè³ª" name="refetchvishttp_btn"/> + <button label="釿–°æ“·å–所有 HTTP" name="refetchallhttp_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_tools.xml b/indra/newview/skins/default/xui/zh/floater_tools.xml index 2db98eb3d7..33c9ebeaf0 100644 --- a/indra/newview/skins/default/xui/zh/floater_tools.xml +++ b/indra/newview/skins/default/xui/zh/floater_tools.xml @@ -1,43 +1,49 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="toolbox floater" short_title="å»ºé€ å·¥å…·"> + <floater.string name="grid_screen_text"> + 螢幕 + </floater.string> + <floater.string name="grid_local_text"> + 本地 + </floater.string> + <floater.string name="grid_world_text"> + 世界 + </floater.string> + <floater.string name="grid_reference_text"> + åƒè€ƒ + </floater.string> + <floater.string name="grid_attachment_text"> + 附件 + </floater.string> <floater.string name="status_rotate"> - Drag colored bands to rotate object + 拖曳色æ¢å¯ä»¥æ—‹è½‰ç‰©ä»¶ </floater.string> <floater.string name="status_scale"> - Click and drag to stretch selected side + 按ä½ä¸¦æ‹–曳,å¯ä»¥æ‹‰ä¼¸æ‰€é¸çš„ä¸€é¢ </floater.string> <floater.string name="status_move"> - Drag to move, shift-drag to copy + 拖曳就會移動,按下 Shift 冿‹–曳則å¯è¤‡è£½ </floater.string> <floater.string name="status_modifyland"> - Click and hold to modify land + 按ä½ä¸æ”¾é–‹ï¼Œå¯ä»¥ä¿®æ”¹åœŸåœ° </floater.string> <floater.string name="status_camera"> - Click and drag to move camera + 按ä½ä¸¦æ‹–曳,å¯ä»¥ç§»å‹•æ”影機 </floater.string> <floater.string name="status_grab"> - Drag to move, Ctrl to lift, Ctrl+Shift to rotate + 拖曳就å¯ç§»å‹•,按下 Ctrl å¯ä»¥æ‹¿èµ·ï¼ŒæŒ‰ä¸‹ Ctrl+Shift å¯ä»¥æ—‹è½‰ </floater.string> <floater.string name="status_place"> - Click inworld to build + 在虛擬世界裡點按一下,å¯ä»¥å»ºè£½ç‰©ä»¶ </floater.string> <floater.string name="status_selectland"> - Click and drag to select land + 按ä½ä¸¦æ‹–曳,å¯ä»¥é¸å–土地 </floater.string> - <floater.string name="grid_screen_text"> - Screen + <floater.string name="status_selectcount"> + é¸å–了 [OBJ_COUNT] å€‹ç‰©ä»¶ï¼ŒåœŸåœ°è¡æ“Šé‡ [LAND_IMPACT] </floater.string> - <floater.string name="grid_local_text"> - Local - </floater.string> - <floater.string name="grid_world_text"> - World - </floater.string> - <floater.string name="grid_reference_text"> - Reference - </floater.string> - <floater.string name="grid_attachment_text"> - Attachment + <floater.string name="status_remaining_capacity"> + 剩餘容ç´é‡ [LAND_CAPACITY]。 </floater.string> <button name="button focus" tool_tip="èšç„¦"/> <button name="button move" tool_tip="移動"/> @@ -45,7 +51,7 @@ <button name="button create" tool_tip="å‰µé€ "/> <button name="button land" tool_tip="土地"/> <text name="text status"> - Drag to move, shift-drag to copy + 拖曳就會移動,按下 Shift 冿‹–曳則å¯è¤‡è£½ </text> <radio_group name="focus_radio_group"> <radio_item label="縮放" name="radio zoom"/> @@ -56,7 +62,7 @@ <radio_group name="move_radio_group"> <radio_item label="移動" name="radio move"/> <radio_item label="舉起(Ctrl)" name="radio lift"/> - <radio_item label="Spin (Ctrl+Shift)" name="radio spin"/> + <radio_item label="旋轉(Ctrl+Shift)" name="radio spin"/> </radio_group> <radio_group name="edit_radio_group"> <radio_item label="移動" name="radio position"/> @@ -67,39 +73,36 @@ <check_box label="編輯è¯çµéƒ¨åˆ†" name="checkbox edit linked parts"/> <button label="è¯çµ" name="link_btn"/> <button label="å–æ¶ˆè¯çµ" name="unlink_btn"/> - <text name="RenderingCost" tool_tip="Shows the rendering cost calculated for this object"> - þ: [COUNT] - </text> <text label="åŒæ™‚伸展兩å´" name="checkbox uniform label"> åŒæ™‚ä¼¸å±•å…©å´ </text> <check_box initial_value="true" label="伸展æè³ª" name="checkbox stretch textures"/> - <check_box initial_value="true" label="è²¼é½Šæ ¼ç·š" name="checkbox snap to grid"/> + <check_box initial_value="true" label="Snap" name="checkbox snap to grid"/> <combo_box name="combobox grid mode" tool_tip="鏿“‡ç‰©ä»¶å®šä½åƒè€ƒçš„æ ¼ç·šå°ºåº¦é¡žåž‹"> - <combo_box.item label="ä¸–ç•Œæ ¼ç·š" name="World"/> - <combo_box.item label="åœ°æ–¹æ ¼ç·š" name="Local"/> - <combo_box.item label="åƒè€ƒæ ¼ç·š" name="Reference"/> + <combo_box.item label="世界" name="World"/> + <combo_box.item label="本地" name="Local"/> + <combo_box.item label="åƒè€ƒ" name="Reference"/> </combo_box> - <button name="Options..." tool_tip="å¯Ÿçœ‹æ›´å¤šæ ¼ç·šé¸é …"/> - <button name="ToolCube" tool_tip="Cube"/> - <button name="ToolPrism" tool_tip="Prism"/> - <button name="ToolPyramid" tool_tip="Pyramid"/> - <button name="ToolTetrahedron" tool_tip="Tetrahedron"/> - <button name="ToolCylinder" tool_tip="Cylinder"/> - <button name="ToolHemiCylinder" tool_tip="Hemicylinder"/> - <button name="ToolCone" tool_tip="Cone"/> - <button name="ToolHemiCone" tool_tip="Hemicone"/> - <button name="ToolSphere" tool_tip="Sphere"/> - <button name="ToolHemiSphere" tool_tip="Hemisphere"/> - <button name="ToolTorus" tool_tip="Torus"/> - <button name="ToolTube" tool_tip="Tube"/> - <button name="ToolRing" tool_tip="Ring"/> - <button name="ToolTree" tool_tip="Tree"/> - <button name="ToolGrass" tool_tip="Grass"/> + <button label="" name="Options..." tool_tip="å¯Ÿçœ‹æ›´å¤šæ ¼ç·šé¸é …"/> + <button name="ToolCube" tool_tip="立方體"/> + <button name="ToolPrism" tool_tip="稜é¡é«”"/> + <button name="ToolPyramid" tool_tip="金å—å¡”"/> + <button name="ToolTetrahedron" tool_tip="æ£å››é¢é«”"/> + <button name="ToolCylinder" tool_tip="圓柱體"/> + <button name="ToolHemiCylinder" tool_tip="åŠåœ“柱體"/> + <button name="ToolCone" tool_tip="圓éŒ"/> + <button name="ToolHemiCone" tool_tip="åŠåœ“éŒ"/> + <button name="ToolSphere" tool_tip="çƒé«”"/> + <button name="ToolHemiSphere" tool_tip="åŠçƒé«”"/> + <button name="ToolTorus" tool_tip="ç’°é¢"/> + <button name="ToolTube" tool_tip="圓管"/> + <button name="ToolRing" tool_tip="圓環"/> + <button name="ToolTree" tool_tip="樹木"/> + <button name="ToolGrass" tool_tip="è‰åœ°"/> <check_box label="ä¿æŒå·²é¸æ“‡çš„工具" name="checkbox sticky"/> - <check_box label="è¦†è£½é¸æ“‡" name="checkbox copy selection"/> - <check_box initial_value="true" label="Center Copy" name="checkbox copy centers"/> - <check_box label="Rotate Copy" name="checkbox copy rotates"/> + <check_box label="è¤‡è£½é¸æ“‡" name="checkbox copy selection"/> + <check_box initial_value="true" label="複製物置ä¸" name="checkbox copy centers"/> + <check_box label="旋轉複製物" name="checkbox copy rotates"/> <radio_group name="land_radio_group"> <radio_item label="鏿“‡åœŸåœ°" name="radio select land"/> <radio_item label="攤平" name="radio flatten"/> @@ -121,11 +124,11 @@ </text> <slider_bar initial_value="0.00" name="slider force"/> <button label="套用" label_selected="套用" name="button apply to selection" tool_tip="ä¿®æ”¹æ‰€é¸æ“‡çš„土地"/> - <text name="obj_count"> - 物件: [COUNT] + <text name="selection_empty"> + 未åšä»»ä½•鏿“‡ã€‚ </text> - <text name="prim_count"> - 幾何元件: [COUNT] + <text name="remaining_capacity"> + [CAPACITY_STRING] [secondlife:///app/openfloater/object_weights 詳情] </text> <tab_container name="Object Info Tabs"> <panel label="一般" name="General"> @@ -147,6 +150,12 @@ <panel.string name="text modify info 4"> ä½ ä¸èƒ½ä¿®æ”¹é€™äº›ç‰©ä»¶ </panel.string> + <panel.string name="text modify info 5"> + 無法跨地å€ä¿®æ”¹é€™å€‹ç‰©ä»¶ + </panel.string> + <panel.string name="text modify info 6"> + 無法跨地å€ä¿®æ”¹é€™äº›ç‰©ä»¶ + </panel.string> <panel.string name="text modify warning"> ä½ å¿…é ˆé¸å–整個物件以è¨å®šæ¬Šé™ </panel.string> @@ -154,16 +163,16 @@ åƒ¹æ ¼ï¼š L$ </panel.string> <panel.string name="Cost Total"> - 總價: L$ + 總價:L$ </panel.string> <panel.string name="Cost Per Unit"> - 單價æ¯å€‹ï¼š L$ + 單價:L$ </panel.string> <panel.string name="Cost Mixed"> - Mixed Price + æ··åˆåƒ¹æ ¼ </panel.string> <panel.string name="Sale Mixed"> - Mixed Sale + æ··åˆéŠ·å”® </panel.string> <text name="Name:"> å稱: @@ -175,49 +184,49 @@ å‰µé€ è€…ï¼š </text> <text name="Owner:"> - æ“æœ‰è€…: + 所有人: </text> <text name="Group:"> 群組: </text> <name_box initial_value="載入ä¸..." name="Group Name Proxy"/> - <button name="button set group" tool_tip="鏿“‡ä¸€å€‹ç¾¤çµ„以分享這物件權é™"/> - <check_box label="分享" name="checkbox share with group" tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."/> - <button label="讓渡" label_selected="讓渡" name="button deed" tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer."/> + <button name="button set group" tool_tip="鏿“‡ä¸€å€‹ç¾¤çµ„以分享這物件的權é™"/> + <check_box label="分享" name="checkbox share with group" tool_tip="å…許æ¤ç¾¤çµ„所有æˆå“¡å…±äº«ä½ 修改æ¤ç‰©ä»¶çš„æ¬Šé™ã€‚ ä½ å¿…é ˆè®“æ¸¡æ‰èƒ½å•Ÿå‹•角色é™åˆ¶ã€‚"/> + <button label="讓渡" label_selected="讓渡" name="button deed" tool_tip="ã€Œè®“æ¸¡ã€æœƒæŠŠé€™ç‰©ä»¶è´ˆé€å‡ºåŽ»ä¸¦è³¦äºˆã€Œä¸‹ä¸€å€‹æ‰€æœ‰äººã€æ¬Šé™ã€‚ 群組所分享的物件å¯ç”±ç¾¤çµ„è·å“¡åŠ ä»¥è®“æ¸¡ã€‚"/> <text name="label click action"> - 點擊以: + 點按以: </text> <combo_box name="clickaction"> <combo_box.item label="觸碰(é è¨ï¼‰" name="Touch/grab(default)"/> <combo_box.item label="å在物件上" name="Sitonobject"/> <combo_box.item label="購買物件" name="Buyobject"/> <combo_box.item label="支付物件" name="Payobject"/> - <combo_box.item label="開啟" name="Open"/> + <combo_box.item label="打開" name="Open"/> <combo_box.item label="縮放" name="Zoom"/> </combo_box> - <check_box label="出售:" name="checkbox for sale"/> + <check_box label="出售ä¸ï¼š" name="checkbox for sale"/> + <spinner label="L$" name="Edit Cost"/> <combo_box name="sale type"> - <combo_box.item label="副本" name="Copy"/> + <combo_box.item label="æšåº¨" name="Copy"/> <combo_box.item label="內容" name="Contents"/> <combo_box.item label="原件" name="Original"/> </combo_box> - <spinner label="åƒ¹æ ¼ï¼š L$" name="Edit Cost"/> - <check_box label="顯示在æœå°‹ä¸" name="search_check" tool_tip="讓其他人å¯ä»¥åœ¨æœå°‹çµæžœä¸çœ‹åˆ°é€™ç‰©ä»¶"/> + <check_box label="顯示在æœå°‹ä¸" name="search_check" tool_tip="讓其他人å¯ä»¥åœ¨æœå°‹çµæžœä¸å¯Ÿçœ‹åˆ°æ¤ç‰©ä»¶"/> <panel name="perms_build"> <text name="perm_modify"> - ä½ å¯ä»¥ä¿®æ”¹é€™å€‹ç‰©ä»¶ + ä½ èƒ½ä¿®æ”¹é€™å€‹ç‰©ä»¶ </text> <text name="Anyone can:"> 任何人: </text> <check_box label="移動" name="checkbox allow everyone move"/> - <check_box label="覆製" name="checkbox allow everyone copy"/> + <check_box label="æšåº¨" name="checkbox allow everyone copy"/> <text name="Next owner can:"> - ä¸‹ä¸€å€‹æ“æœ‰è€…: + 下一個所有人: </text> <check_box label="修改" name="checkbox next owner can modify"/> - <check_box label="覆製" name="checkbox next owner can copy"/> - <check_box label="轉移" name="checkbox next owner can transfer" tool_tip="ä¸‹ä¸€å€‹æ“æœ‰è€…å¯ä»¥é€äººæˆ–轉售這個物件"/> + <check_box label="æšåº¨" name="checkbox next owner can copy"/> + <check_box label="轉移" name="checkbox next owner can transfer" tool_tip="下一個所有人å¯è´ˆé€æˆ–轉售這個物件"/> <text name="B:"> B: </text> @@ -237,9 +246,14 @@ F: </text> </panel> + <panel name="pathfinding_attrs_panel"> + <text name="pathfinding_attributes_label"> + 尋徑屬性: + </text> + </panel> </panel> <panel label="物件" name="Object"> - <check_box label="鎖定" name="checkbox locked" tool_tip="é é˜²ç‰©ä»¶è¢«ç§»å‹•æˆ–åˆªé™¤ï¼Œæœ€å¸¸ä½¿ç”¨çš„ç‹€æ³æ˜¯åœ¨å»ºé€ éŽç¨‹ä¸é¿å…被æ„外的編輯。"/> + <check_box label="已鎖ä½" name="checkbox locked" tool_tip="é¿å…物件被移動或刪除。 這在建製éŽç¨‹ä¸éžå¸¸æœ‰ç”¨ï¼Œå¯é¿å…æ„外的編輯更動。"/> <check_box label="ç‰©ç†æ€§" name="Physical Checkbox Ctrl" tool_tip="å…許物件被推撞與å—é‡åŠ›å½±éŸ¿"/> <check_box label="暫時性" name="Temporary Checkbox Ctrl" tool_tip="ä½¿ç‰©ä»¶åœ¨å»ºé€ å¾Œçš„ä¸€åˆ†é˜è‡ªå‹•刪除"/> <check_box label="幻影性" name="Phantom Checkbox Ctrl" tool_tip="ä½¿ç‰©ä»¶ä¸æœƒèˆ‡å…¶ä»–物件或化身產生碰撞"/> @@ -262,26 +276,17 @@ <spinner label="Y" name="Rot Y"/> <spinner label="Z" name="Rot Z"/> <combo_box name="comboBaseType"> - <combo_box.item label="Box" name="Box"/> - <combo_box.item label="Cylinder" name="Cylinder"/> - <combo_box.item label="Prism" name="Prism"/> - <combo_box.item label="Sphere" name="Sphere"/> - <combo_box.item label="Torus" name="Torus"/> - <combo_box.item label="Tube" name="Tube"/> - <combo_box.item label="Ring" name="Ring"/> - <combo_box.item label="Sculpted" name="Sculpted"/> - </combo_box> - <combo_box name="material"> - <combo_box.item label="石é " name="Stone"/> - <combo_box.item label="金屬" name="Metal"/> - <combo_box.item label="玻璃" name="Glass"/> - <combo_box.item label="木é " name="Wood"/> - <combo_box.item label="肌肉" name="Flesh"/> - <combo_box.item label="å¡‘è† " name="Plastic"/> - <combo_box.item label="æ©¡è† " name="Rubber"/> + <combo_box.item label="ç®±å" name="Box"/> + <combo_box.item label="圓柱體" name="Cylinder"/> + <combo_box.item label="稜é¡é«”" name="Prism"/> + <combo_box.item label="çƒé«”" name="Sphere"/> + <combo_box.item label="ç’°é¢" name="Torus"/> + <combo_box.item label="圓管" name="Tube"/> + <combo_box.item label="圓環" name="Ring"/> + <combo_box.item label="雕刻的" name="Sculpted"/> </combo_box> <text name="text cut"> - Path Cut (begin/end) + 路徑切斷(開始 / çµæŸï¼‰ </text> <spinner label="B" name="cut begin"/> <spinner label="E" name="cut end"/> @@ -289,24 +294,24 @@ ä¸ç©º </text> <text name="text skew"> - Skew + åæ–œ </text> <text name="Hollow Shape"> ä¸ç©ºå½¢ç‹€ </text> <combo_box name="hole"> <combo_box.item label="é è¨" name="Default"/> - <combo_box.item label="Circle" name="Circle"/> - <combo_box.item label="Square" name="Square"/> - <combo_box.item label="Triangle" name="Triangle"/> + <combo_box.item label="圓圈" name="Circle"/> + <combo_box.item label="方形" name="Square"/> + <combo_box.item label="三角形" name="Triangle"/> </combo_box> <text name="text twist"> - Twist (begin/end) + æ‰æ›²ï¼ˆé–‹å§‹ / çµæŸï¼‰ </text> <spinner label="B" name="Twist Begin"/> <spinner label="E" name="Twist End"/> <text name="scale_taper"> - Taper + éŒåŒ– </text> <text name="scale_hole"> 洞尺寸 @@ -314,54 +319,62 @@ <spinner label="X" name="Taper Scale X"/> <spinner label="Y" name="Taper Scale Y"/> <text name="text topshear"> - Top Shear + é ‚éƒ¨æ–œè®Š </text> <spinner label="X" name="Shear X"/> <spinner label="Y" name="Shear Y"/> <text name="advanced_cut"> - Profile Cut (begin/end) + å´é¢åˆ‡æ–·ï¼ˆé–‹å§‹ / çµæŸï¼‰ </text> <text name="advanced_dimple"> - Dimple (begin/end) + 凹陷(開始 / çµæŸï¼‰ </text> <text name="advanced_slice"> - Slice (begin/end) + Slice(開始 / çµæŸï¼‰ </text> <spinner label="B" name="Path Limit Begin"/> <spinner label="E" name="Path Limit End"/> <text name="text taper2"> - Taper + éŒåŒ– </text> <spinner label="X" name="Taper X"/> <spinner label="Y" name="Taper Y"/> <text name="text radius delta"> - Radius + åŠå¾‘ </text> <text name="text revolutions"> - Revolutions + 旋轉 </text> - <texture_picker label="Sculpt Texture" name="sculpt texture control" tool_tip="點擊以挑é¸åœ–åƒ"/> - <check_box label="Mirror" name="sculpt mirror control" tool_tip="Flips sculpted prim along the X axis"/> - <check_box label="Inside-out" name="sculpt invert control" tool_tip="Inverts the sculpted prims normals, making it appear inside-out"/> + <texture_picker label="雕刻æè³ª" name="sculpt texture control" tool_tip="點按以挑é¸åœ–片"/> + <check_box label="é¡åƒ" name="sculpt mirror control" tool_tip="沿X軸翻轉雕刻幾何元件"/> + <check_box label="內外倒翻" name="sculpt invert control" tool_tip="將雕刻幾何元件的æ£å¸¸å€¼é¡›å€’,使其看來有如內外倒翻"/> <text name="label sculpt type"> - Stitching type + 縫åˆé¡žåž‹ </text> <combo_box name="sculpt type control"> - <combo_box.item label="(無)" name="None"/> - <combo_box.item label="Sphere" name="Sphere"/> - <combo_box.item label="Torus" name="Torus"/> - <combo_box.item label="Plane" name="Plane"/> - <combo_box.item label="Cylinder" name="Cylinder"/> + <combo_box.item label="çƒé«”" name="Sphere"/> + <combo_box.item label="ç’°é¢" name="Torus"/> + <combo_box.item label="å¹³é¢" name="Plane"/> + <combo_box.item label="圓柱體" name="Cylinder"/> </combo_box> </panel> <panel label="特性" name="Features"> + <panel.string name="None"> + ç„¡ + </panel.string> + <panel.string name="Prim"> + 幾何元件 + </panel.string> + <panel.string name="Convex Hull"> + 凸包 + </panel.string> <text name="select_single"> åªèƒ½é¸æ“‡ä¸€å€‹å¹¾ä½•元件去編輯細節。 </text> <text name="edit_object"> 編輯物件特性: </text> - <check_box label="彈性路徑" name="Flexible1D Checkbox Ctrl" tool_tip="Allows object to flex about the Z axis (Client-side only)"/> + <check_box label="彈性路徑" name="Flexible1D Checkbox Ctrl" tool_tip="å…許物件繞 Z 軸伸展(僅é™å®¢æˆ¶ç«¯ï¼‰"/> <spinner label="柔軟" name="FlexNumSections"/> <spinner label="é‡åŠ›" name="FlexGravity"/> <spinner label="拖曳" name="FlexFriction"/> @@ -371,14 +384,31 @@ <spinner label="強制 Y 軸" name="FlexForceY"/> <spinner label="強制 Z 軸" name="FlexForceZ"/> <check_box label="å…‰æº" name="Light Checkbox Ctrl" tool_tip="導致物件發光"/> - <color_swatch name="colorswatch" tool_tip="點擊以開啟é¡è‰²æŒ‘é¸å™¨"/> - <texture_picker label="" name="light texture control" tool_tip="Click to choose a projection image (only has effect with deferred rendering enabled)"/> + <color_swatch name="colorswatch" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> + <texture_picker label="" name="light texture control" tool_tip="é»žé¸æŠ•å½±åœ–åƒï¼ˆåªåœ¨å•Ÿç”¨å»¶é²å‘ˆåƒæ™‚生效)"/> <spinner label="強度" name="Light Intensity"/> - <spinner label="FOV" name="Light FOV"/> + <spinner label="視角" name="Light FOV"/> <spinner label="åŠå¾‘" name="Light Radius"/> - <spinner label="Focus" name="Light Focus"/> + <spinner label="焦點" name="Light Focus"/> <spinner label="衰減" name="Light Falloff"/> - <spinner label="Ambiance" name="Light Ambiance"/> + <spinner label="環境" name="Light Ambiance"/> + <text name="label physicsshapetype"> + 物ç†å½¢ç‹€é¡žåž‹ï¼š + </text> + <combo_box name="Physics Shape Type Combo Ctrl" tool_tip="鏿“‡ç‰©ç†å½¢ç‹€é¡žåž‹"/> + <combo_box name="material"> + <combo_box.item label="石é " name="Stone"/> + <combo_box.item label="金屬" name="Metal"/> + <combo_box.item label="玻璃" name="Glass"/> + <combo_box.item label="木é " name="Wood"/> + <combo_box.item label="肌肉" name="Flesh"/> + <combo_box.item label="å¡‘è† " name="Plastic"/> + <combo_box.item label="æ©¡è† " name="Rubber"/> + </combo_box> + <spinner label="é‡åŠ›" name="Physics Gravity"/> + <spinner label="摩擦" name="Physics Friction"/> + <spinner label="密度(100 公斤 / 立方公尺)" name="Physics Density"/> + <spinner label="æ¢å¾©" name="Physics Restitution"/> </panel> <panel label="æè³ª" name="Texture"> <panel.string name="string repeats per meter"> @@ -387,8 +417,8 @@ <panel.string name="string repeats per face"> æ¯ä¸€é¢é‡è¦†æ¬¡æ•¸ </panel.string> - <texture_picker label="æè³ª" name="texture control" tool_tip="點擊以挑é¸åœ–åƒ"/> - <color_swatch label="é¡è‰²" name="colorswatch" tool_tip="點擊以開啟é¡è‰²æŒ‘é¸å™¨"/> + <texture_picker label="æè³ª" name="texture control" tool_tip="點按以挑é¸åœ–片"/> + <color_swatch label="é¡è‰²" name="colorswatch" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> <text name="color trans"> 逿˜Žåº¦ % </text> @@ -417,25 +447,25 @@ </text> <combo_box name="combobox bumpiness"> <combo_box.item label="ç„¡" name="None"/> - <combo_box.item label="Brightness" name="Brightness"/> - <combo_box.item label="Darkness" name="Darkness"/> - <combo_box.item label="woodgrain" name="woodgrain"/> - <combo_box.item label="bark" name="bark"/> - <combo_box.item label="bricks" name="bricks"/> - <combo_box.item label="checker" name="checker"/> - <combo_box.item label="concrete" name="concrete"/> - <combo_box.item label="crustytile" name="crustytile"/> - <combo_box.item label="cutstone" name="cutstone"/> - <combo_box.item label="discs" name="discs"/> - <combo_box.item label="gravel" name="gravel"/> - <combo_box.item label="petridish" name="petridish"/> - <combo_box.item label="siding" name="siding"/> - <combo_box.item label="stonetile" name="stonetile"/> - <combo_box.item label="stucco" name="stucco"/> - <combo_box.item label="suction" name="suction"/> - <combo_box.item label="weave" name="weave"/> + <combo_box.item label="亮度" name="Brightness"/> + <combo_box.item label="暗度" name="Darkness"/> + <combo_box.item label="木紋" name="woodgrain"/> + <combo_box.item label="樹皮" name="bark"/> + <combo_box.item label="磚" name="bricks"/> + <combo_box.item label="æ ¼å" name="checker"/> + <combo_box.item label="æ··å‡åœŸ" name="concrete"/> + <combo_box.item label="粗花磚" name="crustytile"/> + <combo_box.item label="石磚" name="cutstone"/> + <combo_box.item label="圓盤" name="discs"/> + <combo_box.item label="碎石" name="gravel"/> + <combo_box.item label="培養皿" name="petridish"/> + <combo_box.item label="å´é‚Šç‰‡" name="siding"/> + <combo_box.item label="çŸ³ç£šæ ¼" name="stonetile"/> + <combo_box.item label="彩色沙岩" name="stucco"/> + <combo_box.item label="å¸é™„" name="suction"/> + <combo_box.item label="編織" name="weave"/> </combo_box> - <check_box initial_value="false" label="å°é½Šå¹³é¢" name="checkbox planar align" tool_tip="ä»¥æœ€å¾Œæ‰€é¸æ“‡çš„é¢ç‚ºåŸºæº–,å°é½Šå…¨éƒ¨æ‰€é¸æ“‡çš„é¢ä¸Šçš„æè³ªã€‚é€™å¿…é ˆä½¿ç”¨å¹³é¢æè³ªæ˜ å°„æ–¹å¼ã€‚"/> + <check_box initial_value="false" label="å°é½Šå¹³é¢" name="checkbox planar align" tool_tip="ä»¥æœ€å¾Œæ‰€é¸æ“‡çš„é¢ç‚ºåŸºæº–,å°é½Šå…¨éƒ¨æ‰€é¸æ“‡çš„é¢ä¸Šçš„æè³ªã€‚ é€™å¿…é ˆä½¿ç”¨å¹³é¢æè³ªæ˜ å°„æ–¹å¼ã€‚"/> <text name="rpt"> é‡è¦†æ¬¡æ•¸ / é¢ </text> @@ -476,15 +506,8 @@ <text name="label_area"> é¢ç©ï¼š [AREA] m² </text> - <button label="關於土地" label_selected="關於土地" name="button about land"/> - <check_box label="é¡¯ç¤ºæ“æœ‰è€…" name="checkbox show owners" tool_tip="Colorize the parcels according to the type of owner: - -ç¶ è‰² = ä½ çš„åœŸåœ° -æ°´è— = ä½ ç¾¤çµ„çš„åœŸåœ° -紅色 = 其他人所有 -黃色 = 出售 -紫色 = æ‹è³£ -ç°è‰² = 公有地"/> + <button label="土地資料" label_selected="土地資料" name="button about land"/> + <check_box label="顯示所有人" name="checkbox show owners" tool_tip="æ ¹æ“šæ‰€æœ‰äººå°‡åœ°æ®µåˆ†é¡žä¸Šè‰²ï¼š ç¶ è‰² = ä½ çš„åœŸåœ° æ°´è— = ä½ ç¾¤çµ„çš„åœŸåœ° 紅色 = 其他人所有 黃色 = 出售 紫色 = æ‹è³£ ç°è‰² = 公有地"/> <text name="label_parcel_modify"> 修改地段 </text> diff --git a/indra/newview/skins/default/xui/zh/floater_top_objects.xml b/indra/newview/skins/default/xui/zh/floater_top_objects.xml index 0e7e0c5b1a..6f50be0855 100644 --- a/indra/newview/skins/default/xui/zh/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/zh/floater_top_objects.xml @@ -1,28 +1,25 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="top_objects" title="Top Objects"> +<floater name="top_objects" title="排行最高的物件"> <floater.string name="top_scripts_title"> - Top Scripts + 排行最高的腳本 </floater.string> <floater.string name="top_scripts_text"> - [COUNT] scripts taking a total of [TIME] ms + [COUNT] 個腳本共需時 [TIME] 毫秒 </floater.string> <floater.string name="scripts_score_label"> - Time - </floater.string> - <floater.string name="scripts_mono_time_label"> - Mono Time + 時間 </floater.string> <floater.string name="top_colliders_title"> - Top Colliders + æœ€å¸¸ç¢°æ’žç‰©é … </floater.string> <floater.string name="top_colliders_text"> - Top [COUNT] objects experiencing many potential collisions + 排行最高的 [COUNT] 個物件å¯èƒ½ç™¼ç”Ÿå¤šæ¬¡ç¢°æ’ž </floater.string> <floater.string name="colliders_score_label"> ç©åˆ† </floater.string> <floater.string name="none_descriptor"> - 未發ç¾ã€‚ + æŸ¥ç„¡çµæžœã€‚ </floater.string> <text name="title_text"> 載入ä¸... @@ -30,11 +27,12 @@ <scroll_list name="objects_list"> <scroll_list.columns label="ç©åˆ†" name="score"/> <scroll_list.columns label="å稱" name="name"/> - <scroll_list.columns label="æ“æœ‰è€…" name="owner"/> + <scroll_list.columns label="所有人" name="owner"/> <scroll_list.columns label="ä½ç½®" name="location"/> - <scroll_list.columns label="Time" name="time"/> - <scroll_list.columns label="Mono Time" name="mono_time"/> - <scroll_list.columns label="URLs" name="URLs"/> + <scroll_list.columns label="地段" name="parcel"/> + <scroll_list.columns label="時間" name="time"/> + <scroll_list.columns label="URL" name="URLs"/> + <scroll_list.columns label="記憶體 (KB)" name="memory"/> </scroll_list> <text name="id_text"> 物件 ID: @@ -45,11 +43,15 @@ </text> <button label="éŽæ¿¾å™¨" name="filter_object_btn"/> <text name="owner_name_text"> - æ“æœ‰è€…: + 所有人: </text> <button label="éŽæ¿¾å™¨" name="filter_owner_btn"/> + <text name="parcel_name_text"> + 地段: + </text> + <button label="éŽæ¿¾å™¨" name="filter_parcel_btn"/> <button label="é€€å›žæ‰€é¸æ“‡çš„" name="return_selected_btn"/> <button label="全部退回" name="return_all_btn"/> - <button label="é—œé–‰æ‰€é¸æ“‡çš„" name="disable_selected_btn"/> - <button label="全部關閉" name="disable_all_btn"/> + <button label="åœç”¨æ‰€é¸çš„" name="disable_selected_btn"/> + <button label="全部åœç”¨" name="disable_all_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_tos.xml b/indra/newview/skins/default/xui/zh/floater_tos.xml index 5f9e16afe1..3da9445a55 100644 --- a/indra/newview/skins/default/xui/zh/floater_tos.xml +++ b/indra/newview/skins/default/xui/zh/floater_tos.xml @@ -4,12 +4,12 @@ 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 + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E æ£åœ¨è¼‰å…¥ %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"/> <check_box label="æˆ‘åŒæ„æŽ¥å—æœå‹™æ¢æ¬¾åŠéš±ç§æ”¿ç–" name="agree_chk"/> <text name="tos_heading"> - 請謹慎閱讀以下的æœå‹™æ¢æ¬¾åŠéš±ç§æ”¿ç–。è¦ç¹¼çºŒç™»å…¥åˆ° [SECOND_LIFE]ï¼Œä½ å¿…é ˆæŽ¥å—這些å”è°ã€‚ + 請仔細閱讀以下æœå‹™æ¢æ¬¾åŠéš±ç§æ”¿ç–。 繼續登入 [SECOND_LIFE] å‰ï¼Œä½ å¿…é ˆåŒæ„æ¢æ¬¾ã€‚ </text> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_toybox.xml b/indra/newview/skins/default/xui/zh/floater_toybox.xml new file mode 100644 index 0000000000..fc6b6ea611 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_toybox.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Toybox" title="工具列按鈕"> + <text name="toybox label 1"> + 將按鈕拖入或拖離工具列,å³å¯æ–°å¢žæˆ–移除該按鈕。 + </text> + <text name="toybox label 2"> + æŒ‰éˆ•å°‡æ ¹æ“šæ¯ä¸€å€‹å·¥å…·åˆ—çš„è¨å®šï¼Œåƒ…é¡¯ç¤ºåœ–ç¤ºæˆ–ä¸€ä½µé¡¯ç¤ºæ–‡å—æ¨™ç±¤ã€‚ + </text> + <button label="清除所有工具列" label_selected="清除所有工具列" name="btn_clear_all"/> + <button label="還原é è¨å€¼" label_selected="還原é è¨å€¼" name="btn_restore_defaults"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_translation_settings.xml b/indra/newview/skins/default/xui/zh/floater_translation_settings.xml new file mode 100644 index 0000000000..fe84872557 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/floater_translation_settings.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_translation_settings" title="èŠå¤©å…§å®¹ç¿»è¯è¨å®š"> + <string name="bing_api_key_not_verified"> + Bing AppID 未通éŽé©—è‰ã€‚ è«‹å†è©¦ä¸€æ¬¡ã€‚ + </string> + <string name="google_api_key_not_verified"> + Google API éµå€¼æœªé€šéŽé©—è‰ã€‚ è«‹å†è©¦ä¸€æ¬¡ã€‚ + </string> + <string name="bing_api_key_verified"> + Bing AppID é©—è‰æˆåŠŸã€‚ + </string> + <string name="google_api_key_verified"> + Google API éµå€¼é©—è‰æˆåŠŸã€‚ + </string> + <check_box label="èŠå¤©æ™‚啟用機器翻è¯" name="translate_chat_checkbox"/> + <text name="translate_language_label"> + å°‡èŠå¤©å…§å®¹ç¿»è¯æˆï¼š + </text> + <combo_box name="translate_language_combo"> + <combo_box.item label="系統é è¨" name="System Default Language"/> + <combo_box.item label="英語" name="English"/> + <combo_box.item label="Dansk(丹麥語)" name="Danish"/> + <combo_box.item label="Deutsch(德語)" name="German"/> + <combo_box.item label="Español(西ç牙語)" name="Spanish"/> + <combo_box.item label="Français(法語)" name="French"/> + <combo_box.item label="Italiano(義大利語)" name="Italian"/> + <combo_box.item label="Magyar(匈牙利語)" name="Hungarian"/> + <combo_box.item label="Nederlands(è·è˜èªžï¼‰" name="Dutch"/> + <combo_box.item label="Polski(波è˜èªžï¼‰" name="Polish"/> + <combo_box.item label="Português(葡è„牙語)" name="Portugese"/> + <combo_box.item label="РуÑÑкий(俄羅斯語)" name="Russian"/> + <combo_box.item label="Türkçe(土耳其語)" name="Turkish"/> + <combo_box.item label="УкраїнÑька(çƒå…‹è˜èªžï¼‰" name="Ukrainian"/> + <combo_box.item label="䏿–‡ï¼ˆæ£é«”)" name="Chinese"/> + <combo_box.item label="日本語(日語)" name="Japanese"/> + <combo_box.item label="한êµì–´ï¼ˆæ¼¢èªžï¼‰" name="Korean"/> + </combo_box> + <text name="tip"> + 鏿“‡ç¿»è¯æœå‹™ï¼š + </text> + <radio_group name="translation_service_rg"> + <radio_item initial_value="bing" label="Bing ç¿»è¯å™¨" name="bing"/> + <radio_item initial_value="google" label="Google ç¿»è¯" name="google"/> + </radio_group> + <text name="bing_api_key_label"> + Bing [http://www.bing.com/developers/createapp.aspx AppID]: + </text> + <button label="é©—è‰" name="verify_bing_api_key_btn"/> + <text name="google_api_key_label"> + Google [http://code.google.com/apis/language/translate/v2/getting_started.html#auth API éµå€¼]: + </text> + <button label="é©—è‰" name="verify_google_api_key_btn"/> + <text name="google_links_text"> + [http://code.google.com/apis/language/translate/v2/pricing.html åƒ¹æ ¼è¡¨] | [https://code.google.com/apis/console 統計] + </text> + <button label="確定" name="ok_btn"/> + <button label="å–æ¶ˆ" name="cancel_btn"/> +</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_voice_controls.xml b/indra/newview/skins/default/xui/zh/floater_voice_controls.xml index 24b7efea4f..a3a7679957 100644 --- a/indra/newview/skins/default/xui/zh/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/zh/floater_voice_controls.xml @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="floater_voice_controls" title="語音控制"> <string name="title_nearby"> - 附近的語音 + 語音è¨å®š </string> <string name="title_group"> 與 [GROUP] 進行群組通話 </string> <string name="title_adhoc"> - 會è°é€šè©± + 多方通話 </string> <string name="title_peer_2_peer"> - 與 [NAME] 進行通話 + å’Œ [NAME] 通話 </string> <string name="no_one_near"> 附近沒有一人開啟語音 @@ -22,7 +22,7 @@ <layout_panel name="leave_call_panel"> <layout_stack name="voice_effect_and_leave_call_stack"> <layout_panel name="leave_call_btn_panel"> - <button label="çµæŸé€šè©±" name="leave_call_btn"/> + <button label="離開通話" name="leave_call_btn"/> </layout_panel> </layout_stack> </layout_panel> diff --git a/indra/newview/skins/default/xui/zh/floater_voice_effect.xml b/indra/newview/skins/default/xui/zh/floater_voice_effect.xml index 36efe20b65..81e0204262 100644 --- a/indra/newview/skins/default/xui/zh/floater_voice_effect.xml +++ b/indra/newview/skins/default/xui/zh/floater_voice_effect.xml @@ -1,29 +1,158 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater label="地點" name="voice_effects" title="語音變è²"> <string name="no_voice_effect"> - (No Voice Morph) + ï¼ˆç„¡è®Šè²æ•ˆæžœï¼‰ </string> <string name="active_voice_effect"> - (Active) + (使用ä¸ï¼‰ </string> <string name="unsubscribed_voice_effect"> - (Unsubscribed) + ï¼ˆå·²åœæ¢è¨‚用) </string> <string name="new_voice_effect"> - (New!) + (新的ï¼ï¼‰ + </string> + <string name="effect_Arena"> + ç«¶æŠ€å ´ + </string> + <string name="effect_Beast"> + é‡Žç¸ + </string> + <string name="effect_Buff"> + Buff + </string> + <string name="effect_Buzz"> + Buzz + </string> + <string name="effect_Camille"> + å¡èœœå…’ + </string> + <string name="effect_Creepy"> + 怪異 + </string> + <string name="effect_CreepyBot"> + 怪異機器人 + </string> + <string name="effect_Cyber"> + ç§‘å¹» + </string> + <string name="effect_DeepBot"> + 深沉機器人 + </string> + <string name="effect_Demon"> + é”鬼 + </string> + <string name="effect_Female Elf"> + 女性 - å°ç²¾éˆ + </string> + <string name="effect_Flirty"> + 調情 + </string> + <string name="effect_Foxy"> + 香豔 + </string> + <string name="effect_Halloween 2010 Bonus"> + 2010è¬è–ç¯€åŠ è´ˆ + </string> + <string name="effect_Helium"> + 氦氣 + </string> + <string name="effect_Husky"> + 沙啞 + </string> + <string name="effect_Husky Whisper"> + 沙啞耳語 + </string> + <string name="effect_Intercom"> + å°è¬›æ©Ÿ + </string> + <string name="effect_Julia"> + 茱莉亞 + </string> + <string name="effect_Lo Lilt"> + 輕微抑æšé “挫 + </string> + <string name="effect_Macho"> + 陽剛 + </string> + <string name="effect_Micro"> + Micro + </string> + <string name="effect_Mini"> + è¿·ä½ + </string> + <string name="effect_Model"> + 模型 + </string> + <string name="effect_Nano"> + Nano + </string> + <string name="effect_Nightmare"> + 惡夢 + </string> + <string name="effect_PopBot"> + PopBot + </string> + <string name="effect_Rachel"> + 瑞秋 + </string> + <string name="effect_Radio"> + 收音機 + </string> + <string name="effect_Robot"> + 機器人 + </string> + <string name="effect_Roxanne"> + è˜¿å§ + </string> + <string name="effect_Rumble"> + ä½Žæ²‰éš†éš†è² + </string> + <string name="effect_Sabrina"> + 薩賓娜 + </string> + <string name="effect_Samantha"> + å§æ›¼èŽŽ + </string> + <string name="effect_Sexy"> + 性感 + </string> + <string name="effect_Shorty"> + 矮個兒 + </string> + <string name="effect_Smaller"> + è¼ƒå° + </string> + <string name="effect_Sneaky"> + 鬼祟 + </string> + <string name="effect_Stallion"> + 種馬 + </string> + <string name="effect_Sultry"> + å‹¾é‚ + </string> + <string name="effect_Thunder"> + é›·è² + </string> + <string name="effect_Vixen"> + 潑婦 + </string> + <string name="effect_WhinyBot"> + å“鬧機器人 </string> <text name="preview_text"> - To Preview + é 覽 </text> <text name="status_text"> - Record a sample, then click on a voice to hear how it will sound. + 錄下一段樣本,å†é»žæŒ‰è²éŸ³æª¢æŸ¥çµæžœã€‚ </text> - <button label="Record" name="record_btn" tool_tip="Record a sample of your voice."/> + <button label="錄音" name="record_btn" tool_tip="éŒ„ä¸‹ä¸€æ®µä½ çš„è²éŸ³ã€‚"/> <button label="åœæ¢" name="record_stop_btn"/> <text name="voice_morphing_link"> - [[URL] Subscribe Now] + [[URL] ç¾åœ¨è¨‚用] </text> - <scroll_list name="voice_effect_list" tool_tip="Record a sample of your voice, then click an effect to preview."> + <scroll_list name="voice_effect_list" tool_tip="éŒ„ä¸‹ä¸€æ®µä½ çš„è²éŸ³ï¼Œå†é»žé¸ä¸€å€‹æ•ˆæžœè©¦è½ã€‚"> <scroll_list.columns label="語音å稱" name="name"/> <scroll_list.columns label="éŽæœŸ" name="expires"/> </scroll_list> diff --git a/indra/newview/skins/default/xui/zh/floater_water.xml b/indra/newview/skins/default/xui/zh/floater_water.xml deleted file mode 100644 index 5fb57272af..0000000000 --- a/indra/newview/skins/default/xui/zh/floater_water.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Water Floater" title="進階水文編輯器"> - <floater.string name="WLDefaultWaterNames"> - Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez - </floater.string> - <text name="KeyFramePresetsText"> - Water Presets: - </text> - <button label="新增" label_selected="新增" name="WaterNewPreset"/> - <button label="儲å˜" label_selected="儲å˜" name="WaterSavePreset"/> - <button label="刪除" label_selected="刪除" name="WaterDeletePreset"/> - <tab_container name="Water Tabs"> - <panel label="è¨å®š" name="Settings"> - <text name="BHText"> - Water Fog Color - </text> - <color_swatch name="WaterFogColor" tool_tip="點擊以開啟é¡è‰²æŒ‘é¸å™¨"/> - <text name="WaterFogDensText"> - Fog Density Exponent - </text> - <text name="WaterUnderWaterFogModText"> - Underwater Fog Modifier - </text> - <text name="BDensText"> - Reflection Wavelet Scale - </text> - <slider label="1" name="WaterNormalScaleX"/> - <slider label="2" name="WaterNormalScaleY"/> - <slider label="3" name="WaterNormalScaleZ"/> - <text name="HDText"> - Fresnel Scale - </text> - <text name="FresnelOffsetText"> - Fresnel Offset - </text> - <text name="DensMultText"> - Refract Scale Above - </text> - <text name="WaterScaleBelowText"> - Refract Scale Below - </text> - <text name="MaxAltText"> - Blur Multiplier - </text> - </panel> - <panel label="圖åƒ" name="Waves"> - <text name="BHText"> - Big Wave Direction - </text> - <text name="WaterWave1DirXText"> - X - </text> - <text name="WaterWave1DirYText"> - Y - </text> - <text name="BHText2"> - Little Wave Direction - </text> - <text name="WaterWave2DirXText"> - X - </text> - <text name="WaterWave2DirYText"> - Y - </text> - <text name="BHText3"> - æ£å¸¸åœ°åœ– - </text> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_windlight_options.xml b/indra/newview/skins/default/xui/zh/floater_windlight_options.xml deleted file mode 100644 index 383e35d50d..0000000000 --- a/indra/newview/skins/default/xui/zh/floater_windlight_options.xml +++ /dev/null @@ -1,167 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="WindLight floater" title="進階天空編輯器"> - <floater.string name="WLDefaultSkyNames"> - A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor's Delight:Sheer Sensuality - </floater.string> - <text name="KeyFramePresetsText"> - 天空é è¨å€¼ï¼š - </text> - <button label="新增" label_selected="新增" name="WLNewPreset"/> - <button label="儲å˜" label_selected="儲å˜" name="WLSavePreset"/> - <button label="刪除" label_selected="刪除" name="WLDeletePreset"/> - <button label="日循環編輯器" label_selected="日循環編輯器" name="WLDayCycleMenuButton"/> - <tab_container name="WindLight Tabs"> - <panel label="大氣" name="Atmosphere"> - <text name="BHText"> - è—天水平線 - </text> - <text name="BHText2"> - R - </text> - <text name="BHText3"> - G - </text> - <text name="BHText4"> - B - </text> - <text name="BHText5"> - I - </text> - <text name="BDensText"> - 陰霾水平線 - </text> - <text name="BDensText2"> - è—天密度 - </text> - <text name="BHText6"> - R - </text> - <text name="BHText7"> - G - </text> - <text name="BHText8"> - B - </text> - <text name="BHText9"> - I - </text> - <text name="HDText"> - 陰霾密度 - </text> - <text name="DensMultText"> - 密度å€å¢ž - </text> - <text name="WLDistanceMultText"> - è·é›¢å€å¢ž - </text> - <text name="MaxAltText"> - 最大高度 - </text> - </panel> - <panel label="照明" name="Lighting"> - <text name="SLCText"> - æ—¥ï¼æœˆ é¡è‰² - </text> - <text name="BHText"> - R - </text> - <text name="BHText2"> - G - </text> - <text name="BHText3"> - B - </text> - <text name="BHText4"> - I - </text> - <text name="TODText"> - æ—¥ï¼æœˆ ä½ç½® - </text> - <text name="WLAmbientText"> - 環境 - </text> - <text name="BHText5"> - R - </text> - <text name="BHText6"> - G - </text> - <text name="BHText7"> - B - </text> - <text name="BHText8"> - I - </text> - <text name="WLEastAngleText"> - æ±å‡è§’度 - </text> - <text name="SunGlowText"> - å¤ªé™½å…‰è¼ - </text> - <slider label="焦點" name="WLGlowB"/> - <slider label="尺寸" name="WLGlowR"/> - <text name="SceneGammaText"> - å ´æ™¯ Gamma 值 - </text> - <text name="WLStarText"> - 星空é‡åº¦ - </text> - </panel> - <panel label="雲彩" name="Clouds"> - <text name="WLCloudColorText"> - 雲彩é¡è‰² - </text> - <text name="BHText"> - R - </text> - <text name="BHText2"> - G - </text> - <text name="BHText3"> - B - </text> - <text name="BHText4"> - I - </text> - <text name="WLCloudColorText2"> - 雲彩 XY 軸 / 密度 - </text> - <text name="BHText5"> - X - </text> - <text name="BHText6"> - Y - </text> - <text name="BHText7"> - D - </text> - <text name="WLCloudCoverageText"> - 雲彩覆蓋 - </text> - <text name="WLCloudScaleText"> - é›²å½©è¦æ¨¡ - </text> - <text name="WLCloudDetailText"> - 雲彩細節(XY 軸 / 密度) - </text> - <text name="BHText8"> - X - </text> - <text name="BHText9"> - Y - </text> - <text name="BHText10"> - D - </text> - <text name="WLCloudScrollXText"> - 雲彩 X 滾軸 - </text> - <check_box label="鎖定" name="WLCloudLockX"/> - <text name="WLCloudScrollYText"> - 雲彩 Y 滾軸 - </text> - <check_box label="鎖定" name="WLCloudLockY"/> - <check_box label="æç¹ªå‚³çµ±é›²å½©" name="DrawClassicClouds"/> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_window_size.xml b/indra/newview/skins/default/xui/zh/floater_window_size.xml index 54b72afccc..3942f72d76 100644 --- a/indra/newview/skins/default/xui/zh/floater_window_size.xml +++ b/indra/newview/skins/default/xui/zh/floater_window_size.xml @@ -7,10 +7,17 @@ è¨å®šè¦–窗尺寸大å°ï¼š </text> <combo_box name="window_size_combo" tool_tip="寬度 x 高度"> - <combo_box.item label="1000 x 700 (é è¨ï¼‰" name="item0"/> - <combo_box.item label="1024 x 768" name="item1"/> - <combo_box.item label="1280 x 720 (720p)" name="item2"/> - <combo_box.item label="1920 x 1080 (1080p)" name="item3"/> + <combo_box.item label="1000 x 700 (é è¨ï¼‰" name="item1"/> + <combo_box.item label="1024 x 768 (4:3 XGA)" name="item2"/> + <combo_box.item label="1280 x 720 (16:9 HDTV)" name="item3"/> + <combo_box.item label="1280 x 800 (5:8 WXGA)" name="item4"/> + <combo_box.item label="1280 x 1024 (5:4 SXGA)" name="item5"/> + <combo_box.item label="1440 x 900 (8:5 WSXGA)" name="item7"/> + <combo_box.item label="1600 x 900 (16:9 HD+)" name="item8"/> + <combo_box.item label="1600 x 1200 (4:3 UXGA)" name="item9"/> + <combo_box.item label="1680 x 1050 (8:5 WSXGA+)" name="item10"/> + <combo_box.item label="1920 x 1080 (16:9 HDTV)" name="item11"/> + <combo_box.item label="1920 x 1200 (8:5 WUXGA)" name="item12"/> </combo_box> <button label="è¨å®š" name="set_btn"/> <button label="å–æ¶ˆ" name="cancel_btn"/> diff --git a/indra/newview/skins/default/xui/zh/floater_world_map.xml b/indra/newview/skins/default/xui/zh/floater_world_map.xml index 6ac6fb76b7..4cd05ebaa0 100644 --- a/indra/newview/skins/default/xui/zh/floater_world_map.xml +++ b/indra/newview/skins/default/xui/zh/floater_world_map.xml @@ -8,7 +8,7 @@ <panel name="layout_panel_2"> <button name="Show My Location" tool_tip="以我的化身所在ä½ç½®å±…ä¸åœ°åœ–"/> <text name="me_label"> - 自己 + 我自己 </text> <text name="person_label"> 人 @@ -23,14 +23,14 @@ 土地æ‹è³£ </text> <text name="by_owner_label"> - 便“有者 + 便‰€æœ‰äºº </text> - <button name="Go Home" tool_tip="瞬間傳é€åˆ°æˆ‘的家ä½ç½®"/> + <button name="Go Home" tool_tip="瞬間返回我的家"/> <text name="Home_label"> - å®¶ + 我的家 </text> <text name="events_label"> - 事件: + 活動: </text> <text name="pg_label"> 一般普級 @@ -57,17 +57,17 @@ </combo_box> <search_editor label="地å€ä¾å稱" name="location" tool_tip="輸入一個地å€çš„å稱"/> <button label="尋找" name="DoSearch" tool_tip="æœå°‹åœ°å€"/> - <button name="Clear" tool_tip="Clear tracking lines and reset map"/> + <button name="Clear" tool_tip="清楚追蹤線並é‡è¨åœ°åœ–"/> <text name="events_label"> ä½ç½®ï¼š </text> <button label="瞬間傳é€" name="Teleport" tool_tip="瞬間傳é€åˆ°æ‰€é¸çš„ä½ç½®"/> - <button label="覆製 SLurl" name="copy_slurl" tool_tip="Copies current location as SLurl to be used on the web."/> - <button label="Show Selection" name="Show Destination" tool_tip="Center map on selected location"/> + <button label="覆製 SLurl" name="copy_slurl" tool_tip="將目å‰ä½ç½®è¤‡è£½ç‚ºå¯åœ¨ç¶²è·¯ä¸Šä½¿ç”¨çš„ SLurl。"/> + <button label="é¡¯ç¤ºé¸æ“‡" name="Show Destination" tool_tip="將所é¸ä½ç½®ç§»åˆ°åœ°åœ–ä¸å¤®"/> </panel> <panel name="layout_panel_5"> <text name="zoom_label"> - Zoom + 縮放 </text> </panel> </floater> diff --git a/indra/newview/skins/default/xui/zh/inspect_avatar.xml b/indra/newview/skins/default/xui/zh/inspect_avatar.xml index 02e81983a6..ef10e5d2d0 100644 --- a/indra/newview/skins/default/xui/zh/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/zh/inspect_avatar.xml @@ -10,16 +10,16 @@ <string name="Details"> [SL_PROFILE] </string> - <text name="user_subtitle" value="11 Months, 3 days old"/> + <text name="user_subtitle" value="年齡 11 å€‹æœˆåˆ 3 天"/> <text name="user_details"> - This is my second life description and I really think it is great. But for some reason my description is super extra long because I like to talk a whole lot + 這是我的「第二人生ã€è³‡è¨Šã€‚é€™åœ°æ–¹å¤ªæ£’äº†ï¼ åªä¸éŽï¼Œå¯æ˜¯å˜›â€¦â€¦æˆ‘的訊æ¯ç›¸ç•¶ç›¸ç•¶çš„å†—é•·ï¼Œå› ç‚ºâ€¦â€¦æˆ‘æ»¿æ„›ä¸ƒå˜´å…«èˆŒçš„å•¦ã€‚ </text> - <slider name="volume_slider" tool_tip="Voice volume" value="0.5"/> + <slider name="volume_slider" tool_tip="音é‡" value="0.5"/> <button label="åŠ ç‚ºæœ‹å‹" name="add_friend_btn"/> <button label="IM" name="im_btn"/> <button label="檔案" name="view_profile_btn"/> <panel name="moderator_panel"> - <button label="Disable Voice" name="disable_voice"/> - <button label="Enable Voice" name="enable_voice"/> + <button label="åœç”¨èªžéŸ³" name="disable_voice"/> + <button label="啟用語音" name="enable_voice"/> </panel> </floater> diff --git a/indra/newview/skins/default/xui/zh/inspect_group.xml b/indra/newview/skins/default/xui/zh/inspect_group.xml index ac331be203..ca5ccc3349 100644 --- a/indra/newview/skins/default/xui/zh/inspect_group.xml +++ b/indra/newview/skins/default/xui/zh/inspect_group.xml @@ -17,14 +17,14 @@ ä½ æ˜¯æˆå“¡ </string> <text name="group_subtitle"> - 123 members + 123 使ˆå“¡ </text> <text name="group_details"> - A group of folks charged with creating a room with a moose. -Fear the moose! Fear it! And the mongoose too! + 這一群人責在建立有麋鹿的房間。 +éº‹é¹¿è¬æ²ï¼è²“é¼¬è¬æ²ï¼ </text> <text name="group_cost"> - L$123 to join + åŠ å…¥è²»ç”¨ L$123 </text> <button label="åŠ å…¥" name="join_btn"/> <button label="退出" name="leave_btn"/> diff --git a/indra/newview/skins/default/xui/zh/inspect_object.xml b/indra/newview/skins/default/xui/zh/inspect_object.xml index 58091b3aef..377b8b7c78 100644 --- a/indra/newview/skins/default/xui/zh/inspect_object.xml +++ b/indra/newview/skins/default/xui/zh/inspect_object.xml @@ -5,40 +5,40 @@ --> <floater name="inspect_object"> <string name="Creator"> - By [CREATOR] + 創作人 [CREATOR] </string> <string name="CreatorAndOwner"> - By [CREATOR] -Owner [OWNER] + 創作人 [CREATOR] +所有人 [OWNER] </string> <string name="Price"> L$[AMOUNT] </string> <string name="PriceFree"> - Free! + å…è²»ï¼ </string> <string name="Touch"> - Touch + 觸碰 </string> <string name="Sit"> - Sit + å下 </string> <text name="object_creator"> - by secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about -owner secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about + 創作人 secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about +所有人 secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about </text> <text name="price_text"> L$30,000 </text> - <icon name="secure_browsing" tool_tip="Secure Browsing"/> + <icon name="secure_browsing" tool_tip="安全ç€è¦½"/> <text name="object_media_url"> http://www.superdupertest.com </text> <button label="購買" name="buy_btn"/> <button label="支付" name="pay_btn"/> <button label="å–得副本" name="take_free_copy_btn"/> - <button label="Touch" name="touch_btn"/> - <button label="Sit" name="sit_btn"/> - <button label="Open" name="open_btn"/> - <button label="More" name="more_info_btn"/> + <button label="觸碰" name="touch_btn"/> + <button label="å下" name="sit_btn"/> + <button label="打開" name="open_btn"/> + <button label="更多" name="more_info_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/inspect_remote_object.xml b/indra/newview/skins/default/xui/zh/inspect_remote_object.xml index bed19d6d78..b8418fc8a1 100644 --- a/indra/newview/skins/default/xui/zh/inspect_remote_object.xml +++ b/indra/newview/skins/default/xui/zh/inspect_remote_object.xml @@ -5,10 +5,10 @@ --> <floater name="inspect_remote_object"> <text name="object_name"> - Test Object Name That Is Really Long OMG so long I can't believe how long the name of this object is, I mean really. + 測試很長很長ã€é•·åˆ°ä¸å¯æ€è°çš„ã€è½è½é•·çš„ã€é•·å¾—ä¸å¾—了的ã€å¾ˆé•·å¾ˆé•·å¾ˆé•·ã€é•·åˆ°æˆ‘快發瘋ã€é•·ä¹‹åˆé•·çš„物件å稱。 </text> <text name="object_owner_label"> - æ“æœ‰è€…: + 所有人: </text> <text name="object_owner"> Longavatarname Johnsonlongstonnammer diff --git a/indra/newview/skins/default/xui/zh/menu_attachment_self.xml b/indra/newview/skins/default/xui/zh/menu_attachment_self.xml index 1911a1aeff..c14a98c64b 100644 --- a/indra/newview/skins/default/xui/zh/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/zh/menu_attachment_self.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Attachment Pie"> - <menu_item_call label="Touch" name="Attachment Object Touch"/> + <menu_item_call label="觸碰" name="Attachment Object Touch"/> <menu_item_call label="編輯" name="Edit..."/> <menu_item_call label="å¸ä¸‹" name="Detach"/> <menu_item_call label="å下" name="Sit Down Here"/> @@ -10,7 +10,7 @@ <menu_item_call label="編輯我的體形" name="Edit My Shape"/> <menu_item_call label="我的朋å‹" name="Friends..."/> <menu_item_call label="我的群組" name="Groups..."/> - <menu_item_call label="我的檔案" name="Profile..."/> + <menu_item_call label="我的個人檔案" name="Profile..."/> <menu_item_call label="æè³ªé™¤éŒ¯" name="Debug..."/> <menu_item_call label="丟棄" name="Drop"/> </context_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_avatar_other.xml b/indra/newview/skins/default/xui/zh/menu_avatar_other.xml index 260571eb54..1d02464748 100644 --- a/indra/newview/skins/default/xui/zh/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/zh/menu_avatar_other.xml @@ -6,11 +6,11 @@ <menu_item_call label="IM" name="Send IM..."/> <menu_item_call label="通話" name="Call"/> <menu_item_call label="é‚€è«‹åŠ å…¥ç¾¤çµ„" name="Invite..."/> - <menu_item_call label="Block" name="Avatar Mute"/> + <menu_item_call label="å°éŽ–" name="Avatar Mute"/> <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="Zoom In" name="Zoom In"/> + <menu_item_call label="放大" name="Zoom In"/> <menu_item_call label="支付" name="Pay..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_avatar_self.xml b/indra/newview/skins/default/xui/zh/menu_avatar_self.xml index d516e3ab58..32757bbff6 100644 --- a/indra/newview/skins/default/xui/zh/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/zh/menu_avatar_self.xml @@ -14,19 +14,19 @@ <menu_item_call label="å…§è¡£" name="Self Undershirt"/> <menu_item_call label="內褲" name="Self Underpants"/> <menu_item_call label="刺é’" name="Self Tattoo"/> - <menu_item_call label="Physics" name="Self Physics"/> + <menu_item_call label="身體物ç†" name="Self Physics"/> <menu_item_call label="åŠé€æ˜Ž" name="Self Alpha"/> <menu_item_call label="全部衣æœ" name="All Clothes"/> </context_menu> - <context_menu label="HUD" name="Object Detach HUD"/> + <context_menu label="æ“¡é 顯示" name="Object Detach HUD"/> <context_menu label="å¸ä¸‹" name="Object Detach"/> <menu_item_call label="全部å¸ä¸‹" name="Detach All"/> </context_menu> <menu_item_call label="我的外觀" name="Chenge Outfit"/> - <menu_item_call label="ç·¨è¼¯æˆ‘è£æ‰®" name="Edit Outfit"/> + <menu_item_call label="ç·¨è¼¯æˆ‘çš„è£æ‰®" name="Edit Outfit"/> <menu_item_call label="編輯我的體形" name="Edit My Shape"/> <menu_item_call label="我的朋å‹" name="Friends..."/> <menu_item_call label="我的群組" name="Groups..."/> - <menu_item_call label="我的檔案" name="Profile..."/> + <menu_item_call label="我的個人檔案" name="Profile..."/> <menu_item_call label="æè³ªé™¤éŒ¯" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_bottomtray.xml b/indra/newview/skins/default/xui/zh/menu_bottomtray.xml deleted file mode 100644 index a00aa7cd35..0000000000 --- a/indra/newview/skins/default/xui/zh/menu_bottomtray.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<menu name="hide_camera_move_controls_menu"> - <menu_item_check label="講話按鈕" name="EnableVoiceChat"/> - <menu_item_check label="姿勢按鈕" name="ShowGestureButton"/> - <menu_item_check label="移動按鈕" name="ShowMoveButton"/> - <menu_item_check label="視角按鈕" name="ShowCameraButton"/> - <menu_item_check label="快照按鈕" name="ShowSnapshotButton"/> - <menu_item_check label="å»ºé€ æŒ‰éˆ•" name="ShowBuildButton"/> - <menu_item_check label="æœå°‹æŒ‰éˆ•" name="ShowSearchButton"/> - <menu_item_check label="地圖按鈕" name="ShowWorldMapButton"/> - <menu_item_check label="è¿·ä½ åœ°åœ–æŒ‰éˆ•" name="ShowMiniMapButton"/> - <menu_item_call label="剪下" name="NearbyChatBar_Cut"/> - <menu_item_call label="覆製" name="NearbyChatBar_Copy"/> - <menu_item_call label="貼上" name="NearbyChatBar_Paste"/> - <menu_item_call label="刪除" name="NearbyChatBar_Delete"/> - <menu_item_call label="å…¨é¸" name="NearbyChatBar_Select_All"/> -</menu> diff --git a/indra/newview/skins/default/xui/zh/menu_edit.xml b/indra/newview/skins/default/xui/zh/menu_edit.xml index d6eb87a6b0..bda640e5f3 100644 --- a/indra/newview/skins/default/xui/zh/menu_edit.xml +++ b/indra/newview/skins/default/xui/zh/menu_edit.xml @@ -3,7 +3,7 @@ <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="Copy"/> <menu_item_call label="貼上" name="Paste"/> <menu_item_call label="刪除" name="Delete"/> <menu_item_call label="覆製貼上" name="Duplicate"/> diff --git a/indra/newview/skins/default/xui/zh/menu_favorites.xml b/indra/newview/skins/default/xui/zh/menu_favorites.xml index c60bebd3dc..a01412ce1c 100644 --- a/indra/newview/skins/default/xui/zh/menu_favorites.xml +++ b/indra/newview/skins/default/xui/zh/menu_favorites.xml @@ -4,7 +4,7 @@ <menu_item_call label="察看 / 編輯 地標" name="Landmark Open"/> <menu_item_call label="覆製 SLurl" name="Copy slurl"/> <menu_item_call label="顯示在地圖上" name="Show On Map"/> - <menu_item_call label="覆製" name="Landmark Copy"/> + <menu_item_call label="æšåº¨" name="Landmark Copy"/> <menu_item_call label="貼上" name="Landmark Paste"/> <menu_item_call label="刪除" name="Delete"/> </menu> diff --git a/indra/newview/skins/default/xui/zh/menu_gesture_gear.xml b/indra/newview/skins/default/xui/zh/menu_gesture_gear.xml index a331c47a6e..5a38197e4c 100644 --- a/indra/newview/skins/default/xui/zh/menu_gesture_gear.xml +++ b/indra/newview/skins/default/xui/zh/menu_gesture_gear.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <toggleable_menu name="menu_gesture_gear"> <menu_item_call label="ç”±æˆ‘çš„æœ€æ„›ä¸ æ·»åŠ /移除" name="activate"/> - <menu_item_call label="覆製" name="copy_gesture"/> + <menu_item_call label="æšåº¨" name="copy_gesture"/> <menu_item_call label="貼上" name="paste"/> <menu_item_call label="覆製 UUID" name="copy_uuid"/> <menu_item_call label="儲å˜åˆ°ç›®å‰è£æ‰®" name="save_to_outfit"/> diff --git a/indra/newview/skins/default/xui/zh/menu_hide_navbar.xml b/indra/newview/skins/default/xui/zh/menu_hide_navbar.xml index dbb8ececaa..3f6820cb32 100644 --- a/indra/newview/skins/default/xui/zh/menu_hide_navbar.xml +++ b/indra/newview/skins/default/xui/zh/menu_hide_navbar.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="hide_navbar_menu"> - <menu_item_check label="顯示導覽列" name="ShowNavbarNavigationPanel"/> + <menu_item_check label="顯示導覽列和我的最愛" name="ShowNavbarNavigationPanel"/> <menu_item_check label="顯示最愛列" name="ShowNavbarFavoritesPanel"/> <menu_item_check label="é¡¯ç¤ºè¿·ä½ ä½ç½®åˆ—" name="ShowMiniLocationPanel"/> </menu> diff --git a/indra/newview/skins/default/xui/zh/menu_im_well_button.xml b/indra/newview/skins/default/xui/zh/menu_im_well_button.xml deleted file mode 100644 index 4b9b4b2758..0000000000 --- a/indra/newview/skins/default/xui/zh/menu_im_well_button.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<context_menu name="IM Well Button Context Menu"> - <menu_item_call label="全部關閉" name="Close All"/> -</context_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/zh/menu_inspect_avatar_gear.xml index 7385764e4c..f4e886ff67 100644 --- a/indra/newview/skins/default/xui/zh/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/zh/menu_inspect_avatar_gear.xml @@ -6,16 +6,16 @@ <menu_item_call label="通話" name="call"/> <menu_item_call label="瞬間傳é€" name="teleport"/> <menu_item_call label="é‚€è«‹åŠ å…¥ç¾¤çµ„" name="invite_to_group"/> - <menu_item_call label="Block" name="block"/> - <menu_item_call label="Unblock" name="unblock"/> + <menu_item_call label="å°éŽ–" name="block"/> + <menu_item_call label="解除å°éŽ–" name="unblock"/> <menu_item_call label="å›žå ±" name="report"/> <menu_item_call label="å‡çµ" name="freeze"/> <menu_item_call label="踢出" name="eject"/> <menu_item_call label="踢出" name="kick"/> - <menu_item_call label="CSR" name="csr"/> + <menu_item_call label="客æœ" name="csr"/> <menu_item_call label="æè³ªé™¤éŒ¯" name="debug"/> <menu_item_call label="在地圖上尋找" name="find_on_map"/> - <menu_item_call label="Zoom In" name="zoom_in"/> + <menu_item_call label="放大" name="zoom_in"/> <menu_item_call label="支付" name="pay"/> <menu_item_call label="分享" name="share"/> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_inspect_object_gear.xml b/indra/newview/skins/default/xui/zh/menu_inspect_object_gear.xml index 94ab82b8a9..abff0f64ac 100644 --- a/indra/newview/skins/default/xui/zh/menu_inspect_object_gear.xml +++ b/indra/newview/skins/default/xui/zh/menu_inspect_object_gear.xml @@ -2,17 +2,18 @@ <toggleable_menu name="Gear Menu"> <menu_item_call label="觸碰" name="touch"/> <menu_item_call label="å下" name="sit"/> - <menu_item_call label="Pay" name="pay"/> + <menu_item_call label="支付" name="pay"/> <menu_item_call label="購買" name="buy"/> <menu_item_call label="å–å¾—" name="take"/> <menu_item_call label="å–得副本" name="take_copy"/> - <menu_item_call label="開啟" name="open"/> + <menu_item_call label="打開" name="open"/> <menu_item_call label="編輯" name="edit"/> <menu_item_call label="穿上" name="wear"/> <menu_item_call label="æ·»åŠ " name="add"/> <menu_item_call label="å›žå ±" name="report"/> - <menu_item_call label="Block" name="block"/> - <menu_item_call label="Zoom In" name="zoom_in"/> + <menu_item_call label="å°éŽ–" name="block"/> + <menu_item_call label="解除å°éŽ–" name="unblock"/> + <menu_item_call label="放大" name="zoom_in"/> <menu_item_call label="移除" name="remove"/> <menu_item_call label="更多資訊" name="more_info"/> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/zh/menu_inspect_self_gear.xml index 1c75705743..c48ee0c9be 100644 --- a/indra/newview/skins/default/xui/zh/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/zh/menu_inspect_self_gear.xml @@ -17,7 +17,7 @@ <menu_item_call label="åŠé€æ˜Ž" name="Self Alpha"/> <menu_item_call label="全部衣æœ" name="All Clothes"/> </context_menu> - <context_menu label="HUD" name="Object Detach HUD"/> + <context_menu label="æ“¡é 顯示" name="Object Detach HUD"/> <context_menu label="å¸ä¸‹" name="Object Detach"/> <menu_item_call label="全部å¸ä¸‹" name="Detach All"/> </context_menu> @@ -26,6 +26,6 @@ <menu_item_call label="編輯我的體形" name="Edit My Shape"/> <menu_item_call label="我的朋å‹" name="Friends..."/> <menu_item_call label="我的群組" name="Groups..."/> - <menu_item_call label="我的檔案" name="Profile..."/> + <menu_item_call label="我的個人檔案" name="Profile..."/> <menu_item_call label="æè³ªé™¤éŒ¯" name="Debug..."/> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_inventory.xml b/indra/newview/skins/default/xui/zh/menu_inventory.xml index 87d769af0d..7f745ffaa7 100644 --- a/indra/newview/skins/default/xui/zh/menu_inventory.xml +++ b/indra/newview/skins/default/xui/zh/menu_inventory.xml @@ -2,13 +2,13 @@ <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 Open"/> <menu_item_call label="æ’æ”¾" name="Task Play"/> <menu_item_call label="屬性" name="Task Properties"/> <menu_item_call label="æ›´å" name="Task Rename"/> <menu_item_call label="刪除" name="Task Remove"/> <menu_item_call label="清空垃圾ç’" name="Empty Trash"/> - <menu_item_call label="清空 Lost And Found" name="Empty Lost And Found"/> + <menu_item_call label="清空所有失物" name="Empty Lost And Found"/> <menu_item_call label="新資料夾" name="New Folder"/> <menu_item_call label="新腳本" name="New Script"/> <menu_item_call label="新記事å¡" name="New Note"/> @@ -18,7 +18,7 @@ <menu_item_call label="新褲å" name="New Pants"/> <menu_item_call label="æ–°éž‹å" name="New Shoes"/> <menu_item_call label="新襪å" name="New Socks"/> - <menu_item_call label="新夾克" name="New Jacket"/> + <menu_item_call label="新外套" name="New Jacket"/> <menu_item_call label="新裙å" name="New Skirt"/> <menu_item_call label="新手套" name="New Gloves"/> <menu_item_call label="æ–°å…§è¡£" name="New Undershirt"/> @@ -46,42 +46,46 @@ <menu_item_call label="å…§è¡£" name="Undershirt"/> </menu> <menu_item_call label="瞬間傳é€" name="Landmark Open"/> - <menu_item_call label="開啟" name="Animation Open"/> - <menu_item_call label="開啟" name="Sound Open"/> + <menu_item_call label="打開" name="Animation Open"/> + <menu_item_call label="打開" name="Sound Open"/> <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="Open"/> + <menu_item_call label="還原物å“" name="Restore Item"/> + <menu_item_call label="打開" name="Open"/> <menu_item_call label="開啟原件" name="Open Original"/> <menu_item_call label="屬性" name="Properties"/> <menu_item_call label="æ›´å" name="Rename"/> <menu_item_call label="覆製資產 UUID" name="Copy Asset UUID"/> - <menu_item_call label="覆製" name="Copy"/> + <menu_item_call label="剪下" name="Cut"/> + <menu_item_call label="æšåº¨" name="Copy"/> <menu_item_call label="貼上" name="Paste"/> - <menu_item_call label="Paste As Link" name="Paste As Link"/> + <menu_item_call label="ä»¥é€£çµæ ¼å¼è²¼ä¸Š" name="Paste As Link"/> <menu_item_call label="刪除" name="Remove Link"/> <menu_item_call label="刪除" name="Delete"/> <menu_item_call label="刪除系統資料夾" name="Delete System Folder"/> - <menu_item_call label="Start Conference Chat" name="Conference Chat Folder"/> + <menu_item_call label="發起多方通話" name="Conference Chat Folder"/> <menu_item_call label="æ’æ”¾" name="Sound Play"/> + <menu_item_call label="覆製 SLurl" name="url_copy"/> <menu_item_call label="æ·»åŠ åœ°æ¨™" name="About Landmark"/> - <menu_item_call label="æ’æ”¾æ–¼è™›æ“¬ä¸–界" name="Animation Play"/> - <menu_item_call label="æ’æ”¾æ–¼æœ¬åœ°" name="Animation Audition"/> + <menu_item_call label="åœ¨è™›æ“¬ä¸–ç•Œæ’æ”¾" name="Animation Play"/> + <menu_item_call label="åœ¨æœ¬åœ°æ’æ”¾" name="Animation Audition"/> <menu_item_call label="é€å‡ºå³æ™‚訊æ¯" name="Send Instant Message"/> - <menu_item_call label="發給瞬間傳é€è«‹æ±‚..." name="Offer Teleport..."/> - <menu_item_call label="開始會è°äº¤è«‡" name="Conference Chat"/> - <menu_item_call label="Activate" name="Activate"/> - <menu_item_call label="Deactivate" name="Deactivate"/> - <menu_item_call label="å¦å˜" name="Save As"/> - <menu_item_call label="Detach From Yourself" name="Detach From Yourself"/> - <menu_item_call label="Wear" name="Wearable And Object Wear"/> - <menu label="Attach To" name="Attach To"/> - <menu label="Attach To HUD" name="Attach To HUD"/> + <menu_item_call label="發出瞬間傳é€é‚€è«‹..." name="Offer Teleport..."/> + <menu_item_call label="發起多方通話" name="Conference Chat"/> + <menu_item_call label="啟動" name="Activate"/> + <menu_item_call label="åœç”¨" name="Deactivate"/> + <menu_item_call label="å¦å˜ç‚º" name="Save As"/> + <menu_item_call label="å¾žä½ èº«ä¸Šç§»é™¤" name="Detach From Yourself"/> + <menu_item_call label="穿上" name="Wearable And Object Wear"/> + <menu label="附著到..." name="Attach To"/> + <menu label="附著到擡é 顯示" name="Attach To HUD"/> <menu_item_call label="編輯" name="Wearable Edit"/> <menu_item_call label="æ·»åŠ " name="Wearable Add"/> <menu_item_call label="脫下" name="Take Off"/> + <menu_item_call label="複製到商家發件匣" name="Merchant Copy"/> + <menu_item_call label="é€å¾€ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚集" name="Marketplace Send"/> <menu_item_call label="-- ç„¡é¸é … --" name="--no options--"/> </menu> diff --git a/indra/newview/skins/default/xui/zh/menu_inventory_add.xml b/indra/newview/skins/default/xui/zh/menu_inventory_add.xml index a0fc060e27..30bf5a7e75 100644 --- a/indra/newview/skins/default/xui/zh/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/zh/menu_inventory_add.xml @@ -4,7 +4,9 @@ <menu_item_call label="圖åƒï¼ˆL$[COST])..." name="Upload Image"/> <menu_item_call label="è²éŸ³ï¼ˆL$[COST])..." name="Upload Sound"/> <menu_item_call label="動作(L$[COST])..." name="Upload Animation"/> - <menu_item_call label="大批(L$[COST] æ¯æª”案)..." name="Bulk Upload"/> + <menu_item_call label="模型…" name="Upload Model"/> + <menu_item_call label="模型精éˆâ€¦" name="Upload Model Wizard"/> + <menu_item_call label="批é‡ï¼ˆæ¯æª”案 L$[COST] )..." name="Bulk Upload"/> <menu_item_call label="è¨å®šé è¨ä¸Šå‚³æ¬Šé™" name="perm prefs"/> </menu> <menu_item_call label="新資料夾" name="New Folder"/> @@ -16,7 +18,7 @@ <menu_item_call label="新褲å" name="New Pants"/> <menu_item_call label="æ–°éž‹å" name="New Shoes"/> <menu_item_call label="新襪å" name="New Socks"/> - <menu_item_call label="新夾克" name="New Jacket"/> + <menu_item_call label="新外套" name="New Jacket"/> <menu_item_call label="新裙å" name="New Skirt"/> <menu_item_call label="新手套" name="New Gloves"/> <menu_item_call label="æ–°å…§è¡£" name="New Undershirt"/> diff --git a/indra/newview/skins/default/xui/zh/menu_land.xml b/indra/newview/skins/default/xui/zh/menu_land.xml index 84941d138c..a87ab77dd0 100644 --- a/indra/newview/skins/default/xui/zh/menu_land.xml +++ b/indra/newview/skins/default/xui/zh/menu_land.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Land Pie"> - <menu_item_call label="關於土地" name="Place Information..."/> - <menu_item_call label="å在æ¤è™•" name="Sit Here"/> + <menu_item_call label="土地資料" name="Place Information..."/> + <menu_item_call label="å在這裡" name="Sit Here"/> <menu_item_call label="購買這塊土地" name="Land Buy"/> <menu_item_call label="購買通行權" name="Land Buy Pass"/> <menu_item_call label="å»ºé€ " name="Create"/> diff --git a/indra/newview/skins/default/xui/zh/menu_login.xml b/indra/newview/skins/default/xui/zh/menu_login.xml index d6bf34c66e..c327b132a1 100644 --- a/indra/newview/skins/default/xui/zh/menu_login.xml +++ b/indra/newview/skins/default/xui/zh/menu_login.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu_bar name="Login Menu"> - <menu label="自己" name="File"> - <menu_item_call label="å好è¨å®š" name="Preferences..."/> - <menu_item_call label="çµæŸé€€å‡º [APP_NAME]" name="Quit"/> + <menu label="我自己" name="File"> + <menu_item_call label="å好è¨å®šâ€¦" name="Preferences..."/> + <menu_item_call label="退出 [APP_NAME]" name="Quit"/> </menu> <menu label="幫助" name="Help"> <menu_item_call label="[SECOND_LIFE] 幫助" name="Second Life Help"/> @@ -14,11 +14,11 @@ <menu_item_call label="UI / é¡è‰² è¨å®š" name="UI/Color Settings"/> <menu_item_call label="XUI é 覽工具" name="UI Preview Tool"/> <menu label="UI 測試" name="UI Tests"/> - <menu_item_call label="è¨å®šè¦–窗尺寸大å°..." name="Set Window Size..."/> + <menu_item_call label="è¨å®šè¦–窗大å°..." name="Set Window Size..."/> <menu_item_call label="顯示 TOS" name="TOS"/> <menu_item_call label="顯示嚴é‡è¨Šæ¯" name="Critical"/> - <menu_item_call label="媒體ç€è¦½å™¨æ¸¬è©¦" name="Web Browser Test"/> - <menu_item_call label="ç¶²é 內容浮動視窗測試" name="Web Content Floater Test"/> + <menu_item_call label="ç¶²é 內容浮動視窗除錯測試" name="Web Content Floater Debug Test"/> + <menu label="è¨å®šè¨˜éŒ„細節" name="Set Logging Level"/> <menu_item_check label="é¡¯ç¤ºç¶²æ ¼æŒ‘é¸å™¨" name="Show Grid Picker"/> <menu_item_call label="顯示通知控制å°" name="Show Notifications Console"/> </menu> diff --git a/indra/newview/skins/default/xui/zh/menu_media_ctrl.xml b/indra/newview/skins/default/xui/zh/menu_media_ctrl.xml index 2ec95aa4f9..d222d7f658 100644 --- a/indra/newview/skins/default/xui/zh/menu_media_ctrl.xml +++ b/indra/newview/skins/default/xui/zh/menu_media_ctrl.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="media ctrl context menu"> <menu_item_call label="剪下" name="Cut"/> - <menu_item_call label="覆製" name="Copy"/> + <menu_item_call label="æšåº¨" name="Copy"/> <menu_item_call label="貼上" name="Paste"/> + <menu_item_call label="開啟網é 嵿Ÿ¥å™¨" name="open_webinspector"/> </context_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_mini_map.xml b/indra/newview/skins/default/xui/zh/menu_mini_map.xml index 24bc6355c7..7fd629471a 100644 --- a/indra/newview/skins/default/xui/zh/menu_mini_map.xml +++ b/indra/newview/skins/default/xui/zh/menu_mini_map.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="Popup"> - <menu_item_call label="Zoom Close" name="Zoom Close"/> - <menu_item_call label="Zoom Medium" name="Zoom Medium"/> - <menu_item_call label="Zoom Far" name="Zoom Far"/> - <menu_item_call label="Zoom Default" name="Zoom Default"/> + <menu_item_call label="放大é è¿‘" name="Zoom Close"/> + <menu_item_call label="é è¿‘é©è·" name="Zoom Medium"/> + <menu_item_call label="縮å°é 離" name="Zoom Far"/> + <menu_item_call label="縮放æ¢å¾©é è¨" name="Zoom Default"/> <menu_item_check label="旋轉地圖" name="Rotate Map"/> <menu_item_check label="自動居ä¸" name="Auto Center"/> <menu_item_call label="åœæ¢è¿½è¹¤" name="Stop Tracking"/> diff --git a/indra/newview/skins/default/xui/zh/menu_model_import_gear_default.xml b/indra/newview/skins/default/xui/zh/menu_model_import_gear_default.xml new file mode 100644 index 0000000000..5f82685632 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/menu_model_import_gear_default.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<toggleable_menu name="model_menu_gear_default"> + <menu_item_check label="顯示å´é‚Š" name="show_edges"/> + <menu_item_check label="顯示物ç†" name="show_physics"/> + <menu_item_check label="顯示æè³ª" name="show_textures"/> + <menu_item_check label="顯示表皮é‡é‡" name="show_skin_weight"/> + <menu_item_check label="顯示接點ä½ç½®" name="show_joint_positions"/> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_navbar.xml b/indra/newview/skins/default/xui/zh/menu_navbar.xml index 69df4929f2..d8356e6277 100644 --- a/indra/newview/skins/default/xui/zh/menu_navbar.xml +++ b/indra/newview/skins/default/xui/zh/menu_navbar.xml @@ -4,7 +4,7 @@ <menu_item_check label="顯示地段屬性" name="Show Parcel Properties"/> <menu_item_call label="地標" name="Landmark"/> <menu_item_call label="剪下" name="Cut"/> - <menu_item_call label="覆製" name="Copy"/> + <menu_item_call label="æšåº¨" name="Copy"/> <menu_item_call label="貼上" name="Paste"/> <menu_item_call label="刪除" name="Delete"/> <menu_item_call label="å…¨é¸" name="Select All"/> diff --git a/indra/newview/skins/default/xui/zh/menu_nearby_chat.xml b/indra/newview/skins/default/xui/zh/menu_nearby_chat.xml index cad462eebb..ce5f5b6e17 100644 --- a/indra/newview/skins/default/xui/zh/menu_nearby_chat.xml +++ b/indra/newview/skins/default/xui/zh/menu_nearby_chat.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="NearBy Chat Menu"> <menu_item_call label="顯示附近的人..." name="nearby_people"/> - <menu_item_check label="Show Blocked Text" name="muted_text"/> - <menu_item_check label="Show Buddy Icons" name="show_buddy_icons"/> - <menu_item_check label="Show Names" name="show_names"/> - <menu_item_check label="Show Icons and Names" name="show_icons_and_names"/> + <menu_item_check label="顯示被å°éŽ–æ–‡å—" name="muted_text"/> + <menu_item_check label="顯示密å‹åœ–示" name="show_buddy_icons"/> + <menu_item_check label="顯示åå—" name="show_names"/> + <menu_item_check label="顯示圖示和åå—" name="show_icons_and_names"/> <menu_item_call label="å—型尺寸" name="font_size"/> </menu> diff --git a/indra/newview/skins/default/xui/zh/menu_object.xml b/indra/newview/skins/default/xui/zh/menu_object.xml index ed41a4f0bf..4282c1e131 100644 --- a/indra/newview/skins/default/xui/zh/menu_object.xml +++ b/indra/newview/skins/default/xui/zh/menu_object.xml @@ -3,19 +3,21 @@ <menu_item_call label="觸碰" name="Object Touch"/> <menu_item_call label="編輯" name="Edit..."/> <menu_item_call label="å»ºé€ " name="Build"/> - <menu_item_call label="開啟" name="Open"/> - <menu_item_call label="å下" name="Object Sit"/> + <menu_item_call label="在è¯çµé›†è£¡é¡¯ç¤º" name="show_in_linksets"/> + <menu_item_call label="在角色ä¸é¡¯ç¤º" name="show_in_characters"/> + <menu_item_call label="打開" name="Open"/> + <menu_item_call label="å在這裡" name="Object Sit"/> <menu_item_call label="èµ·ç«‹" name="Object Stand Up"/> <menu_item_call label="物件檔案" name="Object Inspect"/> - <menu_item_call label="Zoom In" name="Zoom In"/> + <menu_item_call label="放大" name="Zoom In"/> <context_menu label="穿上" name="Put On"> <menu_item_call label="穿上" name="Wear"/> <menu_item_call label="æ·»åŠ " name="Add"/> - <context_menu label="Attach" name="Object Attach"/> - <context_menu label="Attach HUD" name="Object Attach HUD"/> + <context_menu label="附著" name="Object Attach"/> + <context_menu label="é™„åŠ æ“¡é 顯示" name="Object Attach HUD"/> </context_menu> <context_menu label="管ç†" name="Remove"> - <menu_item_call label="èˆ‰å ±æ¿«ç”¨" name="Report Abuse..."/> + <menu_item_call label="é•è¦èˆ‰å ±" name="Report Abuse..."/> <menu_item_call label="å°éŽ–" name="Object Mute"/> <menu_item_call label="退回" name="Return..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_object_icon.xml b/indra/newview/skins/default/xui/zh/menu_object_icon.xml index d27e75b830..f4f93b0bdc 100644 --- a/indra/newview/skins/default/xui/zh/menu_object_icon.xml +++ b/indra/newview/skins/default/xui/zh/menu_object_icon.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="Object Icon Menu"> <menu_item_call label="物件檔案..." name="Object Profile"/> - <menu_item_call label="Block..." name="Block"/> + <menu_item_call label="å°éŽ–â€¦" name="Block"/> </menu> diff --git a/indra/newview/skins/default/xui/zh/menu_outfit_gear.xml b/indra/newview/skins/default/xui/zh/menu_outfit_gear.xml index 90704fee65..e85b4b7182 100644 --- a/indra/newview/skins/default/xui/zh/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/zh/menu_outfit_gear.xml @@ -8,7 +8,7 @@ <menu_item_call label="新褲å" name="New Pants"/> <menu_item_call label="æ–°éž‹å" name="New Shoes"/> <menu_item_call label="新襪å" name="New Socks"/> - <menu_item_call label="新夾克" name="New Jacket"/> + <menu_item_call label="新外套" name="New Jacket"/> <menu_item_call label="新裙å" name="New Skirt"/> <menu_item_call label="新手套" name="New Gloves"/> <menu_item_call label="æ–°å…§è¡£" name="New Undershirt"/> diff --git a/indra/newview/skins/default/xui/zh/menu_participant_list.xml b/indra/newview/skins/default/xui/zh/menu_participant_list.xml index 81ae6e4e85..2456e9fee9 100644 --- a/indra/newview/skins/default/xui/zh/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/zh/menu_participant_list.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Participant List Context Menu"> <menu_item_check label="ä¾å稱排åº" name="SortByName"/> - <menu_item_check label="Sort by Recent Speakers" name="SortByRecentSpeakers"/> + <menu_item_check label="便œ€è¿‘說話者排åº" name="SortByRecentSpeakers"/> <menu_item_call label="察看檔案" name="View Profile"/> <menu_item_call label="åŠ ç‚ºæœ‹å‹" name="Add Friend"/> <menu_item_call label="IM" name="IM"/> @@ -9,13 +9,13 @@ <menu_item_call label="分享" name="Share"/> <menu_item_call label="支付" name="Pay"/> <menu_item_check label="察看人群圖示" name="View Icons"/> - <menu_item_check label="Block Voice" name="Block/Unblock"/> - <menu_item_check label="Block Text" name="MuteText"/> - <context_menu label="Moderator Options" name="Moderator Options"> - <menu_item_check label="Allow text chat" name="AllowTextChat"/> - <menu_item_call label="Mute this participant" name="ModerateVoiceMuteSelected"/> - <menu_item_call label="Unmute this participant" name="ModerateVoiceUnMuteSelected"/> - <menu_item_call label="Mute everyone" name="ModerateVoiceMute"/> - <menu_item_call label="Unmute everyone" name="ModerateVoiceUnmute"/> + <menu_item_check label="ç¦æ¢èªžéŸ³" name="Block/Unblock"/> + <menu_item_check label="ç¦æ¢æ–‡å—" name="MuteText"/> + <context_menu label="主æŒäººé¸é …" name="Moderator Options"> + <menu_item_check label="å…許文å—èŠå¤©" name="AllowTextChat"/> + <menu_item_call label="å°‡æ¤äººæ¶ˆéŸ³" name="ModerateVoiceMuteSelected"/> + <menu_item_call label="å–æ¶ˆå°æ¤äººçš„æ¶ˆéŸ³" name="ModerateVoiceUnMuteSelected"/> + <menu_item_call label="所有人消音" name="ModerateVoiceMute"/> + <menu_item_call label="å–æ¶ˆæ‰€æœ‰äººçš„æ¶ˆéŸ³" name="ModerateVoiceUnmute"/> </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_people_groups.xml b/indra/newview/skins/default/xui/zh/menu_people_groups.xml index 1d78c1de0a..5768c554c9 100644 --- a/indra/newview/skins/default/xui/zh/menu_people_groups.xml +++ b/indra/newview/skins/default/xui/zh/menu_people_groups.xml @@ -3,6 +3,6 @@ <menu_item_call label="察看資訊" name="View Info"/> <menu_item_call label="èŠå¤©" name="Chat"/> <menu_item_call label="通話" name="Call"/> - <menu_item_call label="Activate" name="Activate"/> - <menu_item_call label="Leave" name="Leave"/> + <menu_item_call label="啟動" name="Activate"/> + <menu_item_call label="退出" name="Leave"/> </menu> diff --git a/indra/newview/skins/default/xui/zh/menu_people_nearby.xml b/indra/newview/skins/default/xui/zh/menu_people_nearby.xml index 9faa35001c..38d5f3d324 100644 --- a/indra/newview/skins/default/xui/zh/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/zh/menu_people_nearby.xml @@ -2,12 +2,12 @@ <context_menu name="Avatar Context Menu"> <menu_item_call label="察看檔案" name="View Profile"/> <menu_item_call label="åŠ ç‚ºæœ‹å‹" name="Add Friend"/> - <menu_item_call label="Remove Friend" name="Remove Friend"/> + <menu_item_call label="移除朋å‹" name="Remove Friend"/> <menu_item_call label="IM" name="IM"/> <menu_item_call label="通話" name="Call"/> <menu_item_call label="地圖" name="Map"/> <menu_item_call label="分享" name="Share"/> <menu_item_call label="支付" name="Pay"/> - <menu_item_check label="Block/Unblock" name="Block/Unblock"/> + <menu_item_check label="å°éŽ–/ä¸å†å°éŽ–" name="Block/Unblock"/> <menu_item_call label="發給瞬間傳é€è«‹æ±‚" name="teleport"/> </context_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_people_nearby_view_sort.xml b/indra/newview/skins/default/xui/zh/menu_people_nearby_view_sort.xml index a7f5c74b82..6cb0ac3c89 100644 --- a/indra/newview/skins/default/xui/zh/menu_people_nearby_view_sort.xml +++ b/indra/newview/skins/default/xui/zh/menu_people_nearby_view_sort.xml @@ -4,5 +4,6 @@ <menu_item_check label="ä¾å稱排åº" name="sort_name"/> <menu_item_check label="ä¾è·é›¢æŽ’åº" name="sort_distance"/> <menu_item_check label="察看人群圖示" name="view_icons"/> - <menu_item_call label="顯示笨å°éŽ–çš„å±…æ°‘èˆ‡ç‰©ä»¶" name="show_blocked_list"/> + <menu_item_check label="察看地圖" name="view_map"/> + <menu_item_call label="顯示被å°éŽ–çš„å±…æ°‘èˆ‡ç‰©ä»¶" name="show_blocked_list"/> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_picks_plus.xml b/indra/newview/skins/default/xui/zh/menu_picks_plus.xml index e962bd90d5..80922a757d 100644 --- a/indra/newview/skins/default/xui/zh/menu_picks_plus.xml +++ b/indra/newview/skins/default/xui/zh/menu_picks_plus.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <toggleable_menu name="picks_plus_menu"> <menu_item_call label="æ–°ç²¾é¸åœ°é»ž" name="create_pick"/> - <menu_item_call label="New Classified" name="create_classified"/> + <menu_item_call label="新個人廣告" name="create_classified"/> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_places_gear_folder.xml b/indra/newview/skins/default/xui/zh/menu_places_gear_folder.xml index 7f4144d14d..27f0c7ebdb 100644 --- a/indra/newview/skins/default/xui/zh/menu_places_gear_folder.xml +++ b/indra/newview/skins/default/xui/zh/menu_places_gear_folder.xml @@ -4,7 +4,7 @@ <menu_item_call label="æ·»åŠ è³‡æ–™å¤¾" name="add_folder"/> <menu_item_call label="還原物å“" name="restore_item"/> <menu_item_call label="剪下" name="cut"/> - <menu_item_call label="覆製" name="copy_folder"/> + <menu_item_call label="æšåº¨" name="copy_folder"/> <menu_item_call label="貼上" name="paste"/> <menu_item_call label="æ›´å" name="rename"/> <menu_item_call label="刪除" name="delete"/> diff --git a/indra/newview/skins/default/xui/zh/menu_profile_overflow.xml b/indra/newview/skins/default/xui/zh/menu_profile_overflow.xml index ca637ae54d..f77e7090c4 100644 --- a/indra/newview/skins/default/xui/zh/menu_profile_overflow.xml +++ b/indra/newview/skins/default/xui/zh/menu_profile_overflow.xml @@ -3,10 +3,10 @@ <menu_item_call label="地圖" name="show_on_map"/> <menu_item_call label="支付" name="pay"/> <menu_item_call label="分享" name="share"/> - <menu_item_call label="Block" name="block"/> - <menu_item_call label="Unblock" name="unblock"/> + <menu_item_call label="å°éŽ–" name="block"/> + <menu_item_call label="解除å°éŽ–" name="unblock"/> <menu_item_call label="踢出" name="kick"/> <menu_item_call label="å‡çµ" name="freeze"/> <menu_item_call label="è§£å‡" name="unfreeze"/> - <menu_item_call label="CSR" name="csr"/> + <menu_item_call label="客æœ" name="csr"/> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_save_outfit.xml b/indra/newview/skins/default/xui/zh/menu_save_outfit.xml index 7884df5b01..53ee6ee977 100644 --- a/indra/newview/skins/default/xui/zh/menu_save_outfit.xml +++ b/indra/newview/skins/default/xui/zh/menu_save_outfit.xml @@ -1,5 +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"/> + <menu_item_call label="å¦å˜ç‚º" name="save_as_new_outfit"/> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_teleport_history_tab.xml b/indra/newview/skins/default/xui/zh/menu_teleport_history_tab.xml index f9107a96ed..90e8098348 100644 --- a/indra/newview/skins/default/xui/zh/menu_teleport_history_tab.xml +++ b/indra/newview/skins/default/xui/zh/menu_teleport_history_tab.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Teleport History Item Context Menu"> - <menu_item_call label="開啟" name="TabOpen"/> + <menu_item_call label="打開" name="TabOpen"/> <menu_item_call label="關閉" name="TabClose"/> </context_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_text_editor.xml b/indra/newview/skins/default/xui/zh/menu_text_editor.xml index c25f5128c3..febc0b8b67 100644 --- a/indra/newview/skins/default/xui/zh/menu_text_editor.xml +++ b/indra/newview/skins/default/xui/zh/menu_text_editor.xml @@ -1,7 +1,14 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Text editor context menu"> + <menu_item_call label="(未知)" name="Suggestion 1"/> + <menu_item_call label="(未知)" name="Suggestion 2"/> + <menu_item_call label="(未知)" name="Suggestion 3"/> + <menu_item_call label="(未知)" name="Suggestion 4"/> + <menu_item_call label="(未知)" name="Suggestion 5"/> + <menu_item_call label="新增到å—å…¸" name="Add to Dictionary"/> + <menu_item_call label="新增到忽略清單" name="Add to Ignore"/> <menu_item_call label="剪下" name="Cut"/> - <menu_item_call label="覆製" name="Copy"/> + <menu_item_call label="æšåº¨" name="Copy"/> <menu_item_call label="貼上" name="Paste"/> <menu_item_call label="刪除" name="Delete"/> <menu_item_call label="å…¨é¸" name="Select All"/> diff --git a/indra/newview/skins/default/xui/zh/menu_toolbars.xml b/indra/newview/skins/default/xui/zh/menu_toolbars.xml new file mode 100644 index 0000000000..d318992dd5 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/menu_toolbars.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<context_menu name="Toolbars Popup"> + <menu_item_call label="ç§»é™¤æ¤æŒ‰éˆ•" name="Remove button"/> + <menu_item_call label="工具列按鈕…" name="Choose Buttons"/> + <menu_item_check label="圖示和標籤" name="icons_with_text"/> + <menu_item_check label="僅用圖示" name="icons_only"/> +</context_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_topinfobar.xml b/indra/newview/skins/default/xui/zh/menu_topinfobar.xml index debaafaa10..b07e9890ff 100644 --- a/indra/newview/skins/default/xui/zh/menu_topinfobar.xml +++ b/indra/newview/skins/default/xui/zh/menu_topinfobar.xml @@ -3,5 +3,5 @@ <menu_item_check label="顯示座標" name="Show Coordinates"/> <menu_item_check label="顯示地段屬性" name="Show Parcel Properties"/> <menu_item_call label="地標" name="Landmark"/> - <menu_item_call label="覆製" name="Copy"/> + <menu_item_call label="æšåº¨" name="Copy"/> </menu> diff --git a/indra/newview/skins/default/xui/zh/menu_url_http.xml b/indra/newview/skins/default/xui/zh/menu_url_http.xml index cf953576f3..861cbfb975 100644 --- a/indra/newview/skins/default/xui/zh/menu_url_http.xml +++ b/indra/newview/skins/default/xui/zh/menu_url_http.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Url Popup"> <menu_item_call label="開啟網é " name="url_open"/> - <menu_item_call label="Open in Internal Browser" name="url_open_internal"/> - <menu_item_call label="Open in External Browser" name="url_open_external"/> - <menu_item_call label="Copy URL to clipboard" name="url_copy"/> + <menu_item_call label="用內部ç€è¦½å™¨é–‹å•Ÿ" name="url_open_internal"/> + <menu_item_call label="用外部ç€è¦½å™¨é–‹å•Ÿ" name="url_open_external"/> + <menu_item_call label="覆製 URL 到剪貼簿" name="url_copy"/> </context_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_url_slapp.xml b/indra/newview/skins/default/xui/zh/menu_url_slapp.xml index afc15ce13c..6ce9a10d3e 100644 --- a/indra/newview/skins/default/xui/zh/menu_url_slapp.xml +++ b/indra/newview/skins/default/xui/zh/menu_url_slapp.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Url Popup"> - <menu_item_call label="Run This Command" name="run_slapp"/> + <menu_item_call label="執行這個指令" name="run_slapp"/> <menu_item_call label="覆製 SLurl 到剪貼簿" name="url_copy"/> </context_menu> diff --git a/indra/newview/skins/default/xui/zh/menu_viewer.xml b/indra/newview/skins/default/xui/zh/menu_viewer.xml index b6bb79bcbc..ac0e9e7e35 100644 --- a/indra/newview/skins/default/xui/zh/menu_viewer.xml +++ b/indra/newview/skins/default/xui/zh/menu_viewer.xml @@ -1,65 +1,92 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu_bar name="Main Menu"> - <menu label="自己" name="Me"> - <menu_item_call label="å好è¨å®š" name="Preferences"/> - <menu_item_call label="我的塗鴉牆" name="Manage My Account"/> - <menu_item_call label="購買 L$" name="Buy and Sell L$"/> - <menu_item_call label="我的個人檔案" name="Profile"/> - <menu_item_call label="我的外觀" name="ChangeOutfit"/> - <menu_item_check label="我的庫å˜" name="Inventory"/> - <menu_item_check label="我的庫å˜" name="ShowSidetrayInventory"/> - <menu_item_check label="我的姿勢" name="Gestures"/> - <menu_item_check label="我的è²éŸ³" name="ShowVoice"/> - <menu label="移動" name="Movement"> + <menu label="我自己" name="Me"> + <menu_item_call label="檔案..." name="Profile"/> + <menu_item_call label="外觀…" name="ChangeOutfit"/> + <menu_item_call label="鏿“‡ä¸€å€‹åŒ–身…" name="Avatar Picker"/> + <menu_item_check label="æ”¶ç´å€â€¦" name="Inventory"/> + <menu_item_call label="æ–°æ”¶ç´å€è¦–窗" name="NewInventoryWindow"/> + <menu_item_call label="地點…" name="Places"/> + <menu_item_call label="ç²¾é¸åœ°é»žâ€¦" name="Picks"/> + <menu_item_call label="æ”影機控制…" name="Camera Controls"/> + <menu label="動作" name="Movement"> <menu_item_call label="å下" name="Sit Down Here"/> <menu_item_check label="飛行" name="Fly"/> - <menu_item_check label="總是奔跑" name="Always Run"/> + <menu_item_check label="以跑代æ¥" name="Always Run"/> <menu_item_call label="åœæ¢æˆ‘身上的動作" name="Stop Animating My Avatar"/> + <menu_item_call label="行走 / è·‘æ¥ / 飛行…" name="Walk / run / fly"/> </menu> - <menu label="我的狀態" name="Status"> + <menu label="狀態" name="Status"> <menu_item_call label="離開" name="Set Away"/> <menu_item_call label="忙碌" name="Set Busy"/> </menu> - <menu_item_call label="çµæŸé€€å‡º [APP_NAME]" name="Quit"/> + <menu_item_call label="購買 L$…" name="Buy and Sell L$"/> + <menu_item_call label="商家發件匣…" name="MerchantOutbox"/> + <menu_item_call label="帳戶主控臺…" name="Manage My Account"/> + <menu_item_call label="å好è¨å®šâ€¦" name="Preferences"/> + <menu_item_call label="工具列按鈕…" name="Toolbars"/> + <menu_item_call label="éš±è—æ‰€æœ‰æŽ§åˆ¶" name="Hide UI"/> + <menu_item_check label="顯示 HUD 附件" name="Show HUD Attachments"/> + <menu_item_call label="退出 [APP_NAME]" name="Quit"/> </menu> <menu label="æºé€š" name="Communicate"> - <menu_item_call label="我的朋å‹" name="My Friends"/> - <menu_item_call label="我的群組" name="My Groups"/> - <menu_item_check label="附近的èŠå¤©" name="Nearby Chat"/> + <menu_item_check label="èŠå¤©â€¦" name="Nearby Chat"/> + <menu_item_check label="說話" name="Speak"/> + <menu_item_check label="語音è¨å®šâ€¦" name="Nearby Voice"/> + <menu_item_check label="語音變è²â€¦" name="ShowVoice"/> + <menu_item_check label="姿勢…" name="Gestures"/> + <menu_item_call label="朋å‹" name="My Friends"/> + <menu_item_call label="群組" name="My Groups"/> <menu_item_call label="附近的人群" name="Active Speakers"/> + <menu_item_call label="å°éŽ–æ¸…å–®" name="Block List"/> </menu> <menu label="世界" name="World"> - <menu_item_check label="è¿·ä½ åœ°åœ–" name="Mini-Map"/> + <menu_item_call label="å°‡æ¤è™•記為地標" name="Create Landmark Here"/> + <menu_item_call label="目的地…" name="Destinations"/> <menu_item_check label="世界地圖" name="World Map"/> + <menu_item_check label="è¿·ä½ åœ°åœ–" name="Mini-Map"/> <menu_item_check label="æœå°‹" name="Search"/> - <menu_item_call label="æ‹æ”å¿«ç…§" name="Take Snapshot"/> - <menu_item_call label="å°‡æ¤è™•記下地標" name="Create Landmark Here"/> - <menu_item_separator/> - <menu_item_call label="地點檔案" name="Place Profile"/> - <menu_item_call label="關於土地" name="About Land"/> - <menu_item_call label="åœ°å€ / é ˜åœ°" name="Region/Estate"/> + <menu_item_call label="瞬間傳é€å›žå®¶" name="Teleport Home"/> + <menu_item_call label="把這裡è¨ç‚ºæˆ‘的家" name="Set Home to Here"/> + <menu_item_call label="å¿«ç…§" name="Take Snapshot"/> + <menu_item_call label="åœ°é»žå°æª”案" name="Place Profile"/> + <menu_item_call label="土地資料" name="About Land"/> + <menu_item_call label="地å€/é ˜åœ°" name="Region/Estate"/> + <menu_item_call label="æˆ‘æ‰€æ“æœ‰çš„土地…" name="My Land"/> <menu_item_call label="購買這塊土地" name="Buy Land"/> - <menu_item_call label="我的土地" name="My Land"/> <menu label="顯示" name="LandShow"> - <menu_item_check label="移動控制" name="Movement Controls"/> - <menu_item_check label="視角控制" name="Camera Controls"/> <menu_item_check label="ç¦è¶Šç·š" name="Ban Lines"/> <menu_item_check label="指標" name="beacons"/> - <menu_item_check label="土地邊界" name="Property Lines"/> + <menu_item_check label="地產邊界" name="Property Lines"/> <menu_item_check label="地主" name="Land Owners"/> <menu_item_check label="座標" name="Coordinates"/> <menu_item_check label="地段屬性" name="Parcel Properties"/> <menu_item_check label="進階é¸å–®" name="Show Advanced Menu"/> </menu> - <menu_item_call label="瞬間瞬間傳é€å›žå®¶" name="Teleport Home"/> - <menu_item_call label="è¨å®šå®¶åœ¨æ¤è™•" name="Set Home to Here"/> <menu label="太陽" name="Sun"> <menu_item_call label="日出" name="Sunrise"/> <menu_item_call label="ä¸åˆ" name="Noon"/> <menu_item_call label="æ—¥è½" name="Sunset"/> <menu_item_call label="åˆå¤œ" name="Midnight"/> - <menu_item_call label="é ˜åœ°æ™‚é–“" name="Revert to Region Default"/> - <menu_item_call label="環境編輯器" name="Environment Editor"/> + <menu_item_call label="使用地å€è¨å®š" name="Use Region Settings"/> + </menu> + <menu label="環境編輯器" name="Environment Editor"> + <menu_item_call label="環境è¨å®šâ€¦" name="Environment Settings"/> + <menu label="水的自訂é…ç½®" name="Water Presets"> + <menu_item_call label="新的自訂é…置…" name="new_water_preset"/> + <menu_item_call label="編輯自訂é…置…" name="edit_water_preset"/> + <menu_item_call label="刪除自訂é…置…" name="delete_water_preset"/> + </menu> + <menu label="天空自訂é…ç½®" name="Sky Presets"> + <menu_item_call label="新的自訂é…置…" name="new_sky_preset"/> + <menu_item_call label="編輯自訂é…置…" name="edit_sky_preset"/> + <menu_item_call label="刪除自訂é…置…" name="delete_sky_preset"/> + </menu> + <menu label="日的自訂é…ç½®" name="Day Presets"> + <menu_item_call label="新的自訂é…置…" name="new_day_preset"/> + <menu_item_call label="編輯自訂é…置…" name="edit_day_preset"/> + <menu_item_call label="刪除自訂é…置…" name="delete_day_preset"/> + </menu> </menu> </menu> <menu label="å»ºé€ " name="BuildTools"> @@ -97,65 +124,69 @@ <menu_item_call label="è¨å®šè…³æœ¬ç‚ºåŸ·è¡Œä¸" name="Set Scripts to Running"/> <menu_item_call label="è¨å®šè…³æœ¬ç‚ºéžåŸ·è¡Œä¸" name="Set Scripts to Not Running"/> </menu> + <menu label="尋徑" name="Pathfinding"> + <menu_item_call label="è¯çµé›†â€¦" name="pathfinding_linksets_menu_item"/> + <menu_item_call label="角色…" name="pathfinding_characters_menu_item"/> + <menu_item_call label="察看 / 測試…" name="pathfinding_console_menu_item"/> + </menu> <menu label="é¸é …" name="Options"> <menu_item_check label="顯示進階權é™" name="DebugPermissions"/> <menu_item_check label="åªé¸å–我的物件" name="Select Only My Objects"/> <menu_item_check label="åªé¸å–å¯ç§»å‹•的物件" name="Select Only Movable Objects"/> - <menu_item_check label="Select By Surrounding" name="Select By Surrounding"/> - <menu_item_check label="Show Selection Outlines" name="Show Selection Outlines"/> - <menu_item_check label="Show Hidden Selection" name="Show Hidden Selection"/> - <menu_item_check label="Show Light Radius for Selection" name="Show Light Radius for Selection"/> - <menu_item_check label="Show Selection Beam" name="Show Selection Beam"/> + <menu_item_check label="環繞é¸å–" name="Select By Surrounding"/> + <menu_item_check label="顯示é¸å–輪廓線" name="Show Selection Outlines"/> + <menu_item_check label="顯示隱è—çš„é¸å–" name="Show Hidden Selection"/> + <menu_item_check label="é¡¯ç¤ºé¸æ“‡çš„ Light åŠå¾‘" name="Show Light Radius for Selection"/> + <menu_item_check label="é¡¯ç¤ºé¸æ“‡å°Žå¼•ç·š" name="Show Selection Beam"/> <menu_item_check label="è²¼é½Šæ ¼ç·š" name="Snap to Grid"/> <menu_item_call label="貼齊物件 XY è»¸åˆ°æ ¼ç·š" name="Snap Object XY to Grid"/> - <menu_item_call label="Use Selection for Grid" name="Use Selection for Grid"/> + <menu_item_call label="ä»¥æ‰€é¸æ“‡ä½œç‚ºæ ¼ç·š" name="Use Selection for Grid"/> <menu_item_call label="æ ¼ç·šé¸é …" name="Grid Options"/> </menu> <menu label="上傳" name="Upload"> <menu_item_call label="圖åƒï¼ˆL$[COST])..." name="Upload Image"/> <menu_item_call label="è²éŸ³ï¼ˆL$[COST])..." name="Upload Sound"/> <menu_item_call label="動作(L$[COST])..." name="Upload Animation"/> - <menu_item_call label="大é‡ä¸Šå‚³ï¼ˆæ¯æª”案 L$[COST] )..." name="Bulk Upload"/> + <menu_item_call label="模型…" name="Upload Model"/> + <menu_item_call label="批é‡ï¼ˆæ¯æª”案 L$[COST] )..." name="Bulk Upload"/> <menu_item_call label="è¨å®šé è¨ä¸Šå‚³æ¬Šé™" name="perm prefs"/> </menu> <menu_item_call label="復原" name="Undo"/> <menu_item_call label="é‡åš" name="Redo"/> </menu> <menu label="幫助" name="Help"> + <menu_item_call label="簡易教å¸â€¦" name="How To"/> <menu_item_call label="[SECOND_LIFE] 幫助" name="Second Life Help"/> - <menu_item_check label="啟用æç¤º" name="Enable Hints"/> - <menu_item_call label="èˆ‰å ±æ¿«ç”¨" name="Report Abuse"/> + <menu_item_call label="é•è¦èˆ‰å ±" name="Report Abuse"/> <menu_item_call label="å›žå ±è‡èŸ²" name="Report Bug"/> <menu_item_call label="關於 [APP_NAME]" name="About Second Life"/> </menu> <menu label="進階" name="Advanced"> - <menu_item_call label="Rebake Textures" name="Rebake Texture"/> - <menu_item_call label="è¨å®šä½¿ç”¨è€…界é¢å¤§å°è‡³é è¨å€¼" name="Set UI Size to Default"/> - <menu_item_call label="è¨å®šè¦–窗尺寸大å°..." name="Set Window Size..."/> + <menu_item_call label="釿–°ç”¢å‡ºæè³ª" name="Rebake Texture"/> + <menu_item_call label="以é è¨å€¼è¨å®šä½¿ç”¨è€…界é¢å¤§å°" name="Set UI Size to Default"/> + <menu_item_call label="è¨å®šè¦–窗大å°..." name="Set Window Size..."/> <menu_item_check label="é™åˆ¶é¸æ“‡è·é›¢" name="Limit Select Distance"/> - <menu_item_check label="Disable Camera Constraints" name="Disable Camera Distance"/> + <menu_item_check label="å–æ¶ˆé¡é é™åˆ¶" name="Disable Camera Distance"/> <menu_item_check label="高解æžåº¦å¿«ç…§" name="HighResSnapshot"/> <menu_item_check label="éœéŸ³æ‹æ”快照到硬碟" name="QuietSnapshotsToDisk"/> - <menu_item_check label="壓縮快照å˜åˆ°ç¡¬ç¢Ÿ" name="CompressSnapshotsToDisk"/> <menu label="效能工具" name="Performance Tools"> - <menu_item_call label="Lag Meter" name="Lag Meter"/> + <menu_item_call label="Lag 測é‡å™¨" name="Lag Meter"/> <menu_item_check label="統計列" name="Statistics Bar"/> - <menu_item_check label="Show Avatar Rendering Cost" name="Avatar Rendering Cost"/> + <menu_item_check label="顯示化身的繪製é‡é‡" name="Avatar Rendering Cost"/> </menu> <menu label="高亮顯示與å¯è¦‹åº¦" name="Highlighting and Visibility"> - <menu_item_check label="Cheesy Beacon" name="Cheesy Beacon"/> + <menu_item_check label="Cheesy 指標" name="Cheesy Beacon"/> <menu_item_check label="éš±è—ç²’åæ•ˆæžœ" name="Hide Particles"/> <menu_item_check label="éš±è—æ‰€é¸æ“‡çš„" name="Hide Selected"/> <menu_item_check label="é«˜äº®é¡¯ç¤ºé€æ˜Žç‰©ä»¶" name="Highlight Transparent"/> - <menu_item_check label="顯示 HUD 附件" name="Show HUD Attachments"/> <menu_item_check label="顯示第一人稱視角準星" name="ShowCrosshairs"/> </menu> - <menu label="Rendering Types" name="Rendering Types"> + <menu label="呈åƒé¡žåž‹" name="Rendering Types"> <menu_item_check label="ç°¡å–®" name="Rendering Type Simple"/> <menu_item_check label="åŠé€æ˜Ž" name="Rendering Type Alpha"/> <menu_item_check label="樹木" name="Rendering Type Tree"/> <menu_item_check label="化身" name="Rendering Type Character"/> - <menu_item_check label="地表" name="Rendering Type Surface Patch"/> + <menu_item_check label="表é¢ä¿®è£œ" name="Rendering Type Surface Patch"/> <menu_item_check label="天空" name="Rendering Type Sky"/> <menu_item_check label="æ°´æ–‡" name="Rendering Type Water"/> <menu_item_check label="地é¢" name="Rendering Type Ground"/> @@ -165,32 +196,32 @@ <menu_item_check label="ç²’åæ•ˆæžœ" name="Rendering Type Particles"/> <menu_item_check label="碰撞" name="Rendering Type Bump"/> </menu> - <menu label="Rendering Features" name="Rendering Features"> - <menu_item_check label="UI" name="ToggleUI"/> - <menu_item_check label="Selected" name="Selected"/> - <menu_item_check label="Highlighted" name="Highlighted"/> - <menu_item_check label="Dynamic Textures" name="Dynamic Textures"/> + <menu label="呈åƒåŠŸèƒ½" name="Rendering Features"> + <menu_item_check label="使用者界é¢" name="ToggleUI"/> + <menu_item_check label="鏿“‡" name="Selected"/> + <menu_item_check label="高亮顯示" name="Highlighted"/> + <menu_item_check label="å‹•æ…‹æè³ª" name="Dynamic Textures"/> <menu_item_check label="è…³æ¥é™°å½±" name="Foot Shadows"/> <menu_item_check label="霧氣" name="Fog"/> - <menu_item_check label="Test FRInfo" name="Test FRInfo"/> + <menu_item_check label="測試 FRInfo" name="Test FRInfo"/> <menu_item_check label="彈性物件" name="Flexible Objects"/> </menu> <menu_item_check label="使用外å¦è®€å–ç·’" name="Use Plugin Read Thread"/> <menu_item_call label="清除群組快å–資料" name="ClearGroupCache"/> <menu_item_check label="æ»‘é¼ å¹³æ»‘ç§»å‹•" name="Mouse Smoothing"/> + <menu_item_call label="釋出按éµ" name="Release Keys"/> <menu label="快速éµ" name="Shortcuts"> - <menu_item_call label="釋出按éµ" name="Release Keys"/> <menu_item_check label="顯示進階é¸å–® ï¼ èˆŠç‰ˆæ·å¾‘" name="Show Advanced Menu - legacy shortcut"/> <menu_item_call label="關閉視窗" name="Close Window"/> <menu_item_call label="關閉全部視窗" name="Close All Windows"/> <menu_item_call label="æ‹æ”快照到硬碟" name="Snapshot to Disk"/> <menu_item_call label="第一人稱視角" name="Mouselook"/> - <menu_item_check label="Joystick Flycam" name="Joystick Flycam"/> + <menu_item_check label="æ–æ¡¿ç§»å‹•æ”影機" name="Joystick Flycam"/> <menu_item_call label="é‡è¨è¦–è§’" name="Reset View"/> <menu_item_call label="注視上一ä½èŠå¤©è€…" name="Look at Last Chatter"/> - <menu_item_call label="Zoom In" name="Zoom In"/> - <menu_item_call label="Zoom Default" name="Zoom Default"/> - <menu_item_call label="Zoom Out" name="Zoom Out"/> + <menu_item_call label="放大" name="Zoom In"/> + <menu_item_call label="縮放æ¢å¾©é è¨" name="Zoom Default"/> + <menu_item_call label="縮å°" name="Zoom Out"/> </menu> <menu_item_call label="顯示除錯è¨å®š" name="Debug Settings"/> <menu_item_check label="顯示開發é¸å–®" name="Debug Mode"/> @@ -200,25 +231,27 @@ <menu_item_check label="æè³ªæŽ§åˆ¶å°" name="Texture Console"/> <menu_item_check label="除錯控制å°" name="Debug Console"/> <menu_item_call label="通知控制å°" name="Notifications"/> - <menu_item_check label="æè³ªå°ºå¯¸æŽ§åˆ¶å°" name="Texture Size"/> - <menu_item_check label="æè³ªåˆ†é¡žæŽ§åˆ¶å°" name="Texture Category"/> <menu_item_check label="快速碼錶" name="Fast Timers"/> <menu_item_check label="記憶體" name="Memory"/> + <menu_item_check label="å ´æ™¯çµ±è¨ˆè³‡æ–™" name="Scene Statistics"/> + <menu_item_call label="æè³ªæ“·å–除錯控制å°" name="Texture Fetch Debug Console"/> <menu_item_call label="地å€è³‡è¨Šå‚³è‡³é™¤éŒ¯æŽ§åˆ¶å°" name="Region Info to Debug Console"/> <menu_item_call label="群組資訊至除錯控制å°" name="Group Info to Debug Console"/> - <menu_item_call label="Capabilities Info to Debug Console" name="Capabilities Info to Debug Console"/> + <menu_item_call label="性能資訊傳至除錯控制å°" name="Capabilities Info to Debug Console"/> <menu_item_check label="æ”影機" name="Camera"/> <menu_item_check label="風力" name="Wind"/> - <menu_item_check label="FOV" name="FOV"/> - <menu_item_check label="Badge" name="Badge"/> + <menu_item_check label="視角" name="FOV"/> + <menu_item_check label="å‹›ç« " name="Badge"/> </menu> <menu label="顯示資訊" name="Display Info"> <menu_item_check label="顯示時間" name="Show Time"/> - <menu_item_check label="Show Render Info" name="Show Render Info"/> + <menu_item_check label="顯示上傳費用" name="Show Upload Cost"/> + <menu_item_check label="顯示呈åƒè³‡è¨Š" name="Show Render Info"/> <menu_item_check label="顯示æè³ªè³‡è¨Š" name="Show Texture Info"/> - <menu_item_check label="Show Matrices" name="Show Matrices"/> - <menu_item_check label="Show Color Under Cursor" name="Show Color Under Cursor"/> + <menu_item_check label="顯示矩陣" name="Show Matrices"/> + <menu_item_check label="游標下顯示é¡è‰²" name="Show Color Under Cursor"/> <menu_item_check label="顯示記憶體" name="Show Memory"/> + <menu_item_check label="顯示ç§å€è¨˜æ†¶é«”資訊" name="Show Private Mem Info"/> <menu_item_check label="顯示更新到物件" name="Show Updates"/> </menu> <menu label="強制錯誤" name="Force Errors"> @@ -231,60 +264,71 @@ <menu_item_call label="強制ç€è¦½å™¨æ–·ç·š" name="Force Disconnect Viewer"/> <menu_item_call label="模擬記憶體ä¸è¶³" name="Memory Leaking Simulation"/> </menu> - <menu label="Render Tests" name="Render Tests"> + <menu label="å‘ˆåƒæ¸¬è©¦" name="Render Tests"> <menu_item_check label="æ”影機ä½ç§»" name="Camera Offset"/> - <menu_item_check label="Randomize Framerate" name="Randomize Framerate"/> - <menu_item_check label="Periodic Slow Frame" name="Periodic Slow Frame"/> - <menu_item_check label="Frame Test" name="Frame Test"/> - </menu> - <menu label="Render Metadata" name="Render Metadata"> - <menu_item_check label="Bounding Boxes" name="Bounding Boxes"/> - <menu_item_check label="Octree" name="Octree"/> - <menu_item_check label="Shadow Frusta" name="Shadow Frusta"/> - <menu_item_check label="Occlusion" name="Occlusion"/> - <menu_item_check label="Render Batches" name="Render Batches"/> - <menu_item_check label="Update Type" name="Update Type"/> - <menu_item_check label="Texture Anim" name="Texture Anim"/> - <menu_item_check label="Texture Priority" name="Texture Priority"/> - <menu_item_check label="Texture Area" name="Texture Area"/> - <menu_item_check label="Face Area" name="Face Area"/> - <menu_item_check label="Lights" name="Lights"/> - <menu_item_check label="Collision Skeleton" name="Collision Skeleton"/> - <menu_item_check label="Raycast" name="Raycast"/> - </menu> - <menu label="Rendering" name="Rendering"> - <menu_item_check label="Axes" name="Axes"/> - <menu_item_check label="Tangent Basis" name="Tangent Basis"/> - <menu_item_call label="Selected Texture Info Basis" name="Selected Texture Info Basis"/> - <menu_item_check label="Wireframe" name="Wireframe"/> - <menu_item_check label="Object-Object Occlusion" name="Object-Object Occlusion"/> - <menu_item_check label="Framebuffer Objects" name="Framebuffer Objects"/> - <menu_item_check label="Lighting and Shadows" name="Lighting and Shadows"/> - <menu_item_check label="Shadows from Sun/Moon/Projectors" name="Shadows from Sun/Moon/Projectors"/> - <menu_item_check label="SSAO and Shadow Smoothing" name="SSAO and Shadow Smoothing"/> - <menu_item_check label="Global Illumination (experimental)" name="Global Illumination"/> + <menu_item_check label="隨機變動幀率" name="Randomize Framerate"/> + <menu_item_check label="å®šæœŸå‡ºç¾æ…¢å¹€çއ" name="Periodic Slow Frame"/> + <menu_item_check label="ç•«é¢æ¸¬è©¦" name="Frame Test"/> + </menu> + <menu label="呈åƒçš„元資料" name="Render Metadata"> + <menu_item_check label="外框箱" name="Bounding Boxes"/> + <menu_item_check label="法線" name="Normals"/> + <menu_item_check label="八剿¨¹" name="Octree"/> + <menu_item_check label="陰影平截é é«”" name="Shadow Frusta"/> + <menu_item_check label="物ç†å½¢ç‹€" name="Physics Shapes"/> + <menu_item_check label="é®è”½" name="Occlusion"/> + <menu_item_check label="å‘ˆåƒæ‰¹æ¬¡" name="Render Batches"/> + <menu_item_check label="更新類型" name="Update Type"/> + <menu_item_check label="æè³ªå‹•ç•«" name="Texture Anim"/> + <menu_item_check label="æè³ªå„ªå…ˆåº" name="Texture Priority"/> + <menu_item_check label="æè³ªå€åŸŸ" name="Texture Area"/> + <menu_item_check label="臉å€åŸŸ" name="Face Area"/> + <menu_item_check label="細節層次資訊" name="LOD Info"/> + <menu_item_check label="建製佇列" name="Build Queue"/> + <menu_item_check label="燈光" name="Lights"/> + <menu_item_check label="碰撞骨架" name="Collision Skeleton"/> + <menu_item_check label="光線投射" name="Raycast"/> + <menu_item_check label="風力å‘é‡" name="Wind Vectors"/> + <menu_item_check label="繪出複雜度" name="rendercomplexity"/> + <menu_item_check label="附件ä½å…ƒçµ„" name="attachment bytes"/> + <menu_item_check label="雕刻" name="Sculpt"/> + <menu label="æè³ªå¯†åº¦" name="Texture Density"> + <menu_item_check label="ç„¡" name="None"/> + <menu_item_check label="ç›®å‰" name="Current"/> + <menu_item_check label="ç†æƒ³" name="Desired"/> + <menu_item_check label="完全" name="Full"/> + </menu> + </menu> + <menu label="呈åƒ" name="Rendering"> + <menu_item_check label="軸" name="Axes"/> + <menu_item_check label="切線基礎" name="Tangent Basis"/> + <menu_item_call label="å·²é¸å–æè³ªè³‡è¨ŠåŸºç¤Ž" name="Selected Texture Info Basis"/> + <menu_item_check label="線框" name="Wireframe"/> + <menu_item_check label="物件導å‘çš„é®è”½" name="Object-Object Occlusion"/> + <menu_item_check label="光線和陰影" name="Lighting and Shadows"/> + <menu_item_check label="來自日/月/投影物的陰影" name="Shadows from Sun/Moon/Projectors"/> + <menu_item_check label="å±å¹•空間環境光é®è”½å’Œé™°å½±å¹³æ»‘技術" name="SSAO and Shadow Smoothing"/> <menu_item_check label="GL 除錯" name="Debug GL"/> <menu_item_check label="管線除錯" name="Debug Pipeline"/> <menu_item_check label="自動åŠé€æ˜Žé®ç½©ï¼ˆéžå»¶ï¼‰" name="Automatic Alpha Masks (deferred)"/> <menu_item_check label="自動åŠé€æ˜Žé®ç½©ï¼ˆéžéžå»¶ï¼‰" name="Automatic Alpha Masks (non-deferred)"/> - <menu_item_check label="Animation Textures" name="Animation Textures"/> + <menu_item_check label="動作æè³ª" name="Animation Textures"/> <menu_item_check label="關閉æè³ª" name="Disable Textures"/> - <menu_item_check label="Full Res Textures" name="Rull Res Textures"/> - <menu_item_check label="Audit Textures" name="Audit Textures"/> - <menu_item_check label="Texture Atlas (experimental)" name="Texture Atlas"/> - <menu_item_check label="Render Attached Lights" name="Render Attached Lights"/> - <menu_item_check label="Render Attached Particles" name="Render Attached Particles"/> - <menu_item_check label="Hover Glow Objects" name="Hover Glow Objects"/> + <menu_item_check label="全解æžåº¦æè³ª" name="Rull Res Textures"/> + <menu_item_check label="æè³ªåœ–集(實驗性質)" name="Texture Atlas"/> + <menu_item_check label="使附著燈光呈åƒ" name="Render Attached Lights"/> + <menu_item_check label="ä½¿é™„è‘—ä¾‹åæ•ˆæžœå‘ˆåƒ" name="Render Attached Particles"/> + <menu_item_check label="åœæ‡¸ç™¼å…‰ç‰©ä»¶" name="Hover Glow Objects"/> </menu> <menu label="網路" name="Network"> - <menu_item_check label="Pause Agent" name="AgentPause"/> - <menu_item_call label="Enable Message Log" name="Enable Message Log"/> - <menu_item_call label="Disable Message Log" name="Disable Message Log"/> - <menu_item_check label="Velocity Interpolate Objects" name="Velocity Interpolate Objects"/> - <menu_item_check label="Ping Interpolate Object Positions" name="Ping Interpolate Object Positions"/> - <menu_item_call label="Drop a Packet" name="Drop a Packet"/> - </menu> - <menu_item_call label="Dump Scripted Camera" name="Dump Scripted Camera"/> + <menu_item_check label="æš«åœç”¨æˆ¶" name="AgentPause"/> + <menu_item_call label="啟用訊æ¯è¨˜éŒ„" name="Enable Message Log"/> + <menu_item_call label="åœç”¨è¨Šæ¯è¨˜éŒ„" name="Disable Message Log"/> + <menu_item_check label="速度內æ’物件" name="Velocity Interpolate Objects"/> + <menu_item_check label="探詢內æ’物件ä½ç½®" name="Ping Interpolate Object Positions"/> + <menu_item_call label="丟出一個å°åŒ…" name="Drop a Packet"/> + </menu> + <menu_item_call label="傾å°è…³æœ¬æŽ§åˆ¶çš„æ”å½±æ©Ÿ" name="Dump Scripted Camera"/> <menu_item_call label="ç¢°æ’žã€æŽ¨æ“ èˆ‡æ‰“æ“Š" name="Bumps, Pushes &amp; Hits"/> <menu label="錄製器" name="Recorder"> <menu_item_call label="é–‹å§‹æ’æ”¾" name="Start Playback"/> @@ -298,24 +342,24 @@ <menu_item_check label="固定天氣" name="Fixed Weather"/> <menu_item_call label="傾å°åœ°å€ç‰©ä»¶å¿«å–" name="Dump Region Object Cache"/> </menu> - <menu label="UI" name="UI"> - <menu_item_call label="測試媒體ç€è¦½å™¨" name="Web Browser Test"/> + <menu label="使用者界é¢" name="UI"> + <menu_item_call label="媒體ç€è¦½å™¨æ¸¬è©¦" name="Web Browser Test"/> <menu_item_call label="ç¶²é 內容ç€è¦½å™¨" name="Web Content Browser"/> - <menu_item_call label="Dump SelectMgr" name="Dump SelectMgr"/> + <menu_item_call label="å‚¾å° SelectMgr" name="Dump SelectMgr"/> <menu_item_call label="傾尿”¶ç´å€" name="Dump Inventory"/> <menu_item_call label="傾å°ç¢¼éŒ¶" name="Dump Timers"/> - <menu_item_call label="Dump Focus Holder" name="Dump Focus Holder"/> - <menu_item_call label="Print Selected Object Info" name="Print Selected Object Info"/> - <menu_item_call label="Print Agent Info" name="Print Agent Info"/> + <menu_item_call label="傾å°ç„¦é»žå®¹å™¨" name="Dump Focus Holder"/> + <menu_item_call label="åˆ—å°æ‰€é¸ç‰©ä»¶è³‡è¨Š" name="Print Selected Object Info"/> + <menu_item_call label="列å°ç”¨æˆ¶è³‡è¨Š" name="Print Agent Info"/> <menu_item_call label="計憶體狀態" name="Memory Stats"/> - <menu_item_check label="Region Debug Console" name="Region Debug Console"/> - <menu_item_check label="Debug SelectMgr" name="Debug SelectMgr"/> - <menu_item_check label="Debug Clicks" name="Debug Clicks"/> + <menu_item_check label="地å€é™¤éŒ¯æŽ§åˆ¶å°" name="Region Debug Console"/> + <menu_item_check label="除錯 SelectMgr" name="Debug SelectMgr"/> + <menu_item_check label="除錯點按動作" name="Debug Clicks"/> <menu_item_check label="視角除錯" name="Debug Views"/> - <menu_item_check label="Debug Name Tooltips" name="Debug Name Tooltips"/> + <menu_item_check label="除錯åç¨±è¨Šæ¯æç¤º" name="Debug Name Tooltips"/> <menu_item_check label="æ»‘é¼ äº‹ä»¶é™¤éŒ¯" name="Debug Mouse Events"/> <menu_item_check label="按éµé™¤éŒ¯" name="Debug Keys"/> - <menu_item_check label="Debug WindowProc" name="Debug WindowProc"/> + <menu_item_check label="除錯 WindowProc" name="Debug WindowProc"/> </menu> <menu label="XUI" name="XUI"> <menu_item_call label="釿–°è¼‰å…¥é¡è‰²è¨å®š" name="Reload Color Settings"/> @@ -325,19 +369,18 @@ <menu_item_call label="æ²–æ´—å稱快å–資料" name="Flush Names Caches"/> </menu> <menu label="化身" name="Character"> - <menu label="Grab Baked Texture" name="Grab Baked Texture"> - <menu_item_call label="Iris" name="Grab Iris"/> + <menu label="抓å–已產出æè³ª" name="Grab Baked Texture"> + <menu_item_call label="虹膜" name="Grab Iris"/> <menu_item_call label="é 部" name="Grab Head"/> - <menu_item_call label="Upper Body" name="Grab Upper Body"/> - <menu_item_call label="Lower Body" name="Grab Lower Body"/> + <menu_item_call label="上åŠèº«" name="Grab Upper Body"/> + <menu_item_call label="下åŠèº«" name="Grab Lower Body"/> <menu_item_call label="裙å" name="Grab Skirt"/> </menu> - <menu label="Character Tests" name="Character Tests"> - <menu_item_call label="Appearance To XML" name="Appearance To XML"/> - <menu_item_call label="Toggle Character Geometry" name="Toggle Character Geometry"/> + <menu label="å—元測試" name="Character Tests"> + <menu_item_call label="å°‡å¤–è§€è½‰æˆ XML" name="Appearance To XML"/> + <menu_item_call label="切æ›å—元幾何特性" name="Toggle Character Geometry"/> <menu_item_call label="男性測試" name="Test Male"/> <menu_item_call label="女性測試" name="Test Female"/> - <menu_item_call label="PG 切æ›" name="Toggle PG"/> <menu_item_check label="å…è¨±é¸æ“‡åŒ–身" name="Allow Select Avatar"/> </menu> <menu_item_call label="å¼·åˆ¶åƒæ•¸ç‚ºé è¨å€¼" name="Force Params to Default"/> @@ -345,47 +388,56 @@ <menu_item_check label="慢動作" name="Slow Motion Animations"/> <menu_item_check label="顯示注視在" name="Show Look At"/> <menu_item_check label="顯示指å‘在" name="Show Point At"/> - <menu_item_check label="Debug Joint Updates" name="Debug Joint Updates"/> - <menu_item_check label="Disable LOD" name="Disable LOD"/> - <menu_item_check label="Debug Character Vis" name="Debug Character Vis"/> - <menu_item_check label="Show Collision Skeleton" name="Show Collision Skeleton"/> - <menu_item_check label="Display Agent Target" name="Display Agent Target"/> + <menu_item_check label="除錯旋軸的更新" name="Debug Joint Updates"/> + <menu_item_check label="åœç”¨ç´°ç¯€å±¤æ¬¡" name="Disable LOD"/> + <menu_item_check label="除錯å—å…ƒå¯è¦‹æ€§" name="Debug Character Vis"/> + <menu_item_check label="顯示碰撞骨架" name="Show Collision Skeleton"/> + <menu_item_check label="顯示用戶目標" name="Display Agent Target"/> --> - <menu_item_call label="Dump Attachments" name="Dump Attachments"/> - <menu_item_call label="Debug Avatar Textures" name="Debug Avatar Textures"/> - <menu_item_call label="Dump Local Textures" name="Dump Local Textures"/> + <menu_item_call label="傾å°é™„ä»¶" name="Dump Attachments"/> + <menu_item_call label="除錯化身æè³ª" name="Debug Avatar Textures"/> + <menu_item_call label="傾尿œ¬åœ°æè³ª" name="Dump Local Textures"/> </menu> <menu_item_check label="HTTP æè³ª" name="HTTP Textures"/> - <menu_item_call label="Compress Images" name="Compress Images"/> - <menu_item_check label="Output Debug Minidump" name="Output Debug Minidump"/> - <menu_item_check label="Console Window on next Run" name="Console Window"/> - <menu_item_call label="Request Admin Status" name="Request Admin Options"/> - <menu_item_call label="Leave Admin Status" name="Leave Admin Options"/> - <menu_item_check label="Show Admin Menu" name="View Admin Options"/> + <menu_item_check label="HTTP æ”¶ç´å€" name="HTTP Inventory"/> + <menu_item_call label="壓縮圖åƒ" name="Compress Images"/> + <menu_item_call label="啟用記憶體洩æ¼è¦–è¦ºåµæ¸¬å™¨" name="Enable Visual Leak Detector"/> + <menu_item_check label="輸出除錯å°åž‹å‚¾å°" name="Output Debug Minidump"/> + <menu_item_check label="下次執行時顯示控制å°è¦–窗" name="Console Window"/> + <menu label="è¨å®šè¨˜éŒ„細節" name="Set Logging Level"> + <menu_item_check label="除錯" name="Debug"/> + <menu_item_check label="資訊" name="Info"/> + <menu_item_check label="è¦å‘Š" name="Warning"/> + <menu_item_check label="錯誤" name="Error"/> + <menu_item_check label="ç„¡" name="None"/> + </menu> + <menu_item_call label="è¦æ±‚管ç†å“¡ç‹€æ…‹" name="Request Admin Options"/> + <menu_item_call label="離開管ç†å“¡ç‹€æ…‹" name="Leave Admin Options"/> + <menu_item_check label="顯示管ç†å“¡é¸å–®" name="View Admin Options"/> </menu> - <menu label="Admin" name="Admin"> - <menu label="Object" name="AdminObject"> + <menu label="管ç†å“¡" name="Admin"> + <menu label="物件" name="AdminObject"> <menu_item_call label="å–得副本" name="Admin Take Copy"/> - <menu_item_call label="å¼·åˆ¶æ“æœ‰è€…為我" name="Force Owner To Me"/> - <menu_item_call label="Force Owner Permissive" name="Force Owner Permissive"/> + <menu_item_call label="將所有人強è¨ç‚ºæˆ‘自己" name="Force Owner To Me"/> + <menu_item_call label="å¼·è¨ç‚ºã€Œå‡†è¨±æ‰€æœ‰äººã€" name="Force Owner Permissive"/> <menu_item_call label="刪除" name="Delete"/> - <menu_item_call label="Lock" name="Lock"/> - <menu_item_call label="Get Assets IDs" name="Get Assets IDs"/> + <menu_item_call label="鎖定" name="Lock"/> + <menu_item_call label="å–得資產 ID" name="Get Assets IDs"/> </menu> <menu label="地段" name="Parcel"> - <menu_item_call label="å¼·åˆ¶æ“æœ‰è€…為我" name="Owner To Me"/> - <menu_item_call label="Set to Linden Content" name="Set to Linden Content"/> - <menu_item_call label="Claim Public Land" name="Claim Public Land"/> + <menu_item_call label="將所有人強è¨ç‚ºæˆ‘自己" name="Owner To Me"/> + <menu_item_call label="è¨ç‚º Linden 內容" name="Set to Linden Content"/> + <menu_item_call label="æ”¶å–公共地" name="Claim Public Land"/> </menu> <menu label="地å€" name="Region"> - <menu_item_call label="Dump Temp Asset Data" name="Dump Temp Asset Data"/> - <menu_item_call label="Save Region State" name="Save Region State"/> + <menu_item_call label="傾尿š«ç”¨è³‡ç”¢è³‡æ–™" name="Dump Temp Asset Data"/> + <menu_item_call label="儲å˜å€åŸŸç‹€æ…‹" name="Save Region State"/> </menu> - <menu_item_call label="God Tools" name="God Tools"/> + <menu_item_call label="神之工具" name="God Tools"/> </menu> - <menu label="Admin" name="Deprecated"> - <menu label="Attach Object" name="Attach Object"/> - <menu label="Detach Object" name="Detach Object"/> + <menu label="管ç†å“¡" name="Deprecated"> + <menu label="附著物件" name="Attach Object"/> + <menu label="å¸åŽ»ç‰©ä»¶" name="Detach Object"/> <menu label="脫下æœè£" name="Take Off Clothing"> <menu_item_call label="襯衫" name="Shirt"/> <menu_item_call label="褲å" name="Pants"/> @@ -403,13 +455,13 @@ </menu> <menu label="幫助" name="DeprecatedHelp"> <menu_item_call label="æž—ç™»å®˜æ–¹éƒ¨è½æ ¼" name="Official Linden Blog"/> - <menu_item_call label="Scripting Portal" name="Scripting Portal"/> + <menu_item_call label="腳本門戶" name="Scripting Portal"/> <menu label="è‡èŸ²å›žå ±" name="Bug Reporting"> - <menu_item_call label="Public Issue Tracker" name="Public Issue Tracker"/> - <menu_item_call label="Public Issue Tracker Help" name="Publc Issue Tracker Help"/> + <menu_item_call label="大眾å•é¡Œåæ‡‰è¿½è¹¤è™•" name="Public Issue Tracker"/> + <menu_item_call label="大眾å•é¡Œåæ‡‰è¿½è¹¤è™•幫助" name="Publc Issue Tracker Help"/> <menu_item_call label="è‡èŸ²å›žå ± 101" name="Bug Reporing 101"/> - <menu_item_call label="Security Issues" name="Security Issues"/> - <menu_item_call label="QA Wiki" name="QA Wiki"/> + <menu_item_call label="安全å•題" name="Security Issues"/> + <menu_item_call label="å“管ç¶åŸº" name="QA Wiki"/> </menu> </menu> </menu> diff --git a/indra/newview/skins/default/xui/zh/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/zh/menu_wearable_list_item.xml index 2eea314dd8..576f7f3b73 100644 --- a/indra/newview/skins/default/xui/zh/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/zh/menu_wearable_list_item.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Outfit Wearable Context Menu"> <menu_item_call label="å–代" name="wear_replace"/> - <menu_item_call label="Wear" name="wear_wear"/> + <menu_item_call label="穿上" name="wear_wear"/> <menu_item_call label="æ·»åŠ " name="wear_add"/> - <menu_item_call label="Take Off / Detach" name="take_off_or_detach"/> + <menu_item_call label="è„«ä¸‹è£æ‰® / å¸é™¤é™„ä»¶" name="take_off_or_detach"/> <menu_item_call label="å¸ä¸‹" name="detach"/> - <context_menu label="Attach to" name="wearable_attach_to"/> - <context_menu label="Attach to HUD" name="wearable_attach_to_hud"/> + <context_menu label="附著到..." name="wearable_attach_to"/> + <context_menu label="附著到擡é 顯示" name="wearable_attach_to_hud"/> <menu_item_call label="脫下" name="take_off"/> <menu_item_call label="編輯" name="edit"/> <menu_item_call label="ç‰©å“æª”案" name="object_profile"/> diff --git a/indra/newview/skins/default/xui/zh/menu_wearing_gear.xml b/indra/newview/skins/default/xui/zh/menu_wearing_gear.xml index d9f4acb27b..6184f956d1 100644 --- a/indra/newview/skins/default/xui/zh/menu_wearing_gear.xml +++ b/indra/newview/skins/default/xui/zh/menu_wearing_gear.xml @@ -2,4 +2,5 @@ <toggleable_menu name="Gear Wearing"> <menu_item_call label="ç·¨è¼¯è£æ‰®" name="edit"/> <menu_item_call label="脫下" name="takeoff"/> + <menu_item_call label="è¤‡è£½è£æ‰®æ¸…單到剪貼簿" name="copy"/> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/zh/mime_types.xml b/indra/newview/skins/default/xui/zh/mime_types.xml index 8ac1bf6920..70af2d2f19 100644 --- a/indra/newview/skins/default/xui/zh/mime_types.xml +++ b/indra/newview/skins/default/xui/zh/mime_types.xml @@ -5,7 +5,7 @@ ç¶²é 內容 </label> <tooltip name="web_tooltip"> - 這ä½ç½®æœ‰ç¶²é 內容 + 這個ä½ç½®æœ‰ç¶²é 內容 </tooltip> <playtip name="web_playtip"> 顯示網é 內容 @@ -41,7 +41,7 @@ æœ‰ä¸€å€‹éŸ³é »åœ¨æ¤ä½ç½® </tooltip> <playtip name="audio_playtip"> - æ’æ”¾é€™å€‹ç¡¾çš„éŸ³é » + æ’æ”¾é€™å€‹ä½ç½®çš„éŸ³é » </playtip> </widgetset> <scheme name="rtsp"> @@ -66,7 +66,7 @@ </mimetype> <mimetype name="video/*"> <label name="video2_label"> - è¦–é » + 影片 </label> </mimetype> <mimetype name="image/*"> @@ -111,7 +111,7 @@ </mimetype> <mimetype name="application/xhtml+xml"> <label name="application/xhtml+xml_label"> - é¸é …(XHTML) + ç¶²é (XHTML) </label> </mimetype> <mimetype name="application/x-director"> @@ -171,7 +171,7 @@ </mimetype> <mimetype name="text/html"> <label name="text/html_label"> - é¸é … + ç¶²é </label> </mimetype> <mimetype name="text/plain"> diff --git a/indra/newview/skins/default/xui/zh/mime_types_linux.xml b/indra/newview/skins/default/xui/zh/mime_types_linux.xml index 90f17b841c..70af2d2f19 100644 --- a/indra/newview/skins/default/xui/zh/mime_types_linux.xml +++ b/indra/newview/skins/default/xui/zh/mime_types_linux.xml @@ -5,7 +5,7 @@ ç¶²é 內容 </label> <tooltip name="web_tooltip"> - This location has Web content + 這個ä½ç½®æœ‰ç¶²é 內容 </tooltip> <playtip name="web_playtip"> 顯示網é 內容 @@ -27,7 +27,7 @@ åœ–åƒ </label> <tooltip name="image_tooltip"> - There is an image at this location + 有一個圖åƒåœ¨æ¤ä½ç½® </tooltip> <playtip name="image_playtip"> 察看這個ä½ç½®çš„åœ–åƒ @@ -106,12 +106,12 @@ </mimetype> <mimetype name="application/smil"> <label name="application/smil_label"> - Synchronized Multimedia Integration Language (SMIL) + åŒæ¥å¤šåª’體整åˆèªžè¨€ï¼ˆSMIL) </label> </mimetype> <mimetype name="application/xhtml+xml"> <label name="application/xhtml+xml_label"> - é¸é …(XHTML) + ç¶²é (XHTML) </label> </mimetype> <mimetype name="application/x-director"> @@ -171,7 +171,7 @@ </mimetype> <mimetype name="text/html"> <label name="text/html_label"> - é¸é … + ç¶²é </label> </mimetype> <mimetype name="text/plain"> diff --git a/indra/newview/skins/default/xui/zh/mime_types_mac.xml b/indra/newview/skins/default/xui/zh/mime_types_mac.xml index b8105c145c..70af2d2f19 100644 --- a/indra/newview/skins/default/xui/zh/mime_types_mac.xml +++ b/indra/newview/skins/default/xui/zh/mime_types_mac.xml @@ -30,7 +30,7 @@ 有一個圖åƒåœ¨æ¤ä½ç½® </tooltip> <playtip name="image_playtip"> - 察看在æ¤ä½ç½®çš„åœ–åƒ + 察看這個ä½ç½®çš„åœ–åƒ </playtip> </widgetset> <widgetset name="audio"> @@ -41,7 +41,7 @@ æœ‰ä¸€å€‹éŸ³é »åœ¨æ¤ä½ç½® </tooltip> <playtip name="audio_playtip"> - æ’æ”¾åœ¨æ¤ä½ç½®çš„éŸ³é » + æ’æ”¾é€™å€‹ä½ç½®çš„éŸ³é » </playtip> </widgetset> <scheme name="rtsp"> @@ -66,7 +66,7 @@ </mimetype> <mimetype name="video/*"> <label name="video2_label"> - è¦–é » + 影片 </label> </mimetype> <mimetype name="image/*"> @@ -76,7 +76,7 @@ </mimetype> <mimetype name="video/vnd.secondlife.qt.legacy"> <label name="vnd.secondlife.qt.legacy_label"> - è¦–é » (QuickTime) + è¦–é »ï¼ˆQuickTime) </label> </mimetype> <mimetype name="application/javascript"> @@ -86,7 +86,7 @@ </mimetype> <mimetype name="application/ogg"> <label name="application/ogg_label"> - OGG éŸ³é »/è¦–é » + Ogg éŸ³é »/è¦–é » </label> </mimetype> <mimetype name="application/pdf"> @@ -121,7 +121,7 @@ </mimetype> <mimetype name="audio/mid"> <label name="audio/mid_label"> - éŸ³é » (MIDI) + éŸ³é »ï¼ˆMIDI) </label> </mimetype> <mimetype name="audio/mpeg"> diff --git a/indra/newview/skins/default/xui/zh/notifications.xml b/indra/newview/skins/default/xui/zh/notifications.xml index 3fa8ff3f78..9fecf2c104 100644 --- a/indra/newview/skins/default/xui/zh/notifications.xml +++ b/indra/newview/skins/default/xui/zh/notifications.xml @@ -37,6 +37,12 @@ <button name="Help" text="$helptext"/> </form> </template> + <template name="okhelpignore"> + <form> + <button name="OK_okhelpignore" text="$yestext"/> + <button name="Help_okhelpignore" text="$helptext"/> + </form> + </template> <template name="yesnocancelbuttons"> <form> <button name="Yes" text="$yestext"/> @@ -45,19 +51,19 @@ </form> </template> <notification label="未知的通知訊æ¯" name="MissingAlert"> - Your version of [APP_NAME] does not know how to display the notification it just received. Please verify that you have the latest Viewer installed. + ä½ çš„ [APP_NAME] 版本無法顯示它剛剛收到的通知。 è«‹ç¢ºå®šä½ å®‰è£äº†æœ€æ–°ç‰ˆæœ¬çš„ Viewer。 -Error details: The notification called '[_NAME]' was not found in notifications.xml. +錯誤詳情:在 notifications.xml 裡找ä¸åˆ°å為「[_NAME]ã€çš„通知。 <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="FloaterNotFound"> - Floater error: Could not find the following controls: + 浮動視窗錯誤:找ä¸åˆ°ä»¥ä¸‹çš„æŽ§åˆ¶ï¼š [CONTROLS] <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="TutorialNotFound"> - No tutorial is currently available. + ç›®å‰å°šç„¡æ•™å¸å…§å®¹ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="GenericAlert"> @@ -68,67 +74,101 @@ Error details: The notification called '[_NAME]' was not found in noti <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="是"/> </notification> <notification name="BadInstallation"> - An error occurred while updating [APP_NAME]. Please [http://get.secondlife.com download the latest version] of the Viewer. + [APP_NAME] 更新時出錯。 è«‹ [http://get.secondlife.com 下載] 最新版本的 Viewer。 <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="LoginFailedNoNetwork"> - 無法連接到[SECOND_LIFE_GRID]. - '[DIAGNOSTIC]' -è«‹ç¢ºå®šä½ çš„ç¶²éš›ç¶²è·¯æ˜¯æ£å¸¸é‹ä½œçš„。 + 無法連接到 [SECOND_LIFE_GRID]。 + ([DIAGNOSTIC]) +è«‹ç¢ºå®šä½ çš„ç¶²è·¯é€£ç·šæ²’æœ‰å•題。 <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="MessageTemplateNotFound"> - Message Template [PATH] not found. + 找ä¸åˆ°è¨Šæ¯æ¨¡æ¿ [PATH]。 <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="WearableSave"> 除å˜è®Šæ›´åˆ°ç›®å‰çš„è¡£æœ/身體部ä½ï¼Ÿ <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="ä¸è¦å„²å˜" yestext="儲å˜"/> </notification> + <notification name="ConfirmNoCopyToOutbox"> + ä½ ç„¡æ¬Šå°‡è‡³å°‘ä¸€ä»¶ç‰©é …è¤‡è£½åˆ°ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚é›†çš„ç™¼ä»¶åŒ£ã€‚ ä½ å¯ä»¥ç§»å‹•é€™äº›ç‰©é …ï¼Œæˆ–ä¿ç•™ä¸å‹•。 + <usetemplate name="okcancelbuttons" notext="ä¿ç•™ä¸ç§»å‹•ç‰©é …" yestext="ç§»å‹•ç‰©é …"/> + </notification> + <notification name="OutboxFolderCreated"> + å·²ç¶“ç‚ºä½ æ‰€è½‰ç§»åˆ°å•†å®¶ç™¼ä»¶åŒ£é ‚å±¤çš„æ¯ä¸€å€‹ç‰©é …,å„自建立了一個新資料夾。 + <usetemplate ignoretext="商家發件匣裡æˆåŠŸå»ºç«‹äº†ä¸€å€‹æ–°è³‡æ–™å¤¾" name="okignore" yestext="確定"/> + </notification> + <notification name="OutboxImportComplete"> + æˆåŠŸ + +所有資料夾已æˆåŠŸé€å¾€ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚集。 + <usetemplate ignoretext="所有資料夾已é€å¾€ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚集" name="okignore" yestext="確定"/> + </notification> + <notification name="OutboxImportHadErrors"> + 一部分的資料夾無法轉移 + +將一部分資料夾é€å¾€ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚集時出錯。 這些資料夾ä»åœ¨ä½ 的商家發件匣。 + +詳情請åƒé–±[[MARKETPLACE_IMPORTS_URL]錯誤記錄]。 + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="OutboxImportFailed"> + 轉移失敗 + +未將任何資料夾é€å¾€ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚集,系統或網路出錯。 è«‹ç¨å€™å†è©¦ä¸€æ¬¡ã€‚ + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="OutboxInitFailed"> + 第二人生購物市集åˆå§‹åŒ–失敗 + +第二人生購物市集åˆå§‹åŒ–失敗,系統或網路出錯。 è«‹ç¨å€™å†è©¦ä¸€æ¬¡ã€‚ + <usetemplate name="okbutton" yestext="確定"/> + </notification> <notification name="CompileQueueSaveText"> - There was a problem uploading the text for a script due to the following reason: [REASON]. Please try again later. + ä¸Šå‚³è…³æœ¬æ–‡å—æ™‚出å•é¡Œï¼ŒåŽŸå› ï¼š[REASON]。 è«‹ç¨å€™å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="CompileQueueSaveBytecode"> - There was a problem uploading the compiled script due to the following reason: [REASON]. Please try again later. + 上傳已編è¯è…³æœ¬æ™‚出å•é¡Œï¼ŒåŽŸå› ï¼š[REASON]。 è«‹ç¨å€™å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="WriteAnimationFail"> - There was a problem writing animation data. Please try again later. + 寫入動作資料時出錯。 è«‹ç¨å€™å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="UploadAuctionSnapshotFail"> - There was a problem uploading the auction snapshot due to the following reason: [REASON] + 上傳æ‹è³£å¿«ç…§æ™‚出å•é¡Œï¼ŒåŽŸå› ï¼š[REASON] </notification> <notification name="UnableToViewContentsMoreThanOne"> - Unable to view the contents of more than one item at a time. -Please select only one object and try again. + 無法一次ç€è¦½å¤šå€‹é …目的內容。 +è«‹åªé¸æ“‡ä¸€å€‹ç‰©ä»¶ï¼Œå†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="SaveClothingBodyChanges"> 儲å˜å…¨éƒ¨æœè£æˆ–身體部ä½çš„變更? <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="ä¸è¦å„²å˜" yestext="全部儲å˜"/> </notification> <notification name="FriendsAndGroupsOnly"> - Non-friends won't know that you've choosen to ignore their calls and instant messages. + 䏿˜¯æœ‹å‹çš„äººä¸æœƒçŸ¥é“ä½ é¸æ“‡å¿½ç•¥ä»–å€‘çš„é€šè©±è¦æ±‚å’Œå³æ™‚訊æ¯ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="FavoritesOnLogin"> - Note: When you turn on this option, anyone who uses this computer can see your list of favorite locations. + 注æ„ï¼šä½ ä¸€æ—¦åŒæ„這é¸é …,任何使用這部電腦的人都å¯çœ‹åˆ°ä½ 有哪些「最愛ã€åœ°é»žã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="GrantModifyRights"> - Granting modify rights to another Resident allows them to change, delete or take ANY objects you may have in-world. Be VERY careful when handing out this permission. -Do you want to grant modify rights for [NAME]? - <usetemplate name="okcancelbuttons" notext="No" yestext="是"/> + 賦予å¦ä¸€å±…æ°‘ã€Œä¿®æ”¹ã€æ¬Šï¼Œå°‡å…許他更改ã€åˆªé™¤æˆ–æ‹¿å–ä½ åœ¨è™›æ“¬ä¸–ç•Œè£¡æ“æœ‰çš„任何物件。 è³¦äºˆé€™é …æ¬Šé™æ™‚,敬請慎é‡è€ƒæ…®ã€‚ +ä½ ä»è¦è³¦äºˆ [NAME] 修改權嗎? + <usetemplate name="okcancelbuttons" notext="å¦" yestext="是"/> </notification> <notification name="GrantModifyRightsMultiple"> - Granting modify rights to another Resident allows them to change ANY objects you may have in-world. Be VERY careful when handing out this permission. -Do you want to grant modify rights for the selected Residents? + 賦予å¦ä¸€å±…æ°‘ã€Œä¿®æ”¹ã€æ¬Šï¼Œå°‡å…è¨±ä»–æ›´æ”¹ä½ åœ¨è™›æ“¬ä¸–ç•Œè£¡æ“æœ‰çš„任何物件。 è³¦äºˆé€™é …æ¬Šé™æ™‚,敬請慎é‡è€ƒæ…®ã€‚ +ä½ ä»è¦å°‡ä¿®æ”¹æ¬Šè³¦äºˆæ‰€é¸å±…æ°‘å—Ž? <usetemplate name="okcancelbuttons" notext="å¦" yestext="是"/> </notification> <notification name="RevokeModifyRights"> - Do you want to revoke modify rights for [NAME]? + ä½ è¦æ’¤éŠ· [NAME] 的修改權嗎? <usetemplate name="okcancelbuttons" notext="å¦" yestext="是"/> </notification> <notification name="RevokeModifyRightsMultiple"> - Do you want to revoke modify rights for the selected Residents? + ä½ è¦æ’¤éŠ·æ‰€é¸å±…民的修改權嗎? <usetemplate name="okcancelbuttons" notext="å¦" yestext="是"/> </notification> <notification name="UnableToCreateGroup"> @@ -146,33 +186,33 @@ Do you want to grant modify rights for the selected Residents? <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="AddGroupOwnerWarning"> - You are about to add group members to the role of [ROLE_NAME]. -Members cannot be removed from that role. -The members must resign from the role themselves. -Are you sure you want to continue? - <usetemplate ignoretext="åœ¨æˆ‘æ·»åŠ ä¸€å€‹æ–°çš„ç¾¤çµ„æ“æœ‰è€…å‰ç¢ºèª" name="okcancelignore" notext="å¦" yestext="是"/> + ä½ å³å°‡è³¦äºˆç¾¤çµ„æˆå“¡ [ROLE_NAME] 的角色。 +æˆå“¡ä¸€æ—¦ç²å¾—æ¤è§’è‰²ï¼Œä½ å°±ä¸èƒ½è‡ªè¡Œæ’¤éŠ·ã€‚ +æˆå“¡å¿…é ˆè‡ªè¡Œé›¢è·æ‰èƒ½æ’¤éŠ·é€™è§’è‰²ã€‚ +ä½ ç¢ºå®šä½ è¦ç¹¼çºŒï¼Ÿ + <usetemplate ignoretext="åœ¨æˆ‘æ·»åŠ ä¸€å€‹æ–°çš„ç¾¤çµ„æ‰€æœ‰äººå‰å†æ¬¡ç¢ºèª" name="okcancelignore" notext="å¦" yestext="是"/> </notification> <notification name="AssignDangerousActionWarning"> - You are about to add the Ability '[ACTION_NAME]' to the Role '[ROLE_NAME]'. + ä½ å³å°‡æŠŠã€Œ[ACTION_NAME]ã€èƒ½åŠ›å¢žåŠ çµ¦ã€Œ[ROLE_NAME]ã€è§’色。 - *WARNING* - Any Member in a Role with this Ability can assign themselves -- and any other member -- to Roles that have more powers than they currently have, potentially elevating themselves to near-Owner power. Be sure you know what you're doing before assigning this Ability. + *è¦å‘Š* + 任何屬於帶有這能力的角色的æˆå“¡ï¼Œéƒ½å¯ä»¥è³¦äºˆè‡ªå·±æˆ–ä»»ä½•äººæ–°çš„è§’è‰²ï¼Œå› æ¤å¾—到比ç¾åœ¨æ›´å¤šçš„æ¬ŠåŠ›ï¼Œæœ€çµ‚å¯èƒ½æ“有近似「所有人ã€çš„æ¬ŠåŠ›ã€‚ è³¦äºˆé€™é …èƒ½åŠ›ä¹‹å‰ï¼Œæ•¬è«‹æ…Žé‡è€ƒæ…®ã€‚ -Add this Ability to '[ROLE_NAME]'? +ä½ ä»è¦æ–°å¢žé€™é …能力給「[ROLE_NAME]ã€ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å¦" yestext="是"/> </notification> <notification name="AssignDangerousAbilityWarning"> - You are about to add the Ability '[ACTION_NAME]' to the Role '[ROLE_NAME]'. + ä½ å³å°‡æŠŠã€Œ[ACTION_NAME]ã€èƒ½åŠ›å¢žåŠ çµ¦ã€Œ[ROLE_NAME]ã€è§’色。 - *WARNING* - Any Member in a Role with this Ability can assign themselves -- and any other member -- all Abilities, elevating themselves to near-Owner power. + *è¦å‘Š* + 任何屬於帶有這能力的角色的æˆå“¡ï¼Œéƒ½å¯ä»¥å°‡æ‰€æœ‰èƒ½åŠ›è³¦äºˆè‡ªå·±æˆ–ä»»ä½•äººï¼Œæå‡ç‚ºè¿‘ä¼¼ã€Œæ‰€æœ‰äººã€æ¬ŠåŠ›çš„å±¤ç´šã€‚ -Add this Ability to '[ROLE_NAME]'? +ä½ ä»è¦æ–°å¢žé€™é …能力給「[ROLE_NAME]ã€ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å¦" yestext="是"/> </notification> <notification name="AttachmentDrop"> - You are about to drop your attachment. - Are you sure you want to continue? + ä½ å³å°‡å¸é™¤ä½ 的附件。 + ä½ ç¢ºå®šä½ è¦ç¹¼çºŒï¼Ÿ <usetemplate ignoretext="在丟下附件å‰ç¢ºèª" name="okcancelignore" notext="å¦" yestext="是"/> </notification> <notification name="JoinGroupCanAfford"> @@ -181,178 +221,184 @@ Add this Ability to '[ROLE_NAME]'? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="åŠ å…¥"/> </notification> <notification name="JoinGroupNoCost"> - You are joining group [NAME]. -Do you wish to proceed? + ä½ å³å°‡åŠ å…¥ [NAME] 群組。 +ä½ ç¢ºå®šè¦ç¹¼çºŒå—Žï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="åŠ å…¥"/> </notification> <notification name="JoinGroupCannotAfford"> - Joining this group costs L$[COST]. -You do not have enough L$ to join this group. + åŠ å…¥æ¤ç¾¤çµ„é ˆèŠ±è²» L$[COST]。 +ä½ çš„ L$ ä¸å¤ åŠ å…¥é€™ç¾¤çµ„ã€‚ </notification> <notification name="CreateGroupCost"> - Creating this group will cost L$100. -Groups need more than one member, or they are deleted forever. -Please invite members within 48 hours. + 創立這個群組費用為 L$100。 +ç¾¤çµ„éœ€æœ‰è‡³å°‘å…©ä½æˆå“¡ï¼Œå¦å‰‡å°‡æ°¸ä¹…被刪除。 +請在 48 å°æ™‚內邀請æˆå“¡åŠ å…¥ã€‚ <usetemplate canceltext="å–æ¶ˆ" name="okcancelbuttons" notext="å–æ¶ˆ" yestext="花費 L$100 建立群組"/> </notification> <notification name="LandBuyPass"> - For L$[COST] you can enter this land ('[PARCEL_NAME]') for [TIME] hours. Buy a pass? + 花費 L$[COST],å¯é€²å…¥ã€Œ[PARCEL_NAME]ã€åœŸåœ°ï¼Œåœç•™ [TIME] å°æ™‚。 購買通行權? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="SalePriceRestriction"> - Sale price must be set to more than L$0 if selling to anyone. -Please select an individual to sell to if selling for L$0. + è‹¥æ˜¯å‡ºå”®çµ¦ä»»ä½•äººï¼Œå”®åƒ¹å¿…é ˆè¶…éŽ L$0。 +如果售價定為 L$0,請é¸å®šä¸€ä½å‡ºå”®å°è±¡ã€‚ </notification> <notification name="ConfirmLandSaleChange"> - The selected [LAND_SIZE] m² land is being set for sale. -Your selling price will be L$[SALE_PRICE] and will be authorized for sale to [NAME]. + 所é¸çš„ [LAND_SIZE] 平方公尺土地å³å°‡æº–備出售。 +售價將為 L$[SALE_PRICE]ï¼Œä¸¦å°‡ç¶“ä½ æŽˆæ¬Šå‡ºå”®çµ¦ [NAME]。 <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmLandSaleToAnyoneChange"> - ATTENTION: Clicking 'sell to anyone' makes your land available to the entire [SECOND_LIFE] community, even those not in this region. + 請注æ„:若點按「出售給任何人ã€ï¼Œä½ 的土地將å…許整個 [SECOND_LIFE] 社群å‰ä¾†è³¼è²·ï¼ŒåŒ…括æ¤åœ°å€å¤–的人。 -The selected [LAND_SIZE] m² land is being set for sale. -Your selling price will be L$[SALE_PRICE] and will be authorized for sale to [NAME]. +所é¸çš„ [LAND_SIZE] 平方公尺土地å³å°‡æº–備出售。 +售價將為 L$[SALE_PRICE]ï¼Œä¸¦å°‡ç¶“ä½ æŽˆæ¬Šå‡ºå”®çµ¦ [NAME]。 <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ReturnObjectsDeededToGroup"> - Are you sure you want to return all objects shared with the group '[NAME]' on this parcel of land back to their previous owner's inventory? + ä½ ç¢ºå®šè¦å°‡å’Œæœ¬åœŸåœ°åœ°æ®µçš„「[NAME]ã€ç¾¤çµ„分享的所有物件é€è¿”到原所有人的收ç´å€ï¼Ÿ -*WARNING* This will delete the non-transferable objects deeded to the group! +è¦å‘Šï¼šé€™å‹•作將會刪除原先讓渡給這群組的所有ä¸å¯è½‰è®“ç‰©ä»¶ï¼ -Objects: [N] +物件:[N] <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ReturnObjectsOwnedByUser"> - Are you sure you want to return all objects owned by the Resident '[NAME]' on this parcel of land back to their inventory? + ä½ ç¢ºå®šè¦å°‡æœ¬åœ°æ®µè£¡ã€Œ[NAME]ã€å±…æ°‘æ‰€æ“æœ‰çš„æ‰€æœ‰ç‰©ä»¶é€è¿”å…¶æ”¶ç´å€ï¼Ÿ -Objects: [N] +物件:[N] <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ReturnObjectsOwnedBySelf"> - Are you sure you want to return all objects owned by you on this parcel of land back to your inventory? + ä½ ç¢ºå®šè¦å°‡æœ¬åœ°æ®µè£¡ä½ æ‰€æ“æœ‰çš„æ‰€æœ‰ç‰©ä»¶é€è¿”ä½ çš„æ”¶ç´å€ï¼Ÿ -Objects: [N] +物件:[N] <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ReturnObjectsNotOwnedBySelf"> - Are you sure you want to return all objects NOT owned by you on this parcel of land back to their owner's inventory? -Transferable objects deeded to a group will be returned to their previous owners. + ä½ ç¢ºå®šè¦å°‡æœ¬åœ°æ®µè£¡ä¸å±¬æ–¼ä½ 的所有物件é€è¿”其所有人的收ç´å€ï¼Ÿ +å…ˆå‰è®“渡給群組的å¯è½‰è®“物件將é€è¿”給原物主。 -*WARNING* This will delete the non-transferable objects deeded to the group! +è¦å‘Šï¼šé€™å‹•作將會刪除原先讓渡給這群組的所有ä¸å¯è½‰è®“ç‰©ä»¶ï¼ -Objects: [N] +物件:[N] <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ReturnObjectsNotOwnedByUser"> - Are you sure you want to return all objects NOT owned by [NAME] on this parcel of land back to their owner's inventory? -Transferable objects deeded to a group will be returned to their previous owners. + ä½ ç¢ºå®šè¦å°‡æœ¬åœ°æ®µè£¡ä¸å±¬æ–¼ [NAME] 的所有物件é€è¿”其所有人的收ç´å€ï¼Ÿ +å…ˆå‰è®“渡給群組的å¯è½‰è®“物件將é€è¿”給原物主。 -*WARNING* This will delete the non-transferable objects deeded to the group! +è¦å‘Šï¼šé€™å‹•作將會刪除原先讓渡給這群組的所有ä¸å¯è½‰è®“ç‰©ä»¶ï¼ -Objects: [N] +物件:[N] <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ReturnAllTopObjects"> - Are you sure you want to return all listed objects back to their owner's inventory? + ä½ ç¢ºå®šè¦å°‡æ‰€åˆ—的所有物件é€è¿”其所有人的收ç´å€ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="DisableAllTopObjects"> - Are you sure you want to disable all objects in this region? + ä½ ç¢ºå®šè¦åœç”¨æœ¬åœ°å€è£¡æ‰€æœ‰ç‰©ä»¶ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ReturnObjectsNotOwnedByGroup"> - Return the objects on this parcel of land that are NOT shared with the group [NAME] back to their owners? + 將本地段裡未和 [NAME] 群組分享的物件é€è¿”給物主? -Objects: [N] +物件:[N] <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="UnableToDisableOutsideScripts"> - Can not disable scripts. -This entire region is damage enabled. -Scripts must be allowed to run for weapons to work. + 無法åœç”¨è…³æœ¬ã€‚ +這整個地å€å…許傷害。 +è…³æœ¬å¿…é ˆç²å‡†åŸ·è¡Œï¼Œæ¦å™¨æ‰æœ‰æ•ˆã€‚ </notification> <notification name="MultipleFacesSelected"> - Multiple faces are currently selected. -If you continue this action, separate instances of media will be set on multiple faces of the object. -To place the media on only one face, choose Select Face and click on the desired face of that object then click Add. - <usetemplate ignoretext="Media will be set on multiple selected faces" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> + ç›®å‰é¸æ“‡äº†å¤šå€‹è‡‰éƒ¨ã€‚ +å¦‚æžœä½ ç¹¼çºŒï¼Œç‰©ä»¶çš„å¤šå€‹è‡‰éƒ¨å°‡æœ‰å„自的媒體啟動。 +若想åªåœ¨ä¸€å€‹è‡‰éƒ¨æ”¾ç½®åª’é«”ï¼Œè«‹ã€Œé¸æ“‡è‡‰éƒ¨ã€ï¼Œé»žæŒ‰ç‰©ä»¶ä¸Šä½ 所è¦çš„è‡‰éƒ¨ï¼Œå†æŒ‰ã€Œæ–°å¢žã€ã€‚ + <usetemplate ignoretext="所é¸çš„多個臉部都將啟用å„自的媒體。" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="MustBeInParcel"> - You must be standing inside the land parcel to set its Landing Point. + ä½ å¿…é ˆç«™åœ¨åœ°æ®µä¸Šæ‰èƒ½è¨å®šå…¶ç™»é™¸é»žã€‚ </notification> <notification name="PromptRecipientEmail"> - Please enter a valid email address for the recipient(s). + 請輸入居民的有效的電郵地å€ã€‚ </notification> <notification name="PromptSelfEmail"> - Please enter your email address. + è«‹è¼¸å…¥ä½ çš„é›»éƒµåœ°å€ã€‚ </notification> <notification name="PromptMissingSubjMsg"> - Email snapshot with the default subject or message? + 用é è¨çš„電郵主旨或內文é€å‡ºå¿«ç…§ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ErrorProcessingSnapshot"> - Error processing snapshot data + 處ç†å¿«ç…§è³‡æ–™æ™‚出錯 </notification> <notification name="ErrorEncodingSnapshot"> - Error encoding snapshot. + 為快照編碼時出錯。 </notification> <notification name="ErrorUploadingPostcard"> - There was a problem sending a snapshot due to the following reason: [REASON] + 發é€å¿«ç…§æ™‚出å•é¡Œï¼ŒåŽŸå› ï¼š[REASON] </notification> <notification name="ErrorUploadingReportScreenshot"> - There was a problem uploading a report screenshot due to the following reason: [REASON] + ä¸Šå‚³èˆ‰å ±ç”¨å¿«ç…§æ™‚å‡ºå•é¡Œï¼ŒåŽŸå› ï¼š[REASON] </notification> <notification name="MustAgreeToLogIn"> - You must agree to the Terms of Service to continue logging into [SECOND_LIFE]. + ä½ å¿…é ˆåŒæ„æœå‹™æ¢æ¬¾æ‰å¯ç¹¼çºŒç™»å…¥ [SECOND_LIFE]。 </notification> <notification name="CouldNotPutOnOutfit"> - Could not put on outfit. -The outfit folder contains no clothing, body parts, or attachments. + ç„¡æ³•ç©¿ä¸Šè£æ‰®ã€‚ +è£æ‰®è³‡æ–™å¤¾è£¡æ²’有任何衣物ã€èº«é«”éƒ¨ä½æˆ–附件。 </notification> <notification name="CannotWearTrash"> - You can not wear clothes or body parts that are in the trash + ä½ ä¸èƒ½ç©¿æˆ´åžƒåœ¾æ¡¶è£¡çš„衣物或身體部ä½ã€‚ </notification> <notification name="MaxAttachmentsOnOutfit"> - Could not attach object. -Exceeds the attachments limit of [MAX_ATTACHMENTS] objects. Please detach another object first. + ç„¡æ³•é™„åŠ ç‰©ä»¶ã€‚ +è¶…éŽ [MAX_ATTACHMENTS] é …ç‰©ä»¶çš„é™„åŠ ä¸Šé™ã€‚ è«‹å…ˆå¸é™¤ä¸€å€‹ç‰©ä»¶ã€‚ </notification> <notification name="CannotWearInfoNotComplete"> - You can not wear that item because it has not yet loaded. Please try again in a minute. + 無法穿戴該物件,它尚未完æˆè¼‰å…¥ã€‚ è«‹ç¨å€™å†è©¦ã€‚ </notification> <notification name="MustHaveAccountToLogIn"> - Oops! Something was left blank. -You need to enter the Username name of your avatar. + ç³Ÿç³•ï¼ ç™¼ç¾æœ‰å…§å®¹ç•™ç™½ã€‚ +ä½ å¿…é ˆç‚ºåŒ–èº«è¼¸å…¥ä¸€å€‹ä½¿ç”¨è€…å稱。 -You need an account to enter [SECOND_LIFE]. Would you like to create one now? +進入 [SECOND_LIFE] 需è¦ä¸€å€‹å¸³è™Ÿã€‚ ä½ ç¾åœ¨è¦ä¸è¦æ–°å»ºä¸€å€‹ï¼Ÿ <url name="url"> - http://join.secondlife.com/ + [create_account_url] </url> <usetemplate name="okcancelbuttons" notext="å†è©¦ä¸€æ¬¡" yestext="å‰µé€ æ–°å¸³æˆ¶"/> </notification> <notification name="InvalidCredentialFormat"> - You need to enter either the Username or both the First and Last name of your avatar into the Username field, then login again. + ä½ å¿…é ˆåœ¨ã€Œä½¿ç”¨è€…åç¨±ã€æ¬„ä½è£¡è¼¸å…¥ä½¿ç”¨è€…å稱,或輸入化身的å和姓,然後å†ç™»å…¥ã€‚ + </notification> + <notification name="InvalidGrid"> + '[GRID]' 䏿˜¯æœ‰æ•ˆçš„ç¶²æ ¼è¾¨è˜å…ƒã€‚ + </notification> + <notification name="InvalidLocationSLURL"> + ä½ çš„é–‹å§‹ä½ç½®æ‰€æŒ‡å®šçš„ç¶²æ ¼ç„¡æ•ˆã€‚ </notification> <notification name="DeleteClassified"> - Delete classified '[NAME]'? -There is no reimbursement for fees paid. + 刪除個人廣告「[NAME]ã€ï¼Ÿ +已付費用æ•ä¸é€€å›žã€‚ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="DeleteMedia"> - You have selected to delete the media associated with this face. -Are you sure you want to continue? + ä½ é¸æ“‡åˆªé™¤ç½®æ–¼é€™è‡‰éƒ¨çš„媒體。 +ä½ ç¢ºå®šä½ è¦ç¹¼çºŒï¼Ÿ <usetemplate ignoretext="在我由一個部件ä¸åˆªé™¤åª’é«”å‰ç¢ºèª" name="okcancelignore" notext="å¦" yestext="是"/> </notification> <notification name="ClassifiedSave"> - Save changes to classified [NAME]? + 儲å˜å€‹äººå»£å‘Šã€Œ[NAME]ã€çš„變更? <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="ä¸è¦å„²å˜" yestext="儲å˜"/> </notification> <notification name="ClassifiedInsufficientFunds"> - Insufficient funds to create classified. + 金é¡ä¸è¶³ï¼Œç„¡æ³•刊登個人廣告。 <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="DeleteAvatarPick"> - Delete pick <nolink>[PICK]</nolink>? + 刪除精é¸ä½ç½®<nolink>[PICK]</nolink>? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="DeleteOutfits"> @@ -367,7 +413,7 @@ Are you sure you want to continue? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="SelectProposalToView"> - Please select a proposal to view. + è«‹é¸æ“‡ä¸€å€‹è¦å¯Ÿçœ‹çš„æè°ã€‚ </notification> <notification name="SelectHistoryItemToView"> è«‹é¸æ“‡ä¸€å€‹æ·å²ç´€éŒ„物å“去察看。 @@ -380,13 +426,13 @@ Are you sure you want to continue? 注æ„:這將會清除快å–資料。 </notification> <notification name="ChangeConnectionPort"> - Port settings take effect after you restart [APP_NAME]. + 釿–°å•Ÿå‹• [APP_NAME] å¾Œå°‡å•Ÿç”¨æ–°çš„åŸ è¨å®šã€‚ </notification> <notification name="ChangeSkin"> - The new skin will appear after you restart [APP_NAME]. + 釿–°å•Ÿå‹• [APP_NAME] å¾Œå°‡é¡¯ç¾æ–°çš„皮膚。 </notification> <notification name="ChangeLanguage"> - Changing language will take effect after you restart [APP_NAME]. + 釿–°å•Ÿå‹• [APP_NAME] å¾Œå°‡æ›æˆæ–°çš„語言。 </notification> <notification name="GoToAuctionPage"> å‰å¾€ [SECOND_LIFE] ç¶²é 去察看æ‹è³£ç´°ç¯€æˆ–下標? @@ -396,92 +442,101 @@ Are you sure you want to continue? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="SaveChanges"> - Save Changes? + 儲å˜è®Šæ›´ï¼Ÿ <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="ä¸è¦å„²å˜" yestext="儲å˜"/> </notification> <notification name="GestureSaveFailedTooManySteps"> - Gesture save failed. -This gesture has too many steps. -Try removing some steps, then save again. + 姿勢儲å˜å¤±æ•—。 +這個姿勢æ¥é©Ÿå¤ªå¤šã€‚ +請去除一些æ¥é©Ÿå†å„²å˜ã€‚ </notification> <notification name="GestureSaveFailedTryAgain"> - Gesture save failed. Please try again in a minute. + 姿勢儲å˜å¤±æ•—。 è«‹ç¨å€™å†è©¦ã€‚ </notification> <notification name="GestureSaveFailedObjectNotFound"> - Could not save gesture because the object or the associated object inventory could not be found. -The object may be out of range or may have been deleted. + 無法儲å˜å§¿å‹¢ï¼Œæ‰¾ä¸åˆ°è©²ç‰©ä»¶æˆ–所屬物件收ç´å€ã€‚ +該物件å¯èƒ½è¶…å‡ºç¯„åœæˆ–已被刪除。 </notification> <notification name="GestureSaveFailedReason"> - There was a problem saving a gesture due to the following reason: [REASON]. Please try resaving the gesture later. + 儲å˜å§¿å‹¢æ™‚出å•é¡Œï¼ŒåŽŸå› ï¼š[REASON]。 è«‹ç¨å¾Œå†å˜—試儲å˜å§¿å‹¢ã€‚ </notification> <notification name="SaveNotecardFailObjectNotFound"> - Could not save notecard because the object or the associated object inventory could not be found. -The object may be out of range or may have been deleted. + 無法儲å˜è¨˜äº‹å¡ï¼Œæ‰¾ä¸åˆ°è©²ç‰©ä»¶æˆ–所屬物件收ç´å€ã€‚ +該物件å¯èƒ½è¶…å‡ºç¯„åœæˆ–已被刪除。 </notification> <notification name="SaveNotecardFailReason"> - There was a problem saving a notecard due to the following reason: [REASON]. Please try re-saving the notecard later. + 儲å˜è¨˜äº‹å¡æ™‚出å•é¡Œï¼ŒåŽŸå› ï¼š[REASON]。 è«‹ç¨å¾Œå†å˜—試儲å˜è¨˜äº‹å¡ã€‚ </notification> <notification name="ScriptCannotUndo"> - Could not undo all changes in your version of the script. -Would you like to load the server's last saved version? -(**Warning** This operation cannot be undone.) + ç„¡æ³•å–æ¶ˆä½ 這個版本腳本的變更。 +是å¦å¾žä¼ºæœå™¨è¼‰å…¥ä¸Šæ¬¡æˆåŠŸå„²å˜çš„版本? +(*è¦å‘Š* 這動作無法還原。) <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="SaveScriptFailReason"> - There was a problem saving a script due to the following reason: [REASON]. Please try re-saving the script later. + 儲å˜è…³æœ¬æ™‚出å•é¡Œï¼ŒåŽŸå› ï¼š[REASON]。 è«‹ç¨å¾Œå†å˜—試儲å˜è…³æœ¬ã€‚ </notification> <notification name="SaveScriptFailObjectNotFound"> - Could not save the script because the object it is in could not be found. -The object may be out of range or may have been deleted. + 無法儲å˜è…³æœ¬ï¼Œæ‰¾ä¸åˆ°å®ƒæ‰€å±¬çš„物件。 +該物件å¯èƒ½è¶…å‡ºç¯„åœæˆ–已被刪除。 </notification> <notification name="SaveBytecodeFailReason"> - There was a problem saving a compiled script due to the following reason: [REASON]. Please try re-saving the script later. + 儲å˜ç·¨è¯è…³æœ¬æ™‚出å•é¡Œï¼ŒåŽŸå› ï¼š[REASON]。 è«‹ç¨å¾Œå†å˜—試儲å˜è…³æœ¬ã€‚ </notification> <notification name="StartRegionEmpty"> - Oops, Your Start Region is not defined. -Please type the Region name in Start Location box or choose My Last Location or My Home as your Start Location. + ä½ çš„èµ·å§‹åœ°å€å°šæœªå®šç¾©ã€‚ +請在「開始ä½ç½®ã€æ¡†è£¡è¼¸å…¥å€åŸŸåï¼Œæˆ–é¸æ“‡ã€Œæˆ‘上一次ä½ç½®ã€æˆ–「我的家ã€ä½œç‚ºé–‹å§‹ä½ç½®ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="CouldNotStartStopScript"> - Could not start or stop the script because the object it is on could not be found. -The object may be out of range or may have been deleted. + ç„¡æ³•å•Ÿå‹•æˆ–åœæ¢è…³æœ¬ï¼Œæ‰¾ä¸åˆ°å®ƒæ‰€å±¬çš„物件。 +該物件å¯èƒ½è¶…å‡ºç¯„åœæˆ–已被刪除。 </notification> <notification name="CannotDownloadFile"> - Unable to download file + 無法下載檔案 </notification> <notification name="CannotWriteFile"> - Unable to write file [[FILE]] + 無法寫入檔案 [[FILE]] </notification> <notification name="UnsupportedHardware"> - Just so you know, your computer does not meet [APP_NAME]'s minimum system requirements. You may experience poor performance. Unfortunately, the [SUPPORT_SITE] can't provide technical support for unsupported system configurations. + è¦å‘ŠçŸ¥ä½ ï¼Œä½ çš„é›»è…¦æœªé” [APP_NAME] 的最低系統需求。 ä½ å¯èƒ½æœƒç™¼ç¾é›»è…¦æ€§èƒ½ä¸ä½³ã€‚ å¾ˆéºæ†¾ï¼Œ[SUPPORT_SITE] 無法é‡å°ä¸æ”¯æ´çš„系統è¨ç½®æä¾›æŠ€è¡“支æ´ã€‚ -Visit [_URL] for more information? +è¦é€ 訪 [_URL] ç²å–進一æ¥è³‡è¨Šï¼Ÿ <url name="url"> http://www.secondlife.com/corporate/sysreqs.php </url> <usetemplate ignoretext="æˆ‘çš„é›»è…¦ç¡¬é«”ä¸¦ä¸æ”¯æ´" name="okcancelignore" notext="å¦" yestext="是"/> </notification> + <notification name="IntelOldDriver"> + ä½ çš„é¡¯ç¤ºå¡å¾ˆå¯èƒ½æœ‰æ–°ç‰ˆçš„驅動程å¼ã€‚ æ›´æ–°é¡¯ç¤ºé©…å‹•ç¨‹å¼æœƒå¤§å¹…改善性能。 + + å‰å¾€ [_URL] å¯Ÿçœ‹æ˜¯å¦æœ‰æ–°ç‰ˆé©…動程å¼ï¼Ÿ + <url name="url"> + http://www.intel.com/p/en_US/support/detect/graphics + </url> + <usetemplate ignoretext="我的顯示驅動程å¼å¤ªè€èˆŠ" name="okcancelignore" notext="å¦" yestext="是"/> + </notification> <notification name="UnknownGPU"> - Your system contains a graphics card that [APP_NAME] doesn't recognize. -This is often the case with new hardware that hasn't been tested yet with [APP_NAME]. It will probably be ok, but you may need to adjust your graphics settings. -(Me > Preferences > Graphics). + ä½ çš„ç³»çµ±å«æœ‰ä¸€å€‹ [APP_NAME] 無法辨èªçš„顯åƒå¡ã€‚ +åŽŸå› å¾ˆå¯èƒ½æ˜¯ [APP_NAME] 尚未é‡å°æ–°ç¡¬é«”å®Œæˆæ¸¬è©¦ã€‚ é€™å¤§æ¦‚ä¸æœƒå‡ºå•é¡Œï¼Œä½†ä½ å¯èƒ½éœ€è¦èª¿æ•´é¡¯åƒè¨å®šã€‚ +(我自己 > å好è¨å®š > 顯åƒï¼‰ <form name="form"> <ignore name="ignore" text="我的顯示å¡ç„¡æ³•辨è˜"/> </form> </notification> <notification name="DisplaySettingsNoShaders"> - [APP_NAME] crashed while initializing graphics drivers. -Graphics Quality will be set to Low to avoid some common driver errors. This will disable some graphics features. -We recommend updating your graphics card drivers. -Graphics Quality can be raised in Preferences > Graphics. + [APP_NAME] åˆå§‹åŒ–顯åƒé©…å‹•ç¨‹å¼æ™‚當掉了。 +顯åƒåº¦å°‡è¨ç‚ºä½ŽéšŽï¼Œä»¥é˜²ç™¼ç”Ÿå¸¸è¦‹çš„é©…å‹•ç¨‹å¼æˆ–錯誤。 這將åœç”¨ä¸€äº›é¡¯åƒåŠŸèƒ½ã€‚ +我們建è°ä½ 更新顯åƒé©…動程å¼ã€‚ +請到「å好è¨å®š > 顯åƒã€æé«˜é¡¯åƒåº¦ã€‚ </notification> <notification name="RegionNoTerraforming"> 這個 [REGION] 地å€ä¸¦ä¸å…許變更地形。 </notification> <notification name="CannotCopyWarning"> - You do not have permission to copy the following items: + ä½ æ²’æœ‰æ¬Šé™è¤‡è£½ä»¥ä¸‹é …目: [ITEMS] -and will lose it from your inventory if you give it away. Do you really want to offer these items? +å¦‚æžœä½ å°‡å®ƒé€äººï¼Œå®ƒå°‡ç„¡æ³•續留在收ç´å€ã€‚ ä½ ç¢ºå®šè¦é€å‡ºé€™äº›æ±è¥¿å—Žï¼Ÿ <usetemplate name="okcancelbuttons" notext="å¦" yestext="是"/> </notification> <notification name="CannotGiveItem"> @@ -491,18 +546,18 @@ and will lose it from your inventory if you give it away. Do you really want to äº¤æ˜“å·²å–æ¶ˆã€‚ </notification> <notification name="TooManyItems"> - Cannot give more than 42 items in a single inventory transfer. + æ¯ä¸€æ¬¡çš„æ”¶ç´å€è½‰ç§»å‹•作ä¸èƒ½è¶…éŽ 42 é …ç‰©ä»¶ã€‚ </notification> <notification name="NoItems"> - You do not have permission to transfer the selected items. + ä½ æ²’æœ‰æ¬Šé™è½‰ç§»æ‰€é¸é …目。 </notification> <notification name="CannotCopyCountItems"> - You do not have permission to copy [COUNT] of the selected items. You will lose these items from your inventory. -Do you really want to give these items? + ä½ æ²’æœ‰æ¬Šé™è¤‡è£½æ‰€é¸ç‰©ä»¶ç•¶ä¸çš„ [COUNT] é …ã€‚ ä½ çš„æ”¶ç´å€å°‡ç„¡æ³•續留這些物件。 +ä½ ç¢ºå®šè¦é€å‡ºé€™äº›æ±è¥¿å—Žï¼Ÿ <usetemplate name="okcancelbuttons" notext="å¦" yestext="是"/> </notification> <notification name="CannotGiveCategory"> - You do not have permission to transfer the selected folder. + ä½ æ²’æœ‰æ¬Šé™è½‰ç§»æ‰€é¸è³‡æ–™å¤¾ã€‚ </notification> <notification name="FreezeAvatar"> å‡çµé€™ä½åŒ–身? @@ -533,75 +588,78 @@ Do you really want to give these items? å–得錯誤:太多物件被é¸å–。 </notification> <notification name="AcquireErrorObjectSpan"> - ACQUIRE ERROR: Objects span more than one region. -Please move all objects to be acquired onto the same region. + å–得錯誤:物件跨越多個地å€ã€‚ +請將所欲å–得的物件移到åŒä¸€å€åŸŸã€‚ </notification> <notification name="PromptGoToCurrencyPage"> [EXTRA] -Go to [_URL] for information on purchasing L$? +å‰å¾€ [_URL] 得知如何購買 L$? <url name="url"> http://secondlife.com/app/currency/ </url> <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="UnableToLinkObjects"> - Unable to link these [COUNT] objects. -You can link a maximum of [MAX] objects. + 無法è¯çµé€™ [COUNT] 個物件。 +ä½ æœ€å¤šå¯ä»¥è¯çµ [MAX] 個物件。 </notification> <notification name="CannotLinkIncompleteSet"> - You can only link complete sets of objects, and must select more than one object. + å¯ä»¥è¯çµçš„å¿…éœ€æ˜¯ä¸€å¥—ç‰©ä»¶ï¼Œè«‹é¸æ“‡è‡³å°‘兩個物件。 </notification> <notification name="CannotLinkModify"> - Unable to link because you don't have modify permission on all the objects. + 無法è¯çµï¼›ä½ å°æŸäº›ç‰©ä»¶æ²’有修改權。 -Please make sure none are locked, and that you own all of them. +請確定沒有物件被鎖ä½ï¼Œä¸¦ç¢ºå®šä½ æ“æœ‰æ‰€æœ‰ç‰©ä»¶ã€‚ + </notification> + <notification name="CannotLinkPermanent"> + 物件無法跨越地å€ç•Œé™é€²è¡Œè¯çµã€‚ </notification> <notification name="CannotLinkDifferentOwners"> - Unable to link because not all of the objects have the same owner. + 無法è¯çµï¼›æœ‰äº›ç‰©ä»¶çš„æ‰€æœ‰äººä¸åŒã€‚ -Please make sure you own all of the selected objects. +è«‹ç¢ºå®šä½ æ˜¯æ‰€é¸æ‰€æœ‰ç‰©ä»¶çš„æ‰€æœ‰äººã€‚ </notification> <notification name="NoFileExtension"> - No file extension for the file: '[FILE]' + 檔案沒有副檔å:'[FILE]' -Please make sure the file has a correct file extension. +請確定檔案具備æ£ç¢ºçš„副檔å。 </notification> <notification name="InvalidFileExtension"> - Invalid file extension [EXTENSION] -Expected [VALIDS] + 無效的副檔å:[EXTENSION] +應該是 [VALIDS] <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="CannotUploadSoundFile"> - Couldn't open uploaded sound file for reading: + 無法開啟並讀å–上傳的è²éŸ³æª”: [FILE] </notification> <notification name="SoundFileNotRIFF"> - File does not appear to be a RIFF WAVE file: + æª”æ¡ˆä¼¼ä¹Žä¸æ˜¯ RIFF WAVE 檔: [FILE] </notification> <notification name="SoundFileNotPCM"> - File does not appear to be a PCM WAVE audio file: + æª”æ¡ˆä¼¼ä¹Žä¸æ˜¯ PCM WAVE éŸ³é »æª”ï¼š [FILE] </notification> <notification name="SoundFileInvalidChannelCount"> - File has invalid number of channels (must be mono or stereo): + æª”æ¡ˆçš„é »é“æ•¸ç„¡æ•ˆï¼ˆå¿…需為單è²é“或立體è²ï¼‰ [FILE] </notification> <notification name="SoundFileInvalidSampleRate"> - File does not appear to be a supported sample rate (must be 44.1k): + æª”æ¡ˆä¼¼ä¹Žå¸¶æœ‰ä¸æ”¯æ´çš„æŽ¡æ¨£çŽ‡ï¼ˆéœ€ç‚º 44.1 k): [FILE] </notification> <notification name="SoundFileInvalidWordSize"> - File does not appear to be a supported word size (must be 8 or 16 bit): + æª”æ¡ˆä¼¼ä¹Žå¸¶æœ‰ä¸æ”¯æ´çš„å—組(需為 8 或 16 ä½å…ƒï¼‰ï¼š [FILE] </notification> <notification name="SoundFileInvalidHeader"> - Could not find 'data' chunk in WAV header: + 找ä¸åˆ° WAV 檔é 的「dataã€å€å¡Šï¼š [FILE] </notification> <notification name="SoundFileInvalidChunkSize"> - Wrong chunk size in WAV file: + WAV 檔å€å¡Šå¤§å°éŒ¯èª¤ï¼š [FILE] </notification> <notification name="SoundFileInvalidTooLong"> @@ -609,41 +667,41 @@ Expected [VALIDS] [FILE] </notification> <notification name="ProblemWithFile"> - Problem with file [FILE]: + 檔案 [FILE] 有å•題: [ERROR] </notification> <notification name="CannotOpenTemporarySoundFile"> - Couldn't open temporary compressed sound file for writing: [FILE] + ç„¡æ³•é–‹å•Ÿä¸¦å¯«å…¥æš«æ™‚å£“ç¸®éŸ³é »æª”ï¼š[FILE] </notification> <notification name="UnknownVorbisEncodeFailure"> - Unknown Vorbis encode failure on: [FILE] + ç™¼ç”Ÿä¸æ˜Žçš„ Vorbis 編碼錯誤:[FILE] </notification> <notification name="CannotEncodeFile"> - Unable to encode file: [FILE] + 無法將檔案編碼:[FILE] </notification> <notification name="CorruptedProtectedDataStore"> - We can't fill in your username and password. This may happen when you change network setup + æˆ‘å€‘ç„¡æ³•å¡«å…¥ä½ çš„ä½¿ç”¨è€…å稱和密碼。 這å¯èƒ½å› ç‚ºä½ è®Šæ›´äº†ç¶²è·¯è¨å®šã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="CorruptResourceFile"> - Corrupt resource file: [FILE] + 毀æçš„è³‡æºæª”:[FILE] </notification> <notification name="UnknownResourceFileVersion"> - Unknown Linden resource file version in file: [FILE] + 檔案ä¸ç™¼ç¾ä¸æ˜Žçš„ Linden è³‡æºæª”版本:[FILE] </notification> <notification name="UnableToCreateOutputFile"> - Unable to create output file: [FILE] + 無法建立輸出檔:[FILE] </notification> <notification name="DoNotSupportBulkAnimationUpload"> - [APP_NAME] does not currently support bulk upload of animation files. + [APP_NAME] ç›®å‰å°šä¸æ”¯æ´ BVH æ ¼å¼çš„動作檔批é‡ä¸Šå‚³ã€‚ </notification> <notification name="CannotUploadReason"> - Unable to upload [FILE] due to the following reason: [REASON] -Please try again later. + 無法上傳 [FILE]ï¼ŒåŽŸå› ï¼š[REASON] +è«‹ç¨å€™å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="LandmarkCreated"> - ä½ å·²ç¶“æ·»åŠ "[LANDMARK_NAME]" åˆ°ä½ çš„ [FOLDER_NAME] 資料夾。 + ä½ å·²æ–°å¢žã€Œ[LANDMARK_NAME]ã€åˆ°ä½ çš„ [FOLDER_NAME] 資料夾。 </notification> <notification name="LandmarkAlreadyExists"> ä½ å·²ç¶“æœ‰é€™å€‹ä½ç½®çš„地標。 @@ -653,132 +711,132 @@ Please try again later. ä½ ä¸èƒ½å‰µé€ åœ°æ¨™ï¼Œå› ç‚ºåœ°ä¸»ä¸¦ä¸å…è¨±ä½ é€™æ¨£åšã€‚ </notification> <notification name="CannotRecompileSelectObjectsNoScripts"> - Not able to perform 'recompilation'. -Select an object with a script. + ç„¡æ³•é€²è¡Œé‡æ–°ç·¨è¯ã€‚ +è«‹é¸æ“‡å¸¶æœ‰è…³æœ¬çš„物件。 </notification> <notification name="CannotRecompileSelectObjectsNoPermission"> - Not able to perform 'recompilation'. + ç„¡æ³•é€²è¡Œé‡æ–°ç·¨è¯ã€‚ -Select objects with scripts that you have permission to modify. +鏿“‡å¸¶æœ‰ä½ å¯ä¿®æ”¹çš„腳本的物件。 </notification> <notification name="CannotResetSelectObjectsNoScripts"> - Not able to perform 'reset'. + ç„¡æ³•é‡æ–°å•Ÿå‹•。 -Select objects with scripts. +鏿“‡å¸¶æœ‰è…³æœ¬çš„物件。 </notification> <notification name="CannotResetSelectObjectsNoPermission"> - Not able to perform 'reset'. + ç„¡æ³•é‡æ–°å•Ÿå‹•。 -Select objects with scripts that you have permission to modify. +鏿“‡å¸¶æœ‰ä½ å¯ä¿®æ”¹çš„腳本的物件。 </notification> <notification name="CannotOpenScriptObjectNoMod"> - Unable to open script in object without modify permissions. + ç„¡æ³•é–‹å•Ÿç‰©ä»¶è£¡çš„è…³æœ¬ï¼Œå› ç‚ºä½ æ²’æœ‰ä¿®æ”¹æ¬Šã€‚ </notification> <notification name="CannotSetRunningSelectObjectsNoScripts"> - Not able to set any scripts to 'running'. + 無法將任何腳本è¨å®šç‚ºã€ŒåŸ·è¡Œä¸ã€ã€‚ -Select objects with scripts. +鏿“‡å¸¶æœ‰è…³æœ¬çš„物件。 </notification> <notification name="CannotSetRunningNotSelectObjectsNoScripts"> - Unable to set any scripts to 'not running'. + 無法將任何腳本è¨å®šç‚ºã€Œä¸åŸ·è¡Œã€ã€‚ -Select objects with scripts. +鏿“‡å¸¶æœ‰è…³æœ¬çš„物件。 </notification> <notification name="NoFrontmostFloater"> - No frontmost floater to save. + 沒有最å‰ç½®çš„æµ®å‹•視窗å¯å„²å˜ã€‚ </notification> <notification name="SeachFilteredOnShortWords"> - Your search query was modified and the words that were too short were removed. + ä½ çš„æœå°‹å—串已被修改,太çŸçš„å—已被移除。 -Searched for: [FINALQUERY] +æœå°‹ï¼š[FINALQUERY] </notification> <notification name="SeachFilteredOnShortWordsEmpty"> - Your search terms were too short so no search was performed. + ä½ çš„æœå°‹å—串太çŸï¼Œæ‰€ä»¥æ²’有啟動æœç´¢ã€‚ </notification> <notification name="CouldNotTeleportReason"> 瞬間傳é€å¤±æ•—。 [REASON] </notification> <notification name="invalid_tport"> - Problem encountered processing your teleport request. You may need to log back in before you can teleport. -If you continue to get this message, please check the [SUPPORT_SITE]. + 處ç†ä½ 瞬間傳é€è¦æ±‚時發生å•題。 如果想è¦çž¬é–“傳é€ï¼Œä½ å¯èƒ½éœ€è¦é‡æ–°ç™»å…¥ã€‚ +å¦‚æžœä½ æŒçºŒå¾—到æ¤è¨Šæ¯ï¼Œè«‹æŸ¥é–± [SUPPORT_SITE]。 </notification> <notification name="invalid_region_handoff"> - Problem encountered processing your region crossing. You may need to log back in before you can cross regions. -If you continue to get this message, please check the [SUPPORT_SITE]. + 處ç†ä½ 跨越地å€å‹•作時發生å•題。 如果想è¦è·¨è¶Šåœ°å€ï¼Œä½ å¯èƒ½éœ€è¦é‡æ–°ç™»å…¥ã€‚ +å¦‚æžœä½ æŒçºŒå¾—到æ¤è¨Šæ¯ï¼Œè«‹æŸ¥é–± [SUPPORT_SITE]。 </notification> <notification name="blocked_tport"> - Sorry, teleport is currently blocked. Try again in a moment. If you still cannot teleport, please log out and log back in to resolve the problem. + 抱æ‰ï¼Œç›®å‰ç¦æ¢çž¬é–“傳é€ã€‚ è«‹ç¨å¾Œå†è©¦ã€‚ å¦‚æžœä½ ä»ç„¡æ³•進行瞬間傳é€ï¼Œè«‹ç™»å‡ºå¾Œé‡æ–°å…¥ä¾†è§£æ±ºæ¤ä¸€å•題。 </notification> <notification name="nolandmark_tport"> - Sorry, but system was unable to locate landmark destination. + 抱æ‰ï¼Œä¸éŽç³»çµ±ç„¡æ³•找到地標所在目的地。 </notification> <notification name="timeout_tport"> - Sorry, but system was unable to complete the teleport connection. Try again in a moment. + 抱æ‰ï¼Œä¸éŽç³»çµ±ç„¡æ³•完æˆçž¬é–“傳é€çš„è¯æŽ¥ã€‚ è«‹ç¨å¾Œå†è©¦ã€‚ </notification> <notification name="noaccess_tport"> - Sorry, you do not have access to that teleport destination. + 抱æ‰ï¼Œä½ 並沒有權é™é€²å…¥è¦çž¬é–“傳é€çš„目的地。 </notification> <notification name="missing_attach_tport"> - Your attachments have not arrived yet. Try waiting for a few more seconds or log out and back in again before attempting to teleport. + ä½ çš„é™„ä»¶å°šæœªæŠµé”。 è«‹ç¨å€™ä¸€æœƒå…’ï¼Œæˆ–è«‹ç™»å‡ºå¾Œé‡æ–°ç™»å…¥ï¼Œå†å˜—試瞬間傳é€ã€‚ </notification> <notification name="too_many_uploads_tport"> - The asset queue in this region is currently clogged so your teleport request will not be able to succeed in a timely manner. Please try again in a few minutes or go to a less busy area. + 該地å€çš„資產查詢目å‰å¤ªéŽæ“å¡žï¼Œå› æ¤ä½ 的瞬間傳é€å‹•作å¯èƒ½ç„¡æ³•峿™‚發生。 è«‹ç¨å€™å†è©¦ï¼Œæˆ–è«‹å‰å¾€è¼ƒä¸æ“塞的地å€ã€‚ </notification> <notification name="expired_tport"> - Sorry, but the system was unable to complete your teleport request in a timely fashion. Please try again in a few minutes. + 抱æ‰ï¼Œç³»çµ±ç„¡æ³•峿™‚完æˆç‚ºä½ 瞬間傳é€ã€‚ è«‹ç¨å¾…幾分é˜å†è©¦ã€‚ </notification> <notification name="expired_region_handoff"> - Sorry, but the system was unable to complete your region crossing in a timely fashion. Please try again in a few minutes. + 抱æ‰ï¼Œç³»çµ±ç„¡æ³•峿™‚è®“ä½ è·¨è¶Šåœ°å€ã€‚ è«‹ç¨å¾…幾分é˜å†è©¦ã€‚ </notification> <notification name="no_host"> - Unable to find teleport destination. The destination may be temporarily unavailable or no longer exists. Please try again in a few minutes. + 找ä¸åˆ°çž¬é–“傳é€çš„目的地。 目的地å¯èƒ½æš«æ™‚ä¸å¯ç”¨ï¼Œæˆ–å·²ä¸å˜åœ¨ã€‚ è«‹ç¨å¾…幾分é˜å†è©¦ã€‚ </notification> <notification name="no_inventory_host"> æ”¶ç´å€åŠŸèƒ½ç›®å‰ç„¡æ³•使用。 </notification> <notification name="CannotSetLandOwnerNothingSelected"> - 無法è¨å®šåœŸåœ°æ“有者: -無地段被é¸å–。 + 無法è¨å®šåœŸåœ°æ‰€æœ‰äººï¼š +æœªé¸æ“‡åœ°æ®µã€‚ </notification> <notification name="CannotSetLandOwnerMultipleRegions"> - Unable to force land ownership because selection spans multiple regions. Please select a smaller area and try again. + 無法強è¨åœŸåœ°æ‰€æœ‰æ¬Šï¼›æ‰€é¸éƒ¨åˆ†è·¨è¶Šå¤šå€‹å€åŸŸã€‚ 請縮å°é¸æ“‡ç¯„åœï¼Œå†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="ForceOwnerAuctionWarning"> - This parcel is up for auction. Forcing ownership will cancel the auction and potentially make some Residents unhappy if bidding has begun. -Force ownership? + 這地段æ£åœ¨æ‹è³£ä¸ã€‚ å¼·è¨æ‰€æœ‰æ¬Šå°‡å–消æ‹è³£ï¼Œé€™æå°‡é€ æˆæŸäº›å·²å‡ºåƒ¹çš„å±…æ°‘ä¸é«˜èˆˆã€‚ +è¦å¼·è¨æ‰€æœ‰æ¬Šå—Žï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="CannotContentifyNothingSelected"> - Unable to contentify: -No parcel selected. + 無法進行「內容化ã€ï¼š +æœªé¸æ“‡åœ°æ®µã€‚ </notification> <notification name="CannotContentifyNoRegion"> - Unable to contentify: -No region selected. + 無法進行「內容化ã€ï¼š +æœªé¸æ“‡å€åŸŸã€‚ </notification> <notification name="CannotReleaseLandNothingSelected"> 無法放棄土地: -ç„¡åœ°æ®µè¢«é¸æ“‡ã€‚ +æœªé¸æ“‡åœ°æ®µã€‚ </notification> <notification name="CannotReleaseLandNoRegion"> 無法放棄土地: -無法尋找地å€ã€‚ +找ä¸åˆ°åœ°å€ã€‚ </notification> <notification name="CannotBuyLandNothingSelected"> 無法購買土地: -ç„¡åœ°æ®µè¢«é¸æ“‡ã€‚ +æœªé¸æ“‡åœ°æ®µã€‚ </notification> <notification name="CannotBuyLandNoRegion"> - Unable to buy land: -Cannot find the region this land is in. + 無法購買土地: +找ä¸åˆ°é€™åœŸåœ°æ‰€åœ¨çš„地å€ã€‚ </notification> <notification name="CannotCloseFloaterBuyLand"> - You cannot close the Buy Land window until [APP_NAME] estimates the price of this transaction. + å¿…é ˆç‰å¾… [APP_NAME] 估計æ¤äº¤æ˜“çš„åƒ¹æ ¼å¾Œï¼Œä½ æ‰èƒ½é—œé–‰ã€Œè³¼è²·åœŸåœ°ã€è¦–窗。 </notification> <notification name="CannotDeedLandNothingSelected"> 無法讓渡土地: -無地段被é¸å–。 +æœªé¸æ“‡åœ°æ®µã€‚ </notification> <notification name="CannotDeedLandNoGroup"> 無法讓渡土地: @@ -786,7 +844,7 @@ Cannot find the region this land is in. </notification> <notification name="CannotDeedLandNoRegion"> 無法讓渡土地: -無法發ç¾é€™å¡ŠåœŸåœ°æ‰€åœ¨çš„地å€ã€‚ +找ä¸åˆ°é€™åœŸåœ°æ‰€åœ¨çš„地å€ã€‚ </notification> <notification name="CannotDeedLandMultipleSelected"> 無法讓渡土地: @@ -802,7 +860,7 @@ Cannot find the region this land is in. </notification> <notification name="CannotDeedLandNoTransfer"> 無法讓渡土地: -æ¤ [REGION] 地å€ä¸¦ä¸å…許土地轉移。 +「[REGION]ã€åœ°å€ä¸å…許土地轉移。 </notification> <notification name="CannotReleaseLandWatingForServer"> 無法放棄土地: @@ -823,11 +881,11 @@ Cannot find the region this land is in. </notification> <notification name="CannotReleaseLandRegionNotFound"> 無法放棄土地: -無法發ç¾é€™å¿«åœŸåœ°æ‰€åœ¨çš„地å€ã€‚ +找ä¸åˆ°é€™åœŸåœ°æ‰€åœ¨çš„地å€ã€‚ </notification> <notification name="CannotReleaseLandNoTransfer"> 無法放棄土地: -æ¤ [REGION] 地å€ä¸¦ä¸è¨±åœŸåœ°è½‰ç§»ã€‚ +「[REGION]ã€åœ°å€ä¸å…許土地轉移。 </notification> <notification name="CannotReleaseLandPartialSelection"> 無法放棄土地: @@ -845,7 +903,7 @@ Cannot find the region this land is in. <notification name="CannotDivideLandNothingSelected"> 無法分割土地: -無地段被é¸å–。 +æœªé¸æ“‡åœ°æ®µã€‚ </notification> <notification name="CannotDivideLandPartialSelection"> 無法分割土地: @@ -854,22 +912,22 @@ Cannot find the region this land is in. 請試著é¸å–å…¶ä¸éƒ¨åˆ†åœ°æ®µã€‚ </notification> <notification name="LandDivideWarning"> - 分割土地會將佌地段一分為二,æ¯ä¸€å€‹åœ°æ®µå°‡éƒ½å„自有其è¨å®šã€‚ 在這個æ“作之後,一些è¨å®šå€¼å°‡æœƒå›žå¾©åˆ°é è¨å€¼ã€‚ + 分割土地將把地段分為兩份,æ¯å€‹æ–°åœ°æ®µæœ‰å„自的è¨å®šã€‚ 完æˆå¾Œï¼Œéƒ¨åˆ†è¨å®šå°‡é‡è¨ç‚ºé è¨å€¼ã€‚ 進行分割土地? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="CannotDivideLandNoRegion"> 無法分割土地: -無法發ç¾é€™å¡ŠåœŸåœ°æ‰€åœ¨çš„地å€ã€‚ +找ä¸åˆ°é€™åœŸåœ°æ‰€åœ¨çš„地å€ã€‚ </notification> <notification name="CannotJoinLandNoRegion"> 無法åˆä½µåœŸåœ°ï¼š -無法發ç¾é€™å¡ŠåœŸåœ°æ‰€åœ¨çš„地å€ã€‚ +找ä¸åˆ°é€™åœŸåœ°æ‰€åœ¨çš„地å€ã€‚ </notification> <notification name="CannotJoinLandNothingSelected"> 無法åˆä½µåœŸåœ°ï¼š -無地段被é¸å–。 +æœªé¸æ“‡åœ°æ®µã€‚ </notification> <notification name="CannotJoinLandEntireParcelSelected"> 無法åˆä½µåœŸåœ°ï¼š @@ -891,42 +949,42 @@ Cannot find the region this land is in. <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmNotecardSave"> - 在物å“能被覆製或察看å‰ï¼Œé€™è¨˜äº‹å¡å¿…é ˆå…ˆé€²è¡Œå„²å˜ã€‚儲å˜è¨˜äº‹å¡ï¼Ÿ + 覆製或察看å‰ï¼Œé€™è¨˜äº‹å¡å¿…é ˆå…ˆé€²è¡Œå„²å˜ã€‚ 儲å˜è¨˜äº‹å¡ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmItemCopy"> 覆製這個物å“åˆ°ä½ çš„æ”¶ç´å€ï¼Ÿ - <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="覆製"/> + <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="æšåº¨"/> </notification> <notification name="ResolutionSwitchFail"> - Failed to switch resolution to [RESX] by [RESY] + 無法將解æžåº¦èª¿ç‚º [RESX] X [RESY] </notification> <notification name="ErrorUndefinedGrasses"> - Error: Undefined grasses: [SPECIES] + 錯誤:未定義的è‰ç¨®ï¼š[SPECIES] </notification> <notification name="ErrorUndefinedTrees"> - Error: Undefined trees: [SPECIES] + 錯誤:未定義的樹種:[SPECIES] </notification> <notification name="CannotSaveWearableOutOfSpace"> - Unable to save '[NAME]' to wearable file. You will need to free up some space on your computer and save the wearable again. + 無法將「[NAME]ã€å„²å˜ç‚ºå¯ç©¿è£æ‰®æª”案。 ä½ éœ€è¦ç©ºå‡ºä¸€äº›é›»è…¦ç©ºé–“,å†è©¦è‘—儲å˜å¯ç©¿è£æ‰®ã€‚ </notification> <notification name="CannotSaveToAssetStore"> - Unable to save [NAME] to central asset store. -This is usually a temporary failure. Please customize and save the wearable again in a few minutes. + 無法將「[NAME]ã€å„²å˜åˆ°ä¸å¤®è³‡ç”¢å„²åº«ã€‚ +這異常狀æ³é€šå¸¸åªæ˜¯æš«æ™‚的。 è«‹ç¨å¾…幾分é˜å¾Œï¼Œå†è‡ªè¨‚並儲å˜å¯ç©¿è£æ‰®ã€‚ </notification> <notification name="YouHaveBeenLoggedOut"> - Darn. You have been logged out of [SECOND_LIFE] + ç³Ÿç³•ï¼ ä½ å·²è¢«ç™»å‡º [SECOND_LIFE] [MESSAGE] - <usetemplate name="okcancelbuttons" notext="çµæŸé€€å‡º" yestext="View IM & Chat"/> + <usetemplate name="okcancelbuttons" notext="çµæŸé€€å‡º" yestext="察看 IM å’ŒèŠå¤©å…§å®¹"/> </notification> <notification name="OnlyOfficerCanBuyLand"> - Unable to buy land for the group: -You do not have permission to buy land for your active group. + 無法為這群組購買土地: +ä½ æ²’æœ‰æ¬Šé™ç‚ºä½ ç•¶å‰çš„群組購買土地。 </notification> <notification label="åŠ ç‚ºæœ‹å‹" name="AddFriendWithMessage"> - Friends can give permissions to track each other on the map and receive online status updates. + 朋å‹å¯ä»¥å…許彼æ¤åœ¨åœ°åœ–ä¸Šè¿½è¹¤å°æ–¹ï¼Œä¸¦æŽ¥æ”¶å½¼æ¤çš„線上狀態更新訊æ¯ã€‚ -Offer friendship to [NAME]? +å‘ [NAME] 發出交å‹é‚€è«‹ï¼Ÿ <form name="form"> <input name="message"> ä½ é¡˜æ„æˆç‚ºæˆ‘的朋å‹å—Žï¼Ÿ @@ -935,21 +993,55 @@ Offer friendship to [NAME]? <button name="Cancel" text="å–æ¶ˆ"/> </form> </notification> + <notification label="新增自動å–代清單" name="AddAutoReplaceList"> + 新清單å稱: + <form name="form"> + <button name="SetName" text="確定"/> + </form> + </notification> + <notification label="更改自動å–代清單的å稱" name="RenameAutoReplaceList"> + 「[DUPNAME]ã€å稱已有人使用。 + 輸入å¦ä¸€å€‹ç¨ç‰¹çš„å稱: + <form name="form"> + <button name="ReplaceList" text="å–代目å‰çš„æ¸…å–®"/> + <button name="SetName" text="使用新å稱"/> + </form> + </notification> + <notification name="InvalidAutoReplaceEntry"> + é—œéµå—å¿…é ˆæ˜¯ä¸€å€‹å—,å–代å—ä¸å¾—空白。 + </notification> + <notification name="InvalidAutoReplaceList"> + 該å–代清單無效。 + </notification> + <notification name="SpellingDictImportRequired"> + ä½ å¿…é ˆæŒ‡å®šä¸€å€‹æª”æ¡ˆã€ä¸€å€‹å稱和一種語言。 + </notification> + <notification name="SpellingDictIsSecondary"> + [DIC_NAME] å—典似乎沒有 "aff" 檔案,這表示該å—典是「次級ã€å—典。 +它å¯ç”¨åšé™„åŠ å—典,但ä¸å¾—作為主è¦å—典。 + +åƒè¦‹ https://wiki.secondlife.com/wiki/Adding_Spelling_Dictionaries + </notification> + <notification name="SpellingDictImportFailed"> + 無法複製 [FROM_NAME] + + 到 [TO_NAME] + </notification> <notification label="儲å˜è£æ‰®" name="SaveOutfitAs"> å„²å˜æˆ‘æ£åœ¨ç©¿çš„ç‚ºæ–°è£æ‰®ï¼š <form name="form"> <input name="message"> - [DESC] (新) + [DESC](新) </input> <button name="OK" text="確定"/> <button name="Cancel" text="å–æ¶ˆ"/> </form> </notification> - <notification label="Save Wearable" name="SaveWearableAs"> + <notification label="儲å˜å¯ç©¿è£æ‰®" name="SaveWearableAs"> 儲å˜ç‰©å“到我的收ç´å€ç‚ºï¼š <form name="form"> <input name="message"> - [DESC] (新) + [DESC](新) </input> <button name="OK" text="確定"/> <button name="Cancel" text="å–æ¶ˆ"/> @@ -966,7 +1058,7 @@ Offer friendship to [NAME]? </form> </notification> <notification name="RemoveFromFriends"> - Do you want to remove <nolink>[NAME]</nolink> from your Friends List? + 確定è¦å¾žæœ‹å‹åå–®ä¸ç§»é™¤ <nolink>[NAME]</nolink>? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="RemoveMultipleFromFriends"> @@ -974,148 +1066,147 @@ Offer friendship to [NAME]? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="GodDeleteAllScriptedPublicObjectsByUser"> - Are you sure you want to delete all scripted objects owned by -** [AVATAR_NAME] ** -on all others land in this sim? + ä½ ç¢ºå®šè¦åˆªé™¤æœ¬æ¨¡æ“¬ä¸–界所有其他土地裡,** [AVATAR_NAME] ** æ‰€æ“æœ‰çš„全部帶腳本的物件? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="GodDeleteAllScriptedObjectsByUser"> - Are you sure you want to DELETE ALL scripted objects owned by -** [AVATAR_NAME] ** -on ALL LAND in this sim? + ä½ ç¢ºå®šè¦åˆªé™¤æœ¬æ¨¡æ“¬ä¸–界所有土地裡,** [AVATAR_NAME] ** æ‰€æ“æœ‰çš„全部帶腳本的物件? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="GodDeleteAllObjectsByUser"> - Are you sure you want to DELETE ALL objects (scripted or not) owned by -** [AVATAR_NAME] ** -on ALL LAND in this sim? + ä½ ç¢ºå®šè¦åˆªé™¤æœ¬æ¨¡æ“¬ä¸–界所有土地裡,** [AVATAR_NAME] ** æ‰€æ“æœ‰çš„全部物件(無論是å¦å¸¶è…³æœ¬ï¼‰ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="BlankClassifiedName"> - You must specify a name for your classified. + ä½ çš„å€‹äººå»£å‘Šå¿…é ˆæŒ‡å®šä¸€å€‹å稱。 </notification> <notification name="MinClassifiedPrice"> - Price to pay for listing must be at least L$[MIN_PRICE]. + 購買æ¤åˆŠç™»ç‰©çš„åƒ¹æ ¼å¿…é ˆè‡³å°‘ç‚º L$[MIN_PRICE]。 -Please enter a higher price. +è«‹è¼¸å…¥ä¸€å€‹è¼ƒé«˜çš„åƒ¹æ ¼ã€‚ </notification> <notification name="ConfirmItemDeleteHasLinks"> - 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="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmObjectDeleteLock"> - At least one of the items you have selected is locked. + ä½ æ‰€é¸é …ç›®ä¸è‡³å°‘有一個被鎖ä½ã€‚ -Are you sure you want to delete these items? +ä½ ç¢ºå®šä½ è¦åˆªé™¤é€™äº›ç‰©é …? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmObjectDeleteNoCopy"> - At least one of the items you have selected is not copyable. + ä½ æ‰€é¸é …ç›®ä¸è‡³å°‘有一個ä¸èƒ½è¤‡è£½ã€‚ -Are you sure you want to delete these items? +ä½ ç¢ºå®šä½ è¦åˆªé™¤é€™äº›ç‰©é …? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmObjectDeleteNoOwn"> - You do not own least one of the items you have selected. + ä½ æ‰€é¸é …ç›®ä¸è‡³å°‘æœ‰ä¸€å€‹ä¸æ˜¯ä½ æ‰€æ“æœ‰ã€‚ -Are you sure you want to delete these items? +ä½ ç¢ºå®šä½ è¦åˆªé™¤é€™äº›ç‰©é …? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmObjectDeleteLockNoCopy"> - At least one object is locked. -At least one object is not copyable. + 至少有一個物件被鎖ä½ã€‚ +至少有一個物件ä¸èƒ½è¤‡è£½ã€‚ -Are you sure you want to delete these items? +ä½ ç¢ºå®šä½ è¦åˆªé™¤é€™äº›ç‰©é …? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmObjectDeleteLockNoOwn"> - At least one object is locked. -You do not own least one object. + 至少有一個物件被鎖ä½ã€‚ +è‡³å°‘æœ‰ä¸€å€‹ç‰©ä»¶ä¸æ˜¯ä½ æ‰€æ“æœ‰ã€‚ -Are you sure you want to delete these items? +ä½ ç¢ºå®šä½ è¦åˆªé™¤é€™äº›ç‰©é …? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmObjectDeleteNoCopyNoOwn"> - At least one object is not copyable. -You do not own least one object. + 至少有一個物件ä¸èƒ½è¤‡è£½ã€‚ +è‡³å°‘æœ‰ä¸€å€‹ç‰©ä»¶ä¸æ˜¯ä½ æ‰€æ“æœ‰ã€‚ -Are you sure you want to delete these items? +ä½ ç¢ºå®šä½ è¦åˆªé™¤é€™äº›ç‰©é …? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmObjectDeleteLockNoCopyNoOwn"> - At least one object is locked. -At least one object is not copyable. -You do not own least one object. + 至少有一個物件被鎖ä½ã€‚ +至少有一個物件ä¸èƒ½è¤‡è£½ã€‚ +è‡³å°‘æœ‰ä¸€å€‹ç‰©ä»¶ä¸æ˜¯ä½ æ‰€æ“æœ‰ã€‚ -Are you sure you want to delete these items? +ä½ ç¢ºå®šä½ è¦åˆªé™¤é€™äº›ç‰©é …? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmObjectTakeLock"> - At least one object is locked. + 至少有一個物件被鎖ä½ã€‚ -Are you sure you want to take these items? +ä½ ç¢ºå®šä½ è¦æ‹¿å–é€™äº›ç‰©é …ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmObjectTakeNoOwn"> - You do not own all of the objects you are taking. -If you continue, next owner permissions will be applied and possibly restrict your ability to modify or copy them. + ä½ è¦æ‹¿å–的物件ä¸ï¼Œæœ‰äº›ä¸æ˜¯ä½ æ‰€æ“æœ‰ã€‚ +å¦‚æžœç¹¼çºŒï¼Œå°‡å¥—ç”¨ã€Œä¸‹ä¸€å€‹æ‰€æœ‰äººã€æ¬Šé™ï¼Œé€™å¯èƒ½æœƒé™åˆ¶ä½ 修改或複製權。 -Are you sure you want to take these items? +ä½ ç¢ºå®šä½ è¦æ‹¿å–é€™äº›ç‰©é …ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmObjectTakeLockNoOwn"> - At least one object is locked. -You do not own all of the objects you are taking. -If you continue, next owner permissions will be applied and possibly restrict your ability to modify or copy them. -However, you can take the current selection. + 至少有一個物件被鎖ä½ã€‚ +ä½ è¦æ‹¿å–的物件ä¸ï¼Œæœ‰äº›ä¸æ˜¯ä½ æ‰€æ“æœ‰ã€‚ +å¦‚æžœç¹¼çºŒï¼Œå°‡å¥—ç”¨ã€Œä¸‹ä¸€å€‹æ‰€æœ‰äººã€æ¬Šé™ï¼Œé€™å¯èƒ½æœƒé™åˆ¶ä½ 修改或複製權。 +ä¸éŽï¼Œä½ å¯ä»¥æ‹¿å–ç›®å‰æ‰€é¸çš„。 -Are you sure you want to take these items? +ä½ ç¢ºå®šä½ è¦æ‹¿å–é€™äº›ç‰©é …ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="CantBuyLandAcrossMultipleRegions"> - Unable to buy land because selection spans multiple regions. + 無法購買土地,所é¸éƒ¨åˆ†è·¨è¶Šå¤šå€‹åœ°å€ã€‚ -Please select a smaller area and try again. +請縮å°é¸æ“‡ç¯„åœï¼Œå†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="DeedLandToGroup"> - By deeding this parcel, the group will be required to have and maintain sufficient land use credits. -The purchase price of the land is not refunded to the owner. If a deeded parcel is sold, the sale price will be divided evenly among group members. + 若讓渡æ¤åœ°æ®µï¼Œé€™å€‹ç¾¤çµ„å°‡å¿…é ˆå…·å‚™ä¸¦ä¿æŒè¶³å¤ 的土地使用信用é¡åº¦ã€‚ +åœŸåœ°æ”¶è³¼åƒ¹å°‡ä¸æœƒé€€é‚„給所有人。 如果讓渡的地段被售出,售出價將å‡åˆ†çµ¦æ¯ä½ç¾¤çµ„æˆå“¡ã€‚ -Deed this [AREA] m² of land to the group '[GROUP_NAME]'? +是å¦è®“渡這塊 [AREA] 平方公尺的土地給群組「[GROUP_NAME]ã€ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="DeedLandToGroupWithContribution"> - By deeding this parcel, the group will be required to have and maintain sufficient land use credits. -The deed will include a simultaneous land contribution to the group from '[NAME]'. -The purchase price of the land is not refunded to the owner. If a deeded parcel is sold, the sale price will be divided evenly among group members. + 若讓渡æ¤åœ°æ®µï¼Œé€™å€‹ç¾¤çµ„å°‡å¿…é ˆå…·å‚™ä¸¦ä¿æŒè¶³å¤ 的土地使用信用é¡åº¦ã€‚ +æ¤ä¸€è®“æ¸¡å°‡åŒæ™‚包括來自 [NAME] 的,給予群組的土地æç»ã€‚ +åœŸåœ°æ”¶è³¼åƒ¹å°‡ä¸æœƒé€€é‚„給所有人。 如果讓渡的地段被售出,售出價將å‡åˆ†çµ¦æ¯ä½ç¾¤çµ„æˆå“¡ã€‚ -Deed this [AREA] m² of land to the group '[GROUP_NAME]'? +是å¦è®“渡這塊 [AREA] 平方公尺的土地給群組「[GROUP_NAME]ã€ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="DisplaySetToSafe"> - Display settings have been set to safe levels because you have specified the -safe option. + å› ç‚ºä½ æŒ‡å®šäº† -safe é¸é …,已將顯示è¨ç‚ºå®‰å…¨ç‰ç´šã€‚ + </notification> + <notification name="DisplaySetToRecommendedGPUChange"> + ç”±æ–¼ä½ çš„é¡¯åƒå¡æœ‰æ‰€è®Šæ›´ï¼Œå·²å°‡é¡¯ç¤ºç‹€æ…‹è¨ç‚ºæŽ¨è–¦æŽ¡ç”¨çš„ç‰ç´šã€‚ +原顯åƒå¡ï¼š[LAST_GPU] +新顯åƒå¡ï¼š[THIS_GPU] </notification> - <notification name="DisplaySetToRecommended"> - Display settings have been set to recommended levels based on your system configuration. + <notification name="DisplaySetToRecommendedFeatureChange"> + 由於呈åƒå系統有所變更,已將顯示狀態è¨ç‚ºæŽ¨è–¦çš„è¨å®šã€‚ </notification> <notification name="ErrorMessage"> [ERROR_MESSAGE] <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="AvatarMovedDesired"> - Your desired location is not currently available. -You have been moved into a nearby region. + ä½ æ‰€è¦çš„地點目å‰ç„¡æ³•å‰å¾€ã€‚ +ä½ å·²è¢«ç§»å¾€ä¸€å€‹é„°è¿‘åœ°å€ã€‚ </notification> <notification name="AvatarMovedLast"> - Your last location is not currently available. -You have been moved into a nearby region. + ä½ æ‰€è«‹æ±‚çš„åœ°é»žç›®å‰ç„¡æ³•å‰å¾€ã€‚ +ä½ å·²è¢«ç§»å¾€ä¸€å€‹é„°è¿‘åœ°å€ã€‚ </notification> <notification name="AvatarMovedHome"> - Your home location is not currently available. -You have been moved into a nearby region. -You may want to set a new home location. + ä½ è¨ç‚ºå®¶çš„地點目å‰ç„¡æ³•å‰å¾€ã€‚ +ä½ å·²è¢«ç§»å¾€ä¸€å€‹é„°è¿‘åœ°å€ã€‚ +建è°ä½ å¦é¸æ–°åœ°é»žè¨ç‚ºå®¶ã€‚ </notification> <notification name="ClothingLoading"> ä½ çš„æœè£ä»åœ¨ä¸‹è¼‰ä¸ã€‚ @@ -1127,14 +1218,13 @@ You may want to set a new home location. <notification name="FirstRun"> [APP_NAME] 安è£å®Œæˆã€‚ -If this is your first time using [SECOND_LIFE], you will need to create an account before you can log in. -Return to [http://join.secondlife.com secondlife.com] to create a new account? - <usetemplate name="okcancelbuttons" notext="繼續" yestext="新帳戶..."/> +å¦‚æžœä½ æ˜¯ç¬¬ä¸€æ¬¡ä½¿ç”¨ [SECOND_LIFE]ï¼Œä½ å°‡éœ€è¦å»ºç«‹æ–°å¸³è™Ÿæ‰å¯ç™»å…¥ã€‚ + <usetemplate name="okcancelbuttons" notext="繼續" yestext="建立帳號…"/> </notification> <notification name="LoginPacketNeverReceived"> - We're having trouble connecting. There may be a problem with your Internet connection or the [SECOND_LIFE_GRID]. + 連線出ç¾å•題。 å•題å¯èƒ½å‡ºåœ¨ä½ 的網路連線或 [SECOND_LIFE_GRID]。 -You can either check your Internet connection and try again in a few minutes, click Help to view the [SUPPORT_SITE], or click Teleport to attempt to teleport home. +è«‹æª¢æŸ¥ä½ çš„ç¶²è·¯é€£ç·šï¼Œå¹¾åˆ†é˜å¾Œå†è©¦ä¸€æ¬¡ï¼Œæˆ–者點按幫助ç€è¦½ [SUPPORT_SITE],或點按瞬間傳é€è©¦è‘—å›žåˆ°ä½ çš„å®¶ã€‚ <url name="url"> http://secondlife.com/support/ </url> @@ -1145,70 +1235,70 @@ You can either check your Internet connection and try again in a few minutes, cl </form> </notification> <notification name="WelcomeChooseSex"> - Your character will appear in a moment. + ä½ çš„äººç‰©å¾ˆå¿«å°‡æœƒå‡ºç¾ã€‚ -Use arrow keys to walk. -Press the F1 key at any time for help or to learn more about [SECOND_LIFE]. -Please choose the male or female avatar. You can change your mind later. +用方å‘éµè¡Œèµ°ã€‚ +ä»»ä½•æ™‚å€™ä½ éƒ½å¯æŒ‰ F1 éµå¯Ÿçœ‹å¹«åŠ©ï¼Œé€²ä¸€æ¥çžè§£ [SECOND_LIFE]。 +è«‹é¸æ“‡ç”·æ€§æˆ–女性化身。 ä»¥å¾Œä½ ä»å¯æ”¹è®Šé€™å€‹é¸æ“‡ã€‚ <usetemplate name="okcancelbuttons" notext="女性" yestext="男性"/> </notification> <notification name="CantTeleportToGrid"> - 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. + 無法瞬間傳é€åˆ° [SLURL]ï¼Œå®ƒä½æ–¼ä¸åŒçš„ç¶²æ ¼ï¼ˆ[GRID]),目å‰ç¶²æ ¼æ˜¯ [CURRENT_GRID]。 請關閉 Viewer å†è©¦ä¸€æ¬¡ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="GeneralCertificateError"> 無法連接到伺æœå™¨ã€‚ [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] +SubjectName:[SUBJECT_NAME_STRING] +IssuerName:[ISSUER_NAME_STRING] +有效來æºï¼š[VALID_FROM] +有效目標:[VALID_TO] +MD5 指紋:[SHA1_DIGEST] +SHA1 指紋:[MD5_DIGEST] +éµçš„使用:[KEYUSAGE] +延伸éµçš„使用:[EXTENDEDKEYUSAGE] +主題éµè¾¨è˜å…ƒï¼š[SUBJECTKEYIDENTIFIER] <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="TrustCertificateError"> - 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="å–æ¶ˆ" yestext="Trust"/> + 䏿˜Žçš„伺æœå™¨èªè‰æ¬Šé™ã€‚ + +èªè‰è³‡è¨Šï¼š +SubjectName:[SUBJECT_NAME_STRING] +IssuerName:[ISSUER_NAME_STRING] +有效來æºï¼š[VALID_FROM] +有效目標:[VALID_TO] +MD5 指紋:[SHA1_DIGEST] +SHA1 指紋:[MD5_DIGEST] +éµçš„使用:[KEYUSAGE] +延伸éµçš„使用:[EXTENDEDKEYUSAGE] +主題éµè¾¨è˜å…ƒï¼š[SUBJECTKEYIDENTIFIER] + +是å¦ä¿¡ä»»é€™å€‹æ¬Šé™ï¼Ÿ + <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="ä¿¡ä»»"/> </notification> <notification name="NotEnoughCurrency"> - [NAME] L$ [PRICE] You don't have enough L$ to do that. + [NAME] L$ [PRICE] ä½ æ²’æœ‰è¶³å¤ L$ 進行這動作。 </notification> <notification name="GrantedModifyRights"> - [NAME] has given you permission to edit their objects. + [NAME] å·²æŽˆæ¬Šä½ ç·¨è¼¯ä»–å€‘çš„ç‰©ä»¶ã€‚ </notification> <notification name="RevokedModifyRights"> - Your privilege to modify [NAME]'s objects has been revoked + ä½ ä¿®æ”¹ [NAME] 的物件的權é™å·²è¢«æ’¤éŠ·ã€‚ </notification> <notification name="FlushMapVisibilityCaches"> - This will flush the map caches on this region. -This is really only useful for debugging. -(In production, wait 5 minutes, then everyone's map will update after they relog.) + 這將清除本地å€çš„地圖快å–資料。 +這麼åšåªåœ¨é™¤éŒ¯æ™‚有用。 +(實地環境ä¸ï¼Œç‰å¾… 5 分é˜ï¼Œæ¯å€‹äººçš„åœ°åœ–å°‡åœ¨ä»–å€‘é‡æ–°ç™»å…¥å¾Œæ›´æ–°ã€‚) <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="BuyOneObjectOnly"> - Unable to buy more than one object at a time. Please select only one object and try again. + 無法一次購買多個物件。 è«‹åªé¸æ“‡ä¸€å€‹ç‰©ä»¶ï¼Œå†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="OnlyCopyContentsOfSingleItem"> - Unable to copy the contents of more than one item at a time. -Please select only one object and try again. + ç„¡æ³•ä¸€æ¬¡è¤‡è£½å¤šå€‹ç‰©é …çš„å…§å®¹ã€‚ +è«‹åªé¸æ“‡ä¸€å€‹ç‰©ä»¶ï¼Œå†è©¦ä¸€æ¬¡ã€‚ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="KickUsersFromRegion"> @@ -1216,66 +1306,66 @@ Please select only one object and try again. <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="EstateObjectReturn"> - Are you sure you want to return objects owned by [USER_NAME]? + ä½ ç¢ºå®šè¦é€è¿” [USER_NAME] æ‰€æ“æœ‰çš„物件? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="InvalidTerrainBitDepth"> - Couldn't set region textures: -Terrain texture [TEXTURE_NUM] has an invalid bit depth of [TEXTURE_BIT_DEPTH]. + 無法è¨å®šåœ°å€æè³ªï¼š +地形æè³ª [TEXTURE_NUM] çš„ä½å…ƒæ·±åº¦ [TEXTURE_BIT_DEPTH] 無效。 -Replace texture [TEXTURE_NUM] with a 24-bit 512x512 or smaller image then click "Apply" again. +è«‹å°‡æè³ª [TEXTURE_NUM] æ›¿æ›æˆ 24 ä½å…ƒ 512x512 或更å°åœ–åƒï¼Œç„¶å¾Œé»žæŒ‰ã€Œå¥—用ã€ã€‚ </notification> <notification name="InvalidTerrainSize"> - Couldn't set region textures: -Terrain texture [TEXTURE_NUM] is too large at [TEXTURE_SIZE_X]x[TEXTURE_SIZE_Y]. + 無法è¨å®šåœ°å€æè³ªï¼š +地形æè³ª [TEXTURE_NUM] 的尺寸 [TEXTURE_SIZE_X]x[TEXTURE_SIZE_Y] 太大。 -Replace texture [TEXTURE_NUM] with a 24-bit 512x512 or smaller image then click "Apply" again. +è«‹å°‡æè³ª [TEXTURE_NUM] æ›¿æ›æˆ 24 ä½å…ƒ 512x512 或更å°åœ–åƒï¼Œç„¶å¾Œé»žæŒ‰ã€Œå¥—用ã€ã€‚ </notification> <notification name="RawUploadStarted"> - 上傳開始。將會花費約兩分é˜ï¼Œé€™å–æ±ºæ–¼ä½ çš„é€£ç·šé€Ÿåº¦ã€‚ + 上傳開始。 è¦–ä½ çš„é€£ç·šé€Ÿåº¦è€Œå®šï¼Œé€™æœ€å¤šéœ€æ™‚å…©åˆ†é˜ã€‚ </notification> <notification name="ConfirmBakeTerrain"> - Do you really want to bake the current terrain, make it the center for terrain raise/lower limits and the default for the 'Revert' tool? + ä½ çœŸçš„è¦ç¢ºå®šç”¢å‡ºç›®å‰åœ°å½¢ï¼Œä½¿å…¶æˆç‚ºåœ°å½¢å‡/陿¥µé™çš„ä¸é–“值,並è¨ç‚ºã€Œå¾©åŽŸã€å·¥å…·çš„é è¨å€¼ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="MaxAllowedAgentOnRegion"> - You can only have [MAX_AGENTS] Allowed Residents. + ä½ æœ€å¤šåªèƒ½æœ‰ [MAX_AGENTS] ä½å…許居民。 </notification> <notification name="MaxBannedAgentsOnRegion"> ä½ åªå¯ä»¥æœ‰æœ€å¤š [MAX_BANNED] ä½è¢«å°éŽ–çš„å±…æ°‘ã€‚ </notification> <notification name="MaxAgentOnRegionBatch"> - Failure while attempting to add [NUM_ADDED] agents: -Exceeds the [MAX_AGENTS] [LIST_TYPE] limit by [NUM_EXCESS]. + è©¦åœ–å¢žåŠ [NUM_ADDED] 人時失敗: +è¶…éŽäººæ•¸ä¸Šé™ [MAX_AGENTS] [LIST_TYPE]ï¼ˆè¶…éŽ [NUM_EXCESS] 人)。 </notification> <notification name="MaxAllowedGroupsOnRegion"> - You can only have [MAX_GROUPS] Allowed Groups. - <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="Bake"/> + ä½ åªèƒ½æœ‰ [MAX_GROUPS] 個å…許的群組。 + <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定產出"/> </notification> <notification name="MaxManagersOnRegion"> ä½ åªå¯ä»¥æœ‰æœ€å¤š [MAX_MANAGER] ä½é ˜åœ°ç¶“ç†ã€‚ </notification> <notification name="OwnerCanNotBeDenied"> - ç„¡æ³•æ·»åŠ é ˜åœ°æ“æœ‰è€…åˆ°é ˜åœ°çš„ '被å°éŽ–çš„å±…æ°‘' åå–®ä¸ã€‚ + ç„¡æ³•æ·»åŠ é ˜åœ°æ‰€æœ‰äººåˆ°é ˜åœ°çš„ '被å°éŽ–çš„å±…æ°‘' åå–®ä¸ã€‚ </notification> <notification name="CanNotChangeAppearanceUntilLoaded"> 無法變更外觀,直到æœè£èˆ‡é«”形下載完畢。 </notification> <notification name="ClassifiedMustBeAlphanumeric"> - The name of your classified must start with a letter from A to Z or a number. No punctuation is allowed. + ä½ çš„å€‹äººå»£å‘Šåç¨±å¿…é ˆä»¥ A-Z å—æ¯æˆ–數å—é–‹é 。 ä¸å…許標點符號。 </notification> <notification name="CantSetBuyObject"> - Can't set Buy Object, because the object is not for sale. -Please set the object for sale and try again. + 無法è¨å®šè³¼è²·ç‰©ä»¶ï¼Œè©²ç‰©ä»¶ç„¡æ³•出售。 +è«‹é¸å®šå‡ºå”®ç‰©ä»¶ï¼Œå†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="FinishedRawDownload"> - Finished download of raw terrain file to: -[DOWNLOAD_PATH]. + 原始地形檔案下載完æˆï¼š +[DOWNLOAD_PATH]。 </notification> <notification name="DownloadWindowsMandatory"> - 一個新版本的 [APP_NAME] 已經å¯ç”¨ã€‚ + 有個新版本的 [APP_NAME] å¯ä¾›ä½¿ç”¨ã€‚ [MESSAGE] -ä½ å¿…é ˆä¸‹è¼‰é€™å€‹æ›´æ–°ä»¥ä½¿ç”¨ [APP_NAME]。 +ä½ å¿…é ˆä¸‹è¼‰é€™å€‹æ›´æ–°æ‰å¯ä½¿ç”¨ [APP_NAME]。 <usetemplate name="okcancelbuttons" notext="çµæŸé€€å‡º" yestext="下載"/> </notification> <notification name="DownloadWindows"> @@ -1285,89 +1375,86 @@ Please set the object for sale and try again. <usetemplate name="okcancelbuttons" notext="繼續" yestext="下載"/> </notification> <notification name="DownloadWindowsReleaseForDownload"> - An updated version of [APP_NAME] is available. + 一個 [APP_NAME] æ›´æ–°éŽçš„版本已經å¯ç”¨ã€‚ [MESSAGE] -This update is not required, but we suggest you install it to improve performance and stability. +這個更新並éžå¼·åˆ¶æ›´æ–°ï¼Œä½†æˆ‘們建è°ä½ 安è£ä»¥å¢žå¼·æ•ˆèƒ½åŠç©©å®šæ€§ã€‚ <usetemplate name="okcancelbuttons" notext="繼續" yestext="下載"/> </notification> <notification name="DownloadLinuxMandatory"> - A new version of [APP_NAME] is available. + 有個新版本的 [APP_NAME] å¯ä¾›ä½¿ç”¨ã€‚ [MESSAGE] -You must download this update to use [APP_NAME]. +ä½ å¿…é ˆä¸‹è¼‰é€™å€‹æ›´æ–°æ‰å¯ä½¿ç”¨ [APP_NAME]。 <usetemplate name="okcancelbuttons" notext="çµæŸé€€å‡º" yestext="下載"/> </notification> <notification name="DownloadLinux"> - An updated version of [APP_NAME] is available. + 一個 [APP_NAME] æ›´æ–°éŽçš„版本已經å¯ç”¨ã€‚ [MESSAGE] -This update is not required, but we suggest you install it to improve performance and stability. +這個更新並éžå¼·åˆ¶æ›´æ–°ï¼Œä½†æˆ‘們建è°ä½ 安è£ä»¥å¢žå¼·æ•ˆèƒ½åŠç©©å®šæ€§ã€‚ <usetemplate name="okcancelbuttons" notext="繼續" yestext="下載"/> </notification> <notification name="DownloadLinuxReleaseForDownload"> - An updated version of [APP_NAME] is available. + 一個 [APP_NAME] æ›´æ–°éŽçš„版本已經å¯ç”¨ã€‚ [MESSAGE] -This update is not required, but we suggest you install it to improve performance and stability. +這個更新並éžå¼·åˆ¶æ›´æ–°ï¼Œä½†æˆ‘們建è°ä½ 安è£ä»¥å¢žå¼·æ•ˆèƒ½åŠç©©å®šæ€§ã€‚ <usetemplate name="okcancelbuttons" notext="繼續" yestext="下載"/> </notification> <notification name="DownloadMacMandatory"> - A new version of [APP_NAME] is available. + 有個新版本的 [APP_NAME] å¯ä¾›ä½¿ç”¨ã€‚ [MESSAGE] -You must download this update to use [APP_NAME]. +ä½ å¿…é ˆä¸‹è¼‰é€™å€‹æ›´æ–°æ‰å¯ä½¿ç”¨ [APP_NAME]。 -Download to your Applications folder? +下載到 Applications 資料夾? <usetemplate name="okcancelbuttons" notext="çµæŸé€€å‡º" yestext="下載"/> </notification> <notification name="DownloadMac"> - An updated version of [APP_NAME] is available. + 一個 [APP_NAME] æ›´æ–°éŽçš„版本已經å¯ç”¨ã€‚ [MESSAGE] -This update is not required, but we suggest you install it to improve performance and stability. +這個更新並éžå¼·åˆ¶æ›´æ–°ï¼Œä½†æˆ‘們建è°ä½ 安è£ä»¥å¢žå¼·æ•ˆèƒ½åŠç©©å®šæ€§ã€‚ -Download to your Applications folder? +下載到 Applications 資料夾? <usetemplate name="okcancelbuttons" notext="繼續" yestext="下載"/> </notification> <notification name="DownloadMacReleaseForDownload"> - An updated version of [APP_NAME] is available. + 一個 [APP_NAME] æ›´æ–°éŽçš„版本已經å¯ç”¨ã€‚ [MESSAGE] -This update is not required, but we suggest you install it to improve performance and stability. +這個更新並éžå¼·åˆ¶æ›´æ–°ï¼Œä½†æˆ‘們建è°ä½ 安è£ä»¥å¢žå¼·æ•ˆèƒ½åŠç©©å®šæ€§ã€‚ -Download to your Applications folder? +下載到 Applications 資料夾? <usetemplate name="okcancelbuttons" notext="繼續" yestext="下載"/> </notification> <notification name="FailedUpdateInstall"> - An error occurred installing the viewer update. -Please download and install the latest viewer from -http://secondlife.com/download. + å®‰è£æ›´æ–°ç‰ˆ Viewer 時出錯。 +請到 http://secondlife.com/download ä¸‹è¼‰ä¸¦å®‰è£æœ€æ–°ç‰ˆ Viewer。 <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="FailedRequiredUpdateInstall"> - We were unable to install a required update. -You will be unable to log in until [APP_NAME] has been updated. + 無法安è£å¿…è¦çš„æ›´æ–°ã€‚ +é™¤éž [APP_NAME] æ›´æ–°ï¼Œä½ å°‡ç„¡æ³•ç™»å…¥ã€‚ -Please download and install the latest viewer from -http://secondlife.com/download. +請到 http://secondlife.com/download ä¸‹è¼‰ä¸¦å®‰è£æœ€æ–°ç‰ˆ Viewer。 <usetemplate name="okbutton" yestext="çµæŸé€€å‡º"/> </notification> <notification name="UpdaterServiceNotRunning"> - There is a required update for your Second Life Installation. + ä½ å·²å®‰è£çš„ç¬¬äºŒäººç”Ÿè»Ÿé«”ç¾æœ‰ä¸€å€‹å¿…è¦çš„æ›´æ–°ã€‚ -You may download this update from http://www.secondlife.com/downloads -or you can install it now. +ä½ å¯ä»¥åˆ° http://www.secondlife.com/downloads ä¸‹è¼‰æ¤æ›´æ–°ï¼Œæˆ–者ç¾åœ¨ç«‹å³å®‰è£ã€‚ <usetemplate name="okcancelbuttons" notext="çµæŸé€€å‡ºç¬¬äºŒäººç”Ÿ" yestext="ç«‹å³ä¸‹è¼‰åŠå®‰è£"/> </notification> <notification name="DownloadBackgroundTip"> - We have downloaded an update to your [APP_NAME] installation. -Version [VERSION] [[RELEASE_NOTES_FULL_URL] Information about this update] + æˆ‘å€‘å·²ç‚ºä½ çš„ [APP_NAME] 軟體下載了更新。 +[VERSION] 版本 [[RELEASE_NOTES_FULL_URL] é—œæ–¼æ¤æ›´æ–°çš„資訊] <usetemplate name="okcancelbuttons" notext="ç¨å€™..." yestext="ç«‹å³å®‰è£åŠé‡æ–°å•Ÿå‹• [APP_NAME]"/> </notification> <notification name="DownloadBackgroundDialog"> - We have downloaded an update to your [APP_NAME] installation. -Version [VERSION] [[RELEASE_NOTES_FULL_URL] Information about this update] - <usetemplate name="okcancelbuttons" notext="梢候..." yestext="ç«‹å³å®‰è£åŠé‡æ–°å•Ÿå‹• [APP_NAME]"/> + æˆ‘å€‘å·²ç‚ºä½ çš„ [APP_NAME] 軟體下載了更新。 +[VERSION] 版本 [[RELEASE_NOTES_FULL_URL] é—œæ–¼æ¤æ›´æ–°çš„資訊] + <usetemplate name="okcancelbuttons" notext="ç¨å€™..." yestext="ç«‹å³å®‰è£åŠé‡æ–°å•Ÿå‹• [APP_NAME]"/> </notification> <notification name="RequiredUpdateDownloadedVerboseDialog"> - We have downloaded a required software update. -Version [VERSION] + 我們已下載了一個必è¦çš„軟體更新。 +版本:[VERSION] -We must restart [APP_NAME] to install the update. +æˆ‘é–€å¿…é ˆé‡æ–°å•Ÿå‹• [APP_NAME] ä»¥å®‰è£æ›´æ–°ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="RequiredUpdateDownloadedDialog"> @@ -1375,8 +1462,8 @@ We must restart [APP_NAME] to install the update. <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="DeedObjectToGroup"> - Deeding this object will cause the group to: -* Receive L$ paid into the object + 讓渡æ¤ç‰©ä»¶å°‡å¯è®“這個群組: +* æ”¶å–付給æ¤ç‰©ä»¶çš„ L$ <usetemplate ignoretext="在我讓渡一個物件給群組å‰ç¢ºèª" name="okcancelignore" notext="å–æ¶ˆ" yestext="讓渡"/> </notification> <notification name="WebLaunchExternalTarget"> @@ -1388,7 +1475,7 @@ We must restart [APP_NAME] to install the update. <usetemplate ignoretext="啟動我的ç€è¦½å™¨ä»¥ç®¡ç†æˆ‘的帳戶" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="WebLaunchSecurityIssues"> - Visit the [SECOND_LIFE] Wiki for details of how to report a security issue. + é€ è¨ª [SECOND_LIFE] ç¶åŸºå¯Ÿçœ‹å¦‚何æå ±å®‰å…¨å•題。 <usetemplate ignoretext="開啟我的網é ç€è¦½å™¨ä»¥å¸ç¿’å¦‚ä½•å›žå ±ä¸€å€‹å®‰å…¨æ€§çš„è°é¡Œ" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="WebLaunchQAWiki"> @@ -1412,10 +1499,10 @@ We must restart [APP_NAME] to install the update. <usetemplate ignoretext="開啟我的網é ç€è¦½å™¨ä»¥å¯Ÿçœ‹ LSL å…¥å£" name="okcancelignore" notext="å–æ¶ˆ" yestext="å‰å¾€é é¢"/> </notification> <notification name="ReturnToOwner"> - ä½ ç¢ºå®šè¦é€€å›žæ‰€é¸æ“‡çš„ç‰©ä»¶çµ¦å®ƒå€‘çš„æ“æœ‰è€…嗎? å¯è½‰ç§»ä¸¦è®“渡的物件將會退回給它們的å‰ä¸€ä½æ“有者。 + ä½ ç¢ºå®šè¦é€è¿”所é¸ç‰©ä»¶çµ¦ç‰©ä¸»ï¼Ÿ å¯è½‰è®“的已讓渡物件將é€è¿”原物主。 *è¦å‘Š* éžå¯è½‰ç§»ä¸¦è®“渡的物件將會被刪除! - <usetemplate ignoretext="åœ¨æˆ‘é€€å›žç‰©ä»¶çµ¦å®ƒå€‘çš„æ“æœ‰è€…å‰ç¢ºèª" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> + <usetemplate ignoretext="在我退回物件給它們的所有人å‰ç¢ºèª" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="GroupLeaveConfirmMember"> ä½ ç›®å‰æ˜¯ <nolink>[GROUP]</nolink> 群組的æˆå“¡ã€‚ @@ -1427,57 +1514,57 @@ We must restart [APP_NAME] to install the update. <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="踢出全部居民"/> </notification> <notification name="MuteLinden"> - Sorry, you cannot block a Linden. + 抱æ‰ï¼Œä½ 無法å°éŽ–ä»»ä½•ä¸€ä½ Linden。 <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="CannotStartAuctionAlreadyForSale"> - You cannot start an auction on a parcel which is already set for sale. Disable the land sale if you are sure you want to start an auction. + ä½ ç„¡æ³•åœ¨å·²åœ¨å‡ºå”®ä¸çš„地段裡進行æ‹è³£ã€‚ ä½ å¦‚æžœç¢ºå®šè¦æ‹è³£ï¼Œè«‹å…ˆåœæ¢åœŸåœ°å‡ºå”®ã€‚ </notification> - <notification label="Block object by name failed" name="MuteByNameFailed"> - You already have blocked this name. + <notification label="ä¾å稱å°éŽ–ç‰©ä»¶å¤±æ•—" name="MuteByNameFailed"> + ä½ å·²ç¶“å°éŽ–äº†é€™å€‹å稱。 <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="RemoveItemWarn"> - Though permitted, deleting contents may damage the object. Do you want to delete that item? + é›–ç„¶å…許這麼åšï¼Œåˆªé™¤å…§å®¹å¯èƒ½æœƒç ´å£žç‰©ä»¶ã€‚ ä½ è¦åˆªé™¤è©²ç‰©é …嗎? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="CantOfferCallingCard"> - Cannot offer a calling card at this time. Please try again in a moment. + æ¤æ™‚無法æä¾›å片。 è«‹ç¨å€™å†è©¦ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="CantOfferFriendship"> - Cannot offer friendship at this time. Please try again in a moment. + æ¤æ™‚無法發出交å‹é‚€è«‹ã€‚ è«‹ç¨å€™å†è©¦ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="BusyModeSet"> - Busy mode is set. -Chat and instant messages will be hidden. Instant messages will get your Busy mode response. All teleportation offers will be declined. All inventory offers will go to your Trash. + å·²è¨ç‚ºå¿™ç¢Œæ¨¡å¼ã€‚ +èŠå¤©å’Œå³æ™‚訊æ¯å…§å®¹å°‡è¢«éš±è—。 峿™‚訊æ¯ç™¼é€è€…å°‡æ”¶åˆ°ä½ çš„ã€Œå¿™ç¢Œæ¨¡å¼ã€å›žæ‡‰ã€‚ 所有的瞬間傳é€é‚€è«‹éƒ½å°‡è¢«å©‰æ‹’。 æ¤æ™‚èµ·é€çµ¦ä½ 的收ç´å€ç‰©é …都將丟入垃圾桶。 <usetemplate ignoretext="我變更我的狀態為忙碌模å¼" name="okignore" yestext="確定"/> </notification> <notification name="JoinedTooManyGroupsMember"> - You have reached your maximum number of groups. Please leave another group before joining this one, or decline the offer. -[NAME] has invited you to join a group as a member. + ä½ å·²é”å¯åŒæ™‚åŠ å…¥çš„ç¾¤çµ„æ•¸ä¸Šé™ã€‚ 請先離開å¦ä¸€å€‹ç¾¤çµ„å†åŠ å…¥é€™ä¸€å€‹ï¼Œæˆ–å©‰æ‹’åŠ å…¥é‚€è«‹ã€‚ +[NAME] å·²é‚€è«‹ä½ åŠ å…¥ä¸€å€‹ç¾¤çµ„æˆç‚ºä¸€å“¡ã€‚ <usetemplate name="okcancelbuttons" notext="è¬çµ•" yestext="åŠ å…¥"/> </notification> <notification name="JoinedTooManyGroups"> - You have reached your maximum number of groups. Please leave some group before joining or creating a new one. + ä½ å·²é”å¯åŒæ™‚åŠ å…¥çš„ç¾¤çµ„æ•¸ä¸Šé™ã€‚ 請先離開æŸäº›ç¾¤çµ„å†åŠ å…¥æˆ–æ–°å»ºæ–°ç¾¤çµ„ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="KickUser"> 踢出這個居民並留給他什麼訊æ¯ï¼Ÿ <form name="form"> <input name="message"> - An administrator has logged you off. + 一ä½ç®¡ç†å“¡å·²è¿«ä½¿ä½ 登出。 </input> <button name="OK" text="確定"/> <button name="Cancel" text="å–æ¶ˆ"/> </form> </notification> <notification name="KickAllUsers"> - Kick everyone currently on the grid with what message? + è¸¢å‡ºç¶²æ ¼ä¸Šçš„æ¯å€‹äººï¼Œç•™çµ¦ä»–們什麼訊æ¯ï¼Ÿ <form name="form"> <input name="message"> - An administrator has logged you off. + 一ä½ç®¡ç†å“¡å·²è¿«ä½¿ä½ 登出。 </input> <button name="OK" text="確定"/> <button name="Cancel" text="å–æ¶ˆ"/> @@ -1487,7 +1574,7 @@ Chat and instant messages will be hidden. Instant messages will get your Busy mo å‡çµé€™ä½å±…æ°‘æ™‚åŒæ™‚留下什麼訊æ¯ï¼Ÿ <form name="form"> <input name="message"> - ä½ å·²ç¶“è¢«å‡çµäº†ã€‚ä½ å°‡ä¸èƒ½ç§»å‹•或èŠå¤©ã€‚管ç†å“¡å°‡æœƒä»¥å³æ™‚訊æ¯è¯ç¹«ä½ (IM)。 + ä½ å·²è¢«å‡çµã€‚ ä½ ç„¡æ³•ç§»å‹•æˆ–èŠå¤©ã€‚ 會有管ç†å“¡é€éŽå³æ™‚è¨Šæ¯ IM å’Œä½ è¯çµ¡ã€‚ </input> <button name="OK" text="確定"/> <button name="Cancel" text="å–æ¶ˆ"/> @@ -1497,75 +1584,80 @@ Chat and instant messages will be hidden. Instant messages will get your Busy mo 將這ä½å±…æ°‘è§£å‡ä¸¦åŒæ™‚留下什麼訊æ¯ï¼Ÿ <form name="form"> <input name="message"> - You are no longer frozen. + ä½ å·²è¢«è§£é™¤å‡çµã€‚ </input> <button name="OK" text="確定"/> <button name="Cancel" text="å–æ¶ˆ"/> </form> </notification> <notification name="SetDisplayNameSuccess"> - Hi [DISPLAY_NAME]! + [DISPLAY_NAME]ï¼Œä½ å¥½ï¼ -Just like in real life, it takes a while for everyone to learn about a new name. Please allow several days for [http://wiki.secondlife.com/wiki/Setting_your_display_name your name to update] in objects, scripts, search, etc. +çžè§£é©æ‡‰ä¸€å€‹æ–°åå—æ˜¯éœ€è¦æ™‚間的,æ£å¦‚ç¾å¯¦ç”Ÿæ´»é‚£æ¨£ã€‚ 請給我們幾天時間é‡å°æ‰€æœ‰ç‰©ä»¶ã€è…³æœ¬ã€æœå°‹ç‰æ–¹é¢ [http://wiki.secondlife.com/wiki/Setting_your_display_name æ›´æ–°ä½ çš„åå—]。 </notification> <notification name="SetDisplayNameBlocked"> - 抱æ‰ï¼Œä½ ä¸å¯ä»¥è®Šæ›´ä½ 的顯示åç¨±ã€‚å¦‚æžœä½ è¦ºå¾—é€™æ˜¯éŒ¯èª¤ï¼Œè«‹é€£ç¹«æ”¯æ´å» 商。 + 抱æ‰ï¼Œä½ ç„¡æ³•æ›´æ”¹ä½ çš„é¡¯ç¤ºå。 å¦‚ä½ èªç‚ºæœ‰å‡ºéŒ¯ï¼Œè«‹è¯çµ¡æ”¯æ´äººå“¡ã€‚ </notification> <notification name="SetDisplayNameFailedLength"> - 抱æ‰ï¼Œé€™å稱太長。顯示å稱最大長度為 [LENGTH] å—元。 + 抱æ‰ï¼Œè©²å稱太長。 顯示å稱最大長度為 [LENGTH] å—元。 請嘗試çŸä¸€äº›çš„å稱。 </notification> <notification name="SetDisplayNameFailedGeneric"> - Sorry, we could not set your display name. Please try again later. + 抱æ‰ï¼Œæˆ‘們無法è¨å®šä½ 的顯示å。 è«‹ç¨å€™å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="SetDisplayNameMismatch"> - The display names you entered do not match. Please re-enter. + ä½ æ‰€è¼¸å…¥çš„é¡¯ç¤ºåä¸ç›¸ç¬¦ã€‚ è«‹å†è¼¸å…¥ä¸€æ¬¡ã€‚ </notification> <notification name="AgentDisplayNameUpdateThresholdExceeded"> - Sorry, you have to wait longer before you can change your display name. + 抱æ‰ï¼Œä½ å¿…é ˆå†ç‰ä¸€æ®µæ™‚é–“æ‰èƒ½æ›´æ”¹ä½ 的顯示å。 -See http://wiki.secondlife.com/wiki/Setting_your_display_name +åƒè¦‹ http://wiki.secondlife.com/wiki/Setting_your_display_name -Please try again later. +è«‹ç¨å€™å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="AgentDisplayNameSetBlocked"> - Sorry, we could not set your requested name because it contains a banned word. + 抱æ‰ï¼Œæˆ‘們無法è¨å®šä½ 想è¦çš„åç¨±ï¼Œå®ƒå«æœ‰ç¦ç”¨å—眼。 - Please try a different name. + 請用ä¸åŒçš„å稱試試。 </notification> <notification name="AgentDisplayNameSetInvalidUnicode"> - The display name you wish to set contains invalid characters. + ä½ å¸Œæœ›è¨å®šçš„顯示å嫿œ‰ç„¡æ•ˆå—元。 </notification> <notification name="AgentDisplayNameSetOnlyPunctuation"> - Your display name must contain letters other than punctuation. + ä½ çš„é¡¯ç¤ºåå¿…é ˆåŒ…å«éžæ¨™é»žç¬¦è™Ÿçš„å—元。 </notification> <notification name="DisplayNameUpdate"> - [OLD_NAME] ([SLID]) is now known as [NEW_NAME]. + [OLD_NAME] ([SLID]) ç¾åœ¨æœ‰äº†æ–°åå— [NEW_NAME]。 </notification> <notification name="OfferTeleport"> - Offer a teleport to your location with the following message? + 用下列訊æ¯ç™¼å‡ºçž¬é–“傳é€é‚€è«‹ä¾†åˆ°ä½ çš„ä½ç½®ï¼Ÿ <form name="form"> <input name="message"> - åŠ å…¥æˆ‘åˆ° [REGION] + 在 [REGION] å’Œæˆ‘æœƒé¢ </input> <button name="OK" text="確定"/> <button name="Cancel" text="å–æ¶ˆ"/> </form> </notification> + <notification name="TooManyTeleportOffers"> + ä½ è©¦åœ–é€å‡º [OFFERS] 個瞬間傳é€é‚€è«‹ã€‚ +è¶…éŽäº† [LIMIT] 個的上é™ã€‚ + <usetemplate name="okbutton" yestext="確定"/> + </notification> <notification name="OfferTeleportFromGod"> - God summon Resident to your location? + 用神的權力把居民å¬åˆ°ä½ çš„ä½ç½®ï¼Ÿ <form name="form"> <input name="message"> - Join me in [REGION] + 在 [REGION] å’Œæˆ‘æœƒé¢ </input> <button name="OK" text="確定"/> <button name="Cancel" text="å–æ¶ˆ"/> </form> </notification> <notification name="TeleportFromLandmark"> - Are you sure you want to teleport to <nolink>[LOCATION]</nolink>? - <usetemplate ignoretext="Confirm that I want to teleport to a landmark" name="okcancelignore" notext="å–æ¶ˆ" yestext="瞬間傳é€"/> + ä½ ç¢ºå®šè¦çž¬é–“傳é€åˆ°<nolink>[LOCATION]</nolink>? + <usetemplate ignoretext="ç¢ºèªæˆ‘è¦çž¬é–“傳é€åˆ°æŸå€‹åœ°æ¨™" name="okcancelignore" notext="å–æ¶ˆ" yestext="瞬間傳é€"/> </notification> <notification name="TeleportToPick"> 瞬間傳é€åˆ° [PICK]? @@ -1580,57 +1672,57 @@ Please try again later. <usetemplate ignoretext="ç¢ºèªæˆ‘è¦çž¬é–“傳é€åˆ°æ·å²ç´€éŒ„ä¸çš„ä½ç½®" name="okcancelignore" notext="å–æ¶ˆ" yestext="瞬間傳é€"/> </notification> <notification label="é€å‡ºè¨Šæ¯çµ¦ä½ é ˜åœ°å…§çš„æ¯ä¸€å€‹äºº" name="MessageEstate"> - Type a short announcement which will be sent to everyone currently in your estate. + 輸入簡çŸå…¬å‘Šï¼Œå…¬å‘Šå°‡ç™¼é€çµ¦é ˜åœ°è£¡æ‰€æœ‰äººã€‚ <form name="form"> <button name="OK" text="確定"/> <button name="Cancel" text="å–æ¶ˆ"/> </form> </notification> - <notification label="Change Linden Estate" name="ChangeLindenEstate"> - You are about to change a Linden owned estate (mainland, teen grid, orientation, etc.). + <notification label="更改 Linden é ˜åœ°" name="ChangeLindenEstate"> + ä½ å³å°‡æ›´æ”¹ä¸€å€‹ Linden æ‰€æ“æœ‰çš„é ˜åœ°ï¼ˆå¤§é™¸ã€é’å°‘å¹´ç¶²æ ¼ã€å°Žå¼•å€ç‰ï¼‰ã€‚ -This is EXTREMELY DANGEROUS because it can fundamentally affect the Resident experience. On the mainland, it will change thousands of regions and make the spaceserver hiccup. +這動作éžå¸¸å±éšªï¼Œå®ƒæœƒæ ¹æœ¬å½±éŸ¿æ‰€æœ‰å±…民的體驗。 在大陸上,它將更動數åƒå€‹åœ°å€ï¼Œå°Žè‡´ç©ºé–“伺æœå™¨ç™¼ç”Ÿä¸é †ã€‚ -Proceed? +繼續? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> - <notification label="Change Linden Estate Access" name="ChangeLindenAccess"> - You are about to change the access list for a Linden owned estate (mainland, teen grid, orientation, etc.). + <notification label="更改 Linden é ˜åœ°å‡ºå…¥æ¬Š" name="ChangeLindenAccess"> + ä½ å³å°‡æ›´æ”¹ä¸€å€‹ Linden æ‰€æ“æœ‰é ˜åœ°ï¼ˆå¤§é™¸ã€é’å°‘å¹´ç¶²æ ¼ã€å°Žå¼•å€ç‰ï¼‰çš„出入權。 -This is DANGEROUS and should only be done to invoke the hack allowing objects/L$ to be transfered in/out of a grid. -It will change thousands of regions and make the spaceserver hiccup. +這動作很å±éšªï¼Œåªåœ¨éœ€è¦æŠŠç‰©ä»¶æˆ– L$ é€å‡ºæˆ–é€å…¥ç¶²æ ¼ï¼Œåˆç„¡æ›´å¥½æ–¹æ³•時ä¸å¾—已使用。 +它將更動數åƒå€‹åœ°å€ï¼Œå°Žè‡´ç©ºé–“伺æœå™¨ç™¼ç”Ÿä¸é †ã€‚ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification label="鏿“‡é ˜åœ°" name="EstateAllowedAgentAdd"> - Add to allowed list for this estate only or for [ALL_ESTATES]? + 僅é‡å°é€™å€‹é ˜åœ°æˆ–é‡å° [ALL_ESTATES] 將它新增到å…許清單? <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="å…¨éƒ¨é ˜åœ°" yestext="é€™å€‹é ˜åœ°"/> </notification> <notification label="鏿“‡é ˜åœ°" name="EstateAllowedAgentRemove"> - Remove from allowed list for this estate only or for [ALL_ESTATES]? + 僅é‡å°é€™å€‹é ˜åœ°æˆ–é‡å° [ALL_ESTATES] 將它從å…許清單ä¸ç§»é™¤ï¼Ÿ <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="å…¨éƒ¨é ˜åœ°" yestext="é€™å€‹é ˜åœ°"/> </notification> <notification label="鏿“‡é ˜åœ°" name="EstateAllowedGroupAdd"> - Add to group allowed list for this estate only or for [ALL_ESTATES]? + 僅é‡å°é€™å€‹é ˜åœ°æˆ–é‡å° [ALL_ESTATES] 將它新增到群組å…許清單? <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="å…¨éƒ¨é ˜åœ°" yestext="é€™å€‹é ˜åœ°"/> </notification> <notification label="鏿“‡é ˜åœ°" name="EstateAllowedGroupRemove"> - Remove from group allowed list for this estate only or [ALL_ESTATES]? + 僅é‡å°é€™å€‹é ˜åœ°æˆ–é‡å° [ALL_ESTATES] 將它從群組å…許清單ä¸ç§»é™¤ï¼Ÿ <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="å…¨éƒ¨é ˜åœ°" yestext="é€™å€‹é ˜åœ°"/> </notification> <notification label="鏿“‡é ˜åœ°" name="EstateBannedAgentAdd"> - Deny access for this estate only or for [ALL_ESTATES]? + 僅é‡å°é€™å€‹é ˜åœ°æˆ–é‡å° [ALL_ESTATES] ç¦æ¢å‡ºå…¥ï¼Ÿ <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="å…¨éƒ¨é ˜åœ°" yestext="é€™å€‹é ˜åœ°"/> </notification> <notification label="鏿“‡é ˜åœ°" name="EstateBannedAgentRemove"> - Remove this Resident from the ban list for access for this estate only or for [ALL_ESTATES]? + 僅é‡å°é€™å€‹é ˜åœ°æˆ–é‡å° [ALL_ESTATES] å°‡é€™å€‹å±…æ°‘å¾žç¦æ¢å‡ºå…¥æ¸…å–®ä¸é™¤å? <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="å…¨éƒ¨é ˜åœ°" yestext="é€™å€‹é ˜åœ°"/> </notification> <notification label="鏿“‡é ˜åœ°" name="EstateManagerAdd"> - Add estate manager for this estate only or for [ALL_ESTATES]? + 僅é‡å°é€™å€‹é ˜åœ°æˆ–é‡å° [ALL_ESTATES] æ–°å¢žé ˜åœ°ç®¡ç†äººï¼Ÿ <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="å…¨éƒ¨é ˜åœ°" yestext="é€™å€‹é ˜åœ°"/> </notification> <notification label="鏿“‡é ˜åœ°" name="EstateManagerRemove"> - Remove estate manager for this estate only or for [ALL_ESTATES]? + 僅é‡å°é€™å€‹é ˜åœ°æˆ–é‡å° [ALL_ESTATES] ç§»é™¤é ˜åœ°ç®¡ç†äººï¼Ÿ <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="å…¨éƒ¨é ˜åœ°" yestext="é€™å€‹é ˜åœ°"/> </notification> <notification label="確èªè¸¢å‡º" name="EstateKickUser"> @@ -1638,251 +1730,295 @@ It will change thousands of regions and make the spaceserver hiccup. <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="EstateChangeCovenant"> - Are you sure you want to change the Estate Covenant? + ä½ ç¢ºå®šè¦æ›´æ”¹é ˜åœ°å¥‘約? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="RegionEntryAccessBlocked"> - You are not allowed in that Region due to your maturity Rating. This may be a result of a lack of information validating your age. - -Please verify you have the latest Viewer installed, and go to the Knowledge Base for details on accessing areas with this maturity rating. + ä½ æ‰€æ¬²å‰å¾€çš„地å€å«æœ‰è¶…éŽä½ ç›®å‰å好的分級的內容。 ä½ å¯ä»¥åˆ°ã€Œæˆ‘自己 > å好è¨å®š > 一般è¨å®šã€è®Šæ›´ä½ çš„å好è¨å®šã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> - <notification name="RegionEntryAccessBlocked_KB"> - You are not allowed in that region due to your maturity Rating. - -Go to the Knowledge Base for more information about maturity Ratings? + <notification name="RegionEntryAccessBlocked_AdultsOnlyContent"> + ä½ æ‰€æ¬²å‰å¾€çš„地å€å«æœ‰ [REGIONMATURITY] çš„åˆ†ç´šå…§å®¹ï¼Œåƒ…é™æˆäººã€‚ <url name="url"> http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="I can't enter this Region, due to restrictions of the maturity Rating" name="okcancelignore" notext="關閉" yestext="Go to Knowledge Base"/> + <usetemplate ignoretext="跨越地å€ï¼šä½ 所欲å‰å¾€çš„地å€å«æœ‰é™åˆ¶çµ¦æˆäººçš„內容。" name="okcancelignore" notext="關閉" yestext="å‰å¾€çŸ¥è˜åº«"/> </notification> <notification name="RegionEntryAccessBlocked_Notify"> - You are not allowed in that region due to your maturity Rating. + ä½ æ‰€æ¬²å‰å¾€çš„地å€åŒ…å« [REGIONMATURITY] åˆ†ç´šçš„å…§å®¹ï¼Œå¯æ˜¯ä½ ç›®å‰çš„å好è¨å®šæŽ’除了 [REGIONMATURITY] 分級的內容。 + </notification> + <notification name="RegionEntryAccessBlocked_NotifyAdultsOnly"> + ä½ æ‰€æ¬²å‰å¾€çš„地å€å«æœ‰ [REGIONMATURITY] çš„åˆ†ç´šå…§å®¹ï¼Œåƒ…é™æˆäººã€‚ </notification> <notification name="RegionEntryAccessBlocked_Change"> - You are not allowed in that Region due to your maturity Rating preference. - -To enter the desired region, please change your maturity Rating preference. This will allow you to search for and access [REGIONMATURITY] content. To undo any changes, go to Me > Preferences > General. + ä½ æ‰€æ¬²å‰å¾€çš„地å€åŒ…å« [REGIONMATURITY] åˆ†ç´šçš„å…§å®¹ï¼Œå¯æ˜¯ä½ ç›®å‰çš„å好è¨å®šæŽ’除了 [REGIONMATURITY] 分級的內容。 ä½ å¯ä»¥è®Šæ›´ä½ çš„å好è¨å®šï¼Œæˆ–å–æ¶ˆå‰å¾€ã€‚ ä½ çš„å好è¨å®šè®Šæ›´å¾Œï¼Œä½ å¯ä»¥è©¦åœ–å†é€²å…¥è©²åœ°å€ã€‚ <form name="form"> - <button name="OK" text="Change Preference"/> - <button name="Cancel" text="Close"/> - <ignore name="ignore" text="My chosen Rating preference prevents me from entering a Region"/> + <button name="OK" text="變更å好è¨å®š"/> + <button name="Cancel" text="å–æ¶ˆ"/> + <ignore name="ignore" text="跨越地å€ï¼šä½ 所欲å‰å¾€çš„地å€å«æœ‰è¢«ä½ ç›®å‰çš„å好è¨å®šæŽ’除的分級內容。"/> </form> </notification> + <notification name="RegionEntryAccessBlocked_PreferencesOutOfSync"> + 發生技術å•é¡Œï¼Œä½ çš„å好è¨å®šå’Œä¼ºæœå™¨ä¸Šçš„ä¸ä¸€è‡´ã€‚ + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="TeleportEntryAccessBlocked"> + ä½ æ‰€æ¬²å‰å¾€çš„地å€å«æœ‰è¶…éŽä½ ç›®å‰å好的分級的內容。 ä½ å¯ä»¥åˆ°ã€Œæˆ‘自己 > å好è¨å®š > 一般è¨å®šã€è®Šæ›´ä½ çš„å好è¨å®šã€‚ + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="TeleportEntryAccessBlocked_AdultsOnlyContent"> + ä½ æ‰€æ¬²å‰å¾€çš„地å€å«æœ‰ [REGIONMATURITY] çš„åˆ†ç´šå…§å®¹ï¼Œåƒ…é™æˆäººã€‚ + <url name="url"> + http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview + </url> + <usetemplate ignoretext="瞬間傳é€ï¼šä½ 所欲å‰å¾€çš„地å€å«æœ‰é™åˆ¶çµ¦æˆäººçš„內容。" name="okcancelignore" notext="關閉" yestext="å‰å¾€çŸ¥è˜åº«"/> + </notification> + <notification name="TeleportEntryAccessBlocked_Notify"> + ä½ æ‰€æ¬²å‰å¾€çš„地å€åŒ…å« [REGIONMATURITY] åˆ†ç´šçš„å…§å®¹ï¼Œå¯æ˜¯ä½ ç›®å‰çš„å好è¨å®šæŽ’除了 [REGIONMATURITY] 分級的內容。 + </notification> + <notification name="TeleportEntryAccessBlocked_NotifyAdultsOnly"> + ä½ æ‰€æ¬²å‰å¾€çš„地å€å«æœ‰ [REGIONMATURITY] çš„åˆ†ç´šå…§å®¹ï¼Œåƒ…é™æˆäººã€‚ + </notification> + <notification name="TeleportEntryAccessBlocked_ChangeAndReTeleport"> + ä½ æ‰€æ¬²å‰å¾€çš„地å€åŒ…å« [REGIONMATURITY] åˆ†ç´šçš„å…§å®¹ï¼Œå¯æ˜¯ä½ ç›®å‰çš„å好è¨å®šæŽ’除了 [REGIONMATURITY] 分級的內容。 我們å¯ä»¥è®Šæ›´ä½ çš„å好è¨å®šå¥½è®“ä½ ç¹¼çºŒçž¬é–“å‚³é€ï¼Œä½ 也å¯å–消這動作。 + <form name="form"> + <button name="OK" text="變更後繼續"/> + <button name="Cancel" text="å–æ¶ˆ"/> + <ignore name="ignore" text="瞬間傳é€ï¼ˆå¯é‡å•Ÿï¼‰ï¼šä½ 所欲å‰å¾€çš„地å€å«æœ‰è¢«ä½ ç›®å‰çš„å好è¨å®šæŽ’除的分級內容。"/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_Change"> + ä½ æ‰€æ¬²å‰å¾€çš„地å€åŒ…å« [REGIONMATURITY] åˆ†ç´šçš„å…§å®¹ï¼Œå¯æ˜¯ä½ ç›®å‰çš„å好è¨å®šæŽ’除了 [REGIONMATURITY] 分級的內容。 我們å¯ä»¥è®Šæ›´ä½ çš„å好è¨å®šï¼Œä½ 也å¯å–消瞬間傳é€ã€‚ ä½ çš„å好è¨å®šè®Šæ›´å¾Œï¼Œä½ å¯ä»¥å†å˜—試瞬間傳é€ã€‚ + <form name="form"> + <button name="OK" text="變更å好è¨å®š"/> + <button name="Cancel" text="å–æ¶ˆ"/> + <ignore name="ignore" text="瞬間傳é€ï¼ˆä¸å¯é‡å•Ÿï¼‰ï¼šä½ 所欲å‰å¾€çš„地å€å«æœ‰è¢«ä½ ç›®å‰çš„å好è¨å®šæŽ’除的分級內容。"/> + </form> + </notification> + <notification name="TeleportEntryAccessBlocked_PreferencesOutOfSync"> + 發生技術å•é¡Œï¼Œä½ çš„å好è¨å®šå’Œä¼ºæœå™¨ä¸Šçš„ä¸ä¸€è‡´ã€‚ + <usetemplate name="okbutton" yestext="確定"/> + </notification> <notification name="PreferredMaturityChanged"> - Your maturity Rating preference is now [RATING]. + ä½ å°‡ä¸å†æ”¶åˆ°é€šçŸ¥ï¼Œå‘ŠçŸ¥ä½ å³å°‡é€²å…¥ä¸€å€‹ [RATING] 內容分級的地å€ã€‚ ä½ å¯ä»¥åˆ°é¸å–®åˆ—底下的「我自己 > å好è¨å®š > 一般è¨å®šã€è®Šæ›´ä½ 的內容å好。 + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="MaturityChangeError"> + æˆ‘å€‘æ¤æ™‚ç„¡æ³•è®Šæ›´ä½ çš„å好è¨å®šï¼Œè®“ä½ è§€çœ‹ [PREFERRED_MATURITY] 分級的內容。 ä½ çš„å好è¨å®šå·²ç¶“é‡è¨ï¼Œå¯è§€çœ‹ [ACTUAL_MATURITY] 的分級內容。 ä½ å¯ä»¥åˆ°é¸å–®åˆ—的「我自己 > å好è¨å®š > 一般è¨å®šã€å†æ¬¡è®Šæ›´ä½ çš„å好。 + <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="LandClaimAccessBlocked"> - You cannot claim this land due to your maturity Rating. This may be a result of a lack of information validating your age. - -Please verify you have the latest Viewer installed, and go to the Knowledge Base for details on accessing areas with this maturity rating. + ä½ æ‰€æ¬²æ”¶å–çš„åœŸåœ°å«æœ‰è¶…éŽä½ ç›®å‰å好的分級內容。 ä½ å¯ä»¥åˆ°ã€Œæˆ‘自己 > å好è¨å®š > 一般è¨å®šã€è®Šæ›´ä½ çš„å好è¨å®šã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> - <notification name="LandClaimAccessBlocked_KB"> - You cannot claim this land due to your maturity Rating. - -Go to the Knowledge Base for more information about maturity Ratings? + <notification name="LandClaimAccessBlocked_AdultsOnlyContent"> + åªæœ‰æˆäººæ‰èƒ½æ”¶å–這土地。 <url name="url"> http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="I can't claim this Land, due to restrictions of the maturity Rating" name="okcancelignore" notext="關閉" yestext="Go to Knowledge Base"/> + <usetemplate ignoretext="åªæœ‰æˆäººæ‰èƒ½æ”¶å–這土地。" name="okcancelignore" notext="關閉" yestext="å‰å¾€çŸ¥è˜åº«"/> </notification> <notification name="LandClaimAccessBlocked_Notify"> - You cannot claim this land due to your maturity Rating. + ä½ æ‰€æ¬²æ”¶å–çš„åœŸåœ°åŒ…å« [REGIONMATURITY] åˆ†ç´šçš„å…§å®¹ï¼Œå¯æ˜¯ä½ ç›®å‰çš„å好è¨å®šæŽ’除了 [REGIONMATURITY] 分級的內容。 + </notification> + <notification name="LandClaimAccessBlocked_NotifyAdultsOnly"> + ä½ æ‰€æ¬²æ”¶å–çš„åœŸåœ°åŒ…å« [REGIONMATURITY] çš„åˆ†ç´šå…§å®¹ï¼Œåƒ…é™æˆäººã€‚ </notification> <notification name="LandClaimAccessBlocked_Change"> - You cannot claim this land 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. - <usetemplate ignoretext="My chosen Rating preference prevents me from claiming Land" name="okcancelignore" notext="關閉" yestext="Change Preference"/> + ä½ æ‰€æ¬²æ”¶å–çš„åœŸåœ°åŒ…å« [REGIONMATURITY] åˆ†ç´šçš„å…§å®¹ï¼Œå¯æ˜¯ä½ ç›®å‰çš„å好è¨å®šæŽ’除了 [REGIONMATURITY] 分級的內容。 我們å¯ä»¥è®Šæ›´ä½ çš„åå¥½ï¼Œè®“ä½ å†è©¦åœ–æ”¶å–土地。 + <form name="form"> + <button name="OK" text="變更å好è¨å®š"/> + <button name="Cancel" text="å–æ¶ˆ"/> + <ignore name="ignore" text="ä½ æ‰€æ¬²æ”¶å–çš„åœŸåœ°å«æœ‰è¢«ä½ ç›®å‰çš„å好所排除的分級內容。"/> + </form> </notification> <notification name="LandBuyAccessBlocked"> - You cannot buy this land due to your maturity Rating. This may be a result of a lack of information validating your age. - -Please verify you have the latest Viewer installed, and go to the Knowledge Base for details on accessing areas with this maturity rating. + ä½ æ‰€æ¬²è³¼è²·çš„åœŸåœ°çš„å…§å®¹åˆ†ç´šè¶…éŽä½ ç›®å‰æ‰€è¨å好。 ä½ å¯ä»¥åˆ°ã€Œæˆ‘自己 > å好è¨å®š > 一般è¨å®šã€è®Šæ›´ä½ çš„å好è¨å®šã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> - <notification name="LandBuyAccessBlocked_KB"> - You cannot buy this land due to your maturity Rating. - -Go to the Knowledge Base for more information about maturity Ratings? + <notification name="LandBuyAccessBlocked_AdultsOnlyContent"> + åªæœ‰æˆäººæ‰èƒ½è³¼è²·é€™åœŸåœ°ã€‚ <url name="url"> http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview </url> - <usetemplate ignoretext="I can't buy this Land, due to restrictions of the maturity Rating" name="okcancelignore" notext="關閉" yestext="Go to Knowledge Base"/> + <usetemplate ignoretext="åªæœ‰æˆäººæ‰èƒ½è³¼è²·é€™åœŸåœ°ã€‚" name="okcancelignore" notext="關閉" yestext="å‰å¾€çŸ¥è˜åº«"/> </notification> <notification name="LandBuyAccessBlocked_Notify"> - You cannot buy this land due to your maturity Rating. + ä½ æ‰€æ¬²è³¼è²·çš„åœŸåœ°åŒ…å« [REGIONMATURITY] åˆ†ç´šçš„å…§å®¹ï¼Œå¯æ˜¯ä½ ç›®å‰çš„å好è¨å®šæŽ’除了 [REGIONMATURITY] 分級的內容。 + </notification> + <notification name="LandBuyAccessBlocked_NotifyAdultsOnly"> + ä½ æ‰€æ¬²è³¼è²·çš„åœŸåœ°å«æœ‰ [REGIONMATURITY] åˆ†ç´šçš„å…§å®¹ï¼Œåƒ…é™æˆäººã€‚ </notification> <notification name="LandBuyAccessBlocked_Change"> - You cannot buy this land 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. - <usetemplate ignoretext="My chosen Rating preference prevents me from buying Land" name="okcancelignore" notext="關閉" yestext="變更å好è¨å®š"/> + ä½ æ‰€æ¬²è³¼è²·çš„åœŸåœ°åŒ…å« [REGIONMATURITY] åˆ†ç´šçš„å…§å®¹ï¼Œå¯æ˜¯ä½ ç›®å‰çš„å好è¨å®šæŽ’除了 [REGIONMATURITY] 分級的內容。 我們å¯ä»¥è®Šæ›´ä½ çš„åå¥½ï¼Œè®“ä½ å†è©¦åœ–購買土地。 + <form name="form"> + <button name="OK" text="變更å好è¨å®š"/> + <button name="Cancel" text="å–æ¶ˆ"/> + <ignore name="ignore" text="ä½ æ‰€æ¬²è³¼è²·çš„åœŸåœ°å«æœ‰è¢«ä½ ç›®å‰çš„å好所排除的分級內容。"/> + </form> </notification> <notification name="TooManyPrimsSelected"> - There are too many prims selected. Please select [MAX_PRIM_COUNT] or fewer prims and try again + 鏿“‡äº†å¤ªå¤šé …的幾何元件。 è«‹è‡³å¤šé¸æ“‡ [MAX_PRIM_COUNT] é …å¹¾ä½•å…ƒä»¶ï¼Œå†è©¦ä¸€æ¬¡ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="ProblemImportingEstateCovenant"> - Problem importing estate covenant. + åŒ¯å…¥é ˜åœ°å¥‘ç´„æ™‚å‡ºå•題。 <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="ProblemAddingEstateManager"> - Problems adding a new estate manager. One or more estates may have a full manager list. + æ–°å¢žé ˜åœ°ç®¡ç†äººæ™‚出å•題。 å…¶ä¸ä¸€å€‹é ˜åœ°çš„管ç†äººæ¸…å–®å¯èƒ½å·²ç¶“顿»¿ã€‚ </notification> <notification name="ProblemAddingEstateGeneric"> - Problems adding to this estate list. One or more estates may have a full list. + æ–°å¢žåˆ°é€™å€‹é ˜åœ°æ¸…å–®æ™‚å‡ºå•題。 å…¶ä¸ä¸€å€‹é ˜åœ°çš„æ¸…å–®å¯èƒ½å·²æ»¿ã€‚ </notification> <notification name="UnableToLoadNotecardAsset"> - Unable to load notecard's asset at this time. + æ¤åˆ»ç„¡æ³•載入記事å¡è³‡ç”¢ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="NotAllowedToViewNotecard"> - Insufficient permissions to view notecard associated with asset ID requested. + 權é™ä¸è¶³ç„¡æ³•察看æ¤è³‡ç”¢ç·¨è™Ÿçš„記事å¡ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="MissingNotecardAssetID"> - Asset ID for notecard is missing from database. + 記事å¡çš„è³‡ç”¢ç·¨è™Ÿåœ¨è³‡æ–™åº«ä¸æ‰¾ä¸åˆ°ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="PublishClassified"> - Remember: Classified ad fees are non-refundable. + 請注æ„:個人廣告刊登費æ•ä¸é€€é‚„。 -Publish this classified now for L$[AMOUNT]? +支付 L$ [AMOUNT] 刊載這則個人廣告? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="SetClassifiedMature"> - Does this classified contain Moderate content? + 這則個人廣告是å¦å«é©åº¦æˆäººåˆ†ç´šçš„內容? <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="å¦" yestext="是"/> </notification> <notification name="SetGroupMature"> 這個群組將包å«é©åº¦æˆäººå…§å®¹ï¼Ÿ <usetemplate canceltext="å–æ¶ˆ" name="yesnocancelbuttons" notext="å¦" yestext="是"/> </notification> - <notification label="Confirm restart" name="ConfirmRestart"> - Do you really want to restart this region in 2 minutes? + <notification label="ç¢ºå®šé‡æ–°å•Ÿå‹•" name="ConfirmRestart"> + ä½ ç¢ºå®šè¦åœ¨ 2 分é˜å¾Œé‡æ–°å•Ÿå‹•這個地å€ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> - <notification label="Message everyone in this region" name="MessageRegion"> - Type a short announcement which will be sent to everyone in this region. + <notification label="å°åœ°å€è£¡æ¯å€‹äººç™¼å‡ºè¨Šæ¯" name="MessageRegion"> + 輸入簡çŸå…¬å‘Šï¼Œå…¬å‘Šå°‡ç™¼é€çµ¦åœ°å€è£¡æ‰€æœ‰äººã€‚ <form name="form"> <button name="OK" text="確定"/> <button name="Cancel" text="å–æ¶ˆ"/> </form> </notification> - <notification label="Changed Region Maturity" name="RegionMaturityChange"> - The maturity rating for this region has been updated. -It may take some time for the change to be reflected on the map. - -To enter Adult regions, Residents must be Account Verified, either by age-verification or payment-verification. + <notification label="已變更地å€çš„內容分級" name="RegionMaturityChange"> + æ¤åœ°å€çš„內容分級已經變更。 +å¯èƒ½éœ€è¦ç¨å€™ä¸€æ®µæ™‚é–“ï¼Œåœ°åœ–æ‰æœƒåæ˜ é€™å€‹è®Šæ›´ã€‚ + <usetemplate name="okbutton" yestext="確定"/> </notification> - <notification label="Voice Version Mismatch" name="VoiceVersionMismatch"> - This version of [APP_NAME] is not compatible with the Voice Chat feature in this region. In order for Voice Chat to function correctly you will need to update [APP_NAME]. + <notification label="è²éŸ³ç‰ˆæœ¬ä¸ç›¸ç¬¦" name="VoiceVersionMismatch"> + 這版本的 [APP_NAME] 和本地å€çš„語音èŠå¤©åŠŸèƒ½ä¸ç›¸å®¹ã€‚ 想è¦èªžéŸ³èŠå¤©æ£å¸¸é‹ä½œï¼Œä½ å¿…é ˆæ›´æ–° [APP_NAME]。 </notification> <notification label="無法購買物件" name="BuyObjectOneOwner"> - Cannot buy objects from different owners at the same time. -Please select only one object and try again. + ç„¡æ³•åŒæ™‚å‘ä¸åŒç‰©ä¸»è³¼è²·ç‰©ä»¶ã€‚ +è«‹åªé¸æ“‡ä¸€å€‹ç‰©ä»¶ï¼Œå†è©¦ä¸€æ¬¡ã€‚ </notification> <notification label="無法購買內容物" name="BuyContentsOneOnly"> - Unable to buy the contents of more than one object at a time. -Please select only one object and try again. + 無法一次購買多個物件的內容。 +è«‹åªé¸æ“‡ä¸€å€‹ç‰©ä»¶ï¼Œå†è©¦ä¸€æ¬¡ã€‚ </notification> <notification label="無法購買內容物" name="BuyContentsOneOwner"> - Cannot buy objects from different owners at the same time. -Please select only one object and try again. + ç„¡æ³•åŒæ™‚å‘ä¸åŒç‰©ä¸»è³¼è²·ç‰©ä»¶ã€‚ +è«‹åªé¸æ“‡ä¸€å€‹ç‰©ä»¶ï¼Œå†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="BuyOriginal"> - Buy original object from [OWNER] for L$[PRICE]? -You will become the owner of this object. -You will be able to: - Modify: [MODIFYPERM] - Copy: [COPYPERM] - Resell or Give Away: [RESELLPERM] + å‘ [OWNER] 支付 L$[PRICE],購買原版物件? +ä½ å°‡æˆç‚ºé€™ç‰©ä»¶çš„æ‰€æœ‰äººã€‚ +ä½ å°‡å¯ä»¥ï¼š + 修改:[MODIFYPERM] + 複製:[COPYPERM] + 轉售或é€äººï¼š[RESELLPERM] <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="BuyOriginalNoOwner"> - Buy original object for L$[PRICE]? -You will become the owner of this object. -You will be able to: - Modify: [MODIFYPERM] - Copy: [COPYPERM] - Resell or Give Away: [RESELLPERM] + 支付 L$[PRICE] 購買原版物件? +ä½ å°‡æˆç‚ºé€™ç‰©ä»¶çš„æ‰€æœ‰äººã€‚ +ä½ å°‡å¯ä»¥ï¼š + 修改:[MODIFYPERM] + 複製:[COPYPERM] + 轉售或é€äººï¼š[RESELLPERM] <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="BuyCopy"> - Buy a copy from [OWNER] for L$[PRICE]? -The object will be copied to your inventory. -You will be able to: - Modify: [MODIFYPERM] - Copy: [COPYPERM] - Resell or Give Away: [RESELLPERM] + å‘ [OWNER] 支付 L$[PRICE],購買複製物件? +é€™ç‰©ä»¶å°‡è¤‡è£½åˆ°ä½ çš„æ”¶ç´å€ã€‚ +ä½ å°‡å¯ä»¥ï¼š + 修改:[MODIFYPERM] + 複製:[COPYPERM] + 轉售或é€äººï¼š[RESELLPERM] <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="BuyCopyNoOwner"> - Buy a copy for L$[PRICE]? -The object will be copied to your inventory. -You will be able to: - Modify: [MODIFYPERM] - Copy: [COPYPERM] - Resell or Give Away: [RESELLPERM] + 支付 L$[PRICE] 購買複製物件? +é€™ç‰©ä»¶å°‡è¤‡è£½åˆ°ä½ çš„æ”¶ç´å€ã€‚ +ä½ å°‡å¯ä»¥ï¼š + 修改:[MODIFYPERM] + 複製:[COPYPERM] + 轉售或é€äººï¼š[RESELLPERM] <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="BuyContents"> - Buy contents from [OWNER] for L$[PRICE]? -They will be copied to your inventory. + å‘ [OWNER] 支付 L$[PRICE] 購買內容? +å…§å®¹å°‡è¤‡è£½åˆ°ä½ çš„æ”¶ç´å€ã€‚ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="BuyContentsNoOwner"> - Buy contents for L$[PRICE]? -They will be copied to your inventory. + 支付 L$[PRICE] 購買內容? +å…§å®¹å°‡è¤‡è£½åˆ°ä½ çš„æ”¶ç´å€ã€‚ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmPurchase"> - This transaction will: + é€™é …äº¤æ˜“å°‡æœƒï¼š [ACTION] -Are you sure you want to proceed with this purchase? +ä½ ç¢ºå®šè¦è³¼è²·ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmPurchasePassword"> - This transaction will: + é€™é …äº¤æ˜“å°‡æœƒï¼š [ACTION] -Are you sure you want to proceed with this purchase? -Please re-enter your password and click OK. +ä½ ç¢ºå®šè¦è³¼è²·ï¼Ÿ +è«‹é‡æ–°è¼¸å…¥å¯†ç¢¼å†é»žæŒ‰ç¢ºå®šã€‚ <form name="form"> <button name="ConfirmPurchase" text="確定"/> <button name="Cancel" text="å–æ¶ˆ"/> </form> </notification> <notification name="SetPickLocation"> - Note: -You have updated the location of this pick but the other details will retain their original values. + 附註: +ä½ å·²ç¶“æ›´æ–°é€™å€‹ç²¾é¸åœ°é»žçš„地點細節,其他細節將ä¿ç•™åŽŸå…§å®¹ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="MoveInventoryFromObject"> - You have selected 'no copy' inventory items. -These items will be moved to your inventory, not copied. + ä½ é¸æ“‡äº†ã€Œç¦æ¢è¤‡è£½ã€çš„æ”¶ç´å€ç‰©é …。 +é€™äº›ç‰©é …å°‡è¢«ç§»åˆ°ä½ çš„æ”¶ç´å€ï¼Œä¸æœƒè¢«è¤‡è£½ã€‚ -Move the inventory item(s)? - <usetemplate ignoretext="Warn me before I move 'no-copy' items from an object" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> +è¦ç§»å‹•æ”¶ç´å€ç‰©é …嗎? + <usetemplate ignoretext="在我從物件ä¸ç§»å‹•ã€Œç¦æ¢è¤‡è£½ã€ç‰©é …之å‰è¦å‘Šæˆ‘" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="MoveInventoryFromScriptedObject"> - You have selected 'no copy' inventory items. These items will be moved to your inventory, not copied. -Because this object is scripted, moving these items to your inventory may cause the script to malfunction. + ä½ é¸æ“‡äº†ã€Œç¦æ¢è¤‡è£½ã€çš„æ”¶ç´å€ç‰©é …。 é€™äº›ç‰©é …å°‡è¢«ç§»åˆ°ä½ çš„æ”¶ç´å€ï¼Œä¸æœƒè¢«è¤‡è£½ã€‚ +ç”±æ–¼é€™ç‰©ä»¶å¸¶æœ‰è…³æœ¬ï¼Œç§»å‹•é€™äº›ç‰©é …åˆ°æ”¶ç´å€å¯èƒ½æœƒå°Žè‡´è…³æœ¬é‹ä½œä¸æ£å¸¸ã€‚ -Move the inventory item(s)? - <usetemplate ignoretext="Warn me before I move 'no-copy' items which might break a scripted object" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> +è¦ç§»å‹•æ”¶ç´å€ç‰©é …嗎? + <usetemplate ignoretext="在我移動å¯èƒ½ç ´å£žå¸¶è…³æœ¬ç‰©ä»¶çš„ã€Œç¦æ¢è¤‡è£½ã€ç‰©é …之å‰è¦å‘Šæˆ‘" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ClickActionNotPayable"> - Warning: The 'Pay object' click action has been set, but it will only work if a script is added with a money() event. + è¦å‘Šï¼šã€Œæ”¯ä»˜ç‰©ä»¶ã€é»žæŒ‰å‹•作已è¨å®šï¼Œä½†æ–°å¢žçš„è…³æœ¬å¿…é ˆå«æœ‰ money() äº‹ä»¶ï¼Œè©²å‹•ä½œæ‰æœ‰ä½œç”¨ã€‚ <form name="form"> - <ignore name="ignore" text="I set the action 'Pay object' when building an object without a money() script"/> + <ignore name="ignore" text="我在創建ä¸å« money() 腳本的物件時è¨å®šäº†ã€Œæ”¯ä»˜ç‰©ä»¶ã€å‹•作"/> </form> </notification> <notification name="OpenObjectCannotCopy"> - There are no items in this object that you are allowed to copy. + é€™ç‰©ä»¶ä¸æ²’æœ‰ä»»ä½•å‡†è¨±ä½ è¤‡è£½çš„ç‰©é …ã€‚ </notification> <notification name="WebLaunchAccountHistory"> å‰å¾€ä½ çš„[http://secondlife.com/account/ 塗鴉牆]ä»¥å¯Ÿçœ‹ä½ çš„å¸³æˆ¶æ·å²ç´€éŒ„? @@ -1892,58 +2028,70 @@ Move the inventory item(s)? ä½ ç¢ºå®šä½ è¦çµæŸé€€å‡ºï¼Ÿ <usetemplate ignoretext="ç•¶æˆ‘çµæŸé€€å‡ºæ™‚進行確èª" name="okcancelignore" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> </notification> + <notification name="ConfirmRestoreToybox"> + 這動作將會æ¢å¾©ä½ é è¨çš„æŒ‰éˆ•和工具列。 + +ä½ ä¸èƒ½å–消這動作。 + <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> + </notification> + <notification name="ConfirmClearAllToybox"> + é€™å‹•ä½œå°‡æŠŠæ‰€æœ‰æŒ‰éˆ•æ”¶å…¥å·¥å…·ç®±ï¼Œä½ çš„å·¥å…·åˆ—å°‡æœƒæ¸…ç©ºã€‚ + +ä½ ä¸èƒ½å–消這動作。 + <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> + </notification> <notification name="DeleteItems"> [QUESTION] <usetemplate ignoretext="刪除物å“å‰ç¢ºèª" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="HelpReportAbuseEmailLL"> - Use this tool to report violations of the [http://secondlife.com/corporate/tos.php Terms of Service] and [http://secondlife.com/corporate/cs.php Community Standards]. + ä½¿ç”¨é€™å€‹å·¥å…·èˆ‰å ±ä»»ä½•é•å[http://secondlife.com/corporate/tos.php æœå‹™æ¢æ¬¾]å’Œ[http://secondlife.com/corporate/cs.php 社群準則]的情事。 -All reported abuses are investigated and resolved. +æ‰€æœ‰èˆ‰å ±çš„é•è¦äº‹ä»¶éƒ½æœ‰äººèª¿æŸ¥ï¼ŒåŠ ä»¥è§£æ±ºã€‚ </notification> <notification name="HelpReportAbuseSelectCategory"> - Please select a category for this abuse report. -Selecting a category helps us file and process abuse reports. + è«‹é¸æ“‡é©åˆé€™æ¬¡é•è¦èˆ‰å ±çš„類別。 +é¸å°é¡žåˆ¥å¯ä»¥å¹«åŠ©æˆ‘å€‘æ¸é¡žä¸¦è™•ç†é•è¦èˆ‰å ±ã€‚ </notification> <notification name="HelpReportAbuseAbuserNameEmpty"> - Please enter the name of the abuser. -Entering an accurate value helps us file and process abuse reports. + 請輸入é•è¦äººçš„åå—。 +輸入準確的內容å¯ä»¥å¹«åŠ©æˆ‘å€‘æ¸é¡žä¸¦è™•ç†é•è¦èˆ‰å ±ã€‚ </notification> <notification name="HelpReportAbuseAbuserLocationEmpty"> - Please enter the location where the abuse took place. -Entering an accurate value helps us file and process abuse reports. + 請輸入é•è¦æƒ…事發生地點。 +輸入準確的內容å¯ä»¥å¹«åŠ©æˆ‘å€‘æ¸é¡žä¸¦è™•ç†é•è¦èˆ‰å ±ã€‚ </notification> <notification name="HelpReportAbuseSummaryEmpty"> - Please enter a summary of the abuse that took place. -Entering an accurate summary helps us file and process abuse reports. + 請概述é•è¦æƒ…事。 +準確的概述å¯ä»¥å¹«åŠ©æˆ‘å€‘æ¸é¡žä¸¦è™•ç†é•è¦èˆ‰å ±ã€‚ </notification> <notification name="HelpReportAbuseDetailsEmpty"> - Please enter a detailed description of the abuse that took place. -Be as specific as you can, including names and the details of the incident you are reporting. -Entering an accurate description helps us file and process abuse reports. + 請詳述é•è¦æƒ…事。 +請儘å¯èƒ½æä¾›å…·é«”è©³æƒ…ï¼ŒåŒ…æ‹¬ä½ è¦èˆ‰å ±çš„æ¡ˆæƒ…細節和涉案的å稱。 +準確的詳述å¯ä»¥å¹«åŠ©æˆ‘å€‘æ¸é¡žä¸¦è™•ç†é•è¦èˆ‰å ±ã€‚ </notification> <notification name="HelpReportAbuseContainsCopyright"> - Dear Resident, + 這ä½å±…æ°‘ï¼Œä½ å¥½ï¼š -You appear to be reporting intellectual property infringement. Please make sure you are reporting it correctly: +ä½ ä¼¼ä¹Žæ£åœ¨èˆ‰å ±æœ‰äººä¾µçŠ¯æ™ºæ…§è²¡ç”¢æ¬Šã€‚ è«‹ç¢ºå®šä½ èˆ‰å ±å…§å®¹ç¢ºé‘¿ç„¡èª¤ï¼š -(1) The Abuse Process. You may submit an abuse report if you believe a Resident is exploiting the [SECOND_LIFE] permissions system, for example, by using CopyBot or similar copying tools, to infringe intellectual property rights. The Abuse Team investigates and issues appropriate disciplinary action for behavior that violates the [SECOND_LIFE] [http://secondlife.com/corporate/tos.php Terms of Service] or [http://secondlife.com/corporate/cs.php Community Standards]. However, the Abuse Team does not handle and will not respond to requests to remove content from the [SECOND_LIFE] world. +(1) é•è¦èˆ‰å ±è™•ç†ç¨‹åºã€‚ ä½ è‹¥ç›¸ä¿¡æœ‰å±…æ°‘åˆ©ç”¨ [SECOND_LIFE] 權é™é‚行侵犯智慧財產權,如使用複製機器程å¼ç¢¼(CopyBot)æˆ–å…¶ä»–é¡žä¼¼è¤‡è£½å·¥å…·ï¼Œå¾—ä»¥èˆ‰å ±æ¤æƒ…事。 é•è¦è™•ç†å°çµ„會就任何é•å[SECOND_LIFE][http://secondlife.com/corporate/tos.php æœå‹™æ¢æ¬¾]或[http://secondlife.com/corporate/cs.php 社群準則]的行為展開調查,並採å–é©ç•¶è™•置。 然而,é•è¦è™•ç†å°çµ„並ä¸å—ç†è¦æ±‚å°‡æŸå…§å®¹è‡ª[SECOND_LIFE]è™›æ“¬ä¸–ç•Œåˆªé™¤ï¼Œé€™é¡žè¦æ±‚å°‡ä¸äºˆå›žæ‡‰ã€‚ -(2) The DMCA or Content Removal Process. To request removal of content from [SECOND_LIFE], you MUST submit a valid notification of infringement as provided in our [http://secondlife.com/corporate/dmca.php DMCA Policy]. +(2) DMCA(刪除內容作æ¥ç¨‹åºï¼‰ã€‚ è‹¥æ¬²è¦æ±‚刪除[SECOND_LIFE]å…§å®¹ï¼Œä½ å¿…é ˆæŒ‰ç…§[http://secondlife.com/corporate/dmca.php DMCA 政ç–]æå‡ºæœ‰æ•ˆçš„侵權通知。 -If you still wish to continue with the abuse process, please close this window and finish submitting your report. You may need to select the specific category 'CopyBot or Permissions Exploit'. +å¦‚æžœä½ ä»å¸Œæœ›ç¹¼çºŒï¼Œè«‹é—œé–‰æ¤è¦–窗,完æˆèˆ‰å ±ã€‚ ä½ å¯èƒ½éœ€è¦é¸æ“‡ã€ŒCopyBot 或濫用權é™ã€é€™ä¸€å…·é«”類別。 -Thank you, +è¬è¬ä½ , -Linden Lab +林登實驗室謹上 </notification> <notification name="FailedRequirementsCheck"> - The following required components are missing from [FLOATER]: + [FLOATER] 裡找ä¸åˆ°ä¸‹åˆ—å¿…è¦å…ƒä»¶ï¼š [COMPONENTS] </notification> <notification label="å–ä»£ç¾æœ‰çš„附件" name="ReplaceAttachment"> - There is already an object attached to this point on your body. -Do you want to replace it with the selected object? + ä½ èº«ä¸Šçš„é€™å€‹éƒ¨ä½å·²ç¶“附著了物件。 +ä½ è¦ç”¨æ‰€é¸ç‰©ä»¶å°‡å®ƒå–代嗎? <form name="form"> <ignore name="ignore" text="ä»¥æ‰€é¸æ“‡çš„物å“å–ä»£ç¾æœ‰çš„é™„åŠ ç‰©"/> <button ignore="自動å–代" name="Yes" text="確定"/> @@ -1951,9 +2099,9 @@ Do you want to replace it with the selected object? </form> </notification> <notification label="忙碌模å¼è¦å‘Š" name="BusyModePay"> - You are in Busy Mode, which means you will not receive any items offered in exchange for this payment. + ä½ ç¾åœ¨è™•於忙碌模å¼ï¼Œé€™æ„å‘³è‘—ä½ ä»˜è²»å¾Œä»å°‡ä¸æœƒæ”¶åˆ°ä»»ä½•ç‰©é …ã€‚ -Would you like to leave Busy Mode before completing this transaction? +ä½ æ˜¯å¦è¦å…ˆé›¢é–‹å¿™ç¢Œæ¨¡å¼ï¼Œå†å®Œæˆäº¤æ˜“? <form name="form"> <ignore name="ignore" text="ç•¶æˆ‘åœ¨å¿™ç¢Œæ¨¡å¼æ™‚ï¼Œå°‡è¦æ”¯ä»˜é‡‘錢或給他人物件"/> <button ignore="總是離開忙碌模å¼" name="Yes" text="確定"/> @@ -1961,7 +2109,7 @@ Would you like to leave Busy Mode before completing this transaction? </form> </notification> <notification name="ConfirmDeleteProtectedCategory"> - 資料夾 '[FOLDERNAME]' 是系統資料夾。刪除系統資料夾將導致ä¸ç©©å®šã€‚ä½ ç¢ºå®šä½ è¦åˆªé™¤å®ƒï¼Ÿ + 「[FOLDERNAME]ã€å±¬æ–¼ç³»çµ±è³‡æ–™å¤¾ã€‚ 刪除系統資料夾å¯èƒ½å°Žè‡´ç³»çµ±ä¸ç©©å®šã€‚ ä½ ç¢ºå®šè¦åŠ ä»¥åˆªé™¤ï¼Ÿ <usetemplate ignoretext="在我刪除系統資料夾å‰ç¢ºèª" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="ConfirmEmptyTrash"> @@ -1972,6 +2120,10 @@ Would you like to leave Busy Mode before completing this transaction? ä½ ç¢ºå®šè¦åˆªé™¤ä½ 的旅行ã€ç¶²é åŠæœå°‹æ·å²ç´€éŒ„嗎? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> + <notification name="ConfirmClearCache"> + ç¢ºå®šè¦æ¸…é™¤ä½ Viewer 的快å–? + <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> + </notification> <notification name="ConfirmClearCookies"> ä½ ç¢ºå®šè¦æ¸…é™¤ä½ çš„ cookies 嗎? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="是"/> @@ -1988,7 +2140,7 @@ Would you like to leave Busy Mode before completing this transaction? 下列的 SLurl ä½ç½®å·²ç¶“è¦†è£½åˆ°ä½ çš„å‰ªè²¼ç°¿ä¸Šï¼š [SLURL] -Link to this from a web page to give others easy access to this location, or try it out yourself by pasting it into the address bar of any web browser. +從æŸå€‹ç¶²é 連çµåˆ°é€™è£¡ï¼Œè®“其他人更容易知é“這個地點,或請自行嘗試將它貼到任何網é ç€è¦½å™¨çš„åœ°å€æ¬„裡。 <form name="form"> <ignore name="ignore" text="SLurl 已經覆製到我的剪貼簿。"/> </form> @@ -1997,48 +2149,30 @@ Link to this from a web page to give others easy access to this location, or try ä½ è¦è¦†å¯«å·²å„²å˜çš„é è¨é…置嗎? <usetemplate name="okcancelbuttons" notext="å¦" yestext="是"/> </notification> - <notification name="WLDeletePresetAlert"> - ä½ è¦åˆªé™¤ [SKY]? - <usetemplate name="okcancelbuttons" notext="å¦" yestext="是"/> - </notification> <notification name="WLNoEditDefault"> - You cannot edit or delete a default preset. + ä½ ä¸èƒ½ç·¨è¼¯æˆ–刪除é è¨çš„è¨å®šã€‚ </notification> <notification name="WLMissingSky"> - This day cycle file references a missing sky file: [SKY]. + é€™å€‹ã€Œä¸€æ—¥å¾ªç’°ã€æª”案åƒè€ƒäº†ä¸€å€‹ä¸å˜åœ¨çš„天空檔案:[SKY]。 </notification> - <notification name="PPSaveEffectAlert"> - PostProcess Effect exists. Do you still wish overwrite it? - <usetemplate name="okcancelbuttons" notext="å¦" yestext="是"/> + <notification name="WLRegionApplyFail"> + 抱æ‰ï¼Œè¨å®šç„¡æ³•套用到地å€ã€‚ 離開地å€å†è¿”回也許å¯ä»¥è§£æ±ºé€™å€‹å•題。 æ‰€å¾—çš„åŽŸå› ç‚ºï¼š[FAIL_REASON] </notification> - <notification name="NewSkyPreset"> - Give me a name for the new sky. - <form name="form"> - <input name="message"> - æ–°é è¨é…é…ç½® - </input> - <button name="OK" text="確定"/> - <button name="Cancel" text="å–æ¶ˆ"/> - </form> - </notification> - <notification name="ExistsSkyPresetAlert"> - Preset already exists! + <notification name="EnvCannotDeleteLastDayCycleKey"> + ç„¡æ³•åˆªé™¤æ¤æ—¥å¾ªç’°çš„æœ€å¾Œä¸€çµ„è¨å®šï¼Œæ—¥å¾ªç’°ä¸å¾—為空白。 ä½ æ‡‰è©²ä¿®æ”¹æœ€å¾Œä¸€çµ„è³‡æ–™ï¼Œä¸è¦è©¦åœ–刪除,然後å†å»ºç«‹æ–°çš„。 + <usetemplate name="okbutton" yestext="確定"/> </notification> - <notification name="NewWaterPreset"> - Give me a name for the new water preset. - <form name="form"> - <input name="message"> - New Preset - </input> - <button name="OK" text="確定"/> - <button name="Cancel" text="å–æ¶ˆ"/> - </form> + <notification name="DayCycleTooManyKeyframes"> + ä½ ç„¡æ³•æ–°å¢žæ›´å¤šçš„ keyframe 到這個日循環。 [SCOPE] 範åœçš„æ—¥å¾ªç’°æœ€å¤šå…許 [MAX] 個 keyframe。 + <usetemplate name="okbutton" yestext="確定"/> </notification> - <notification name="ExistsWaterPresetAlert"> - Preset already exists! + <notification name="EnvUpdateRate"> + ä½ è‡³å¤šåªèƒ½æ¯ [WAIT] 秒更新一次地å€çš„環境è¨å®šã€‚ è«‹ç‰åˆ°é€™æ®µæ™‚é–“éŽåŽ»äº†å†è©¦ä¸€æ¬¡ã€‚ + <usetemplate name="okbutton" yestext="確定"/> </notification> - <notification name="WaterNoEditDefault"> - You cannot edit or delete a default preset. + <notification name="PPSaveEffectAlert"> + PostProcess 效果已經å˜åœ¨ã€‚ ä½ æ˜¯å¦ä»è¦æŠŠå®ƒè¦†å¯«æŽ‰ï¼Ÿ + <usetemplate name="okcancelbuttons" notext="å¦" yestext="是"/> </notification> <notification name="ChatterBoxSessionStartError"> 無法開始一個與 [RECIPIENT] 他的新èŠå¤©æœƒè©±ã€‚ @@ -2056,10 +2190,10 @@ Link to this from a web page to give others easy access to this location, or try <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="Cannot_Purchase_an_Attachment"> - You can't buy an object while it is attached. + ä½ ä¸èƒ½è³¼è²·å·²é™„著的物件。 </notification> - <notification label="About Requests for the Debit Permission" name="DebitPermissionDetails"> - Granting this request gives a script ongoing permission to take Linden dollars (L$) from your account. To revoke this permission, the object owner must delete the object or reset the scripts in the object. + <notification label="關於借記權é™è¦æ±‚" name="DebitPermissionDetails"> + è‹¥ä½ åŒæ„é€™è¦æ±‚,將å…è¨±è…³æœ¬å¾žä½ çš„å¸³æˆ¶ä¸é‡è¦†å–走林登幣(L$)。 ç‰©ä»¶æ‰€æœ‰äººå¿…é ˆåˆªé™¤è©²ç‰©ä»¶ï¼Œæˆ–é‡è¨ç‰©ä»¶è£¡çš„腳本,æ‰èƒ½æ’¤éŠ·é€™ä¸€æ¬Šé™ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="AutoWearNewClothing"> @@ -2067,25 +2201,23 @@ Link to this from a web page to give others easy access to this location, or try <usetemplate ignoretext="ç·¨è¼¯å¤–è§€æ™‚èƒ½ç©¿ä¸Šæˆ‘æ‰€å‰µé€ çš„æœè£" name="okcancelignore" notext="å¦" yestext="是"/> </notification> <notification name="NotAgeVerified"> - You must be age-verified to visit this area. Do you want to go to the [SECOND_LIFE] website and verify your age? - -[_URL] - <url name="url"> - https://secondlife.com/account/verification.php - </url> - <usetemplate ignoretext="I have not verified my age" name="okcancelignore" notext="å¦" yestext="是"/> + ä½ æ‰€æ¬²å‰å¾€çš„地點è¨é™çµ¦å¹´æ»¿ 18 æ²çš„居民進入。 + <usetemplate ignoretext="æˆ‘å¹´é½¡ä¸æ»¿è¦å®šï¼Œç„¡æ³•進入有年齡é™åˆ¶çš„å€åŸŸã€‚" name="okignore" yestext="確定"/> + </notification> + <notification name="NotAgeVerified_Notify"> + æ¤åœ°é»žé™åˆ¶ç‚ºå¹´æ»¿ 18 æ²ã€‚ </notification> <notification name="Cannot enter parcel: no payment info on file"> - You must have payment information on file to visit this area. Do you want to go to the [SECOND_LIFE] website and set this up? + ä½ å¿…é ˆæä¾›ä»˜æ¬¾è³‡æ–™æ‰èƒ½é€²å…¥é€™å€åŸŸã€‚ ä½ æ˜¯å¦è¦å‰å¾€ [SECOND_LIFE] 網站è¨å®šä»˜æ¬¾è³‡æ–™ï¼Ÿ [_URL] <url name="url"> https://secondlife.com/account/ </url> - <usetemplate ignoretext="I lack payment information on file" name="okcancelignore" notext="å¦" yestext="是"/> + <usetemplate ignoretext="我沒有é 留付款資料。" name="okcancelignore" notext="å¦" yestext="是"/> </notification> <notification name="MissingString"> - The string [STRING_NAME] is missing from strings.xml + strings.xml 䏿‰¾ä¸åˆ°å—串 [STRING_NAME] </notification> <notification name="SystemMessageTip"> [MESSAGE] @@ -2103,38 +2235,38 @@ Link to this from a web page to give others easy access to this location, or try å–æ¶ˆè²¼ä¸Š </notification> <notification name="ReplacedMissingWearable"> - Replaced missing clothing/body part with default. + 已用é è¨å€¼è£œè¶³ç©ºç¼ºçš„è¡£æœ/身體部ä½ã€‚ </notification> <notification name="GroupNotice"> - Topic: [SUBJECT], Message: [MESSAGE] + 主旨:[SUBJECT],訊æ¯ï¼š[MESSAGE] </notification> <notification name="FriendOnline"> - <nolink>[NAME]</nolink> 上線 + <nolink>[NAME]</nolink> ç›®å‰åœ¨ç·šä¸Š </notification> <notification name="FriendOffline"> - <nolink>[NAME]</nolink> 離線 + <nolink>[NAME]</nolink> ç›®å‰é›¢ç·š </notification> <notification name="AddSelfFriend"> - Although you're very nice, you can't add yourself as a friend. + é›–ç„¶ä½ äººå¾ˆå¥½ï¼Œä½ é‚„æ˜¯ä¸èƒ½æŠŠè‡ªå·±åŠ ç‚ºæœ‹å‹ã€‚ </notification> <notification name="UploadingAuctionSnapshot"> - Uploading in-world and web site snapshots... -(Takes about 5 minutes.) + æ£åœ¨ä¸Šå‚³è™›æ“¬ä¸–界和網站快照… +(需時約 5 分é˜ã€‚) </notification> <notification name="UploadPayment"> ä½ æ”¯ä»˜ L$[AMOUNT] 上傳。 </notification> <notification name="UploadWebSnapshotDone"> - Web site snapshot upload done. + 網站快照上傳完æˆã€‚ </notification> <notification name="UploadSnapshotDone"> - In-world snapshot upload done + 虛擬世界快照上傳完æˆã€‚ </notification> <notification name="TerrainDownloaded"> 地形 .raw 檔已下載 </notification> <notification name="GestureMissing"> - 嗯,姿勢 [NAME] 在資料庫ä¸éºå¤±ã€‚ + å§¿å‹¢ [NAME] 在資料庫ä¸éºå¤±ã€‚ </notification> <notification name="UnableToLoadGesture"> 無法載入姿勢 [NAME]。 @@ -2143,7 +2275,7 @@ Link to this from a web page to give others easy access to this location, or try 資料庫ä¸çš„地標éºå¤±ã€‚ </notification> <notification name="UnableToLoadLandmark"> - 無法載入地標,請å†è©¦ä¸€æ¬¡ã€‚ + 無法載入地標。 è«‹å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="CapsKeyOn"> ä½ çš„å¤§å¯«éµå·²å•Ÿç”¨ã€‚ @@ -2158,6 +2290,12 @@ Link to this from a web page to give others easy access to this location, or try <notification name="RezItemNoPermissions"> 產生物件時發生權é™è¡çªã€‚ </notification> + <notification name="IMAcrossParentEstates"> + 無法å°ä¸åŒçš„æ¯é ˜åœ°ç™¼å‡ºå³æ™‚訊æ¯ã€‚ + </notification> + <notification name="TransferInventoryAcrossParentEstates"> + æ”¶ç´å€ç„¡æ³•轉移到ä¸åŒçš„æ¯é ˜åœ°ã€‚ + </notification> <notification name="UnableToLoadNotecard"> 無法載入記事å¡ã€‚ è«‹å†è©¦ä¸€æ¬¡ã€‚ @@ -2169,28 +2307,28 @@ Link to this from a web page to give others easy access to this location, or try 察看腳本時發生權é™è¡çªã€‚ </notification> <notification name="UnableToLoadScript"> - 無法載入腳本。請å†è©¦ä¸€æ¬¡ã€‚ + 無法載入腳本。 è«‹å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="IncompleteInventory"> - The complete contents you are offering are not yet locally available. Please try offering those items again in a minute. + ä½ æ‰€æä¾›çš„完整內容在本地還無法å–得。 請幾分é˜å¾Œå†è©¦è‘—æä¾›é€™äº›ç‰©é …。 </notification> <notification name="CannotModifyProtectedCategories"> - You cannot modify protected categories. + ä½ ä¸èƒ½ä¿®æ”¹å—ä¿è·çš„類別。 </notification> <notification name="CannotRemoveProtectedCategories"> - You cannot remove protected categories. + ä½ ä¸èƒ½ç§»é™¤å—ä¿è·çš„類別。 </notification> <notification name="UnableToBuyWhileDownloading"> - Unable to buy while downloading object data. -Please try again. + æ£åœ¨ä¸‹è¼‰ç‰©ä»¶è³‡æ–™ï¼Œç„¡æ³•購買。 +è«‹å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="UnableToLinkWhileDownloading"> - Unable to link while downloading object data. -Please try again. + æ£åœ¨ä¸‹è¼‰ç‰©ä»¶è³‡æ–™ï¼Œç„¡æ³•è¯çµã€‚ +è«‹å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="CannotBuyObjectsFromDifferentOwners"> - You can only buy objects from one owner at a time. -Please select a single object. + ä½ ä¸€æ¬¡åªèƒ½å‘一ä½ç‰©ä¸»è³¼è²·ç‰©ä»¶ã€‚ +è«‹é¸æ“‡ä¸€å€‹å–®ä¸€ç‰©ä»¶ã€‚ </notification> <notification name="ObjectNotForSale"> 這物件ä¸å‡ºå”®ã€‚ @@ -2211,7 +2349,7 @@ Please select a single object. [NAME] è¬çµ•ä½ æä¾›çš„æ”¶ç´å€ç‰©å“。 </notification> <notification name="ObjectMessage"> - [NAME]: [MESSAGE] + [NAME]:[MESSAGE] </notification> <notification name="CallingCardAccepted"> ä½ çš„å片已被接å—。 @@ -2220,24 +2358,25 @@ Please select a single object. ä½ çš„å片已被拒絕。 </notification> <notification name="TeleportToLandmark"> - You can teleport to locations like '[NAME]' by opening the Places panel on the right side of your screen, and then select the Landmarks tab. -Click on any landmark to select it, then click 'Teleport' at the bottom of the panel. -(You can also double-click on the landmark, or right-click it and choose 'Teleport'.) + è¦çž¬é–“傳é€åˆ°ã€Œ[NAME]ã€ç‰åœ°é»žï¼Œè«‹é»žæŒ‰ã€Œåœ°é»žã€æŒ‰éˆ•, + ç„¶å¾Œåœ¨é–‹å•Ÿçš„è¦–çª—è£¡ï¼Œé¸æ“‡ã€Œåœ°æ¨™ã€é 籤。 點按任何 + åœ°æ¨™åŠ ä»¥é¸æ“‡ï¼Œå†é»žæŒ‰è¦–窗底下的「瞬間傳é€ã€æŒ‰éˆ•。 + ï¼ˆä½ é‚„å¯ä»¥ç›´æŽ¥æŒ‰å…©ä¸‹é‚£å€‹åœ°æ¨™ï¼Œæˆ–æŒ‰æ»‘é¼ å³éµï¼Œé¸æ“‡ã€Œçž¬é–“傳é€ã€ã€‚) </notification> <notification name="TeleportToPerson"> - You can contact Residents like '[NAME]' by opening the People panel on the right side of your screen. -Select the Resident from the list, then click 'IM' at the bottom of the panel. -(You can also double-click on their name in the list, or right-click and choose 'IM'). + è¦è¯çµ¡å¦‚「[NAME]ã€çš„任何一ä½å±…æ°‘ï¼Œè«‹é»žæŒ‰ã€Œäººç¾¤ã€æŒ‰éˆ•,從打開的視窗ä¸é¸æ“‡ä¸€ä½å±…民,å†é»žæŒ‰è¦–窗底下的「IMã€ã€‚ + + ï¼ˆä½ é‚„å¯ä»¥å¾žæ¸…單直接按兩下åå—ï¼Œæˆ–æŒ‰æ»‘é¼ å³éµï¼Œé¸æ“‡ã€ŒIMã€ã€‚) </notification> <notification name="CantSelectLandFromMultipleRegions"> - Can't select land across server boundaries. -Try selecting a smaller piece of land. + ç„¡æ³•é¸æ“‡è¶…出伺æœå™¨é‚Šç•Œçš„土地。 +è«‹è©¦è‘—ç¸®å°æ‰€é¸çš„土地。 </notification> <notification name="SearchWordBanned"> - Some terms in your search query were excluded due to content restrictions as clarified in the Community Standards. + æ ¹æ“šã€Œç¤¾ç¾¤æº–å‰‡ã€æ‰€æ˜Žè¨‚的內容é™åˆ¶ï¼Œå·²æŽ’é™¤ä½ æ‰€æœå°‹çš„æŸäº›å—眼。 </notification> <notification name="NoContentToSearch"> - Please select at least one type of content to search (General, Moderate, or Adult). + è«‹è‡³å°‘é¸æ“‡ä¸€ç¨®è¦æœç´¢çš„內容分級(一般普級ã€é©åº¦æˆäººã€å®Œå…¨æˆäººï¼‰ã€‚ </notification> <notification name="SystemMessage"> [MESSAGE] @@ -2248,6 +2387,9 @@ Try selecting a smaller piece of land. <notification name="PaymentSent"> [MESSAGE] </notification> + <notification name="PaymentFailure"> + [MESSAGE] + </notification> <notification name="EventNotification"> 活動通知: @@ -2259,179 +2401,205 @@ Try selecting a smaller piece of land. </form> </notification> <notification name="TransferObjectsHighlighted"> - All objects on this parcel that will transfer to the purchaser of this parcel are now highlighted. + 這地段上,所有將轉移給地段購買人的物件,ç¾å·²å‘ˆé«˜äº®é¡¯ç¤ºã€‚ -* Trees and grasses that will transfer are not highlighted. +* å³å°‡è½‰ç§»çš„æ¨¹å’Œè‰ä¸æœƒä»¥é«˜äº®é¡¯ç¤ºã€‚ <form name="form"> - <button name="Done" text="Done"/> + <button name="Done" text="完æˆ"/> </form> </notification> <notification name="DeactivatedGesturesTrigger"> - Deactivated gestures with same trigger: + 以åŒä¸€è§¸ç™¼åœç”¨çš„姿勢: [NAMES] </notification> <notification name="NoQuickTime"> - 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. + ä½ çš„ç³»çµ±ä¼¼ä¹Žæœªå®‰è£ Apple çš„ QuickTime 軟體。 +å¦‚æžœä½ è¦åœ¨æ”¯æ´ä¸²æµåª’體的地段上觀看這類媒體,請到[http://www.apple.com/quicktime QuickTime 網站]å®‰è£ QuickTime æ’æ”¾å™¨ã€‚ </notification> <notification name="NoPlugin"> - No Media Plugin was found to handle the "[MIME_TYPE]" mime type. Media of this type will be unavailable. + 找ä¸åˆ°åª’é«”æ’件來處ç†ã€Œ[MIME_TYPE]ã€mine 類型。 這類媒體將無法使用。 </notification> <notification name="MediaPluginFailed"> - The following Media Plugin has failed: + 以下的媒體æ’件失éˆï¼š [PLUGIN] -Please re-install the plugin or contact the vendor if you continue to experience problems. +å¦‚æžœä½ ç¹¼çºŒå‡ºç¾é€™ç‹€æ³ï¼Œè«‹é‡æ–°å®‰è£æ’件,或è¯çµ¡å…¶æä¾›å» 家。 <form name="form"> - <ignore name="ignore" text="A Media Plugin fails to run"/> + <ignore name="ignore" text="有一個媒體æ’件無法執行"/> </form> </notification> <notification name="OwnedObjectsReturned"> - The objects you own on the selected parcel of land have been returned back to your inventory. + ä½ åœ¨æ‰€é¸åœ°æ®µä¸Šæ‰€æ“有的物件已被é€è¿”ä½ çš„æ”¶ç´å€ã€‚ </notification> <notification name="OtherObjectsReturned"> - The objects on the selected parcel of land that is owned by [NAME] have been returned to his or her inventory. + 在所é¸åœ°æ®µä¸Šç”± [NAME] æ‰€æ“æœ‰çš„物件已被é€è¿”å…¶æ”¶ç´å€ã€‚ </notification> <notification name="OtherObjectsReturned2"> - The objects on the selected parcel of land owned by the Resident '[NAME]' have been returned to their owner. + 在所é¸åœ°æ®µä¸Šç”±å±…æ°‘ '[NAME]' æ‰€æ“æœ‰çš„物件已被é€è¿”å…¶æ”¶ç´å€ã€‚ </notification> <notification name="GroupObjectsReturned"> - 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. -Non-transferable objects that are deeded to the group have been deleted. + 在所é¸åœ°æ®µä¸Šå’Œç¾¤çµ„ '[GROUPNAME]' 分享的物件已被é€è¿”其所有人的收ç´å€ã€‚ +å¯è½‰è®“的已讓渡物件已é€è¿”給å‰ç‰©ä¸»ã€‚ +讓渡給這個群組的ä¸å¯è½‰è®“物件已被刪除。 </notification> <notification name="UnOwnedObjectsReturned"> - The objects on the selected parcel that are NOT owned by you have been returned to their owners. + 在所é¸åœ°æ®µä¸Šä¸æ˜¯ä½ æ“æœ‰çš„物件已é€è¿”給其所有人。 </notification> <notification name="ServerObjectMessage"> - Message from [NAME]: + 來自 [NAME] 的訊æ¯ï¼š <nolink>[MSG]</nolink> </notification> <notification name="NotSafe"> - This land has damage enabled. -You can be hurt here. If you die, you will be teleported to your home location. + 這塊土地å…許傷害。 +åœ¨é€™è£¡ä½ å¯èƒ½æœƒå—傷害。 ä½ å¦‚æžœæ»äº¡ï¼Œæœƒè¢«çž¬é–“傳é€å›žä½ 的家。 </notification> <notification name="NoFly"> - 這å€åŸŸé—œé–‰ä¸¦ç¦æ¢é£›è¡Œã€‚ + 這å€åŸŸç¦æ¢é£›è¡Œã€‚ ä½ ä¸èƒ½åœ¨æ¤è™•飛行。 </notification> <notification name="PushRestricted"> - This area does not allow pushing. You can't push others here unless you own the land. + 這å€åŸŸä¸å…許推撞。 除éžä½ æ“æœ‰é€™å¡ŠåœŸåœ°ï¼Œå¦å‰‡ä½ ä¸èƒ½æŽ¨æ’žåˆ¥äººã€‚ </notification> <notification name="NoVoice"> - This area has voice chat disabled. You won't be able to hear anyone talking. + 這å€åŸŸç¦æ¢èªžéŸ³èŠå¤©ã€‚ ä½ å°‡ä¸æœƒè½åˆ°ä»»ä½•人說話。 </notification> <notification name="NoBuild"> - This area has building disabled. You can't build or rez objects here. + 這å€åŸŸç¦æ¢å»ºé€ 物件。 ä½ ä¸èƒ½åœ¨æ¤å»ºé€ 或產生物件。 + </notification> + <notification name="PathfindingDirty"> + 這地å€çš„尋徑功能有所變更,待儲å˜ã€‚ å¦‚æžœä½ æœ‰å»ºè£½æ¬Šï¼Œä½ å¯ä»¥é»žæŒ‰ã€Œé‡æ–°ç”¢å‡ºåœ°å€ã€æŒ‰éˆ•釿–°ç”¢å‡ºåœ°å€ã€‚ + </notification> + <notification name="DynamicPathfindingDisabled"> + 這地å€ä¸¦æœªå•Ÿç”¨å‹•態尋徑。 使用尋徑 LSL 呼å«çš„帶腳本物件,在æ¤åœ°å€å¯èƒ½ç„¡æ³•æ£å¸¸é‹ä½œã€‚ + </notification> + <notification name="PathfindingRebakeNavmesh"> + 更改本地å€çš„æŸäº›ç‰©ä»¶å°‡å°Žè‡´å…¶ä»–ç§»å‹•ç‰©ä»¶çš„é‹ä½œç™¼ç”Ÿå•題。 è¦ä½¿ç§»å‹•物件æ£å¸¸é‹ä½œï¼Œè«‹é»žæŒ‰ã€Œé‡æ–°ç”¢å‡ºåœ°å€ã€æŒ‰éˆ•。 欲ç²çŸ¥è©³æƒ…è«‹é¸æ“‡ã€Œå¹«åŠ©ã€ã€‚ + <url name="url"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </url> + <usetemplate helptext="幫助" ignoretext="更改本地å€çš„æŸäº›ç‰©ä»¶å°‡å°Žè‡´å…¶ä»–ç§»å‹•ç‰©ä»¶çš„é‹ä½œç™¼ç”Ÿå•題。" name="okhelpignore" yestext="確定"/> + </notification> + <notification name="PathfindingCannotRebakeNavmesh"> + 發生錯誤。 å•題å¯èƒ½å‡ºåœ¨ç¶²è·¯æˆ–伺æœå™¨ï¼Œä¹Ÿå¯èƒ½å› ç‚ºä½ ç„¡æ¬Šå»ºè£½ç‰©ä»¶ã€‚ 有時,åªè¦ç™»å‡ºå†ç™»å…¥å³èƒ½è§£æ±ºé€™é¡žå•題。 + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="SeeAvatars"> + 本地段隱è—其內的化身和èŠå¤©æ–‡å—,其他地段看ä¸åˆ°ã€‚ ä½ çœ‹ä¸è¦‹åœ°æ®µå¤–的居民,他們也看ä¸è¦‹ä½ 。 é »é“ 0 çš„èŠå¤©æ–‡å—也被å°éŽ–ã€‚ </notification> <notification name="ScriptsStopped"> - An administrator has temporarily stopped scripts in this region. + æŸç®¡ç†å“¡å·²æš«æ™‚åœæ¢å€åŸŸè£¡çš„腳本。 </notification> <notification name="ScriptsNotRunning"> - This region is not running any scripts. + 這å€åŸŸæ²’有執行任何腳本。 </notification> <notification name="NoOutsideScripts"> - This land has outside scripts disabled. + 這塊土地ç¦ç”¨å¤–來腳本。 -No scripts will work here except those belonging to the land owner. +åªæœ‰å±¬æ–¼åœŸåœ°æ‰€æœ‰äººçš„腳本在æ¤å¯ä»¥æ£å¸¸åŸ·è¡Œã€‚ </notification> <notification name="ClaimPublicLand"> - You can only claim public land in the Region you're in. + ä½ åªèƒ½åœ¨ä½ 所處的å€åŸŸæ”¶å–公共土地。 </notification> <notification name="RegionTPAccessBlocked"> - 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. - -Please go to the Knowledge Base for details on accessing areas with this maturity Rating. + ä½ æ‰€æ¬²å‰å¾€çš„地å€å«æœ‰è¶…éŽä½ ç›®å‰å好的分級的內容。 ä½ å¯ä»¥åˆ°ã€Œæˆ‘自己 > å好è¨å®š > 一般è¨å®šã€è®Šæ›´ä½ çš„å好è¨å®šã€‚ </notification> <notification name="URBannedFromRegion"> - You are banned from the region. + 這個å€åŸŸç¦æ¢ä½ 進入。 </notification> <notification name="NoTeenGridAccess"> - Your account cannot connect to this teen grid region. + ä½ çš„å¸³æˆ¶ä¸å¯é€£æŽ¥åˆ°é€™å€‹é’å°‘å¹´ç¶²æ ¼å€åŸŸã€‚ </notification> <notification name="ImproperPaymentStatus"> - You do not have proper payment status to enter this region. + ä½ æ²’æœ‰é©ç•¶çš„付款狀態,ä¸èƒ½é€²å…¥é€™å€åŸŸã€‚ </notification> - <notification name="MustGetAgeRgion"> - ä½ å¿…é ˆé€šéŽå¹´é½¡èªè‰ä»¥é€²å…¥é€™åœ°å€ã€‚ + <notification name="MustGetAgeRegion"> + ä½ å¿…é ˆå¹´æ»¿ 18 æ²æ‰å¯é€²å…¥é€™åœ°å€ã€‚ </notification> <notification name="MustGetAgeParcel"> - ä½ å¿…é ˆé€šéŽå¹´é½¡é©—è‰ä»¥é€²å…¥é€™åœ°æ®µã€‚ + ä½ å¿…é ˆå¹´æ»¿ 18 æ²æ‰å¯é€²å…¥é€™åœ°æ®µã€‚ </notification> <notification name="NoDestRegion"> - 無目的地地å€ç™¼ç¾ã€‚ + 找ä¸åˆ°ç›®çš„地地å€ã€‚ </notification> <notification name="NotAllowedInDest"> - You are not allowed into the destination. + ä½ ä¸å‡†å‰å¾€ç›®çš„地。 </notification> <notification name="RegionParcelBan"> - Cannot region cross into banned parcel. Try another way. + 無法跨出地å€é€²å…¥ç¦æ¢ä½ 的地段。 è«‹æ›ä¸€å€‹æ–¹å¼ã€‚ </notification> <notification name="TelehubRedirect"> - You have been redirected to a telehub. + ä½ å·²è¢«é‡æ–°å°Žå¾€ä¸€å€‹çž¬é–“傳é€ä¸å¿ƒã€‚ </notification> <notification name="CouldntTPCloser"> - Could not teleport closer to destination. + 無法瞬間傳é€åˆ°æ›´æŽ¥è¿‘目的地的地點。 </notification> <notification name="TPCancelled"> 瞬間傳é€å·²å–消。 </notification> <notification name="FullRegionTryAgain"> - The region you are attempting to enter is currently full. -Please try again in a few moments. + ä½ è©¦åœ–é€²å…¥çš„åœ°å€ç›®å‰äººæ»¿ã€‚ +è«‹ç¨å¾…一會兒å†è©¦ã€‚ </notification> <notification name="GeneralFailure"> 一般故障。 </notification> <notification name="RoutedWrongRegion"> - 路由導å‘到錯誤地å€ã€‚è«‹å†è©¦ä¸€æ¬¡ã€‚ + 被繞往錯誤的地å€ã€‚ è«‹å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="NoValidAgentID"> - No valid agent id. + 沒有有效的化身編號。 </notification> <notification name="NoValidSession"> - No valid session id. + 沒有有效的時域編號。 </notification> <notification name="NoValidCircuit"> - No valid circuit code. + 沒有有效的線路碼。 </notification> <notification name="NoValidTimestamp"> - No valid timestamp. + 沒有有效的時間戳記。 </notification> <notification name="NoPendingConnection"> - Unable to create pending connection. + 無法建立待通的連線。 </notification> <notification name="InternalUsherError"> - Internal error attempting to connect agent usher. + 試圖連接用戶引導時發生內部錯誤。 </notification> <notification name="NoGoodTPDestination"> - Unable to find a good teleport destination in this region. + åœ¨é€™åœ°å€æ‰¾ä¸åˆ°åˆé©çš„瞬間傳é€ç›®çš„地。 </notification> <notification name="InternalErrorRegionResolver"> - Internal error attempting to activate region resolver. + 試圖啟動å€åŸŸè§£æžå™¨æ™‚發生內部錯誤。 </notification> <notification name="NoValidLanding"> - A valid landing point could not be found. + 找ä¸åˆ°æœ‰æ•ˆçš„登陸地點。 </notification> <notification name="NoValidParcel"> - No valid parcel could be found. + 找ä¸åˆ°æœ‰æ•ˆçš„地段。 </notification> <notification name="ObjectGiveItem"> - An object named <nolink>[OBJECTFROMNAME]</nolink> owned by [NAME_SLURL] has given you this [OBJECTTYPE]: -[ITEM_SLURL] + å為 <nolink>[OBJECTFROMNAME]</nolink>ã€ç”± [NAME_SLURL] æ“æœ‰çš„ç‰©ä»¶çµ¦äº†ä½ é€™å€‹ [OBJECTTYPE]: +<nolink>[ITEM_SLURL]</nolink> + <form name="form"> + <button name="Keep" text="ä¿ç•™"/> + <button name="Discard" text="丟棄"/> + <button name="Mute" text="å°éŽ–æ‰€æœ‰äºº"/> + </form> + </notification> + <notification name="OwnObjectGiveItem"> + ä½ å為 <nolink>[OBJECTFROMNAME]</nolink> çš„ç‰©ä»¶çµ¦äº†ä½ é€™å€‹ [OBJECTTYPE]: +<nolink>[ITEM_SLURL]</nolink> <form name="form"> - <button name="Keep" text="Keep"/> - <button name="Discard" text="Discard"/> - <button name="Mute" text="Block"/> + <button name="Keep" text="ä¿ç•™"/> + <button name="Discard" text="丟棄"/> </form> </notification> <notification name="UserGiveItem"> - [NAME_SLURL] has given you this [OBJECTTYPE]: + [NAME_SLURL] çµ¦äº†ä½ é€™å€‹ [OBJECTTYPE]: [ITEM_SLURL] <form name="form"> - <button name="Show" text="Show"/> - <button name="Discard" text="Discard"/> - <button name="Mute" text="Block"/> + <button name="Show" text="顯示"/> + <button name="Discard" text="丟棄"/> + <button name="Mute" text="å°éŽ–"/> </form> </notification> <notification name="GodMessage"> @@ -2448,16 +2616,37 @@ Please try again in a few moments. </form> </notification> <notification name="TeleportOffered"> - [NAME_SLURL] has offered to teleport you to their location: + [NAME_SLURL] 想è¦çž¬é–“傳é€ä½ 到他的地點: -[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] <form name="form"> <button name="Teleport" text="瞬間傳é€"/> <button name="Cancel" text="å–æ¶ˆ"/> </form> </notification> + <notification name="TeleportOffered_MaturityExceeded"> + [NAME_SLURL] 想è¦çž¬é–“傳é€ä½ 到他的地點: + +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +æ¤åœ°å€åŒ…å« [REGION_CONTENT_MATURITY] çš„åˆ†ç´šå…§å®¹ï¼Œå¯æ˜¯ä½ ç›®å‰çš„å好è¨å®šæŽ’除了 [REGION_CONTENT_MATURITY] 的分級內容。 我們å¯ä»¥è®Šæ›´ä½ çš„å好è¨å®šå¥½è®“ä½ ç¹¼çºŒçž¬é–“å‚³é€ï¼Œä½ 也å¯å–消這動作。 + <form name="form"> + <button name="Teleport" text="變更後繼續"/> + <button name="Cancel" text="å–æ¶ˆ"/> + </form> + </notification> + <notification name="TeleportOffered_MaturityBlocked"> + [NAME_SLURL] 想è¦çž¬é–“傳é€ä½ 到他的地點: + +“[MESSAGE]†+<icon>[MATURITY_ICON]</icon> - [MATURITY_STR] + +坿˜¯ï¼Œæ¤åœ°å€å«æœ‰åƒ…陿ˆäººçš„內容。 + </notification> <notification name="TeleportOfferSent"> - Teleport offer sent to [TO_NAME] + å·²å‘ [TO_NAME] 發出瞬間傳é€é‚€è«‹ </notification> <notification name="GotoURL"> [MESSAGE] @@ -2468,33 +2657,33 @@ Please try again in a few moments. </form> </notification> <notification name="OfferFriendship"> - [NAME_SLURL] is offering friendship. + [NAME_SLURL] 想æˆç‚ºä½ 的朋å‹ã€‚ [MESSAGE] -(By default, you will be able to see each other's online status.) +ï¼ˆæ ¹æ“šé è¨è¨å®šï¼Œä½ 們將å¯çœ‹åˆ°å½¼æ¤çš„線上狀態。) <form name="form"> <button name="Accept" text="接å—"/> <button name="Decline" text="è¬çµ•"/> </form> </notification> <notification name="FriendshipOffered"> - You have offered friendship to [TO_NAME] + 已經邀請 [TO_NAME] æˆç‚ºæœ‹å‹ </notification> <notification name="OfferFriendshipNoMessage"> - [NAME_SLURL] is offering friendship. + [NAME_SLURL] 想æˆç‚ºä½ 的朋å‹ã€‚ -(By default, you will be able to see each other's online status.) +ï¼ˆæ ¹æ“šé è¨è¨å®šï¼Œä½ 們將å¯çœ‹åˆ°å½¼æ¤çš„線上狀態。) <form name="form"> <button name="Accept" text="接å—"/> <button name="Decline" text="è¬çµ•"/> </form> </notification> <notification name="FriendshipAccepted"> - <nolink>[NAME]</nolink> accepted your friendship offer. + <nolink>[NAME]</nolink> 接å—äº†ä½ çš„äº¤å‹é‚€è«‹ã€‚ </notification> <notification name="FriendshipDeclined"> - <nolink>[NAME]</nolink> è¬çµ•ä½ çš„äº¤å‹é‚€è«‹ã€‚ + <nolink>[NAME]</nolink> å©‰æ‹’äº†ä½ çš„äº¤å‹é‚€è«‹ã€‚ </notification> <notification name="FriendshipAcceptedByMe"> 交å‹é‚€è«‹è¢«æŽ¥å—。 @@ -2503,208 +2692,206 @@ Please try again in a few moments. 交å‹é‚€è«‹è¢«è¬çµ•。 </notification> <notification name="OfferCallingCard"> - [NAME] is offering their calling card. -This will add a bookmark in your inventory so you can quickly IM this Resident. + [NAME] é€çµ¦ä½ ä»–çš„å片。 +é€™å°‡åœ¨ä½ çš„æ”¶ç´å€æ–°å¢žä¸€å€‹æ›¸ç±¤ï¼Œæ–¹ä¾¿ä½ 和這ä½å±…æ°‘äº’å‚³å³æ™‚訊æ¯ã€‚ <form name="form"> <button name="Accept" text="接å—"/> <button name="Decline" text="è¬çµ•"/> </form> </notification> <notification name="RegionRestartMinutes"> - This region will restart in [MINUTES] minutes. -If you stay in this region you will be logged out. + 本地å€å°‡åœ¨ [MINUTES] 分é˜å¾Œé‡æ–°å•Ÿå‹•。 +å¦‚æžœä½ ç¹¼çºŒç•™åœ¨é€™åœ°å€ï¼Œä½ 將會被登出。 </notification> <notification name="RegionRestartSeconds"> - This region will restart in [SECONDS] seconds. -If you stay in this region you will be logged out. + 本地å€å°‡åœ¨ [SECONDS] ç§’å¾Œé‡æ–°å•Ÿå‹•。 +å¦‚æžœä½ ç¹¼çºŒç•™åœ¨é€™åœ°å€ï¼Œä½ 將會被登出。 </notification> <notification name="LoadWebPage"> 載入網é [URL]? [MESSAGE] -From object: <nolink>[OBJECTNAME]</nolink>, owner: [NAME]? +來æºç‰©ä»¶ï¼š<nolink>[OBJECTNAME]</nolink>(所有人是 [NAME])? <form name="form"> <button name="Gotopage" text="å‰å¾€é é¢"/> <button name="Cancel" text="å–æ¶ˆ"/> </form> </notification> <notification name="FailedToFindWearableUnnamed"> - Failed to find [TYPE] in database. + 資料庫找ä¸åˆ° [TYPE]。 </notification> <notification name="FailedToFindWearable"> - Failed to find [TYPE] named [DESC] in database. + 資料庫找ä¸åˆ°å為 [DESC] çš„ [TYPE]。 </notification> <notification name="InvalidWearable"> - 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. + ä½ æƒ³è¦ç©¿è‘—çš„ç‰©é …å¸¶æœ‰ä¸€å€‹ä¸æ˜¯ä½ ç›®å‰ Viewer ç‰ˆæœ¬èƒ½å¤ è®€å–的特性。 è«‹æ›´æ–°ä½ çš„ [APP_NAME] 版本å†ç©¿è‘—è©²ç‰©é …ã€‚ </notification> <notification name="ScriptQuestion"> - '<nolink>[OBJECTNAME]</nolink>', an object owned by '[NAME]', would like to: + '<nolink>[OBJECTNAME]</nolink>',一個由 '[NAME]' æ“æœ‰çš„物件,想è¦ï¼š [QUESTIONS] -Is this OK? +是å¦åŒæ„? <form name="form"> <button name="Yes" text="是"/> <button name="No" text="å¦"/> - <button name="Mute" text="Block"/> + <button name="Mute" text="å°éŽ–"/> </form> </notification> <notification name="ScriptQuestionCaution"> - An object named '<nolink>[OBJECTNAME]</nolink>', owned by '[NAME]' would like to: - -[QUESTIONS] -If you do not trust this object and its creator, you should deny the request. - -Grant this request? + è¦å‘Šï¼šç‰©ä»¶ '<nolink>[OBJECTNAME]</nolink>' è¦æ±‚全權å˜å–ä½ çš„æž—ç™»å¹£å¸³æˆ¶ã€‚ ä½ å¦‚æžœå…許å˜å–帳戶,它將å¯åœ¨ä»»ä½•æ™‚å€™å¾žä½ å¸³æˆ¶å–èµ°è³‡é‡‘ï¼Œæˆ–å®Œå…¨åŠ ä»¥æ¸…ç©ºï¼Œæˆ–å®šæœŸå–èµ°éƒ¨åˆ†è³‡é‡‘ï¼Œä¸”ä¸æœƒç™¼å‡ºè¦å‘Šã€‚ + +這很å¯èƒ½æ˜¯ç¨®ä¸ç•¶çš„è¦æ±‚。 å¦‚æžœä½ ä¸å®Œå…¨çžè§£å®ƒç‚ºä½•è¦æ±‚å˜å–ä½ çš„å¸³æˆ¶ï¼Œè«‹å‹¿å…准。 <form name="form"> - <button name="Grant" text="Grant"/> - <button name="Deny" text="Deny"/> - <button name="Details" text="細節..."/> + <button name="Grant" text="å…許全權å˜å–"/> + <button name="Deny" text="拒絕"/> </form> </notification> <notification name="ScriptDialog"> - [NAME]'s '<nolink>[TITLE]</nolink>' + [NAME] çš„ '<nolink>[TITLE]</nolink>' [MESSAGE] <form name="form"> - <button name="Ignore" text="忽視"/> + <button name="Client_Side_Mute" text="å°éŽ–"/> + <button name="Client_Side_Ignore" text="忽視"/> </form> </notification> <notification name="ScriptDialogGroup"> - [GROUPNAME]'s '<nolink>[TITLE]</nolink>' + [GROUPNAME] çš„ '<nolink>[TITLE]</nolink>' [MESSAGE] <form name="form"> - <button name="Ignore" text="忽視"/> + <button name="Client_Side_Mute" text="å°éŽ–"/> + <button name="Client_Side_Ignore" text="忽視"/> </form> </notification> <notification name="BuyLindenDollarSuccess"> - Thank you for your payment! + 感è¬ä½ ä»˜æ¬¾ï¼ -Your L$ balance will be updated when processing completes. If processing takes more than 20 mins, your transaction may be cancelled. In that case, the purchase amount will be credited to your US$ balance. +處ç†å®Œæˆå¾Œï¼Œä½ çš„ L$ 餘é¡å°‡æœƒæ›´æ–°ã€‚ 如果處ç†éŽç¨‹è¶…éŽ 20 分é˜ï¼Œä½ 的交易å¯èƒ½è¢«å–消。 在這狀æ³ä¸‹ï¼Œè³¼è²·é‡‘é¡å°‡é€€å›žçµ¦ä½ çš„ US$ 餘é¡ã€‚ -The status of your payment can be checked on your Transaction History page on your [http://secondlife.com/account/ Dashboard] +ä½ å¯ä»¥åˆ°ä½ çš„[http://secondlife.com/account/ 塗鴉牆]上的交易æ·å²è¨˜éŒ„é é¢ï¼Œå¯Ÿçœ‹ä»˜æ¬¾ç‹€æ…‹ã€‚ </notification> <notification name="FirstOverrideKeys"> - Your movement keys are now being handled by an object. -Try the arrow keys or AWSD to see what they do. -Some objects (like guns) require you to go into mouselook to use them. -Press 'M' to do this. + ä½ çš„æ–¹å‘éµç¾åœ¨ç”±ä¸€å€‹ç‰©ä»¶ä¸»æŽ§ã€‚ +請試試方å‘鵿ˆ– AWSD éµçœ‹æœ‰ä»€éº¼å應。 +æœ‰äº›ç‰©ä»¶ï¼ˆä¾‹å¦‚æ§æžï¼‰éœ€è¦ä½ åˆ‡æ›æˆç¬¬ä¸€äººç¨±è¦–è§’æ‰æœ‰ä½œç”¨ã€‚ +請按 M éµåšåˆ‡æ›ã€‚ </notification> <notification name="FirstSandbox"> - This is a sandbox area, and is meant to help Residents learn how to build. + 這個一個沙盤å€ï¼Œæ—¨åœ¨å¹«åŠ©å±…æ°‘å¸ç¿’如何建製物件。 -Things you build here will be deleted after you leave, so don't forget to right-click and choose 'Take' to move your creation to your Inventory. +ä½ åœ¨é€™è£¡å»ºè£½çš„ç‰©ä»¶ï¼Œåœ¨ä½ é›¢é–‹å¾Œå°‡è¢«åˆªé™¤ã€‚åˆ¥å¿˜äº†æŒ‰æ»‘é¼ å³éµï¼Œé¸æ“‡ã€Œæ‹¿å–ã€ï¼Œå°‡ä½ 的建製物é€åˆ°ä½ 的收ç´å€ã€‚ </notification> <notification name="MaxListSelectMessage"> - You may only select up to [MAX_SELECT] items from this list. + ä½ æœ€å¤šåªèƒ½å¾žé€™æ¸…å–®ä¸é¸å– [MAX_SELECT] å€‹ç‰©é …ã€‚ </notification> <notification name="VoiceInviteP2P"> - [NAME] is inviting you to a Voice Chat call. -Click Accept to join the call or Decline to decline the invitation. Click Block to block this caller. + [NAME] æ£é‚€è«‹ä½ åŠ å…¥èªžéŸ³èŠå¤©ã€‚ +點按「接å—ã€åŠ å…¥é€šè©±ï¼Œæˆ–ã€Œè¬çµ•ã€é‚€è«‹ã€‚ 點按「å°éŽ–ã€ä¾¿å¯å°éŽ–é€™å€‹ç™¼è©±äººã€‚ <form name="form"> <button name="Accept" text="接å—"/> <button name="Decline" text="è¬çµ•"/> - <button name="Mute" text="Block"/> + <button name="Mute" text="å°éŽ–"/> </form> </notification> <notification name="AutoUnmuteByIM"> - [NAME] was sent an instant message and has been automatically unblocked. + [NAME] å·²æ”¶åˆ°ä¸€å‰‡å³æ™‚訊æ¯ï¼Œä¸¦å·²è¢«è‡ªå‹•解除å°éŽ–ã€‚ </notification> <notification name="AutoUnmuteByMoney"> - [NAME] was given money and has been automatically unblocked. + [NAME] 已收到錢,並已被自動解除å°éŽ–ã€‚ </notification> <notification name="AutoUnmuteByInventory"> - [NAME] was offered inventory and has been automatically unblocked. + [NAME] å·²å¾—çŸ¥ä½ è¦è´ˆé€æ”¶ç´ç‰©ä»¶ï¼Œä¸¦å·²è¢«è‡ªå‹•解除å°éŽ–ã€‚ </notification> <notification name="VoiceInviteGroup"> - [NAME] has joined a Voice Chat call with the group [GROUP]. -Click Accept to join the call or Decline to decline the invitation. Click Block to block this caller. + [NAME] å·²åŠ å…¥å’Œç¾¤çµ„ [GROUP] 的語音èŠå¤©é€šè©±ã€‚ +點按「接å—ã€åŠ å…¥é€šè©±ï¼Œæˆ–ã€Œè¬çµ•ã€é‚€è«‹ã€‚ 點按「å°éŽ–ã€ä¾¿å¯å°éŽ–é€™å€‹ç™¼è©±äººã€‚ <form name="form"> <button name="Accept" text="接å—"/> <button name="Decline" text="è¬çµ•"/> - <button name="Mute" text="Block"/> + <button name="Mute" text="å°éŽ–"/> </form> </notification> <notification name="VoiceInviteAdHoc"> - [NAME] has joined a voice chat call with a conference chat. -Click Accept to join the call or Decline to decline the invitation. Click Block to block this caller. + [NAME] å·²åŠ å…¥å¤šæ–¹èªžéŸ³é€šè©±ã€‚ +點按「接å—ã€åŠ å…¥é€šè©±ï¼Œæˆ–ã€Œè¬çµ•ã€é‚€è«‹ã€‚ 點按「å°éŽ–ã€ä¾¿å¯å°éŽ–é€™å€‹ç™¼è©±äººã€‚ <form name="form"> <button name="Accept" text="接å—"/> <button name="Decline" text="è¬çµ•"/> - <button name="Mute" text="Block"/> + <button name="Mute" text="å°éŽ–"/> </form> </notification> <notification name="InviteAdHoc"> - [NAME] is inviting you to a conference chat. -Click Accept to join the chat or Decline to decline the invitation. Click Block to block this caller. + [NAME] æ£é‚€è«‹ä½ åŠ å…¥å¤šæ–¹é€šè©±ã€‚ +點按「接å—ã€åŠ å…¥é€šè©±ï¼Œæˆ–ã€Œè¬çµ•ã€é‚€è«‹ã€‚ 點按「å°éŽ–ã€ä¾¿å¯å°éŽ–é€™å€‹ç™¼è©±äººã€‚ <form name="form"> <button name="Accept" text="接å—"/> <button name="Decline" text="è¬çµ•"/> - <button name="Mute" text="Block"/> + <button name="Mute" text="å°éŽ–"/> </form> </notification> <notification name="VoiceChannelFull"> - The voice call you are trying to join, [VOICE_CHANNEL_NAME], has reached maximum capacity. Please try again later. + ä½ è©¦åœ–åŠ å…¥ [VOICE_CHANNEL_NAME] 語音通話,ä¸éŽå®ƒå·²é”è² è¼‰ä¸Šé™ã€‚ è«‹ç¨å€™å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="ProximalVoiceChannelFull"> - We're sorry. This area has reached maximum capacity for voice conversations. Please try to use voice in another area. + 很抱æ‰ã€‚ 這å€åŸŸå·²é”èªžéŸ³é€šè©±çš„è² è¼‰ä¸Šé™ã€‚ 請到å¦ä¸€å€‹å€åŸŸä½¿ç”¨èªžéŸ³ã€‚ </notification> <notification name="VoiceChannelDisconnected"> - You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnected to Nearby Voice Chat. + ä½ çš„ [VOICE_CHANNEL_NAME] é€šè©±å·²ç¶“ä¸æ–·ã€‚ ç¾åœ¨ä½ 將釿–°é€£é€šåˆ°é™„近的語音èŠå¤©ã€‚ </notification> <notification name="VoiceChannelDisconnectedP2P"> - [VOICE_CHANNEL_NAME] has ended the call. You will now be reconnected to Nearby Voice Chat. + [VOICE_CHANNEL_NAME] èªžéŸ³é€šè©±å·²çµæŸã€‚ ç¾åœ¨ä½ 將釿–°é€£é€šåˆ°é™„近的語音èŠå¤©ã€‚ </notification> <notification name="P2PCallDeclined"> - [VOICE_CHANNEL_NAME] has declined your call. You will now be reconnected to Nearby Voice Chat. + [VOICE_CHANNEL_NAME] æ‹’çµ•ä½ åŠ å…¥èªžéŸ³é€šè©±ã€‚ ç¾åœ¨ä½ 將釿–°é€£é€šåˆ°é™„近的語音èŠå¤©ã€‚ </notification> <notification name="P2PCallNoAnswer"> - [VOICE_CHANNEL_NAME] is not available to take your call. You will now be reconnected to Nearby Voice Chat. + [VOICE_CHANNEL_NAME] ç„¡æ³•æŽ¥é€šä½ çš„é€šè©±ã€‚ ç¾åœ¨ä½ 將釿–°é€£é€šåˆ°é™„近的語音èŠå¤©ã€‚ </notification> <notification name="VoiceChannelJoinFailed"> - Failed to connect to [VOICE_CHANNEL_NAME], please try again later. You will now be reconnected to Nearby Voice Chat. + 無法連通 [VOICE_CHANNEL_NAME],,請ç¨å€™å†è©¦ã€‚ ç¾åœ¨ä½ 將釿–°é€£é€šåˆ°é™„近的語音èŠå¤©ã€‚ </notification> <notification name="VoiceLoginRetry"> - We are creating a voice channel for you. This may take up to one minute. + 我們æ£ç‚ºä½ å»ºç«‹èªžéŸ³é »é“。 這至多å¯èƒ½éœ€æ™‚一分é˜ã€‚ </notification> <notification name="VoiceEffectsExpired"> - One or more of your subscribed Voice Morphs has expired. -[[URL] Click here] to renew your subscription. + è‡³å°‘ä¸€å€‹ä½ è¨‚ç”¨çš„è®Šè²æ•ˆæžœå·²ç¶“éŽæœŸã€‚ +[[URL] 點按這裡] 繼續訂用。 </notification> <notification name="VoiceEffectsExpiredInUse"> - The active Voice Morph has expired, your normal voice settings have been applied. -[[URL] Click here] to renew your subscription. + 使用ä¸çš„è®Šè²æ•ˆæžœå·²ç¶“éŽæœŸï¼Œå·²ç”¨ä½ 平時的è²éŸ³è¨å®šå–代。 +[[URL] 點按這裡] 繼續訂用。 </notification> <notification name="VoiceEffectsWillExpire"> - One or more of your Voice Morphs will expire in less than [INTERVAL] days. -[[URL] Click here] to renew your subscription. + è‡³å°‘ä¸€å€‹ä½ è¨‚ç”¨çš„è®Šè²æ•ˆæžœå°‡åœ¨ [INTERVAL] 天後到期。 +[[URL] 點按這裡] 繼續訂用。 </notification> <notification name="VoiceEffectsNew"> - New Voice Morphs are available! + æ–°çš„è®Šè²æ•ˆæžœä¸Šå¸‚äº†ï¼ </notification> <notification name="Cannot enter parcel: not a group member"> - Only members of a certain group can visit this area. + åªæœ‰æŸç‰¹å®šç¾¤çµ„çš„æˆå“¡æ‰èƒ½é€²å…¥é€™å€åŸŸã€‚ </notification> <notification name="Cannot enter parcel: banned"> - Cannot enter parcel, you have been banned. + ä½ å·²è¢«ç¦å…¥ï¼Œå› æ¤ç„¡æ³•進入這地段。 </notification> <notification name="Cannot enter parcel: not on access list"> - Cannot enter parcel, you are not on the access list. + ç„¡æ³•é€²å…¥é€™åœ°æ®µï¼Œä½ ä¸åœ¨å‡ºå…¥è¨±å¯åå–®ä¸ã€‚ </notification> <notification name="VoiceNotAllowed"> - You do not have permission to connect to voice chat for [VOICE_CHANNEL_NAME]. + ä½ ç„¡æ¬Šé€£é€š [VOICE_CHANNEL_NAME] 語音èŠå¤©ã€‚ </notification> <notification name="VoiceCallGenericError"> - An error has occurred while trying to connect to voice chat for [VOICE_CHANNEL_NAME]. Please try again later. + 試圖連通 [VOICE_CHANNEL_NAME] 語音èŠå¤©æ™‚發生錯誤。 è«‹ç¨å€™å†è©¦ä¸€æ¬¡ã€‚ </notification> <notification name="UnsupportedCommandSLURL"> - ä½ æ‰€é»žæ“Šçš„ SLurl ä½ç½®ä¸¦ä¸è¢«æ”¯æ´ã€‚ + ä½ æ‰€é»žæŒ‰çš„ SLurl ä½ç½®ä¸¦ä¸è¢«æ”¯æ´ã€‚ </notification> <notification name="BlockedSLURL"> - A SLurl was received from an untrusted browser and has been blocked for your security. + 從未被信任的ç€è¦½å™¨æŽ¥æ”¶åˆ°ä¸€å€‹ SLurlï¼Œç‚ºäº†ä½ çš„å®‰å…¨èµ·è¦‹ï¼Œå·²å°‡å®ƒå°éŽ–ã€‚ </notification> <notification name="ThrottledSLURL"> - Multiple SLurls were received from an untrusted browser within a short period. -They will be blocked for a few seconds for your security. + çŸæ™‚間內從一個ä¸è¢«ä¿¡ä»»çš„ç€è¦½å™¨æŽ¥æ”¶åˆ°å¤šå€‹ SLurl。 +ç‚ºäº†ä½ çš„å®‰å…¨èµ·è¦‹ï¼Œå®ƒå€‘å°‡è¢«å°éŽ–å¹¾ç§’é˜ã€‚ </notification> <notification name="IMToast"> [MESSAGE] @@ -2713,45 +2900,72 @@ They will be blocked for a few seconds for your security. </form> </notification> <notification name="ConfirmCloseAll"> - ä½ ç¢ºå®šè¦é—œé–‰å…¨éƒ¨ IMs å°è©±è¦–窗? + ä½ ç¢ºå®šè¦é—œé–‰æ‰€æœ‰çš„ IM? <usetemplate ignoretext="在我關閉全部的 IMs å°è©±è¦–窗å‰ç¢ºèªã€‚" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="AttachmentSaved"> 附件已儲å˜ã€‚ </notification> <notification name="UnableToFindHelpTopic"> - Unable to find the help topic for this element. + 找ä¸åˆ°é€™å€‹å…ƒä»¶çš„幫助主題。 </notification> <notification name="ObjectMediaFailure"> - Server Error: Media update or get failed. + 伺æœå™¨éŒ¯èª¤ï¼šåª’體更新或å–得失敗。 '[ERROR]' <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="TextChatIsMutedByModerator"> - Your text chat has been muted by moderator. + 主æŒäººå·²è¨å®šå¿½ç•¥ä½ 的文å—èŠå¤©å…§å®¹ã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="VoiceIsMutedByModerator"> - Your voice has been muted by moderator. + 主æŒäººå·²å°‡ä½ 的語音消音。 <usetemplate name="okbutton" yestext="確定"/> </notification> + <notification name="UploadCostConfirmation"> + 上傳將花費 L$[PRICE],是å¦ç¹¼çºŒï¼Ÿ + <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="上傳"/> + </notification> <notification name="ConfirmClearTeleportHistory"> - Are you sure you want to delete your teleport history? + ç¢ºå®šæ¸…é™¤ä½ çš„çž¬é–“å‚³é€æ·å²è¨˜éŒ„? <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification name="BottomTrayButtonCanNotBeShown"> - Selected button can not be shown right now. -The button will be shown when there is enough space for it. + æ‰€é¸æŒ‰éˆ•ç›®å‰ç„¡æ³•顯示。 +ç‰åˆ°ç©ºé–“è¶³å¤ ï¼ŒæŒ‰éˆ•å°‡æœƒé¡¯ç¤ºå‡ºä¾†ã€‚ </notification> <notification name="ShareNotification"> - Select residents to share with. + é¸å–è¦åˆ†äº«çš„居民。 + </notification> + <notification name="MeshUploadError"> + [LABEL] 上傳失敗:[MESSAGE] [IDENTIFIER] + +詳見記錄檔。 + </notification> + <notification name="MeshUploadPermError"> + 請求網é¢ä¸Šå‚³æ¬Šé™æ™‚出錯。 + </notification> + <notification name="RegionCapabilityRequestError"> + 無法å–得地å€èƒ½åŠ› '[CAPABILITY]'。 </notification> <notification name="ShareItemsConfirmation"> - Are you sure you want to share the following items: + è«‹ç¢ºå®šä½ è¦å’Œå±…æ°‘åˆ†äº«é€™äº›ç‰©é …ï¼š + +<nolink>[ITEMS]</nolink> + +居民: + +[RESIDENTS] + <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> + </notification> + <notification name="ShareFolderConfirmation"> + 一次åªèƒ½åˆ†äº«ä¸€å€‹è³‡æ–™å¤¾ã€‚ + +è«‹ç¢ºå®šä½ è¦å’Œå±…æ°‘åˆ†äº«é€™äº›ç‰©é …ï¼š <nolink>[ITEMS]</nolink> -With the following Residents: +居民: [RESIDENTS] <usetemplate name="okcancelbuttons" notext="å–æ¶ˆ" yestext="確定"/> @@ -2762,117 +2976,140 @@ With the following Residents: <notification name="DeedToGroupFail"> 讓渡給群組失敗。 </notification> + <notification name="ReleaseLandThrottled"> + ç›®å‰ç„¡æ³•éºæ£„ [PARCEL_NAME] 地段。 + </notification> + <notification name="ReleasedLandWithReclaim"> + [AREA] 平方公尺的地段「[PARCEL_NAME]ã€å·²é‡‹å‡ºã€‚ + +ä½ é ˆåœ¨ [RECLAIM_PERIOD] å°æ™‚å…§é ˜å›žï¼ˆèŠ±è²» L$0),å¦å‰‡å°‡é–‹æ”¾å‡ºå”®çµ¦ä»»ä½•人。 + </notification> + <notification name="ReleasedLandNoReclaim"> + [AREA] 平方公尺的地段「[PARCEL_NAME]ã€å·²é‡‹å‡ºã€‚ + +ç¾å·²é–‹æ”¾å‡ºå”®çµ¦ä»»ä½•人。 + </notification> <notification name="AvatarRezNotification"> - ( [EXISTENCE] seconds alive ) -Avatar '[NAME]' declouded after [TIME] seconds. + (å˜çºŒ [EXISTENCE] ç§’é˜ï¼‰ +化身 '[NAME]' 在 [TIME] 秒內完全呈ç¾ã€‚ </notification> <notification name="AvatarRezSelfBakedDoneNotification"> - ( [EXISTENCE] seconds alive ) -You finished baking your outfit after [TIME] seconds. + (å˜çºŒ [EXISTENCE] ç§’é˜ï¼‰ +ä½ çš„è£æ‰®åœ¨ [TIME] 秒內定貌。 </notification> <notification name="AvatarRezSelfBakedUpdateNotification"> - ( [EXISTENCE] seconds alive ) -You sent out an update of your appearance after [TIME] seconds. + (å˜çºŒ [EXISTENCE] ç§’é˜ï¼‰ +ä½ åœ¨ [TIME] 秒後é€å‡ºæ›´æ–°å¤–觀請求。 [STATUS] </notification> <notification name="AvatarRezCloudNotification"> - ( [EXISTENCE] seconds alive ) -Avatar '[NAME]' became cloud. + (å˜çºŒ [EXISTENCE] ç§’é˜ï¼‰ +化身 '[NAME]' 已雲化。 </notification> <notification name="AvatarRezArrivedNotification"> - ( [EXISTENCE] seconds alive ) -Avatar '[NAME]' appeared. + (å˜çºŒ [EXISTENCE] ç§’é˜ï¼‰ +化身 '[NAME]' 已出ç¾ã€‚ </notification> <notification name="AvatarRezLeftCloudNotification"> - ( [EXISTENCE] seconds alive ) -Avatar '[NAME]' left after [TIME] seconds as cloud. + (å˜çºŒ [EXISTENCE] ç§’é˜ï¼‰ +化身 '[NAME]' 在雲化 [TIME] 秒後離開。 </notification> <notification name="AvatarRezEnteredAppearanceNotification"> - ( [EXISTENCE] seconds alive ) -Avatar '[NAME]' entered appearance mode. + (å˜çºŒ [EXISTENCE] ç§’é˜ï¼‰ +化身 '[NAME]' 進入外觀模å¼ã€‚ </notification> <notification name="AvatarRezLeftAppearanceNotification"> - ( [EXISTENCE] seconds alive ) -Avatar '[NAME]' left appearance mode. + (å˜çºŒ [EXISTENCE] ç§’é˜ï¼‰ +化身 '[NAME]' 離開外觀模å¼ã€‚ </notification> <notification name="NoConnect"> - We're having trouble connecting using [PROTOCOL] [HOSTID]. -Please check your network and firewall setup. + 使用 [PROTOCOL] [HOSTID] 連線時出了å•題。 +è«‹æª¢æŸ¥ä½ çš„ç¶²è·¯å’Œé˜²ç«ç‰†è¨å®šã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="NoVoiceConnect"> - We're having trouble connecting to your voice server: + 試圖連接語音伺æœå™¨æ™‚出了å•題: [HOSTID] -Voice communications will not be available. -Please check your network and firewall setup. +將無法用語音æºé€šã€‚ +è«‹æª¢æŸ¥ä½ çš„ç¶²è·¯å’Œé˜²ç«ç‰†è¨å®šã€‚ <usetemplate name="okbutton" yestext="確定"/> </notification> <notification name="AvatarRezLeftNotification"> - ( [EXISTENCE] seconds alive ) -Avatar '[NAME]' left as fully loaded. + (å˜çºŒ [EXISTENCE] ç§’é˜ï¼‰ +化身 '[NAME]' 在完全載入狀æ³ä¸‹é›¢é–‹ã€‚ </notification> <notification name="AvatarRezSelfBakedTextureUploadNotification"> - ( [EXISTENCE] seconds alive ) -You uploaded a [RESOLUTION] baked texture for '[BODYREGION]' after [TIME] seconds. + (å˜çºŒ [EXISTENCE] ç§’é˜ï¼‰ +ä½ åœ¨ [TIME] ç§’é˜å¾Œç‚º '[BODYREGION]' 上傳了一個 [RESOLUTION] 的定貌æè³ªã€‚ </notification> <notification name="AvatarRezSelfBakedTextureUpdateNotification"> - ( [EXISTENCE] seconds alive ) -You locally updated a [RESOLUTION] baked texture for '[BODYREGION]' after [TIME] seconds. + (å˜çºŒ [EXISTENCE] ç§’é˜ï¼‰ +ä½ åœ¨ [TIME] ç§’é˜å¾Œåœ¨æœ¬åœ°ç‚º '[BODYREGION]' 更新了一個 [RESOLUTION] 的定貌æè³ªã€‚ + </notification> + <notification name="LivePreviewUnavailable"> + 我們無法顯示這個æè³ªçš„é è¦½ï¼Œå› ç‚ºå®ƒè¨ç‚ºã€Œç¦æ¢è¤‡è£½ã€ä¸” / æˆ–ã€Œç¦æ¢è½‰ç§»ã€ã€‚ + <usetemplate ignoretext="ã€Œç¦æ¢è¤‡è£½ã€å’Œã€Œç¦æ¢è½‰ç§»ã€çš„æè³ªè‹¥ä¸èƒ½ä½¿ç”¨å¯¦æ™‚é 覽模å¼ï¼Œè«‹çµ¦æˆ‘è¦ç¤ºã€‚" name="okignore" yestext="確定"/> </notification> <notification name="ConfirmLeaveCall"> ä½ ç¢ºå®šè¦é›¢é–‹é€™æ®µé€šè©±ï¼Ÿ <usetemplate ignoretext="æˆ‘çµæŸé€šè©±å‰é€²è¡Œç¢ºèª" name="okcancelignore" notext="å¦" yestext="是"/> </notification> <notification name="ConfirmMuteAll"> - 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="åœ¨æˆ‘å°æ‰€æœ‰ç¾¤çµ„通話的åƒèˆ‡è€…予以éœéŸ³å‰ç¢ºèª" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> </notification> <notification label="èŠå¤©" name="HintChat"> - To join the conversation, type into the chat field below. + è‹¥è¦åŠ å…¥å°è©±ï¼Œè«‹åœ¨ä¸‹æ–¹çš„èŠå¤©æ¬„裡打å—。 </notification> - <notification label="Stand" name="HintSit"> - To stand up and exit the sitting position, click the Stand button. + <notification label="站立" name="HintSit"> + è‹¥è¦ä¸æ¢åå§¿ç«™èµ·èº«ä¾†ï¼Œè«‹æŒ‰ã€Œç«™ç«‹ã€æŒ‰éˆ•。 </notification> - <notification label="Speak" name="HintSpeak"> - Click the Speak button to turn your microphone on and off. + <notification label="說話" name="HintSpeak"> + é»žæŒ‰ã€Œèªªè©±ã€æŒ‰éˆ•來打開或關閉麥克風。 -Click on the up arrow to see the voice control panel. +點按å‘上ç®é éµï¼Œå¯é¡¯ç¤ºè²éŸ³æŽ§åˆ¶é¢æ¿ã€‚ -Hiding the Speak button will disable the voice feature. +éš±è—ã€Œèªªè©±ã€æŒ‰éˆ•å°‡åœç”¨èªžéŸ³åŠŸèƒ½ã€‚ </notification> <notification label="探索世界" name="HintDestinationGuide"> - The Destination Guide contains thousands of new places to discover. Select a location and choose Teleport to start exploring. + 目的地指å—包å«ä¸Šåƒå€‹å€¼å¾—探索的新地點。 鏿“‡ä¸€å€‹åœ°é»žï¼Œç„¶å¾Œã€Œçž¬é–“傳é€ã€å‰å¾€ï¼Œé–‹å§‹ä½ çš„æŽ¢ç´¢ï¼ </notification> <notification label="å´é‚Šæ¬„" name="HintSidePanel"> - Get quick access to your inventory, outfits, profiles and more in the side panel. + ä½ å¯ä»¥å¾žå´é‚Šæ¬„進入收ç´å€ã€è£æ‰®ã€å€‹äººæª”案ç‰ï¼Œæ–¹ä¾¿åˆè¿…速。 </notification> <notification label="移動" name="HintMove"> - To walk or run, open the Move Panel and use the directional arrows to navigate. You can also use the directional keys on your keyboard. + 若想行走或跑æ¥ï¼Œè«‹æ‰“開「移動ã€é¢æ¿ï¼Œä½¿ç”¨æ–¹å‘ç®é 來移動。 也å¯ä»¥ä½¿ç”¨éµç›¤ä¸Šçš„æ–¹å‘éµã€‚ </notification> <notification label="" name="HintMoveClick"> - 1. Click to Walk -Click anywhere on the ground to walk to that spot. + 1. 點按一下就å¯è¡Œèµ° +點按地é¢ä¸Šä»»ä½•一點,就å¯ä»¥èµ°åˆ°é‚£è£¡ã€‚ -2. Click and Drag to Rotate View -Click and drag anywhere on the world to rotate your view +2. 按ä½ä¸¦æ‹–曳,å¯ä»¥æ—‹è½‰è¦–野 +在虛擬世界裡按ä½ä¸¦æ‹–æ›³ä»»ä½•ä¸€é»žï¼Œå°±å¯æ—‹è½‰ä½ 的視野 </notification> <notification label="顯示å稱" name="HintDisplayName"> - Set your customizable display name here. This is in addition to your unique username, which can't be changed. You can change how you see other people's names in your preferences. + åœ¨é€™è£¡è‡ªè¨‚ä½ çš„é¡¯ç¤ºå稱。 顯示å稱和使用者å稱有別,後者ç¨ä¸€ç„¡äºŒè€Œä¸”ä¸èƒ½è®Šæ›´ã€‚ ä½ å¯ä»¥åœ¨å好è¨å®šè£¡ï¼Œè®Šæ›´è¦å¦‚何察看別人的å稱。 </notification> - <notification label="View" name="HintView"> - To change your camera view, use the Orbit and Pan controls. Reset your view by pressing Escape or walking. + <notification label="視角" name="HintView"> + è¦æ”¹è®Šæ”影機視角,請用「環繞ã€å’Œã€Œå¹³ç§»ã€æŽ§åˆ¶ã€‚ 按 Escape éµï¼Œæˆ–走動一下,便å¯é‡è¨ä½ 的視野。 </notification> <notification label="æ”¶ç´å€" name="HintInventory"> - Check your inventory to find items. Newest items can be easily found in the Recent tab. + 到收ç´å€æ‰¾å°‹ç‰©é …。 在「新近ã€é 籤裡å¯ç«‹åˆ»çœ‹åˆ°æ–°è¿‘çš„ç‰©é …ã€‚ </notification> <notification label="ä½ å¾—åˆ°æž—ç™»å¹£!" name="HintLindenDollar"> - Here's your current balance of L$. Click Buy L$ to purchase more Linden Dollars. + é€™è£¡é¡¯ç¤ºä½ ç›®å‰çš„ L$ 餘é¡ã€‚ 點按「購買 L$ã€å¯æ·»è³¼æž—登幣。 + </notification> + <notification name="LowMemory"> + ä½ çš„å¯ç”¨è¨˜æ†¶é«”很å°ã€‚ 第二人生部分功能將åœç”¨ï¼Œä»¥å…當機。 請關閉其他應用程å¼ã€‚ 這狀æ³è‹¥æŒçºŒï¼Œè«‹é‡å•Ÿç¬¬äºŒäººç”Ÿã€‚ + </notification> + <notification name="ForceQuitDueToLowMemory"> + 記憶體ä¸è¶³ï¼Œç¬¬äºŒäººç”Ÿå°‡æ–¼ 30 秒後關閉離開。 </notification> <notification name="PopupAttempt"> 一個çªé¡¯å¼è¦–窗開啟時被阻擋。 @@ -2881,54 +3118,171 @@ Click and drag anywhere on the world to rotate your view <button name="open" text="開啟çªé¡¯å¼è¦–窗"/> </form> </notification> + <notification name="SOCKS_NOT_PERMITTED"> + SOCKS 5 代ç†ä¼ºæœå™¨ "[HOST]:[PORT]" 拒絕連通,è¦å‰‡é›†ä¸å…許。 + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="SOCKS_CONNECT_ERROR"> + SOCKS 5 代ç†ä¼ºæœå™¨ "[HOST]:[PORT]" 拒絕連通,無法打開 TCP é »é“。 + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="SOCKS_NOT_ACCEPTABLE"> + SOCKS 5 代ç†ä¼ºæœå™¨ "[HOST]:[PORT]" 拒絕所é¸çš„é‘’èªæ–¹æ³•。 + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="SOCKS_AUTH_FAIL"> + SOCKS 5 代ç†ä¼ºæœå™¨ "[HOST]:[PORT]" å›žå ±ï¼šä½ çš„é‘’èªè³‡æ–™ç„¡æ•ˆã€‚ + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="SOCKS_UDP_FWD_NOT_GRANTED"> + SOCKS 5 代ç†ä¼ºæœå™¨ "[HOST]:[PORT]" 拒絕 UDP è¯çµè«‹æ±‚。 + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="SOCKS_HOST_CONNECT_FAILED"> + 無法連通 SOCKS 5 代ç†ä¼ºæœå™¨ "[HOST]:[PORT]"。 + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="SOCKS_UNKNOWN_STATUS"> + 伺æœå™¨ "[HOST]:[PORT]" ç™¼ç”Ÿä¸æ˜Žçš„代ç†ä¼ºæœå™¨éŒ¯èª¤ã€‚ + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="SOCKS_INVALID_HOST"> + 無效的 SOCKS 代ç†ä¼ºæœå™¨ä½å€æˆ–åŸ è™Ÿ "[HOST]:[PORT]"。 + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="SOCKS_BAD_CREDS"> + 無效的 SOCKS 5 使用者å稱或密碼。 + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="PROXY_INVALID_HTTP_HOST"> + 無效的 HTTP 代ç†ä¼ºæœå™¨ä½å€æˆ–åŸ è™Ÿ "[HOST]:[PORT]"。 + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="PROXY_INVALID_SOCKS_HOST"> + 無效的 SOCKS 代ç†ä¼ºæœå™¨ä½å€æˆ–åŸ è™Ÿ "[HOST]:[PORT]"。 + <usetemplate name="okbutton" yestext="確定"/> + </notification> + <notification name="ChangeProxySettings"> + 釿–°å•Ÿå‹• [APP_NAME] 後將採用新的代ç†ä¼ºæœå™¨è¨å®šã€‚ + <usetemplate name="okbutton" yestext="確定"/> + </notification> <notification name="AuthRequest"> - The site at '<nolink>[HOST_NAME]</nolink>' in realm '[REALM]' requires a user name and password. + '[REALM]' é ˜åŸŸçš„ '<nolink>[HOST_NAME]</nolink>' 站點需è¦ä½¿ç”¨è€…å稱和密碼。 <form name="form"> - <input name="username" text="User Name"/> - <input name="password" text="Password"/> - <button name="ok" text="Submit"/> + <input name="username" text="使用者å稱"/> + <input name="password" text="密碼"/> + <button name="ok" text="æäº¤"/> <button name="cancel" text="å–æ¶ˆ"/> </form> </notification> - <notification label="" name="ModeChange"> - 改變劉覽器模å¼è¦æ±‚ä½ å¿…é ˆçµæŸé€€å‡ºä¸¦é‡æ–°å•Ÿå‹•。 - <usetemplate name="okcancelbuttons" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> - </notification> <notification label="" name="NoClassifieds"> - Creation and editing of Classifieds is only available in Advanced mode. Would you like to quit and change modes? The mode selector can be found on the login screen. + åªæœ‰é€²éšŽæ¨¡å¼æ‰èƒ½æ–°å»ºæˆ–編輯個人廣告。 ä½ æ˜¯å¦æƒ³è¦çµæŸé›¢é–‹ï¼Œä»¥ä¾¿è®Šæ›´æ¨¡å¼ï¼Ÿ ä½ å¯åœ¨ç™»å…¥ç•«é¢é¸æ“‡æƒ³è¦çš„æ¨¡å¼ã€‚ <usetemplate name="okcancelbuttons" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> </notification> <notification label="" name="NoGroupInfo"> - Creation and editing of Groups is only available in Advanced mode. Would you like to quit and change modes? The mode selector can be found on the login screen. + åªæœ‰é€²éšŽæ¨¡å¼æ‰èƒ½æ–°å»ºæˆ–編輯群組。 ä½ æ˜¯å¦æƒ³è¦çµæŸé›¢é–‹ï¼Œä»¥ä¾¿è®Šæ›´æ¨¡å¼ï¼Ÿ ä½ å¯åœ¨ç™»å…¥ç•«é¢é¸æ“‡æƒ³è¦çš„æ¨¡å¼ã€‚ + <usetemplate name="okcancelbuttons" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> + </notification> + <notification label="" name="NoPlaceInfo"> + åªæœ‰é€²éšŽæ¨¡å¼æ‰èƒ½å¯Ÿçœ‹åœ°é»žæª”案。 ä½ æ˜¯å¦æƒ³è¦çµæŸé›¢é–‹ï¼Œä»¥ä¾¿è®Šæ›´æ¨¡å¼ï¼Ÿ ä½ å¯åœ¨ç™»å…¥ç•«é¢é¸æ“‡æƒ³è¦çš„æ¨¡å¼ã€‚ <usetemplate name="okcancelbuttons" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> </notification> <notification label="" name="NoPicks"> - Creation and editing of Picks is only available in Advanced mode. Would you like to quit and change modes? The mode selector can be found on the login screen. + åªæœ‰é€²éšŽæ¨¡å¼æ‰èƒ½æ–°å»ºæˆ–編輯精é¸åœ°é»žã€‚ ä½ æ˜¯å¦æƒ³è¦çµæŸé›¢é–‹ï¼Œä»¥ä¾¿è®Šæ›´æ¨¡å¼ï¼Ÿ ä½ å¯åœ¨ç™»å…¥ç•«é¢é¸æ“‡æƒ³è¦çš„æ¨¡å¼ã€‚ <usetemplate name="okcancelbuttons" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> </notification> <notification label="" name="NoWorldMap"> - Viewing of the world map is only available in Advanced mode. Would you like to quit and change modes? The mode selector can be found on the login screen. + åªæœ‰é€²éšŽæ¨¡å¼æ‰èƒ½å¯Ÿçœ‹ä¸–界地圖。 ä½ æ˜¯å¦æƒ³è¦çµæŸé›¢é–‹ï¼Œä»¥ä¾¿è®Šæ›´æ¨¡å¼ï¼Ÿ ä½ å¯åœ¨ç™»å…¥ç•«é¢é¸æ“‡æƒ³è¦çš„æ¨¡å¼ã€‚ <usetemplate name="okcancelbuttons" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> </notification> <notification label="" name="NoVoiceCall"> - Voice calls are only available in Advanced mode. Would you like to logout and change modes? + åªæœ‰é€²éšŽæ¨¡å¼æ‰èƒ½ä½¿ç”¨èªžéŸ³é€šè©±ã€‚ ä½ æ˜¯å¦è¦ç™»å‡ºä¸¦ä¸”變更模å¼ï¼Ÿ <usetemplate name="okcancelbuttons" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> </notification> <notification label="" name="NoAvatarShare"> - Sharing is only available in Advanced mode. Would you like to logout and change modes? + åªæœ‰é€²éšŽæ¨¡å¼æ‰èƒ½ä½¿ç”¨åˆ†äº«åŠŸèƒ½ã€‚ ä½ æ˜¯å¦è¦ç™»å‡ºä¸¦ä¸”變更模å¼ï¼Ÿ <usetemplate name="okcancelbuttons" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> </notification> <notification label="" name="NoAvatarPay"> - Paying other residents is only available in Advanced mode. Would you like to logout and change modes? + åªæœ‰é€²éšŽæ¨¡å¼æ‰èƒ½ä»˜è²»çµ¦å…¶ä»–居民。 ä½ æ˜¯å¦è¦ç™»å‡ºä¸¦ä¸”變更模å¼ï¼Ÿ <usetemplate name="okcancelbuttons" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> </notification> - <global name="UnsupportedCPU"> - - ä½ çš„ CPU é‹ç®—速度未é”到系統最低é…å‚™è¦æ±‚。 - </global> + <notification label="" name="NoInventory"> + åªæœ‰é€²éšŽæ¨¡å¼æ‰èƒ½å¯Ÿçœ‹æ”¶ç´å€ã€‚ ä½ æ˜¯å¦è¦ç™»å‡ºä¸¦ä¸”變更模å¼ï¼Ÿ + <usetemplate name="okcancelbuttons" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> + </notification> + <notification label="" name="NoAppearance"> + åªæœ‰é€²éšŽæ¨¡å¼æ‰èƒ½ä½¿ç”¨å¤–觀編輯器。 ä½ æ˜¯å¦è¦ç™»å‡ºä¸¦ä¸”變更模å¼ï¼Ÿ + <usetemplate name="okcancelbuttons" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> + </notification> + <notification label="" name="NoSearch"> + åªæœ‰é€²éšŽæ¨¡å¼æ‰èƒ½æœå°‹ã€‚ ä½ æ˜¯å¦è¦ç™»å‡ºä¸¦ä¸”變更模å¼ï¼Ÿ + <usetemplate name="okcancelbuttons" notext="ä¸è¦çµæŸé€€å‡º" yestext="çµæŸé€€å‡º"/> + </notification> + <notification label="" name="ConfirmHideUI"> + é€™å°‡æœƒéš±è—æ‰€æœ‰é¸å–®å…§å®¹å’ŒæŒ‰éˆ•。 è¦æ¢å¾©åŽŸç‹€ï¼Œå†é»žæŒ‰ [SHORTCUT] 一次。 + <usetemplate ignoretext="éš±è—使用者介é¢å‰å…ˆç¢ºèª" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom"> + 所é¸çš„一些è¯çµé›†çš„幻影旗標將被切æ›ã€‚ + +ä½ ç¢ºå®šè¦ç¹¼çºŒå—Žï¼Ÿ + <usetemplate ignoretext="所é¸çš„一些è¯çµé›†çš„幻影旗標將被切æ›ã€‚" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted"> + æ‰€é¸æŸäº›è¯çµé›†å› 權é™å•題,無法è¨å®šç‚º '[REQUESTED_TYPE]'。 這些è¯çµé›†å°‡è¢«è¨ç‚º '[RESTRICTED_TYPE]'。 + +ä½ ç¢ºå®šè¦ç¹¼çºŒå—Žï¼Ÿ + <usetemplate ignoretext="æ‰€é¸æŸäº›è¯çµé›†å› 權é™å•題,無法è¨å®šã€‚" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnVolume"> + æ‰€é¸æŸäº›è¯çµé›†ç„¡æ³•è¨ç‚º '[REQUESTED_TYPE]'ï¼Œå› ç‚ºå½¢ç‹€å±¬æ–¼éžå‡¸é¢ã€‚ + +ä½ ç¢ºå®šè¦ç¹¼çºŒå—Žï¼Ÿ + <usetemplate ignoretext="æ‰€é¸æŸäº›è¯çµé›†å› 為形狀屬於éžå‡¸é¢ï¼Œç„¡æ³•è¨å®š" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted"> + 所é¸çš„一些è¯çµé›†çš„幻影旗標將被切æ›ã€‚ + +æ‰€é¸æŸäº›è¯çµé›†å› 權é™å•題,無法è¨å®šç‚º '[REQUESTED_TYPE]'。 這些è¯çµé›†å°‡è¢«è¨ç‚º '[RESTRICTED_TYPE]'。 + +ä½ ç¢ºå®šè¦ç¹¼çºŒå—Žï¼Ÿ + <usetemplate ignoretext="所é¸çš„一些è¯çµé›†çš„å¹»å½±æ——æ¨™å¯æˆåŠŸåˆ‡æ›ï¼Œå…¶ä»–çš„å‰‡å› æ¬Šé™å•題而無法è¨å®šã€‚" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnVolume"> + 所é¸çš„一些è¯çµé›†çš„幻影旗標將被切æ›ã€‚ + +æ‰€é¸æŸäº›è¯çµé›†ç„¡æ³•è¨ç‚º '[REQUESTED_TYPE]'ï¼Œå› ç‚ºå½¢ç‹€å±¬æ–¼éžå‡¸é¢ã€‚ + +ä½ ç¢ºå®šè¦ç¹¼çºŒå—Žï¼Ÿ + <usetemplate ignoretext="所é¸çš„一些è¯çµé›†çš„å¹»å½±æ——æ¨™å¯æˆåŠŸåˆ‡æ›ï¼Œå…¶ä»–çš„å‰‡å› å½¢ç‹€å±¬æ–¼éžå‡¸é¢è€Œç„¡æ³•è¨å®š" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> + </notification> + <notification name="PathfindingLinksets_MismatchOnRestricted_MismatchOnVolume"> + æ‰€é¸æŸäº›è¯çµé›†å› 權é™å•題,無法è¨å®šç‚º '[REQUESTED_TYPE]'。 這些è¯çµé›†å°‡è¢«è¨ç‚º '[RESTRICTED_TYPE]'。 + +æ‰€é¸æŸäº›è¯çµé›†ç„¡æ³•è¨ç‚º '[REQUESTED_TYPE]'ï¼Œå› ç‚ºå½¢ç‹€å±¬æ–¼éžå‡¸é¢ã€‚ 這些è¯çµé›†çš„ä½¿ç”¨é¡žåž‹å°‡ç¶æŒä¸è®Šã€‚ + +ä½ ç¢ºå®šè¦ç¹¼çºŒå—Žï¼Ÿ + <usetemplate ignoretext="æ‰€é¸æŸäº›è¯çµé›†å› 權é™ä¸è¶³ï¼Œä¸”形狀屬於éžå‡¸é¢ï¼Œå› æ¤ç„¡æ³•è¨å®šã€‚" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> + </notification> + <notification name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted_MismatchOnVolume"> + 所é¸çš„一些è¯çµé›†çš„幻影旗標將被切æ›ã€‚ + +æ‰€é¸æŸäº›è¯çµé›†å› 權é™å•題,無法è¨å®šç‚º '[REQUESTED_TYPE]'。 這些è¯çµé›†å°‡è¢«è¨ç‚º '[RESTRICTED_TYPE]'。 + +æ‰€é¸æŸäº›è¯çµé›†ç„¡æ³•è¨ç‚º '[REQUESTED_TYPE]'ï¼Œå› ç‚ºå½¢ç‹€å±¬æ–¼éžå‡¸é¢ã€‚ 這些è¯çµé›†çš„ä½¿ç”¨é¡žåž‹å°‡ç¶æŒä¸è®Šã€‚ + +ä½ ç¢ºå®šè¦ç¹¼çºŒå—Žï¼Ÿ + <usetemplate ignoretext="所é¸çš„一些è¯çµé›†çš„幻影旗標將被切æ›ï¼Œå…¶ä»–å‰‡å› æ¬Šé™ä¸è¶³ä¸”形狀屬於éžå‡¸é¢ï¼Œå› æ¤ç„¡æ³•è¨å®šã€‚" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> + </notification> + <notification name="PathfindingLinksets_ChangeToFlexiblePath"> + 所é¸çš„物件會影響導航網é¢ã€‚ 將它改為彈性路徑,將使它從導航網é¢ä¸è¢«ç§»é™¤ã€‚ + <usetemplate ignoretext="所é¸çš„物件會影響導航網é¢ã€‚ 將它改為彈性路徑,將使它從導航網é¢ä¸è¢«ç§»é™¤ã€‚" name="okcancelignore" notext="å–æ¶ˆ" yestext="確定"/> + </notification> <global name="UnsupportedGLRequirements"> - You do not appear to have the proper hardware requirements for [APP_NAME]. [APP_NAME] requires an OpenGL graphics card that has multitexture support. If this is the case, you may want to make sure that you have the latest drivers for your graphics card, and service packs and patches for your operating system. + ä½ çš„ç¡¬é«”è¨å‚™ä¼¼ä¹Žä¸ç¬¦ [APP_NAME] çš„è¦æ±‚。 [APP_NAME] 需è¦å¯ä»¥æ”¯æ´å¤šæè³ªçš„ OpenGL 顯åƒå¡ã€‚ 在這狀æ³ä¸‹ï¼Œè«‹ç¢ºå®šä½ 的顯åƒå¡å®‰è£äº†æœ€æ–°çš„驅動程å¼ï¼Œä½œæ¥ç³»çµ±ä¹Ÿå®‰è£äº†æœ€æ–°çš„æœå‹™åŒ…å’ŒåµŒè£œç¨‹å¼ã€‚ -If you continue to have problems, please visit the [SUPPORT_SITE]. +å¦‚æžœä½ ç¹¼çºŒé‡åˆ°å•題,請å‰å¾€ [SUPPORT_SITE] 求助。 </global> <global name="UnsupportedCPUAmount"> 796 @@ -2944,9 +3298,29 @@ If you continue to have problems, please visit the [SUPPORT_SITE]. </global> <global name="You can only set your 'Home Location' on your land or at a mainland Infohub."> è‹¥ä½ æ“æœ‰ä¸€å¡ŠåœŸåœ°ï¼Œä½ å¯ä»¥æ¨™è¨˜å®ƒæˆç‚ºä½ 的家的ä½ç½®ã€‚ -æˆ–è€…ï¼Œä½ å¯ä»¥å¯Ÿçœ‹åœ°åœ–尋找標記為 "資訊ä¸å¿ƒ" 的地方。 +æˆ–è€…ï¼Œä½ å¯ä»¥å¯Ÿçœ‹åœ°åœ–,尋找標記為「資訊ä¸å¿ƒã€çš„地方。 </global> <global name="You died and have been teleported to your home location"> ä½ å·²ç¶“æ»äº¡ä¸¦ä¸”被瞬間傳é€å›žä½ 的家的ä½ç½®ã€‚ </global> + <notification name="LocalBitmapsUpdateFileNotFound"> + [FNAME] 無法更新,找ä¸åˆ°è©²æª”案。 +未來將ä¸å†æ›´æ–°è©²æª”案。 + </notification> + <notification name="LocalBitmapsUpdateFailedFinal"> + [FNAME] 無法開啟或解碼,已嘗試 [NRETRIES] 次,該檔案已被èªå®šç‚ºæ¯€å£žã€‚ +未來將ä¸å†æ›´æ–°è©²æª”案。 + </notification> + <notification name="LocalBitmapsVerifyFail"> + 試圖新增一個無效或無法讀å–çš„åœ–åƒæª” [FNAME],該檔無法開啟或解碼。 +已喿¶ˆé€™ä¸€å˜—試。 + </notification> + <notification name="PathfindingReturnMultipleItems"> + ä½ æ£é€€å›ž [NUM_ITEMS] å€‹ç‰©é …ã€‚ ä½ ç¢ºå®šä½ è¦ç¹¼çºŒï¼Ÿ + <usetemplate ignoretext="ç¢ºå®šé€€å›žå¤šå€‹ç‰©é …ï¼Ÿ" name="okcancelignore" notext="å¦" yestext="是"/> + </notification> + <notification name="PathfindingDeleteMultipleItems"> + ä½ æ£åœ¨åˆªé™¤ [NUM_ITEMS] å€‹ç‰©é …ã€‚ ä½ ç¢ºå®šä½ è¦ç¹¼çºŒï¼Ÿ + <usetemplate ignoretext="確定è¦åˆªé™¤å¤šå€‹ç‰©é …?" name="okcancelignore" notext="å¦" yestext="是"/> + </notification> </notifications> diff --git a/indra/newview/skins/default/xui/zh/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/zh/panel_avatar_list_item.xml index eccb938f15..1c8b56b3d6 100644 --- a/indra/newview/skins/default/xui/zh/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/zh/panel_avatar_list_item.xml @@ -1,28 +1,28 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="avatar_list_item"> <string name="FormatSeconds"> - [COUNT]s + [COUNT] ç§’ </string> <string name="FormatMinutes"> - [COUNT]m + [COUNT] 分 </string> <string name="FormatHours"> - [COUNT]h + [COUNT] 時 </string> <string name="FormatDays"> - [COUNT]d + [COUNT] æ—¥ </string> <string name="FormatWeeks"> - [COUNT]w + [COUNT] 週 </string> <string name="FormatMonths"> - [COUNT]mon + [COUNT] 月 </string> <string name="FormatYears"> - [COUNT]y + [COUNT] å¹´ </string> - <text name="avatar_name" value="(載入)"/> - <text name="last_interaction" value="0s"/> + <text name="avatar_name" value="(載入ä¸ï¼‰"/> + <text name="last_interaction" value="0 ç§’"/> <icon name="permission_edit_theirs_icon" tool_tip="ä½ ä¸èƒ½ç·¨è¼¯é€™ä½æœ‹å‹çš„物件"/> <icon name="permission_edit_mine_icon" tool_tip="這使œ‹å‹èƒ½ç·¨è¼¯ã€åˆªé™¤æˆ–å–å¾—ä½ çš„ç‰©ä»¶"/> <icon name="permission_map_icon" tool_tip="這使œ‹å‹èƒ½åœ¨åœ°åœ–ä¸Šæ‰¾åˆ°ä½ çš„ä½ç½®"/> diff --git a/indra/newview/skins/default/xui/zh/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/zh/panel_body_parts_list_item.xml index 550868e5e5..fef692c1c5 100644 --- a/indra/newview/skins/default/xui/zh/panel_body_parts_list_item.xml +++ b/indra/newview/skins/default/xui/zh/panel_body_parts_list_item.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="wearable_item"> <text name="item_name" value="..."/> - <panel name="btn_lock" tool_tip="ä½ ä¸¦æ²’æœ‰æ¬Šé™é€²è¡Œç·¨è¼¯"/> + <panel name="btn_lock" tool_tip="ä½ æ²’æœ‰ç·¨è¼¯æ¬Š"/> <panel name="btn_edit_panel"> <button name="btn_edit" tool_tip="編輯這個體形"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/zh/panel_bodyparts_list_button_bar.xml index 5e269fcd09..e4e7a661a7 100644 --- a/indra/newview/skins/default/xui/zh/panel_bodyparts_list_button_bar.xml +++ b/indra/newview/skins/default/xui/zh/panel_bodyparts_list_button_bar.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="clothing_list_button_bar_panel"> - <button label="Switch" name="switch_btn"/> + <button label="切æ›" name="switch_btn"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_bottomtray.xml b/indra/newview/skins/default/xui/zh/panel_bottomtray.xml deleted file mode 100644 index 734b83e6cc..0000000000 --- a/indra/newview/skins/default/xui/zh/panel_bottomtray.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="bottom_tray"> - <string name="DragIndicationImageName" value="Accordion_ArrowOpened_Off"/> - <string name="SpeakBtnToolTip" value="Turns microphone on/off"/> - <string name="VoiceControlBtnToolTip" value="顯示 / éš±è— èªžéŸ³æŽ§åˆ¶æ¿"/> - <layout_stack name="toolbar_stack"> - <layout_panel name="speak_panel"> - <talk_button name="talk"> - <speak_button label="Speak" label_selected="Speak" name="speak_btn"/> - </talk_button> - </layout_panel> - <layout_panel name="gesture_panel"> - <gesture_combo_list label="å§¿å‹¢" name="Gesture" tool_tip="顯示 / éš±è— å§¿å‹¢"/> - </layout_panel> - <layout_panel name="movement_panel"> - <bottomtray_button label="移動" name="movement_btn" tool_tip="顯示 / éš±è— ç§»å‹•æŽ§åˆ¶"/> - </layout_panel> - <layout_panel name="cam_panel"> - <bottomtray_button label="視角" name="camera_btn" tool_tip="顯示 / éš±è— æ”影機控制"/> - </layout_panel> - <layout_panel name="snapshot_panel"> - <bottomtray_button name="snapshots" tool_tip="æ‹æ”å¿«ç…§"/> - </layout_panel> - <layout_panel name="build_btn_panel"> - <bottomtray_button label="å»ºé€ " name="build_btn" tool_tip="顯示 / éš±è— å»ºé€ å·¥å…·"/> - </layout_panel> - <layout_panel name="search_btn_panel"> - <bottomtray_button label="æœå°‹" name="search_btn" tool_tip="顯示 / éš±è— æœå°‹"/> - </layout_panel> - <layout_panel name="world_map_btn_panel"> - <bottomtray_button label="地圖" name="world_map_btn" tool_tip="顯示 / éš±è— ä¸–ç•Œåœ°åœ–"/> - </layout_panel> - <layout_panel name="mini_map_btn_panel"> - <bottomtray_button label="è¿·ä½ åœ°åœ–" name="mini_map_btn" tool_tip="顯示 / éš±è— è¿·ä½ åœ°åœ–"/> - </layout_panel> - <layout_panel name="im_well_panel"> - <chiclet_im_well name="im_well"> - <button name="Unread IM messages" tool_tip="Conversations"/> - </chiclet_im_well> - </layout_panel> - <layout_panel name="notification_well_panel"> - <chiclet_notification name="notification_well"> - <button name="Unread" tool_tip="通知"/> - </chiclet_notification> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_chiclet_bar.xml b/indra/newview/skins/default/xui/zh/panel_chiclet_bar.xml new file mode 100644 index 0000000000..69340349bc --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_chiclet_bar.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="chiclet_bar"> + <layout_stack name="toolbar_stack"> + <layout_panel name="im_well_panel"> + <chiclet_im_well name="im_well"> + <button name="Unread IM messages" tool_tip="交談"/> + </chiclet_im_well> + </layout_panel> + <layout_panel name="notification_well_panel"> + <chiclet_notification name="notification_well"> + <button name="Unread" tool_tip="通知"/> + </chiclet_notification> + </layout_panel> + </layout_stack> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_classified_info.xml b/indra/newview/skins/default/xui/zh/panel_classified_info.xml index cf3113ef1c..6f2dd89318 100644 --- a/indra/newview/skins/default/xui/zh/panel_classified_info.xml +++ b/indra/newview/skins/default/xui/zh/panel_classified_info.xml @@ -16,33 +16,33 @@ [mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt] </panel.string> <panel.string name="auto_renew_on"> - Enabled + 已啟用 </panel.string> <panel.string name="auto_renew_off"> - Disabled + å·²åœç”¨ </panel.string> - <text name="title" value="Classified Info"/> + <text name="title" value="個人廣告資訊"/> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> <text_editor name="classified_name" value="[name]"/> <text name="classified_location_label" value="ä½ç½®ï¼š"/> <text_editor name="classified_location" value="[loading...]"/> - <text name="content_type_label" value="Content Type:"/> + <text name="content_type_label" value="內容類型:"/> <text_editor name="content_type" value="[content type]"/> - <text name="category_label" value="Category:"/> + <text name="category_label" value="分類:"/> <text_editor name="category" value="[category]"/> - <text name="creation_date_label" value="Creation date:"/> - <text_editor name="creation_date" tool_tip="Creation date" value="[date]"/> - <text name="price_for_listing_label" value="Price for listing:"/> - <text_editor name="price_for_listing" tool_tip="Price for listing." value="[price]"/> + <text name="creation_date_label" value="建立日期:"/> + <text_editor name="creation_date" tool_tip="建立日期" value="[date]"/> + <text name="price_for_listing_label" value="刊登費:"/> + <text_editor name="price_for_listing" tool_tip="刊登費。" value="[price]"/> <layout_stack name="descr_stack"> <layout_panel name="clickthrough_layout_panel"> - <text name="click_through_label" value="Clicks:"/> - <text_editor name="click_through_text" tool_tip="Click through data" value="[clicks]"/> + <text name="click_through_label" value="點按:"/> + <text_editor name="click_through_text" tool_tip="點進資料" value="[clicks]"/> </layout_panel> <layout_panel name="price_layout_panel"> - <text name="auto_renew_label" value="Auto renew:"/> - <text name="auto_renew" value="Enabled"/> + <text name="auto_renew_label" value="自動續訂:"/> + <text name="auto_renew" value="已啟用"/> </layout_panel> <layout_panel name="descr_layout_panel"> <text name="classified_desc_label" value="æè¿°ï¼š"/> diff --git a/indra/newview/skins/default/xui/zh/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/zh/panel_clothing_list_item.xml index 1185336a2d..55e72f5347 100644 --- a/indra/newview/skins/default/xui/zh/panel_clothing_list_item.xml +++ b/indra/newview/skins/default/xui/zh/panel_clothing_list_item.xml @@ -2,8 +2,8 @@ <panel name="wearable_item"> <button name="btn_delete" tool_tip="ç”±è£æ‰®ç§»é™¤"/> <text name="item_name" value="..."/> - <panel name="btn_lock" tool_tip="ä½ ä¸¦æ²’æœ‰æ¬Šé™åŽ»ç·¨è¼¯"/> + <panel name="btn_lock" tool_tip="ä½ æ²’æœ‰ç·¨è¼¯æ¬Š"/> <panel name="btn_edit_panel"> - <button name="btn_edit" tool_tip="Edit this wearable"/> + <button name="btn_edit" tool_tip="編輯這å¯ç©¿è£æ‰®"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_cof_wearables.xml b/indra/newview/skins/default/xui/zh/panel_cof_wearables.xml index 309ab1c0d4..c074abb568 100644 --- a/indra/newview/skins/default/xui/zh/panel_cof_wearables.xml +++ b/indra/newview/skins/default/xui/zh/panel_cof_wearables.xml @@ -2,7 +2,7 @@ <panel name="cof_wearables"> <accordion name="cof_wearables_accordion"> <accordion_tab name="tab_clothing" title="æœè£"/> - <accordion_tab name="tab_attachments" title="Attachments"/> + <accordion_tab name="tab_attachments" title="附件"/> <accordion_tab name="tab_body_parts" title="身體部ä½"/> </accordion> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_alpha.xml b/indra/newview/skins/default/xui/zh/panel_edit_alpha.xml index eda4e99a13..32765a3e16 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_alpha.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_alpha.xml @@ -2,11 +2,11 @@ <panel name="edit_alpha_panel"> <scroll_container name="avatar_alpha_color_panel_scroll"> <panel name="avatar_alpha_color_panel"> - <texture_picker label="下åŠèº«åŠé€æ˜Ž" name="Lower Alpha" tool_tip="點擊以挑é¸åœ–åƒ"/> - <texture_picker label="上åŠèº«åŠé€æ˜Ž" name="Upper Alpha" tool_tip="點擊以挑é¸åœ–åƒ"/> - <texture_picker label="é 部åŠé€æ˜Ž" name="Head Alpha" tool_tip="點擊以挑é¸åœ–åƒ"/> - <texture_picker label="眼ç›åŠé€æ˜Ž" name="Eye Alpha" tool_tip="點擊以挑é¸åœ–åƒ"/> - <texture_picker label="é é«®åŠé€æ˜Ž" name="Hair Alpha" tool_tip="點擊以挑é¸åœ–åƒ"/> + <texture_picker label="下åŠèº«åŠé€æ˜Ž" name="Lower Alpha" tool_tip="點按以挑é¸åœ–片"/> + <texture_picker label="上åŠèº«åŠé€æ˜Ž" name="Upper Alpha" tool_tip="點按以挑é¸åœ–片"/> + <texture_picker label="é 部åŠé€æ˜Ž" name="Head Alpha" tool_tip="點按以挑é¸åœ–片"/> + <texture_picker label="眼ç›åŠé€æ˜Ž" name="Eye Alpha" tool_tip="點按以挑é¸åœ–片"/> + <texture_picker label="é é«®åŠé€æ˜Ž" name="Hair Alpha" tool_tip="點按以挑é¸åœ–片"/> </panel> </scroll_container> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_classified.xml b/indra/newview/skins/default/xui/zh/panel_edit_classified.xml index f12701c981..b06ece02ad 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_classified.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_classified.xml @@ -1,24 +1,24 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Edit Classified" name="panel_edit_classified"> +<panel label="編輯個人廣告" name="panel_edit_classified"> <panel.string name="location_notice"> (儲å˜å¾Œå°‡æœƒæ›´æ–°ï¼‰ </panel.string> <string name="publish_label"> - Publish + 發布 </string> <string name="save_label"> å„²å˜ </string> <text name="title"> - Edit Classified + 編輯個人廣告 </text> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> <panel name="snapshot_panel"> - <icon label="" name="edit_icon" tool_tip="é»žæ“Šä»¥é¸æ“‡åœ–åƒ"/> + <icon label="" name="edit_icon" tool_tip="é»žæŒ‰ä»¥é¸æ“‡åœ–åƒ"/> </panel> <text name="Name:"> - Title: + 標題: </text> <text name="description_label"> æè¿°ï¼š @@ -29,16 +29,16 @@ <text name="classified_location"> 載入ä¸... </text> - <button label="Set to Current Location" name="set_to_curr_location_btn"/> - <text name="category_label" value="Category:"/> - <text name="content_type_label" value="Content type:"/> + <button label="è¨å®šç‚ºç›®å‰ä½ç½®" name="set_to_curr_location_btn"/> + <text name="category_label" value="分類:"/> + <text name="content_type_label" value="內容類型:"/> <icons_combo_box label="一般普級內容" name="content_type"> - <icons_combo_box.item label="é©åº¦æˆäººå…§å®¹" name="mature_ci" value="Mature"/> - <icons_combo_box.item label="一般普級內容" name="pg_ci" value="PG"/> + <icons_combo_box.item label="é©åº¦æˆäººå…§å®¹" name="mature_ci" value="é©åº¦æˆäºº"/> + <icons_combo_box.item label="一般普級內容" name="pg_ci" value="一般普級"/> </icons_combo_box> - <check_box label="Auto renew each week" name="auto_renew"/> - <text name="price_for_listing_label" value="Price for listing:"/> - <spinner label="L$" name="price_for_listing" tool_tip="Price for listing." value="50"/> + <check_box label="æ¯æ˜ŸæœŸè‡ªå‹•續訂" name="auto_renew"/> + <text name="price_for_listing_label" value="刊登費:"/> + <spinner label="L$" name="price_for_listing" tool_tip="刊登費。" value="50"/> </panel> </scroll_container> <panel label="bottom_panel" name="bottom_panel"> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_eyes.xml b/indra/newview/skins/default/xui/zh/panel_edit_eyes.xml index 40dd61971a..f44d411908 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_eyes.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_eyes_panel"> <panel name="avatar_eye_color_panel"> - <texture_picker label="Iris" name="Iris" tool_tip="點擊以挑é¸åœ–åƒ"/> + <texture_picker label="虹膜" name="Iris" tool_tip="點按以挑é¸åœ–片"/> </panel> <panel name="accordion_panel"> <accordion name="wearable_accordion"> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_gloves.xml b/indra/newview/skins/default/xui/zh/panel_edit_gloves.xml index 7b39e33a9b..d107eea553 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_gloves.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_gloves_panel"> <panel name="avatar_gloves_color_panel"> - <texture_picker label="æè³ª" name="Fabric" tool_tip="點擊以挑é¸åœ–åƒ"/> - <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="Click to open color picker"/> + <texture_picker label="æè³ª" name="Fabric" tool_tip="點按以挑é¸åœ–片"/> + <color_swatch label="é¡è‰²/色調" name="Color/Tint" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> </panel> <panel name="accordion_panel"> <accordion name="wearable_accordion"> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_hair.xml b/indra/newview/skins/default/xui/zh/panel_edit_hair.xml index a7440093bc..65f78f9273 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_hair.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_hair_panel"> <panel name="avatar_hair_color_panel"> - <texture_picker label="æè³ª" name="Texture" tool_tip="點擊以挑é¸åœ–åƒ"/> + <texture_picker label="æè³ª" name="Texture" tool_tip="點按以挑é¸åœ–片"/> </panel> <panel name="accordion_panel"> <accordion name="wearable_accordion"> <accordion_tab name="hair_color_tab" title="é¡è‰²"/> - <accordion_tab name="hair_style_tab" title="Style"/> - <accordion_tab name="hair_eyebrows_tab" title="Eyebrows"/> - <accordion_tab name="hair_facial_tab" title="Facial"/> + <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/zh/panel_edit_jacket.xml b/indra/newview/skins/default/xui/zh/panel_edit_jacket.xml index dcef070e2e..61e45f911e 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_jacket.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_jacket_panel"> <panel name="avatar_jacket_color_panel"> - <texture_picker label="上åŠèº«æè³ª" name="Upper Fabric" tool_tip="點擊以挑é¸åœ–åƒ"/> - <texture_picker label="下åŠèº«æè³ª" name="Lower Fabric" tool_tip="點擊以挑é¸åœ–åƒ"/> - <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="Click to open color picker"/> + <texture_picker label="上åŠèº«æè³ª" name="Upper Fabric" tool_tip="點按以挑é¸åœ–片"/> + <texture_picker label="下åŠèº«æè³ª" name="Lower Fabric" tool_tip="點按以挑é¸åœ–片"/> + <color_swatch label="é¡è‰²/色調" name="Color/Tint" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> </panel> <panel name="accordion_panel"> <accordion name="wearable_accordion"> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_pants.xml b/indra/newview/skins/default/xui/zh/panel_edit_pants.xml index 01b875f1bd..846ed72961 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_pants.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_pants_panel"> <panel name="avatar_pants_color_panel"> - <texture_picker label="æè³ª" name="Fabric" tool_tip="點擊以挑é¸åœ–åƒ"/> - <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="點擊以開啟é¡è‰²æŒ‘é¸å™¨"/> + <texture_picker label="æè³ª" name="Fabric" tool_tip="點按以挑é¸åœ–片"/> + <color_swatch label="é¡è‰²/色調" name="Color/Tint" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> </panel> <panel name="accordion_panel"> <accordion name="wearable_accordion"> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_pick.xml b/indra/newview/skins/default/xui/zh/panel_edit_pick.xml index 6ac7226185..faee42fd0e 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_pick.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="編輯精é¸åœ°é»ž" name="panel_edit_pick"> <panel.string name="location_notice"> - (將在儲å˜å¾Œæ›´æ–°ï¼‰ + (儲å˜å¾Œå°‡æœƒæ›´æ–°ï¼‰ </panel.string> <text name="title"> 編輯精é¸åœ°é»ž </text> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> - <icon label="" name="edit_icon" tool_tip="é»žæ“Šä»¥é¸æ“‡åœ–åƒ"/> + <icon label="" name="edit_icon" tool_tip="é»žæŒ‰ä»¥é¸æ“‡åœ–åƒ"/> <text name="Name:"> 標題: </text> @@ -29,7 +29,7 @@ <layout_panel name="layout_panel1"> <button label="儲å˜ç²¾é¸åœ°é»ž" name="save_changes_btn"/> </layout_panel> - <layout_panel name="layout_panel1"> + <layout_panel name="layout_panel2"> <button label="å–æ¶ˆ" name="cancel_btn"/> </layout_panel> </layout_stack> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_profile.xml b/indra/newview/skins/default/xui/zh/panel_edit_profile.xml index 7734c3a417..849b82c71a 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_profile.xml @@ -7,15 +7,15 @@ <string name="RegisterDateFormat"> [REG_DATE] ([AGE]) </string> - <string name="AcctTypeResident" value="Resident"/> - <string name="AcctTypeTrial" value="Trial"/> - <string name="AcctTypeCharterMember" value="Charter Member"/> - <string name="AcctTypeEmployee" value="Linden Lab Employee"/> - <string name="PaymentInfoUsed" value="Payment Info Used"/> - <string name="PaymentInfoOnFile" value="Payment Info On File"/> - <string name="NoPaymentInfoOnFile" value="No Payment Info On File"/> - <string name="AgeVerified" value="Age-verified"/> - <string name="NotAgeVerified" value="Not Age-verified"/> + <string name="AcctTypeResident" value="å±…æ°‘"/> + <string name="AcctTypeTrial" value="試用"/> + <string name="AcctTypeCharterMember" value="è€ç‰Œ Charter æˆå“¡"/> + <string name="AcctTypeEmployee" value="林登實驗室員工"/> + <string name="PaymentInfoUsed" value="使用的付款資料"/> + <string name="PaymentInfoOnFile" value="é 留付款資料"/> + <string name="NoPaymentInfoOnFile" value="未é 留付款資料"/> + <string name="AgeVerified" value="通éŽå¹´é½¡é©—è‰"/> + <string name="NotAgeVerified" value="未通éŽå¹´é½¡é©—è‰"/> <string name="partner_edit_link_url"> http://www.secondlife.com/account/partners.php?lang=en </string> @@ -34,22 +34,22 @@ <panel name="second_life_image_panel"> <text name="second_life_photo_title_text" value="[SECOND_LIFE]:"/> </panel> - <icon label="" name="2nd_life_edit_icon" tool_tip="é»žæ“Šä»¥é¸æ“‡åœ–åƒ"/> + <icon label="" name="2nd_life_edit_icon" tool_tip="é»žæŒ‰ä»¥é¸æ“‡åœ–åƒ"/> </panel> <panel name="first_life_image_panel"> <text name="real_world_photo_title_text" value="真實世界:"/> </panel> - <icon label="" name="real_world_edit_icon" tool_tip="é»žæ“Šä»¥é¸æ“‡åœ–åƒ"/> + <icon label="" name="real_world_edit_icon" tool_tip="é»žæŒ‰ä»¥é¸æ“‡åœ–åƒ"/> <text name="title_homepage_text"> 首é : </text> <line_editor name="homepage_edit" value="http://"/> <text name="title_acc_status_text" value="我的帳戶:"/> - <text_editor name="acc_status_text" value="Resident. No payment info on file."/> + <text_editor name="acc_status_text" value="居民。 未é 留付款資料。"/> <text name="my_account_link" value="[[URL] å‰å¾€æˆ‘的塗鴉牆]"/> <text name="title_partner_text" value="我的é…å¶ï¼š"/> <panel name="partner_data_panel"> - <text initial_value="(retrieving)" name="partner_text"/> + <text initial_value="(檢索ä¸ï¼‰" name="partner_text"/> </panel> <text name="partner_edit_link" value="[[URL] 編輯]"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_shirt.xml b/indra/newview/skins/default/xui/zh/panel_edit_shirt.xml index f8ff76aa9b..bc69f2ffc4 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_shirt.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_shirt_panel"> <panel name="avatar_shirt_color_panel"> - <texture_picker label="æè³ª" name="Fabric" tool_tip="點擊以挑é¸åœ–åƒ"/> - <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="點擊以開啟é¡è‰²æŒ‘é¸å™¨"/> + <texture_picker label="æè³ª" name="Fabric" tool_tip="點按以挑é¸åœ–片"/> + <color_swatch label="é¡è‰²/色調" name="Color/Tint" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> </panel> <panel name="accordion_panel"> <accordion name="wearable_accordion"> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_shoes.xml b/indra/newview/skins/default/xui/zh/panel_edit_shoes.xml index 97e43f5753..e190bb5bd8 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_shoes.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_shoes_panel"> <panel name="avatar_shoes_color_panel"> - <texture_picker label="æè³ª" name="Fabric" tool_tip="點擊以挑é¸åœ–åƒ"/> - <color_swatch label="é¡è‰²/色調" name="Color/Tint" tool_tip="點擊以開啟é¡è‰²æŒ‘é¸å™¨"/> + <texture_picker label="æè³ª" name="Fabric" tool_tip="點按以挑é¸åœ–片"/> + <color_swatch label="é¡è‰²/色調" name="Color/Tint" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> </panel> <panel name="accordion_panel"> <accordion name="wearable_accordion"> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_skin.xml b/indra/newview/skins/default/xui/zh/panel_edit_skin.xml index fdd6d05ca5..d8552f52f0 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_skin.xml @@ -1,16 +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="Head Tattoos" name="Head Tattoos" tool_tip="點擊以挑é¸åœ–åƒ"/> - <texture_picker label="Upper Tattoos" name="Upper Tattoos" tool_tip="點擊以挑é¸åœ–åƒ"/> - <texture_picker label="Lower Tattoos" name="Lower Tattoos" tool_tip="點擊以挑é¸åœ–åƒ"/> + <texture_picker label="é 部" name="Head" tool_tip="點按以挑é¸åœ–片"/> + <texture_picker label="上åŠèº«" name="Upper Body" tool_tip="點按以挑é¸åœ–片"/> + <texture_picker label="下åŠèº«" name="Lower Body" tool_tip="點按以挑é¸åœ–片"/> </panel> <panel name="accordion_panel"> <accordion name="wearable_accordion"> - <accordion_tab name="skin_color_tab" title="Skin Color"/> - <accordion_tab name="skin_face_tab" title="Face Detail"/> - <accordion_tab name="skin_makeup_tab" title="Makeup"/> - <accordion_tab name="skin_body_tab" title="Body Detail"/> + <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/zh/panel_edit_skirt.xml b/indra/newview/skins/default/xui/zh/panel_edit_skirt.xml index 10432c16b1..34319fcc01 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_skirt.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_skirt_panel"> <panel name="avatar_skirt_color_panel"> - <texture_picker label="æè³ª" name="Fabric" tool_tip="點擊以挑é¸åœ–åƒ"/> - <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="點擊以開啟é¡è‰²æŒ‘é¸å™¨"/> + <texture_picker label="æè³ª" name="Fabric" tool_tip="點按以挑é¸åœ–片"/> + <color_swatch label="é¡è‰²/色調" name="Color/Tint" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> </panel> <panel name="accordion_panel"> <accordion name="wearable_accordion"> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_socks.xml b/indra/newview/skins/default/xui/zh/panel_edit_socks.xml index 6727781740..8e19fb5692 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_socks.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_socks_panel"> <panel name="avatar_socks_color_panel"> - <texture_picker label="æè³ª" name="Fabric" tool_tip="點擊以挑é¸åœ–åƒ"/> - <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="點擊以開啟é¡è‰²æŒ‘é¸å™¨"/> + <texture_picker label="æè³ª" name="Fabric" tool_tip="點按以挑é¸åœ–片"/> + <color_swatch label="é¡è‰²/色調" name="Color/Tint" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> </panel> <panel name="accordion_panel"> <accordion name="wearable_accordion"> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/zh/panel_edit_tattoo.xml index 1b34a0e0ee..f5111d629a 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_tattoo.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_tattoo.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_tattoo_panel"> <panel name="avatar_tattoo_color_panel"> - <texture_picker label="é 部刺é’" name="Head Tattoo" tool_tip="點擊以挑é¸åœ–åƒ"/> - <texture_picker label="上åŠèº«åˆºé’" name="Upper Tattoo" tool_tip="點擊以挑é¸ç…§ç‰‡"/> - <texture_picker label="下åŠèº«åˆºé’" name="Lower Tattoo" tool_tip="點擊以挑é¸åœ–åƒ"/> - <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="點擊以開啟é¡è‰²æŒ‘é¸å™¨"/> + <texture_picker label="é 部刺é’" name="Head Tattoo" tool_tip="點按以挑é¸åœ–片"/> + <texture_picker label="上åŠèº«åˆºé’" name="Upper Tattoo" tool_tip="點按以挑é¸åœ–片"/> + <texture_picker label="下åŠèº«åˆºé’" name="Lower Tattoo" tool_tip="點按以挑é¸åœ–片"/> + <color_swatch label="é¡è‰²/色調" name="Color/Tint" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_underpants.xml b/indra/newview/skins/default/xui/zh/panel_edit_underpants.xml index 15cae8d233..5ead7c9004 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_underpants.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_underpants_panel"> <panel name="avatar_underpants_color_panel"> - <texture_picker label="æè³ª" name="Fabric" tool_tip="點擊以挑é¸åœ–åƒ"/> - <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="Click to open color picker"/> + <texture_picker label="æè³ª" name="Fabric" tool_tip="點按以挑é¸åœ–片"/> + <color_swatch label="é¡è‰²/色調" name="Color/Tint" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> </panel> <panel name="accordion_panel"> <accordion name="wearable_accordion"> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/zh/panel_edit_undershirt.xml index 486175eb64..e497e285c9 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_undershirt.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_undershirt_panel"> <panel name="avatar_undershirt_color_panel"> - <texture_picker label="æè³ª" name="Fabric" tool_tip="點擊以挑é¸åœ–åƒ"/> - <color_swatch label="Color/Tint" name="Color/Tint" tool_tip="Click to open Color Picker"/> + <texture_picker label="æè³ª" name="Fabric" tool_tip="點按以挑é¸åœ–片"/> + <color_swatch label="é¡è‰²/色調" name="Color/Tint" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> </panel> <panel name="accordion_panel"> <accordion name="wearable_accordion"> diff --git a/indra/newview/skins/default/xui/zh/panel_edit_wearable.xml b/indra/newview/skins/default/xui/zh/panel_edit_wearable.xml index 066b1fd389..4dd7ea6d93 100644 --- a/indra/newview/skins/default/xui/zh/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/zh/panel_edit_wearable.xml @@ -1,43 +1,43 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Wearable" name="panel_edit_wearable"> +<panel label="å¯ç©¿è£æ‰®" name="panel_edit_wearable"> <string name="edit_shape_title"> - Editing Shape + é«”å½¢ç·¨è¼¯ä¸ </string> <string name="edit_skin_title"> - Editing Skin + 編輯皮膚 </string> <string name="edit_hair_title"> - Editing Hair + 編輯é é«® </string> <string name="edit_eyes_title"> - Editing Eyes + ç·¨è¼¯çœ¼ç› </string> <string name="edit_shirt_title"> - Editing Shirt + 編輯襯衫 </string> <string name="edit_pants_title"> - Editing Pants + 編輯褲å </string> <string name="edit_shoes_title"> - Editing Shoes + 編輯鞋å </string> <string name="edit_socks_title"> - Editing Socks + 編輯襪å </string> <string name="edit_jacket_title"> - Editing Jacket + 編輯外套 </string> <string name="edit_skirt_title"> - Editing Skirt + 編輯裙å </string> <string name="edit_gloves_title"> - Editing Gloves + 編輯手套 </string> <string name="edit_undershirt_title"> - Editing Undershirt + 編輯內衣 </string> <string name="edit_underpants_title"> - Editing Underpants + 編輯內褲 </string> <string name="edit_alpha_title"> åŠé€æ˜Žé®ç½©ç·¨è¼¯ä¸ @@ -110,7 +110,7 @@ <panel name="button_panel"> <layout_stack name="button_panel_ls"> <layout_panel name="save_as_btn_lp"> - <button label="å¦å˜" name="save_as_button"/> + <button label="å¦å˜ç‚º" name="save_as_button"/> </layout_panel> <layout_panel name="revert_btn_lp"> <button label="復原變更" name="revert_button"/> diff --git a/indra/newview/skins/default/xui/zh/panel_group_control_panel.xml b/indra/newview/skins/default/xui/zh/panel_group_control_panel.xml index 3915e80d43..f468aba514 100644 --- a/indra/newview/skins/default/xui/zh/panel_group_control_panel.xml +++ b/indra/newview/skins/default/xui/zh/panel_group_control_panel.xml @@ -8,7 +8,7 @@ <button label="群組通話" name="call_btn"/> </layout_panel> <layout_panel name="end_call_btn_panel"> - <button label="çµæŸé€šè©±" name="end_call_btn"/> + <button label="離開通話" name="end_call_btn"/> </layout_panel> <layout_panel name="voice_ctrls_btn_panel"> <button label="開啟語音控制" name="voice_ctrls_btn"/> diff --git a/indra/newview/skins/default/xui/zh/panel_group_general.xml b/indra/newview/skins/default/xui/zh/panel_group_general.xml index 55cbf5a617..2b16b61dd1 100644 --- a/indra/newview/skins/default/xui/zh/panel_group_general.xml +++ b/indra/newview/skins/default/xui/zh/panel_group_general.xml @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="一般" name="general_tab"> +<panel label="基本資料" name="general_tab"> <panel.string name="help_text"> - The General tab contains general information about this group, a list of members, general Group Preferences and member options. + 基本資料é 籤包å«é—œæ–¼ç¾¤çµ„çš„åŸºæœ¬è³‡è¨Šã€æˆå“¡åå–®ã€ç¾¤çµ„å好è¨å®šå’Œæˆå“¡é¸é …。 -Hover your mouse over the options for more help. +å°‡æ»‘é¼ åœæ‡¸åˆ°é¸é …上,å¯ç²å–更多幫助。 </panel.string> <panel.string name="group_info_unchanged"> - 一般群組資訊已經被變更 + 基本群組資訊已經被變更 </panel.string> <panel.string name="incomplete_member_data_str"> - Retrieving member data + æ£åœ¨æ“·å–æˆå“¡è³‡æ–™ </panel.string> <panel name="group_info_top"> - <texture_picker label="" name="insignia" tool_tip="點擊以挑é¸åœ–åƒ"/> + <texture_picker label="" name="insignia" tool_tip="點按以挑é¸åœ–片"/> <text name="prepend_founded_by"> 創辦人: </text> @@ -30,22 +30,22 @@ Hover your mouse over the options for more help. <name_list.columns label="狀態" name="status"/> </name_list> <text name="my_group_settngs_label"> - 自己 + 我自己 </text> <text name="active_title_label"> 我的é 銜: </text> - <combo_box name="active_title" tool_tip="Sets the title that appears in your avatar's name tag when this group is active."/> - <check_box label="接å—群組通知" name="receive_notices" tool_tip="Sets whether you want to receive Notices from this group. Uncheck this box if this group is spamming you."/> - <check_box label="顯示在我的檔案ä¸" name="list_groups_in_profile" tool_tip="Sets whether you want to show this group in your profile"/> + <combo_box name="active_title" tool_tip="這將è¨å®šç•¶ç¾¤çµ„æœ‰æ•ˆæ™‚ï¼Œé¡¯ç¤ºæ–¼ä½ åŒ–èº«å稱標籤的é 銜。"/> + <check_box label="接å—群組通知" name="receive_notices" tool_tip="è¨å®šä½ 是å¦è¦æŽ¥æ”¶ä¾†è‡ªé€™ç¾¤çµ„的通知。 如果該群組å°ä½ é€å‡ºå¤ªå¤šåžƒåœ¾è³‡è¨Šï¼Œä½ å¯ä»¥ä¸è¦å‹¾é¸æ¤é …目。"/> + <check_box label="顯示在我的檔案ä¸" name="list_groups_in_profile" tool_tip="è¨å®šä½ 是å¦è¦åœ¨ä½ 個人檔案上顯示這個群組"/> <panel name="preferences_container"> <text name="group_settngs_label"> 群組 </text> - <check_box label="任何人都å¯ä»¥åŠ å…¥" name="open_enrollement" tool_tip="Sets whether this group allows new members to join without being invited."/> - <check_box label="åŠ å…¥è²»ç”¨" name="check_enrollment_fee" tool_tip="Sets whether to require an enrollment fee to join the group"/> - <spinner label="L$" name="spin_enrollment_fee" tool_tip="New members must pay this fee to join the group when Enrollment Fee is checked."/> - <combo_box name="group_mature_check" tool_tip="Sets whether your group contains information rated as Moderate"> + <check_box label="任何人都å¯ä»¥åŠ å…¥" name="open_enrollement" tool_tip="è¨å®šé€™å€‹ç¾¤çµ„是å¦å…許新æˆå“¡æœªå—é‚€è«‹è‡ªè¡ŒåŠ å…¥ã€‚"/> + <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="è¨å®šä½ 的群組是å¦å«æœ‰è¢«è¨‚為é©åº¦æˆäººåˆ†ç´šçš„資訊"> <combo_item name="select_mature"> - 鏿“‡å…§å®¹åˆ†ç´š - </combo_item> diff --git a/indra/newview/skins/default/xui/zh/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/zh/panel_group_info_sidetray.xml index db01edcdb3..f979a4c53e 100644 --- a/indra/newview/skins/default/xui/zh/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/zh/panel_group_info_sidetray.xml @@ -19,7 +19,7 @@ <layout_stack name="layout"> <layout_panel name="group_accordions"> <accordion name="groups_accordion"> - <accordion_tab name="group_general_tab" title="一般"/> + <accordion_tab name="group_general_tab" title="基本資料"/> <accordion_tab name="group_roles_tab" title="角色"/> <accordion_tab name="group_notices_tab" title="通知"/> <accordion_tab name="group_land_tab" title="土地 / 資產"/> diff --git a/indra/newview/skins/default/xui/zh/panel_group_invite.xml b/indra/newview/skins/default/xui/zh/panel_group_invite.xml index 07dcb2303e..8921978b20 100644 --- a/indra/newview/skins/default/xui/zh/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/zh/panel_group_invite.xml @@ -1,24 +1,27 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="邀請一個æˆå“¡" name="invite_panel"> <panel.string name="confirm_invite_owner_str"> - Are you sure you want to invite new owner(s)? This action is permanent! + 確定邀請新的所有人? 這動作一旦完æˆï¼Œä¸èƒ½å–æ¶ˆï¼ </panel.string> <panel.string name="loading"> (載入ä¸...) </panel.string> <panel.string name="already_in_group"> - Some Residents you chose are already in the group, and so were not sent an invitation. + ä½ æ‰€é¸çš„å±…æ°‘æœ‰äº›å·²ç¶“åœ¨ç¾¤çµ„è£¡ï¼Œæ‰€ä»¥ä¸æœƒå†å°ä»–們發é€é‚€è«‹ã€‚ + </panel.string> + <panel.string name="invite_selection_too_large"> + 未é€å‡ºç¾¤çµ„邀請:所é¸çš„居民人數太多。 ç¾¤çµ„é‚€è«‹æ¯æ¬¡ä»¥ 100 人為上é™ã€‚ </panel.string> <text name="help_text"> - You can select multiple Residents to invite to your group. Click 'Open Resident Chooser' to start. + ä½ å¯ä»¥é¸æ“‡é‚€è«‹å¤šä½å±…æ°‘åˆ°ä½ çš„ç¾¤çµ„ä¾†ã€‚ é»žæŒ‰ã€Œé–‹å•Ÿå±…æ°‘é¸æ“‡å·¥å…·ã€é–‹å§‹é¸æ“‡ã€‚ </text> - <button label="é–‹å•Ÿå±…æ°‘é¸æ“‡è¦–窗" name="add_button"/> - <name_list name="invitee_list" tool_tip="Hold the Ctrl key and click Resident names to multi-select"/> - <button label="Remove Selected from List" name="remove_button" tool_tip="Removes the Residents selected above from the invite list"/> + <button label="é–‹å•Ÿå±…æ°‘é¸æ“‡å·¥å…·" name="add_button"/> + <name_list name="invitee_list" tool_tip="按下 Ctrl éµåŒæ™‚點é¸å±…æ°‘çš„åå—,å³å¯é¸å–多個人"/> + <button label="將所é¸çš„從å單移除" name="remove_button" tool_tip="å°‡ä¸Šé¢æ‰€é¸å±…民從邀請åå–®ä¸ç§»é™¤"/> <text name="role_text"> - Choose what Role to assign them to: + 鏿“‡æŒ‡æ´¾çµ¦ä»–們的角色: </text> - <combo_box name="role_name" tool_tip="Choose from the list of Roles you are allowed to assign members to"/> + <combo_box name="role_name" tool_tip="å¾žè§’è‰²æ¸…å–®é¸æ“‡ä½ 有權指派給æˆå“¡çš„角色:"/> <button label="é€å‡ºé‚€è«‹" name="ok_button"/> <button label="å–æ¶ˆ" name="cancel_button"/> <string name="GroupInvitation"> diff --git a/indra/newview/skins/default/xui/zh/panel_group_land_money.xml b/indra/newview/skins/default/xui/zh/panel_group_land_money.xml index 5ac7410c8b..81d5573e1c 100644 --- a/indra/newview/skins/default/xui/zh/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/zh/panel_group_land_money.xml @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Land & L$" name="land_money_tab"> +<panel label="土地和 L$" name="land_money_tab"> <panel.string name="help_text"> - A warning appears until the Total Land in Use is less than or = to the Total Contribution. + å°‡æŒçºŒå‡ºç¾è¦ç¤ºï¼Œç›´åˆ°ä½¿ç”¨ä¸ç¸½åœŸåœ°å°æ–¼æˆ–ç‰æ–¼ç¸½è²¢ç»é¢ç©ç‚ºæ¢ã€‚ </panel.string> <panel.string name="cant_view_group_land_text"> - You don't have permission to view group owned land + ä½ ç„¡æ¬Šå¯Ÿçœ‹ç¾¤çµ„æ‰€æœ‰åœ°ã€‚ </panel.string> <panel.string name="epmty_view_group_land_text"> æ²’æœ‰é …ç›® </panel.string> <panel.string name="cant_view_group_accounting_text"> - You don't have permission to view the group's accounting information. + ä½ ç„¡æ¬Šå¯Ÿçœ‹è©²ç¾¤çµ„çš„å¸³ç›®è³‡æ–™ã€‚ </panel.string> <panel.string name="loading_txt"> 載入ä¸... @@ -27,42 +27,42 @@ <scroll_list.columns label="éš±è—" name="hidden"/> </scroll_list> <text name="total_contributed_land_label"> - Total contribution: + 總貢ç»ï¼š </text> <text name="total_contributed_land_value"> - [AREA] m² + [AREA] 平方公尺 </text> <button label="地圖" label_selected="地圖" name="map_button"/> <text name="total_land_in_use_label"> - Total land in use: + 使用ä¸åœŸåœ°ç¸½é¢ç©ï¼š </text> <text name="total_land_in_use_value"> - [AREA] m² + [AREA] 平方公尺 </text> <text name="land_available_label"> - Land available: + å¯ç”¨åœŸåœ°ï¼š </text> <text name="land_available_value"> - [AREA] m² + [AREA] 平方公尺 </text> <text name="your_contribution_label"> ä½ çš„æç»ï¼š </text> <text name="your_contribution_units"> - m² + 平方公尺 </text> <text name="your_contribution_max_value"> ([AMOUNT] 最大) </text> <text name="group_over_limit_text"> - More land credits are needed to support land in use + 使用ä¸åœŸåœ°éœ€è¦æ›´å¤§çš„土地é¡åº¦ </text> <text name="group_money_heading"> 群組 L$ </text> </panel> <tab_container name="group_money_tab_container"> - <panel label="PLANNING" name="group_money_planning_tab"> + <panel label="ç–劃" name="group_money_planning_tab"> <text_editor name="group_money_planning_text"> 載入ä¸... </text_editor> @@ -71,15 +71,15 @@ <text_editor name="group_money_details_text"> 載入ä¸... </text_editor> - <button name="earlier_details_button" tool_tip="Back"/> - <button name="later_details_button" tool_tip="Next"/> + <button name="earlier_details_button" tool_tip="返回"/> + <button name="later_details_button" tool_tip="下一個"/> </panel> <panel label="銷售" name="group_money_sales_tab"> <text_editor name="group_money_sales_text"> 載入ä¸... </text_editor> - <button name="earlier_sales_button" tool_tip="Back"/> - <button name="later_sales_button" tool_tip="Next"/> + <button name="earlier_sales_button" tool_tip="返回"/> + <button name="later_sales_button" tool_tip="下一個"/> </panel> </tab_container> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_group_notices.xml b/indra/newview/skins/default/xui/zh/panel_group_notices.xml index 26273dd9ce..ba5f4f1bba 100644 --- a/indra/newview/skins/default/xui/zh/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/zh/panel_group_notices.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="通知" name="notices_tab"> <panel.string name="help_text"> - Notices let you send a message and an optionally attached item. -Notices only go to group members in Roles with the ability to receive Notices. -You can turn off Notices on the General tab. + 通知å¯è®“ä½ å‚³é€è¨Šæ¯ä¸¦é¸æ“‡æ€§åœ°é™„上一個附件。 +é€šçŸ¥åƒ…èƒ½å‚³çµ¦å¯æŽ¥æ”¶é€šçŸ¥çš„è§’è‰²çš„ç¾¤çµ„æˆå“¡ã€‚ +ä½ å¯åˆ°åŸºæœ¬è³‡æ–™é 籤åœç”¨é€šçŸ¥åŠŸèƒ½ã€‚ </panel.string> <panel.string name="no_notices_text"> 沒有éŽåŽ»çš„é€šçŸ¥ @@ -21,7 +21,7 @@ You can turn off Notices on the General tab. 沒發ç¾ã€‚ </text> <button label="新通知" name="create_new_notice" tool_tip="建立一個新通知"/> - <button name="refresh_notices" tool_tip="Refresh list of notices"/> + <button name="refresh_notices" tool_tip="刷新通知清單。"/> <panel label="建立新通知" name="panel_create_new_notice"> <text name="lbl"> 建立一個通知 @@ -36,19 +36,19 @@ You can turn off Notices on the General tab. 附件: </text> <text name="string"> - å°‡ç‰©å“æ‹–曳並丟於æ¤è™•ä»¥æ·»åŠ ç‚ºé™„ä»¶ï¼š + 拖曳並置放物å“到這裡,å³å¯æ·»åŠ ç‚ºé™„ä»¶ï¼š </text> <button label="æ”¶ç´å€" name="open_inventory" tool_tip="開啟收ç´å€"/> <button name="remove_attachment" tool_tip="ç”±ä½ çš„é€šçŸ¥ç§»é™¤é™„ä»¶"/> <button label="é€å‡º" label_selected="é€å‡º" name="send_notice"/> - <group_drop_target name="drop_target" tool_tip="Drag an inventory item onto this target box to send it with this notice. You must have permission to copy and transfer the item in order to attach it."/> + <group_drop_target name="drop_target" tool_tip="將一個收ç´å€ç‰©é …拖曳到這個目標箱框,便å¯éš¨é€šçŸ¥é€å‡ºè©²ç‰©é …。 ä½ å¿…é ˆæœ‰æ¬Šè¤‡è£½ä¸¦è½‰ç§»æ¤ç‰©é …,æ‰å¯ä»¥é™„åŠ å®ƒã€‚"/> </panel> <panel label="察看éŽåŽ»çš„é€šçŸ¥" name="panel_view_past_notice"> <text name="lbl"> å˜æª”的通知 </text> <text name="lbl2"> - è¦é€å‡ºä¸€å€‹æ–°é€šçŸ¥ï¼Œé»žæ“Š + 按鈕 + è¦é€å‡ºä¸€å€‹æ–°é€šçŸ¥ï¼Œé»žæŒ‰ + 按鈕 </text> <text name="lbl3"> 主旨: diff --git a/indra/newview/skins/default/xui/zh/panel_group_notify.xml b/indra/newview/skins/default/xui/zh/panel_group_notify.xml index 00462d8b0b..08a8c94876 100644 --- a/indra/newview/skins/default/xui/zh/panel_group_notify.xml +++ b/indra/newview/skins/default/xui/zh/panel_group_notify.xml @@ -3,10 +3,10 @@ <string name="message_max_lines_count" value="7"/> <string name="subject_font" value="SANSSERIF_BIG"/> <string name="date_font" value="SANSSERIF"/> - <panel label="header" name="header"> - <text name="title" value="Sender Name / Group Name"/> + <panel label="表é " name="header"> + <text name="title" value="發件者å/群組å"/> </panel> <text_editor name="message" value="訊æ¯"/> - <text name="attachment" value="Attachment"/> + <text name="attachment" value="附件"/> <button label="確定" name="btn_ok"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_group_roles.xml b/indra/newview/skins/default/xui/zh/panel_group_roles.xml index cf5fc26d14..59086c3de2 100644 --- a/indra/newview/skins/default/xui/zh/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/zh/panel_group_roles.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="æˆå“¡èˆ‡è§’色" name="roles_tab"> <panel.string name="default_needs_apply_text"> - 未儲å˜çš„è¨å®š + è®Šæ›´æœªå„²å˜ </panel.string> <panel.string name="want_apply_text"> ä½ è¦å„²å˜ä½ 的變更嗎? @@ -11,10 +11,10 @@ <panel.string name="help_text"> ä½ å¯ä»¥æ·»åŠ æˆ–ç§»é™¤ä¸€å€‹è§’è‰²æŒ‡æ´¾çµ¦æˆå“¡ã€‚ é¸è²¬å¤šå€‹æˆå“¡æ™‚åŒæ™‚按著 Ctrl éµä¸” -ä½¿ç”¨æ»‘é¼ å·¦éµé»žæ“Šä»–們的åå—。 +ä½¿ç”¨æ»‘é¼ å·¦éµé»žæŒ‰ä»–們的åå—。 </panel.string> <panel.string name="donation_area"> - [AREA] m² + [AREA] 平方公尺 </panel.string> <filter_editor label="æˆå“¡éŽæ¿¾å™¨" name="filter_input"/> <name_list name="member_list"> @@ -27,13 +27,12 @@ </panel> <panel label="角色" name="roles_sub_tab"> <panel.string name="help_text"> - Roles have a title and an allowed list of Abilities -that Members can perform. Members can belong to -one or more Roles. A group can have up to 10 Roles, -including the Everyone and Owner Roles. + 一個角色具備è·ç¨±å’Œè©²è§’色å¯ä½¿ç”¨çš„能力。 +䏀使ˆå“¡å¯æœ‰ä¸€åˆ°å¤šå€‹è§’色。 +ä¸€å€‹ç¾¤çµ„è‡³å¤šå¯æœ‰ 10 個角色,包括「任何人ã€å’Œã€Œæ‰€æœ‰äººã€ã€‚ </panel.string> <panel.string name="cant_delete_role"> - The 'Everyone' and 'Owners' Roles are special and can't be deleted. + 「任何人ã€å’Œã€Œæ‰€æœ‰äººã€æ˜¯ç‰¹è¨è§’色,ä¸å¾—刪除。 </panel.string> <filter_editor label="è§’è‰²éŽæ¿¾å™¨" name="filter_input"/> <scroll_list name="role_list"> @@ -44,13 +43,13 @@ including the Everyone and Owner Roles. <button label="新角色" name="role_create"/> <button label="刪除角色" name="role_delete"/> </panel> - <panel label="能力" name="actions_sub_tab" tool_tip="You can view an Ability's Description and which Roles and Members can execute the Ability."> + <panel label="能力" name="actions_sub_tab" tool_tip="ä½ å¯å¯Ÿçœ‹é—œæ–¼æŸä¸€èƒ½åŠ›çš„èªªæ˜Žï¼Œä¸¦å¾—çŸ¥å“ªäº›è§’è‰²å’Œæˆå“¡æ“有該能力。"> <panel.string name="help_text"> - Abilities allow Members in Roles to do specific -things in this group. There's a broad variety of Abilities. + 「能力ã€å¯è®“群組的æˆå“¡é€éŽè§’è‰²è¡Œä½¿ä¸€å®šçš„è·æ¬Šã€‚ +能力的種類ç¹å¤šã€‚ </panel.string> <filter_editor label="èƒ½åŠ›éŽæ¿¾å™¨" name="filter_input"/> - <scroll_list name="action_list" tool_tip="Select an Ability to view more details"/> + <scroll_list name="action_list" tool_tip="è«‹é¸å–一個能力以察看詳情。"/> </panel> </tab_container> <panel name="members_footer"> @@ -60,7 +59,7 @@ things in this group. There's a broad variety of Abilities. <text name="static2"> å…許的能力 </text> - <scroll_list name="member_allowed_actions" tool_tip="想çžè§£æœ‰é—œæ–¼å…許的能力的細節請查閱能力é 籤"/> + <scroll_list name="member_allowed_actions" tool_tip="想çžè§£æ¯ä¸€é …å…許的能力的詳情請查閱能力é 籤。"/> </panel> <panel name="roles_footer"> <text name="static"> @@ -75,15 +74,15 @@ things in this group. There's a broad variety of Abilities. <text name="static4"> 指派角色 </text> - <check_box label="Reveal members" name="role_visible_in_list" tool_tip="Sets whether members of this role are visible in the General tab to people outside of the group."/> + <check_box label="顯示æˆå“¡" name="role_visible_in_list" tool_tip="è¨å®šæ˜¯å¦è®“群組外的人在「一般ã€é 籤上察看到æ¤è§’色的æˆå“¡ã€‚"/> <text name="static5"> å…許的能力 </text> - <scroll_list name="role_allowed_actions" tool_tip="想çžè§£æœ‰é—œæ–¼æ¯ä¸€é …å…許的能力的細節請查閱能力é 籤"/> + <scroll_list name="role_allowed_actions" tool_tip="想çžè§£æ¯ä¸€é …å…許的能力的詳情請查閱能力é 籤。"/> </panel> <panel name="actions_footer"> <text_editor name="action_description"> - This Ability is 'Eject Members from this Group'. Only an Owner can eject another Owner. + 這個能力å¯ã€Œå°‡æœƒå“¡è‡ªæœ¬ç¾¤çµ„踢出ã€ã€‚ å¿…é ˆæ˜¯æ‰€æœ‰äººæ‰å¯è¸¢å‡ºå¦ä¸€ä½æ‰€æœ‰äººã€‚ </text_editor> <text name="static2"> 有æ¤èƒ½åŠ›çš„è§’è‰² diff --git a/indra/newview/skins/default/xui/zh/panel_im_control_panel.xml b/indra/newview/skins/default/xui/zh/panel_im_control_panel.xml index 703182e04d..e937368a2b 100644 --- a/indra/newview/skins/default/xui/zh/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/zh/panel_im_control_panel.xml @@ -8,7 +8,7 @@ <button label="åŠ ç‚ºæœ‹å‹" name="add_friend_btn"/> </layout_panel> <layout_panel name="teleport_btn_panel"> - <button label="瞬間傳é€" name="teleport_btn" tool_tip="Offer to teleport this person"/> + <button label="瞬間傳é€" name="teleport_btn" tool_tip="發出瞬間傳é€é‚€è«‹çµ¦æ¤äºº"/> </layout_panel> <layout_panel name="share_btn_panel"> <button label="分享" name="share_btn"/> diff --git a/indra/newview/skins/default/xui/zh/panel_landmark_info.xml b/indra/newview/skins/default/xui/zh/panel_landmark_info.xml index d86ba7bc7c..b50aa24d3f 100644 --- a/indra/newview/skins/default/xui/zh/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/zh/panel_landmark_info.xml @@ -3,22 +3,22 @@ <string name="title_create_landmark" value="å‰µé€ åœ°æ¨™"/> <string name="title_edit_landmark" value="編輯地標"/> <string name="title_landmark" value="地標"/> - <string name="not_available" value="(N\A)"/> + <string name="not_available" value="(ä¸é©ç”¨ï¼‰"/> <string name="unknown" value="(未知)"/> <string name="public" value="(公開)"/> <string name="server_update_text"> - Place information not available without server update. + åœ°é»žè³‡è¨Šå› ç„¡ä¼ºæœå™¨æ›´æ–°æ•…無法æä¾›ã€‚ </string> <string name="server_error_text"> - Information about this location is unavailable at this time, please try again later. + ç›®å‰ç„¡æ³•å–å¾—æ¤ä½ç½®çš„訊æ¯ï¼Œè«‹ç¨å€™å†è©¦ã€‚ </string> <string name="server_forbidden_text"> - Information about this location is unavailable due to access restrictions. Please check your permissions with the parcel owner. + 權é™ä¸è¶³ï¼Œç„¡æ³•å–å¾—æ¤ä½ç½®çš„資訊。 è«‹å‘åœ°æ®µæ‰€æœ‰äººæŸ¥è©¢ä½ çš„æ¬Šé™ã€‚ </string> <string name="acquired_date"> [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="Back"/> + <button name="back_btn" tool_tip="返回"/> <text name="title" value="地點檔案"/> <scroll_container name="place_scroll"> <panel name="scrolling_panel"> @@ -27,13 +27,13 @@ <expandable_text name="description" value="Du waltz die spritz"/> <text name="maturity_value" value="未知"/> <panel name="landmark_info_panel"> - <text name="owner_label" value="æ“æœ‰è€…:"/> + <text name="owner_label" value="所有人:"/> <text name="creator_label" value="å‰µé€ è€…ï¼š"/> <text name="created_label" value="å‰µé€ æ–¼ï¼š"/> </panel> <panel name="landmark_edit_panel"> - <text name="title_label" value="Title:"/> - <text name="notes_label" value="My notes:"/> + <text name="title_label" value="標題:"/> + <text name="notes_label" value="我的記事:"/> <text name="folder_label" value="地標ä½ç½®ï¼š"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_login.xml b/indra/newview/skins/default/xui/zh/panel_login.xml index b227fbcfc8..672d9bb1a2 100644 --- a/indra/newview/skins/default/xui/zh/panel_login.xml +++ b/indra/newview/skins/default/xui/zh/panel_login.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_login"> - <panel.string name="create_account_url"> - http://join.secondlife.com/ - </panel.string> <panel.string name="forgot_password_url"> http://secondlife.com/account/request.php </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> + <text name="log_in_text"> + 登入 + </text> <text name="username_text"> 使用者å稱: </text> @@ -15,34 +15,32 @@ <text name="password_text"> 密碼: </text> - <check_box label="記ä½å¯†ç¢¼ï¼š" name="remember_check"/> - <button label="登入" name="connect_btn"/> - <text name="mode_selection_text"> - 模å¼ï¼š - </text> - <combo_box name="mode_combo" tool_tip="è«‹é¸æ“‡ä½ 的模å¼ã€‚é¸ç”¨åŸºæœ¬æ¨¡å¼å¯ä»¥å¿«é€Ÿã€ç°¡å–®åœ°æŽ¢ç´¢èˆ‡èŠå¤©ï¼›é¸ç”¨é€²éšŽæ¨¡å¼å‰‡å¯ä»¥ä½¿ç”¨æ›´å¤šåŠŸèƒ½ã€‚"> - <combo_box.item label="基本" name="Basic"/> - <combo_box.item label="進階" name="Advanced"/> - </combo_box> + </layout_panel> + <layout_panel name="start_location_panel"> <text name="start_location_text"> 開始地點: </text> <combo_box name="start_location_combo"> <combo_box.item label="我上一次ä½ç½®" name="MyLastLocation"/> <combo_box.item label="我的家" name="MyHome"/> - <combo_box.item label="< 請輸入地å€å稱 >" name="Typeregionname"/> + <combo_box.item label="<請輸入地å€å稱>" name="Typeregionname"/> </combo_box> </layout_panel> - <layout_panel name="links"> - <text name="create_new_account_text"> - 註冊 + <layout_panel name="links_login_panel"> + <text name="login_help"> + 登入時需è¦å¹«åŠ©ï¼Ÿ </text> <text name="forgot_password_text"> å¿˜è¨˜ä½ çš„ä½¿ç”¨è€…å稱或密碼? </text> - <text name="login_help"> - 登入時需è¦å¹«åŠ©ï¼Ÿ + <button label="登入" name="connect_btn"/> + <check_box label="記ä½å¯†ç¢¼ï¼š" name="remember_check"/> + </layout_panel> + <layout_panel name="links"> + <text name="create_account_text"> + å»ºç«‹ä½ çš„å¸³è™Ÿ </text> + <button label="ç¾åœ¨å°±é–‹å§‹" name="create_new_account_btn"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_main_inventory.xml b/indra/newview/skins/default/xui/zh/panel_main_inventory.xml index 53ecf3eb19..0ad3d8506d 100644 --- a/indra/newview/skins/default/xui/zh/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/zh/panel_main_inventory.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="事物" name="main inventory panel"> <panel.string name="ItemcountFetching"> - Fetching [ITEM_COUNT] Items... [FILTER] + æ£åœ¨æ“·å– [ITEM_COUNT] å€‹ç‰©é …â€¦ [FILTER] </panel.string> <panel.string name="ItemcountCompleted"> [ITEM_COUNT] ç‰©å“ [FILTER] diff --git a/indra/newview/skins/default/xui/zh/panel_me.xml b/indra/newview/skins/default/xui/zh/panel_me.xml index a236dfc17a..aad1348e46 100644 --- a/indra/newview/skins/default/xui/zh/panel_me.xml +++ b/indra/newview/skins/default/xui/zh/panel_me.xml @@ -1,7 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="我的檔案" name="panel_me"> - <tab_container name="tabs"> - <panel label="我的檔案" name="panel_profile"/> - <panel label="我的精é¸åœ°é»ž" name="panel_picks"/> - </tab_container> +<panel label="我的個人檔案" name="panel_me"> + <panel label="我的精é¸åœ°é»ž" name="panel_picks"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_media_settings_general.xml b/indra/newview/skins/default/xui/zh/panel_media_settings_general.xml index 321c003acd..0c11befcf5 100644 --- a/indra/newview/skins/default/xui/zh/panel_media_settings_general.xml +++ b/indra/newview/skins/default/xui/zh/panel_media_settings_general.xml @@ -1,28 +1,28 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="一般" name="Media Settings General"> +<panel label="基本è¨å®š" name="Media Settings General"> <text name="home_label"> 首é : </text> <text name="home_fails_whitelist_label"> - (This page does not pass the specified whitelist) + (這é 颿œªé€šéŽæ‰€æŒ‡å®šçš„è¨±å¯æ¸…單) </text> - <line_editor name="home_url" tool_tip="The home page for this media source"/> + <line_editor name="home_url" tool_tip="這個媒體來æºçš„首é "/> <text name="preview_label"> é 覽 </text> <text name="current_url_label"> ç›®å‰é é¢ï¼š </text> - <text name="current_url" tool_tip="The current page for this media source" value=""/> + <text name="current_url" tool_tip="這個媒體來æºç›®å‰çš„é é¢" value=""/> <button label="é‡è¨" name="current_url_reset_btn"/> - <check_box initial_value="false" label="Auto Loop" name="auto_loop"/> - <check_box initial_value="false" label="First Click Interacts" name="first_click_interact"/> + <check_box initial_value="false" label="è‡ªå‹•é€£çºŒæ’æ”¾" name="auto_loop"/> + <check_box initial_value="false" label="第一次點擊將進行互動" name="first_click_interact"/> <check_box initial_value="false" label="自動縮放" name="auto_zoom"/> <check_box initial_value="false" label="è‡ªå‹•æ’æ”¾åª’é«”" name="auto_play"/> <text name="media_setting_note"> - Note: Residents can override this setting + 注æ„:居民å¯ä»¥å¦å®šé€™é …è¨å®š </text> - <check_box initial_value="false" label="Auto Scale Media on Face of Object" name="auto_scale"/> + <check_box initial_value="false" label="物件臉部媒體自動調整比例" name="auto_scale"/> <text name="size_label"> 尺寸: </text> diff --git a/indra/newview/skins/default/xui/zh/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/zh/panel_media_settings_permissions.xml index 173edc76f6..4a1eaef3a1 100644 --- a/indra/newview/skins/default/xui/zh/panel_media_settings_permissions.xml +++ b/indra/newview/skins/default/xui/zh/panel_media_settings_permissions.xml @@ -12,7 +12,7 @@ </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"/> diff --git a/indra/newview/skins/default/xui/zh/panel_media_settings_security.xml b/indra/newview/skins/default/xui/zh/panel_media_settings_security.xml index aaaf6bfb94..da84d6fe02 100644 --- a/indra/newview/skins/default/xui/zh/panel_media_settings_security.xml +++ b/indra/newview/skins/default/xui/zh/panel_media_settings_security.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Security" name="Media Settings Security"> - <check_box initial_value="false" label="Only Allow Access to Specified URL patterns" name="whitelist_enable"/> +<panel label="安全" name="Media Settings Security"> + <check_box initial_value="false" label="åªå…許進入符åˆç‰¹å®šå½¢æ…‹çš„ URL 目標" name="whitelist_enable"/> <text name="home_url_fails_some_items_in_whitelist"> - Entries that the home page fails against are marked: + 被首é è¦–ç‚ºå‡ºéŒ¯çš„ç‰©é …å·²æ¨™ç¤ºï¼š </text> <button label="æ·»åŠ " name="whitelist_add"/> <button label="刪除" name="whitelist_del"/> <text name="home_url_fails_whitelist"> - Warning: the home page specified in the General tab fails to pass this whitelist. It has been disabled until a valid entry has been added. + è¦å‘Šï¼šåœ¨åŸºæœ¬è³‡æ–™é 籤裡指定的首é ,未能通éŽé€™ä¸€è¨±å¯æ¸…單。 它已被åœç”¨ï¼Œè«‹è¨å®šæœ‰æ•ˆçš„資料。 </text> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_navigation_bar.xml b/indra/newview/skins/default/xui/zh/panel_navigation_bar.xml index 60a5767d09..7a11aa961b 100644 --- a/indra/newview/skins/default/xui/zh/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/zh/panel_navigation_bar.xml @@ -1,18 +1,23 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="navigation_bar"> - <panel name="navigation_panel"> - <pull_button name="back_btn" tool_tip="å‰å¾€ä¸Šä¸€å€‹ä½ç½®"/> - <pull_button name="forward_btn" tool_tip="å‰å¾€ä¸‹ä¸€å€‹ä½ç½®"/> - <button name="home_btn" tool_tip="瞬間傳é€åˆ°æˆ‘å®¶çš„ä½ç½®"/> - <location_input label="ä½ç½®" name="location_combo"/> - <search_combo_box label="æœå°‹" name="search_combo_box" tool_tip="æœå°‹"> - <combo_editor label="æœå°‹ [SECOND_LIFE]" name="search_combo_editor"/> - </search_combo_box> - </panel> - <favorites_bar name="favorite" tool_tip="拖曳傳é€åœ°æ¨™åˆ°æ¤ä»¥ä¾¿è®“ä½ åœ¨ç¬¬äºŒäººç”Ÿä¸èƒ½å¿«é€Ÿå‚³é€åˆ°ä½ 最愛的地點!!"> - <label name="favorites_bar_label" tool_tip="拖曳傳é€åœ°æ¨™åˆ°æ¤ä»¥ä¾¿è®“ä½ åœ¨ç¬¬äºŒäººç”Ÿä¸èƒ½å¿«é€Ÿå‚³é€åˆ°ä½ 最愛的地點!!"> - 最愛列 - </label> - <chevron_button name=">>" tool_tip="顯示更多我的最愛"/> - </favorites_bar> + <layout_stack name="nvp_stack"> + <layout_panel name="navigation_layout_panel"> + <panel name="navigation_panel"> + <pull_button name="back_btn" tool_tip="å‰å¾€ä¸Šä¸€å€‹ä½ç½®"/> + <pull_button name="forward_btn" tool_tip="å‰å¾€ä¸‹ä¸€å€‹ä½ç½®"/> + <button name="home_btn" tool_tip="瞬間返回我的家"/> + <location_input label="ä½ç½®" name="location_combo"/> + </panel> + </layout_panel> + <layout_panel name="favorites_layout_panel"> + <favorites_bar name="favorite" tool_tip="拖曳傳é€åœ°æ¨™åˆ°æ¤ä»¥ä¾¿è®“ä½ åœ¨ç¬¬äºŒäººç”Ÿä¸èƒ½å¿«é€Ÿå‚³é€åˆ°ä½ 最愛的地點!!"> + <label name="favorites_bar_label" tool_tip="拖曳傳é€åœ°æ¨™åˆ°æ¤ä»¥ä¾¿è®“ä½ åœ¨ç¬¬äºŒäººç”Ÿä¸èƒ½å¿«é€Ÿå‚³é€åˆ°ä½ 最愛的地點!!"> + 最愛列 + </label> + <more_button name=">>" tool_tip="顯示更多我的最愛"> + 詳情 â–¼ + </more_button> + </favorites_bar> + </layout_panel> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/zh/panel_navmesh_rebake.xml new file mode 100644 index 0000000000..bb52c13a11 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_navmesh_rebake.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_navmesh_rebake"> + <button label="釿–°ç”¢å‡ºåœ°å€" name="navmesh_btn" tool_tip="點按å³å¯é‡æ–°ç”¢å‡ºè©²åœ°å€çš„導航網é¢ã€‚"/> + <button label="æ£åœ¨è«‹æ±‚釿–°ç”¢å‡º" name="navmesh_btn_sending" tool_tip="æ£å‘伺æœå™¨ç™¼é€é‡æ–°ç”¢å‡ºè«‹æ±‚。"/> + <button label="åœ°å€æ£åœ¨é‡æ–°ç”¢å‡º" name="navmesh_btn_baking" tool_tip="åœ°å€æ£åœ¨é‡æ–°ç”¢å‡ºã€‚ 完æˆå¾Œï¼Œé€™å€‹æŒ‰éˆ•將會消失。"/> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_nearby_chat.xml b/indra/newview/skins/default/xui/zh/panel_nearby_chat.xml new file mode 100644 index 0000000000..fc52168bb7 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_nearby_chat.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="nearby_chat"> + <layout_stack name="stack"> + <layout_panel name="translate_chat_checkbox_lp"> + <check_box label="ç¿»è¯èŠå¤©å…§å®¹" name="translate_chat_checkbox"/> + </layout_panel> + </layout_stack> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/zh/panel_nearby_chat_bar.xml index 3cabfcfaba..9489113d09 100644 --- a/indra/newview/skins/default/xui/zh/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/zh/panel_nearby_chat_bar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="chat_bar"> - <line_editor label="點擊æ¤è™•é–‹å§‹èŠå¤©ã€‚" name="chat_box" tool_tip="按下 Enter éµä¾†èªªæˆ–按下 Ctrl+Enter 來喊å«"/> +<panel name="nearby_chat"> + <line_editor label="點按æ¤è™•é–‹å§‹èŠå¤©ã€‚" name="chat_box" tool_tip="按下 Enter éµä¾†èªªæˆ–按下 Ctrl+Enter 來喊å«"/> <button name="show_nearby_chat" tool_tip="顯示 / éš±è— é™„è¿‘çš„èŠå¤©ç´€éŒ„"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_nearby_media.xml b/indra/newview/skins/default/xui/zh/panel_nearby_media.xml index 6a4b5fcf35..c11a7a088b 100644 --- a/indra/newview/skins/default/xui/zh/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/zh/panel_nearby_media.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="nearby_media"> <string name="media_item_count_format"> - (%ld media items) + (%ld é …åª’é«”ç‰©ä»¶ï¼‰ </string> <string name="empty_item_text"> - <empty> + <空白> </string> <string name="parcel_media_name"> 地段串æµåª’é«” @@ -18,8 +18,8 @@ <panel name="minimized_controls"> <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="Bring up media prefs"/> - <button label="更多 >>" label_selected="<< æ›´å°‘" name="more_btn" tool_tip="進階控制"/> + <button name="open_prefs_btn" tool_tip="打開媒體å好è¨å®š"/> + <button label="細節>>" label_selected="<<基本" name="more_btn" tool_tip="進階控制"/> </panel> <panel name="nearby_media_panel"> <text name="nearby_media_title"> @@ -35,9 +35,9 @@ <combo_box.item label="在其他化身身上" name="OnOthers"/> </combo_box> <scroll_list name="media_list"> - <scroll_list.columns label="Proximity" name="media_proximity"/> - <scroll_list.columns label="Visible" name="media_visibility"/> - <scroll_list.columns label="Class" name="media_class"/> + <scroll_list.columns label="é„°è¿‘" name="media_proximity"/> + <scroll_list.columns label="å¯çœ‹åˆ°" name="media_visibility"/> + <scroll_list.columns label="類型" name="media_class"/> <scroll_list.columns label="å稱" name="media_name"/> <scroll_list.columns label="除錯" name="media_debug"/> </scroll_list> @@ -59,10 +59,10 @@ <button name="mute_btn" tool_tip="éœéŸ³æ‰€é¸æ“‡çš„åª’é«”éŸ³é »"/> </layout_panel> <layout_panel name="zoom"> - <button name="zoom_btn" tool_tip="Zoom into selected media"/> + <button name="zoom_btn" tool_tip="以所é¸åª’體為ä¸å¿ƒæ”¾å¤§"/> </layout_panel> <layout_panel name="unzoom"> - <button name="unzoom_btn" tool_tip="Zoom back from selected media"/> + <button name="unzoom_btn" tool_tip="縮å°é 離所é¸åª’é«”"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/zh/panel_outbox_inventory.xml new file mode 100644 index 0000000000..8de0bb0e4d --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_outbox_inventory.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<outbox_inventory_panel name="inventory_outbox" tool_tip="å°‡ç‰©é …æ‹–æ›³ä¸¦ç½®æ”¾åˆ°é€™è£¡ï¼Œæº–å‚™åœ¨ä½ çš„å•†åº—å‡ºå”®"/> diff --git a/indra/newview/skins/default/xui/zh/panel_outfit_edit.xml b/indra/newview/skins/default/xui/zh/panel_outfit_edit.xml index 263106d13a..a698da0ab1 100644 --- a/indra/newview/skins/default/xui/zh/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/zh/panel_outfit_edit.xml @@ -5,7 +5,7 @@ <string name="unsaved_changes" value="變更未儲å˜"/> <string name="now_editing" value="ç¾åœ¨ç·¨è¼¯ä¸"/> <panel.string name="not_available"> - (N\A) + (ä¸é©ç”¨ï¼‰ </panel.string> <panel.string name="unknown"> (未知) @@ -15,7 +15,7 @@ <string name="Filter.Objects" value="物件"/> <string name="Filter.Clothing" value="æœè£"/> <string name="Filter.Bodyparts" value="身體部ä½"/> - <string name="replace_body_part" value="點擊以å–ä»£ä½ ç¾å˜çš„體形"/> + <string name="replace_body_part" value="點按以å–ä»£ä½ ç¾å˜çš„體形"/> <text name="title" value="ç·¨è¼¯è£æ‰®"/> <panel name="header_panel"> <panel name="outfit_name_and_status"> @@ -39,10 +39,10 @@ </layout_panel> </layout_stack> <panel name="no_add_wearables_button_bar"> - <button name="shop_btn_1" tool_tip="Visit the SL Marketplace. You can also select something you are wearing, then click here to see more things like it"/> + <button name="shop_btn_1" tool_tip="å‰å¾€ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚集。 ä½ ä¹Ÿå¯é¸æ“‡ä½ ç©¿è‘—ä¸çš„一個物件,å†é»žæŒ‰é€™è£¡å¯Ÿçœ‹å…¶ä»–åŒé¡žç‰©ä»¶ã€‚"/> </panel> <panel name="add_wearables_button_bar"> - <button name="shop_btn_2" tool_tip="Visit the SL Marketplace. You can also select something you are wearing, then click here to see more things like it"/> + <button name="shop_btn_2" tool_tip="å‰å¾€ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚集。 ä½ ä¹Ÿå¯é¸æ“‡ä½ ç©¿è‘—ä¸çš„一個物件,å†é»žæŒ‰é€™è£¡å¯Ÿçœ‹å…¶ä»–åŒé¡žç‰©ä»¶ã€‚"/> </panel> <panel name="save_revert_button_bar"> <layout_stack name="button_bar_ls"> @@ -50,7 +50,7 @@ <button label="儲å˜" name="save_btn"/> </layout_panel> <layout_panel name="revert_btn_lp"> - <button label="復原變更" name="revert_btn" tool_tip="Revert to last saved version"/> + <button label="復原變更" name="revert_btn" tool_tip="æ¢å¾©ä¸Šä¸€å€‹å·²å„²å˜ç‰ˆæœ¬"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/zh/panel_outfits_inventory.xml index d9718d8294..8dd93543c0 100644 --- a/indra/newview/skins/default/xui/zh/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/zh/panel_outfits_inventory.xml @@ -4,19 +4,19 @@ ç©¿ä¸Šæ‰€é¸æ“‡çš„è£æ‰® </panel.string> <panel.string name="wear_items_tooltip"> - Wear selected items + ç©¿ä¸Šæ‰€é¸æ“‡çš„物件 </panel.string> <tab_container name="appearance_tabs"> <panel label="æˆ‘çš„è£æ‰®" name="outfitslist_tab"/> - <panel label="WEARING" name="cof_tab"/> + <panel label="ç›®å‰ç©¿è‘—" name="cof_tab"/> </tab_container> <panel name="bottom_panel"> <layout_stack name="bottom_panel_ls"> <layout_panel name="save_btn_lp"> - <button label="å¦å˜" name="save_btn"/> + <button label="å¦å˜ç‚º" name="save_btn"/> </layout_panel> <layout_panel name="wear_btn_lp"> - <button label="Wear" name="wear_btn"/> + <button label="穿上" name="wear_btn"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_outfits_list.xml b/indra/newview/skins/default/xui/zh/panel_outfits_list.xml index a4b041469b..cfb0180f9c 100644 --- a/indra/newview/skins/default/xui/zh/panel_outfits_list.xml +++ b/indra/newview/skins/default/xui/zh/panel_outfits_list.xml @@ -1,5 +1,9 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="Outfits"> + <accordion name="outfits_accordion"> + <no_matched_tabs_text name="no_matched_outfits_msg" value="找ä¸åˆ°ä½ è¦æ‰¾çš„嗎? 請試試 [secondlife:///app/search/places/ æœå°‹]。"/> + <no_visible_tabs_text name="no_outfits_msg" value="ä½ é‚„æ²’æœ‰ä»»ä½•è£æ‰®ã€‚ 請試試[secondlife:///app/search/all/ æœå°‹]"/> + </accordion> <panel name="bottom_panel"> <menu_button name="options_gear_btn" tool_tip="顯示é¡å¤–é¸é …"/> <button name="trash_btn" tool_tip="åˆªé™¤æ‰€é¸æ“‡çš„è£æ‰®"/> diff --git a/indra/newview/skins/default/xui/zh/panel_people.xml b/indra/newview/skins/default/xui/zh/panel_people.xml index 9c265622fa..59ea7b70e2 100644 --- a/indra/newview/skins/default/xui/zh/panel_people.xml +++ b/indra/newview/skins/default/xui/zh/panel_people.xml @@ -1,23 +1,23 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Side tray panel --> <panel label="人群" name="people_panel"> - <string 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_recent_people" value="沒有最近的人。 想找人見é¢èŠå¤©ï¼Ÿ 請試試[secondlife:///app/search/people æœå°‹]或[secondlife:///app/worldmap 世界地圖]。"/> + <string name="no_filtered_recent_people" value="找ä¸åˆ°ä½ è¦æ‰¾çš„嗎? 請試試[secondlife:///app/search/people/[SEARCH_TERM] æœå°‹]。"/> + <string name="no_one_near" value="附近無人。 想找人見é¢èŠå¤©ï¼Ÿ 請試試[secondlife:///app/search/people æœå°‹]或[secondlife:///app/worldmap 世界地圖]。"/> + <string name="no_one_filtered_near" value="找ä¸åˆ°ä½ è¦æ‰¾çš„嗎? 請試試[secondlife:///app/search/people/[SEARCH_TERM] æœå°‹]。"/> <string name="no_friends_online" value="無朋å‹ä¸Šç·š"/> <string name="no_friends" value="無朋å‹"/> <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]. + 用 [secondlife:///app/search/people æœå°‹] 找朋å‹ï¼Œæˆ–鏿“‡ä¸€ä½å±…æ°‘ï¼Œå†æŒ‰å³éµå°‡ä»–åŠ ç‚ºæœ‹å‹ã€‚ +想找人見é¢èŠå¤©ï¼Ÿ 請試一試 [secondlife:///app/worldmap 世界地圖]。 </string> <string name="no_filtered_friends_msg"> - Didn't find what you're looking for? Try [secondlife:///app/search/people/[SEARCH_TERM] Search]. + 找ä¸åˆ°ä½ è¦æ‰¾çš„嗎? 請試試[secondlife:///app/search/people/[SEARCH_TERM] æœå°‹]。 </string> <string name="people_filter_label" value="äººå“¡éŽæ¿¾å™¨"/> <string name="groups_filter_label" value="ç¾¤çµ„éŽæ¿¾å™¨"/> - <string name="no_filtered_groups_msg" value="沒有發ç¾ä½ è¦æ‰¾çš„嗎?何ä¸è©¦è©¦ [secondlife:///app/search/groups/[SEARCH_TERM] æœå°‹]。"/> - <string name="no_groups_msg" value="æƒ³æ‰¾å°‹ç¾¤çµ„åŠ å…¥å—Žï¼Ÿä½•ä¸è©¦è©¦ [secondlife:///app/search/groups æœå°‹]。"/> + <string name="no_filtered_groups_msg" value="找ä¸åˆ°ä½ è¦æ‰¾çš„嗎? 請試試[secondlife:///app/search/groups/[SEARCH_TERM] æœå°‹]。"/> + <string name="no_groups_msg" value="è¦å°‹æ‰¾ç¾¤çµ„è€ƒæ…®åŠ å…¥å—Žï¼Ÿ 請試試[secondlife:///app/search/groups æœå°‹]。"/> <string name="MiniMapToolTipMsg" value="[REGION](雙擊以開啟地圖,按下 shift 鵿‹–曳來平移)"/> <string name="AltMiniMapToolTipMsg" value="[REGION](雙擊以瞬間傳é€ï¼ŒæŒ‰ä¸‹ shift 鵿‹–曳來平移)"/> <filter_editor label="éŽæ¿¾å™¨" name="filter_input"/> @@ -25,7 +25,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M <panel label="附近" name="nearby_panel"> <panel label="bottom_panel" name="bottom_panel"> <menu_button name="nearby_view_sort_btn" tool_tip="é¸é …"/> - <button name="add_friend_btn" tool_tip="æ·»åŠ å·²é¸æ“‡çš„居民到Adä½ çš„æœ‹å‹æ¸…å–®"/> + <button name="add_friend_btn" tool_tip="æ·»åŠ æ‰€é¸çš„å±…æ°‘åˆ°ä½ çš„æœ‹å‹æ¸…å–®"/> </panel> </panel> <panel label="我的朋å‹" name="friends_panel"> @@ -39,7 +39,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M <menu_button name="friends_viewsort_btn" tool_tip="顯示é¡å¤–é¸é …"/> </layout_panel> <layout_panel name="add_btn_panel"> - <button name="add_btn" tool_tip="å‘å±…æ°‘æå‡ºåŠ ç‚ºå¥½å‹é‚€è«‹"/> + <button name="add_btn" tool_tip="å‘居民發出交å‹é‚€è«‹"/> </layout_panel> <layout_panel name="trash_btn_panel"> <dnd_button name="del_btn" tool_tip="ç”±ä½ çš„æœ‹å‹æ¸…å–®ç§»é™¤æ‰€é¸æ“‡çš„人"/> @@ -66,17 +66,17 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M <layout_panel name="view_profile_btn_lp"> <button label="檔案" name="view_profile_btn" tool_tip="顯示圖片ã€ç¾¤çµ„與其他居民資訊"/> </layout_panel> - <layout_panel name="chat_btn_lp"> + <layout_panel name="im_btn_lp"> <button label="IM" name="im_btn" tool_tip="é–‹å•Ÿå³æ™‚è¨Šæ¯æœƒè©±"/> </layout_panel> - <layout_panel name="chat_btn_lp"> - <button label="通話" name="call_btn" tool_tip="與æ¤å±…民進行通話"/> + <layout_panel name="call_btn_lp"> + <button label="通話" name="call_btn" tool_tip="和這ä½å±…民通話"/> </layout_panel> - <layout_panel name="chat_btn_lp"> + <layout_panel name="share_btn_lp"> <button label="分享" name="share_btn" tool_tip="分享一個收ç´å€ç‰©å“"/> </layout_panel> - <layout_panel name="chat_btn_lp"> - <button label="瞬間傳é€" name="teleport_btn" tool_tip="發給瞬間傳é€è«‹æ±‚"/> + <layout_panel name="teleport_btn_lp"> + <button label="瞬間傳é€" name="teleport_btn" tool_tip="發出瞬間傳é€é‚€è«‹"/> </layout_panel> </layout_stack> <layout_stack name="bottom_bar_ls1"> diff --git a/indra/newview/skins/default/xui/zh/panel_picks.xml b/indra/newview/skins/default/xui/zh/panel_picks.xml index 15733b71b0..98d36eaea0 100644 --- a/indra/newview/skins/default/xui/zh/panel_picks.xml +++ b/indra/newview/skins/default/xui/zh/panel_picks.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="ç²¾é¸åœ°é»ž" name="panel_picks"> <string name="no_picks" value="ç„¡ç²¾é¸åœ°é»ž"/> - <string name="no_classifieds" value="No Classifieds"/> + <string name="no_classifieds" value="ç¦æ¢å€‹äººå»£å‘Š"/> <accordion name="accordion"> <accordion_tab name="tab_picks" title="ç²¾é¸åœ°é»ž"/> - <accordion_tab name="tab_classifieds" title="Classifieds"/> + <accordion_tab name="tab_classifieds" title="個人廣告"/> </accordion> <panel label="bottom_panel" name="edit_panel"> <layout_stack name="edit_panel_ls"> diff --git a/indra/newview/skins/default/xui/zh/panel_place_profile.xml b/indra/newview/skins/default/xui/zh/panel_place_profile.xml index 1772b65434..a364f732d8 100644 --- a/indra/newview/skins/default/xui/zh/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/zh/panel_place_profile.xml @@ -1,20 +1,20 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="place_profile"> - <string name="on" value="On"/> - <string name="off" value="Off"/> - <string name="anyone" value="Anyone"/> - <string name="available" value="available"/> + <string name="on" value="啟動"/> + <string name="off" value="關閉"/> + <string name="anyone" value="任何人"/> + <string name="available" value="å¯ç”¨çš„"/> <string name="allocated" value="已分é…"/> <string name="title_place" value="地點檔案"/> <string name="title_teleport_history" value="çž¬é–“å‚³é€æ·å²ç´€éŒ„"/> - <string name="not_available" value="(N\A)"/> + <string name="not_available" value="(ä¸é©ç”¨ï¼‰"/> <string name="unknown" value="(未知)"/> <string name="public" value="(公開)"/> <string name="none_text" value="(無)"/> <string name="sale_pending_text" value="(擱置銷售)"/> - <string name="group_owned_text" value="ï¼ˆç¾¤çµ„æ‰€æ“æœ‰ï¼‰"/> + <string name="group_owned_text" value="ï¼ˆç”±ç¾¤çµ„æ‰€æ“æœ‰ï¼‰"/> <string name="price_text" value="L$"/> - <string name="area_text" value="m²"/> + <string name="area_text" value="平方公尺"/> <string name="all_residents_text" value="全部居民"/> <string name="group_text" value="群組"/> <string name="can_resell"> @@ -33,10 +33,10 @@ åœ°é»žè³‡è¨Šå› ç„¡ä¼ºæœå™¨æ›´æ–°æ•…無法æä¾›ã€‚ </string> <string name="server_error_text"> - Information about this location is unavailable at this time, please try again later. + ç›®å‰ç„¡æ³•å–å¾—æ¤ä½ç½®çš„訊æ¯ï¼Œè«‹ç¨å€™å†è©¦ã€‚ </string> <string name="server_forbidden_text"> - Information about this location is unavailable due to access restrictions. Please check your permissions with the parcel owner. + 權é™ä¸è¶³ï¼Œç„¡æ³•å–å¾—æ¤ä½ç½®çš„資訊。 è«‹å‘åœ°æ®µæ‰€æœ‰äººæŸ¥è©¢ä½ çš„æ¬Šé™ã€‚ </string> <string name="acquired_date"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] @@ -48,7 +48,7 @@ <text name="region_title" value="SampleRegion"/> <text name="parcel_title" value="SampleParcel, Name Long (145, 228, 26)"/> <expandable_text name="description" value="Du waltz die spritz"/> - <text name="owner_label" value="æ“æœ‰è€…:"/> + <text name="owner_label" value="所有人:"/> <text name="owner_value" value="Alex Superduperlongenamenton"/> <text name="maturity_value" value="未知"/> <accordion name="advanced_info_accordion"> @@ -57,18 +57,20 @@ <text name="rating_label" value="分級:"/> <text name="rating_value" value="未知"/> <text name="voice_label" value="語音:"/> - <text name="voice_value" value="On"/> + <text name="voice_value" value="啟動"/> <text name="fly_label" value="飛行:"/> - <text name="fly_value" value="On"/> + <text name="fly_value" value="啟動"/> <text name="push_label" value="推撞:"/> - <text name="push_value" value="Off"/> + <text name="push_value" value="關閉"/> <text name="build_label" value="å»ºé€ ï¼š"/> - <text name="build_value" value="On"/> + <text name="build_value" value="啟動"/> <text name="scripts_label" value="腳本:"/> - <text name="scripts_value" value="On"/> + <text name="scripts_value" value="啟動"/> <text name="damage_label" value="傷害:"/> - <text name="damage_value" value="Off"/> - <button label="關於土地" name="about_land_btn"/> + <text name="damage_value" value="關閉"/> + <text name="see_avatars_label" value="察看化身:"/> + <text name="see_avatars_value" value="關閉"/> + <button label="土地資料" name="about_land_btn"/> </panel> </accordion_tab> <accordion_tab name="region_information_tab" title="地å€"> @@ -79,21 +81,21 @@ <text name="region_type" value="Moose"/> <text name="region_rating_label" value="分級:"/> <text name="region_rating" value="完全æˆäºº"/> - <text name="region_owner_label" value="æ“æœ‰è€…:"/> + <text name="region_owner_label" value="所有人:"/> <text name="region_owner" value="moose Van Moose extra long name moose"/> <text name="region_group_label" value="群組:"/> <text name="region_group"> The Mighty Moose of mooseville soundvillemoose </text> - <button label="åœ°å€ / é ˜åœ°" name="region_info_btn"/> + <button label="地å€/é ˜åœ°" name="region_info_btn"/> </panel> </accordion_tab> <accordion_tab name="estate_information_tab" title="é ˜åœ°"> <panel name="estate_information_panel"> <text name="estate_name_label" value="é ˜åœ°ï¼š"/> <text name="estate_rating_label" value="分級:"/> - <text name="estate_owner_label" value="æ“æœ‰è€…:"/> - <text name="estate_owner" value="Testing owner name length with long name"/> + <text name="estate_owner_label" value="所有人:"/> + <text name="estate_owner" value="æ£åœ¨æ¸¬è©¦å稱很長很長很長的所有人å稱…"/> <text name="covenant_label" value="契約:"/> </panel> </accordion_tab> diff --git a/indra/newview/skins/default/xui/zh/panel_places.xml b/indra/newview/skins/default/xui/zh/panel_places.xml index 8ac464271e..08cae610f6 100644 --- a/indra/newview/skins/default/xui/zh/panel_places.xml +++ b/indra/newview/skins/default/xui/zh/panel_places.xml @@ -8,7 +8,7 @@ <layout_panel name="lp1"> <layout_stack name="bottom_bar_ls1"> <layout_panel name="teleport_btn_lp"> - <button label="瞬間傳é€" name="teleport_btn" tool_tip="瞬間傳é€åˆ°æ‰€é¸æ“‡çš„å€åŸŸ"/> + <button label="瞬間傳é€" name="teleport_btn" tool_tip="瞬間傳é€åˆ°æ‰€é¸çš„å€åŸŸ"/> </layout_panel> <layout_panel name="chat_btn_lp"> <button label="地圖" name="map_btn" tool_tip="åœ¨ä¸–ç•Œåœ°åœ–ä¸Šé¡¯ç¤ºç›¸å°æ‡‰çš„å€åŸŸ"/> @@ -24,7 +24,7 @@ <menu_button name="overflow_btn" tool_tip="顯示é¡å¤–é¸é …"/> </layout_panel> </layout_stack> - <layout_stack name="bottom_bar_ls3"> + <layout_stack name="bottom_bar_profile_ls"> <layout_panel name="profile_btn_lp"> <button label="檔案" name="profile_btn" tool_tip="顯示地點檔案"/> </layout_panel> diff --git a/indra/newview/skins/default/xui/zh/floater_postcard.xml b/indra/newview/skins/default/xui/zh/panel_postcard_message.xml index 6f6b75f468..563c4fca3c 100644 --- a/indra/newview/skins/default/xui/zh/floater_postcard.xml +++ b/indra/newview/skins/default/xui/zh/panel_postcard_message.xml @@ -1,33 +1,21 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="EMAIL SNAPSHOT"> - <floater.string name="default_subject"> - Postcard from [SECOND_LIFE]. - </floater.string> - <floater.string name="default_message"> - Check this out! - </floater.string> - <floater.string name="upload_message"> - 傳é€ä¸... - </floater.string> +<panel name="panel_postcard_message"> <text name="to_label"> - 收件人電å郵件地å€ï¼š - </text> - <text name="from_label"> - ä½ çš„é›»å郵件地å€ï¼š + 收件人: </text> <text name="name_label"> - ä½ çš„å稱: + 發件人: </text> <text name="subject_label"> 主旨: </text> <line_editor label="在æ¤è¼¸å…¥ä½ 的主旨。" name="subject_form"/> <text name="msg_label"> - 訓æ¯ï¼š + 訊æ¯ï¼š </text> <text_editor name="msg_form"> 在æ¤è¼¸å…¥ä½ 的訊æ¯ã€‚ </text_editor> <button label="å–æ¶ˆ" name="cancel_btn"/> <button label="é€å‡º" name="send_btn"/> -</floater> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_postcard_settings.xml b/indra/newview/skins/default/xui/zh/panel_postcard_settings.xml new file mode 100644 index 0000000000..900ab3a54e --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_postcard_settings.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_postcard_settings"> + <combo_box label="è§£æžåº¦" name="postcard_size_combo"> + <combo_box.item label="ç›®å‰è¦–窗" 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="自訂" name="Custom"/> + </combo_box> + <layout_stack name="postcard_image_params_ls"> + <layout_panel name="postcard_image_size_lp"> + <spinner label="寬" name="postcard_snapshot_width"/> + <spinner label="高度" name="postcard_snapshot_height"/> + <check_box label="éŽ–ä½æ¯”例" name="postcard_keep_aspect_check"/> + </layout_panel> + <layout_panel name="postcard_image_format_quality_lp"> + <slider label="圖åƒå“質" name="image_quality_slider"/> + <text name="image_quality_level"> + ([QLVL]) + </text> + </layout_panel> + </layout_stack> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/zh/panel_preferences_advanced.xml index c5dce10d63..3a7d79e04b 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_advanced.xml @@ -3,6 +3,19 @@ <panel.string name="aspect_ratio_text"> [NUM]:[DEN] </panel.string> + <text name="Cache:"> + å¿«å–: + </text> + <spinner label="å¿«å–å¤§å° (64 - 9984MB)" name="cachesizespinner"/> + <text name="text_box5"> + MB + </text> + <button label="清除快å–" label_selected="清除快å–" name="clear_cache"/> + <text name="Cache location"> + å¿«å–ä½ç½®ï¼š + </text> + <button label="ç€è¦½" label_selected="ç€è¦½" name="set_cache"/> + <button label="é è¨ä½ç½®" label_selected="é è¨ä½ç½®" name="default_cache_location"/> <text name="UI Size:"> 使用者界é¢å°ºå¯¸ï¼š </text> diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml b/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml index 738c77fd08..cf2f81d313 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml @@ -27,31 +27,9 @@ </text> <check_box label="群組èŠå¤©" name="EnableGroupChatPopups" tool_tip="當群組èŠå¤©è¨Šæ¯æŠµé”時查看çªé¡¯å¼è¦–窗"/> <check_box label="IM èŠå¤©" name="EnableIMChatPopups" tool_tip="ç•¶å³æ™‚è¨Šæ¯æŠµé”æ™‚查看çªé¡¯å¼è¦–窗"/> - <spinner label="Nearby chat toasts life time:" name="nearby_toasts_lifetime"/> - <spinner label="Nearby chat toasts fading time:" name="nearby_toasts_fadingtime"/> - <text name="translate_chb_label"> - èŠå¤©æ™‚ä½¿ç”¨æ©Ÿå™¨è‡ªå‹•é€²è¡Œç¿»è¯ - </text> - <text name="translate_language_text"> - èŠå¤©ç¿»è¯ç‚ºï¼š - </text> - <combo_box name="translate_language_combobox"> - <combo_box.item label="系統é è¨" name="System Default Language"/> - <combo_box.item label="English" name="English"/> - <combo_box.item label="Dansk (Danish)" name="Danish"/> - <combo_box.item label="Deutsch (German)" name="German"/> - <combo_box.item label="Español (Spanish)" name="Spanish"/> - <combo_box.item label="Français (French)" name="French"/> - <combo_box.item label="Italiano (Italian)" name="Italian"/> - <combo_box.item label="Magyar (Hungarian)" name="Hungarian"/> - <combo_box.item label="Nederlands (Dutch)" name="Dutch"/> - <combo_box.item label="Polski (Polish)" name="Polish"/> - <combo_box.item label="Português (Portuguese)" name="Portugese"/> - <combo_box.item label="РуÑÑкий (Russian)" name="Russian"/> - <combo_box.item label="Türkçe (Turkish)" name="Turkish"/> - <combo_box.item label="УкраїнÑька (Ukrainian)" name="Ukrainian"/> - <combo_box.item label="䏿–‡ (æ£é«”) (Chinese)" name="Chinese"/> - <combo_box.item label="日本語 (Japanese)" name="Japanese"/> - <combo_box.item label="한êµì–´ (Korean)" name="Korean"/> - </combo_box> + <spinner label="附近èŠå¤©å…§å®¹æç¤ºæ¡†åœé§æ™‚間:" name="nearby_toasts_lifetime"/> + <spinner label="附近èŠå¤©å…§å®¹æç¤ºæ¡†æ¶ˆé€€æ™‚間:" name="nearby_toasts_fadingtime"/> + <button label="ç¿»è¯â€¦" name="ok_btn"/> + <button label="自動å–代…" name="autoreplace_showgui"/> + <button label="æ‹¼å—æª¢æŸ¥â€¦" name="spellcheck_showgui"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_colors.xml b/indra/newview/skins/default/xui/zh/panel_preferences_colors.xml index 8d92eadd20..6af4bb8970 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_colors.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_colors.xml @@ -3,12 +3,12 @@ <text name="effects_color_textbox"> æˆ‘çš„æ•ˆæžœï¼ˆé¸æ“‡æŒ‡æ¨™ï¼‰ï¼š </text> - <color_swatch name="effect_color_swatch" tool_tip="點擊以開啟é¡è‰²æŒ‘é¸å™¨"/> + <color_swatch name="effect_color_swatch" tool_tip="點按以開啟é¡è‰²æŒ‘é¸å™¨"/> <text name="font_colors"> èŠå¤©å—åž‹é¡è‰²ï¼š </text> <text name="text_box1"> - 自己 + 我自己 </text> <text name="text_box2"> 其他人 @@ -22,11 +22,14 @@ <text name="text_box5"> 錯誤 </text> + <text name="text_box10"> + 直接 + </text> <text name="text_box7"> - æ“æœ‰è€… + 所有人 </text> <text name="text_box9"> - URLs + URL </text> <text name="bubble_chat"> å稱標籤背景色(亦會影響èŠå¤©æ³¡æ³¡ï¼‰ï¼š diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_general.xml b/indra/newview/skins/default/xui/zh/panel_preferences_general.xml index 6827fab6e6..7e67a0d02d 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_general.xml @@ -1,19 +1,22 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="一般" name="general_panel"> +<panel label="基本è¨å®š" name="general_panel"> <text name="language_textbox"> 語言: </text> <combo_box name="language_combobox"> <combo_box.item label="系統é è¨" name="System Default Language"/> - <combo_box.item label="English (英語)" name="English"/> - <combo_box.item label="Dansk (丹麥語) - Beta" name="Danish"/> - <combo_box.item label="Deutsch (德語) - Beta" name="Deutsch(German)"/> - <combo_box.item label="Español (西ç牙語) - Beta" name="Spanish"/> - <combo_box.item label="Français (法語) - Beta" name="French"/> - <combo_box.item label="Italiano (義大利語) - Beta" name="Italian"/> - <combo_box.item label="Polski (波è˜èªžï¼‰ - Beta" name="Polish"/> - <combo_box.item label="Português (葡è„牙語) - Beta" name="Portugese"/> - <combo_box.item label="日本語 (日語) - Beta" name="(Japanese)"/> + <combo_box.item label="英語" name="English"/> + <combo_box.item label="Dansk(丹麥語)- 試用版" name="Danish"/> + <combo_box.item label="Deutsch(德語)- 試用版" name="Deutsch(German)"/> + <combo_box.item label="Español(西ç牙語)- 試用版" name="Spanish"/> + <combo_box.item label="Français(法語)- 試用版" name="French"/> + <combo_box.item label="Italiano(義大利語)- 試用版" name="Italian"/> + <combo_box.item label="Polski(波è˜èªžï¼‰- 試用版" name="Polish"/> + <combo_box.item label="Português(葡è„牙語)- 試用版" name="Portugese"/> + <combo_box.item label="РуÑÑкий(俄羅斯語)- 測試版" name="Russian"/> + <combo_box.item label="Türkçe(土耳其語)- 試用版" name="Turkish"/> + <combo_box.item label="日本語(日語)- 試用版" name="(Japanese)"/> + <combo_box.item label="æ£é«”䏿–‡ - 測試版" name="Traditional Chinese"/> </combo_box> <text name="language_textbox2"> ï¼ˆé ˆé‡æ–°å•Ÿå‹•) @@ -38,15 +41,15 @@ å稱標籤: </text> <radio_group name="Name_Tag_Preference"> - <radio_item label="Off" name="radio" value="0"/> - <radio_item label="On" name="radio2" value="1"/> + <radio_item label="關閉" name="radio" value="0"/> + <radio_item label="啟動" name="radio2" value="1"/> <radio_item label="ç°¡çŸé¡¯ç¤º" name="radio3" value="2"/> </radio_group> <check_box label="我的åå—" name="show_my_name_checkbox1"/> <check_box label="使用者å稱" name="show_slids" tool_tip="顯示使用者åç¨±ï¼Œå°±åƒ bobsmith123 這類的"/> - <check_box label="群組é 銜" name="show_all_title_checkbox1" tool_tip="顯示群組é éŠœï¼Œåƒæ˜¯ Officer 或æˆå“¡"/> + <check_box label="群組é 銜" name="show_all_title_checkbox1" tool_tip="顯示群組é 銜,如è·å“¡æˆ–æˆå“¡"/> <check_box label="高亮標示朋å‹" name="show_friends" tool_tip="é«˜äº®é¡¯ç¤ºä½ æœ‹å‹çš„å稱標籤"/> - <check_box label="察看顯示å稱" name="display_names_check" tool_tip="Check to use display names in chat, IM, name tags, etc."/> + <check_box label="察看顯示å稱" name="display_names_check" tool_tip="若勾é¸ï¼Œå°‡åœ¨èŠå¤©ã€IM å’Œå稱標籤ç‰è™•使用顯示å稱。"/> <text name="inworld_typing_rg_label"> æŒ‰ä¸‹å—æ¯éµï¼š </text> diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/zh/panel_preferences_graphics1.xml index 874fb6b218..3948a48992 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_graphics1.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="圖形" name="Display panel"> +<panel label="顯åƒ" name="Display panel"> <text name="QualitySpeed"> å“質與速度: </text> @@ -27,8 +27,20 @@ </text> <check_box initial_value="true" label="æ¸…æ¾ˆé€æ˜Žçš„æ°´" name="TransparentWater"/> <check_box initial_value="true" label="å‡¹å‡¸æ˜ å°„èˆ‡å…‰æ¾¤æ•ˆæžœ" name="BumpShiny"/> + <check_box initial_value="true" label="本地光線" name="LocalLights"/> <check_box initial_value="true" label="基本著色" name="BasicShaders" tool_tip="關閉æ¤ä¸€é¸é …å¯èƒ½é¿å…部分顯示å¡é©…å‹•ç¨‹å¼ææ¯€ç•¶æ©Ÿ"/> <check_box initial_value="true" label="大氣著色" name="WindLightUseAtmosShaders"/> + <check_box initial_value="true" label="光線和陰影" name="UseLightShaders"/> + <check_box initial_value="true" label="環境光é®è”½" name="UseSSAO"/> + <check_box initial_value="true" label="景深" name="UseDoF"/> + <text name="shadows_label"> + 陰影: + </text> + <combo_box name="ShadowDetail"> + <combo_box.item label="ç„¡" name="0"/> + <combo_box.item label="æ—¥ / 月" name="1"/> + <combo_box.item label="æ—¥ / 月 + 投影物" name="2"/> + </combo_box> <text name="reflection_label"> æ°´æ–‡å射: </text> @@ -45,11 +57,11 @@ </text> <slider label="æç¹ªè·é›¢ï¼š" name="DrawDistance"/> <text name="DrawDistanceMeterText2"> - m + 公尺 </text> <slider label="æœ€å¤§ç²’åæ•ˆæžœæ•¸é‡ï¼š" name="MaxParticleCount"/> - <slider label="Max. # of non-impostor avatars:" name="MaxNumberAvatarDrawn"/> - <slider label="後製å“質:" name="RenderPostProcess"/> + <slider label="éžå‡å†’化身上é™ï¼š" name="MaxNumberAvatarDrawn"/> + <slider label="後處ç†å“質:" name="RenderPostProcess"/> <text name="MeshDetailText"> ç¶²é¢ç´°ç¯€ï¼š </text> @@ -81,10 +93,10 @@ 低 </text> <text name="AvatarRenderingText"> - Avatar Rendering: + 化身呈åƒï¼š </text> - <check_box initial_value="true" label="Avatar impostors" name="AvatarImpostors"/> - <check_box initial_value="true" label="Hardware skinning" name="AvatarVertexProgram"/> + <check_box initial_value="true" label="化身å‡å†’者" name="AvatarImpostors"/> + <check_box initial_value="true" label="硬體æ›è†š" name="AvatarVertexProgram"/> <check_box initial_value="true" label="化身衣æœ" name="AvatarCloth"/> <text name="TerrainDetailText"> 地形細節: diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_move.xml b/indra/newview/skins/default/xui/zh/panel_preferences_move.xml index ce176b1e3c..3a27477885 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_move.xml @@ -7,18 +7,33 @@ </text> <check_box label="å»ºé€ / 編輯" name="edit_camera_movement" tool_tip="ä½¿ç”¨é€²å…¥æˆ–é›¢é–‹ç·¨è¼¯æ¨¡å¼æ™‚自動調整æ”影機ä½ç½®åŠŸèƒ½"/> <check_box label="編輯外觀" name="appearance_camera_movement" tool_tip="ä½¿ç”¨ç·¨è¼¯æ¨¡å¼æ™‚自動調整æ”影機ä½ç½®åŠŸèƒ½"/> - <check_box initial_value="true" label="å´é‚Šæ¬„" name="appearance_sidebar_positioning" tool_tip="使用開啟å´é‚Šæ¬„時自動調整æ”影機ä½ç½®åŠŸèƒ½"/> + <text name="keyboard_lbl"> + éµç›¤ï¼š + </text> + <check_box label="總是使用方å‘éµç§»å‹•" name="arrow_keys_move_avatar_check"/> + <check_box label="連點按ä½å¾Œè·‘æ¥" name="tap_tap_hold_to_run"/> + <text name="mouse_lbl"> + æ»‘é¼ ï¼š + </text> <check_box label="將我顯示於第一人稱視角ä¸" name="first_person_avatar_visible"/> <text name=" Mouse Sensitivity"> ç¬¬ä¸€äººç¨±è¦–è§’æ»‘é¼ æ•æ„Ÿåº¦ï¼š </text> <check_box label="å轉" name="invert_mouse"/> - <check_box label="總是使用方å‘éµç§»å‹•" name="arrow_keys_move_avatar_check"/> - <check_box label="連點按ä½å¾Œè·‘æ¥" name="tap_tap_hold_to_run"/> - <check_box label="雙擊以:" name="double_click_chkbox"/> - <radio_group name="double_click_action"> - <radio_item label="瞬間傳é€" name="radio_teleport"/> - <radio_item label="自動導航駕駛" name="radio_autopilot"/> - </radio_group> + <text name="single_click_action_lbl"> + 在土地上點按一下: + </text> + <combo_box name="single_click_action_combo"> + <combo_box.item label="無動作" name="0"/> + <combo_box.item label="移動至點按的地點" name="1"/> + </combo_box> + <text name="double_click_action_lbl"> + 在土地上點按兩下: + </text> + <combo_box name="double_click_action_combo"> + <combo_box.item label="無動作" name="0"/> + <combo_box.item label="移動至點按的地點" name="1"/> + <combo_box.item label="瞬間傳é€è‡³é»žæŒ‰çš„地點" name="2"/> + </combo_box> <button label="å…¶ä»–è¨å‚™" name="joystick_setup_button"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_setup.xml b/indra/newview/skins/default/xui/zh/panel_preferences_setup.xml index efefb92df6..a607a7c33b 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_setup.xml @@ -11,34 +11,17 @@ </text> <check_box label="è‡ªè¨‚åŸ " name="connection_port_enabled"/> <spinner label="åŸ è™Ÿï¼š" name="connection_port"/> - <text name="cache_size_label_l"> - å¿«å–尺寸 - </text> - <text name="text_box5"> - MB - </text> - <text name="Cache location"> - å¿«å–ä½ç½®ï¼š - </text> - <button label="ç€è¦½" label_selected="ç€è¦½" name="set_cache"/> - <button label="" label_selected="é‡è¨" name="reset_cache"/> <text name="Web:"> ç¶²é : </text> <radio_group name="use_external_browser"> - <radio_item label="使用我的網é ç€è¦½å™¨ï¼ˆä¾‹å¦‚ IE, Firefox, Safari)" name="external" tool_tip="Use the default system web browser for help, web links, etc. Not recommended if running full screen." value="1"/> - <radio_item label="使用內建網é ç€è¦½å™¨" name="internal" tool_tip="Use the built-in web browser for help, web links, etc. This browser opens as a new window inside [APP_NAME]." value=""/> + <radio_item label="使用我的網é ç€è¦½å™¨ï¼ˆä¾‹å¦‚ IE, Firefox, Safari)" name="external" tool_tip="使用系統é è¨çš„ç€è¦½å™¨ç€è¦½å¹«åŠ©ï¼Œé–‹å•Ÿç¶²é 。全螢幕模å¼ä¸‹ä¸å»ºè°é€™éº¼åšã€‚" value="1"/> + <radio_item label="使用內建網é ç€è¦½å™¨" name="internal" tool_tip="使用內建的ç€è¦½å™¨ç€è¦½å¹«åŠ©ï¼Œé–‹å•Ÿç¶²é 。該ç€è¦½å™¨å°‡é€éŽ [APP_NAME] 開啟新視窗。" value=""/> </radio_group> <check_box initial_value="true" label="啟用外掛" name="browser_plugins_enabled"/> <check_box initial_value="true" label="æŽ¥å— cookies" name="cookies_enabled"/> <check_box initial_value="true" label="啟用 Javascript" name="browser_javascript_enabled"/> <check_box initial_value="false" label="啟用媒體ç€è¦½çš„çªé¡¯å¼è¦–窗" name="media_popup_enabled"/> - <check_box initial_value="false" label="啟用網é 代ç†ä¼ºæœå™¨" name="web_proxy_enabled"/> - <text name="Proxy location"> - 代ç†ä¼ºæœå™¨ä½ç½®ï¼š - </text> - <line_editor name="web_proxy_editor" tool_tip="The name or IP address of the proxy you would like to use"/> - <spinner label="åŸ è™Ÿï¼š" name="web_proxy_port"/> <text name="Software updates:"> 軟體更新: </text> @@ -46,4 +29,8 @@ <combo_box.item label="自動安è£" name="Install_automatically"/> <combo_box.item label="手動下載åŠå®‰è£" name="Install_manual"/> </combo_box> + <text name="Proxy Settings:"> + 代ç†ä¼ºæœå™¨è¨å®šï¼š + </text> + <button label="調整代ç†ä¼ºæœå™¨è¨å®š" label_selected="ç€è¦½" name="set_proxy"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_sound.xml b/indra/newview/skins/default/xui/zh/panel_preferences_sound.xml index 3280b9357b..e57f08fd74 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_sound.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="è²éŸ³" name="Preference Media panel"> <panel.string name="middle_mouse"> - Middle Mouse + æ»‘é¼ ä¸éµ </panel.string> <slider label="主音é‡" name="System Volume"/> <check_box initial_value="true" name="mute_when_minimized"/> @@ -18,7 +18,8 @@ <slider label="語音èŠå¤©" name="Voice Volume"/> <check_box label="已啟用" name="enable_voice_check"/> <check_box label="å…è¨±åª’é«”è‡ªå‹•æ’æ”¾" name="media_auto_play_btn" tool_tip="è‹¥ä½ æƒ³è¦ï¼Œå¯ä»¥å‹¾é¸é€™å€‹å…è¨±åª’é«”è‡ªå‹•æ’æ”¾" value="true"/> - <check_box label="æ’æ”¾é™„åŠ åˆ°å…¶ä»–åŒ–èº«èº«ä¸Šçš„åª’é«”" name="media_show_on_others_btn" tool_tip="Uncheck this to hide media attached to other avatars nearby" value="true"/> + <check_box label="æ’æ”¾é™„åŠ åˆ°å…¶ä»–åŒ–èº«èº«ä¸Šçš„åª’é«”" name="media_show_on_others_btn" tool_tip="若未勾é¸ï¼Œå°‡éš±è—附著於附近其他化身身上的媒體" value="true"/> + <check_box label="æ’æ”¾ä¾†è‡ªå§¿å‹¢çš„è²éŸ³" name="gesture_audio_play_btn" tool_tip="勾é¸å³å¯è½åˆ°ä¾†è‡ªå§¿å‹¢çš„è²éŸ³" value="true"/> <text name="voice_chat_settings"> 語音èŠå¤©è¨å®š </text> @@ -30,33 +31,10 @@ <radio_item label="化身ä½ç½®" name="1"/> </radio_group> <check_box label="èªªè©±æ™‚åŒæ¥ç§»å‹•化身嘴唇" name="enable_lip_sync"/> - <check_box label="Toggle speak on/off when I press:" name="push_to_talk_toggle_check" tool_tip="When in toggle mode, press and release the trigger key ONCE to switch your microphone on or off. When not in toggle mode, the microphone broadcasts your voice only while the trigger is being held down."/> - <line_editor label="Push-to-Speak trigger" name="modifier_combo"/> + <check_box label="切æ›èªªè©± / éœéŸ³ï¼Œç•¶æˆ‘按下:" name="push_to_talk_toggle_check" tool_tip="åœ¨åˆ‡æ›æ¨¡å¼ä¸‹ï¼ŒæŒ‰ä¸‹å†æ”¾é–‹å•Ÿå‹•éµä¸€æ¬¡ï¼Œå³å¯æ‰“開或關閉麥克風。 ä¸åœ¨åˆ‡æ›ç‹€æ…‹æ™‚ï¼Œéº¥å…‹é¢¨åªæœ‰åœ¨å•Ÿå‹•éµè¢«æŒ‰ä¸‹æ™‚æ‰æœƒæ”¾é€ä½ çš„è²éŸ³ã€‚"/> + <line_editor label="「按下後說話ã€å•Ÿå‹•éµ" name="modifier_combo"/> <button label="è¨å®šæŒ‰éµ" name="set_voice_hotkey_button"/> <button name="set_voice_middlemouse_button" tool_tip="é‡è¨æ»‘é¼ ä¸éµæŒ‰éˆ•"/> <button label="輸入 / 輸出è¨å‚™" name="device_settings_btn"/> - <panel label="è¨å‚™è¨å®š" name="device_settings_panel"> - <panel.string name="default_text"> - é è¨ - </panel.string> - <panel.string name="default system device"> - é è¨ç³»çµ±è¨å‚™ - </panel.string> - <panel.string name="no device"> - ç„¡è¨å‚™ - </panel.string> - <text name="Input"> - 輸入 - </text> - <text name="My volume label"> - 我的音é‡ï¼š - </text> - <slider_bar initial_value="1.0" name="mic_volume_slider" tool_tip="Change the volume using this slider"/> - <text name="wait_text"> - è«‹ç¨å€™ - </text> - <text name="Output"> - 輸出 - </text> - </panel> + <panel label="è¨å‚™è¨å®š" name="device_settings_panel"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/zh/panel_prim_media_controls.xml index df1a1b73a1..09043311da 100644 --- a/indra/newview/skins/default/xui/zh/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/zh/panel_prim_media_controls.xml @@ -26,15 +26,15 @@ </string> <layout_stack name="progress_indicator_area"> <layout_panel name="media_progress_indicator"> - <progress_bar name="media_progress_bar" tool_tip="Media is Loading"/> + <progress_bar name="media_progress_bar" tool_tip="媒體載入ä¸"/> </layout_panel> </layout_stack> <layout_stack name="media_controls"> <layout_panel name="back"> - <button name="back_btn" tool_tip="Navigate back"/> + <button name="back_btn" tool_tip="å‘後導覽"/> </layout_panel> <layout_panel name="fwd"> - <button name="fwd_btn" tool_tip="Navigate forward"/> + <button name="fwd_btn" tool_tip="å‘å‰å°Žè¦½"/> </layout_panel> <layout_panel name="home"> <button name="home_btn" tool_tip="首é "/> @@ -61,31 +61,31 @@ <icon name="media_whitelist_flag" tool_tip="白å單已啟用"/> </layout_panel> <layout_panel> - <icon name="media_secure_lock_flag" tool_tip="Secured Browsing"/> + <icon name="media_secure_lock_flag" tool_tip="åŠ å¯†çš„ç€è¦½"/> </layout_panel> </layout_stack> </layout_panel> <layout_panel name="media_play_position"> - <slider_bar initial_value="0.5" name="media_play_slider" tool_tip="Movie play progress"/> + <slider_bar initial_value="0.5" name="media_play_slider" tool_tip="å½±ç‰‡æ’æ”¾é€²åº¦"/> </layout_panel> <layout_panel name="skip_back"> - <button name="skip_back_btn" tool_tip="Step back"/> + <button name="skip_back_btn" tool_tip="倒轉"/> </layout_panel> <layout_panel name="skip_forward"> - <button name="skip_forward_btn" tool_tip="Step forward"/> + <button name="skip_forward_btn" tool_tip="快轉"/> </layout_panel> <layout_panel name="media_volume"> - <button name="media_mute_button" tool_tip="Mute This Media"/> - <slider name="volume_slider" tool_tip="Media Volume"/> + <button name="media_mute_button" tool_tip="把這個媒體消音"/> + <slider name="volume_slider" tool_tip="媒體音é‡"/> </layout_panel> <layout_panel name="zoom_frame"> - <button name="zoom_frame_btn" tool_tip="Zoom into media"/> + <button name="zoom_frame_btn" tool_tip="以媒體為ä¸å¿ƒæ”¾å¤§"/> </layout_panel> <layout_panel name="close"> - <button name="close_btn" tool_tip="Zoom Back"/> + <button name="close_btn" tool_tip="縮å°"/> </layout_panel> <layout_panel name="new_window"> - <button name="new_window_btn" tool_tip="Open URL in browser"/> + <button name="new_window_btn" tool_tip="用ç€è¦½å™¨é–‹å•Ÿ URL"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_region_covenant.xml b/indra/newview/skins/default/xui/zh/panel_region_covenant.xml index ad94c4c7e9..d5dd337795 100644 --- a/indra/newview/skins/default/xui/zh/panel_region_covenant.xml +++ b/indra/newview/skins/default/xui/zh/panel_region_covenant.xml @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="契約" name="Covenant"> <panel.string name="can_resell"> - Purchased land in this region may be resold. + 購買這地å€çš„土地å…許轉售。 </panel.string> <panel.string name="can_not_resell"> - Purchased land in this region may not be resold. + 購買這地å€çš„土地ä¸å…許轉售。 </panel.string> <panel.string name="can_change"> - Purchased land in this region may be joined or subdivided. + 購買這地å€çš„土地å…許進行åˆä½µæˆ–分割。 </panel.string> <panel.string name="can_not_change"> - Purchased land in this region may not be joined or subdivided. + 購買這地å€çš„土地ä¸å…許進行åˆä½µæˆ–分割。 </panel.string> <text name="estate_section_lbl"> é ˜åœ° @@ -19,10 +19,10 @@ å稱: </text> <text name="estate_name_text"> - mainland + 大陸 </text> <text name="estate_owner_lbl"> - æ“æœ‰è€…: + 所有人: </text> <text name="estate_owner_text"> (無) @@ -31,17 +31,17 @@ 契約: </text> <text name="covenant_timestamp_text"> - Last Modified Wed Dec 31 16:00:00 1969 + 上次修改於 Wed Dec 31 16:00:00 1969 </text> <text_editor name="covenant_editor"> - There is no Covenant provided for this Estate. + æ¤é ˜åœ°æ²’æœ‰ä»»ä½•å¥‘ç´„è¦æ±‚。 </text_editor> <button label="é‡è¨" name="reset_covenant"/> <text name="covenant_help_text"> - Changes to the covenant will show on all parcels in the estate. + å¥‘ç´„ä¿®è¨‚å…§å®¹å°‡é¡¯ç¤ºæ–¼é ˜åœ°è£¡æ‰€æœ‰åœ°æ®µã€‚ </text> <text name="covenant_instructions"> - Drag and drop a notecard to change the Covenant for this estate. + 拖曳並置放一張記事å¡ï¼Œå³å¯ä¿®è¨‚é ˜åœ°å¥‘ç´„ã€‚ </text> <text name="region_section_lbl"> åœ°å€ @@ -56,7 +56,7 @@ 類型: </text> <text name="region_landtype_text"> - Mainland / Homestead + 大陸 / 家園 </text> <text name="region_maturity_lbl"> 分級: diff --git a/indra/newview/skins/default/xui/zh/panel_region_debug.xml b/indra/newview/skins/default/xui/zh/panel_region_debug.xml index ed5e6e9d2c..e5d5e6eaf7 100644 --- a/indra/newview/skins/default/xui/zh/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/zh/panel_region_debug.xml @@ -7,7 +7,7 @@ 未知 </text> <check_box label="關閉腳本" name="disable_scripts_check" tool_tip="關閉這個地å€ç¾åœ¨çš„全部腳本"/> - <check_box label="關閉碰撞" name="disable_collisions_check" tool_tip="關閉這個地å€ç¾åœ¨çš„éžåŒ–身碰撞"/> + <check_box label="ç¦æ¢ç¢°æ’ž" name="disable_collisions_check" tool_tip="關閉這個地å€ç¾åœ¨çš„éžåŒ–身碰撞"/> <check_box label="關閉物ç†" name="disable_physics_check" tool_tip="關閉這個地å€ç¾åœ¨çš„全部物ç†"/> <button label="套用" name="apply_btn"/> <text name="objret_text_lbl"> @@ -28,7 +28,7 @@ <check_box label="æ–¼é€™å€‹é ˜åœ°å…§çš„æ¯ä¸€å€‹åœ°å€" name="return_estate_wide" tool_tip="é€€å›žé€™å€‹é ˜åœ°å…§å…¨éƒ¨åœ°å€ä¸æ¨™è¨˜ç‚ºä»–的物件"/> <button label="退回" name="return_btn"/> <button label="å–得最常碰撞的物件..." name="top_colliders_btn" tool_tip="æ¢åˆ—出目å‰é‹ä½œä¸æœ€å¸¸ç¢°æ’žçš„物件清單"/> - <button label="å–得最耗能腳本..." name="top_scripts_btn" tool_tip="æ¢åˆ—出目å‰é‹ä½œä¸æœ€è€—能的腳本清單"/> + <button label="å–得最耗能腳本..." name="top_scripts_btn" tool_tip="æ¢åˆ—���目å‰é‹ä½œä¸æœ€è€—能的腳本清單"/> <button label="地å€é‡æ–°å•Ÿå‹•" name="restart_btn" tool_tip="給予兩分é˜å€’æ•¸è¨ˆæ™‚ä¸¦é‡æ–°å•Ÿå‹•"/> - <button label="å»¶é²é‡æ–°å•Ÿå‹•" name="cancel_restart_btn" tool_tip="å»¶é²åœ°å€é‡æ–°å•Ÿå‹•䏀尿™‚"/> + <button label="å–æ¶ˆé‡æ–°å•Ÿå‹•" name="cancel_restart_btn" tool_tip="å–æ¶ˆåœ°å€é‡æ–°å•Ÿå‹•"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_region_environment.xml b/indra/newview/skins/default/xui/zh/panel_region_environment.xml new file mode 100644 index 0000000000..8f466af39e --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_region_environment.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel label="環境" name="panel_env_info"> + <text name="water_settings_title"> + 鏿“‡ä½ å¸Œæœ›åˆ°ä½ åœ°å€çš„訪客所能看到的水和天空 / 日循環è¨å®šã€‚ 詳情 + </text> + <radio_group name="region_settings_radio_group"> + <radio_item label="使用第二人生é è¨å€¼" name="use_sl_default_settings"/> + <radio_item label="使用以下è¨å®š" name="use_my_settings"/> + </radio_group> + <panel name="user_environment_settings"> + <text name="water_settings_title"> + æ°´çš„è¨å®š + </text> + <combo_box name="water_settings_preset_combo"> + <combo_box.item label="-鏿“‡ä¸€å€‹è‡ªè¨‚é…ç½®-" name="item0"/> + </combo_box> + <text name="sky_dayc_settings_title"> + 天空 / 日循環 + </text> + <radio_group name="sky_dayc_settings_radio_group"> + <radio_item label="固定天空" name="my_sky_settings"/> + <radio_item label="日循環" name="my_dayc_settings"/> + </radio_group> + <combo_box name="sky_settings_preset_combo"> + <combo_box.item label="-鏿“‡ä¸€å€‹è‡ªè¨‚é…ç½®-" name="item0"/> + </combo_box> + <combo_box name="dayc_settings_preset_combo"> + <combo_box.item label="-鏿“‡ä¸€å€‹è‡ªè¨‚é…ç½®-" name="item0"/> + </combo_box> + </panel> + <button label="套用" name="apply_btn"/> + <button label="å–æ¶ˆ" name="cancel_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_region_estate.xml b/indra/newview/skins/default/xui/zh/panel_region_estate.xml index efa3be2f51..f3c1c85379 100644 --- a/indra/newview/skins/default/xui/zh/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/zh/panel_region_estate.xml @@ -10,20 +10,20 @@ (未知) </text> <text name="owner_text"> - é ˜åœ°æ“æœ‰è€…: + é ˜åœ°æ‰€æœ‰äººï¼š </text> <text name="estate_owner"> (未知) </text> - <check_box label="Use Global Time" name="use_global_time_check"/> + <check_box label="使用全域時間" name="use_global_time_check"/> <check_box label="固定太陽" name="fixed_sun_check"/> - <slider label="Phase" name="sun_hour_slider"/> + <slider label="相ä½" name="sun_hour_slider"/> <check_box label="å…許公開出入" name="externally_visible_check"/> <text name="Only Allow"> - Restrict Access to accounts verified by: + 僅å…許符åˆä»¥ä¸‹æ¢ä»¶çš„居民進入: </text> - <check_box label="Payment Information on File" name="limit_payment" tool_tip="Ban unidentified Residents"/> - <check_box label="年齡驗è‰" name="limit_age_verified" tool_tip="Ban Residents who have not verified their age. See the [SUPPORT_SITE] for more information."/> + <check_box label="已經é 留付款資料" name="limit_payment" tool_tip="å±…æ°‘å¿…é ˆæä¾›ä»˜æ¬¾è³‡æ–™æ‰èƒ½é€²å…¥é€™é ˜åœ°ã€‚ åƒé–± [SUPPORT_SITE] ç²å–進一æ¥è³‡è¨Šã€‚"/> + <check_box label="已年滿 18 æ²" name="limit_age_verified" tool_tip="å±…æ°‘å¿…é ˆå¹´æ»¿ 18 æ²æ‰èƒ½é€²å…¥é€™é ˜åœ°ã€‚ åƒé–± [SUPPORT_SITE] ç²å–進一æ¥è³‡è¨Šã€‚"/> <check_box label="å…許語音èŠå¤©" name="voice_chat_check"/> <check_box label="å…許直接瞬間傳é€" name="allow_direct_teleport"/> <button label="套用" name="apply_btn"/> diff --git a/indra/newview/skins/default/xui/zh/panel_region_general.xml b/indra/newview/skins/default/xui/zh/panel_region_general.xml index a441b8898d..f6b2c46354 100644 --- a/indra/newview/skins/default/xui/zh/panel_region_general.xml +++ b/indra/newview/skins/default/xui/zh/panel_region_general.xml @@ -18,16 +18,17 @@ <text name="region_type"> 未知 </text> - <check_box label="阻æ¢è®Šå½¢" name="block_terraform_check"/> + <check_box label="阻æ¢åœŸåœ°è®Šå½¢" name="block_terraform_check"/> <check_box label="阻æ¢é£›è¡Œ" name="block_fly_check"/> <check_box label="å…許傷害" name="allow_damage_check"/> <check_box label="é™åˆ¶æŽ¨æ’ž" name="restrict_pushobject"/> <check_box label="å…許土地轉售" name="allow_land_resell_check"/> <check_box label="å…許土地 åˆä½µ/分割" name="allow_parcel_changes_check"/> <check_box label="阻擋土地顯示於æœå°‹ä¸" name="block_parcel_search_check" tool_tip="讓其他人å¯ä»¥åœ¨æœå°‹çµæžœä¸çœ‹åˆ°é€™å€‹åœ°å€èˆ‡å…¶ä¸çš„地段"/> + <check_box label="å…許網é¢ç‰©ä»¶" name="mesh_rez_enabled_check" tool_tip="å…許大家在æ¤åœ°å€ç”¢ç”Ÿç¶²é¢ç‰©ä»¶"/> <spinner label="人數上é™" name="agent_limit_spin"/> - <spinner label="Object Bonus" name="object_bonus_spin"/> - <text label="Maturity" name="access_text"> + <spinner label="物件紅利" name="object_bonus_spin"/> + <text label="分級" name="access_text"> 分級: </text> <icons_combo_box label="é©åº¦æˆäºº" name="access_combo"> @@ -36,8 +37,8 @@ <icons_combo_box.item label="一般普級" name="PG" value="13"/> </icons_combo_box> <button label="套用" name="apply_btn"/> - <button label="強制瞬間傳é€ä¸€å€‹å±…民回家..." name="kick_btn"/> - <button label="å¼·åˆ¶çž¬é–“å‚³é€æ‰€æœ‰å±…民回家..." name="kick_all_btn"/> - <button label="é€å‡ºè¨Šæ¯åˆ°åœ°å€..." name="im_btn"/> + <button label="瞬間傳é€ä¸€ä½å±…民回家..." name="kick_btn"/> + <button label="çž¬é–“å‚³é€æ‰€æœ‰å±…民回家..." name="kick_all_btn"/> + <button label="å‘地å€ç™¼å‡ºè¨Šæ¯..." name="im_btn"/> <button label="管ç†çž¬é–“傳é€ä¸å¿ƒ..." name="manage_telehub_btn"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_region_terrain.xml b/indra/newview/skins/default/xui/zh/panel_region_terrain.xml index 7cae8fe8cf..85e759e445 100644 --- a/indra/newview/skins/default/xui/zh/panel_region_terrain.xml +++ b/indra/newview/skins/default/xui/zh/panel_region_terrain.xml @@ -9,11 +9,52 @@ <spinner label="水文高度" name="water_height_spin"/> <spinner label="地形æå‡é™åˆ¶" name="terrain_raise_spin"/> <spinner label="地形é™ä½Žé™åˆ¶" name="terrain_lower_spin"/> - <check_box label="ä½¿ç”¨é ˜åœ°çš„å¤ªé™½è¨å®š" name="use_estate_sun_check"/> - <check_box label="固定太陽" name="fixed_sun_check"/> - <slider label="Phase" name="sun_hour_slider"/> + <text name="detail_texture_text"> + 地形æè³ªï¼ˆé ˆ 512x512,24 ä½å…ƒ .tga æª”æ ¼å¼ï¼‰ + </text> + <text name="height_text_lbl"> + 1(低) + </text> + <text name="height_text_lbl2"> + 2 + </text> + <text name="height_text_lbl3"> + 3 + </text> + <text name="height_text_lbl4"> + 4(高) + </text> + <text name="height_text_lbl5"> + æè³ªæµ·æ‹”ç¯„åœ + </text> + <text name="height_text_lbl10"> + 這些值代表以上æè³ªçš„æ··åˆç¯„åœã€‚ + </text> + <text name="height_text_lbl11"> + 以公尺為單ä½ï¼Œä½Žå€¼æ˜¯æè³ª #1 的最大高度,高值是æè³ª #4 的最å°é«˜åº¦ã€‚ + </text> + <text name="height_text_lbl6"> + 西北 + </text> + <text name="height_text_lbl7"> + æ±åŒ— + </text> + <spinner label="低" name="height_start_spin_1"/> + <spinner label="低" name="height_start_spin_3"/> + <spinner label="高" name="height_range_spin_1"/> + <spinner label="高" name="height_range_spin_3"/> + <text name="height_text_lbl8"> + è¥¿å— + </text> + <text name="height_text_lbl9"> + æ±å— + </text> + <spinner label="低" name="height_start_spin_0"/> + <spinner label="低" name="height_start_spin_2"/> + <spinner label="高" name="height_range_spin_0"/> + <spinner label="高" name="height_range_spin_2"/> + <button label="下載 RAW 地形..." name="download_raw_btn" tool_tip="åªå…è¨±é ˜åœ°æ‰€æœ‰äººè€Œéžç®¡ç†è€…進行æ“作"/> + <button label="上傳 RAW 地形檔..." name="upload_raw_btn" tool_tip="åªå…è¨±é ˜åœ°æ‰€æœ‰äººè€Œéžç®¡ç†è€…進行æ“作"/> + <button label="確定地形" name="bake_terrain_btn" tool_tip="將目å‰åœ°å½¢è¨ç‚ºã€Œå‡é«˜ / é™ä½Žã€æ¥µé™çš„ä¸å¿ƒå€¼"/> <button label="套用" name="apply_btn"/> - <button label="下載 RAW 地形..." name="download_raw_btn" tool_tip="åªå…è¨±é ˜åœ°æ“æœ‰è€…而éžç®¡ç†è€…進行æ“作"/> - <button label="上傳 RAW 地形檔..." name="upload_raw_btn" tool_tip="åªå…è¨±é ˜åœ°æ“æœ‰è€…而éžç®¡ç†è€…進行æ“作"/> - <button label="Bake Terrain" name="bake_terrain_btn" tool_tip="Set current terrain as mid-point for raise/lower limits"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_region_texture.xml b/indra/newview/skins/default/xui/zh/panel_region_texture.xml deleted file mode 100644 index 7b6152121f..0000000000 --- a/indra/newview/skins/default/xui/zh/panel_region_texture.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="åœ°é¢æè³ª" name="Textures"> - <text name="region_text_lbl"> - 地å€ï¼š - </text> - <text name="region_text"> - 未知 - </text> - <text name="detail_texture_text"> - 地形æè³ªï¼ˆé ˆ 512x512,24 ä½å…ƒ .tga æª”æ ¼å¼ï¼‰ - </text> - <text name="height_text_lbl"> - 1 (Low) - </text> - <text name="height_text_lbl2"> - 2 - </text> - <text name="height_text_lbl3"> - 3 - </text> - <text name="height_text_lbl4"> - 4 (High) - </text> - <text name="height_text_lbl5"> - Texture Elevation Ranges - </text> - <text name="height_text_lbl6"> - Northwest - </text> - <text name="height_text_lbl7"> - Northeast - </text> - <spinner label="Low" name="height_start_spin_1"/> - <spinner label="Low" name="height_start_spin_3"/> - <spinner label="High" name="height_range_spin_1"/> - <spinner label="High" name="height_range_spin_3"/> - <text name="height_text_lbl8"> - Southwest - </text> - <text name="height_text_lbl9"> - Southeast - </text> - <spinner label="Low" name="height_start_spin_0"/> - <spinner label="Low" name="height_start_spin_2"/> - <spinner label="High" name="height_range_spin_0"/> - <spinner label="High" name="height_range_spin_2"/> - <text name="height_text_lbl10"> - These values represent the blend range for the textures above. - </text> - <text name="height_text_lbl11"> - Measured in meters, the LOW value is the MAXIMUM height of Texture #1, and the HIGH value is the MINIMUM height of Texture #4. - </text> - <button label="套用" name="apply_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_script_ed.xml b/indra/newview/skins/default/xui/zh/panel_script_ed.xml index cc2b0fc673..29e9a35869 100644 --- a/indra/newview/skins/default/xui/zh/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/zh/panel_script_ed.xml @@ -4,7 +4,7 @@ 載入ä¸... </panel.string> <panel.string name="can_not_view"> - ä½ ä¸èƒ½å¯Ÿçœ‹æˆ–編輯æ¤è…³æœ¬ï¼Œè‡ªå¾žå®ƒè¢«è¨å®šç‚º "no copy" å¾Œã€‚ä½ éœ€è¦å®Œæ•´æ¬Šé™åŽ»å¯Ÿçœ‹æˆ–ç·¨è¼¯æœ‰åŒ…å«è…³æœ¬åœ¨å…§çš„物件。 + ä½ ç„¡æ³•å¯Ÿçœ‹æˆ–ç·¨è¼¯é€™è…³æœ¬ï¼Œå®ƒè¢«è¨ç‚ºã€Œç¦æ¢è¤‡è£½ã€ã€‚ ä½ éœ€è¦å®Œæ•´æ¬Šé™åŽ»å¯Ÿçœ‹æˆ–ç·¨è¼¯ç‰©ä»¶å…§çš„è…³æœ¬ã€‚ </panel.string> <panel.string name="public_objects_can_not_run"> 公開物件ä¸èƒ½åŸ·è¡Œè…³æœ¬ @@ -22,12 +22,14 @@ <menu label="檔案" name="File"> <menu_item_call label="儲å˜" name="Save"/> <menu_item_call label="還原全部變更" name="Revert All Changes"/> + <menu_item_call label="從檔案載入…" name="LoadFromFile"/> + <menu_item_call label="å˜å…¥æª”案…" name="SaveToFile"/> </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="Copy"/> <menu_item_call label="貼上" name="Paste"/> <menu_item_call label="å…¨é¸" name="Select All"/> <menu_item_call label="å–æ¶ˆé¸æ“‡" name="Deselect"/> diff --git a/indra/newview/skins/default/xui/zh/panel_script_limits_my_avatar.xml b/indra/newview/skins/default/xui/zh/panel_script_limits_my_avatar.xml index 32cc2f9a5d..eb32d39f78 100644 --- a/indra/newview/skins/default/xui/zh/panel_script_limits_my_avatar.xml +++ b/indra/newview/skins/default/xui/zh/panel_script_limits_my_avatar.xml @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="我的化身" name="script_limits_my_avatar_panel"> <text name="script_memory"> - Avatar Script Usage + åŒ–èº«è…³æœ¬ä½¿ç”¨é‡ </text> <text name="loading_text"> 載入ä¸... </text> <scroll_list name="scripts_list"> <scroll_list.columns label="尺寸(kb)" name="size"/> - <scroll_list.columns label="URLs" name="urls"/> + <scroll_list.columns label="URL" name="urls"/> <scroll_list.columns label="物件å稱" name="name"/> <scroll_list.columns label="ä½ç½®" name="location"/> </scroll_list> - <button label="Refresh List" name="refresh_list_btn"/> + <button label="刷新清單" name="refresh_list_btn"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_script_limits_region_memory.xml b/indra/newview/skins/default/xui/zh/panel_script_limits_region_memory.xml index 950abbfb4c..40a2dd6926 100644 --- a/indra/newview/skins/default/xui/zh/panel_script_limits_region_memory.xml +++ b/indra/newview/skins/default/xui/zh/panel_script_limits_region_memory.xml @@ -8,13 +8,13 @@ </text> <scroll_list name="scripts_list"> <scroll_list.columns label="尺寸(kb)" name="size"/> - <scroll_list.columns label="URLs" name="urls"/> + <scroll_list.columns label="URL" name="urls"/> <scroll_list.columns label="物件å稱" name="name"/> - <scroll_list.columns label="ç‰©ä»¶æ“æœ‰è€…" name="owner"/> + <scroll_list.columns label="物件所有人" name="owner"/> <scroll_list.columns label="地段" name="parcel"/> <scroll_list.columns label="ä½ç½®" name="location"/> </scroll_list> - <button label="Refresh List" name="refresh_list_btn"/> - <button label="Highlight" name="highlight_btn"/> + <button label="刷新清單" name="refresh_list_btn"/> + <button label="高亮顯示" name="highlight_btn"/> <button label="退回" name="return_btn"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_script_question_toast.xml b/indra/newview/skins/default/xui/zh/panel_script_question_toast.xml new file mode 100644 index 0000000000..a2d0237da0 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_script_question_toast.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<panel label="script_question_panel" name="panel_script_question_toast"> + <panel label="buttons_panel" name="buttons_panel"/> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_side_tray.xml b/indra/newview/skins/default/xui/zh/panel_side_tray.xml deleted file mode 100644 index e5c7deb7d6..0000000000 --- a/indra/newview/skins/default/xui/zh/panel_side_tray.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<!-- Side tray cannot show background because it is always - partially on screen to hold tab buttons. --> -<side_tray name="sidebar"> - <sidetray_tab description="å´é‚Šæ¬„切æ›ã€‚" name="sidebar_openclose" tab_title="å´é‚Šæ¬„切æ›"/> - <sidetray_tab description="首é 。" name="sidebar_home" tab_title="首é "> - <panel label="首é " name="panel_home"/> - </sidetray_tab> - <sidetray_tab description="ç·¨è¼¯ä½ çš„å…¬é–‹æª”æ¡ˆåŠç²¾é¸åœ°é»žã€‚" name="sidebar_me" tab_title="我的檔案"> - <panel_container name="panel_container"> - <panel label="自己" name="panel_me"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="Find your friends, contacts and people nearby." name="sidebar_people" tab_title="人群"> - <panel_container name="panel_container"> - <panel label="群組檔案" name="panel_group_info_sidetray"/> - <panel label="Blocked Residents & Objects" name="panel_block_list_sidetray"/> - </panel_container> - </sidetray_tab> - <sidetray_tab description="Find places to go and places you've visited before." label="地點" name="sidebar_places" tab_title="地點"> - <panel label="地點" name="panel_places"/> - </sidetray_tab> - <sidetray_tab description="ç€è¦½ä½ 的收ç´å€ã€‚" name="sidebar_inventory" tab_title="我的收ç´å€"> - <panel label="編輯收ç´å€" name="sidepanel_inventory"/> - </sidetray_tab> - <sidetray_tab description="è®Šæ›´ä½ çš„å¤–è§€èˆ‡ç›®å‰æ¨£è²Œã€‚" name="sidebar_appearance" tab_title="我的外觀"> - <panel label="編輯外觀" name="sidepanel_appearance"/> - </sidetray_tab> -</side_tray> diff --git a/indra/newview/skins/default/xui/zh/panel_snapshot_inventory.xml b/indra/newview/skins/default/xui/zh/panel_snapshot_inventory.xml new file mode 100644 index 0000000000..20fb9b494a --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_snapshot_inventory.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_inventory"> + <text name="title"> + 儲å˜åˆ°æˆ‘的收ç´å€ + </text> + <text name="hint_lbl"> + 將圖åƒå„²å˜åˆ°æ”¶ç´å€çš„費用為 L$[UPLOAD_COST]。 è‹¥è¦å°‡åœ–åƒå˜ç‚ºæè³ªï¼Œè«‹é¸æ“‡ä¸€å€‹æ£æ–¹æ ¼å¼ã€‚ + </text> + <combo_box label="è§£æžåº¦" name="texture_size_combo"> + <combo_box.item label="ç›®å‰è¦–窗" name="CurrentWindow"/> + <combo_box.item label="å°ï¼ˆ128x128)" name="Small(128x128)"/> + <combo_box.item label="ä¸ï¼ˆ256x256)" name="Medium(256x256)"/> + <combo_box.item label="大(512x512)" name="Large(512x512)"/> + <combo_box.item label="自訂" name="Custom"/> + </combo_box> + <spinner label="寬" name="inventory_snapshot_width"/> + <spinner label="高度" name="inventory_snapshot_height"/> + <check_box label="éŽ–ä½æ¯”例" name="inventory_keep_aspect_check"/> + <button label="å–æ¶ˆ" name="cancel_btn"/> + <button label="儲å˜" name="save_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_snapshot_local.xml b/indra/newview/skins/default/xui/zh/panel_snapshot_local.xml new file mode 100644 index 0000000000..a929c9a3fb --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_snapshot_local.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_local"> + <text name="title"> + 儲å˜åˆ°é›»è…¦ä¸Š + </text> + <combo_box label="è§£æžåº¦" name="local_size_combo"> + <combo_box.item label="ç›®å‰è¦–窗" 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="自訂" name="Custom"/> + </combo_box> + <layout_stack name="local_image_params_ls"> + <layout_panel name="local_image_size_lp"> + <spinner label="寬" name="local_snapshot_width"/> + <spinner label="高度" name="local_snapshot_height"/> + <check_box label="éŽ–ä½æ¯”例" name="local_keep_aspect_check"/> + </layout_panel> + <layout_panel name="local_image_format_quality_lp"> + <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> + <slider label="圖åƒå“質" name="image_quality_slider"/> + <text name="image_quality_level"> + ([QLVL]) + </text> + </layout_panel> + </layout_stack> + <button label="å–æ¶ˆ" name="cancel_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> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_snapshot_options.xml b/indra/newview/skins/default/xui/zh/panel_snapshot_options.xml new file mode 100644 index 0000000000..82c2b10d8d --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_snapshot_options.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_options"> + <button label="é€è‡³æˆ‘的檔案訊æ¯ç™¼ä½ˆ" name="save_to_profile_btn"/> + <button label="電郵" name="save_to_email_btn"/> + <button label="儲å˜åˆ°æˆ‘的收ç´å€ï¼ˆL$[AMOUNT])" name="save_to_inventory_btn"/> + <button label="儲å˜åˆ°é›»è…¦ä¸Š" name="save_to_computer_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml new file mode 100644 index 0000000000..853a856104 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_postcard"> + <string name="default_subject"> + 來自 [SECOND_LIFE] 的明信片。 + </string> + <string name="default_message"> + å¿«ä¾†çœ‹çœ‹é€™å€‹ï¼ + </string> + <string name="upload_message"> + 傳é€ä¸... + </string> + <text name="title"> + 電郵 + </text> + <button label="訊æ¯" name="message_btn"/> + <button label="è¨å®š" name="settings_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_snapshot_profile.xml b/indra/newview/skins/default/xui/zh/panel_snapshot_profile.xml new file mode 100644 index 0000000000..6f64a4e83c --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_snapshot_profile.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_profile"> + <text name="title"> + é€è‡³æˆ‘的檔案訊æ¯ç™¼ä½ˆ + </text> + <combo_box label="è§£æžåº¦" name="profile_size_combo"> + <combo_box.item label="ç›®å‰è¦–窗" 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="自訂" name="Custom"/> + </combo_box> + <layout_stack name="profile_image_params_ls"> + <layout_panel name="profile_image_size_lp"> + <spinner label="寬" name="profile_snapshot_width"/> + <spinner label="高度" name="profile_snapshot_height"/> + <check_box label="éŽ–ä½æ¯”例" name="profile_keep_aspect_check"/> + </layout_panel> + <layout_panel name="profile_image_metadata_lp"> + <text name="caption_label"> + 內容敘述: + </text> + <check_box initial_value="true" label="åŠ å…¥æ‰€åœ¨ä½ç½®" name="add_location_cb"/> + </layout_panel> + </layout_stack> + <button label="å–æ¶ˆ" name="cancel_btn"/> + <button label="發佈" name="post_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_sound_devices.xml b/indra/newview/skins/default/xui/zh/panel_sound_devices.xml new file mode 100644 index 0000000000..fa4e24a605 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_sound_devices.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<panel label="è¨å‚™è¨å®š" name="device_settings_panel"> + <panel.string name="default_text"> + é è¨ + </panel.string> + <string name="name_no_device"> + ç„¡è¨å‚™ + </string> + <string name="name_default_system_device"> + é è¨ç³»çµ±è¨å‚™ + </string> + <text name="Input"> + 輸入 + </text> + <text name="Output"> + 輸出 + </text> + <text name="My volume label"> + 我的音é‡ï¼š + </text> + <slider_bar initial_value="1.0" name="mic_volume_slider" tool_tip="ç”¨é€™æŽ§åˆ¶æ¢æ”¹è®ŠéŸ³é‡"/> + <text name="wait_text"> + è«‹ç¨å€™ + </text> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_stand_stop_flying.xml b/indra/newview/skins/default/xui/zh/panel_stand_stop_flying.xml index 1dd3acef5d..4586d4eca1 100644 --- a/indra/newview/skins/default/xui/zh/panel_stand_stop_flying.xml +++ b/indra/newview/skins/default/xui/zh/panel_stand_stop_flying.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Width and height of this panel should be synchronized with "panel_modes" in the floater_moveview.xml--> <panel name="panel_stand_stop_flying"> - <button label="站立" name="stand_btn" tool_tip="點擊æ¤è™•起立。"/> + <button label="站立" name="stand_btn" tool_tip="點按æ¤è™•起立。"/> <button label="åœæ¢é£›è¡Œ" name="stop_fly_btn" tool_tip="åœæ¢é£›è¡Œ"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_status_bar.xml b/indra/newview/skins/default/xui/zh/panel_status_bar.xml index 808e14f3c3..b4cdff9d6b 100644 --- a/indra/newview/skins/default/xui/zh/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/zh/panel_status_bar.xml @@ -16,12 +16,13 @@ L$ [AMT] </panel.string> <panel name="balance_bg"> - <text name="balance" tool_tip="é»žæ“Šä»¥é‡æ–°æ›´æ–°ä½ çš„ L$ 帳戶餘é¡" value="L$20"/> - <button label="購買 L$" name="buyL" tool_tip="點擊以購買更多 L$"/> + <text name="balance" tool_tip="é»žæŒ‰ä»¥é‡æ–°æ›´æ–°ä½ çš„ L$ 帳戶餘é¡" value="L$20"/> + <button label="購買 L$" name="buyL" tool_tip="點按以購買更多 L$"/> + <button label="購物" name="goShop" tool_tip="打開第二人生購物市集"/> </panel> <text name="TimeText" tool_tip="ç›®å‰æ™‚å€ï¼ˆå¤ªå¹³æ´‹ï¼‰"> 24:00 AM PST </text> - <button name="media_toggle_btn" tool_tip="é–‹å§‹ / åœæ¢å…¨éƒ¨åª’體(音樂ã€å½±ç‰‡ã€ç¶²é )"/> + <button name="media_toggle_btn" tool_tip="é–‹å§‹/åœæ¢å…¨éƒ¨åª’體(音樂ã€å½±ç‰‡ã€ç¶²é )"/> <button name="volume_btn" tool_tip="å…¨åŸŸéŸ³é‡æŽ§åˆ¶"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_teleport_history.xml b/indra/newview/skins/default/xui/zh/panel_teleport_history.xml index a2a63db000..44d545a86d 100644 --- a/indra/newview/skins/default/xui/zh/panel_teleport_history.xml +++ b/indra/newview/skins/default/xui/zh/panel_teleport_history.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="Teleport History"> <accordion name="history_accordion"> - <no_matched_tabs_text name="no_matched_teleports_msg" value="沒有發ç¾ä½ è¦æ‰¾çš„嗎?試試 [secondlife:///app/search/places/[SEARCH_TERM] æœå°‹]。"/> - <no_visible_tabs_text name="no_teleports_msg" value="瞬間傳é€ç´€éŒ„是空白的。試試 [secondlife:///app/search/places/ Search]。"/> + <no_matched_tabs_text name="no_matched_teleports_msg" value="找ä¸åˆ°ä½ è¦æ‰¾çš„嗎? 請試試 [secondlife:///app/search/places/[SEARCH_TERM] æœå°‹]。"/> + <no_visible_tabs_text name="no_teleports_msg" value="çž¬é–“å‚³é€æ·å²è¨˜éŒ„ç›®å‰ç©ºç™½ã€‚ 請試試[secondlife:///app/search/places/ æœå°‹]。"/> <accordion_tab name="today" title="今天"/> <accordion_tab name="yesterday" title="昨天"/> <accordion_tab name="2_days_ago" title="å‰å¤©"/> diff --git a/indra/newview/skins/default/xui/zh/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/zh/panel_volume_pulldown.xml new file mode 100644 index 0000000000..70ec028176 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_volume_pulldown.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="volumepulldown_floater"> + <slider label="主控音é‡" name="System Volume"/> + <slider label="按éµéŸ³" name="UI Volume"/> + <slider label="環境" name="Wind Volume"/> + <slider label="è²éŸ³" name="SFX Volume"/> + <check_box name="gesture_audio_play_btn" tool_tip="啟用姿勢è²éŸ³"/> + <slider label="音樂" name="Music Volume"/> + <check_box name="enable_music" tool_tip="啟用串æµéŸ³æ¨‚"/> + <slider label="媒體" name="Media Volume"/> + <check_box name="enable_media" tool_tip="啟用串æµåª’é«”"/> + <slider label="語音" name="Voice Volume"/> + <check_box name="enable_voice_check" tool_tip="啟用語音èŠå¤©"/> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_world_map.xml b/indra/newview/skins/default/xui/zh/panel_world_map.xml index b5aa659bf0..84018768a1 100644 --- a/indra/newview/skins/default/xui/zh/panel_world_map.xml +++ b/indra/newview/skins/default/xui/zh/panel_world_map.xml @@ -7,57 +7,57 @@ 無效的ä½ç½® </panel.string> <panel.string name="world_map_north"> - N + 北 </panel.string> <panel.string name="world_map_east"> E </panel.string> <panel.string name="world_map_west"> - W + 西 </panel.string> <panel.string name="world_map_south"> - S + å— </panel.string> <panel.string name="world_map_southeast"> - SE + æ±å— </panel.string> <panel.string name="world_map_northeast"> - NE + æ±åŒ— </panel.string> <panel.string name="world_map_southwest"> - SW + è¥¿å— </panel.string> <panel.string name="world_map_northwest"> - NW + 西北 </panel.string> <panel.string name="world_map_person"> - 1 person + 1 人 </panel.string> <panel.string name="world_map_people"> - [NUMBER] people + [NUMBER] 人 </panel.string> - <text label="N" name="floater_map_north"> - N + <text label="北" name="floater_map_north"> + 北 </text> <text label="E" name="floater_map_east"> E </text> - <text label="W" name="floater_map_west"> - W + <text label="西" name="floater_map_west"> + 西 </text> - <text label="S" name="floater_map_south"> - S + <text label="å—" name="floater_map_south"> + å— </text> - <text label="SE" name="floater_map_southeast"> - SE + <text label="æ±å—" name="floater_map_southeast"> + æ±å— </text> - <text label="NE" name="floater_map_northeast"> - NE + <text label="æ±åŒ—" name="floater_map_northeast"> + æ±åŒ— </text> - <text label="SW" name="floater_map_southwest"> - SW + <text label="西å—" name="floater_map_southwest"> + è¥¿å— </text> - <text label="NW" name="floater_map_northwest"> - NW + <text label="西北" name="floater_map_northwest"> + 西北 </text> </panel> diff --git a/indra/newview/skins/default/xui/zh/role_actions.xml b/indra/newview/skins/default/xui/zh/role_actions.xml index 32bf0d22d8..767bcecde7 100644 --- a/indra/newview/skins/default/xui/zh/role_actions.xml +++ b/indra/newview/skins/default/xui/zh/role_actions.xml @@ -1,73 +1,73 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <role_actions> - <action_set description="These Abilities include powers to add and remove group Members, and allow new Members to join without an invitation." name="Membership"> - <action description="é‚€è«‹ä»–äººåŠ å…¥é€™å€‹ç¾¤çµ„" longdescription="é‚€è«‹ä»–äººåŠ å…¥é€™å€‹ç¾¤çµ„ï¼Œè«‹æŒ‰ä¸‹æ–¼è§’è‰²å€æ®µä¸çš„æˆå“¡é 籤ä¸çš„ '邀請' 按鈕。" name="member invite" value="1"/> - <action description="將會員由這個群組ä¸è¸¢å‡º" longdescription="Eject Members from this Group using the 'Eject' button in the Roles section > Members tab. An Owner can eject anyone except another Owner. If you're not an Owner, a Member can be ejected from a group if, and only if, they're only in the Everyone Role, and NO other Roles. To remove Members from Roles, you need to have the 'Remove Members from Roles' Ability." name="member eject" value="2"/> - <action description="Toggle 'Open Enrollment' and change 'Enrollment fee'" longdescription="Toggle 'Open Enrollment' to let new Members join without an invitation, and change the 'Enrollment fee' in the General section." name="member options" value="3"/> + <action_set description="這些能力包括新增或移除群組æˆå“¡å’Œå…許新æˆå“¡ä¸å—é‚€å³å¯åŠ å…¥ç¾¤çµ„çš„ç‰æ¬ŠåŠ›ã€‚" name="Membership"> + <action description="é‚€è«‹ä»–äººåŠ å…¥é€™å€‹ç¾¤çµ„" longdescription="æ¬²é‚€è«‹ä»–äººåŠ å…¥é€™å€‹ç¾¤çµ„ï¼Œè«‹æŒ‰ä¸‹è§’è‰²æ¬„ä¸‹çš„æˆå“¡é 籤ä¸çš„ã€Œé‚€è«‹ã€æŒ‰éˆ•。" name="member invite" value="1"/> + <action description="將會員由這個群組ä¸è¸¢å‡º" longdescription="欲將æˆå“¡å¾žç¾¤çµ„踢出,請按下角色欄下的æˆå“¡é 籤ä¸çš„ã€Œè¸¢å‡ºã€æŒ‰éˆ•。 所有人å¯è¸¢å‡ºä»»ä½•ä¸å…·æ‰€æœ‰äººè§’色的人。 å¦‚æžœä½ ä¸æ˜¯æ‰€æœ‰äººï¼Œä¸€ä½æˆå“¡åªåœ¨ä»–僅屬於「任何人ã€è§’色且沒有其他角色的情æ³ä¸‹è¢«è¸¢å‡ºç¾¤çµ„。 欲å¸é™¤æˆå“¡çš„è§’è‰²ï¼Œä½ å¿…é ˆæœ‰ã€Œå¸é™¤æˆå“¡è§’色ã€çš„能力。" name="member eject" value="2"/> + <action description="切æ›ã€Œå…è²»è‡ªç”±åŠ å…¥ã€è¨å®šï¼Œæ›´æ”¹ã€ŒåŠ å…¥è²»ã€ã€‚" longdescription="切æ›ã€Œå…è²»è‡ªç”±åŠ å…¥ã€è¨å®šï¼Œè®“æˆå“¡ä¸å—邀也å¯åŠ å…¥ï¼Œä¸¦åœ¨åŸºæœ¬è¨å®šæ¬„æ›´æ”¹ã€ŒåŠ å…¥è²»ã€ã€‚" name="member options" value="3"/> </action_set> - <action_set description="These Abilities include powers to add, remove, and change group Roles, add and remove Members in Roles, and assign Abilities to Roles." name="Roles"> - <action description="創立一個新角色" longdescription="å‰µç«‹ä¸€å€‹æ–°è§’è‰²æ–¼è§’è‰²å€æ®µ > 角色é 籤。" name="role create" value="4"/> - <action description="刪除角色" longdescription="Delete Roles in the Roles section > Roles tab." name="role delete" value="5"/> - <action description="Change Role names, titles, descriptions, and whether Role members are publicly revealed" longdescription="Change Role names, titles, descriptions, and whether Role members are publicly revealed. This is done at the bottom of the the Roles section > Roles tab after selecting a Role." name="role properties" value="6"/> - <action description="Assign Members to Assigner's Roles" longdescription="Assign Members to Roles in the list of Assigned Roles (Roles section > Members tab). A Member with this Ability can only add Members to a Role that the assigner is already in." name="role assign member limited" value="7"/> - <action description="Assign Members to Any Role" longdescription="Assign Members to Any Role in the list of Assigned Roles (Roles section > Members tab). *WARNING* Any Member in a Role with this Ability can assign themselves--and any other non-Owner Member--to Roles that have more powers than they currently have, potentially elevating themselves to near-Owner power. Be sure you know what you're doing before assigning this Ability." name="role assign member" value="8"/> - <action description="由角色ä¸ç§»é™¤æˆå“¡" longdescription="Remove Members from Roles in the list of Assigned Roles (Roles section > Members tab). Owners can't be removed." name="role remove member" value="9"/> - <action description="Assign and Remove Abilities in Roles" longdescription="Assign and Remove Abilities for each Role in the list of Allowed Abilities (Roles section > Roles tab). *WARNING* Any Member in a Role with this Ability can assign themselves--and any other non-Owner Member--all Abilities, potentially elevating themselves to near-Owner power. Be sure you know what you're doing before assigning this Ability." name="role change actions" value="10"/> + <action_set description="這些能力包括新增ã€ç§»é™¤ã€æ›´æ”¹ç¾¤çµ„角色,新增或移除æˆå“¡çš„角色,和為角色è¨å®šèƒ½åŠ›ç‰æ¬ŠåŠ›ã€‚" name="Roles"> + <action description="創立一個新角色" longdescription="到角色欄的角色é 籤,å¯ä»¥å»ºç«‹æ–°è§’色。" name="role create" value="4"/> + <action description="刪除角色" longdescription="到角色欄的角色é 籤,å¯ä»¥åˆªé™¤è§’色。" name="role delete" value="5"/> + <action description="變更角色å稱ã€é éŠœã€æè¿°ï¼Œè¨å®šè§’色的æˆå“¡å單是å¦å…¬é–‹" longdescription="變更角色å稱ã€é éŠœã€æè¿°ï¼Œè¨å®šè§’色的æˆå“¡å單是å¦å…¬é–‹ã€‚ é¸å–一個角色後,å¯åˆ°è§’色欄底下的角色é 籤完æˆé€™å‹•作。" name="role properties" value="6"/> + <action description="賦予æˆå“¡ã€ŒæŒ‡æ´¾è€…ã€è§’色" longdescription="從已知的指派角色ä¸é¸æ“‡è‹¥å¹²ï¼Œè³¦äºˆçµ¦æˆå“¡ï¼ˆè§’色欄 > æˆå“¡é 籤)。 有這能力的æˆå“¡ï¼Œåªèƒ½æŠŠä»–è‡ªå·±å·²èº«è² çš„è§’è‰²è³¦äºˆçµ¦åˆ¥çš„æˆå“¡ã€‚" name="role assign member limited" value="7"/> + <action description="賦予æˆå“¡ã€Œä»»ä½•人ã€è§’色" longdescription="從已知的指派角色ä¸ï¼Œè³¦äºˆçµ¦æˆå“¡ã€Œä»»ä½•人ã€è§’色(角色欄 > æˆå“¡é 籤)。 *è¦å‘Š* ä»»ä½•èº«è² å…·é€™èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œéƒ½å¯ä»¥æŠŠæŸäº›è§’è‰²è³¦äºˆè‡ªå·±æˆ–ä»»ä½•ä¸æ˜¯æ‰€æœ‰äººçš„æˆå“¡ï¼Œå› æ¤ä½¿è‡ªå·±æˆ–別人得到比ç¾åœ¨æ›´å¤šçš„æ¬ŠåŠ›ï¼Œæœ€çµ‚å¯èƒ½æ“有近似「所有人ã€çš„æ¬ŠåŠ›ã€‚ è³¦äºˆé€™é …èƒ½åŠ›ä¹‹å‰ï¼Œæ•¬è«‹æ…Žé‡è€ƒæ…®ã€‚" name="role assign member" value="8"/> + <action description="由角色ä¸ç§»é™¤æˆå“¡" longdescription="從已知的指派角色ä¸é¸æ“‡ï¼Œå°‡æˆå“¡å¸é™¤è©²è§’色(角色欄 > æˆå“¡é 籤)。 所有人角色ä¸å¾—被å¸é™¤ã€‚" name="role remove member" value="9"/> + <action description="è¨å®šæˆ–å¸é™¤è§’色能力" longdescription="從å…許的能力清單ä¸é¸æ“‡ï¼Œç‚ºæ¯ä¸€è§’色è¨å®šæˆ–å¸é™¤è©²èƒ½åŠ›ï¼ˆè§’è‰²æ¬„ > 角色é 籤)。 *è¦å‘Š* ä»»ä½•èº«è² å…·æœ‰é€™èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œéƒ½å¯ä»¥å°‡æ‰€æœ‰èƒ½åŠ›è³¦äºˆè‡ªå·±å’Œä»»ä½•å…¶ä»–ä¸æ˜¯æ‰€æœ‰äººçš„äººï¼Œå› æ¤è®“自己或他人æå‡ç‚ºè¿‘ä¼¼ã€Œæ‰€æœ‰äººã€æ¬ŠåŠ›çš„å±¤ç´šã€‚ è³¦äºˆé€™é …èƒ½åŠ›ä¹‹å‰ï¼Œæ•¬è«‹æ…Žé‡è€ƒæ…®ã€‚" name="role change actions" value="10"/> </action_set> - <action_set description="These Abilities include powers to modify this group's identity, such as changing public visibility, charter, and insignia." name="Group Identity"> - <action description="Change Charter, Insignia, and 'Show in search'" longdescription="Change Charter, Insignia, and 'Show in search'. This is done in the General section." name="group change identity" value="11"/> + <action_set description="這些能力包括有權修改群組身份,例如更改公開程度ã€è¦ç« å’Œå¾½ç« ã€‚" name="Group Identity"> + <action description="更改è¦ç« ã€å¾½ç« ,è¨å®šæ˜¯å¦ã€Œé¡¯ç¤ºæ–¼æœå°‹çµæžœã€ã€‚" longdescription="更改è¦ç« ã€å¾½ç« ,è¨å®šæ˜¯å¦ã€Œé¡¯ç¤ºæ–¼æœå°‹çµæžœã€ã€‚ 這å¯åœ¨ã€ŒåŸºæœ¬è³‡æ–™ã€æ¬„è¨å®šã€‚" name="group change identity" value="11"/> </action_set> - <action_set description="These Abilities include powers to deed, modify, and sell land in this group's land holdings. To get to the About Land window, right-click the ground and select 'About Land', or click the 'i' icon in the Navigation Bar." name="Parcel Management"> - <action description="讓渡土地或購買土地給群組" longdescription="Deed land and buy land for group. This is done in About Land > General tab." name="land deed" value="12"/> - <action description="Abandon land to Governor Linden" longdescription="Abandon land to Governor Linden. *WARNING* Any Member in a Role with this Ability can abandon group-owned land in About Land > General tab, reverting it to Linden ownership without a sale! Be sure you know what you're doing before assigning this Ability." name="land release" value="13"/> - <action description="Set land for sale info" longdescription="Set land for sale info. *WARNING* Any Member in a Role with this Ability can sell group-owned land in About Land > General tab as they wish! Be sure you know what you're doing before assigning this Ability." name="land set sale info" value="14"/> - <action description="Subdivide and join parcels" longdescription="Subdivide and join parcels. This is done by right-clicking the ground, 'Edit Terrain', and dragging your mouse on the land to make a selection. To subdivide, select what you want to split and click 'Subdivide'. To join, select two or more contiguous parcels and click 'Join'." name="land divide join" value="15"/> + <action_set description="這些能力包括有權讓渡ã€ä¿®æ”¹æˆ–å‡ºå”®æœ¬ç¾¤çµ„æ“æœ‰çš„土地。 欲å‰å¾€ã€ŒåœŸåœ°è³‡æ–™ã€è¦–窗,請在地é¢ä»»ä¸€è™•點按å³éµï¼Œé¸æ“‡ã€ŒåœŸåœ°è³‡æ–™ã€ï¼Œæˆ–點按導覽列的「iã€åœ–示。" name="Parcel Management"> + <action description="讓渡土地或購買土地給群組" longdescription="讓渡土地或為群組購地。 這å¯åœ¨ã€ŒåœŸåœ°è³‡æ–™ã€> 基本é 籤完æˆã€‚" name="land deed" value="12"/> + <action description="放棄土地,將所有權轉給 Governor Linden(林登總長)" longdescription="放棄土地,將所有權轉給 Governor Linden(林登總長)。 *è¦å‘Š* ä»»ä½•èº«è² å…·æœ‰é€™èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œéƒ½å¯ä»¥åˆ°ã€ŒåœŸåœ°è³‡æ–™ã€> 基本é 籤放棄任何群組所有的土地,ä¸ç¶“出售就將所有權轉給 Lindenï¼ è³¦äºˆé€™é …èƒ½åŠ›ä¹‹å‰ï¼Œæ•¬è«‹æ…Žé‡è€ƒæ…®ã€‚" name="land release" value="13"/> + <action description="è¨å®šå¾…售土地資訊" longdescription="è¨å®šå¾…售土地資訊。 *è¦å‘Š* ä»»ä½•èº«è² å…·æœ‰é€™èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œéƒ½å¯ä»¥åˆ°ã€ŒåœŸåœ°è³‡æ–™ã€> 基本é 籤任æ„å‡ºå”®ç¾¤çµ„æ‰€æœ‰çš„åœŸåœ°ï¼ è³¦äºˆé€™é …èƒ½åŠ›ä¹‹å‰ï¼Œæ•¬è«‹æ…Žé‡è€ƒæ…®ã€‚" name="land set sale info" value="14"/> + <action description="分割或åˆä½µåœ°æ®µ" longdescription="分割或åˆä½µåœ°æ®µã€‚ 欲進行æ¤å‹•作,請在地é¢ä»»ä¸€è™•點按å³éµï¼Œé¸æ“‡ã€Œç·¨è¼¯åœ°å½¢ã€ï¼Œä¸¦åœ¨åœŸåœ°ä¸Šæ‹–æ›³æ»‘é¼ é¸å–一個範åœã€‚ è¦é€²è¡Œåˆ†å‰²ï¼Œåšå¥½é¸æ“‡å¾Œé»žæŒ‰ã€Œåˆ†å‰²ã€ã€‚ è¦åˆä½µï¼Œé¸å–至少兩塊相鄰地段,å†é»žé¸ã€Œåˆä½µã€ã€‚" name="land divide join" value="15"/> </action_set> - <action_set description="These Abilities include powers to change the parcel name and publish settings, Find directory visibility, and landing point & TP routing options." name="Parcel Identity"> - <action description="Toggle 'Show Place in Search' and set category" longdescription="Toggle 'Show Place in Search' and setting a parcel's category in About Land > Options tab." name="land find places" value="17"/> - <action description="Change parcel name, description, and 'Show Place in Search' settings" longdescription="Change parcel name, description, and 'Show Place in Search' settings. This is done in About Land > Options tab." name="land change identity" value="18"/> - <action description="Set landing point and set teleport routing" longdescription="On a group-owned parcel, Members in a Role with this Ability can set a landing point to specify where incoming teleports arrive, and also set teleport routing for further control. This is done in About Land > Options tab." name="land set landing point" value="19"/> + <action_set description="é€™äº›èƒ½åŠ›åŒ…æ‹¬å¯æ›´æ”¹åœ°æ®µå稱和發佈è¨å®šã€è¨å®šæ˜¯å¦å…¬é–‹åˆ°æœå°‹çµæžœã€è¨å®šç™»é™¸åœ°é»žå’Œçž¬é–“傳é€ç¹žè·¯é¸é …。" name="Parcel Identity"> + <action description="切æ›ã€Œå°‡åœ°é»žé¡¯ç¤ºåœ¨æœå°‹çµæžœã€è¨å®šï¼Œä¸¦é¸å®šé¡žåˆ¥" longdescription="切æ›ã€Œå°‡åœ°é»žé¡¯ç¤ºåœ¨æœå°‹çµæžœã€è¨å®šï¼Œä¸¦åœ¨ã€ŒåœŸåœ°è³‡æ–™ã€> é¸é …é 籤è¨å®šåœ°æ®µé¡žåˆ¥ã€‚" name="land find places" value="17"/> + <action description="更改地段åç¨±ã€æè¿°ï¼Œå’Œã€Œå°‡åœ°é»žé¡¯ç¤ºåœ¨æœå°‹çµæžœã€è¨å®šã€‚" longdescription="更改地段åç¨±ã€æè¿°ï¼Œå’Œã€Œå°‡åœ°é»žé¡¯ç¤ºåœ¨æœå°‹çµæžœã€è¨å®šã€‚ 這å¯åœ¨ã€ŒåœŸåœ°è³‡æ–™ã€> é¸é …é 籤完æˆã€‚" name="land change identity" value="18"/> + <action description="è¨å®šç™»é™¸åœ°é»žå’Œçž¬é–“傳é€ç¹žè·¯è¨å®šã€‚" longdescription="åœ¨ç¾¤çµ„æ‰€æœ‰çš„åœ°æ®µä¸Šï¼Œèº«è² å…·æ¤èƒ½åŠ›çš„æˆå“¡ï¼Œå¯ä»¥è¨å®šäººå€‘瞬間傳é€é€²ä¾†æ™‚的登陸地點,和瞬間傳é€çš„繞路é¸é …。 這å¯åœ¨ã€ŒåœŸåœ°è³‡æ–™ã€> é¸é …é 籤完æˆã€‚" name="land set landing point" value="19"/> </action_set> - <action_set description="These Abilities include powers which affect parcel options, such as 'Create Objects', 'Edit Terrain', and music & media settings." name="Parcel Settings"> - <action description="Change music & media settings" longdescription="Change streaming music and movie settings in About Land > Media tab." name="land change media" value="20"/> - <action description="Toggle 'Edit Terrain'" longdescription="Toggle 'Edit Terrain'. *WARNING* About Land > Options tab > Edit Terrain allows anyone to terraform your land's shape, and place and move Linden plants. Be sure you know what you're doing before assigning this Ability. Editing terrain is toggled in About Land > Options tab." name="land edit" value="21"/> - <action description="Toggle various About Land > Options settings" longdescription="Toggle 'Safe (no damage)', 'Fly', and allow other Residents to: 'Edit Terrain', 'Build', 'Create Landmarks', and 'Run Scripts' on group-owned land in About Land > Options tab." name="land options" value="22"/> + <action_set description="這些能力包括有權更改地段é¸é …,例如「新建物件ã€ã€ã€Œç·¨è¼¯åœ°å½¢ã€ï¼Œå’ŒéŸ³æ¨‚ã€åª’é«”è¨å®šç‰ã€‚" name="Parcel Settings"> + <action description="更改音樂和媒體è¨å®š" longdescription="在「土地資料ã€> 媒體é 籤更改串æµéŸ³æ¨‚和影片è¨å®šã€‚" name="land change media" value="20"/> + <action description="切æ›ã€Œç·¨è¼¯åœ°å½¢ã€è¨å®š" longdescription="切æ›ã€Œç·¨è¼¯åœ°å½¢ã€è¨å®šã€‚ *è¦å‘Š* 「土地資料ã€> 「é¸é …ã€é 籤 >「編輯地形ã€å¯å…è¨±ä»»ä½•äººè®Šæ›´ä½ çš„åœŸåœ°å½¢ç‹€ï¼Œæ”¾ç½®æˆ–ç§»å‹• Linden æ¤ç‰©ã€‚ è³¦äºˆé€™é …èƒ½åŠ›ä¹‹å‰ï¼Œæ•¬è«‹æ…Žé‡è€ƒæ…®ã€‚ 編輯地形å¯åœ¨ã€ŒåœŸåœ°è³‡æ–™ã€> é¸é …é 籤åšåˆ‡æ›ã€‚" name="land edit" value="21"/> + <action description="切æ›å„é …ã€ŒåœŸåœ°è³‡æ–™ã€> é¸é …è¨å®š" longdescription="在「土地資料ã€> é¸é …é 籤切æ›ã€Œå®‰å…¨ï¼ˆç„¡å‚·å®³ï¼‰ã€è¨å®šï¼Œä¸¦å…許其他居民在群組所有土地上「編輯地形ã€ã€ã€Œå»ºè£½ã€ã€ã€Œå»ºç«‹åœ°æ¨™ã€ã€ã€ŒåŸ·è¡Œè…³æœ¬ã€ã€‚" name="land options" value="22"/> </action_set> - <action_set description="These Abilities include powers which allow Members to bypass restrictions on group-owned parcels." name="Parcel Powers"> - <action description="Always allow 'Edit Terrain'" longdescription="Members in a Role with this Ability can edit terrain on a group-owned parcel, even if it's turned off in About Land > Options tab." name="land allow edit land" value="23"/> - <action description="Always allow 'Fly'" longdescription="Members in a Role with this Ability can fly on a group-owned parcel, even if it's turned off in About Land > Options tab." name="land allow fly" value="24"/> - <action description="Always allow 'Create Objects'" longdescription="Members in a Role with this Ability can create objects on a group-owned parcel, even if it's turned off in About Land > Options tab." name="land allow create" value="25"/> - <action description="總是å…許 'å‰µé€ åœ°æ¨™'" longdescription="Members in a Role with this Ability can landmark a group-owned parcel, even if it's turned off in About Land > Options tab." name="land allow landmark" value="26"/> - <action description="Allow 'Set Home to Here' on group land" longdescription="Members in a Role with this Ability can use World menu > Landmarks > Set Home to Here on a parcel deeded to this group." name="land allow set home" value="28"/> - <action description="Allow 'Event Hosting' on group land" longdescription="Members in a Role with this Ability can select group owned parcels as venus when hosting an event." name="land allow host event" value="41"/> + <action_set description="這些能力包括å¯å…許æˆå“¡åœ¨ç¾¤çµ„所有地段上è¦é¿é™åˆ¶ã€‚" name="Parcel Powers"> + <action description="固定å…許「編輯地形ã€" longdescription="èº«è² å…·æ¤èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡å¯ä»¥åœ¨ç¾¤çµ„所有地段上編輯地形,無論這功能在「土地資料ã€> é¸é …é 籤裡是å¦è¢«ç¦æ¢ã€‚" name="land allow edit land" value="23"/> + <action description="固定å…許「飛行ã€" longdescription="èº«è² å…·æ¤èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡å¯ä»¥åœ¨ç¾¤çµ„所有地段上飛行,無論這能力是å¦åœ¨ã€ŒåœŸåœ°è³‡æ–™ã€> é¸é …é ç±¤è£¡è¢«ç¦æ¢ã€‚" name="land allow fly" value="24"/> + <action description="固定å…許「新建物件ã€" longdescription="èº«è² å…·æ¤èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡å¯ä»¥åœ¨ç¾¤çµ„所有地段上新建物件,無論這能力是å¦åœ¨ã€ŒåœŸåœ°è³‡æ–™ã€> é¸é …é ç±¤è£¡è¢«ç¦æ¢ã€‚" name="land allow create" value="25"/> + <action description="總是å…許「新建地標ã€" longdescription="èº«è² å…·æ¤èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡å¯ä»¥å°‡ç¾¤çµ„所有的地段è¨ç‚ºåœ°æ¨™ï¼Œç„¡è«–這能力是å¦åœ¨ã€ŒåœŸåœ°è³‡æ–™ã€> é¸é …é ç±¤è£¡è¢«ç¦æ¢ã€‚" name="land allow landmark" value="26"/> + <action description="å…許在群組所有土地上「將這裡è¨ç‚ºæˆ‘的家ã€" longdescription="èº«è² å…·æ¤èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œå¯ä»¥åœ¨è®“渡給這群組的地段上使用「世界ã€é¸å–® > 地標 > 「將這裡è¨ç‚ºæˆ‘的家ã€ã€‚" name="land allow set home" value="28"/> + <action description="å…許在群組所有土地上「開辦活動ã€" longdescription="èº«è² å…·é€™èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œå¯ä»¥é¸æ“‡ç¾¤çµ„æ‰€æœ‰çš„åœ°æ®µä½œç‚ºé–‹è¾¦æ´»å‹•çš„å ´åœ°ã€‚" name="land allow host event" value="41"/> </action_set> - <action_set description="These Abilities include powers to allow or restrict access to group-owned parcels, including freezing and ejecting Residents." name="Parcel Access"> - <action description="Manage parcel Access lists" longdescription="Manage parcel Access lists in About Land > Access tab." name="land manage allowed" value="29"/> - <action description="Manage parcel Ban lists" longdescription="Manage parcel Ban lists in About Land > Access tab." name="land manage banned" value="30"/> - <action description="Change parcel 'Sell passes to' settings" longdescription="Change parcel 'Sell passes to' settings in About Land > Access tab." name="land manage passes" value="31"/> - <action description="將地段內的居民踢出åŠå‡çµ" longdescription="Members in a Role with this Ability can handle an unwelcome Resident on a group-owned parcel by right-clicking them, then selecting 'Eject' or 'Freeze'." name="land admin" value="32"/> + <action_set description="這些能力包括å¯å…許或é™åˆ¶äººå€‘出入群組所有的地段,包括把居民å‡çµæˆ–踢出。" name="Parcel Access"> + <action description="管ç†åœ°æ®µå‡ºå…¥è¨±å¯åå–®" longdescription="在「土地資料ã€> 出入許å¯é 籤管ç†åœ°æ®µçš„出入許å¯å單。" name="land manage allowed" value="29"/> + <action description="管ç†åœ°æ®µç¦å…¥åå–®" longdescription="在「土地資料ã€> 出入許å¯é 籤管ç†åœ°æ®µçš„ç¦å…¥å單。" name="land manage banned" value="30"/> + <action description="變更地段的「通行è‰å‡ºå”®å°è±¡ã€è¨å®š" longdescription="在「土地資料ã€> 出入許å¯é 籤變更地段的「通行è‰å‡ºå”®å°è±¡ã€è¨å®šã€‚" name="land manage passes" value="31"/> + <action description="將地段內的居民踢出åŠå‡çµ" longdescription="èº«è² å…·æ¤èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œå¯ä»¥åœ¨ç¾¤çµ„所有地段上處置ä¸å—æ¡è¿Žçš„居民,按å³éµåŠ ä»¥ã€Œè¸¢å‡ºã€æˆ–「å‡çµã€ã€‚" name="land admin" value="32"/> </action_set> - <action_set description="These Abilities include powers to allow members to return objects and place and move Linden plants. This is useful for Members to clean up litter and do landscaping, but it should also be used with care, because there's no undo for returning objects." name="Parcel Content"> - <action description="Return objects owned by group" longdescription="Return objects on group-owned parcels that are owned by the group in About Land > Objects tab." name="land return group owned" value="48"/> - <action description="Return objects set to group" longdescription="Return objects on group-owned parcels that are set to the group in About Land > Objects tab." name="land return group set" value="33"/> - <action description="退回éžç¾¤çµ„物件" longdescription="Return objects on group-owned parcels that are non-group in About Land > Objects tab." name="land return non group" value="34"/> - <action description="Landscaping using Linden plants" longdescription="Landscaping ability to place and move Linden trees, plants, and grasses. These items can be found in your inventory's Library > Objects folder, or they can be created via the Build menu." name="land gardening" value="35"/> + <action_set description="這些能力包括有權å…許æˆå“¡é€è¿”物件,或放置或移動 Linden æ¤ç‰©ã€‚ 這能力的用處是讓æˆå“¡æ¸…ç†ä¸€ä¸‹åœŸåœ°ï¼Œåšä¸€åšæ™¯è§€ä½ˆç½®ï¼Œä½†å¿…é ˆå°å¿ƒä½¿ç”¨ï¼Œå› 為物件一旦被é€è¿”後å³ç„¡æ³•復原。" name="Parcel Content"> + <action description="é€è¿”群組所有的物件" longdescription="在「土地資料ã€> 物件é 籤é€è¿”使–¼ç¾¤çµ„æ‰€æ“æœ‰åœ°æ®µä¸Šçš„ç¾¤çµ„æ‰€æ“æœ‰ç‰©ä»¶ã€‚" name="land return group owned" value="48"/> + <action description="é€è¿”è¨çµ¦ç¾¤çµ„的物件" longdescription="在「土地資料ã€> 物件é 籤é€è¿”使–¼ç¾¤çµ„æ‰€æ“æœ‰åœ°æ®µçš„è¨çµ¦ç¾¤çµ„的物件。" name="land return group set" value="33"/> + <action description="退回éžç¾¤çµ„物件" longdescription="在「土地資料ã€> 物件é 籤é€è¿”使–¼ç¾¤çµ„æ‰€æ“æœ‰åœ°æ®µçš„éžç¾¤çµ„物件。" name="land return non group" value="34"/> + <action description="用 Linden æ¤ç‰©ä½ˆç½®æ™¯è§€ã€‚" longdescription="å…許放置或移動 Linden 樹種ã€è‰åœ°å’Œå…¶ä»–æ¤ç‰©çš„æ™¯è§€ä½ˆç½®èƒ½åŠ›ã€‚ é€™äº›ç‰©é …åœ¨ä½ æ”¶ç´å€çš„資æºåº« > ç‰©ä»¶è³‡æ–™å¤¾å¯æ‰¾åˆ°ï¼Œä½ 也å¯ä»¥é€éŽã€Œå»ºè£½ã€é¸å–®åŠ ä»¥æ–°å»ºã€‚" name="land gardening" value="35"/> </action_set> - <action_set description="These Abilities include powers to deed, modify, and sell group-owned objects. These changes are done in the Build Tools > General tab. Right-click an object and Edit to see its settings." name="Object Management"> - <action description="讓渡物件給群組" longdescription="Deed objects to group in the Build Tools > General tab." name="object deed" value="36"/> - <action description="Manipulate (move, copy, modify) group-owned objects" longdescription="Manipulate (move, copy, modify) group-owned objects in the Build Tools > General tab." name="object manipulate" value="38"/> - <action description="Set group-owned objects for sale" longdescription="Set group-owned objects for sale in the Build Tools > General tab." name="object set sale" value="39"/> + <action_set description="這些能力包括有權讓渡ã€ä¿®æ”¹æˆ–å‡ºå”®æœ¬ç¾¤çµ„æ“æœ‰çš„物件。 這些變更å¯åœ¨ã€Œå»ºè£½å·¥å…·ã€> 基本é 籤完æˆã€‚ å°ä¸€å€‹ç‰©ä»¶é»žæŒ‰å³éµï¼Œé¸æ“‡ã€Œç·¨è¼¯ã€å³å¯å¯Ÿçœ‹å…¶è¨å®šã€‚" name="Object Management"> + <action description="讓渡物件給群組" longdescription="在「建製工具ã€> 基本é 籤將物件讓渡給群組。" name="object deed" value="36"/> + <action description="æ“縱(移動ã€è¤‡è£½ã€ä¿®æ”¹ï¼‰ç¾¤çµ„æ‰€æ“æœ‰ç‰©ä»¶" longdescription="在「建製工具ã€> 基本é 籤æ“縱(移動ã€è¤‡è£½ã€ä¿®æ”¹ï¼‰ç¾¤çµ„æ‰€æ“æœ‰ç‰©ä»¶ã€‚" name="object manipulate" value="38"/> + <action description="è¨å®šå‡ºå”®ç¾¤çµ„æ‰€æ“æœ‰ç‰©ä»¶" longdescription="在「建製工具ã€> 基本é 籤è¨å®šå‡ºå”®ç¾¤çµ„æ‰€æ“æœ‰ç‰©ä»¶ã€‚" name="object set sale" value="39"/> </action_set> - <action_set description="These Abilities include powers which require Members to pay group liabilities and receive group dividends, and restrict access to group account history." name="Accounting"> - <action description="Pay group liabilities and receive group dividends" longdescription="Members in a Role with this Ability will automatically pay group liabilities and receive group dividends. This means they will receive a portion of group-owned land sales which are distributed daily, as well as contribute towards things like parcel listing fees." name="accounting accountable" value="40"/> + <action_set description="é€™äº›èƒ½åŠ›åŒ…æ‹¬æœ‰æ¬Šè¦æ±‚æˆå“¡æ”¯ä»˜ç¾¤çµ„é–‹éŠ·ã€æ”¶å–群組利æ¯ï¼Œé™åˆ¶ç¾¤çµ„帳號æ·å²é–‹æ”¾å°è±¡ã€‚" name="Accounting"> + <action description="支付群組開銷,收å–群組利æ¯" longdescription="èº«è² å…·é€™èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œå°‡è‡ªå‹•支付群組開銷並收å–群組利æ¯ã€‚ 這表示他們將ç²å–ç¾¤çµ„æ‰€æ“æœ‰åœŸåœ°å‡ºå”®å¾Œçš„éƒ¨åˆ†æ”¶å…¥ï¼Œæ¯æ—¥çµç®—ï¼ŒåŒæ™‚並分攤地段刊登費ç‰é–‹éŠ·ã€‚" name="accounting accountable" value="40"/> </action_set> - <action_set description="These Abilities include powers to allow Members to send, receive, and view group Notices." name="Notices"> - <action description="é€å‡ºé€šçŸ¥" longdescription="Members in a Role with this Ability can send Notices via the Group > Notices section." name="notices send" value="42"/> - <action description="接收通知與察看éŽåŽ»é€šçŸ¥" longdescription="Members in a Role with this Ability can receive Notices and view past Notices in Group > Notices section." name="notices receive" value="43"/> + <action_set description="這些能力包括å¯å…許æˆå“¡ç™¼é€ã€æŽ¥æ”¶ä¸¦å¯Ÿçœ‹ç¾¤çµ„通知。" name="Notices"> + <action description="é€å‡ºé€šçŸ¥" longdescription="èº«è² å…·é€™èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œå¯ä»¥åˆ°ã€Œç¾¤çµ„ã€> 通知欄發é€é€šçŸ¥ã€‚" name="notices send" value="42"/> + <action description="接收通知與察看éŽåŽ»é€šçŸ¥" longdescription="èº«è² å…·é€™èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œå¯ä»¥åˆ°ã€Œç¾¤çµ„ã€> 通知欄接收通知並察看éŽåŽ»çš„é€šçŸ¥ã€‚" name="notices receive" value="43"/> </action_set> - <action_set description="These Abilities include powers to allow or restrict access to group chat sessions and group voice chat." name="Chat"> - <action description="åŠ å…¥ç¾¤çµ„èŠå¤©" longdescription="Members in a Role with this Ability can join group chat sessions, for text and voice." name="join group chat" value="16"/> - <action description="åŠ å…¥ç¾¤çµ„èªžéŸ³èŠå¤©" longdescription="Members in a Role with this Ability can join group voice chat sessions. NOTE: The Join Group Chat ability is required to access the voice chat session." name="join voice chat" value="27"/> - <action description="é©åº¦æˆäººå…§å®¹çš„群組èŠå¤©" longdescription="Members in a Role with this Ability can control access and participation in group voice and text chat sessions." name="moderate group chat" value="37"/> + <action_set description="這些能力包括å¯å…許或é™åˆ¶äººå€‘åŠ å…¥ç¾¤çµ„èŠå¤©æœƒè©±å’Œç¾¤çµ„語音èŠå¤©ã€‚" name="Chat"> + <action description="åŠ å…¥ç¾¤çµ„èŠå¤©" longdescription="èº«è² å…·é€™èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œå¯ä»¥åŠ å…¥ç¾¤çµ„çš„æ–‡å—æˆ–語音èŠå¤©æœƒè©±ã€‚" name="join group chat" value="16"/> + <action description="åŠ å…¥ç¾¤çµ„èªžéŸ³èŠå¤©" longdescription="èº«è² å…·é€™èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œå¯ä»¥åŠ å…¥ç¾¤çµ„çš„èªžéŸ³èŠå¤©æœƒè©±ã€‚ 注æ„ï¼šæ¬²åŠ å…¥èªžéŸ³èŠå¤©æœƒè©±ï¼Œéœ€æœ‰ã€ŒåŠ å…¥ç¾¤çµ„èŠå¤©ã€èƒ½åŠ›ã€‚" name="join voice chat" value="27"/> + <action description="é©åº¦æˆäººå…§å®¹çš„群組èŠå¤©" longdescription="èº«è² å…·é€™èƒ½åŠ›çš„è§’è‰²çš„æˆå“¡ï¼Œå¯ä»¥æŽ§åˆ¶èª°å¯åŠ å…¥ç¾¤çµ„èªžéŸ³å’Œæ–‡å—èŠå¤©æœƒè©±ã€‚" name="moderate group chat" value="37"/> </action_set> </role_actions> diff --git a/indra/newview/skins/default/xui/zh/sidepanel_appearance.xml b/indra/newview/skins/default/xui/zh/sidepanel_appearance.xml index 7d8a502594..83a9bdf6a5 100644 --- a/indra/newview/skins/default/xui/zh/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/zh/sidepanel_appearance.xml @@ -11,7 +11,7 @@ (狀態) </text> <text name="currentlook_name"> - MyOutfit With a really Long Name like MOOSE + å稱很長ã€å¾ˆé•·ã€å¾ˆé•·ã€å¾ˆé•·ã€å¾ˆé•·çš„ MyOutfit </text> <button label="" name="edit_outfit_btn" tool_tip="ç·¨è¼¯é€™è£æ‰®"/> </panel> diff --git a/indra/newview/skins/default/xui/zh/sidepanel_inventory.xml b/indra/newview/skins/default/xui/zh/sidepanel_inventory.xml index 7abe95a402..c8aae15011 100644 --- a/indra/newview/skins/default/xui/zh/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/zh/sidepanel_inventory.xml @@ -1,16 +1,37 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="事物" name="objects panel"> <panel label="" name="sidepanel__inventory_panel"> + <layout_stack name="inventory_layout_stack"> + <layout_panel name="inbox_layout_panel"> + <panel label="" name="marketplace_inbox"> + <string name="InboxLabelWithArg"> + æ”¶åˆ°çš„ç‰©é … ([NUM]) + </string> + <string name="InboxLabelNoArg"> + æ”¶åˆ°çš„ç‰©é … + </string> + <button label="æ”¶åˆ°çš„ç‰©é …" name="inbox_btn"/> + <text name="inbox_fresh_new_count"> + [NUM] é …æ–°çš„ + </text> + <panel name="inbox_inventory_placeholder_panel" tool_tip="å°‡ç‰©é …æ‹–æ›³ç½®æ”¾åˆ°æ”¶ç´å€ï¼Œå³å¯é–‹å§‹ä½¿ç”¨"> + <text name="inbox_inventory_placeholder"> + å¾žç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚é›†è³¼å¾—ç‰©é …å°‡é€åˆ°é€™è£¡ã€‚ + </text> + </panel> + </panel> + </layout_panel> + </layout_stack> <panel name="button_panel"> <layout_stack name="button_panel_ls"> <layout_panel name="info_btn_lp"> <button label="檔案" name="info_btn" tool_tip="顯示物件檔案"/> </layout_panel> <layout_panel name="share_btn_lp"> - <button label="分享" name="share_btn" tool_tip="Share an inventory item"/> + <button label="分享" name="share_btn" tool_tip="分享一個收ç´å€ç‰©å“"/> </layout_panel> <layout_panel name="shop_btn_lp"> - <button label="Shop" name="shop_btn" tool_tip="Open Marketplace webpage"/> + <button label="購物" name="shop_btn" tool_tip="開啟 Marketplace 購物市集網é "/> <button label="穿上" name="wear_btn" tool_tip="ç©¿ä¸Šæ‰€é¸æ“‡çš„è£æ‰®"/> <button label="æ’æ”¾" name="play_btn"/> <button label="瞬間傳é€" name="teleport_btn" tool_tip="瞬間傳é€åˆ°æ‰€é¸çš„å€åŸŸ"/> diff --git a/indra/newview/skins/default/xui/zh/sidepanel_item_info.xml b/indra/newview/skins/default/xui/zh/sidepanel_item_info.xml index adc815fb4b..1b093e0ecd 100644 --- a/indra/newview/skins/default/xui/zh/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/zh/sidepanel_item_info.xml @@ -3,6 +3,9 @@ <panel.string name="unknown"> (未知) </panel.string> + <panel.string name="unknown_multiple"> + (未知 / å¤šé …ï¼‰ + </panel.string> <panel.string name="public"> (公開) </panel.string> @@ -10,7 +13,7 @@ ä½ å¯ä»¥ï¼š </panel.string> <panel.string name="owner_can"> - æ“æœ‰è€…å¯ä»¥ï¼š + 所有人å¯ä»¥ï¼š </panel.string> <panel.string name="acquiredDate"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] @@ -19,7 +22,7 @@ (收ç´å€ï¼‰ </panel.string> <panel.string name="origin_inworld"> - (Inworld) + (在虛擬世界) </panel.string> <text name="title" value="ç‰©å“æª”案"/> <text name="origin" value="(收ç´å€ï¼‰"/> @@ -35,7 +38,7 @@ å‰µé€ è€…ï¼š </text> <text name="LabelOwnerTitle"> - æ“æœ‰è€…: + 所有人: </text> <text name="LabelAcquiredTitle"> å–得於: @@ -45,26 +48,26 @@ ä½ å¯ä»¥ï¼š </text> <check_box label="修改" name="CheckOwnerModify"/> - <check_box label="覆製" name="CheckOwnerCopy"/> + <check_box label="æšåº¨" name="CheckOwnerCopy"/> <check_box label="轉移" name="CheckOwnerTransfer"/> <text name="AnyoneLabel"> 任何人: </text> - <check_box label="覆製" name="CheckEveryoneCopy"/> + <check_box label="æšåº¨" name="CheckEveryoneCopy"/> <text name="GroupLabel"> 群組: </text> - <check_box label="分享" name="CheckShareWithGroup" tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."/> + <check_box label="分享" name="CheckShareWithGroup" tool_tip="å…許æ¤ç¾¤çµ„所有æˆå“¡å…±äº«ä½ 修改æ¤ç‰©ä»¶çš„æ¬Šé™ã€‚ ä½ å¿…é ˆè®“æ¸¡æ‰èƒ½å•Ÿå‹•角色é™åˆ¶ã€‚"/> <text name="NextOwnerLabel"> - ä¸‹ä¸€å€‹æ“æœ‰è€…: + 下一個所有人: </text> <check_box label="修改" name="CheckNextOwnerModify"/> - <check_box label="覆製" name="CheckNextOwnerCopy"/> - <check_box label="轉移" name="CheckNextOwnerTransfer" tool_tip="Next owner can give away or resell this object"/> + <check_box label="æšåº¨" name="CheckNextOwnerCopy"/> + <check_box label="轉移" name="CheckNextOwnerTransfer" tool_tip="下一個所有人å¯è´ˆé€æˆ–轉售這個物件"/> </panel> <check_box label="出售" name="CheckPurchase"/> <combo_box name="combobox sale copy"> - <combo_box.item label="副本" name="Copy"/> + <combo_box.item label="æšåº¨" name="Copy"/> <combo_box.item label="原件" name="Original"/> </combo_box> <spinner label="åƒ¹æ ¼ï¼š L$" name="Edit Cost"/> diff --git a/indra/newview/skins/default/xui/zh/sidepanel_task_info.xml b/indra/newview/skins/default/xui/zh/sidepanel_task_info.xml index 3d46e52726..982dde4010 100644 --- a/indra/newview/skins/default/xui/zh/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/zh/sidepanel_task_info.xml @@ -7,28 +7,34 @@ 讓渡 </panel.string> <panel.string name="text modify info 1"> - ä½ å¯ä»¥ä¿®æ”¹é€™å€‹ç‰©ä»¶ + ä½ èƒ½ä¿®æ”¹é€™å€‹ç‰©ä»¶ </panel.string> <panel.string name="text modify info 2"> - ä½ å¯ä»¥ä¿®æ”¹é€™äº›ç‰©ä»¶ + ä½ èƒ½ä¿®æ”¹é€™äº›ç‰©ä»¶ </panel.string> <panel.string name="text modify info 3"> - ä½ ä¸å¯ä»¥ä¿®æ”¹é€™å€‹ç‰©ä»¶ + ä½ ä¸èƒ½ä¿®æ”¹é€™å€‹ç‰©ä»¶ </panel.string> <panel.string name="text modify info 4"> - ä½ ä¸å¯ä»¥ä¿®æ”¹é€™äº›ç‰©ä»¶ + ä½ ä¸èƒ½ä¿®æ”¹é€™äº›ç‰©ä»¶ + </panel.string> + <panel.string name="text modify info 5"> + 無法跨地å€ä¿®æ”¹é€™å€‹ç‰©ä»¶ + </panel.string> + <panel.string name="text modify info 6"> + 無法跨地å€ä¿®æ”¹é€™äº›ç‰©ä»¶ </panel.string> <panel.string name="text modify warning"> - 這個物件有è¯çµåˆ°å…¶ä»–部分 + é€™å€‹ç‰©ä»¶å«æœ‰è¯çµçš„部分 </panel.string> <panel.string name="Cost Default"> åƒ¹æ ¼ï¼š L$ </panel.string> <panel.string name="Cost Total"> - 總價: L$ + 總價:L$ </panel.string> <panel.string name="Cost Per Unit"> - 單價: L$ + 單價:L$ </panel.string> <panel.string name="Cost Mixed"> æ··åˆåƒ¹æ ¼ @@ -37,7 +43,7 @@ æ··åˆéŠ·å”® </panel.string> <text name="title" value="物件檔案"/> - <text name="where" value="(Inworld)"/> + <text name="where" value="(在虛擬世界)"/> <panel label="" name="properties_panel"> <text name="Name:"> å稱: @@ -49,23 +55,23 @@ å‰µé€ è€…ï¼š </text> <text name="Owner:"> - æ“æœ‰è€…: + 所有人: </text> <text name="Group_label"> 群組: </text> - <button name="button set group" tool_tip="鏿“‡ä¸€å€‹ç¾¤çµ„以分享這個物件的權é™"/> + <button name="button set group" tool_tip="鏿“‡ä¸€å€‹ç¾¤çµ„以分享這物件的權é™"/> <name_box initial_value="載入ä¸..." name="Group Name Proxy"/> - <button label="讓渡" label_selected="讓渡" name="button deed" tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer."/> + <button label="讓渡" label_selected="讓渡" name="button deed" tool_tip="ã€Œè®“æ¸¡ã€æœƒæŠŠé€™ç‰©ä»¶è´ˆé€å‡ºåŽ»ä¸¦è³¦äºˆã€Œä¸‹ä¸€å€‹æ‰€æœ‰äººã€æ¬Šé™ã€‚ 群組所分享的物件å¯ç”±ç¾¤çµ„è·å“¡åŠ ä»¥è®“æ¸¡ã€‚"/> <text name="label click action"> - 點擊以: + 點按以: </text> <combo_box name="clickaction"> <combo_box.item label="觸碰(é è¨ï¼‰" name="Touch/grab(default)"/> <combo_box.item label="å在物件上" name="Sitonobject"/> <combo_box.item label="購買物件" name="Buyobject"/> <combo_box.item label="支付物件" name="Payobject"/> - <combo_box.item label="開啟" name="Open"/> + <combo_box.item label="打開" name="Open"/> </combo_box> <panel name="perms_inv"> <text name="perm_modify"> @@ -74,27 +80,30 @@ <text name="Anyone can:"> 任何人: </text> - <check_box label="覆製" name="checkbox allow everyone copy"/> + <check_box label="æšåº¨" name="checkbox allow everyone copy"/> <check_box label="移動" name="checkbox allow everyone move"/> <text name="GroupLabel"> 群組: </text> - <check_box label="分享" name="checkbox share with group" tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."/> + <check_box label="分享" name="checkbox share with group" tool_tip="å…許æ¤ç¾¤çµ„所有æˆå“¡å…±äº«ä½ 修改æ¤ç‰©ä»¶çš„æ¬Šé™ã€‚ ä½ å¿…é ˆè®“æ¸¡æ‰èƒ½å•Ÿå‹•角色é™åˆ¶ã€‚"/> <text name="NextOwnerLabel"> - ä¸‹ä¸€å€‹æ“æœ‰è€…: + 下一個所有人: </text> <check_box label="修改" name="checkbox next owner can modify"/> - <check_box label="覆製" name="checkbox next owner can copy"/> - <check_box label="轉移" name="checkbox next owner can transfer" tool_tip="ä¸‹ä¸€å€‹æ“æœ‰è€…å¯ä»¥é€å‡ºæˆ–轉售這個物件"/> + <check_box label="æšåº¨" name="checkbox next owner can copy"/> + <check_box label="轉移" name="checkbox next owner can transfer" tool_tip="下一個所有人å¯è´ˆé€æˆ–轉售這個物件"/> </panel> <check_box label="出售" name="checkbox for sale"/> <combo_box name="sale type"> - <combo_box.item label="副本" name="Copy"/> + <combo_box.item label="æšåº¨" name="Copy"/> <combo_box.item label="內容" name="Contents"/> <combo_box.item label="原件" name="Original"/> </combo_box> <spinner label="åƒ¹æ ¼ï¼š L$" name="Edit Cost"/> <check_box label="顯示在æœå°‹ä¸" name="search_check" tool_tip="讓其他人å¯ä»¥åœ¨æœå°‹çµæžœä¸å¯Ÿçœ‹åˆ°æ¤ç‰©ä»¶"/> + <text name="pathfinding_attributes_label"> + 尋徑屬性: + </text> <text name="B:"> B: </text> @@ -115,7 +124,7 @@ </text> </panel> <panel name="button_panel"> - <button label="開啟" name="open_btn"/> + <button label="打開" name="open_btn"/> <button label="支付" name="pay_btn"/> <button label="購買" name="buy_btn"/> <button label="細節" name="details_btn"/> diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml index 6dbe44d32e..7e17ed6864 100644 --- a/indra/newview/skins/default/xui/zh/strings.xml +++ b/indra/newview/skins/default/xui/zh/strings.xml @@ -29,11 +29,14 @@ å¿«å–æ¸…除ä¸... </string> <string name="StartupInitializingTextureCache"> - æè³ªå¿«å–åˆå§‹åŒ–ä¸... + æ£åœ¨åˆå§‹åŒ–æè³ªå¿«å–... </string> <string name="StartupInitializingVFS"> VFS åˆå§‹åŒ–ä¸... </string> + <string name="StartupRequireDriverUpdate"> + 顯åƒåˆå§‹åŒ–失敗。 è«‹æ›´æ–°ä½ çš„é¡¯åƒå¡é©…動程å¼ï¼ + </string> <string name="ProgressRestoring"> 回å˜ä¸... </string> @@ -44,7 +47,7 @@ 全亮(舊版) </string> <string name="LoginInProgress"> - 登入ä¸ã€‚[APP_NAME] å¯èƒ½å‡ºç¾å‡çµç‹€æ…‹ã€‚è«‹è€å¿ƒç¨ç‰ã€‚ + 登入ä¸ã€‚[APP_NAME] å¯èƒ½çœ‹ä¼¼å‡çµï¼Œè«‹è€å¿ƒç¨ç‰ã€‚ è«‹ç¨å€™ã€‚ </string> <string name="LoginInProgressNoFrozen"> 登入ä¸... @@ -56,7 +59,7 @@ 進行帳戶ç¶è·... </string> <string name="LoginAttempt"> - å…ˆå‰ä¼åœ–嘗試登入失敗。ç¾ç™»å…¥ä¸ï¼Œå˜—試 [NUMBER] + å‰ä¸€æ¬¡ç™»å…¥å¤±æ•—。 登入ä¸ï¼Œç¬¬ [NUMBER] 次嘗試 </string> <string name="LoginPrecaching"> 世界載入ä¸... @@ -74,10 +77,10 @@ é©—è‰å¿«å–檔案(約需 60-90 ç§’å·¦å³ï¼‰... </string> <string name="LoginProcessingResponse"> - 回應處ç†ä¸... + æ£åœ¨è™•ç†å›žæ‡‰... </string> <string name="LoginInitializingWorld"> - 世界åˆå§‹åŒ–ä¸... + æ£åœ¨åˆå§‹åŒ–虛擬世界… </string> <string name="LoginDecodingImages"> 圖åƒè§£ç¢¼ä¸... @@ -91,6 +94,12 @@ <string name="LoginQuicktimeOK"> QuickTime å·²æˆåŠŸåˆå§‹åŒ–。 </string> + <string name="LoginRequestSeedCapGrant"> + è©¢å•地å€è² è·åŠ›â€¦ + </string> + <string name="LoginRetrySeedCapGrant"> + è©¢å•地å€è² è·åŠ›ï¼Œç¬¬ [NUMBER] 次嘗試… + </string> <string name="LoginWaitingForRegionHandshake"> 地å€äº¤æ¡ç‰å¾…ä¸... </string> @@ -101,25 +110,25 @@ æœè£ä¸‹è¼‰ä¸... </string> <string name="InvalidCertificate"> - 伺æœå™¨å›žå‚³ä¸€å€‹ç„¡æ•ˆæžœæå£žçš„æ†‘è‰ã€‚è«‹é€£ç¹«ç¶²æ ¼ç®¡ç†è€…。 + 伺æœå™¨å›žå‚³ä¸€å€‹ç„¡æ•ˆæˆ–æå£žçš„æ†‘è‰ã€‚ è«‹è¯çµ¡ç¶²æ ¼ç®¡ç†å“¡ã€‚ </string> <string name="CertInvalidHostname"> - An invalid hostname was used to access the server, please check your SLURL or Grid hostname. + 用了無效的主機å來è¯çµ¡ä¼ºæœå™¨ï¼Œè«‹æª¢æŸ¥ä½ çš„ SLURL æˆ–ç¶²æ ¼ä¸»æ©Ÿå。 </string> <string name="CertExpired"> - The certificate returned by the Grid appears to be expired. Please check your system clock, or contact your Grid administrator. + ç¶²æ ¼å‚³å›žçš„æ†‘è‰ä¼¼ä¹Žå·²éŽæœŸã€‚ 請檢查系統時é˜ï¼Œæˆ–è¯çµ¡ç¶²æ ¼ç®¡ç†å“¡ã€‚ </string> <string name="CertKeyUsage"> - The certificate returned by the server could not be used for SSL. Please contact your Grid administrator. + 伺æœå™¨å‚³å›žçš„æ†‘è‰ç„¡æ³•用於 SSL。 è«‹è¯çµ¡ç¶²æ ¼ç®¡ç†å“¡ã€‚ </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 administrator. + 無法檢驗通éŽç¶²æ ¼ä¼ºæœå™¨å‚³å›žçš„æ†‘è‰ç°½å。 è«‹è¯çµ¡ç¶²æ ¼ç®¡ç†å“¡ã€‚ </string> <string name="LoginFailedNoNetwork"> - Network Error: Could not establish connection, please check your network connection. + ç¶²è·¯éŒ¯èª¤ï¼šç„¡æ³•å»ºç«‹é€£ç·šï¼Œè«‹æª¢æŸ¥ç¶²è·¯é€£ç·šæ˜¯å¦æ£å¸¸ã€‚ </string> <string name="LoginFailed"> 登入失敗。 @@ -128,10 +137,138 @@ çµæŸé€€å‡º </string> <string name="create_account_url"> - http://join.secondlife.com/ + http://join.secondlife.com/?sourceid=[sourceid] + </string> + <string name="LoginFailedViewerNotPermitted"> + ä½ ç›®å‰æ‰€ç”¨çš„ Viewer 已經無法å†é€²å…¥ç¬¬äºŒäººç”Ÿã€‚ 請到這個é é¢ä¸‹è¼‰æœ€æ–° Viewer: +http://secondlife.com/download + +欲知詳情,請åƒé–±ä¸‹é¢çš„常見å•題集: +http://secondlife.com/viewer-access-faq + </string> + <string name="LoginIntermediateOptionalUpdateAvailable"> + 有å¯ä»¥é¸æ“‡æ€§å®‰è£çš„æ›´æ–°ç‰ˆï¼š[VERSION] + </string> + <string name="LoginFailedRequiredUpdate"> + ä½ å¿…é ˆæ›´æ–°ç‚ºé€™å€‹ç‰ˆæœ¬ï¼š[VERSION] + </string> + <string name="LoginFailedAlreadyLoggedIn"> + æ¤ç”¨æˆ¶å·²ç¶“登入。 + </string> + <string name="LoginFailedAuthenticationFailed"> + 抱æ‰ï¼ æˆ‘å€‘ç„¡æ³•è®“ä½ ç™»å…¥ã€‚ +è«‹æª¢æŸ¥ç¢ºå®šä½ è¼¸å…¥äº†æ£ç¢ºçš„ + * 使用者å稱(例:bobsmith123 或 steller.sunshine) + * 密碼 +並請確定éµç›¤æ²’有鎖定大寫éµã€‚ + </string> + <string name="LoginFailedPasswordChanged"> + ç‚ºäº†å®‰å…¨èµ·è¦‹ï¼Œå·²ç¶“è®Šæ›´ä½ çš„å¯†ç¢¼ã€‚ +è«‹åˆ°ä½æ–¼ http://secondlife.com/password 的帳號é é¢ +回ç”安全驗è‰å•題後,é‡è¨å¯†ç¢¼ã€‚ +å¦‚æœ‰é€ æˆä¸ä¾¿è«‹å¤šåŒ…涵。 + </string> + <string name="LoginFailedPasswordReset"> + æˆ‘å€‘ç³»çµ±æœ‰æ‰€è®Šæ›´ï¼Œä½ å¿…é ˆé‡è¨å¯†ç¢¼ã€‚ +è«‹åˆ°ä½æ–¼ http://secondlife.com/password 的帳號é é¢ +回ç”安全驗è‰å•題後,é‡è¨å¯†ç¢¼ã€‚ +å¦‚æœ‰é€ æˆä¸ä¾¿è«‹å¤šåŒ…涵。 + </string> + <string name="LoginFailedEmployeesOnly"> + ç¬¬äºŒäººç”Ÿç›®å‰æš«æ™‚關閉進行ç¶è·ã€‚ +ç›®å‰åƒ…å…許林登員工登入。 +請到 www.secondlife.com/status 察看最新公告。 + </string> + <string name="LoginFailedPremiumOnly"> + ç¬¬äºŒäººç”Ÿæ¤æ™‚暫時é™åˆ¶ç™»å…¥ï¼Œä»¥ç¢ºä¿ä¸å½±éŸ¿æ•ˆèƒ½ï¼Œè®“ç›®å‰è™›æ“¬ä¸–ç•Œè£¡çš„ç”¨æˆ¶äº«å—æœ€ä½³çš„體驗。 + +å…è²»å¸³æˆ¶çš„ç”¨æˆ¶æ¤æ™‚æš«æ™‚ç„¡æ³•é€²å…¥ç¬¬äºŒäººç”Ÿï¼Œå› ç‚ºæˆ‘å€‘å¿…é ˆå„ªå…ˆå®¹ç´ä»˜è²»ç”¨æˆ¶ã€‚ + </string> + <string name="LoginFailedComputerProhibited"> + 無法從這部電腦進入第二人生。 +å¦‚ä½ èªç‚ºé€™æ˜¯æˆ‘們弄錯,請è¯çµ¡ support@secondlife.com。 + </string> + <string name="LoginFailedAcountSuspended"> + ä½ çš„å¸³è™Ÿè¦ç‰åˆ° [TIME] (太平洋時間)æ‰å¯ä½¿ç”¨ã€‚ + </string> + <string name="LoginFailedAccountDisabled"> + æ¤æ™‚無法完æˆä½ 的請求。 +請到 http://secondlife.com/support è¯çµ¡æ”¯æ´äººå“¡ç²å¾—幫助。 +å¦‚æžœä½ ç„¡æ³•è®Šæ›´å¯†ç¢¼ï¼Œè«‹è‡´é›» (866) 476-9763 (美國)。 + </string> + <string name="LoginFailedTransformError"> + 登入時的資料ä¸ä¸€è‡´ã€‚ +è«‹è¯çµ¡ support@secondlife.com。 + </string> + <string name="LoginFailedAccountMaintenance"> + ä½ çš„å¸³è™Ÿç›®å‰æ£åœ¨é€²è¡Œå°è¦æ¨¡çš„ç¶è·ã€‚ +ä½ çš„å¸³è™Ÿè¦ç‰åˆ° [TIME] (太平洋時間)æ‰å¯ä½¿ç”¨ã€‚ +å¦‚ä½ èªç‚ºé€™æ˜¯æˆ‘們弄錯,請è¯çµ¡ support@secondlife.com。 + </string> + <string name="LoginFailedPendingLogoutFault"> + 模擬器回應:登出請求出錯。 + </string> + <string name="LoginFailedPendingLogout"> + 系統æ£åœ¨è™•ç†ä½ 的登出。 +ä½ çš„å¸³è™Ÿè¦ç‰åˆ° [TIME] (太平洋時間)æ‰å¯ä½¿ç”¨ã€‚ + </string> + <string name="LoginFailedUnableToCreateSession"> + 無法建立有效的時域。 + </string> + <string name="LoginFailedUnableToConnectToSimulator"> + 無法連接到模擬器。 + </string> + <string name="LoginFailedRestrictedHours"> + ä½ çš„å¸³è™Ÿåƒ…èƒ½åœ¨ [START] 到 [END] (太平洋時間)時段進入第二人生。 +è«‹è€å¿ƒç‰åˆ°è©²æ™‚段å†å›žä¾†ã€‚ +å¦‚ä½ èªç‚ºé€™æ˜¯æˆ‘們弄錯,請è¯çµ¡ support@secondlife.com。 + </string> + <string name="LoginFailedIncorrectParameters"> + éŒ¯èª¤çš„åƒæ•¸ã€‚ +å¦‚ä½ èªç‚ºé€™æ˜¯æˆ‘們弄錯,請è¯çµ¡ support@secondlife.com。 + </string> + <string name="LoginFailedFirstNameNotAlphanumeric"> + å…¨å的第一個å—(first name)é ˆç‚ºè‹±æ–‡å—æ¯æˆ–數å—。 +å¦‚ä½ èªç‚ºé€™æ˜¯æˆ‘們弄錯,請è¯çµ¡ support@secondlife.com。 + </string> + <string name="LoginFailedLastNameNotAlphanumeric"> + å…¨å的第二個å—(last name)é ˆç‚ºè‹±æ–‡å—æ¯æˆ–數å—。 +å¦‚ä½ èªç‚ºé€™æ˜¯æˆ‘們弄錯,請è¯çµ¡ support@secondlife.com。 + </string> + <string name="LogoutFailedRegionGoingOffline"> + 地å€å³å°‡é›¢ç·šã€‚ +è«‹ç¨å¾…一分é˜å†è©¦ã€‚ + </string> + <string name="LogoutFailedAgentNotInRegion"> + 用戶ä¸åœ¨åœ°å€è£¡ã€‚ +è«‹ç¨å¾…一分é˜å†è©¦ã€‚ + </string> + <string name="LogoutFailedPendingLogin"> + åœ°å€æ£åœ¨ç™»å…¥å¦ä¸€å€‹æ™‚域。 +è«‹ç¨å¾…一分é˜å†è©¦ã€‚ + </string> + <string name="LogoutFailedLoggingOut"> + åœ°å€æ£åœ¨ç™»å…¥ä¸Šä¸€å€‹æ™‚域。 +è«‹ç¨å¾…一分é˜å†è©¦ã€‚ + </string> + <string name="LogoutFailedStillLoggingOut"> + åœ°å€æ£åœ¨ç™»å‡ºä¸Šä¸€å€‹æ™‚域。 +è«‹ç¨å¾…一分é˜å†è©¦ã€‚ + </string> + <string name="LogoutSucceeded"> + 地å€å‰›å‰›ç™»å‡ºä¸Šä¸€å€‹æ™‚域。 +è«‹ç¨å¾…一分é˜å†è©¦ã€‚ + </string> + <string name="LogoutFailedLogoutBegun"> + 地å€å·²ç¶“開始登出程åºã€‚ +è«‹ç¨å¾…一分é˜å†è©¦ã€‚ + </string> + <string name="LoginFailedLoggingOutSession"> + ç³»çµ±å·²ç¶“é–‹å§‹ç™»å‡ºä½ çš„ä¸Šä¸€å€‹æ™‚åŸŸã€‚ +è«‹ç¨å¾…一分é˜å†è©¦ã€‚ </string> <string name="AgentLostConnection"> - 這個地å€å¯èƒ½éé‡å•é¡Œï¼Œè«‹æª¢æŸ¥ä½ çš„ç¶²è·¯é€£ç·šã€‚ + 本å€åŸŸå¯èƒ½æ£ç™¼ç”Ÿå•題。 è«‹æª¢æŸ¥ä½ çš„ç¶²éš›ç¶²è·¯é€£ç·šæ˜¯å¦æ£å¸¸ã€‚ </string> <string name="SavingSettings"> ä½ çš„è¨å®šå„²å˜ä¸... @@ -158,7 +295,7 @@ (無å稱) </string> <string name="TooltipOwner"> - æ“æœ‰è€…: + 所有人: </string> <string name="TooltipPublic"> 公開 @@ -196,60 +333,90 @@ <string name="TooltipMustSingleDrop"> åªæœ‰ä¸€å€‹ç‰©å“å¯ä»¥è¢«æ‹–曳到æ¤è™• </string> - <string name="TooltipPrice" value="L$[AMOUNT]:"/> + <string name="TooltipPrice" value="L$[AMOUNT]:"/> + <string name="TooltipOutboxDragToWorld"> + å•†å®¶ç™¼ä»¶åŒ£å…§çš„ç‰©é …ç„¡æ³•ç”¢ç”Ÿåˆ°è™›æ“¬ä¸–ç•Œ + </string> + <string name="TooltipOutboxNoTransfer"> + 至少一個物件無法出售或轉移。 + </string> + <string name="TooltipOutboxNotInInventory"> + ä½ çš„å•†å®¶ç™¼ä»¶åŒ£åªèƒ½æŽ¥å—直接來自收ç´å€çš„ç‰©é …ã€‚ + </string> + <string name="TooltipOutboxWorn"> + ä½ ç©¿è‘—ä¸çš„ç‰©é …ç„¡æ³•æ”¾å…¥å•†å®¶ç™¼ä»¶åŒ£ã€‚ + </string> + <string name="TooltipOutboxCallingCard"> + å片ä¸å¾—放入商家發件匣 + </string> + <string name="TooltipOutboxFolderLevels"> + å·¢ç‹€è³‡æ–™å¤¾æ·±åº¦è¶…éŽ 3 + </string> + <string name="TooltipOutboxTooManyFolders"> + é ‚å±¤è³‡æ–™å¤¾çš„åè³‡æ–™å¤¾æ•¸ç›®è¶…éŽ 20 + </string> + <string name="TooltipOutboxTooManyObjects"> + é ‚å±¤è³‡æ–™å¤¾ç‰©é …æ•¸ç›®è¶…éŽ 200 + </string> + <string name="TooltipDragOntoOwnChild"> + 資料夾ä¸å¾—移到其å資料夾底下 + </string> + <string name="TooltipDragOntoSelf"> + 資料夾移動的目標ä¸å¾—為它本身 + </string> <string name="TooltipHttpUrl"> - 點擊以察看這個網é + 點按以察看這個網é </string> <string name="TooltipSLURL"> - 點擊以察看這個ä½ç½®è³‡è¨Š + 點按以察看這個ä½ç½®è³‡è¨Š </string> <string name="TooltipAgentUrl"> - 點擊以察看這個居民檔案 + 點按以察看這個居民檔案 </string> <string name="TooltipAgentInspect"> çžè§£æ›´å¤šæœ‰é—œé€™å€‹å±…æ°‘ </string> <string name="TooltipAgentMute"> - 點擊以å°éޖ這ä½å±…æ°‘ + 點按以å°éޖ這ä½å±…æ°‘ </string> <string name="TooltipAgentUnmute"> - 點擊以解除å°éޖ這ä½å±…æ°‘ + 點按以解除å°éޖ這ä½å±…æ°‘ </string> <string name="TooltipAgentIM"> - 點擊開始 IM 這ä½å±…æ°‘ + 點按開始 IM 這ä½å±…æ°‘ </string> <string name="TooltipAgentPay"> - 點擊以支付這ä½å±…æ°‘ + 點按以支付這ä½å±…æ°‘ </string> <string name="TooltipAgentOfferTeleport"> - 點擊以é€å‡ºçž¬é–“傳é€é‚€è«‹çµ¦é€™ä½å±…æ°‘ + 點按以é€å‡ºçž¬é–“傳é€é‚€è«‹çµ¦é€™ä½å±…æ°‘ </string> <string name="TooltipAgentRequestFriend"> - 點擊以é€å‡ºäº¤å‹é‚€è«‹çµ¦é€™ä½å±…æ°‘ + 點按以é€å‡ºäº¤å‹é‚€è«‹çµ¦é€™ä½å±…æ°‘ </string> <string name="TooltipGroupUrl"> - 點擊以察看這個群組的æè¿° + 點按以察看這個群組的æè¿° </string> <string name="TooltipEventUrl"> - 點擊以察看這個活動的æè¿° + 點按以察看這個活動的æè¿° </string> <string name="TooltipClassifiedUrl"> - Click to view this classified + 點按察看這個個人廣告 </string> <string name="TooltipParcelUrl"> - 點擊以察看這個地段的æè¿° + 點按以察看這個地段的æè¿° </string> <string name="TooltipTeleportUrl"> - 點擊以傳é€åˆ°é€™å€‹ä½ç½® + 點按以傳é€åˆ°é€™å€‹ä½ç½® </string> <string name="TooltipObjectIMUrl"> - 點擊以察看這個物件的æè¿° + 點按以察看這個物件的æè¿° </string> <string name="TooltipMapUrl"> - 點擊以察看æ¤è™•在地圖上的ä½ç½® + 點按以察看æ¤è™•在地圖上的ä½ç½® </string> <string name="TooltipSLAPP"> - 點擊以執行 secondlife:// 指令 + 點按以執行 secondlife:// 指令 </string> <string name="CurrentURL" value="ç›®å‰ç¶²å€ï¼š[CurrentURL]"/> <string name="SLurlLabelTeleport"> @@ -304,7 +471,7 @@ æœå°‹ä¸... </string> <string name="NoneFound"> - 未發ç¾ã€‚ + æŸ¥ç„¡çµæžœã€‚ </string> <string name="RetrievingData"> 檢索... @@ -328,7 +495,7 @@ (無) </string> <string name="AvalineCaller"> - Avaline Caller [ORDER] + Avaline 通話者 [ORDER] </string> <string name="AssetErrorNone"> 無錯誤 @@ -355,10 +522,10 @@ 檔案傳輸逾時 </string> <string name="AssetErrorCircuitGone"> - Circuit gone + 失去線路 </string> <string name="AssetErrorPriceMismatch"> - Viewer and server do not agree on price + Viewer 和伺æœå™¨ç„¡æ³•åŒæ„åƒ¹æ ¼ </string> <string name="AssetErrorUnknownStatus"> 未知狀態 @@ -391,13 +558,13 @@ 資料夾 </string> <string name="root"> - root + æ ¹ç›®éŒ„ </string> <string name="lsl2 script"> - LSL2 script + LSL2 腳本 </string> <string name="lsl bytecode"> - LSL bytecode + LSL ä½å…ƒçµ„碼 </string> <string name="tga texture"> tga æè³ª @@ -409,7 +576,7 @@ å¿«ç…§ </string> <string name="lost and found"> - Lost and Found + å¤±ç‰©æ‹›é ˜ </string> <string name="targa image"> targa åœ–åƒ @@ -438,6 +605,9 @@ <string name="symbolic folder link"> 資料夾è¯çµ </string> + <string name="mesh"> + ç¶²é¢ + </string> <string name="AvatarEditingAppearance"> (外觀編輯ä¸ï¼‰ </string> @@ -457,88 +627,88 @@ 生氣 </string> <string name="anim_away"> - Away + 離開 </string> <string name="anim_backflip"> - Backflip + 後空翻 </string> <string name="anim_express_laugh"> - Belly Laugh + æ§è…¹å¤§ç¬‘ </string> <string name="anim_express_toothsmile"> - BigSmile + 大微笑 </string> <string name="anim_blowkiss"> - Blow Kiss + é£›å» </string> <string name="anim_express_bored"> ç„¡èŠ </string> <string name="anim_bow"> - Bow + 彎腰點é </string> <string name="anim_clap"> æ‹æ‰‹ </string> <string name="anim_courtbow"> - Court Bow + å®®å»·éž èº¬ </string> <string name="anim_express_cry"> 哿³£ </string> <string name="anim_dance1"> - Dance 1 + 跳舞1 </string> <string name="anim_dance2"> - Dance 2 + 跳舞2 </string> <string name="anim_dance3"> - Dance 3 + 跳舞3 </string> <string name="anim_dance4"> - Dance 4 + 跳舞4 </string> <string name="anim_dance5"> - Dance 5 + 跳舞5 </string> <string name="anim_dance6"> - Dance 6 + 跳舞6 </string> <string name="anim_dance7"> - Dance 7 + 跳舞7 </string> <string name="anim_dance8"> - Dance 8 + 跳舞8 </string> <string name="anim_express_disdain"> - Disdain + 鄙視 </string> <string name="anim_drink"> - Drink + å–ä¸€å£ </string> <string name="anim_express_embarrased"> - Embarrassed + å°·å°¬ </string> <string name="anim_angry_fingerwag"> - Finger Wag + æ®å‹•食指 </string> <string name="anim_fist_pump"> - Fist Pump + é«˜èˆ‰å³æ‹³ </string> <string name="anim_yoga_float"> - Floating Yoga + 漂浮瑜伽 </string> <string name="anim_express_frown"> - Frown + 皺眉 </string> <string name="anim_impatient"> - Impatient + ä¸è€ç…© </string> <string name="anim_jumpforjoy"> - Jump For Joy + é›€èº </string> <string name="anim_kissmybutt"> - Kiss My Butt + 親我å±è‚¡ï¼ </string> <string name="anim_express_kiss"> è¦ªå» @@ -547,55 +717,55 @@ 笑 </string> <string name="anim_musclebeach"> - Muscle Beach + ç§€å¥ç¾Žè‚Œè‚‰ </string> <string name="anim_no_unhappy"> ä¸ï¼ˆä¸å¿«æ¨‚) </string> <string name="anim_no_head"> - ä¸ + å¦ </string> <string name="anim_nyanya"> Nya-nya-nya </string> <string name="anim_punch_onetwo"> - One-Two Punch + 連續左å³å‡ºæ‹³ </string> <string name="anim_express_open_mouth"> - Open Mouth + å¼µå£ </string> <string name="anim_peace"> - Peace + 和平手勢 </string> <string name="anim_point_you"> - Point at Other + 指著別人 </string> <string name="anim_point_me"> - Point at Self + 指著自己 </string> <string name="anim_punch_l"> - Punch Left + 左出拳 </string> <string name="anim_punch_r"> - Punch Right + å³å‡ºæ‹³ </string> <string name="anim_rps_countdown"> - RPS count + 剪刀石é 布é 備動作 </string> <string name="anim_rps_paper"> - RPS paper + 剪刀石é 布:布 </string> <string name="anim_rps_rock"> - RPS rock + 剪刀石é 布:石é </string> <string name="anim_rps_scissors"> - RPS scissors + 剪刀石é 布:剪刀 </string> <string name="anim_express_repulsed"> - Repulsed + ä½œå™ </string> <string name="anim_kick_roundhouse_r"> - Roundhouse Kick + 旋踢 </string> <string name="anim_express_sad"> 傷心 @@ -604,37 +774,37 @@ 敬禮 </string> <string name="anim_shout"> - Shout + å¶å–Š </string> <string name="anim_express_shrug"> - Shrug + è³è³è‚© </string> <string name="anim_express_smile"> 微笑 </string> <string name="anim_smoke_idle"> - Smoke Idle + æ‚ é–’æŠ½è¸ </string> <string name="anim_smoke_inhale"> - Smoke Inhale + å¸ä¸€å£è¸ </string> <string name="anim_smoke_throw_down"> - Smoke Throw Down + 甩è¸è’‚ </string> <string name="anim_express_surprise"> 驚喜 </string> <string name="anim_sword_strike_r"> - Sword Strike + åŠæ“Š </string> <string name="anim_angry_tantrum"> - Tantrum + 鬧脾氣 </string> <string name="anim_express_tongue_out"> - TongueOut + å舌é </string> <string name="anim_hello"> - Wave + æ®æ‰‹ </string> <string name="anim_whisper"> 耳語 @@ -657,6 +827,9 @@ <string name="anim_yes_head"> 是 </string> + <string name="multiple_textures"> + 多個 + </string> <string name="texture_loading"> 載入ä¸... </string> @@ -664,19 +837,19 @@ 離線 </string> <string name="worldmap_item_tooltip_format"> - [AREA] m² L$[PRICE] + [AREA] 平方公尺 L$[PRICE] </string> <string name="worldmap_results_none_found"> - 沒有發ç¾ã€‚ + æŸ¥ç„¡çµæžœã€‚ </string> <string name="Ok"> 確定 </string> <string name="Premature end of file"> - Premature end of file + æª”æ¡ˆç•°å¸¸ä¸æ¢ </string> <string name="ST_NO_JOINT"> - Can't find ROOT or JOINT. + 找ä¸åˆ° ROOT 或旋軸。 </string> <string name="whisper"> 低語: @@ -700,34 +873,37 @@ ç¾åœ¨ä½ 將釿–°è¯æŽ¥åˆ°é™„近的語音èŠå¤© </string> <string name="ScriptQuestionCautionChatGranted"> - '[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been granted permission to: [PERMISSIONS]. + 物件「[OBJECTNAME]'ã€ï¼ˆæ‰€æœ‰äººã€Œ[OWNERNAME]ã€ï¼Œä½æ–¼ã€Œ[REGIONNAME]ã€ï¼Œæ–¹ä½ã€Œ[REGIONPOS]ã€ï¼‰å·²ç²å¾—下列權é™ï¼š[PERMISSIONS]。 </string> <string name="ScriptQuestionCautionChatDenied"> - '[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been denied permission to: [PERMISSIONS]. + 物件「[OBJECTNAME]'ã€ï¼ˆæ‰€æœ‰äººã€Œ[OWNERNAME]ã€ï¼Œä½æ–¼ã€Œ[REGIONNAME]ã€ï¼Œæ–¹ä½ã€Œ[REGIONPOS]ã€ï¼‰å·²è¢«æ’¤é™¤ä¸‹åˆ—權é™ï¼š[PERMISSIONS]。 + </string> + <string name="AdditionalPermissionsRequestHeader"> + ä½ å¦‚æžœæ‰“é–‹å¸³æˆ¶æ¬Šé™ï¼Œä¹Ÿå°‡ä¸€ä½µå…許該物件: </string> <string name="ScriptTakeMoney"> ç”±ä½ èº«ä¸Šæ‹¿èµ°æž—ç™»å¹£ï¼ˆL$) </string> <string name="ActOnControlInputs"> - Act on your control inputs + æŒ‰ä½ çš„æŽ§åˆ¶è¼¸å…¥è¡Œå‹• </string> <string name="RemapControlInputs"> - Remap your control inputs + 釿–°è¦åŠƒä½ çš„æŽ§åˆ¶è¼¸å…¥ </string> <string name="AnimateYourAvatar"> - Animate your avatar + 使化身動起來 </string> <string name="AttachToYourAvatar"> - Attach to your avatar + é™„åŠ åˆ°åŒ–èº« </string> <string name="ReleaseOwnership"> - Release ownership and become public + 釋出所有權,開放給所有人 </string> <string name="LinkAndDelink"> - Link and delink from other objects + 連çµå…¶ä»–ç‰©ä»¶æˆ–åŽ»é™¤é€£çµ </string> <string name="AddAndRemoveJoints"> - Add and remove joints with other objects + 和其他物件建立或移除旋軸 </string> <string name="ChangePermissions"> è®Šæ›´å®ƒçš„æ¬Šé™ @@ -738,6 +914,9 @@ <string name="ControlYourCamera"> æŽ§åˆ¶ä½ çš„æ”影機 </string> + <string name="TeleportYourAgent"> + 瞬間傳é€ä½ 本人 + </string> <string name="NotConnected"> æœªè¯æŽ¥ </string> @@ -799,7 +978,7 @@ AVI è¦–é »æª”æ¡ˆ </string> <string name="xaf_animation_file"> - XAF Anim File + XAF 動畫檔案 </string> <string name="xml_file"> XML 檔案 @@ -816,6 +995,12 @@ <string name="choose_the_directory"> 鏿“‡ç›®éŒ„ </string> + <string name="script_files"> + 腳本 + </string> + <string name="dictionary_files"> + å—å…¸ + </string> <string name="AvatarSetNotAway"> éžé›¢é–‹ </string> @@ -991,19 +1176,19 @@ é€å‡ºç”± </string> <string name="GroupNotifyAttached"> - Attached: + 附件: </string> <string name="GroupNotifyViewPastNotices"> - View past notices or opt-out of receiving these messages here. + åœ¨é€™è£¡å¯Ÿçœ‹èˆŠé€šçŸ¥æˆ–é¸æ“‡ä¸æŽ¥æ”¶è¨Šæ¯ã€‚ </string> <string name="GroupNotifyOpenAttachment"> - Open Attachment + 開啟附件 </string> <string name="GroupNotifySaveAttachment"> - Save Attachment + 儲å˜é™„ä»¶ </string> <string name="TeleportOffer"> - Teleport offering + 發出「瞬間傳é€ã€é‚€è«‹ </string> <string name="StartUpNotifications"> ç•¶ä½ é›¢é–‹æ™‚æœ‰æ–°çš„é€šçŸ¥é€é”。 @@ -1042,16 +1227,75 @@ 按下 ESC éµå›žå¾©åˆ°ä¸–界的視角 </string> <string name="InventoryNoMatchingItems"> - 沒有發ç¾ä½ æƒ³è¦æ‰¾çš„嗎?試試 [secondlife:///app/search/all/[SEARCH_TERM] æœå°‹]。 + 找ä¸åˆ°ä½ è¦æ‰¾çš„嗎? 請試試 [secondlife:///app/search/places/ æœå°‹]。 </string> <string name="PlacesNoMatchingItems"> - 沒有發ç¾ä½ æƒ³è¦æ‰¾çš„嗎?試試 [secondlife:///app/search/places/[SEARCH_TERM] æœå°‹]。 + 找ä¸åˆ°ä½ è¦æ‰¾çš„嗎? 請試試 [secondlife:///app/search/places/[SEARCH_TERM] æœå°‹]。 </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> + <string name="InventoryInboxNoItems"> + ä½ å¾žç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚é›†è³¼è²·çš„ç‰©å“將出ç¾åœ¨é€™è£¡ã€‚ ä½ å¯ä»¥æŠŠå®ƒå€‘æ‹–æ›³åˆ°ä½ çš„æ”¶ç´å€ï¼Œé–‹å§‹ä½¿ç”¨ã€‚ + </string> + <string name="MarketplaceURL"> + https://marketplace.[MARKETPLACE_DOMAIN_NAME]/ + </string> + <string name="MarketplaceURL_CreateStore"> + http://community.secondlife.com/t5/English-Knowledge-Base/Selling-in-the-Marketplace/ta-p/700193#Section_.4 + </string> + <string name="MarketplaceURL_Dashboard"> + https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/store/dashboard + </string> + <string name="MarketplaceURL_Imports"> + https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/store/imports + </string> + <string name="MarketplaceURL_LearnMore"> + https://marketplace.[MARKETPLACE_DOMAIN_NAME]/learn_more + </string> + <string name="InventoryOutboxNotMerchantTitle"> + 任何人都å¯åœ¨ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚集出售物å“。 + </string> + <string name="InventoryOutboxNotMerchantTooltip"/> + <string name="InventoryOutboxNotMerchant"> + å¦‚æžœä½ æƒ³æˆç‚ºå•†å®¶ï¼Œä½ 需è¦åœ¨ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚集[[MARKETPLACE_CREATE_STORE_URL]é–‹è¨ä¸€é–“商店]。 + </string> + <string name="InventoryOutboxNoItemsTitle"> + ä½ çš„ç™¼ä»¶åŒ£ç›®å‰æ˜¯ç©ºçš„。 + </string> + <string name="InventoryOutboxNoItemsTooltip"/> + <string name="InventoryOutboxNoItems"> + 將資料夾拖曳到這個å€åŸŸï¼Œå†é»žæŒ‰ã€Œé€å¾€ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚集ã€ï¼Œå³å¯åœ¨[[MARKETPLACE_DASHBOARD_URL]第二人生購物市集]登列出售。 + </string> + <string name="Marketplace Error None"> + 零錯誤 + </string> + <string name="Marketplace Error Not Merchant"> + ç™¼ç”ŸéŒ¯èª¤ï¼šå°‡ç‰©é …é€å¾€ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚集之å‰ï¼Œä½ å¿…é ˆå–得商家的身份(å…費)。 + </string> + <string name="Marketplace Error Empty Folder"> + 錯誤:æ¤è³‡æ–™å¤¾æ²’有內容。 + </string> + <string name="Marketplace Error Unassociated Products"> + 錯誤:æ¤ç‰©é …ä¸Šå‚³å¤±æ•—ï¼Œå› ç‚ºä½ çš„å•†å®¶å¸³æˆ¶æœ‰å¤ªå¤šå’Œç”¢å“ç„¡é—œè¯çš„ç‰©é …ã€‚ è¦è§£æ±ºé€™å€‹å•é¡Œï¼Œè«‹ç™»å…¥ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚é›†ç¶²ç«™ï¼Œæ¸›ä½Žä½ çš„ç„¡é—œè¯ç‰©é …數目。 + </string> + <string name="Marketplace Error Object Limit"> + 錯誤:æ¤ç‰©é …包å«å¤ªå¤šç‰©ä»¶ã€‚ è¦è§£æ±ºé€™éŒ¯èª¤ï¼Œè«‹å°‡ç‰©ä»¶è£ç®±ï¼Œä½¿ç¸½ç‰©ä»¶æ•¸ç›®ä¸è¶…éŽ 200。 + </string> + <string name="Marketplace Error Folder Depth"> + 錯誤:æ¤ç‰©é …嫿œ‰å¤ªå¤šå±¤çš„巢狀資料夾。 è«‹åŠ ä»¥é‡æ–°æ•´ç†ï¼Œè‡³å¤šå…許 3 層的巢狀資料夾。 + </string> + <string name="Marketplace Error Unsellable Item"> + 錯誤:æ¤ç‰©é …無法在第二人生購物市集出售。 + </string> + <string name="Marketplace Error Internal Import"> + éŒ¯èª¤ï¼šé€™å€‹ç‰©é …æœ‰å•題。 è«‹ç¨å€™å†è©¦ä¸€æ¬¡ã€‚ + </string> + <string name="Open landmarks"> + 開啟地標 </string> <string name="no_transfer" value="ï¼ˆç¦æ¢è½‰è®“)"/> <string name="no_modify" value="ï¼ˆç¦æ¢ä¿®æ”¹ï¼‰"/> @@ -1066,7 +1310,7 @@ 無內容 </string> <string name="WornOnAttachmentPoint" value="(已穿 [ATTACHMENT_POINT])"/> - <string name="ActiveGesture" value="[GESLABEL] (active)"/> + <string name="ActiveGesture" value="[GESLABEL](使用ä¸ï¼‰"/> <string name="PermYes"> 是 </string> @@ -1078,30 +1322,27 @@ <string name="Wait" value="--- ç‰å¾…:"/> <string name="AnimFlagStop" value="åœæ¢å‹•作:"/> <string name="AnimFlagStart" value="開始動作:"/> - <string name="Wave" value="Wave"/> + <string name="Wave" value="æ®æ‰‹"/> <string name="GestureActionNone" value="ç„¡"/> - <string name="HelloAvatar" value="Hello, avatar!"/> + <string name="HelloAvatar" value="ä½ å¥½ï¼ŒåŒ–èº«ï¼"/> <string name="ViewAllGestures" value="察看全部 >>"/> <string name="GetMoreGestures" value="å–得更多 >>"/> - <string name="Animations" value="動作,"/> - <string name="Calling Cards" value="å片,"/> - <string name="Clothing" value="æœè£,"/> - <string name="Gestures" value="å§¿å‹¢,"/> - <string name="Landmarks" value="地標,"/> - <string name="Notecards" value="記事å¡,"/> - <string name="Objects" value="物件,"/> - <string name="Scripts" value="腳本,"/> - <string name="Sounds" value="è²éŸ³,"/> - <string name="Textures" value="æè³ª,"/> - <string name="Snapshots" value="å¿«ç…§,"/> - <string name="No Filters" value="No"/> + <string name="Animations" value="動作,"/> + <string name="Calling Cards" value="å片,"/> + <string name="Clothing" value="æœè£ï¼Œ"/> + <string name="Gestures" value="姿勢,"/> + <string name="Landmarks" value="地標,"/> + <string name="Notecards" value="記事å¡ï¼Œ"/> + <string name="Objects" value="物件,"/> + <string name="Scripts" value="腳本,"/> + <string name="Sounds" value="è²éŸ³ï¼Œ"/> + <string name="Textures" value="æè³ªï¼Œ"/> + <string name="Snapshots" value="快照,"/> + <string name="No Filters" value="å¦"/> <string name="Since Logoff" value="- 自上次登出"/> <string name="InvFolder My Inventory"> 我的收ç´å€ </string> - <string name="InvFolder My Favorites"> - 我的最愛 - </string> <string name="InvFolder Library"> 資æºåº« </string> @@ -1136,7 +1377,7 @@ æ”¶ç´å€ </string> <string name="InvFolder Uncompressed Images"> - Uncompressed Images + æœªå£“ç¸®åœ–åƒ </string> <string name="InvFolder Body Parts"> èº«é«”éƒ¨ä½ @@ -1148,10 +1389,10 @@ 相簿 </string> <string name="InvFolder Lost And Found"> - Lost And Found + å¤±ç‰©æ‹›é ˜ </string> <string name="InvFolder Uncompressed Sounds"> - 無壓縮è²éŸ³ + 未壓縮è²éŸ³ </string> <string name="InvFolder Animations"> 動作 @@ -1165,6 +1406,12 @@ <string name="InvFolder favorite"> 我的最愛 </string> + <string name="InvFolder Favorites"> + 我的最愛 + </string> + <string name="InvFolder favorites"> + 我的最愛 + </string> <string name="InvFolder Current Outfit"> ç›®å‰è£æ‰® </string> @@ -1177,17 +1424,32 @@ <string name="InvFolder Accessories"> é…ä»¶ </string> + <string name="InvFolder Meshes"> + ç¶²é¢ + </string> + <string name="InvFolder Received Items"> + æ”¶åˆ°çš„ç‰©é … + </string> + <string name="InvFolder Merchant Outbox"> + 商家發件匣 + </string> <string name="InvFolder Friends"> æœ‹å‹ </string> <string name="InvFolder All"> 全部 </string> + <string name="no_attachments"> + 未穿著任何附件 + </string> + <string name="Attachments remain"> + 附件(尚å¯å®¹ç´ [COUNT] 件) + </string> <string name="Buy"> 購買 </string> <string name="BuyforL$"> - Buy for L$ + 出價購買:L$ </string> <string name="Stone"> 石é @@ -1211,13 +1473,13 @@ æ©¡è† </string> <string name="Light"> - Light + å…‰æº </string> <string name="KBShift"> - Shift + Shift éµ </string> <string name="KBCtrl"> - Ctrl + Ctrl éµ </string> <string name="Chest"> 胸部 @@ -1250,7 +1512,7 @@ 骨盆 </string> <string name="Mouth"> - 嘴 + 嘴巴 </string> <string name="Chin"> 下巴 @@ -1309,23 +1571,29 @@ <string name="Right Pec"> å³èƒ¸è‚Œ </string> + <string name="Neck"> + é ¸éƒ¨ + </string> + <string name="Avatar Center"> + 化身ä¸å¿ƒ + </string> <string name="Invalid Attachment"> - ç„¡æ•ˆçš„é™„ä»¶è¯æŽ¥é»ž + 無效的附接點 </string> <string name="YearsMonthsOld"> - [AGEYEARS] [AGEMONTHS] old + 年齡:[AGEYEARS] å¹´ [AGEMONTHS] 月 </string> <string name="YearsOld"> - [AGEYEARS] old + 年齡:[AGEYEARS] å¹´ </string> <string name="MonthsOld"> - [AGEMONTHS] old + [AGEMONTHS] 月 </string> <string name="WeeksOld"> - [AGEWEEKS] old + [AGEWEEKS] 週 </string> <string name="DaysOld"> - [AGEDAYS] old + [AGEDAYS] 天 </string> <string name="TodayOld"> ä»Šæ—¥å‰›åŠ å…¥ @@ -1367,40 +1635,40 @@ [COUNT] 天 </string> <string name="GroupMembersA"> - [COUNT] æˆå“¡ + [COUNT] 使ˆå“¡ </string> <string name="GroupMembersB"> - [COUNT] æˆå“¡ + [COUNT] 使ˆå“¡ </string> <string name="GroupMembersC"> - [COUNT] æˆå“¡ + [COUNT] 使ˆå“¡ </string> <string name="AcctTypeResident"> å±…æ°‘ </string> <string name="AcctTypeTrial"> - Trial + 試用 </string> <string name="AcctTypeCharterMember"> - Charter Member + è€ç‰Œ Charter æˆå“¡ </string> <string name="AcctTypeEmployee"> 林登實驗室員工 </string> <string name="PaymentInfoUsed"> - Payment Info Used + 使用的付款資料 </string> <string name="PaymentInfoOnFile"> - Payment Info On File + é 留付款資料 </string> <string name="NoPaymentInfoOnFile"> - No Payment Info On File + 未é 留付款資料 </string> <string name="AgeVerified"> - å·²å¹´é½¡é©—è‰ + 通éŽå¹´é½¡é©—è‰ </string> <string name="NotAgeVerified"> - æœªå¹´é½¡é©—è‰ + 未通éŽå¹´é½¡é©—è‰ </string> <string name="Center 2"> ä¸å¤® 2 @@ -1427,22 +1695,22 @@ å³ä¸‹ </string> <string name="CompileQueueDownloadedCompiling"> - 已下載,ç¾åœ¨é€²è¡Œç·¨è¯ä¸ + 已下載,æ£åœ¨ç·¨è¯ä¸ </string> <string name="CompileQueueScriptNotFound"> 伺æœå™¨ä¸Šæœªç™¼ç¾è…³æœ¬ã€‚ </string> <string name="CompileQueueProblemDownloading"> - å•é¡Œä¸‹è¼‰ä¸ + 下載時出å•題 </string> <string name="CompileQueueInsufficientPermDownload"> - Insufficient permissions to download a script. + 下載腳本的權é™ä¸è¶³ã€‚ </string> <string name="CompileQueueInsufficientPermFor"> - Insufficient permissions for + 權é™ä¸è¶³ï¼š </string> <string name="CompileQueueUnknownFailure"> - Unknown failure to download + ä¸‹è¼‰å¤±æ•—ï¼ŒåŽŸå› ä¸æ˜Ž </string> <string name="CompileQueueTitle"> 釿–°ç·¨è¯é€²åº¦ @@ -1457,19 +1725,19 @@ é‡è¨ </string> <string name="RunQueueTitle"> - è¨å®šåŸ·è¡Œä¸ç¨‹åº + è¨å®šã€ŒåŸ·è¡Œä¸ã€é€²åº¦ </string> <string name="RunQueueStart"> - è¨ç‚ºåŸ·è¡Œä¸ + è¨ç‚ºã€ŒåŸ·è¡Œä¸ã€ </string> <string name="NotRunQueueTitle"> - è¨å®šéžåŸ·è¡Œä¸ç¨‹åº + è¨å®šã€ŒéžåŸ·è¡Œä¸ã€é€²åº¦ </string> <string name="NotRunQueueStart"> - è¨ç‚ºéžåŸ·è¡Œä¸ + è¨ç‚ºã€ŒéžåŸ·è¡Œä¸ã€ </string> <string name="CompileSuccessful"> - ç·¨è¯æˆåŠŸ!! + ç·¨è¯æˆåŠŸï¼ </string> <string name="CompileSuccessfulSaving"> ç·¨è¯æˆåŠŸï¼Œå„²å˜ä¸... @@ -1490,36 +1758,42 @@ <string name="Unknown"> (未知) </string> - <string name="SummaryForTheWeek" value="Summary for this week, beginning on"/> + <string name="SummaryForTheWeek" value="本週摘è¦ï¼Œèµ·å§‹æ—¥ï¼š"/> <string name="NextStipendDay" value="下一個發薪日為"/> - <string name="GroupIndividualShare" value="Group Individual Share"/> + <string name="GroupPlanningDate"> + [mthnum,datetime,utc]/[day,datetime,utc]/[year,datetime,utc] + </string> + <string name="GroupIndividualShare" value="群組 個人份é¡"/> <string name="GroupColumn" value="群組"/> <string name="Balance"> - Balance + é¤˜é¡ </string> <string name="Credits"> - Credits + 貸記 </string> <string name="Debits"> - Debits + 借記 </string> <string name="Total"> - Total + ç¸½é¡ </string> <string name="NoGroupDataFound"> - ç„¡ç¾¤çµ„è³‡æ–™ç™¼ç¾ + 查無群組資料 </string> <string name="IMParentEstate"> - parent estate + æ¯é ˜åœ° </string> <string name="IMMainland"> - mainland + 大陸 </string> <string name="IMTeen"> - teen + é’å°‘å¹´ + </string> + <string name="Anyone"> + 任何人 </string> <string name="RegionInfoError"> - error + 錯誤 </string> <string name="RegionInfoAllEstatesOwnedBy"> [OWNER] æ‰€æ“æœ‰çš„çš„å…¨éƒ¨é ˜åœ° @@ -1528,13 +1802,13 @@ ä½ æ‰€æ“æœ‰çš„å…¨éƒ¨é ˜åœ° </string> <string name="RegionInfoAllEstatesYouManage"> - all estates that you manage for [OWNER] + ä½ ç‚º [OWNER] 管ç†çš„å…¨éƒ¨é ˜åœ° </string> <string name="RegionInfoAllowedResidents"> - Allowed Residents: ([ALLOWEDAGENTS], max [MAXACCESS]) + å…許居民:([ALLOWEDAGENTS],最多 [MAXACCESS]) </string> <string name="RegionInfoAllowedGroups"> - å…許的群群組:([ALLOWEDGROUPS],最大 [MAXACCESS]) + å…許的群組:([ALLOWEDGROUPS],最多 [MAXACCESS]) </string> <string name="ScriptLimitsParcelScriptMemory"> 地段腳本記憶體 @@ -1549,28 +1823,28 @@ 記憶體用é‡ï¼š[COUNT] kb </string> <string name="ScriptLimitsParcelScriptURLs"> - 地段腳本 URLs + 地段腳本的 URL </string> <string name="ScriptLimitsURLsUsed"> - URLs used: [COUNT] out of [MAX]; [AVAILABLE] available + URL 使用狀æ³ï¼šæœ€å¤šå¯ç”¨ [MAX],已用 [COUNT],剩餘 [AVAILABLE] </string> <string name="ScriptLimitsURLsUsedSimple"> - URLs used: [COUNT] + 已用 URL:[COUNT] </string> <string name="ScriptLimitsRequestError"> - Error requesting information + 調資料時出錯 </string> <string name="ScriptLimitsRequestNoParcelSelected"> - ç„¡åœ°æ®µè¢«é¸æ“‡ + æœªé¸æ“‡åœ°æ®µ </string> <string name="ScriptLimitsRequestWrongRegion"> - Error: script information is only available in your current region + 錯誤:åªèƒ½åœ¨ä½ ç›®å‰æ‰€è™•å€åŸŸå–得腳本資訊 </string> <string name="ScriptLimitsRequestWaiting"> - Retrieving information... + æ£åœ¨èª¿é–±è³‡æ–™... </string> <string name="ScriptLimitsRequestDontOwnParcel"> - You do not have permission to examine this parcel + ä½ ç„¡æ¬Šå¯©è¦–æ¤åœ°æ®µ </string> <string name="SITTING_ON"> å在 @@ -1666,34 +1940,34 @@ 左胸肌 </string> <string name="ATTACH_HUD_CENTER_2"> - HUD Center 2 + æ“¡é 顯示ä¸å¤® 2 </string> <string name="ATTACH_HUD_TOP_RIGHT"> - HUD Top Right + æ“¡é 顯示å³ä¸Š </string> <string name="ATTACH_HUD_TOP_CENTER"> - HUD Top Center + æ“¡é 顯示ä¸å¤®ä¸Šæ–¹ </string> <string name="ATTACH_HUD_TOP_LEFT"> - HUD Top Left + æ“¡é 顯示左上 </string> <string name="ATTACH_HUD_CENTER_1"> - HUD Center 1 + æ“¡é 顯示ä¸å¤® 1 </string> <string name="ATTACH_HUD_BOTTOM_LEFT"> - HUD Bottom Left + æ“¡é 顯示左下 </string> <string name="ATTACH_HUD_BOTTOM"> - HUD Bottom + æ“¡é 顯示下方 </string> <string name="ATTACH_HUD_BOTTOM_RIGHT"> - HUD Bottom Right + æ“¡é 顯示å³ä¸‹ </string> <string name="CursorPos"> - Line [LINE], Column [COLUMN] + 橫行 [LINE],縱列 [COLUMN] </string> <string name="PanelDirCountFound"> - [COUNT] found + 找到 [COUNT] </string> <string name="PanelDirTimeStr"> [hour12,datetime,slt]:[min,datetime,slt] [ampm,datetime,slt] @@ -1702,16 +1976,16 @@ [mthnum,datetime,slt]/[day,datetime,slt] </string> <string name="PanelContentsTooltip"> - 物件的內容 + 物件內容 </string> <string name="PanelContentsNewScript"> 新腳本 </string> <string name="BusyModeResponseDefault"> - ä½ å‚³é€è¨Šæ¯çš„å±…æ°‘ç›®å‰è™•於忙碌模å¼ä¸ï¼Œé€™æ„å‘³è‘—ä»–è¦æ±‚ä¸è¢«æ‰“æ“¾ã€‚ä½ æ‰€å‚³çš„è¨Šæ¯ä»å°‡æœƒç•™å˜ä¸¦é¡¯ç¤ºæ–¼ IM 颿¿ä¸Šä¾›ä»–ç¨å¾Œæ™‚查閱。 + ä½ å‚³è¨ŠéŽåŽ»çš„å±…æ°‘ç›®å‰è™•於忙碌狀態,這æ„å‘³è‘—ä»–è¦æ±‚ä¸è¢«æ‰“擾。 ä½ çš„è¨Šæ¯ä»å°‡ç•™å˜ä¸¦é¡¯ç¤ºæ–¼å°æ–¹çš„ IM 颿¿ä¸Šä¾›ç¨å¾ŒæŸ¥é–±ã€‚ </string> <string name="MuteByName"> - (由å稱) + (按å稱) </string> <string name="MuteAgent"> (居民) @@ -1726,12 +2000,12 @@ (外部) </string> <string name="RegionNoCovenant"> - æ¤é ˜åœ°æœªæä¾›ä»»ä½•å¥‘ç´„è¦æ±‚。 + æ¤é ˜åœ°æ²’æœ‰ä»»ä½•å¥‘ç´„è¦æ±‚。 </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" value="最後修改於:"/> + <string name="covenant_last_modified" value="最後修改時間:"/> <string name="none_text" value="(無)"/> <string name="never_text" value="(絕ä¸ï¼‰"/> <string name="GroupOwned"> @@ -1740,14 +2014,20 @@ <string name="Public"> 公開 </string> + <string name="LocalSettings"> + 本地è¨å®š + </string> + <string name="RegionSettings"> + 地å€è¨å®š + </string> <string name="ClassifiedClicksTxt"> - Clicks: [TELEPORT] teleport, [MAP] map, [PROFILE] profile + 點按:[TELEPORT] 瞬間傳é€ï¼Œ[MAP] 地圖,[PROFILE] 檔案 </string> <string name="ClassifiedUpdateAfterPublish"> - (將於發布後自動更新) + (將於發布後更新) </string> <string name="NoPicksClassifiedsText"> - You haven't created any Picks or Classifieds. Click the Plus button below to create a Pick or Classified. + ä½ å°šæœªå»ºç«‹ä»»ä½•ç²¾é¸åœ°é»žæˆ–個人廣告。 點按下é¢çš„ + 按鈕建立精é¸åœ°é»žæˆ–個人廣告。 </string> <string name="NoAvatarPicksClassifiedsText"> 使用者無精é¸åœ°é»žæˆ–個人廣告 @@ -1762,86 +2042,89 @@ 屬性 </string> <string name="InvOfferAnObjectNamed"> - An object named + 一個物件,å為 </string> <string name="InvOfferOwnedByGroup"> - ç¾¤çµ„æ‰€æ“æœ‰ + 屬於群組 </string> <string name="InvOfferOwnedByUnknownGroup"> - ç”±ä¸€å€‹æœªçŸ¥çš„ç¾¤çµ„æ‰€æ“æœ‰ + 屬於一個未知群組 </string> <string name="InvOfferOwnedBy"> - owned by + 所有人: </string> <string name="InvOfferOwnedByUnknownUser"> - owned by an unknown user + å±¬æ–¼æŸæœªçŸ¥ä½¿ç”¨è€… </string> <string name="InvOfferGaveYou"> - gave you + çµ¦äºˆä½ </string> <string name="InvOfferDecline"> - You decline [DESC] from <nolink>[NAME]</nolink>. + ä½ æ‹’çµ•äº†ä¾†è‡ª <nolink>[NAME]</nolink> çš„ [DESC]。 </string> <string name="GroupMoneyTotal"> - Total + ç¸½é¡ </string> <string name="GroupMoneyBought"> - bought + 買了 </string> <string name="GroupMoneyPaidYou"> - paid you + æ”¯ä»˜çµ¦ä½ </string> <string name="GroupMoneyPaidInto"> - paid into + 支付給 </string> <string name="GroupMoneyBoughtPassTo"> - bought pass to + 買了通行權: </string> <string name="GroupMoneyPaidFeeForEvent"> - paid fee for event + 付了費用åƒåŠ æ´»å‹• </string> <string name="GroupMoneyPaidPrizeForEvent"> - paid prize for event + 付了賞金åƒåŠ æ´»å‹• </string> <string name="GroupMoneyBalance"> - Balance + é¤˜é¡ </string> <string name="GroupMoneyCredits"> - Credits + 貸記 </string> <string name="GroupMoneyDebits"> - Debits + 借記 + </string> + <string name="GroupMoneyDate"> + [weekday,datetime,utc] [mth,datetime,utc] [day,datetime,utc], [year,datetime,utc] </string> <string name="ViewerObjectContents"> - Contents + 內容 </string> <string name="AcquiredItems"> - Acquired Items + å–å¾—ç‰©å“ </string> <string name="Cancel"> å–æ¶ˆ </string> <string name="UploadingCosts"> - 花費 L$ [AMOUNT] 上傳 [NAME] + 上傳 [NAME] 費用 L$ [AMOUNT] </string> <string name="BuyingCosts"> - 花費 L$ [AMOUNT] 購買這個 + è³¼è²·é€™å€‹éœ€è¦ L$ [AMOUNT] </string> <string name="UnknownFileExtension"> 未知的副檔å .%s -é æœŸç‚º .wav, .tga, .bmp, .jpg, .jpeg, or .bvh 類型 +應該是 .wavã€.tgaã€.bmpã€.jpgã€.jpeg 或 .bvh </string> <string name="MuteObject2"> - Block + å°éŽ– </string> <string name="MuteAvatar"> - Block + å°éŽ– </string> <string name="UnmuteObject"> - Unblock + 解除å°éŽ– </string> <string name="UnmuteAvatar"> - Unblock + 解除å°éŽ– </string> <string name="AddLandmarkNavBarMenu"> æ·»åŠ åˆ°æˆ‘çš„åœ°æ¨™... @@ -1877,25 +2160,25 @@ æŽ¥æ”¶ä¸ </string> <string name="AM"> - AM + ä¸Šåˆ </string> <string name="PM"> - PM + ä¸‹åˆ </string> <string name="PST"> - PST + 太平洋時間 </string> <string name="PDT"> - PDT + 太平洋日光節約時間 </string> <string name="Direction_Forward"> å‘å‰ </string> <string name="Direction_Left"> - å‘å·¦ + å·¦ç§»éµ </string> <string name="Direction_Right"> - å‘å³ + å³ç§»éµ </string> <string name="Direction_Back"> å‘後 @@ -1913,46 +2196,46 @@ æ± </string> <string name="Direction_Up"> - å‘上 + ä¸Šç§»éµ </string> <string name="Direction_Down"> - å‘下 + ä¸‹ç§»éµ </string> <string name="Any Category"> 任何類別 </string> <string name="Shopping"> - 採購 + 購物 </string> <string name="Land Rental"> - Land Rental + 土地租賃 </string> <string name="Property Rental"> - Property Rental + 房產租賃 </string> <string name="Special Attraction"> - Special Attraction + 熱門地點 </string> <string name="New Products"> - New Products + æ–°ç”¢å“ </string> <string name="Employment"> - Employment + 徵人 </string> <string name="Wanted"> - Wanted + 徵求 </string> <string name="Service"> - Service + æœå‹™ </string> <string name="Personal"> - Personal + äº¤å‹ </string> <string name="None"> ç„¡ </string> <string name="Linden Location"> - Linden Location + æž—ç™»ä½ç½® </string> <string name="Adult"> 完全æˆäºº @@ -1973,25 +2256,25 @@ èšæœƒæ‰€ </string> <string name="Newcomer Friendly"> - 新手å‹å–„ + æ¡è¿Žæ–°æ‰‹å…‰è‡¨ </string> <string name="Parks&Nature"> - 公園與自然 + 公園與自然景觀 </string> <string name="Residential"> ä½å®… </string> <string name="Stage"> - Stage + 舞臺 </string> <string name="Other"> - Other + å…¶ä»– </string> <string name="Rental"> - Rental + 出租 </string> <string name="Any"> - Any + 任何 </string> <string name="You"> ä½ @@ -2027,7 +2310,7 @@ 多媒體 </string> <string name="Play Media"> - æ’æ”¾ï¼æš«åœ 媒體 + æ’æ”¾/æš«åœåª’é«” </string> <string name="MBCmdLineError"> è§£æžå‘½ä»¤åˆ—時發ç¾éŒ¯èª¤ã€‚ @@ -2038,1510 +2321,1510 @@ [APP_NAME] 命令列用法: </string> <string name="MBUnableToAccessFile"> - [APP_NAME] 無法å˜å–它所需è¦çš„æª”案。 + [APP_NAME] 無法å˜å–它所需的檔案。 -This can be because you somehow have multiple copies running, or your system incorrectly thinks a file is open. -If this message persists, restart your computer and try again. -If it continues to persist, you may need to completely uninstall [APP_NAME] and reinstall it. +ä½ å¯èƒ½æœ‰å¤šé‡å¯¦ä¾‹åŸ·è¡Œä¸ï¼Œæˆ–ä½ çš„ç³»çµ±èª¤ä»¥ç‚ºæŸæª”案已經開啟。 +å¦‚æžœé€™å€‹è¨Šæ¯æŒçºŒå‡ºç¾ï¼Œè«‹é‡æ–°å•Ÿå‹•ä½ çš„é›»è…¦ã€‚ +如果å•題ä»ç„¶å˜åœ¨ï¼Œä½ å¯èƒ½éœ€è¦å¾¹åº•å¸é™¤ [APP_NAME] å†é‡æ–°å®‰è£ã€‚ </string> <string name="MBFatalError"> 致命錯誤 </string> <string name="MBRequiresAltiVec"> - [APP_NAME] requires a processor with AltiVec (G4 or later). + [APP_NAME] éœ€è¦æœ‰ AltiVec(G4 或更新版)的處ç†å™¨ã€‚ </string> <string name="MBAlreadyRunning"> [APP_NAME] 已經在執行ä¸ã€‚ -è«‹æª¢æŸ¥ä½ çš„å·¥ä½œåˆ—è£¡æ˜¯å¦æœ‰å…¶ä»–最å°åŒ–的相åŒç¨‹å¼ã€‚ +è«‹æª¢æŸ¥ä½ çš„å·¥ä½œåˆ—è£¡æ˜¯å¦å·²æœ‰æœ€å°åŒ–的相åŒç¨‹å¼ã€‚ å¦‚æžœé€™å€‹è¨Šæ¯æŒçºŒå‡ºç¾ï¼Œè«‹é‡æ–°å•Ÿå‹•ä½ çš„é›»è…¦ã€‚ </string> <string name="MBFrozenCrashed"> - [APP_NAME] appears to have frozen or crashed on the previous run. -Would you like to send a crash report? + [APP_NAME] 上次執行時好åƒå‡ºç¾å‡çµæˆ–當掉。 +ä½ æ˜¯å¦æƒ³è¦å ±å‘Šç•¶æ©Ÿäº‹ä¾‹ï¼Ÿ </string> <string name="MBAlert"> 通知 </string> <string name="MBNoDirectX"> - [APP_NAME] is unable to detect DirectX 9.0b or greater. -[APP_NAME] uses DirectX to detect hardware and/or outdated drivers that can cause stability problems, poor performance and crashes. While you can run [APP_NAME] without it, we highly recommend running with DirectX 9.0b. + [APP_NAME] 嵿¸¬ä¸åˆ° DirectX 9.0b 或更新版。 +[APP_NAME] 使用 DirectX 來嵿¸¬å¯èƒ½å°Žè‡´ä¸ç©©å®šã€åŸ·è¡Œæ•ˆèƒ½ä¸ä½³æˆ–當機發生的硬體或è€èˆŠé©…動器。 ä½ å¯ä»¥é¸æ“‡ä¸ç”¨ DirectX 9.0b 來執行 [APP_NAME]ï¼Œä½†æˆ‘å€‘å¤§åŠ›æŽ¨è–¦ä½ ä½¿ç”¨ã€‚ -Do you wish to continue? +ä½ ç¢ºå®šè¦ç¹¼çºŒå—Žï¼Ÿ </string> <string name="MBWarning"> è¦å‘Š </string> <string name="MBNoAutoUpdate"> - Automatic updating is not yet implemented for Linux. -Please download the latest version from www.secondlife.com. + 尚無試用於 Linux 的自動更新功能。 +請到 www.secondlife.com 下載最新版本。 </string> <string name="MBRegClassFailed"> - RegisterClass failed + RegisterClass 失敗 </string> <string name="MBError"> 錯誤 </string> <string name="MBFullScreenErr"> - 無法執行全螢幕於 [WIDTH] x [HEIGHT]. -執行於視窗ä¸ã€‚ + [WIDTH] x [HEIGHT] è§£æžåº¦ä¸‹ç„¡æ³•執行全螢幕。 +在視窗ä¸åŸ·è¡Œã€‚ </string> <string name="MBDestroyWinFailed"> - Shutdown Error while destroying window (DestroyWindow() failed) + 消滅視窗時發生強行關閉錯誤(DestroyWindow()失敗) </string> <string name="MBShutdownErr"> - Shutdown Error + 強行關閉出錯 </string> <string name="MBDevContextErr"> - Can't make GL device context + 無法建立 GL è£ç½®ç’°å¢ƒ </string> <string name="MBPixelFmtErr"> - Can't find suitable pixel format + 找ä¸åˆ°é©åˆçš„åƒç´ æ ¼å¼ </string> <string name="MBPixelFmtDescErr"> - Can't get pixel format description + 無法å–å¾—åƒç´ æ ¼å¼æè¿° </string> <string name="MBTrueColorWindow"> - [APP_NAME] requires True Color (32-bit) to run. -Please go to your computer's display settings and set the color mode to 32-bit. + [APP_NAME] 需è¦å…¨å½©ï¼ˆ32ä½å…ƒï¼‰æ‰èƒ½åŸ·è¡Œã€‚ +請到電腦的顯示è¨å®šï¼Œå°‡è‰²å½©æ¨¡å¼è¨ç‚º 32 ä½å…ƒã€‚ </string> <string name="MBAlpha"> - [APP_NAME] is unable to run because it can't get an 8 bit alpha channel. Usually this is due to video card driver issues. -Please make sure you have the latest video card drivers installed. -Also be sure your monitor is set to True Color (32-bit) in Control Panels > Display > Settings. -If you continue to receive this message, contact the [SUPPORT_SITE]. + [APP_NAME] 無法執行,無法å–å¾— 8 ä½å…ƒ alpha é »é“。 é€™é€šå¸¸æ˜¯å› ç‚ºé¡¯ç¤ºå¡é©…動程å¼å‡ºå•題。 +è«‹ç¢ºå®šä½ å®‰è£äº†æœ€æ–°çš„顯示å¡é©…動程å¼ã€‚ +è«‹åˆ°æŽ§åˆ¶å° > 顯示 > è¨å®šè™•將螢幕è¨ç‚ºå…¨å½©ï¼ˆ32 ä½å…ƒï¼‰ã€‚ +å¦‚æžœä½ ç¹¼çºŒçœ‹åˆ°æ¤è¨Šæ¯ï¼Œè«‹è¯çµ¡ [SUPPORT_SITE]。 </string> <string name="MBPixelFmtSetErr"> 無法è¨å®šåƒç´ æ ¼å¼ </string> <string name="MBGLContextErr"> - Can't create GL rendering context + 無法建立 GL 呈åƒç’°å¢ƒ </string> <string name="MBGLContextActErr"> - Can't activate GL rendering context + 無法啟動 GL 呈åƒç’°å¢ƒ </string> <string name="MBVideoDrvErr"> - [APP_NAME] is unable to run because your video card drivers did not install properly, are out of date, or are for unsupported hardware. Please make sure you have the latest video card drivers and even if you do have the latest, try reinstalling them. + [APP_NAME] 無法執行,這å¯èƒ½å› ç‚ºä½ çš„é¡¯ç¤ºå¡é©…動程å¼å®‰è£ä¸ç•¶ã€ç‰ˆæœ¬éŽèˆŠï¼Œæˆ–è€…ä½ çš„ç¡¬é«”ä¸å—支æ´ã€‚ è«‹ç¢ºå®šä½ å®‰è£äº†æœ€æ–°çš„顯示å¡é©…動程å¼ã€‚如果已è£äº†æœ€æ–°é©…動程å¼ï¼Œè«‹å†é‡æ–°å®‰è£ã€‚ -If you continue to receive this message, contact the [SUPPORT_SITE]. +å¦‚æžœä½ ç¹¼çºŒçœ‹åˆ°æ¤è¨Šæ¯ï¼Œè«‹è¯çµ¡ [SUPPORT_SITE]。 </string> <string name="5 O'Clock Shadow"> - 5 O'Clock Shadow + 下åˆäº”é»žçš„æ–°é¬æ¸£ </string> <string name="All White"> 全白 </string> <string name="Anime Eyes"> - Anime Eyes + æ—¥å¼å‹•漫眼 </string> <string name="Arced"> - Arced + 彎拱的 </string> <string name="Arm Length"> - Arm Length + 臂長 </string> <string name="Attached"> - Attached + 貼附的 </string> <string name="Attached Earlobes"> - Attached Earlobes + 附著耳垂 </string> <string name="Back Fringe"> - Back Fringe + å¾Œç€æµ· </string> <string name="Baggy"> - Baggy + 袋型的 </string> <string name="Bangs"> - Bangs + ç€æµ· </string> <string name="Beady Eyes"> - Beady Eyes + ç 圓銳光眼 </string> <string name="Belly Size"> - Belly Size + è…¹éƒ¨å¤§å° </string> <string name="Big"> - Big + 大 </string> <string name="Big Butt"> - Big Butt + 大臀部 </string> <string name="Big Hair Back"> - Big Hair: Back + 大型é é«®ï¼šå¾Œé¢ </string> <string name="Big Hair Front"> - Big Hair: Front + 大型é 髮:å‰é¢ </string> <string name="Big Hair Top"> - Big Hair: Top + 大型é é«®ï¼šé ‚éƒ¨ </string> <string name="Big Head"> - Big Head + 大é </string> <string name="Big Pectorals"> - Big Pectorals + 大胸肌 </string> <string name="Big Spikes"> - Big Spikes + 大尖直髮 </string> <string name="Black"> - Black + 黑色 </string> <string name="Blonde"> - Blonde + 金色 </string> <string name="Blonde Hair"> - Blonde Hair + 金髮 </string> <string name="Blush"> - Blush + 腮紅 </string> <string name="Blush Color"> - Blush Color + 淺粉色 </string> <string name="Blush Opacity"> - Blush Opacity + 腮紅ä¸é€æ˜Žåº¦ï¼š </string> <string name="Body Definition"> - Body Definition + 身體çµå¯¦åº¦ </string> <string name="Body Fat"> - Body Fat + 體脂肪 </string> <string name="Body Freckles"> - Body Freckles + 身體雀斑 </string> <string name="Body Thick"> - Body Thick + 寬厚體型 </string> <string name="Body Thickness"> - Body Thickness + 體型厚度 </string> <string name="Body Thin"> - Body Thin + 窄瘦體型 </string> <string name="Bow Legged"> - Bow Legged + 弓形腿 </string> <string name="Breast Buoyancy"> - Breast Buoyancy + 乳房彈性 </string> <string name="Breast Cleavage"> - Breast Cleavage + ä¹³æºæ·±æ·º </string> <string name="Breast Size"> - Breast Size + 乳房尺寸 </string> <string name="Bridge Width"> - Bridge Width + å…©çœ¼é–“è· </string> <string name="Broad"> - Broad + 寬 </string> <string name="Brow Size"> - Brow Size + çœ‰æ¯›å¤§å° </string> <string name="Bug Eyes"> - Bug Eyes + çªçœ¼ </string> <string name="Bugged Eyes"> - Bugged Eyes + çªçœ¼ </string> <string name="Bulbous"> - Bulbous + çƒç‹€ </string> <string name="Bulbous Nose"> - Bulbous Nose + çƒç‹€é¼» </string> <string name="Breast Physics Mass"> - Breast Mass + ä¹³æˆ¿è³ªé‡ </string> <string name="Breast Physics Smoothing"> - Breast Smoothing + 乳房增圓滑 </string> <string name="Breast Physics Gravity"> - Breast Gravity + 乳房é‡åŠ›ç‰¹æ€§ </string> <string name="Breast Physics Drag"> - Breast Drag + 乳房阻力 </string> <string name="Breast Physics InOut Max Effect"> - Max Effect + 最大效果 </string> <string name="Breast Physics InOut Spring"> - Spring + 彈跳 </string> <string name="Breast Physics InOut Gain"> - Gain + 增益 </string> <string name="Breast Physics InOut Damping"> - Damping + 阻尼 </string> <string name="Breast Physics UpDown Max Effect"> - Max Effect + 最大效果 </string> <string name="Breast Physics UpDown Spring"> - Spring + 彈跳 </string> <string name="Breast Physics UpDown Gain"> - Gain + 增益 </string> <string name="Breast Physics UpDown Damping"> - Damping + 阻尼 </string> <string name="Breast Physics LeftRight Max Effect"> - Max Effect + 最大效果 </string> <string name="Breast Physics LeftRight Spring"> - Spring + 彈跳 </string> <string name="Breast Physics LeftRight Gain"> - Gain + 增益 </string> <string name="Breast Physics LeftRight Damping"> - Damping + 阻尼 </string> <string name="Belly Physics Mass"> - Belly Mass + è…¹éƒ¨è³ªé‡ </string> <string name="Belly Physics Smoothing"> - Belly Smoothing + 腹部增圓滑 </string> <string name="Belly Physics Gravity"> - Belly Gravity + 腹部é‡åŠ›ç‰¹æ€§ </string> <string name="Belly Physics Drag"> - Belly Drag + 腹部阻力 </string> <string name="Belly Physics UpDown Max Effect"> - Max Effect + 最大效果 </string> <string name="Belly Physics UpDown Spring"> - Spring + 彈跳 </string> <string name="Belly Physics UpDown Gain"> - Gain + 增益 </string> <string name="Belly Physics UpDown Damping"> - Damping + 阻尼 </string> <string name="Butt Physics Mass"> - Butt Mass + è‡€éƒ¨è³ªé‡ </string> <string name="Butt Physics Smoothing"> - Butt Smoothing + 臀部增圓滑 </string> <string name="Butt Physics Gravity"> - Butt Gravity + 臀部é‡åŠ›ç‰¹æ€§ </string> <string name="Butt Physics Drag"> - Butt Drag + 臀部阻力 </string> <string name="Butt Physics UpDown Max Effect"> - Max Effect + 最大效果 </string> <string name="Butt Physics UpDown Spring"> - Spring + 彈跳 </string> <string name="Butt Physics UpDown Gain"> - Gain + 增益 </string> <string name="Butt Physics UpDown Damping"> - Damping + 阻尼 </string> <string name="Butt Physics LeftRight Max Effect"> - Max Effect + 最大效果 </string> <string name="Butt Physics LeftRight Spring"> - Spring + 彈跳 </string> <string name="Butt Physics LeftRight Gain"> - Gain + 增益 </string> <string name="Butt Physics LeftRight Damping"> - Damping + 阻尼 </string> <string name="Bushy Eyebrows"> - Bushy Eyebrows + 濃眉 </string> <string name="Bushy Hair"> - Bushy Hair + 濃密é é«® </string> <string name="Butt Size"> - Butt Size + è‡€éƒ¨å¤§å° </string> <string name="Butt Gravity"> - Butt Gravity + 臀部é‡åŠ›ç‰¹æ€§ </string> <string name="bustle skirt"> - Bustle Skirt + å´çšºéŽè†é•·è£™ </string> <string name="no bustle"> - No Bustle + ç„¡å´çšº </string> <string name="more bustle"> - More Bustle + å¢žåŠ å´çšº </string> <string name="Chaplin"> Chaplin </string> <string name="Cheek Bones"> - Cheek Bones + 顴骨 </string> <string name="Chest Size"> - Chest Size + èƒ¸éƒ¨å¤§å° </string> <string name="Chin Angle"> 下巴角度 </string> <string name="Chin Cleft"> - Chin Cleft + 下巴裂度 </string> <string name="Chin Curtains"> - Chin Curtains + çµ¡è…®é¬ </string> <string name="Chin Depth"> - Chin Depth + 下巴深度 </string> <string name="Chin Heavy"> - Chin Heavy + ä¸‹å·´åŽšé‡ </string> <string name="Chin In"> - Chin In + 下巴後縮 </string> <string name="Chin Out"> - Chin Out + 下巴çªå‡º </string> <string name="Chin-Neck"> - Chin-Neck + 下巴-é ¸éƒ¨ </string> <string name="Clear"> 清除 </string> <string name="Cleft"> - Cleft + 分裂 </string> <string name="Close Set Eyes"> - Close Set Eyes + 雙眼é è¿‘ </string> <string name="Closed"> - Closed + é–‰åˆ </string> <string name="Closed Back"> - Closed Back + å¾Œé–‰åˆ </string> <string name="Closed Front"> - Closed Front + å‰é–‰åˆ </string> <string name="Closed Left"> - Closed Left + å·¦é–‰åˆ </string> <string name="Closed Right"> - Closed Right + å³é–‰åˆ </string> <string name="Coin Purse"> - Coin Purse + å°éŒ¢åŒ… </string> <string name="Collar Back"> - Collar Back + 後 Collar </string> <string name="Collar Front"> - Collar Front + å‰ Collar </string> <string name="Corner Down"> - Corner Down + è§’è½æœä¸‹ </string> <string name="Corner Up"> - Corner Up + è§’è½æœä¸Š </string> <string name="Creased"> - Creased + 皺褶 </string> <string name="Crooked Nose"> - Crooked Nose + 彎曲鼻 </string> <string name="Cuff Flare"> - Cuff Flare + 袖å£è£é£¾ </string> <string name="Dark"> - Dark + 深暗 </string> <string name="Dark Green"> - Dark Green + æ·±ç¶ </string> <string name="Darker"> - Darker + 更深暗 </string> <string name="Deep"> - Deep + æ·± </string> <string name="Default Heels"> - Default Heels + é è¨é«˜è·Ÿéž‹ </string> <string name="Dense"> - Dense + ç¨ å¯† </string> <string name="Double Chin"> - Double Chin + 雙下巴 </string> <string name="Downturned"> - Downturned + 嘴角下垂 </string> <string name="Duffle Bag"> - Duffle Bag + 旅行袋 </string> <string name="Ear Angle"> - Ear Angle + 耳朵角度 </string> <string name="Ear Size"> - Ear Size + è€³æœµå¤§å° </string> <string name="Ear Tips"> - Ear Tips + 耳端 </string> <string name="Egg Head"> - Egg Head + 蛋形é </string> <string name="Eye Bags"> - Eye Bags + 眼袋 </string> <string name="Eye Color"> - Eye Color + 眼ç›é¡è‰² </string> <string name="Eye Depth"> - Eye Depth + çœ¼ç›æ·±åº¦ </string> <string name="Eye Lightness"> - Eye Lightness + 眼ç›äº®åº¦ </string> <string name="Eye Opening"> - Eye Opening + 眼ç›åž‚ç›´å¤§å° </string> <string name="Eye Pop"> - Eye Pop + çœ¼ç› Pop </string> <string name="Eye Size"> - Eye Size + 眼ç›å¤§å° </string> <string name="Eye Spacing"> - Eye Spacing + é›™çœ¼é–“è· </string> <string name="Eyebrow Arc"> - Eyebrow Arc + 眉毛弧度 </string> <string name="Eyebrow Density"> - Eyebrow Density + 眉毛密度 </string> <string name="Eyebrow Height"> - Eyebrow Height + 眉毛高度 </string> <string name="Eyebrow Points"> - Eyebrow Points + 眉毛點 </string> <string name="Eyebrow Size"> - Eyebrow Size + 眉毛尺寸 </string> <string name="Eyelash Length"> - Eyelash Length + ç«æ¯›é•·åº¦ </string> <string name="Eyeliner"> - Eyeliner + çœ¼ç·šç† </string> <string name="Eyeliner Color"> - Eyeliner Color + 眼影ç†é¡è‰² </string> <string name="Eyes Bugged"> - Eyes Bugged + çªçœ¼ </string> <string name="Face Shear"> - Face Shear + 臉部åç§» </string> <string name="Facial Definition"> - Facial Definition + 臉部çµå¯¦åº¦ </string> <string name="Far Set Eyes"> - Far Set Eyes + 雙眼è·é›¢é </string> <string name="Fat Lips"> - Fat Lips + 厚脣 </string> <string name="Female"> - Female + 女性 </string> <string name="Fingerless"> - Fingerless + 無手指 </string> <string name="Fingers"> - Fingers + 手指 </string> <string name="Flared Cuffs"> - Flared Cuffs + 帶è£é£¾è¢–å£ </string> <string name="Flat"> - Flat + å¹³ </string> <string name="Flat Butt"> - Flat Butt + 臀部æ‰å¹³ </string> <string name="Flat Head"> - Flat Head + é 部æ‰å¹³ </string> <string name="Flat Toe"> - Flat Toe + 腳趾æ‰å¹³ </string> <string name="Foot Size"> - Foot Size + è…³éƒ¨å¤§å° </string> <string name="Forehead Angle"> - Forehead Angle + å‰é¡è§’度 </string> <string name="Forehead Heavy"> - Forehead Heavy + å‰é¡å¯¬åŽš </string> <string name="Freckles"> - Freckles + 雀斑 </string> <string name="Front Fringe"> - Front Fringe + å‰ç€æµ· </string> <string name="Full Back"> - Full Back + 後部飽滿 </string> <string name="Full Eyeliner"> - Full Eyeliner + 厚é‡çœ¼ç·š </string> <string name="Full Front"> - Full Front + å‰é¢é£½æ»¿ </string> <string name="Full Hair Sides"> - Full Hair Sides + å´é«®é£½æ»¿ </string> <string name="Full Sides"> - Full Sides + å…©å´é£½æ»¿ </string> <string name="Glossy"> - Glossy + 光亮 </string> <string name="Glove Fingers"> - Glove Fingers + 手套手指 </string> <string name="Glove Length"> - Glove Length + 手套長度 </string> <string name="Hair"> é é«® </string> <string name="Hair Back"> - Hair: Back + é é«®ï¼šå¾Œé¢ </string> <string name="Hair Front"> - Hair: Front + é 髮:å‰é¢ </string> <string name="Hair Sides"> - Hair: Sides + é 髮:å´é¢ </string> <string name="Hair Sweep"> - Hair Sweep + é 髮垂擺 </string> <string name="Hair Thickess"> - Hair Thickness + é 髮厚度 </string> <string name="Hair Thickness"> - Hair Thickness + é 髮厚度 </string> <string name="Hair Tilt"> - Hair Tilt + é 髮傾度 </string> <string name="Hair Tilted Left"> - Hair Tilted Left + é 髮傾左 </string> <string name="Hair Tilted Right"> - Hair Tilted Right + é é«®å‚¾å³ </string> <string name="Hair Volume"> - Hair: Volume + é é«®ï¼šé«®é‡ </string> <string name="Hand Size"> - Hand Size + æ‰‹éƒ¨å¤§å° </string> <string name="Handlebars"> - Handlebars + 把手 </string> <string name="Head Length"> - Head Length + é 部長度 </string> <string name="Head Shape"> - Head Shape + é åž‹ </string> <string name="Head Size"> - Head Size + é éƒ¨å¤§å° </string> <string name="Head Stretch"> - Head Stretch + é 部延展度 </string> <string name="Heel Height"> - Heel Height + 腳踵高度 </string> <string name="Heel Shape"> - Heel Shape + 腳踵形狀 </string> <string name="Height"> - Height + 高度 </string> <string name="High"> - High + 高 </string> <string name="High Heels"> - High Heels + 高跟鞋 </string> <string name="High Jaw"> - High Jaw + 高顎 </string> <string name="High Platforms"> - High Platforms + 高平臺 </string> <string name="High and Tight"> - High and Tight + 高而緊緻 </string> <string name="Higher"> - Higher + 更高 </string> <string name="Hip Length"> - Hip Length + è…°é•· </string> <string name="Hip Width"> - Hip Width + 腰寬 </string> <string name="In"> - In + å‘å…§ </string> <string name="In Shdw Color"> - Inner Shadow Color + å…§é™°å½±é¡è‰² </string> <string name="In Shdw Opacity"> - Inner Shadow Opacity + å…§é™°å½±ä¸é€æ˜Žåº¦ </string> <string name="Inner Eye Corner"> - Inner Eye Corner + 眼內角 </string> <string name="Inner Eye Shadow"> - Inner Eye Shadow + 內眼陰影 </string> <string name="Inner Shadow"> - Inner Shadow + å…§é™°å½± </string> <string name="Jacket Length"> - Jacket Length + 外套長度 </string> <string name="Jacket Wrinkles"> - Jacket Wrinkles + 外套皺褶 </string> <string name="Jaw Angle"> - Jaw Angle + 顎角度 </string> <string name="Jaw Jut"> - Jaw Jut + 顎çªå‡º </string> <string name="Jaw Shape"> - Jaw Shape + 顎形 </string> <string name="Join"> - Join + åŠ å…¥ </string> <string name="Jowls"> - Jowls + ä¸‹é œ </string> <string name="Knee Angle"> - Knee Angle + è†éƒ¨è§’度 </string> <string name="Knock Kneed"> - Knock Kneed + å…«å—è…¿ </string> <string name="Large"> - Large + 大 </string> <string name="Large Hands"> - Large Hands + 大手掌 </string> <string name="Left Part"> - Left Part + 左邊分 </string> <string name="Leg Length"> - Leg Length + è…¿é•· </string> <string name="Leg Muscles"> - Leg Muscles + 腿肌肉 </string> <string name="Less"> - Less + æ›´å°‘ </string> <string name="Less Body Fat"> - Less Body Fat + 體脂肪較少 </string> <string name="Less Curtains"> - Less Curtains + 絡腮é¬è¼ƒçŸ </string> <string name="Less Freckles"> - Less Freckles + 雀斑較少 </string> <string name="Less Full"> - Less Full + 較ä¸é£½æ»¿ </string> <string name="Less Gravity"> - Less Gravity + 較少é‡åŠ› </string> <string name="Less Love"> - Less Love + 少一點愛 </string> <string name="Less Muscles"> - Less Muscles + 少一點肌肉 </string> <string name="Less Muscular"> - Less Muscular + 少一點肌壯感 </string> <string name="Less Rosy"> - Less Rosy + 少一點紅潤 </string> <string name="Less Round"> - Less Round + 少一點圓度 </string> <string name="Less Saddle"> - Less Saddle + è…¿é æ”一點 </string> <string name="Less Square"> - Less Square + 少一點方形 </string> <string name="Less Volume"> - Less Volume + å°‘ä¸€é»žé‡ </string> <string name="Less soul"> - Less soul + 少一點éˆé‚ </string> <string name="Lighter"> - Lighter + 亮一點 </string> <string name="Lip Cleft"> - Lip Cleft + 脣裂度 </string> <string name="Lip Cleft Depth"> - Lip Cleft Depth + 脣裂深度 </string> <string name="Lip Fullness"> - Lip Fullness + è„£è±åº¦ </string> <string name="Lip Pinkness"> - Lip Pinkness + 脣色粉紅度 </string> <string name="Lip Ratio"> - Lip Ratio + 脣比率 </string> <string name="Lip Thickness"> - Lip Thickness + 脣厚度 </string> <string name="Lip Width"> - Lip Width + 脣寬度 </string> <string name="Lipgloss"> - Lipgloss + 脣蜜 </string> <string name="Lipstick"> - Lipstick + è„£è† </string> <string name="Lipstick Color"> - Lipstick Color + è„£è†é¡è‰² </string> <string name="Long"> - Long + é•· </string> <string name="Long Head"> - Long Head + 長臉 </string> <string name="Long Hips"> - Long Hips + 高腰 </string> <string name="Long Legs"> - Long Legs + é•·è…¿ </string> <string name="Long Neck"> - Long Neck + é•·é ¸ </string> <string name="Long Pigtails"> - Long Pigtails + é•·è¾®å </string> <string name="Long Ponytail"> - Long Ponytail + 長馬尾辮 </string> <string name="Long Torso"> - Long Torso + 長軀幹 </string> <string name="Long arms"> - Long arms + 長臂 </string> <string name="Loose Pants"> - Loose Pants + 寬鬆褲å </string> <string name="Loose Shirt"> - Loose Shirt + 寬鬆襯衫 </string> <string name="Loose Sleeves"> - Loose Sleeves + 寬鬆袖å </string> <string name="Love Handles"> - Love Handles + 腰間贅肉 </string> <string name="Low"> - Low + 低 </string> <string name="Low Heels"> - Low Heels + 低跟鞋 </string> <string name="Low Jaw"> - Low Jaw + 低顎 </string> <string name="Low Platforms"> - Low Platforms + 低平臺 </string> <string name="Low and Loose"> - Low and Loose + 低而寬鬆 </string> <string name="Lower"> - Lower + é™ä½Ž </string> <string name="Lower Bridge"> - Lower Bridge + 鼻樑低一點 </string> <string name="Lower Cheeks"> - Lower Cheeks + é›™é °ä½Žä¸€é»ž </string> <string name="Male"> 男性 </string> <string name="Middle Part"> - Middle Part + ä¸é–“邊分 </string> <string name="More"> 更多 </string> <string name="More Blush"> - More Blush + å¢žåŠ è…®ç´… </string> <string name="More Body Fat"> - More Body Fat + å¢žåŠ é«”è„‚è‚ª </string> <string name="More Curtains"> - More Curtains + å¢žåŠ çµ¡è…®é¬ </string> <string name="More Eyeshadow"> - More Eyeshadow + å¢žåŠ çœ¼å½± </string> <string name="More Freckles"> - More Freckles + å¢žåŠ é›€æ–‘ </string> <string name="More Full"> - More Full + 更飽滿 </string> <string name="More Gravity"> - More Gravity + å¢žåŠ é‡åŠ› </string> <string name="More Lipstick"> - More Lipstick + å¤šä¸€é»žè„£è† </string> <string name="More Love"> - More Love + 多一點愛 </string> <string name="More Lower Lip"> - More Lower Lip + ä¸‹è„£æ›´è±æ»¿ </string> <string name="More Muscles"> - More Muscles + 多一點肌肉 </string> <string name="More Muscular"> - More Muscular + å¢žåŠ è‚Œå£¯æ„Ÿ </string> <string name="More Rosy"> - More Rosy + æ›´åŠ ç´…æ½¤ </string> <string name="More Round"> - More Round + å¢žåŠ åœ“åº¦ </string> <string name="More Saddle"> - More Saddle + è…¿æ›´åŠ å¼µé–‹ </string> <string name="More Sloped"> - More Sloped + æ›´åŠ å‚¾æ–œ </string> <string name="More Square"> - More Square + å¢žåŠ æ–¹å½¢ </string> <string name="More Upper Lip"> - More Upper Lip + ä¸Šè„£æ›´è±æ»¿ </string> <string name="More Vertical"> - More Vertical + æ›´åŠ åž‚ç›´ </string> <string name="More Volume"> - More Volume + å¤šä¸€é»žé‡ </string> <string name="More soul"> - More soul + 多一點éˆé‚ </string> <string name="Moustache"> - Moustache + é«é¬ </string> <string name="Mouth Corner"> - Mouth Corner + 嘴角 </string> <string name="Mouth Position"> - Mouth Position + 嘴巴ä½ç½® </string> <string name="Mowhawk"> - Mowhawk + 莫éœå…‹é«®åž‹ </string> <string name="Muscular"> - Muscular + è‚Œè‚‰ç™¼é” </string> <string name="Mutton Chops"> - Mutton Chops + 羊排å¼çµ¡è…®é¬ </string> <string name="Nail Polish"> - Nail Polish + 指甲油 </string> <string name="Nail Polish Color"> - Nail Polish Color + 指甲油é¡è‰² </string> <string name="Narrow"> - Narrow + 窄 </string> <string name="Narrow Back"> - Narrow Back + 後窄 </string> <string name="Narrow Front"> - Narrow Front + å‰çª„ </string> <string name="Narrow Lips"> - Narrow Lips + 窄脣 </string> <string name="Natural"> - Natural + 自然 </string> <string name="Neck Length"> - Neck Length + é ¸é•· </string> <string name="Neck Thickness"> - Neck Thickness + é ¸éƒ¨åŽšåº¦ </string> <string name="No Blush"> - No Blush + 無腮紅 </string> <string name="No Eyeliner"> - No Eyeliner + 無眼線 </string> <string name="No Eyeshadow"> - No Eyeshadow + 無眼影 </string> <string name="No Lipgloss"> - No Lipgloss + 無脣蜜 </string> <string name="No Lipstick"> - No Lipstick + ç„¡è„£è† </string> <string name="No Part"> - No Part + 無邊分 </string> <string name="No Polish"> - No Polish + 無指甲油 </string> <string name="No Red"> - No Red + 去紅色 </string> <string name="No Spikes"> - No Spikes + ç„¡å°–ç›´å½¢ </string> <string name="No White"> - No White + 去白色 </string> <string name="No Wrinkles"> - No Wrinkles + 無皺紋 </string> <string name="Normal Lower"> - Normal Lower + æ£å¸¸ä¸‹åŠ </string> <string name="Normal Upper"> - Normal Upper + æ£å¸¸ä¸ŠåŠ </string> <string name="Nose Left"> - Nose Left + 左鼻 </string> <string name="Nose Right"> - Nose Right + å³é¼» </string> <string name="Nose Size"> - Nose Size + é¼»éƒ¨å¤§å° </string> <string name="Nose Thickness"> - Nose Thickness + é¼»å厚度 </string> <string name="Nose Tip Angle"> - Nose Tip Angle + 鼻尖角度 </string> <string name="Nose Tip Shape"> - Nose Tip Shape + 鼻尖形狀 </string> <string name="Nose Width"> - Nose Width + 鼻寬 </string> <string name="Nostril Division"> - Nostril Division + é¼»å”分開度 </string> <string name="Nostril Width"> - Nostril Width + é¼»å”寬 </string> <string name="Opaque"> - Opaque + ä¸é€æ˜Ž </string> <string name="Open"> - Open + 打開 </string> <string name="Open Back"> - Open Back + 後開 </string> <string name="Open Front"> - Open Front + å‰é–‹ </string> <string name="Open Left"> - Open Left + 左開 </string> <string name="Open Right"> - Open Right + å³é–‹ </string> <string name="Orange"> - Orange + 橘色 </string> <string name="Out"> - Out + 外 </string> <string name="Out Shdw Color"> - Outer Shadow Color + 外陰影é¡è‰² </string> <string name="Out Shdw Opacity"> - Outer Shadow Opacity + 外陰影ä¸é€æ˜Žåº¦ </string> <string name="Outer Eye Corner"> - Outer Eye Corner + 眼外角 </string> <string name="Outer Eye Shadow"> - Outer Eye Shadow + 外眼陰影 </string> <string name="Outer Shadow"> - Outer Shadow + 外陰影 </string> <string name="Overbite"> - Overbite + 齙牙 </string> <string name="Package"> - Package + é…套 </string> <string name="Painted Nails"> - Painted Nails + 美甲 </string> <string name="Pale"> - Pale + 蒼白 </string> <string name="Pants Crotch"> - Pants Crotch + è¤²è¥ </string> <string name="Pants Fit"> - Pants Fit + 褲ååˆèº«åº¦ </string> <string name="Pants Length"> - Pants Length + 褲長 </string> <string name="Pants Waist"> - Pants Waist + 褲腰 </string> <string name="Pants Wrinkles"> - Pants Wrinkles + 褲å皺褶 </string> <string name="Part"> - Part + 邊分 </string> <string name="Part Bangs"> - Part Bangs + é‚Šåˆ†ç€æµ· </string> <string name="Pectorals"> - Pectorals + 胸肌 </string> <string name="Pigment"> - Pigment + è‰²ç´ </string> <string name="Pigtails"> - Pigtails + è¾®å </string> <string name="Pink"> - Pink + 粉紅 </string> <string name="Pinker"> - Pinker + å¢žåŠ ç²‰ç´… </string> <string name="Platform Height"> - Platform Height + 平臺高度 </string> <string name="Platform Width"> - Platform Width + 平臺寬度 </string> <string name="Pointy"> - Pointy + å°–ç‹€ </string> <string name="Pointy Heels"> - Pointy Heels + 尖狀高跟鞋 </string> <string name="Ponytail"> - Ponytail + 馬尾辮 </string> <string name="Poofy Skirt"> - Poofy Skirt + 蓬蓬裙 </string> <string name="Pop Left Eye"> - Pop Left Eye + 左眼 Pop </string> <string name="Pop Right Eye"> - Pop Right Eye + å³çœ¼ Pop </string> <string name="Puffy"> - Puffy + 眼腫 </string> <string name="Puffy Eyelids"> - Puffy Eyelids + 眼瞼腫 </string> <string name="Rainbow Color"> - Rainbow Color + 虹彩 </string> <string name="Red Hair"> - Red Hair + ç´…é«® </string> <string name="Regular"> - Regular + 一般 </string> <string name="Right Part"> - Right Part + å³é‚Šåˆ† </string> <string name="Rosy Complexion"> - Rosy Complexion + 臉色紅潤 </string> <string name="Round"> - Round + 圓 </string> <string name="Ruddiness"> - Ruddiness + 紅潤度 </string> <string name="Ruddy"> - Ruddy + 紅潤 </string> <string name="Rumpled Hair"> - Rumpled Hair + 亂髮 </string> <string name="Saddle Bags"> - Saddle Bags + 馬éžåž‹å·¥å…·è¢‹ </string> <string name="Scrawny Leg"> - Scrawny Leg + 削瘦的腿 </string> <string name="Separate"> - Separate + 分開 </string> <string name="Shallow"> - Shallow + æ·º </string> <string name="Shear Back"> - Shear Back + 後åç§» </string> <string name="Shear Face"> - Shear Face + 臉部åç§» </string> <string name="Shear Front"> - Shear Front + å‰åç§» </string> <string name="Shear Left Up"> - Shear Left Up + 左上åç§» </string> <string name="Shear Right Up"> - Shear Right Up + å³ä¸Šåç§» </string> <string name="Sheared Back"> - Sheared Back + 後åç§» </string> <string name="Sheared Front"> - Sheared Front + å‰åç§» </string> <string name="Shift Left"> - Shift Left + 左移 </string> <string name="Shift Mouth"> - Shift Mouth + 嘴部åç§» </string> <string name="Shift Right"> - Shift Right + å³ç§» </string> <string name="Shirt Bottom"> - Shirt Bottom + 襯衫底 </string> <string name="Shirt Fit"> - Shirt Fit + 襯衫åˆèº«åº¦ </string> <string name="Shirt Wrinkles"> - Shirt Wrinkles + 襯衫皺褶 </string> <string name="Shoe Height"> - Shoe Height + 鞋高 </string> <string name="Short"> - Short + çŸ </string> <string name="Short Arms"> - Short Arms + çŸè‡‚ </string> <string name="Short Legs"> - Short Legs + çŸè…¿ </string> <string name="Short Neck"> - Short Neck + çŸé ¸ </string> <string name="Short Pigtails"> - Short Pigtails + çŸè¾®å </string> <string name="Short Ponytail"> - Short Ponytail + çŸé¦¬å°¾è¾® </string> <string name="Short Sideburns"> - Short Sideburns + çŸé¬¢é¬š </string> <string name="Short Torso"> - Short Torso + çŸè»€å¹¹ </string> <string name="Short hips"> - Short hips + çŸè…° </string> <string name="Shoulders"> - Shoulders + 肩膀 </string> <string name="Side Fringe"> - Side Fringe + å´ç€æµ· </string> <string name="Sideburns"> - Sideburns + 鬢鬚 </string> <string name="Sides Hair"> - Sides Hair + å´é¢é é«® </string> <string name="Sides Hair Down"> - Sides Hair Down + å´é¢é 髮下部 </string> <string name="Sides Hair Up"> - Sides Hair Up + å´é¢é 髮上部 </string> <string name="Skinny Neck"> - Skinny Neck + å‰Šç˜¦é ¸éƒ¨ </string> <string name="Skirt Fit"> - Skirt Fit + 裙ååˆèº«åº¦ </string> <string name="Skirt Length"> - Skirt Length + 裙長 </string> <string name="Slanted Forehead"> - Slanted Forehead + æ–œå‰é¡ </string> <string name="Sleeve Length"> - Sleeve Length + 袖長 </string> <string name="Sleeve Looseness"> - Sleeve Looseness + 袖å寬鬆度 </string> <string name="Slit Back"> - Slit: Back + 後分 </string> <string name="Slit Front"> - Slit: Front + å‰åˆ† </string> <string name="Slit Left"> - Slit: Left + 左分 </string> <string name="Slit Right"> - Slit: Right + å³åˆ† </string> <string name="Small"> - Small + å° </string> <string name="Small Hands"> - Small Hands + å°æ‰‹ </string> <string name="Small Head"> - Small Head + å°é </string> <string name="Smooth"> - Smooth + 平滑 </string> <string name="Smooth Hair"> - Smooth Hair + 平滑é é«® </string> <string name="Socks Length"> - Socks Length + 襪長 </string> <string name="Soulpatch"> - Soulpatch + è„£ä¸‹æ’®é¬ </string> <string name="Sparse"> - Sparse + ç¨€ç– </string> <string name="Spiked Hair"> - Spiked Hair + å°–ç›´é é«® </string> <string name="Square"> - Square + 方形 </string> <string name="Square Toe"> - Square Toe + å¹³é éž‹ </string> <string name="Squash Head"> - Squash Head + 長瓜形臉 </string> <string name="Stretch Head"> - Stretch Head + 延展é 部 </string> <string name="Sunken"> - Sunken + 深陷 </string> <string name="Sunken Chest"> - Sunken Chest + 胸部內陷 </string> <string name="Sunken Eyes"> - Sunken Eyes + çœ¼ç›æ·±é™· </string> <string name="Sweep Back"> - Sweep Back + 後垂擺 </string> <string name="Sweep Forward"> - Sweep Forward + å‰åž‚擺 </string> <string name="Tall"> - Tall + 高 </string> <string name="Taper Back"> - Taper Back + 後漸細 </string> <string name="Taper Front"> - Taper Front + 剿¼¸ç´° </string> <string name="Thick Heels"> - Thick Heels + 粗腳跟 </string> <string name="Thick Neck"> - Thick Neck + ç²—é ¸ </string> <string name="Thick Toe"> - Thick Toe + 粗腳趾 </string> <string name="Thin"> - Thin + 瘦 </string> <string name="Thin Eyebrows"> - Thin Eyebrows + 細眉 </string> <string name="Thin Lips"> - Thin Lips + ç´°è„£ </string> <string name="Thin Nose"> - Thin Nose + ç´°é¼» </string> <string name="Tight Chin"> - Tight Chin + 緊緻下巴 </string> <string name="Tight Cuffs"> - Tight Cuffs + ç·Šç·»è¢–å£ </string> <string name="Tight Pants"> - Tight Pants + 緊緻褲å </string> <string name="Tight Shirt"> - Tight Shirt + 緊緻襯衫 </string> <string name="Tight Skirt"> - Tight Skirt + 緊緻裙å </string> <string name="Tight Sleeves"> - Tight Sleeves + 緊緻袖å </string> <string name="Toe Shape"> - Toe Shape + 腳趾形狀 </string> <string name="Toe Thickness"> - Toe Thickness + 腳趾粗細 </string> <string name="Torso Length"> - Torso Length + 軀幹長度 </string> <string name="Torso Muscles"> - Torso Muscles + 軀幹肌肉 </string> <string name="Torso Scrawny"> - Torso Scrawny + 軀幹削瘦 </string> <string name="Unattached"> - Unattached + 未附著 </string> <string name="Uncreased"> - Uncreased + 無皺痕 </string> <string name="Underbite"> - Underbite + 戽斗 </string> <string name="Unnatural"> - Unnatural + ä¸è‡ªç„¶ </string> <string name="Upper Bridge"> - Upper Bridge + ä¸Šé¼»æ¢ </string> <string name="Upper Cheeks"> - Upper Cheeks + ä¸Šè‡‰é ° </string> <string name="Upper Chin Cleft"> - Upper Chin Cleft + 上部顎裂 </string> <string name="Upper Eyelid Fold"> - Upper Eyelid Fold + 上眼瞼皺褶 </string> <string name="Upturned"> - Upturned + 嘴角上翹 </string> <string name="Very Red"> - Very Red + 大紅 </string> <string name="Waist Height"> - Waist Height + 腰高 </string> <string name="Well-Fed"> - Well-Fed + 飽食的 </string> <string name="White Hair"> - White Hair + 白髮 </string> <string name="Wide"> - Wide + 寬 </string> <string name="Wide Back"> - Wide Back + 後寬 </string> <string name="Wide Front"> - Wide Front + å‰å¯¬ </string> <string name="Wide Lips"> - Wide Lips + 寬脣 </string> <string name="Wild"> - Wild + 狂野 </string> <string name="Wrinkles"> - Wrinkles + 皺紋 </string> <string name="LocationCtrlAddLandmarkTooltip"> æ·»åŠ åˆ°æˆ‘çš„åœ°æ¨™ @@ -3585,6 +3868,15 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="LocationCtrlGeneralIconTooltip"> ä¸€èˆ¬æ™®ç´šåœ°å€ </string> + <string name="LocationCtrlSeeAVsTooltip"> + å¯çœ‹åˆ°æœ¬åœ°æ®µå¤–的化身,並與之交談 + </string> + <string name="LocationCtrlPathfindingDirtyTooltip"> + 地å€é‡æ–°ç”¢å‡ºä¹‹å‰ï¼Œå¯ç§»å‹•物件å¯èƒ½ç„¡æ³•æ£å¸¸é‹ä½œã€‚ + </string> + <string name="LocationCtrlPathfindingDisabledTooltip"> + 這地å€ä¸¦æœªå•Ÿç”¨å‹•態尋徑。 + </string> <string name="UpdaterWindowTitle"> [APP_NAME] æ›´æ–° </string> @@ -3595,7 +3887,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. [APP_NAME] 安è£ä¸... </string> <string name="UpdaterUpdatingDescriptive"> - Your [APP_NAME] Viewer is being updated to the latest release. This may take some time, so please be patient. + ä½ çš„ [APP_NAME] Viewer æ£åœ¨æ›´æ–°ç‚ºæœ€æ–°ç™¼è¡Œç‰ˆã€‚ å¯èƒ½è¦ç‰ä¸€æœƒå…’,請è€å¿ƒç¨å€™ã€‚ </string> <string name="UpdaterProgressBarTextWithEllipses"> 更新下載ä¸... @@ -3607,7 +3899,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. å¤è¼‰æ›´æ–°å¤±æ•— </string> <string name="UpdaterFailUpdateDescriptive"> - An error occurred while updating [APP_NAME]. Please download the latest version from www.secondlife.com. + [APP_NAME] 更新時出錯。 請到 www.secondlife.com 下載最新版本。 </string> <string name="UpdaterFailInstallTitle"> å®‰è£æ›´æ–°å¤±æ•— @@ -3616,13 +3908,13 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. 啟動ç€è¦½å™¨å¤±æ•— </string> <string name="ItemsComingInTooFastFrom"> - [APP_NAME]: Items coming in too fast from [FROM_NAME], automatic preview disabled for [TIME] seconds + [APP_NAME]:來自 [FROM_NAME] çš„é …ç›®é€Ÿåº¦éŽå¿«ï¼Œå› æ¤è‡ªå‹•é è¦½æš«åœ [TIME] ç§’ </string> <string name="ItemsComingInTooFast"> - [APP_NAME]: Items coming in too fast, automatic preview disabled for [TIME] seconds + [APP_NAME]ï¼šé€²ä¾†çš„é …ç›®é€Ÿåº¦éŽå¿«ï¼Œå› æ¤è‡ªå‹•é è¦½æš«åœ [TIME] ç§’ </string> <string name="IM_logging_string"> - -- Instant message logging enabled -- + -- å·²é–‹å•ŸåŠæ™‚訊æ¯è¨˜éŒ„ -- </string> <string name="IM_typing_start_string"> [NAME] æ£åœ¨è¼¸å…¥... @@ -3631,43 +3923,46 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. (未命å) </string> <string name="IM_moderated_chat_label"> - (Moderated: Voices off by default) + (有人主æŒï¼šé è¨é—œé–‰èªžéŸ³ï¼‰ </string> <string name="IM_unavailable_text_label"> - Text chat is not available for this call. + 這次通話無法使用文å—èŠå¤©ã€‚ </string> <string name="IM_muted_text_label"> - Your text chat has been disabled by a Group Moderator. + 群組主æŒäººå·²ç¦æ¢ä½ 進行文å—èŠå¤©ã€‚ </string> <string name="IM_default_text_label"> - 點擊æ¤è™•以傳é€å³æ™‚訊æ¯ã€‚ + 點按æ¤è™•以傳é€å³æ™‚訊æ¯ã€‚ </string> <string name="IM_to_label"> 至 </string> <string name="IM_moderator_label"> - (Moderator) + (主æŒäººï¼‰ </string> <string name="Saved_message"> - (Saved [LONG_TIMESTAMP]) + (於 [LONG_TIMESTAMP] 儲å˜ï¼‰ + </string> + <string name="IM_unblock_only_groups_friends"> + è¦å¯Ÿçœ‹é€™è¨Šæ¯ï¼Œä½ å¿…é ˆåˆ°ã€Œå好è¨å®š / éš±ç§ã€ï¼Œå–消勾é¸ã€Œåªæœ‰æˆ‘的朋å‹å’Œç¾¤çµ„å¯ä»¥ IM 或與我通話ã€ã€‚ </string> <string name="answered_call"> - Your call has been answered + ä½ çš„é€šè©±å·²ç¶“æŽ¥é€š </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 + [NAME] 發起了語音通話 </string> <string name="ringing-im"> åŠ å…¥èªžéŸ³é€šè©±... </string> <string name="connected-im"> - Connected, click Leave Call to hang up + å·²æŽ¥é€šï¼Œè¦æŽ›æ–·è«‹æŒ‰ã€Œé›¢é–‹é€šè©±ã€ </string> <string name="hang_up-im"> 離開語音通話 @@ -3676,40 +3971,40 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. è¯æŽ¥ä¸... </string> <string name="conference-title"> - Ad-hoc Conference + 臨時多方通話 </string> <string name="conference-title-incoming"> - Conference with [AGENT_NAME] + å’Œ [AGENT_NAME] 多方通話 </string> <string name="inventory_item_offered-im"> - Inventory item offered + æ”¶ç´å€ç‰©å“å·²ç™¼é€ </string> <string name="share_alert"> - Drag items from inventory here + 將收ç´å€ç‰©å“拖曳到這裡 </string> <string name="no_session_message"> (IM 會話ä¸å˜åœ¨ï¼‰ </string> <string name="only_user_message"> - You are the only user in this session. + é€™æ¬¡æœƒè©±åªæœ‰ä½ 一人。 </string> <string name="offline_message"> [NAME] 離線。 </string> <string name="invite_message"> - Click the [BUTTON NAME] button to accept/connect to this voice chat. + 點按 [BUTTON NAME] 按鈕接å—並連通到這個語音èŠå¤©ã€‚ </string> <string name="muted_message"> - You have blocked this Resident. Sending a message will automatically unblock them. + ä½ å·²ç¶“å°éޖ這ä½å±…民。 發é€è¨Šæ¯å°‡æœƒè‡ªå‹•解除å°éŽ–ã€‚ </string> <string name="generic"> - Error making request, please try again later. + é€å‡ºè«‹æ±‚時出錯,請ç¨å€™å†è©¦ã€‚ </string> <string name="generic_request_error"> - Error making request, please try again later. + é€å‡ºè«‹æ±‚時出錯,請ç¨å€™å†è©¦ã€‚ </string> <string name="insufficient_perms_error"> - You do not have sufficient permissions. + ä½ æ¬Šé™ä¸è¶³ã€‚ </string> <string name="session_does_not_exist_error"> æ¤æœƒè©±ä¸å†å˜åœ¨ @@ -3721,25 +4016,25 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. ä½ ä¸¦ä¸å…·æœ‰é€™å€‹èƒ½åŠ›ã€‚ </string> <string name="not_a_mod_error"> - You are not a session moderator. + ä½ ä¸å…·æœƒè©±ä¸»æŒäººèº«ä»½ã€‚ </string> <string name="muted"> - A group moderator disabled your text chat. + æŸç¾¤çµ„主æŒäººç¦æ¢äº†ä½ 的文å—èŠå¤©ã€‚ </string> <string name="muted_error"> - A group moderator disabled your text chat. + æŸç¾¤çµ„主æŒäººç¦æ¢äº†ä½ 的文å—èŠå¤©ã€‚ </string> <string name="add_session_event"> - Unable to add users to chat session with [RECIPIENT]. + ç„¡æ³•æ–°å¢žä½¿ç”¨è€…åŠ å…¥èˆ‡ [RECIPIENT] çš„èŠå¤©æœƒè©±ã€‚ </string> <string name="message"> - Unable to send your message to the chat session with [RECIPIENT]. + ä½ çš„è¨Šæ¯ç„¡æ³•傳é€çµ¦èˆ‡ [RECIPIENT] çš„èŠå¤©æœƒè©±ã€‚ </string> <string name="message_session_event"> - Unable to send your message to the chat session with [RECIPIENT]. + ä½ çš„è¨Šæ¯ç„¡æ³•傳é€çµ¦èˆ‡ [RECIPIENT] çš„èŠå¤©æœƒè©±ã€‚ </string> <string name="mute"> - Error while moderating. + ä¸»æŒæœŸé–“發生錯誤。 </string> <string name="removed"> ä½ å·²ç¶“ç”±ç¾¤çµ„ä¸è¢«ç§»é™¤ã€‚ @@ -3748,49 +4043,64 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. ä½ å·²ç¶“ç”±ç¾¤çµ„ä¸è¢«ç§»é™¤ã€‚ </string> <string name="close_on_no_ability"> - You no longer have the ability to be in the chat session. + ä½ å·²ç„¡æ³•é€²å…¥é€™å€‹èŠå¤©æœƒè©±ã€‚ </string> <string name="unread_chat_single"> - [SOURCES] has said something new + [SOURCES] åˆèªªäº†ä¸€äº›è©± </string> <string name="unread_chat_multiple"> - [SOURCES] have said something new + [SOURCES] åˆèªªäº†ä¸€äº›è©± </string> <string name="session_initialization_timed_out_error"> - The session initialization is timed out + 會話åˆå§‹åŒ–é€¾æ™‚ï¼Œç„¡æ³•å®Œæˆ + </string> + <string name="Home position set."> + 我的家ä½ç½®å·²å®šã€‚ </string> <string name="voice_morphing_url"> http://secondlife.com/landing/voicemorphing </string> <string name="paid_you_ldollars"> - [NAME] paid you L$[AMOUNT] [REASON]. + [NAME] æ”¯ä»˜ä½ L$[AMOUNT]([REASON])。 </string> <string name="paid_you_ldollars_no_reason"> - [NAME] paid you L$[AMOUNT]. + [NAME] æ”¯ä»˜ä½ L$[AMOUNT]。 </string> <string name="you_paid_ldollars"> - You paid [NAME] L$[AMOUNT] [REASON]. + ä½ æ”¯ä»˜ L$[AMOUNT] 給 [NAME]([REASON])。 </string> <string name="you_paid_ldollars_no_info"> - You paid L$[AMOUNT]. + ä½ æ”¯ä»˜äº† L$[AMOUNT]。 </string> <string name="you_paid_ldollars_no_reason"> - You paid [NAME] L$[AMOUNT]. + ä½ æ”¯ä»˜ L$[AMOUNT] 給 [NAME]。 </string> <string name="you_paid_ldollars_no_name"> - You paid L$[AMOUNT] [REASON]. + ä½ æ”¯ä»˜äº† L$[AMOUNT]([REASON])。 + </string> + <string name="you_paid_failure_ldollars"> + ä½ æ”¯ä»˜ L$[AMOUNT] 給 [NAME] 時出錯:[REASON]。 + </string> + <string name="you_paid_failure_ldollars_no_info"> + ä½ æ”¯ä»˜ L$[AMOUNT] 時出錯。 + </string> + <string name="you_paid_failure_ldollars_no_reason"> + ä½ æ”¯ä»˜ L$[AMOUNT] 給 [NAME] 時出錯。 + </string> + <string name="you_paid_failure_ldollars_no_name"> + ä½ æ”¯ä»˜ L$[AMOUNT] 時出錯:[REASON]。 </string> <string name="for item"> - for [ITEM] + 購買 [ITEM] </string> <string name="for a parcel of land"> - for a parcel of land + 購買一土地地段 </string> <string name="for a land access pass"> - for a land access pass + 購買土地出入通行權 </string> <string name="for deeding land"> - for deeding land + 讓渡土地 </string> <string name="to create a group"> ä»¥å‰µé€ ç¾¤çµ„ @@ -3802,39 +4112,39 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. 以上傳 </string> <string name="to publish a classified ad"> - to publish a classified ad + 發布一則個人廣告 </string> <string name="giving"> - Giving L$ [AMOUNT] + æè´ˆ L$ [AMOUNT] </string> <string name="uploading_costs"> 上傳花費 L$ [AMOUNT] </string> <string name="this_costs"> - This costs L$ [AMOUNT] + 本次花費 L$ [AMOUNT] </string> <string name="buying_selected_land"> - Buying selected land for L$ [AMOUNT] + 花費 L$ [AMOUNT] 購買所é¸åœŸåœ° </string> <string name="this_object_costs"> - This object costs L$ [AMOUNT] + æœ¬ç‰©ä»¶åƒ¹æ ¼ L$ [AMOUNT] </string> <string name="group_role_everyone"> 任何人 </string> <string name="group_role_officers"> - Officers + è·å“¡ </string> <string name="group_role_owners"> - æ“æœ‰è€… + 所有人 </string> <string name="group_member_status_online"> 上線 </string> <string name="uploading_abuse_report"> 上傳ä¸... - -èˆ‰å ±æ¿«ç”¨ + +é•è¦èˆ‰å ± </string> <string name="New Shape"> 新體形 @@ -3861,7 +4171,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. 新襪å </string> <string name="New Jacket"> - 新夾克 + 新外套 </string> <string name="New Gloves"> 新手套 @@ -3912,7 +4222,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. 女性姿勢 </string> <string name="Other Gestures"> - å…¶ä»–å§¿å‹¢ + 其他���勢 </string> <string name="Speech Gestures"> 演說姿勢 @@ -3921,91 +4231,172 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. 一般姿勢 </string> <string name="Male - Excuse me"> - Male - Excuse me + 男性 - Excuse me </string> <string name="Male - Get lost"> - Male - Get lost + Male - çµ¦æˆ‘æ»¾è›‹ï¼ </string> <string name="Male - Blow kiss"> - Male - Blow kiss + 男性 - é£›å» </string> <string name="Male - Boo"> - Male - Boo + 男性 - æˆ‘å™“ä½ </string> <string name="Male - Bored"> - Male - Bored + 男性 - ç„¡èŠç‹€ </string> <string name="Male - Hey"> - Male - Hey + 男性 - å˜¿ï¼ </string> <string name="Male - Laugh"> - Male - Laugh + 男性 - 笑 </string> <string name="Male - Repulsed"> - Male - Repulsed + 男性 - ä½œå™ </string> <string name="Male - Shrug"> - Male - Shrug + 男性 - è³è³è‚© </string> <string name="Male - Stick tougue out"> - Male - Stick tougue out + 男性 - å舌é </string> <string name="Male - Wow"> - Male - Wow + 男性 - 哇塞 </string> <string name="Female - Chuckle"> - Female - Chuckle + 女性 - 咯咯笑 </string> <string name="Female - Cry"> - Female - Cry + 女性 - å“ </string> <string name="Female - Embarrassed"> - Female - Embarrassed + 女性 - å°·å°¬ </string> <string name="Female - Excuse me"> - Female - Excuse me + 男性 - Excuse me </string> <string name="Female - Get lost"> - Female - Get lost + 女性 - çµ¦æˆ‘æ»¾è›‹ï¼ </string> <string name="Female - Blow kiss"> - Female - Blow kiss + 女性 - é£›å» </string> <string name="Female - Boo"> - Female - Boo + 女性 - æˆ‘å™“ä½ </string> <string name="Female - Bored"> - Female - Bored + 女性 - ç„¡èŠç‹€ </string> <string name="Female - Hey"> - Female - Hey + 女性 - å˜¿ï¼ </string> <string name="Female - Hey baby"> - Female - Hey baby + 女性 - å˜¿ï¼Œå¯¶è² </string> <string name="Female - Laugh"> - Female - Laugh + 女性 - 笑 </string> <string name="Female - Looking good"> - Female - Looking good + 女性 - 看我美ä¸ç¾Ž </string> <string name="Female - Over here"> - Female - Over here + 女性 - 我在這兒 </string> <string name="Female - Please"> - Female - Please + 女性 - è«‹ </string> <string name="Female - Repulsed"> - Female - Repulsed + 女性 - ä½œå™ </string> <string name="Female - Shrug"> - Female - Shrug + 女性 - è³è³è‚© </string> <string name="Female - Stick tougue out"> - Female - Stick tougue out + 女性 - å舌é </string> <string name="Female - Wow"> - Female - Wow + 女性 - 哇塞 + </string> + <string name="/bow"> + /彎腰點é + </string> + <string name="/clap"> + /æ‹æ‰‹ + </string> + <string name="/count"> + /計數 + </string> + <string name="/extinguish"> + /ç†„è¸ + </string> + <string name="/kmb"> + /çµ¦æˆ‘ä¸€å€‹å» + </string> + <string name="/muscle"> + /肌肉 + </string> + <string name="/no"> + /ä¸ + </string> + <string name="/no!"> + /ä¸ï¼ + </string> + <string name="/paper"> + /布 + </string> + <string name="/pointme"> + /指自己 + </string> + <string name="/pointyou"> + /指å‘ä½ + </string> + <string name="/rock"> + /石é + </string> + <string name="/scissor"> + /剪刀 + </string> + <string name="/smoke"> + /æŠ½è¸ + </string> + <string name="/stretch"> + /伸展 + </string> + <string name="/whistle"> + /å¹å£å“¨ + </string> + <string name="/yes"> + /是 + </string> + <string name="/yes!"> + /æ˜¯ï¼ + </string> + <string name="afk"> + 暫時離開 + </string> + <string name="dance1"> + 跳舞1 + </string> + <string name="dance2"> + 跳舞2 + </string> + <string name="dance3"> + 跳舞3 + </string> + <string name="dance4"> + 跳舞4 + </string> + <string name="dance5"> + 跳舞5 + </string> + <string name="dance6"> + 跳舞6 + </string> + <string name="dance7"> + 跳舞7 + </string> + <string name="dance8"> + 跳舞8 </string> <string name="AvatarBirthDateFormat"> [mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt] @@ -4018,34 +4409,34 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. </string> <string name="words_separator" value=","/> <string name="server_is_down"> - Despite our best efforts, something unexpected has gone wrong. + 儘管我們努力é¿å…ï¼Œé‚„æ˜¯ç™¼ç”Ÿæ„æ–™å¤–的錯誤。 - Please check status.secondlifegrid.net to see if there is a known problem with the service. - If you continue to experience problems, please check your network and firewall setup. + 請察訪 status.secondlifegrid.net 看是å¦ç™¼ç”Ÿäº†å·²çŸ¥ç‹€æ³ã€‚ + å¦‚æžœæ–‡é«”ç¹¼çºŒç™¼ç”Ÿï¼Œè«‹æª¢æŸ¥ä½ çš„ç¶²è·¯å’Œé˜²ç«ç‰†è¨å®šã€‚ </string> <string name="dateTimeWeekdaysNames"> - Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday + 星期日:星期一:星期二:星期三:星期四:星期五:æ˜ŸæœŸå… </string> <string name="dateTimeWeekdaysShortNames"> - Sun:Mon:Tue:Wed:Thu:Fri:Sat + 星期日:星期一:星期二:星期三:星期四:星期五:æ˜ŸæœŸå… </string> <string name="dateTimeMonthNames"> - January:February:March:April:May:June:July:August:September:October:November:December + 一月:二月:三月:四月:五月:å…æœˆ:七月:八月:乿œˆ:åæœˆ:å一月:å二月 </string> <string name="dateTimeMonthShortNames"> - Jan:Feb:Mar:Apr:May:Jun:Jul:Aug:Sep:Oct:Nov:Dec + 一月:二月:三月:四月:五月:å…æœˆ:七月:八月:乿œˆ:åæœˆ:å一月:å二月 </string> <string name="dateTimeDayFormat"> [MDAY] </string> <string name="dateTimeAM"> - AM + ä¸Šåˆ </string> <string name="dateTimePM"> - PM + ä¸‹åˆ </string> <string name="LocalEstimateUSD"> - US$ [AMOUNT] + $ [AMOUNT] 美元 </string> <string name="Membership"> æˆå“¡è³‡æ ¼ @@ -4054,25 +4445,25 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. 角色 </string> <string name="Group Identity"> - Group Identity + 群組身份 </string> <string name="Parcel Management"> åœ°æ®µç®¡ç† </string> <string name="Parcel Identity"> - Parcel Identity + 地段å </string> <string name="Parcel Settings"> 地段è¨å®š </string> <string name="Parcel Powers"> - Parcel Powers + 地段權利 </string> <string name="Parcel Access"> - Parcel Access + 地段出入 </string> <string name="Parcel Content"> - Parcel Content + 地段內容 </string> <string name="Object Management"> ç‰©ä»¶ç®¡ç† @@ -4090,7 +4481,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. 刪除所é¸å–的物å“? </string> <string name="DeleteItem"> - 刪除所é¸å–的物å“? + 刪除所é¸å–的物���? </string> <string name="EmptyOutfitText"> 沒有任何物å“åœ¨é€™å€‹è£æ‰®å…§ @@ -4099,72 +4490,78 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. 鏿“‡ä¸€å€‹ç·¨è¼¯å™¨ä½¿ç”¨ ExternalEditor è¨å®šã€‚ </string> <string name="ExternalEditorNotFound"> - Cannot find the external editor you specified. -Try enclosing path to the editor with double quotes. -(e.g. "/path to my/editor" "%s") + 找ä¸åˆ°ä½ 指定的外部編輯器。 +請嘗試在編輯器路經å‰å¾ŒåŠ ä¸Šè‹±æ–‡é›™æ‹¬è™Ÿã€‚ +(例:"/path to my/editor" "%s") </string> <string name="ExternalEditorCommandParseError"> - Error parsing the external editor command. + è§£æžå¤–部編輯器指令時出錯。 </string> <string name="ExternalEditorFailedToRun"> 執行外部編輯器失敗。 </string> + <string name="TranslationFailed"> + 無法翻è¯ï¼š[REASON] + </string> + <string name="TranslationResponseParseError"> + 無法剖æžå¹³ç§»å›žæ‡‰ã€‚ + </string> <string name="Esc"> - Esc + Esc éµ </string> <string name="Space"> - Space + ç©ºé–“éµ </string> <string name="Enter"> - Enter + Enter éµ </string> <string name="Tab"> - Tab + Tab éµ </string> <string name="Ins"> - Ins + Ins éµ </string> <string name="Del"> - Del + Del éµ </string> <string name="Backsp"> - Backsp + Backspace éµ </string> <string name="Shift"> - Shift + Shift éµ </string> <string name="Ctrl"> - Ctrl + Ctrl éµ </string> <string name="Alt"> - Alt + Alt éµ </string> <string name="CapsLock"> - CapsLock + CapsLock éµ </string> <string name="Left"> - Left + å·¦ç§»éµ </string> <string name="Right"> - Right + å³ç§»éµ </string> <string name="Up"> - Up + ä¸Šç§»éµ </string> <string name="Down"> - Down + ä¸‹ç§»éµ </string> <string name="Home"> - Home + Home éµ </string> <string name="End"> - End + End éµ </string> <string name="PgUp"> - PgUp + PgUp éµ </string> <string name="PgDn"> - PgDn + PgDn éµ </string> <string name="F1"> F1 @@ -4203,16 +4600,16 @@ Try enclosing path to the editor with double quotes. F12 </string> <string name="Add"> - Add + æ·»åŠ </string> <string name="Subtract"> - Subtract + 減 </string> <string name="Multiply"> - Multiply + 乘 </string> <string name="Divide"> - Divide + 除 </string> <string name="PAD_DIVIDE"> PAD_DIVIDE @@ -4392,7 +4789,7 @@ Try enclosing path to the editor with double quotes. M </string> <string name="N"> - N + 北 </string> <string name="O"> O @@ -4407,7 +4804,7 @@ Try enclosing path to the editor with double quotes. R </string> <string name="S"> - S + å— </string> <string name="T"> T @@ -4419,7 +4816,7 @@ Try enclosing path to the editor with double quotes. V </string> <string name="W"> - W + 西 </string> <string name="X"> X @@ -4431,24 +4828,243 @@ Try enclosing path to the editor with double quotes. Z </string> <string name="BeaconParticle"> - Viewing particle beacons (blue) + æª¢è¦–ç²’åæ•ˆæžœçš„導引(è—色) </string> <string name="BeaconPhysical"> - Viewing physical object beacons (green) + æª¢è¦–å…·é«”ç‰©ä»¶çš„å°Žå¼•ï¼ˆç¶ è‰²ï¼‰ </string> <string name="BeaconScripted"> - Viewing scripted object beacons (red) + 檢視腳本物件的導引(紅色) </string> <string name="BeaconScriptedTouch"> - Viewing scripted object with touch function beacons (red) + 檢視帶有觸摸函å¼è…³æœ¬ç‰©ä»¶çš„導引(紅色) </string> <string name="BeaconSound"> - Viewing sound beacons (yellow) + 檢視è²éŸ³çš„導引(黃色) </string> <string name="BeaconMedia"> - Viewing media beacons (white) + 檢視媒體的導引(白色) </string> <string name="ParticleHiding"> - Hiding Particles + éš±è—ç²’åæ•ˆæžœ + </string> + <string name="Command_AboutLand_Label"> + 土地資料 + </string> + <string name="Command_Appearance_Label"> + 編輯外觀 + </string> + <string name="Command_Avatar_Label"> + 化身 + </string> + <string name="Command_Build_Label"> + å»ºé€ + </string> + <string name="Command_Chat_Label"> + èŠå¤© + </string> + <string name="Command_Compass_Label"> + 羅盤 + </string> + <string name="Command_Destinations_Label"> + 目的地 + </string> + <string name="Command_Gestures_Label"> + å§¿å‹¢ + </string> + <string name="Command_HowTo_Label"> + ç°¡æ˜“æ•™å¸ + </string> + <string name="Command_Inventory_Label"> + æ”¶ç´å€ + </string> + <string name="Command_Map_Label"> + 地圖 + </string> + <string name="Command_Marketplace_Label"> + 第二人生購物市集 + </string> + <string name="Command_MiniMap_Label"> + è¿·ä½ åœ°åœ– + </string> + <string name="Command_Move_Label"> + 行走 / è·‘æ¥ / 飛行 + </string> + <string name="Command_Outbox_Label"> + 商家發件匣 + </string> + <string name="Command_People_Label"> + 人群 + </string> + <string name="Command_Picks_Label"> + ç²¾é¸åœ°é»ž + </string> + <string name="Command_Places_Label"> + 地點 + </string> + <string name="Command_Preferences_Label"> + å好è¨å®š + </string> + <string name="Command_Profile_Label"> + 檔案 + </string> + <string name="Command_Search_Label"> + æœå°‹ + </string> + <string name="Command_Snapshot_Label"> + å¿«ç…§ + </string> + <string name="Command_Speak_Label"> + 說話 + </string> + <string name="Command_View_Label"> + æ”影機控制 + </string> + <string name="Command_Voice_Label"> + 語音è¨å®š + </string> + <string name="Command_AboutLand_Tooltip"> + æœ‰é—œä½ æ‰€è™•åœŸåœ°çš„è³‡è¨Š + </string> + <string name="Command_Appearance_Tooltip"> + 改變化身 + </string> + <string name="Command_Avatar_Tooltip"> + 鏿“‡ä¸€å€‹å®Œæ•´çš„化身 + </string> + <string name="Command_Build_Tooltip"> + 建製物件和é‡å¡‘地形 + </string> + <string name="Command_Chat_Tooltip"> + é€éŽæ–‡å—和附近人們èŠå¤© + </string> + <string name="Command_Compass_Tooltip"> + 指å—é‡ + </string> + <string name="Command_Destinations_Tooltip"> + ä½ å¯èƒ½æ„Ÿèˆˆè¶£çš„目的地 + </string> + <string name="Command_Gestures_Tooltip"> + ä½ åŒ–èº«å¯ç”¨çš„å§¿å‹¢ + </string> + <string name="Command_HowTo_Tooltip"> + 如何完æˆå¸¸ç”¨çš„動作 + </string> + <string name="Command_Inventory_Tooltip"> + å¯Ÿçœ‹ä¸¦ä½¿ç”¨ä½ æ“æœ‰çš„物件 + </string> + <string name="Command_Map_Tooltip"> + 世界地圖 + </string> + <string name="Command_Marketplace_Tooltip"> + å‰å¾€è³¼ç‰© + </string> + <string name="Command_MiniMap_Tooltip"> + 顯示附近的人 + </string> + <string name="Command_Move_Tooltip"> + 移動化身 + </string> + <string name="Command_Outbox_Tooltip"> + å°‡ç‰©é …è½‰ç§»åˆ°ç¬¬äºŒäººç”Ÿè³¼ç‰©å¸‚é›†å¾…å”® + </string> + <string name="Command_People_Tooltip"> + 朋å‹ã€ç¾¤çµ„和附近的人 + </string> + <string name="Command_Picks_Tooltip"> + é¡¯ç¤ºåœ¨ä½ çš„å°æª”案ä¸çš„æœ€æ„›åœ°é»ž + </string> + <string name="Command_Places_Tooltip"> + ä½ å„²å˜çš„地點 + </string> + <string name="Command_Preferences_Tooltip"> + å好è¨å®š + </string> + <string name="Command_Profile_Tooltip"> + ç·¨è¼¯æˆ–å¯Ÿçœ‹ä½ çš„å°æª”案 + </string> + <string name="Command_Search_Tooltip"> + å°‹æ‰¾åœ°é»žã€æ´»å‹•ã€å…¶ä»–人 + </string> + <string name="Command_Snapshot_Tooltip"> + æ‹ä¸€å¼µç…§ç‰‡ + </string> + <string name="Command_Speak_Tooltip"> + 用麥克風和附近人們交談 + </string> + <string name="Command_View_Tooltip"> + 調整æ”影機角度 + </string> + <string name="Command_Voice_Tooltip"> + åœ¨è™›æ“¬ä¸–ç•Œè£¡é€šè©±å’Œé™„è¿‘äººç¾¤çš„éŸ³é‡æŽ§åˆ¶ + </string> + <string name="Toolbar_Bottom_Tooltip"> + ç›®å‰ä½åœ¨ä½ 的底部工具列 + </string> + <string name="Toolbar_Left_Tooltip"> + ç›®å‰ä½åœ¨ä½ 的左工具列 + </string> + <string name="Toolbar_Right_Tooltip"> + ç›®å‰ä½åœ¨ä½ çš„å³å·¥å…·åˆ— + </string> + <string name="Retain%"> + ä¿ç•™% + </string> + <string name="Detail"> + 細節 + </string> + <string name="Better Detail"> + 更多細節 + </string> + <string name="Surface"> + è¡¨é¢ + </string> + <string name="Solid"> + 固體 + </string> + <string name="Wrap"> + Wrap + </string> + <string name="Preview"> + é 覽 + </string> + <string name="Normal"> + æ£å¸¸ + </string> + <string name="Pathfinding_Wiki_URL"> + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + </string> + <string name="Pathfinding_Object_Attr_None"> + ç„¡ + </string> + <string name="Pathfinding_Object_Attr_Permanent"> + å½±éŸ¿å°Žèˆªç¶²é¢ + </string> + <string name="Pathfinding_Object_Attr_Character"> + 角色 + </string> + <string name="Pathfinding_Object_Attr_MultiSelect"> + ï¼ˆå¤šé …ï¼‰ + </string> + <string name="snapshot_quality_very_low"> + 很低 + </string> + <string name="snapshot_quality_low"> + 低 + </string> + <string name="snapshot_quality_medium"> + ä¸ + </string> + <string name="snapshot_quality_high"> + 高 + </string> + <string name="snapshot_quality_very_high"> + 很高 + </string> + <string name="TeleportMaturityExceeded"> + æ¤å±…æ°‘ä¸å¾—進入æ¤åœ°å€ã€‚ + </string> + <string name="UserDictionary"> + [User] </string> </strings> diff --git a/indra/newview/skins/default/xui/zh/teleport_strings.xml b/indra/newview/skins/default/xui/zh/teleport_strings.xml index bfdb107810..37080a8d0c 100644 --- a/indra/newview/skins/default/xui/zh/teleport_strings.xml +++ b/indra/newview/skins/default/xui/zh/teleport_strings.xml @@ -2,15 +2,15 @@ <teleport_messages> <message_set name="errors"> <message name="invalid_tport"> - Problem encountered processing your teleport request. You may need to log back in before you can teleport. + 處ç†ä½ 瞬間傳é€è¦æ±‚時發生å•題。 如果想è¦çž¬é–“傳é€ï¼Œä½ å¯èƒ½éœ€è¦é‡æ–°ç™»å…¥ã€‚ å¦‚æžœä½ æŒçºŒå¾—到æ¤è¨Šæ¯ï¼Œè«‹æŸ¥é–± [SUPPORT_SITE]。 </message> <message name="invalid_region_handoff"> - Problem encountered processing your region crossing. You may need to log back in before you can cross regions. + 處ç†ä½ 跨越地å€å‹•作時發生å•題。 如果想è¦è·¨è¶Šåœ°å€ï¼Œä½ å¯èƒ½éœ€è¦é‡æ–°ç™»å…¥ã€‚ å¦‚æžœä½ æŒçºŒå¾—到æ¤è¨Šæ¯ï¼Œè«‹æŸ¥é–± [SUPPORT_SITE]。 </message> <message name="blocked_tport"> - 抱æ‰ï¼Œç›®å‰çž¬é–“傳é€å·²è¢«é˜»æ“‹ã€‚è«‹ç¨å¾Œå†è©¦ã€‚ + 抱æ‰ï¼Œç›®å‰ç¦æ¢çž¬é–“傳é€ã€‚ è«‹ç¨å¾Œå†è©¦ã€‚ å¦‚æžœä½ ä»ç„¡æ³•進行瞬間傳é€ï¼Œè«‹ç™»å‡ºå¾Œé‡æ–°å…¥ä¾†è§£æ±ºæ¤ä¸€å•題。 </message> <message name="nolandmark_tport"> @@ -21,40 +21,43 @@ è«‹ç¨å¾Œå†è©¦ã€‚ </message> <message name="NoHelpIslandTP"> - 您ä¸èƒ½çž¬é—´è½¬ç§»å›žâ€œæ´åЩ岛â€ã€‚ -去“公共æ´åЩ岛â€é‡å¤æ‚¨çš„æ•™ç¨‹ã€‚ + ä½ ç„¡æ³•çž¬é–“å‚³é€å›žã€Œæ–°æ‰‹å°Žå¼•å³¶ã€ã€‚ +請到「大眾新手導引島ã€é‡æ–°åƒåŠ å°Žå¼•æ•™å¸ã€‚ </message> <message name="noaccess_tport"> 抱æ‰ï¼Œä½ 並沒有權é™é€²å…¥è¦çž¬é–“傳é€çš„目的地。 </message> <message name="missing_attach_tport"> - Your attachments have not arrived yet. Try waiting for a few more seconds or log out and back in again before attempting to teleport. + ä½ çš„é™„ä»¶å°šæœªæŠµé”。 è«‹ç¨å€™ä¸€æœƒå…’ï¼Œæˆ–è«‹ç™»å‡ºå¾Œé‡æ–°ç™»å…¥ï¼Œå†å˜—試瞬間傳é€ã€‚ </message> <message name="too_many_uploads_tport"> - The asset queue in this region is currently clogged so your teleport request will not be able to succeed in a timely manner. Please try again in a few minutes or go to a less busy area. + 該地å€çš„資產查詢目å‰å¤ªéŽæ“å¡žï¼Œå› æ¤ä½ 的瞬間傳é€å‹•作å¯èƒ½ç„¡æ³•峿™‚發生。 è«‹ç¨å€™å†è©¦ï¼Œæˆ–è«‹å‰å¾€è¼ƒä¸æ“塞的地å€ã€‚ </message> <message name="expired_tport"> - Sorry, but the system was unable to complete your teleport request in a timely fashion. Please try again in a few minutes. + 抱æ‰ï¼Œç³»çµ±ç„¡æ³•峿™‚完æˆç‚ºä½ 瞬間傳é€ã€‚ è«‹ç¨å¾…幾分é˜å†è©¦ã€‚ </message> <message name="expired_region_handoff"> - Sorry, but the system was unable to complete your region crossing in a timely fashion. Please try again in a few minutes. + 抱æ‰ï¼Œç³»çµ±ç„¡æ³•峿™‚è®“ä½ è·¨è¶Šåœ°å€ã€‚ è«‹ç¨å¾…幾分é˜å†è©¦ã€‚ </message> <message name="no_host"> - Unable to find teleport destination. The destination may be temporarily unavailable or no longer exists. Please try again in a few minutes. + 找ä¸åˆ°çž¬é–“傳é€çš„目的地。 目的地å¯èƒ½æš«æ™‚ä¸å¯ç”¨ï¼Œæˆ–å·²ä¸å˜åœ¨ã€‚ è«‹ç¨å¾…幾分é˜å†è©¦ã€‚ </message> <message name="no_inventory_host"> æ”¶ç´å€åŠŸèƒ½ç›®å‰ç„¡æ³•使用。 </message> + <message name="MustGetAgeRegion"> + ä½ å¿…é ˆå¹´æ»¿ 18 æ²æ‰å¯é€²å…¥é€™åœ°å€ã€‚ + </message> </message_set> <message_set name="progress"> <message name="sending_dest"> - Sending to destination. + é€å¾€ç›®çš„地。 </message> <message name="redirecting"> 釿–°å°Žå‘至ä¸åŒä½ç½®ã€‚ </message> <message name="relaying"> - Relaying to destination. + 接繼é€å¾€ç›®çš„地。 </message> <message name="sending_home"> é€å‡ºå®¶ä½ç½®çš„è¦æ±‚。 @@ -80,5 +83,8 @@ <message name="requesting"> 瞬間傳é€è¦æ±‚ä¸... </message> + <message name="pending"> + ç‰å¾…瞬間傳é€â€¦ + </message> </message_set> </teleport_messages> diff --git a/indra/newview/skins/paths.xml b/indra/newview/skins/paths.xml deleted file mode 100644 index 3c0da041c7..0000000000 --- a/indra/newview/skins/paths.xml +++ /dev/null @@ -1,10 +0,0 @@ -<paths> - <directory> - <subdir>xui</subdir> - <subdir>en</subdir> - </directory> - <directory> - <subdir>xui</subdir> - <subdir>[LANGUAGE]</subdir> - </directory> -</paths>
\ No newline at end of file diff --git a/indra/newview/tests/lldir_stub.cpp b/indra/newview/tests/lldir_stub.cpp index 18cf4e7419..2bc6772d86 100644 --- a/indra/newview/tests/lldir_stub.cpp +++ b/indra/newview/tests/lldir_stub.cpp @@ -32,7 +32,7 @@ BOOL LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask void LLDir::setChatLogsDir(const std::string &path) {} void LLDir::setPerAccountChatLogsDir(const std::string &first, const std::string &last) {} void LLDir::setLindenUserDir(const std::string &first, const std::string &last) {} -void LLDir::setSkinFolder(const std::string &skin_folder) {} +void LLDir::setSkinFolder(const std::string &skin_folder, const std::string& language) {} bool LLDir::setCacheDir(const std::string &path) { return true; } void LLDir::dumpCurrentDirectories() {} @@ -48,7 +48,7 @@ public: /*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask) { return 42; } /*virtual*/ BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap) { fname = fname + "_NEXT"; return false; } /*virtual*/ void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) { fname = "RANDOM_FILE"; } - /*virtual*/ BOOL fileExists(const std::string &filename) const { return false; } + /*virtual*/ bool fileExists(const std::string &filename) const { return false; } }; LLDir_stub gDirUtil; diff --git a/indra/newview/tests/lltranslate_test.cpp b/indra/newview/tests/lltranslate_test.cpp index 10e37fae97..fd9527d631 100644 --- a/indra/newview/tests/lltranslate_test.cpp +++ b/indra/newview/tests/lltranslate_test.cpp @@ -299,11 +299,6 @@ LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLCo std::string LLControlGroup::getString(const std::string& name) { return "dummy"; } LLControlGroup::~LLControlGroup() {} -namespace boost { - void intrusive_ptr_add_ref(LLCurl::Responder*) {} - void intrusive_ptr_release(LLCurl::Responder*) {} -} - LLCurl::Responder::Responder() {} void LLCurl::Responder::completedHeader(U32, std::string const&, LLSD const&) {} void LLCurl::Responder::completedRaw(U32, const std::string&, const LLChannelDescriptors&, const LLIOPipe::buffer_ptr_t& buffer) {} @@ -314,7 +309,7 @@ void LLCurl::Responder::result(LLSD const&) {} LLCurl::Responder::~Responder() {} void LLHTTPClient::get(const std::string&, const LLSD&, ResponderPtr, const LLSD&, const F32) {} -void LLHTTPClient::get(const std::string&, boost::intrusive_ptr<LLCurl::Responder>, const LLSD&, const F32) {} +void LLHTTPClient::get(const std::string&, LLPointer<LLCurl::Responder>, const LLSD&, const F32) {} LLBufferStream::LLBufferStream(const LLChannelDescriptors& channels, LLBufferArray* buffer) : std::iostream(&mStreamBuf), mStreamBuf(channels, buffer) {} diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 7c6b5403e1..e7108141ee 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -28,6 +28,7 @@ $/LicenseInfo$ """ import sys import os.path +import errno import re import tarfile import time @@ -74,20 +75,20 @@ class ViewerManifest(LLManifest): # include the list of Lindens (if any) # see https://wiki.lindenlab.com/wiki/Generated_Linden_Credits linden_names_path = os.getenv("LINDEN_CREDITS") - if linden_names_path : + if not linden_names_path : + print "No 'LINDEN_CREDITS' specified in environment, using built-in list" + else: try: linden_file = open(linden_names_path,'r') + except IOError: + print "No Linden names found at '%s', using built-in list" % linden_names_path + else: # all names should be one line, but the join below also converts to a string linden_names = ', '.join(linden_file.readlines()) self.put_in_file(linden_names, "lindens.txt") linden_file.close() print "Linden names extracted from '%s'" % linden_names_path self.file_list.append([linden_names_path,self.dst_path_of("lindens.txt")]) - except IOError: - print "No Linden names found at '%s', using built-in list" % linden_names_path - pass - else : - print "No 'LINDEN_CREDITS' specified in environment, using built-in list" # ... and the entire windlight directory self.path("windlight") @@ -114,7 +115,6 @@ class ViewerManifest(LLManifest): # skins if self.prefix(src="skins"): - self.path("paths.xml") # include the entire textures directory recursively if self.prefix(src="*/textures"): self.path("*/*.tga") @@ -132,11 +132,18 @@ class ViewerManifest(LLManifest): self.path("*/*.xml") # Local HTML files (e.g. loading screen) - if self.prefix(src="*/html"): + # The claim is that we never use local html files any + # longer. But rather than commenting out this block, let's + # rename every html subdirectory as html.old. That way, if + # we're wrong, a user actually does have the relevant + # files; s/he just needs to rename every html.old + # directory back to html to recover them. + if self.prefix(src="*/html", dst="*/html.old"): self.path("*.png") self.path("*/*/*.html") self.path("*/*/*.gif") self.end_prefix("*/html") + self.end_prefix("skins") # local_assets dir (for pre-cached textures) @@ -149,14 +156,9 @@ class ViewerManifest(LLManifest): self.path("gpu_table.txt") # The summary.json file gets left in the base checkout dir by - # build.sh. It's only created for a build.sh build, therefore we - # have to check whether it exists. :-P - summary_json = "summary.json" - summary_json_path = os.path.join(os.pardir, os.pardir, summary_json) - if os.path.exists(os.path.join(self.get_src_prefix(), summary_json_path)): - self.path(summary_json_path, summary_json) - else: - print "No %s" % os.path.join(self.get_src_prefix(), summary_json_path) + # build.sh. It's only created for a build.sh build. + if not self.path2basename(os.path.join(os.pardir, os.pardir), "summary.json"): + print "No summary.json file" def login_channel(self): """Channel reported for login and upgrade purposes ONLY; @@ -327,13 +329,13 @@ class WindowsManifest(ViewerManifest): self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) # Plugin host application - self.path(os.path.join(os.pardir, - 'llplugin', 'slplugin', self.args['configuration'], "slplugin.exe"), - "slplugin.exe") + self.path2basename(os.path.join(os.pardir, + 'llplugin', 'slplugin', self.args['configuration']), + "slplugin.exe") #self.disable_manifest_check() - self.path(src="../viewer_components/updater/scripts/windows/update_install.bat", dst="update_install.bat") + self.path2basename("../viewer_components/updater/scripts/windows", "update_install.bat") # Get shared libs from the shared libs staging directory if self.prefix(src=os.path.join(os.pardir, 'sharedlibs', self.args['configuration']), dst=""): @@ -367,9 +369,7 @@ class WindowsManifest(ViewerManifest): # Get fmod dll, continue if missing - try: - self.path("fmod.dll") - except: + if not self.path("fmod.dll"): print "Skipping fmod.dll" # For textures @@ -537,6 +537,7 @@ class WindowsManifest(ViewerManifest): result += 'File ' + pkg_file + '\n' else: result += 'Delete ' + wpath(os.path.join('$INSTDIR', rel_file)) + '\n' + # at the end of a delete, just rmdir all the directories if not install: deleted_file_dirs = [os.path.dirname(pair[1].replace(self.get_dst_prefix()+os.path.sep,'')) for pair in self.file_list] @@ -710,85 +711,82 @@ class DarwinManifest(ViewerManifest): self.path("uk.lproj") self.path("zh-Hans.lproj") - libdir = "../packages/lib/release" - dylibs = {} + def path_optional(src, dst): + """ + For a number of our self.path() calls, not only do we want + to deal with the absence of src, we also want to remember + which were present. Return either an empty list (absent) + or a list containing dst (present). Concatenate these + return values to get a list of all libs that are present. + """ + if self.path(src, dst): + return [dst] + print "Skipping %s" % dst + return [] - # Need to get the llcommon dll from any of the build directories as well - lib = "llcommon" - libfile = "lib%s.dylib" % lib - try: - self.path(self.find_existing_file(os.path.join(os.pardir, - lib, - self.args['configuration'], - libfile), - os.path.join(libdir, libfile)), - dst=libfile) - except RuntimeError: - print "Skipping %s" % libfile - dylibs[lib] = False - else: - dylibs[lib] = True - - if dylibs["llcommon"]: - for libfile in ("libapr-1.0.dylib", - "libaprutil-1.0.dylib", - "libexpat.1.5.2.dylib", - "libexception_handler.dylib", - "libGLOD.dylib", - "libcollada14dom.dylib" - ): - self.path(os.path.join(libdir, libfile), libfile) - - # SLVoice and vivox lols - for libfile in ('libsndfile.dylib', 'libvivoxoal.dylib', 'libortp.dylib', \ - 'libvivoxsdk.dylib', 'libvivoxplatform.dylib', 'SLVoice') : - self.path(os.path.join(libdir, libfile), libfile) + libdir = "../packages/lib/release" + # dylibs is a list of all the .dylib files we expect to need + # in our bundled sub-apps. For each of these we'll create a + # symlink from sub-app/Contents/Resources to the real .dylib. + # Need to get the llcommon dll from any of the build directories as well. + libfile = "libllcommon.dylib" + dylibs = path_optional(self.find_existing_file(os.path.join(os.pardir, + "llcommon", + self.args['configuration'], + libfile), + os.path.join(libdir, libfile)), + dst=libfile) + + for libfile in ( + "libapr-1.0.dylib", + "libaprutil-1.0.dylib", + "libcollada14dom.dylib", + "libexpat.1.5.2.dylib", + "libexception_handler.dylib", + "libGLOD.dylib", + ): + dylibs += path_optional(os.path.join(libdir, libfile), libfile) + + # SLVoice and vivox lols, no symlinks needed + for libfile in ( + 'libortp.dylib', + 'libsndfile.dylib', + 'libvivoxoal.dylib', + 'libvivoxsdk.dylib', + 'libvivoxplatform.dylib', + 'SLVoice', + ): + self.path2basename(libdir, libfile) - try: - # FMOD for sound - self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib") - except: - print "Skipping FMOD - not found" + # FMOD for sound + libfile = "libfmodwrapper.dylib" + path_optional(os.path.join(self.args['configuration'], libfile), libfile) # our apps - 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.dylib", - "libaprutil-1.0.dylib", - "libexpat.1.5.2.dylib", - "libexception_handler.dylib", - "libGLOD.dylib", - "libcollada14dom.dylib" - ): - target_lib = os.path.join('../../..', libfile) - self.run_command("ln -sf %(target)r %(link)r" % - {'target': target_lib, - 'link' : os.path.join(mac_crash_logger_res_path, libfile)} - ) - self.run_command("ln -sf %(target)r %(link)r" % - {'target': target_lib, - 'link' : os.path.join(mac_updater_res_path, libfile)} - ) - self.run_command("ln -sf %(target)r %(link)r" % - {'target': target_lib, - 'link' : os.path.join(slplugin_res_path, libfile)} - ) + for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"), + ("mac_updater", "mac-updater.app"), + # plugin launcher + (os.path.join("llplugin", "slplugin"), "SLPlugin.app"), + ): + self.path2basename(os.path.join(os.pardir, + app_bld_dir, self.args['configuration']), + app) + + # our apps dependencies on shared libs + # for each app, for each dylib we collected in dylibs, + # create a symlink to the real copy of the dylib. + resource_path = self.dst_path_of(os.path.join(app, "Contents", "Resources")) + for libfile in dylibs: + symlinkf(os.path.join(os.pardir, os.pardir, os.pardir, libfile), + os.path.join(resource_path, libfile)) # plugins if self.prefix(src="", dst="llplugin"): - self.path("../media_plugins/quicktime/" + self.args['configuration'] + "/media_plugin_quicktime.dylib", "media_plugin_quicktime.dylib") - self.path("../media_plugins/webkit/" + self.args['configuration'] + "/media_plugin_webkit.dylib", "media_plugin_webkit.dylib") - self.path("../packages/lib/release/libllqtwebkit.dylib", "libllqtwebkit.dylib") + self.path2basename("../media_plugins/quicktime/" + self.args['configuration'], + "media_plugin_quicktime.dylib") + self.path2basename("../media_plugins/webkit/" + self.args['configuration'], + "media_plugin_webkit.dylib") + self.path2basename("../packages/lib/release", "libllqtwebkit.dylib") self.end_prefix("llplugin") @@ -816,6 +814,30 @@ class DarwinManifest(ViewerManifest): self.run_command("chmod +x %r" % os.path.join(self.get_dst_prefix(), script)) def package_finish(self): + # Sign the app if requested. + if 'signature' in self.args: + identity = self.args['signature'] + if identity == '': + identity = 'Developer ID Application' + + # Look for an environment variable set via build.sh when running in Team City. + try: + build_secrets_checkout = os.environ['build_secrets_checkout'] + except KeyError: + pass + else: + # variable found so use it to unlock keyvchain followed by codesign + home_path = os.environ['HOME'] + keychain_pwd_path = os.path.join(build_secrets_checkout,'code-signing-osx','password.txt') + keychain_pwd = open(keychain_pwd_path).read().rstrip() + + self.run_command('security unlock-keychain -p "%s" "%s/Library/Keychains/viewer.keychain"' % ( keychain_pwd, home_path ) ) + self.run_command('codesign --verbose --force --keychain "%(home_path)s/Library/Keychains/viewer.keychain" --sign %(identity)r %(bundle)r' % { + 'home_path' : home_path, + 'identity': identity, + 'bundle': self.get_dst_prefix() + }) + channel_standin = 'Second Life Viewer' # hah, our default channel is not usable on its own if not self.default_channel(): channel_standin = self.channel() @@ -931,20 +953,24 @@ class LinuxManifest(ViewerManifest): self.path("client-readme-voice.txt","README-linux-voice.txt") self.path("client-readme-joystick.txt","README-linux-joystick.txt") self.path("wrapper.sh","secondlife") - self.path("handle_secondlifeprotocol.sh", "etc/handle_secondlifeprotocol.sh") - self.path("register_secondlifeprotocol.sh", "etc/register_secondlifeprotocol.sh") - self.path("refresh_desktop_app_entry.sh", "etc/refresh_desktop_app_entry.sh") - self.path("launch_url.sh","etc/launch_url.sh") + if self.prefix(src="", dst="etc"): + self.path("handle_secondlifeprotocol.sh") + self.path("register_secondlifeprotocol.sh") + self.path("refresh_desktop_app_entry.sh") + self.path("launch_url.sh") + self.end_prefix("etc") self.path("install.sh") self.end_prefix("linux_tools") # Create an appropriate gridargs.dat for this package, denoting required grid. self.put_in_file(self.flags_list(), 'etc/gridargs.dat') - self.path("secondlife-bin","bin/do-not-directly-run-secondlife-bin") - self.path("../linux_crash_logger/linux-crash-logger","bin/linux-crash-logger.bin") - self.path("../linux_updater/linux-updater", "bin/linux-updater.bin") - self.path("../llplugin/slplugin/SLPlugin", "bin/SLPlugin") + if self.prefix(src="", dst="bin"): + self.path("secondlife-bin","do-not-directly-run-secondlife-bin") + self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin") + self.path2basename("../llplugin/slplugin", "SLPlugin") + self.path2basename("../viewer_components/updater/scripts/linux", "update_install") + self.end_prefix("bin") if self.prefix("res-sdl"): self.path("*") @@ -960,17 +986,13 @@ class LinuxManifest(ViewerManifest): self.end_prefix("res-sdl") self.end_prefix(icon_path) - self.path("../viewer_components/updater/scripts/linux/update_install", "bin/update_install") - # plugins if self.prefix(src="", dst="bin/llplugin"): - self.path("../media_plugins/webkit/libmedia_plugin_webkit.so", "libmedia_plugin_webkit.so") + self.path2basename("../media_plugins/webkit", "libmedia_plugin_webkit.so") self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so") self.end_prefix("bin/llplugin") - try: - self.path("../llcommon/libllcommon.so", "lib/libllcommon.so") - except: + if not self.path("../llcommon/libllcommon.so", "lib/libllcommon.so"): print "Skipping llcommon.so (assuming llcommon was linked statically)" self.path("featuretable_linux.txt") @@ -994,9 +1016,7 @@ class LinuxManifest(ViewerManifest): else: installer_name += '_' + self.channel_oneword().upper() - if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer(): - print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build" - self.run_command("find %(d)r/bin %(d)r/lib -type f \\! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure + self.strip_binaries() # Fix access permissions self.run_command(""" @@ -1031,14 +1051,31 @@ class LinuxManifest(ViewerManifest): 'dst': self.get_dst_prefix(), 'inst': self.build_path_of(installer_name)}) + def strip_binaries(self): + if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer(): + print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build" + self.run_command(r"find %(d)r/bin %(d)r/lib -type f \! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure + class Linux_i686Manifest(LinuxManifest): def construct(self): super(Linux_i686Manifest, self).construct() if self.prefix("../packages/lib/release", dst="lib"): - self.path("libapr-1.so*") - self.path("libaprutil-1.so*") - self.path("libbreakpad_client.so*") + self.path("libapr-1.so") + self.path("libapr-1.so.0") + self.path("libapr-1.so.0.4.5") + self.path("libaprutil-1.so") + self.path("libaprutil-1.so.0") + self.path("libaprutil-1.so.0.4.1") + self.path("libboost_program_options-mt.so.*") + self.path("libboost_regex-mt.so.*") + self.path("libboost_thread-mt.so.*") + self.path("libboost_filesystem-mt.so.*") + self.path("libboost_signals-mt.so.*") + self.path("libboost_system-mt.so.*") + self.path("libbreakpad_client.so.0.0.0") + self.path("libbreakpad_client.so.0") + self.path("libbreakpad_client.so") self.path("libcollada14dom.so") self.path("libdb*.so") self.path("libcrypto.so.*") @@ -1054,11 +1091,8 @@ class Linux_i686Manifest(LinuxManifest): self.path("libopenjpeg.so*") self.path("libdirectfb-1.4.so.5") self.path("libfusion-1.4.so.5") - self.path("libdirect-1.4.so.5.0.4") - self.path("libdirect-1.4.so.5") - self.path("libhunspell-1.3.so") - self.path("libhunspell-1.3.so.0") - self.path("libhunspell-1.3.so.0.0.0") + self.path("libdirect-1.4.so.5*") + self.path("libhunspell-1.3.so*") self.path("libalut.so") self.path("libopenal.so", "libopenal.so.1") self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname @@ -1080,7 +1114,13 @@ class Linux_i686Manifest(LinuxManifest): # previous call did, without having to explicitly state the # version number. self.path("libfontconfig.so.*.*") - self.path("libtcmalloc.so*") #formerly called google perf tools + try: + self.path("libtcmalloc.so*") #formerly called google perf tools + pass + except: + print "tcmalloc files not found, skipping" + pass + try: self.path("libfmod-3.75.so") pass @@ -1101,9 +1141,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("libvivoxplatform.so") self.end_prefix("lib") - if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer(): - print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build" - self.run_command("find %(d)r/bin %(d)r/lib -type f \\! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure + self.strip_binaries() class Linux_x86_64Manifest(LinuxManifest): @@ -1115,5 +1153,25 @@ class Linux_x86_64Manifest(LinuxManifest): ################################################################ +def symlinkf(src, dst): + """ + Like ln -sf, but uses os.symlink() instead of running ln. + """ + try: + os.symlink(src, dst) + except OSError, err: + if err.errno != errno.EEXIST: + raise + # We could just blithely attempt to remove and recreate the target + # file, but that strategy doesn't work so well if we don't have + # permissions to remove it. Check to see if it's already the + # symlink we want, which is the usual reason for EEXIST. + if not (os.path.islink(dst) and os.readlink(dst) == src): + # Here either dst isn't a symlink or it's the wrong symlink. + # Remove and recreate. Caller will just have to deal with any + # exceptions at this stage. + os.remove(dst) + os.symlink(src, dst) + if __name__ == "__main__": main() diff --git a/indra/test/llbuffer_tut.cpp b/indra/test/llbuffer_tut.cpp index dc1a5cdd3d..a25fdebb7f 100644 --- a/indra/test/llbuffer_tut.cpp +++ b/indra/test/llbuffer_tut.cpp @@ -31,7 +31,6 @@ #include "lltut.h" #include "llbuffer.h" #include "llerror.h" -#include "llmemtype.h" namespace tut diff --git a/indra/test/lluuidhashmap_tut.cpp b/indra/test/lluuidhashmap_tut.cpp index 0544e832ce..9712a613f4 100644 --- a/indra/test/lluuidhashmap_tut.cpp +++ b/indra/test/lluuidhashmap_tut.cpp @@ -30,6 +30,10 @@ #include "linden_common.h" #include "lluuidhashmap.h" #include "llsdserialize.h" +#include "lldir.h" +#include "stringize.h" +#include <iostream> +#include <fstream> namespace tut { @@ -79,40 +83,134 @@ namespace tut template<> template<> void hash_index_object_t::test<1>() { - LLUUIDHashMap<UUIDTableEntry, 32> hashTable(UUIDTableEntry::uuidEq, UUIDTableEntry()); + set_test_name("stress test"); + // As of 2012-10-10, I (nat) have observed sporadic failures of this + // test: "set/get did not work." The trouble is that since test data + // are randomly generated with every run, it is impossible to debug a + // test failure. One is left with the uneasy suspicion that + // LLUUID::generate() can sometimes produce duplicates even within the + // moderately small number requested here. Since rerunning the test + // generally allows it to pass, it's too easy to shrug and forget it. + // The following code is intended to support reproducing such test + // failures. The idea is that, on test failure, we save the generated + // data to a canonical filename in a temp directory. Then on every + // subsequent run, we check for that filename. If it exists, we reload + // that specific data rather than generating fresh data -- which + // should presumably reproduce the same test failure. But we inform + // the user that to resume normal (random) test runs, s/he need only + // delete that file. And since it's in a temp directory, sooner or + // later the system will clean it up anyway. + const char* tempvar = "TEMP"; + const char* tempdir = getenv(tempvar); // Windows convention + if (! tempdir) + { + tempvar = "TMPDIR"; + tempdir = getenv(tempvar); // Mac convention + } + if (! tempdir) + { + // reset tempvar to the first var we check; it's just a + // recommendation + tempvar = "TEMP"; + tempdir = "/tmp"; // Posix in general + } + std::string savefile(gDirUtilp->add(tempdir, "lluuidhashmap_tut.save.txt")); const int numElementsToCheck = 32*256*32; - std::vector<LLUUID> idList(numElementsToCheck); - int i; - - for (i = 0; i < numElementsToCheck; i++) + std::vector<LLUUID> idList; + if ((! getenv("TEAMCITY_PROJECT_NAME")) && gDirUtilp->fileExists(savefile)) { - LLUUID id; - id.generate(); - UUIDTableEntry entry(id, i); - hashTable.set(id, entry); - idList[i] = id; + // This is not a TeamCity build, and we have saved data from a + // previous failed run. Reload that data. + std::ifstream inf(savefile.c_str()); + if (! inf.is_open()) + { + fail(STRINGIZE("Although save file '" << savefile << "' exists, it cannot be opened")); + } + std::string item; + while (std::getline(inf, item)) + { + idList.push_back(LLUUID(item)); + } + std::cout << "Reloaded " << idList.size() << " items from '" << savefile << "'"; + if (idList.size() != numElementsToCheck) + { + std::cout << " (expected " << numElementsToCheck << ")"; + } + std::cout << " -- delete this file to generate new data" << std::endl; + } + else + { + // This is a TeamCity build, or (normal case) savefile does not + // exist: regenerate idList from scratch. + for (int i = 0; i < numElementsToCheck; ++i) + { + LLUUID id; + id.generate(); + idList.push_back(id); + } } - for (i = 0; i < numElementsToCheck; i++) + LLUUIDHashMap<UUIDTableEntry, 32> hashTable(UUIDTableEntry::uuidEq, UUIDTableEntry()); + int i; + + for (i = 0; i < idList.size(); ++i) { - LLUUID idToCheck = idList[i]; - UUIDTableEntry entryToCheck = hashTable.get(idToCheck); - ensure("set/get did not work", entryToCheck.getID() == idToCheck && entryToCheck.getValue() == (size_t)i); + UUIDTableEntry entry(idList[i], i); + hashTable.set(idList[i], entry); } - for (i = 0; i < numElementsToCheck; i++) + try { - LLUUID idToCheck = idList[i]; - if (i % 2 != 0) + for (i = 0; i < idList.size(); i++) { - hashTable.remove(idToCheck); + LLUUID idToCheck = idList[i]; + UUIDTableEntry entryToCheck = hashTable.get(idToCheck); + ensure_equals(STRINGIZE("set/get ID (entry " << i << ")").c_str(), + entryToCheck.getID(), idToCheck); + ensure_equals(STRINGIZE("set/get value (ID " << idToCheck << ")").c_str(), + entryToCheck.getValue(), (size_t)i); } - } - for (i = 0; i < numElementsToCheck; i++) + for (i = 0; i < idList.size(); i++) + { + LLUUID idToCheck = idList[i]; + if (i % 2 != 0) + { + hashTable.remove(idToCheck); + } + } + + for (i = 0; i < idList.size(); i++) + { + LLUUID idToCheck = idList[i]; + ensure("remove or check did not work", (i % 2 == 0 && hashTable.check(idToCheck)) || (i % 2 != 0 && !hashTable.check(idToCheck))); + } + } + catch (const failure&) { - LLUUID idToCheck = idList[i]; - ensure("remove or check did not work", (i % 2 == 0 && hashTable.check(idToCheck)) || (i % 2 != 0 && !hashTable.check(idToCheck))); + // One of the above tests failed. Try to save idList to repro with + // a later run. + std::ofstream outf(savefile.c_str()); + if (! outf.is_open()) + { + // Sigh, don't use fail() here because we want to preserve + // the original test failure. + std::cout << "Cannot open file '" << savefile + << "' to save data -- check and fix " << tempvar << std::endl; + } + else + { + // outf.is_open() + for (int i = 0; i < idList.size(); ++i) + { + outf << idList[i] << std::endl; + } + std::cout << "Saved " << idList.size() << " entries to '" << savefile + << "' -- rerun test to debug with these" << std::endl; + } + // re-raise the same exception -- we WANT this test failure to + // be reported! We just needed to save the data on the way out. + throw; } } diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index d480b63094..bdcb068200 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -271,6 +271,16 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para } return; // Done! } + + /* Sometimes we end with "Started" here. Slightly slow server? + * Seems to be ok to just skip it. Otherwise we'd error out and crash in the if below. + */ + if( status == "Started") + { + LL_DEBUGS("LLLogin") << mAuthResponse << LL_ENDL; + continue; + } + // If we don't recognize status at all, trouble if (! (status == "CURLError" || status == "XMLRPCError" diff --git a/indra/viewer_components/updater/llupdatechecker.cpp b/indra/viewer_components/updater/llupdatechecker.cpp index 4da774a5f6..5edbbf9914 100644 --- a/indra/viewer_components/updater/llupdatechecker.cpp +++ b/indra/viewer_components/updater/llupdatechecker.cpp @@ -51,37 +51,6 @@ public: }; -class LLUpdateChecker::Implementation: - public LLHTTPClient::Responder -{ -public: - Implementation(Client & client); - ~Implementation(); - void checkVersion(std::string const & protocolVersion, std::string const & hostUrl, - std::string const & servicePath, std::string channel, std::string version); - - // Responder: - virtual void completed(U32 status, - const std::string & reason, - const LLSD& content); - virtual void error(U32 status, const std::string & reason); - -private: - static const char * sProtocolVersion; - - Client & mClient; - LLHTTPClient mHttpClient; - bool mInProgress; - std::string mVersion; - - std::string buildUrl(std::string const & protocolVersion, std::string const & hostUrl, - std::string const & servicePath, std::string channel, std::string version); - - LOG_CLASS(LLUpdateChecker::Implementation); -}; - - - // LLUpdateChecker //----------------------------------------------------------------------------- @@ -134,13 +103,7 @@ void LLUpdateChecker::Implementation::checkVersion(std::string const & protocolV std::string checkUrl = buildUrl(protocolVersion, hostUrl, servicePath, channel, version); LL_INFOS("UpdateCheck") << "checking for updates at " << checkUrl << llendl; - // The HTTP client will wrap a raw pointer in a boost::intrusive_ptr causing the - // passed object to be silently and automatically deleted. We pass a self- - // referential intrusive pointer to which we add a reference to keep the - // client from deleting the update checker implementation instance. - LLHTTPClient::ResponderPtr temporaryPtr(this); - boost::intrusive_ptr_add_ref(temporaryPtr.get()); - mHttpClient.get(checkUrl, temporaryPtr); + mHttpClient.get(checkUrl, this); } void LLUpdateChecker::Implementation::completed(U32 status, diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h index d882169068..23f62a7c5e 100644 --- a/indra/viewer_components/updater/llupdatechecker.h +++ b/indra/viewer_components/updater/llupdatechecker.h @@ -29,6 +29,7 @@ #include <boost/shared_ptr.hpp> +#include "llhttpclient.h" // // Implements asynchronous checking for updates. @@ -36,7 +37,36 @@ class LLUpdateChecker { public: class Client; - class Implementation; + class Implementation: + + public LLHTTPClient::Responder + { + public: + Implementation(Client & client); + ~Implementation(); + void checkVersion(std::string const & protocolVersion, std::string const & hostUrl, + std::string const & servicePath, std::string channel, std::string version); + + // Responder: + virtual void completed(U32 status, + const std::string & reason, + const LLSD& content); + virtual void error(U32 status, const std::string & reason); + + private: + static const char * sProtocolVersion; + + Client & mClient; + LLHTTPClient mHttpClient; + bool mInProgress; + std::string mVersion; + + std::string buildUrl(std::string const & protocolVersion, std::string const & hostUrl, + std::string const & servicePath, std::string channel, std::string version); + + LOG_CLASS(LLUpdateChecker::Implementation); + }; + // An exception that may be raised on check errors. class CheckError; @@ -48,7 +78,7 @@ public: std::string const & servicePath, std::string channel, std::string version); private: - boost::shared_ptr<Implementation> mImplementation; + LLPointer<Implementation> mImplementation; }; diff --git a/indra/viewer_components/updater/scripts/linux/update_install b/indra/viewer_components/updater/scripts/linux/update_install index e0505a9f72..a9df9042fd 100644 --- a/indra/viewer_components/updater/scripts/linux/update_install +++ b/indra/viewer_components/updater/scripts/linux/update_install @@ -1,10 +1,217 @@ #! /bin/bash -INSTALL_DIR=$(cd "$(dirname "$0")/.." ; pwd) -export LD_LIBRARY_PATH="$INSTALL_DIR/lib" -bin/linux-updater.bin --file "$1" --dest "$INSTALL_DIR" --name "Second Life Viewer" --stringsdir "$INSTALL_DIR/skins/default/xui/en" --stringsfile "strings.xml" -if [ $? -ne 0 ] - then echo $3 >> "$2" +# @file update_install +# @author Nat Goodspeed +# @date 2013-01-09 +# @brief Update the containing Second Life application bundle to the version in +# the specified tarball. +# +# This bash implementation is derived from the previous linux-updater.bin +# application. +# +# $LicenseInfo:firstyear=2013&license=viewerlgpl$ +# Copyright (c) 2013, Linden Research, Inc. +# $/LicenseInfo$ + +# **************************************************************************** +# script parameters +# **************************************************************************** +tarball="$1" # the file to install +markerfile="$2" # create this file on failure +mandatory="$3" # what to write to markerfile on failure + +# **************************************************************************** +# helper functions +# **************************************************************************** +# empty array +cleanups=() + +# add a cleanup action to execute on exit +function cleanup { + # wacky bash syntax for appending to array + cleanups[${#cleanups[*]}]="$*" +} + +# called implicitly on exit +function onexit { + for action in "${cleanups[@]}" + do # don't quote, support actions consisting of multiple words + $action + done +} +trap 'onexit' EXIT + +# write to log file +function log { + # our log file will be open as stderr -- but until we set up that + # redirection, logging to stderr is better than nothing + echo "$*" 1>&2 +} + +# We display status by leaving one background xmessage process running. This +# is the pid of that process. +statuspid="" + +function clear_message { + [ -n "$statuspid" ] && kill $statuspid + statuspid="" +} + +# make sure we remove any message box we might have put up +cleanup clear_message + +# can we use zenity, or must we fall back to xmessage? +zenpath="$(which zenity)" +if [ -n "$zenpath" ] +then # zenity on PATH and is executable + # display a message box and continue + function status { + # clear any previous message + clear_message + # put up a new zenity box and capture its pid + "$zenpath" --info --title "Second Life Viewer Updater" \ + --width=320 --height=120 --text="$*" & + statuspid=$! + } + + # display an error box and wait for user + function errorbox { + "$zenpath" --error --title "Second Life Viewer Updater" \ + --width=320 --height=120 --text="$*" + } + +else # no zenity, use xmessage instead + # display a message box and continue + function status { + # clear any previous message + clear_message + # put up a new xmessage and capture its pid + xmessage -buttons OK:2 -center "$*" & + statuspid=$! + } + + # display an error box and wait for user + function errorbox { + xmessage -buttons OK:2 -center "$*" + } +fi + +# display an error box and terminate +function fail { + # Log the message + log "$@" + # tell subsequent viewer things went south + echo "$mandatory" > "$markerfile" + # add boilerplate + errorbox "An error occurred while updating Second Life: +$* +Please download the latest viewer from www.secondlife.com." + exit 1 +} + +# Find a graphical sudo program and define mysudo function. On error, $? is +# nonzero; output is in $err instead of being written to stdout/stderr. +gksudo="$(which gksudo)" +kdesu="$(which kdesu)" +if [ -n "$gksudo" ] +then function mysudo { + # gksudo allows you to specify description + err="$("$gksudo" --description "Second Life Viewer Updater" "$@" 2>&1)" + } +elif [ -n "$kdesu" ] +then function mysudo { + err="$("$kdesu" "$@" 2>&1)" + } +else # couldn't find either one, just try it anyway + function mysudo { + err="$("$@" 2>&1)" + } fi -rm -f "$1" +# Move directories, using mysudo if we think it necessary. On error, $? is +# nonzero; output is in $err instead of being written to stdout/stderr. +function sudo_mv { + # If we have write permission to both parent directories, shouldn't need + # sudo. + if [ -w "$(dirname "$1")" -a -w "$(dirname "$2")" ] + then err="$(mv "$@" 2>&1)" + else # use available sudo program; mysudo sets $? and $err + mysudo mv "$@" + fi +} + +# **************************************************************************** +# main script logic +# **************************************************************************** +mydir="$(dirname "$0")" +# We happen to know that the viewer specifies a marker-file pathname within +# the logs directory. +logsdir="$(dirname "$markerfile")" +logname="$logsdir/updater.log" + +# move aside old updater.log; we're about to create a new one +[ -f "$logname" ] && mv "$logname" "$logname.old" + +# Set up redirections for this script such that stderr is logged. (But first +# move the previous stderr to file descriptor 3.) +exec 3>&2- 2> "$logname" + +# Rather than setting up a special pipeline to timestamp every line of stderr, +# produce header lines into log file indicating timestamp and the arguments +# with which we were invoked. +date 1>&2 +log "$0 $*" + +# Log every command we execute, along with any stderr it might produce +set -x + +status 'Installing Second Life...' + +# Creating tempdir under /tmp means it's possible that tempdir is on a +# different filesystem than INSTALL_DIR. One is tempted to create tempdir on a +# path derived from `dirname INSTALL_DIR` -- but it seems modern 'mv' can +# handle moving across filesystems?? +tempdir="$(mktemp -d)" +tempinstall="$tempdir/install" +# capture the actual error message, if any +err="$(mkdir -p "$tempinstall" 2>&1)" || fail "$err" +cleanup rm -rf "$tempdir" + +# If we already knew the name of the tarball's top-level directory, we could +# just move that when all was said and done. Since we don't, untarring to the +# 'install' subdir with --strip 1 effectively renames that top-level +# directory. +# untar failures tend to be voluminous -- don't even try to capture, just log +tar --strip 1 -xjf "$tarball" -C "$tempinstall" || fail "Untar command failed" + +INSTALL_DIR="$(cd "$mydir/.." ; pwd)" + +# Considering we're launched from a subdirectory of INSTALL_DIR, would be +# surprising if it did NOT already exist... +if [ -e "$INSTALL_DIR" ] +then backup="$INSTALL_DIR.backup" + backupn=1 + while [ -e "$backup" ] + do backup="$INSTALL_DIR.backup.$backupn" + ((backupn += 1)) + done + # on error, fail with actual error message from sudo_mv: permissions, + # cross-filesystem mv, ...? + sudo_mv "$INSTALL_DIR" "$backup" || fail "$err" +fi +# We unpacked the tarball into tempinstall. Move that. +if ! sudo_mv "$tempinstall" "$INSTALL_DIR" +then # If we failed to move the temp install to INSTALL_DIR, try to restore + # INSTALL_DIR from backup. Save $err because next sudo_mv will trash it! + realerr="$err" + sudo_mv "$backup" "$INSTALL_DIR" + fail "$realerr" +fi + +# Removing the tarball here, rather than with a 'cleanup' action, means we +# only remove it if we succeeded. +rm -f "$tarball" + +# Launch the updated viewer. Restore original stderr from file descriptor 3, +# though -- otherwise updater.log gets cluttered with the viewer log! +"$INSTALL_DIR/secondlife" 2>&3- & diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 7c016fecf9..de07beee7c 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -63,7 +63,7 @@ class LLDir_Mock : public LLDir const std::string &mask, std::string &fname) {} std::string getCurPath() { return ""; } - BOOL fileExists(const std::string &filename) const { return false; } + bool fileExists(const std::string &filename) const { return false; } std::string getLLPluginLauncher() { return ""; } std::string getLLPluginFilename(std::string base_name) { return ""; } @@ -78,9 +78,12 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, void LLDir::setChatLogsDir(const std::string &path){} void LLDir::setPerAccountChatLogsDir(const std::string &username){} void LLDir::setLindenUserDir(const std::string &username){} -void LLDir::setSkinFolder(const std::string &skin_folder){} +void LLDir::setSkinFolder(const std::string &skin_folder, const std::string& language){} +std::string LLDir::getSkinFolder() const { return "default"; } +std::string LLDir::getLanguage() const { return "en"; } bool LLDir::setCacheDir(const std::string &path){ return true; } void LLDir::dumpCurrentDirectories() {} +void LLDir::updatePerAccountChatLogsDir() {} std::string LLDir::getExpandedFilename(ELLPath location, const std::string &filename) const |